示例#1
0
        private void TraCuu_Load(object sender, EventArgs e)
        {
            LoaiDocGiaBUS        bus = new LoaiDocGiaBUS();
            List <LoaiDocGiaDTO> ListOfLoaiDocGia = (List <LoaiDocGiaDTO>)bus.GetAll();

            cmbType.DataSource    = ListOfLoaiDocGia;
            cmbType.DisplayMember = "TenLoaiDocGia";
            cmbType.ValueMember   = "MaLoaiDocGia";
        }
        private void TheDocGia_Load(object sender, EventArgs e)
        {
            LoaiDocGiaBUS        bus = new LoaiDocGiaBUS();
            List <LoaiDocGiaDTO> ListOfLoaiDocGia = (List <LoaiDocGiaDTO>)bus.GetAll();

            cmbType.DataSource    = ListOfLoaiDocGia;
            cmbType.DisplayMember = "TenLoaiDocGia";
            cmbType.ValueMember   = "MaLoaiDocGia";

            TheDocGiaBUS               tdgBus          = new TheDocGiaBUS();
            List <TheDocGiaDTO>        ListOfTheDocGia = (List <TheDocGiaDTO>)tdgBus.GetAll();
            BindingList <TheDocGiaDTO> bl = new BindingList <TheDocGiaDTO>(ListOfTheDocGia);

            dgv.DataSource = bl;
            bl.AllowNew    = false;
            //bl.AllowRemove = false;
            //bl.AllowEdit = false;
        }