public void ShowHH()
        {
            DataTable dt = tHH.GetHangHoa_ALL();

            cmbTenThuoc.DisplayMember = "TENHANGHOA";
            cmbTenThuoc.ValueMember   = "MA";
            cmbTenThuoc.DataSource    = dt;
        }
        public void ShowHH(ComboBox cmb)
        {
            Pharmacy.BLL.THangHoa tHH = new Pharmacy.BLL.THangHoa();
            DataTable             dt  = tHH.GetHangHoa_ALL();

            cmb.DisplayMember = "TENHANGHOA";
            cmb.ValueMember   = "MA";
            cmb.DataSource    = dt;
            LoadAutoHH(cmb, dt);
        }
        public void LoadAutoHH()
        {
            HANGHOA = tHH.GetHangHoa_ALL();
            AutoCompleteStringCollection collec = new AutoCompleteStringCollection();

            for (int i = 0; i < HANGHOA.Rows.Count; i++)
            {
                collec.Add(HANGHOA.Rows[i]["TENHANGHOA"].ToString());
            }
            cmbTenThuoc.AutoCompleteMode         = AutoCompleteMode.SuggestAppend;
            cmbTenThuoc.AutoCompleteSource       = AutoCompleteSource.CustomSource;
            cmbTenThuoc.AutoCompleteCustomSource = collec;
        }
 public void loadhanghoa()
 {
     HH = tHH.GetHangHoa_ALL();
     if (HH != null)
     {
         lvhanghoa.Items.Clear();
         for (int i = 0; i < HH.Rows.Count; i++)
         {
             int          stt  = i + 1;
             ListViewItem item = new ListViewItem(stt.ToString());
             lvhanghoa.Items.Add(item);
             // item.SubItems.Add(stt.ToString());
             item.SubItems.Add(HH.Rows[i]["CODE"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["TENHANGHOA"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["TENDVT"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["MAQUYCACH"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["TENLOAISP"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["TENNHOM"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["CHIDINH"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["MOTA"].ToString().Trim());
             item.SubItems.Add(HH.Rows[i]["MA"].ToString().Trim());
         }
     }
 }
Пример #5
0
 public void ShowHH(ComboBox cmb)
 {
     Pharmacy.BLL.THangHoa tHH = new Pharmacy.BLL.THangHoa();
     DataTable dt = tHH.GetHangHoa_ALL();
     cmb.DisplayMember = "TENHANGHOA";
     cmb.ValueMember = "MA";
     cmb.DataSource = dt;
     LoadAutoHH(cmb,dt);
 }