Exemple #1
0
        private void LoadHangKhachHang()
        {
            var nguon = HangKhachHang.DocTatCa();

            cboHangKH.ValueMember   = "ID";
            cboHangKH.DisplayMember = "Ten";
            cboHangKH.DataSource    = nguon;
            cboHangKH.DropDownStyle = ComboBoxStyle.DropDownList;
        }
 private void LoadHangKH(int tinhTrangForm)
 {
     foreach (HangKhachHang hang in HangKhachHang.DocTatCa())
     {
         nguonHangKH.Add(hang.ID, hang.Ten);
     }
     cboHangKH.Items.Clear();
     foreach (KeyValuePair <int, string> kv in nguonHangKH)
     {
         cboHangKH.Items.Add(kv.Value);
         cboHangKH.SelectedIndex = 0;
     }
     cboHangKH.DropDownStyle = ComboBoxStyle.DropDownList;
 }
Exemple #3
0
        public Dictionary <int, string> HangKhachHangS()
        {
            var hangKHTheoUser = NguoiDung.DocTheoTenDangNhap(View.TenNhanVien.Trim().ToLower()).ChoHangKhachHang.Trim().Split(';');
            var nguonHangKH    = HangKhachHang.DocTatCa().Where(x => hangKHTheoUser.Contains(x.MaHieu.Trim())).ToList();
            //var so = nguonHangKH.Count();

            //var so = nguonHangKH.Count();
            Dictionary <int, string> dict = new Dictionary <int, string>();

            foreach (HangKhachHang hkh in nguonHangKH)
            {
                dict.Add(hkh.ID, hkh.Ten);
            }
            return(dict);
        }
Exemple #4
0
 public List <HangKhachHang> HangKhachHangS()
 {
     return(HangKhachHang.DocTatCa());
 }