private void button2_Click(object sender, EventArgs e) { frm_diagnosis frm = new frm_diagnosis(); frm.ShowDialog(); dtt = new DataTable(); dtt = con.selectt("select id,name from diagnosis"); cmb_diagnosis.DataSource = dtt; cmb_diagnosis.ValueMember = "id"; cmb_diagnosis.DisplayMember = "name"; }
private void txt_DiagnosisSearch_Click(object sender, EventArgs e) { frm_diagnosis frm = new frm_diagnosis(); frm.ShowDialog(); dt = new DataTable(); dt = con.selectt("select id,name from diagnosis"); cb_initialDiagnosis.DataSource = dt; cb_initialDiagnosis.ValueMember = "id"; cb_initialDiagnosis.DisplayMember = "name"; }