Beispiel #1
0
        private void ucHOADON_Load(object sender, EventArgs e)
        {
            List <TRANGTHAIDH> lstTT    = dhDAO.GetListTTDH();
            List <string>      lstTTStr = (from s in lstTT select s.TEN).ToList();

            cbBTrangthai.DataSource = lstTTStr;
            //cbBTrangthai.ValueMember = "TEN";
            //cbBTrangthai.DisplayMember = "TEN";
            cbBUpdate.DataSource    = lstTT;
            cbBUpdate.ValueMember   = "ID";
            cbBUpdate.DisplayMember = "TEN";
            RepositoryItemLookUpEdit ribm = new RepositoryItemLookUpEdit();

            ribm.DataSource    = lstTT;
            ribm.ValueMember   = "ID";
            ribm.DisplayMember = "TEN";
            grViewDH.Columns["TRANGTHAI_ID"].ColumnEdit = ribm;
            List <LOAISP>            lstLSP = new LoaiSpDAO().getListLOAISP();
            RepositoryItemLookUpEdit risp   = new RepositoryItemLookUpEdit();

            risp.DataSource    = lstLSP;
            risp.ValueMember   = "ID";
            risp.DisplayMember = "TEN";
            grViewCTDH.Columns["LOAISP"].ColumnEdit = risp;
        }