private void loadcombobox() { DataTable dt = new DataTable(); dtbus = new LapDonThuocBUS(); dt = dtbus.loadPKtoCombobox(); for (int i = 0; i < dt.Rows.Count; i++) { comboBox_mapk.Items.Add(dt.Rows[i][0].ToString()); } //// LapDonThuocBUS dtbus1 = new LapDonThuocBUS(); DataTable dt1 = new DataTable(); dtbus1 = new LapDonThuocBUS(); dt1 = dtbus1.loadThuoctoCombobox(); for (int i = 0; i < dt1.Rows.Count; i++) { comboBox_Loaithuoc.Items.Add("(" + dt1.Rows[i][0] + ")\t" + dt1.Rows[i][1].ToString()); } LapDonThuocBUS dtbus2 = new LapDonThuocBUS(); DataTable dt2 = new DataTable(); dtbus2 = new LapDonThuocBUS(); dt2 = dtbus2.loadCDtoCombobox(); for (int i = 0; i < dt2.Rows.Count; i++) { comboBox_cachdung.Items.Add("(" + dt2.Rows[i][0] + ")\t" + dt2.Rows[i][1].ToString()); } }
private void load_datagridview() { dtbus = new LapDonThuocBUS(); List <LapDonThuocDTO> list = dtbus.select(comboBox_mapk.Text); loadDonThuoc(list); }