private void btn_Add_Click(object sender, EventArgs e) { try { dr_id = Cmb_doctor.GetItemText(Cmb_doctor.SelectedValue); DataTable getapnt = this.ctrlr.getappointment(dr_id); getappointment(getapnt); } catch (Exception ex) { MessageBox.Show("Error!..", ex.Message, MessageBoxButtons.OK, MessageBoxIcon.Error); } }
public void getdoctrname(string dt) { if (dt != "") { int index = Cmb_doctor.FindString(dt); if (index >= 0) { Cmb_doctor.SelectedIndex = index; } else { Cmb_doctor.SelectedIndex = 0; } } }