private void GetGroupName() { string sSQL; sSQL = "SELECT drg_grp AS GROUP_NAME FROM drug_list "; sSQL += "GROUP BY drg_grp "; sSQL += "ORDER BY drg_grp "; DataTable dt = db.Query(sSQL); Common.SetComboBoxItem(Cb_Group, dt, false, "GROUP_NAME", "GROUP_NAME"); Ext.Net.ListItem litem2; litem2 = new Ext.Net.ListItem("(全部)", "(全部)"); ComboBoxGroup.Items.Add(litem2); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { litem2 = new Ext.Net.ListItem(dt.Rows[i]["GROUP_NAME"].ToString(), dt.Rows[i]["GROUP_NAME"].ToString()); ComboBoxGroup.Items.Add(litem2); } ComboBoxGroup.GetStore().DataBind(); Common.SetComboBoxValue(ComboBoxGroup, "药品", false); } }
private void GetGroupName() { string sSQL; sSQL = "SELECT pck_code AS CODE, pck_name AS NAME FROM package_setup "; DataTable dt = db.Query(sSQL); Common.SetComboBoxItem(ComboBoxPck, dt, true, "NAME", "NAME"); Ext.Net.ListItem litem1; litem1 = new Ext.Net.ListItem("(全部)", "(全部)"); ComboBoxGroup.Items.Add(litem1); if (dt.Rows.Count > 0) { for (int i = 0; i < dt.Rows.Count; i++) { litem1 = new Ext.Net.ListItem(dt.Rows[i]["NAME"].ToString(), dt.Rows[i]["NAME"].ToString()); ComboBoxGroup.Items.Add(litem1); } ComboBoxGroup.GetStore().DataBind(); Common.SetComboBoxValue(ComboBoxGroup, "自体内瘘", false); } sSQL = "SELECT genst_code AS CODE, genst_desc AS NAME FROM general_setup WHERE genst_ctg='drgfreq'";//用藥頻率 DataTable dt1 = db.Query(sSQL); Common.SetComboBoxItem(cb_ordfreq, dt1, true, "NAME", "NAME"); cb_ordfreq.Select(0); sSQL = "SELECT med_code AS CODE, med_name AS NAME FROM med_way";//給藥方式 dt1 = db.Query(sSQL); Common.SetComboBoxItem(cb_medway, dt1, true, "NAME", "NAME"); }