private void frmTaoDuAn_Load(object sender, EventArgs e) { TextUtils.SetContainsFilter(grvData); TextUtils.SetContainsFilter(searchLookUpEdit1View); using (WaitDialogForm fWait = new WaitDialogForm("Vui lòng chờ trong giây lát...", "Đang xử lý dữ liệu")) { loadYear(); leYear.EditValue = DateTime.Now.Year; DataTable df = new DataTable(); df.Columns.Add("Name"); DataRow dr = df.NewRow(); dr["Name"] = "Hàng ngày"; df.Rows.Add(dr); dr = df.NewRow(); dr["Name"] = "Phát sinh"; df.Rows.Add(dr); leCongViec.DataSource = df; leCongViec.DisplayMember = "Name"; leCongViec.ValueMember = "Name"; leCongViec.NullText = "Hàng ngày"; DataTable gh = TextUtils.Select("SELECT Code FROM [QLKHCV].[dbo].[Modules]"); leMaThietKe.DataSource = gh; leMaThietKe.DisplayMember = "Code"; leMaThietKe.ValueMember = "Code"; //leMaThietKe } }
private void frmPhanBoCongViec_Load(object sender, EventArgs e) { tinhgio(); TextUtils.SetContainsFilter(searchLookUpEdit1View); TextUtils.SetContainsFilter(grvData); Source = TextUtils.Select("select * from vHangMucCongViec"); NhanVien(); loadYear(); leYear.EditValue = DateTime.Now.Year; leWeek.ItemIndex = WeeksInYear(DateTime.Now) - 1; LoadComBo(); grvData.BestFitColumns(); PageBase.StateButton(false, btnNew, btnEdit, btnSave, btnCancel, btnDelete); PageBase.VisibleColumnInGrid(grvData, false); if (_maDuAn != "") { lookUpEdit1.EditValue = _maDuAn; } }