protected void Button4_Click(object sender, EventArgs e) { CusProps p = new CusProps(); p.C_id = txt_eid.Text; CusBLL cus = new CusBLL(); DataTable dt = cus.searchCusBLL(p); if (dt.Rows.Count > 0) { massege("Record Found..!"); txt_name.Text = dt.Rows[0]["name"].ToString(); cnic.Text = dt.Rows[0]["cnic"].ToString(); txt_cell.Text = dt.Rows[0]["cell"].ToString(); txt_address.Text = dt.Rows[0]["address"].ToString(); } else { massege("Record Not Found..!"); txt_name.Text = ""; txt_cell.Text = ""; txt_address.Text = ""; cnic.Text = ""; } }
private void button3_Click(object sender, EventArgs e) { CusProps p = new CusProps(); p.C_id = txt_eid.Text; CusBLL cus = new CusBLL(); DataTable dt = cus.searchCusBLL(p); if (dt.Rows.Count > 0) { MessageBox.Show("Record Found..!"); txt_name.Text = dt.Rows[0]["name"].ToString(); cnic.Text = dt.Rows[0]["cnic"].ToString(); txt_cell.Text = dt.Rows[0]["cell"].ToString(); txt_address.Text = dt.Rows[0]["address"].ToString(); } else { MessageBox.Show("Record Not Found..!"); } }