예제 #1
0
        public void LoadData()
        {
            maTDMoi = DoAnQLKaraokeBUS.ThucDonBUS.MaThucDonMoi();
            //trThai = 1;
            //TrangThai();
            LoaiThucDonBUS lp = new LoaiThucDonBUS();

            cbo_Loai.DataSource    = lp.DanhSachLoaiTD().FindAll(o => o.TINHTRANG == true);
            cbo_Loai.ValueMember   = "MALOAITD";
            cbo_Loai.DisplayMember = "TEN";

            TinhTrangTDBUS tt = new TinhTrangTDBUS();

            cbo_TT.DataSource    = tt.DSTINHTRANGTD();
            cbo_TT.ValueMember   = "MATTR";
            cbo_TT.DisplayMember = "TENTTR";

            //load datagridviewcomboboxcolum truoc khi load ds .
            DataGridViewComboBoxColumn dgv_LoaiTD = (DataGridViewComboBoxColumn)dgv_ThucDon.Columns["colLOAITD"];

            dgv_LoaiTD.DataSource    = lp.DanhSachLoaiTD().FindAll(o => o.TINHTRANG == true);
            dgv_LoaiTD.ValueMember   = "MALOAITD";
            dgv_LoaiTD.DisplayMember = "TEN";

            DataGridViewComboBoxColumn dgvcb_tinhtrang = (DataGridViewComboBoxColumn)dgv_ThucDon.Columns["colTINHTRANG"];

            dgvcb_tinhtrang.DataSource    = tt.DSTINHTRANGTD();
            dgvcb_tinhtrang.ValueMember   = "MATTR";
            dgvcb_tinhtrang.DisplayMember = "TENTTR";

            //DataGridViewCheckBoxColumn dgvckb = (DataGridViewCheckBoxColumn)dgv_sanpham.Columns["TinhTrang"];
            ThucDonBUS b = new ThucDonBUS();

            dgv_ThucDon.DataSource = b.DanhSachTD();
        }
예제 #2
0
        private void LoadData()
        {
            LoaiThucDonBUS b = new LoaiThucDonBUS();

            dgv_LoaiTD.DataSource = b.DanhSachLoaiTD();
        }