Exemple #1
0
        public void LoadData()
        {
            List <eDVD> list = dVDBUL.getDVDs();

            dgv_dsdia.DataSource = ConvertListToDataTable(list);
            FormatGridView(dgv_dsdia);
        }
        private void loadtext(int id)
        {
            List <eDVD> dv = dvd.getDVDs().Where(x => x.id_TieuDe == id).ToList();

            txt_tbs.Text = dv.Count().ToString();
            int i = 0, j = 0, k = 0, z = 0;

            foreach (var item in dv)
            {
                if (item.trangThai == 1)
                {
                    i++;
                }
                else if (item.trangThai == -1)
                {
                    j++;
                }
            }
            List <ePhieuDatTruoc> lsdt = pdt.getPhieuDatTruocs();

            foreach (var item in dv)
            {
                if (lsdt.Where(x => x.id_DVD == item.id_DVD).FirstOrDefault() != null)
                {
                    k++;
                }
            }
            foreach (var item in dv)
            {
                z = z + lsdt.Where(x => x.id_DVD == item.id_DVD).ToList().Count();
            }
            txt_dcthue.Text    = i.ToString();
            txt_dattruoc.Text  = k.ToString();
            txt_kho.Text       = j.ToString();
            txt_dtchoxuly.Text = z.ToString();
        }
Exemple #3
0
 private void QuanLyDia_Load(object sender, EventArgs e)
 {
     dgv_dsdia.DataSource = dVDBUL.getDVDs();
 }