private void textBox9_TextChanged(object sender, EventArgs e)
{
using (OleDbCoection con = new OleDbCoection(Coection))
{
using (OleDbDataAdapter da = new OleDbDataAdapter("select * from Table1 where shenasb='" + textBox9.Text + "'", con))
{
DataTable dt = new DataTable();
con.Open();
da.Fill(dt);
con.Close();
if (dt.Rows.Count > 0)
{
using (OleDbDataAdapter ma = new OleDbDataAdapter("select payb from Table1 where shenasb='" + textBox9.Text + "'", con))
{
con.Open();
OleDbCommand cmd = new OleDbCommand("select payb from Table1 where shenasb = '" + textBox9.Text + "'", con);
cmd.Coection = con;
OleDbDataReader reader = cmd.ExecuteReader();
DataTable bt = new DataTable();
ma.Fill(bt);
if (reader.Read())
{
int hogh = reader["payb"];
label11.Text = hogh;
}
reader.Close();
con.Close();
برچسب:
نویسنده: خنج