private void gridControl_Load() { Entities db = new Entities(); KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db); NhomVatTuCtrl.LoadBindingSource(sTONhomVatTuBindingSource, db); }
private void gridControl_Load() { Entities db = new Entities(); NhomVatTuCtrl.LoadLookUpEdit(rleNhomVatTu, db); KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db); LoaiVatTuCtrl.LoadBindingSource(sTOLoaiVatTuBindingSource, db); GridHelper.BestFitAllColumns(gridView); }
private void frmTonKho_Load(object sender, EventArgs e) { Entities db = new Entities(); KhoVatTuCtrl.LoadLookUpEdit(ledKhoVT, db); NhomVatTuCtrl.LoadLookUpEdit(ledNhomVT, db); LoaiVatTuCtrl.LoadLookUpEdit(ledLoaiVT, db); VaiTroQuyenCtrl.ReconfigFormControls(this, db); }
private void frmNhomVatTu_Load(object sender, EventArgs e) { Entities db = new Entities(); KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db); NhomVatTuCtrl.LoadBindingSource(sTONhomVatTuBindingSource, db); NhomVatTuCtrl.LoadLookUpEdit(lookUpEdit, db); VaiTroQuyenCtrl.ReconfigFormControls(this, db); GridHelper.ReconfigGridView(gridView); GridHelper.HAlignmentAllHeaderColumns(gridView); GridHelper.BestFitAllColumns(gridView); }
private void UpdateCommand() { var nhom = (STO_NhomVatTu)gridView.GetFocusedRow(); nhom.ID_kho = Properties.Settings.Default.ID_kho; int rs = NhomVatTuCtrl.Update(nhom); if (rs == 0) { NotifyHelper.ShowUpdateError(); gridControl_Load(); } }
private void DeleteCommand() { if (gridView.FocusedRowHandle < 0) { return; } var result = NotifyHelper.ShowDeleteConfirm(); if (result == DialogResult.Yes) { var nhom = (STO_NhomVatTu)gridView.GetFocusedRow(); int rs = NhomVatTuCtrl.Delete(nhom.ID_nhom_vat_tu); if (rs > 0) { gridControl_Load(); } else { NotifyHelper.ShowDeleteError(); } } }
private void ledKhoVatTu_EditValueChanged(object sender, EventArgs e) { NhomVatTuCtrl.LoadLookUpEdit(ledNhomVatTu, (int)ledKhoVatTu.EditValue, null); }