Exemplo n.º 1
0
        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);
        }
Exemplo n.º 2
0
        private void gridControl_Load()
        {
            Entities db = new Entities();

            NhomVatTuCtrl.LoadLookUpEdit(rleNhomVatTu, db);
            KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db);
            LoaiVatTuCtrl.LoadBindingSource(sTOLoaiVatTuBindingSource, db);
            GridHelper.BestFitAllColumns(gridView);
        }
Exemplo n.º 3
0
        private void frmLoaiVatTu_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            gridControl_Load();

            LoaiVatTuCtrl.LoadLookUpEdit(lookUpEdit, db);
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(gridView);
            GridHelper.HAlignmentAllHeaderColumns(gridView);
            GridHelper.BestFitAllColumns(gridView);
        }
Exemplo n.º 4
0
        private void UpdateCommand()
        {
            var loai = (ViewCboLoaiVatTu)gridView.GetFocusedRow();

            loai.ID_nhom_vat_tu = Properties.Settings.Default.ID_nhom_vat_tu;

            int rs = LoaiVatTuCtrl.Update(loai);

            if (rs == 0)
            {
                NotifyHelper.ShowUpdateError();
                gridControl_Load();
            }
        }
Exemplo n.º 5
0
        private void frmVatTu_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            LoaiVatTuCtrl.LoadLookUpEdit(rleLoaiVatTu, db);
            KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db);
            NhomVatTuCtrl.LoadLookUpEdit(rleNhomVatTu, db);

            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(gridView);
            GridHelper.HAlignmentAllHeaderColumns(gridView);
            VatTuCtrl.LoadBindingSource(sTOVatTuBindingSource, db);
            GridHelper.BestFitAllColumns(gridView);
            //-------------------------------------------------------
            KhoVatTuCtrl.LoadLookUpEdit(ledKhoVatTu, db);
            NhomVatTuCtrl.LoadLookUpEdit(ledNhomVatTu, db);
            LoaiVatTuCtrl.LoadLookUpEdit(ledLoaiVatTu, db);
        }
Exemplo n.º 6
0
        private void DeleteCommand()
        {
            if (gridView.FocusedRowHandle < 0)
            {
                return;
            }

            var result = NotifyHelper.ShowDeleteConfirm();

            if (result == DialogResult.Yes)
            {
                var loai = (ViewCboLoaiVatTu)gridView.GetFocusedRow();
                int rs   = LoaiVatTuCtrl.Delete(loai.ID_loai_vat_tu);

                if (rs > 0)
                {
                    gridControl_Load();
                }
                else
                {
                    NotifyHelper.ShowDeleteError();
                }
            }
        }
Exemplo n.º 7
0
 private void ledNhomVT_TextChanged(object sender, EventArgs e)
 {
     LoaiVatTuCtrl.LoadLookUpEdit(ledLoaiVT, Convert.ToInt32(ledNhomVT.EditValue));
 }
Exemplo n.º 8
0
 private void ledTonDauKy_EditValueChanged(object sender, EventArgs e)
 {
     LoaiVatTuCtrl.LoadLookUpEditTonKho(ledLoaiVT, Convert.ToInt32(ledTonDauKy.EditValue));
 }
Exemplo n.º 9
0
 private void ledNhomVatTu_EditValueChanged(object sender, EventArgs e)
 {
     LoaiVatTuCtrl.LoadLookUpEdit(ledLoaiVatTu, (int)ledNhomVatTu.EditValue, null);
 }