private void LoaiQuyetDinh_Load(object sender, EventArgs e) { ResetInterface(true); dtDSLoaiQuyetDinh = oLoaiQuyetDinh.GetList(); if (dtDSLoaiQuyetDinh != null) { PrepareDataSource(); EditDtgInterface(); } }
private void PrepareSourceLoaiQuyetDinh() { DataTable dt = new DataTable(); dt = oLoaiQD.GetList(); // chi load nhung loai quyet dinh do ng dung them vao var vdt = dt.AsEnumerable().Where(a => a.Field <int>("id") >= 8); if (vdt.Count() > 0) { dt = vdt.CopyToDataTable(); } thongTinQuyetDinh1.comB_Loai.DataSource = dt; thongTinQuyetDinh1.comB_Loai.DisplayMember = "ten_loai"; thongTinQuyetDinh1.comB_Loai.ValueMember = "id"; }
/// <summary> /// Refresh Data Source cho dtg sau moi lan thao tac /// </summary> private void RefreshDataSource() { Business.HDQD.LoaiQuyetDinh loaiqd = new Business.HDQD.LoaiQuyetDinh(); // khong dung chung oChucVu duoc ??? dtDSLoaiQuyetDinh = loaiqd.GetList(); PrepareDataSource(); }