示例#1
0
        public void init_ListView()
        {
            ObservableCollection <MATHANG> listMatHang = new ObservableCollection <MATHANG>(DataProvider.Ins.DB.MATHANGs);

            ListMatHang = new ObservableCollection <ListMatHangThem>();
            int stt = 1;

            foreach (var mh in listMatHang)
            {
                ListMatHangThem mh_them = new ListMatHangThem(stt + "", mh.MaMH, mh.TenMH, mh.GiaBan + "", mh.SoLuongTonGian - get_SoLuongDaMua(mh.MaMH) + "");
                ListMatHang.Add(mh_them);
                stt++;
            }
        }
示例#2
0
        public void search_MatHang(string ma, string ten)
        {
            ObservableCollection <MATHANG> listMatHang = new ObservableCollection <MATHANG>(DataProvider.Ins.DB.MATHANGs);

            ListMatHang = new ObservableCollection <ListMatHangThem>();
            int stt = 1;

            foreach (var mh in listMatHang)
            {
                if (duyet_MatHang(mh, ma, ten))
                {
                    ListMatHangThem mh_them = new ListMatHangThem(stt + "", mh.MaMH, mh.TenMH, mh.GiaBan + "", mh.SoLuongTonGian - get_SoLuongDaMua(mh.MaMH) + "");
                    ListMatHang.Add(mh_them);
                    stt++;
                }
            }
        }
        public void init_ListView()
        {
            ObservableCollection <MATHANG> listMatHang = new ObservableCollection <MATHANG>(DataProvider.Ins.DB.MATHANGs);

            ListMatHang = new ObservableCollection <ListMatHangThem>();
            int stt = 1;

            foreach (var mh in listMatHang)
            {
                if (mh.MaNCC == NhapHang_ViewModel.mancc_nhaphang)
                {
                    ListMatHangThem mh_them = new ListMatHangThem(stt + "", mh.MaMH, mh.TenMH, mh.GiaBan + "");
                    ListMatHang.Add(mh_them);
                    stt++;
                }
            }
        }