private void frmNhapMoiCuaCuonDongBo_Load(object sender, EventArgs e)
        {
            Entities      db = new Entities();
            List <string> Ma_nhom_vat_tu_bo = new List <string>();
            List <string> Ma_loai_vat_tu_bo = new List <string>();

            NhanVienCtrl.LoadLookUpEdit(ledNhanVienNhap, db);
            KhoVatTuCtrl.LoadLookUpEdit(ledKhoNhap, "CCDB", db);
            NhaCungCapCtrl.LoadLookUpEdit(ledNhaCungCap, db);
            VatTuCtrl.LoadLookUpEdit(ledThanCuaCuon, "CCDB", "ThanCCDB", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            VatTuCtrl.LoadLookUpEdit(ledMoToCuaCuon, "CCDB", "MoToCCDB", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            VatTuCtrl.LoadLookUpEdit(ledKhoaCuaCuon, "CCDB", "KhoaCCDB", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            VatTuCtrl.LoadLookUpEdit(ledChotCuaCuon, "CCDB", "ChotCCDB", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            Ma_nhom_vat_tu_bo = new List <string>()
            {
                " "
            };
            Ma_loai_vat_tu_bo = new List <string>()
            {
                "ThanCCDB", "MoToCCDB", "KhoaCCDB", "ChotCCDB"
            };
            VatTuCtrl.LoadLookUpEdit(rleVatTu, "CCDB", "", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            dteNgayNhap.EditValue = QLK_DongLuc.Helper.DatabaseHelper.GetDatabaseDate();
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvPhieuNhapCT);
        }
Exemplo n.º 2
0
 private void frmThongKeNhap_NhaCungCap_Load(object sender, EventArgs e)
 {
     db = new Entities();
     NhaCungCapCtrl.LoadLookUpEdit(ledNhaCungCap, db);
     dteTuNgay.EditValue = dteDenNgay.EditValue = QLK_DongLuc.Helper.DatabaseHelper.GetDatabaseDate();
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
 }
Exemplo n.º 3
0
        private void frmKhachHang_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            KhachHangCtrl.LoadBindingSource(cATKhachHangBindingSource, db);
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(gridView);
        }
Exemplo n.º 4
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.º 5
0
        private void frmNhanVien_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            KhoVatTuCtrl.LoadLookUpEdit(rleKhoVatTu, db);
            NhanVienCtrl.LoadBindingSource(cATNhanVienBindingSource, db);
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(gridView);
        }
Exemplo n.º 6
0
 private void frmSanPham_Load(object sender, EventArgs e)
 {
     db = new Entities();
     KhachHangCtrl.LoadLookUpEdit(rleKhachHang, db);
     NhanVienCtrl.LoadLookUpEdit(rleNhanVienKinhDoanh, db);
     SanPhamCtrl.LoadBindingSource(cATSanPhamBindingSource, db);
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
     GridHelper.ReconfigGridView(gridView);
 }
Exemplo n.º 7
0
        private void frmKhoVatTu_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            KhoVatTuCtrl.LoadBindingSource(sTOKhoVatTuBindingSource, db);
            VatTuCtrl.LoadLookUpEdit(rleVatTu, db);
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvKhoVatTu);
            GridHelper.ReconfigGridView(grvKhoVatTuCT);
        }
Exemplo n.º 8
0
        private void frmLapPhieuNhapLai_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            NhanVienCtrl.LoadLookUpEdit(ledNhanVienNhap, db);
            KhoVatTuCtrl.LoadLookUpEdit(ledKhoNhap, db);
            VatTuCtrl.LoadLookUpEdit(repositoryItemLookUpEdit1, db);
            dteNgayNhap.EditValue = QLK_DongLuc.Helper.DatabaseHelper.GetDatabaseDate();
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvPhieuNhapCT);
        }
Exemplo n.º 9
0
        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);
        }
Exemplo n.º 10
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);
        }
        private void frmPhieuNhap_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            NhanVienCtrl.LoadLookUpEdit(rleNhanVienLap, db);
            NhanVienCtrl.LoadLookUpEdit(rleNhanVienNhap, db);
            TuyChonTimKiemCtrl.LoadLookUpEdit(ledTuyChon);
            VatTuCtrl.LoadLookUpEdit(rleVatTu, db);
            dteNgayBatDau.EditValue = DateTimeHelper.GetStartDateOfMonth(DatabaseHelper.GetDatabaseDate());
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvPhieuNhap);
            GridHelper.ReconfigGridView(grvPhieuNhapCT);
        }
Exemplo n.º 12
0
        private void frmNhapMoiThanhCuaNhua_Load(object sender, EventArgs e)
        {
            Entities      db = new Entities();
            List <string> Ma_nhom_vat_tu_bo = new List <string>();
            List <string> Ma_loai_vat_tu_bo = new List <string>();

            NhanVienCtrl.LoadLookUpEdit(ledNhanVienNhap, db);
            KhoVatTuCtrl.LoadLookUpEdit(ledKhoNhap, "NLCN", db);
            NhaCungCapCtrl.LoadLookUpEdit(ledNhaCungCap, db);
            VatTuCtrl.LoadLookUpEdit(rleVatTu, "PROFILE", "", Ma_nhom_vat_tu_bo, Ma_loai_vat_tu_bo, db);
            dteNgayNhap.EditValue = QLK_DongLuc.Helper.DatabaseHelper.GetDatabaseDate();
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvPhieuNhapCT);
        }
Exemplo n.º 13
0
        private void frmSuaPhieuNhap_Load(object sender, EventArgs e)
        {
            if (pn == null)
            {
                XtraMessageBox.Show("Có lỗi xảy ra, không tìm thấy phiếu nhập!", "Sửa phiếu nhập", MessageBoxButtons.OK, MessageBoxIcon.Error);
                this.DialogResult = DialogResult.Cancel;
            }

            Entities db = new Entities();

            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            VatTuCtrl.LoadLookUpEdit(repositoryItemLookUpEdit1, db);
            NhanVienCtrl.LoadLookUpEdit(ledNhanVienNhap, db);
            KhoVatTuCtrl.LoadLookUpEdit(ledKhoNhap, db);

            if (pn.ID_loai_nhap == 1)
            {
                NhaCungCapCtrl.LoadLookUpEdit(ledNhaCungCap, db);
            }
            else
            {
                txtChungTuGoc.Properties.ReadOnly = true;
                ledNhaCungCap.Properties.ReadOnly = true;
            }

            ledNhanVienNhap.EditValue = pn.ID_nhan_vien_nhap;
            ledKhoNhap.EditValue      = pn.ID_kho;
            mmoGhiChu.Text            = pn.Ghi_chu;
            txtChungTuGoc.Text        = pn.So_chung_tu_goc;
            ledNhaCungCap.EditValue   = pn.ID_nha_cung_cap;
            dteNgayNhap.EditValue     = pn.Ngay_nhap;

            PhieuNhapCTCtrl.LoadBindingSource(pn.ID_phieu_nhap, iMPPhieuNhapCTBindingSource, db);

            if (pn.Trang_thai != 0)
            {
                colID_vat_tu.OptionsColumn.ReadOnly            = true;
                colSo_luong.OptionsColumn.ReadOnly             = true;
                ledKhoNhap.Properties.ReadOnly                 = true;
                grvPhieuNhapCT.OptionsView.NewItemRowPosition  = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.None;
                grvPhieuNhapCT.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.False;
            }
        }
Exemplo n.º 14
0
        private void frmKhoVatTu_Load(object sender, EventArgs e)
        {
            Entities db = new Entities();

            try
            {
                KhoVatTuCtrl.LoadBindingSource(sTOKhoVatTuBindingSource, db);
                KhoVatTuCtrl.LoadLookUpEdit(lookUpEdit, db);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
            GridHelper.ConfigGridView(grvKhoVatTu, null, null, false);
            GridHelper.HAlignmentAllHeaderColumns(grvKhoVatTu);
            GridHelper.BestFitAllColumns(grvKhoVatTu);
            //VatTuCtrl.LoadLookUpEdit(rleVatTu, db);
            VaiTroQuyenCtrl.ReconfigFormControls(this, db);
            GridHelper.ReconfigGridView(grvKhoVatTu);
            //GridHelper.ReconfigGridView(grvKhoVatTuCT);
        }
Exemplo n.º 15
0
 private void LapPhieuXuatMoi_Load(object sender, EventArgs e)
 {
     VaiTroQuyenCtrl.ReconfigFormControls(this);
 }
Exemplo n.º 16
0
 private void frmVaiTro_Load(object sender, EventArgs e)
 {
     grdVaiTro_Load();
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
 }
Exemplo n.º 17
0
 private void frmQuyen_Load(object sender, EventArgs e)
 {
     btnRefresh.PerformClick();
     btnScanControls.PerformClick();
     VaiTroQuyenCtrl.ReconfigFormControls(this);
 }
Exemplo n.º 18
0
 private void frmTaoTaiKhoan_Load(object sender, EventArgs e)
 {
     db = new Entities();
     NhanVienCtrl.LoadLookUpEdit(ledNhanVien, db);
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
 }
Exemplo n.º 19
0
 private void frmXuatThanhLy_Load(object sender, EventArgs e)
 {
     VaiTroQuyenCtrl.ReconfigFormControls(this);
 }
Exemplo n.º 20
0
 private void frmSuaTaiKhoan_Load(object sender, EventArgs e)
 {
     btnLamLai.PerformClick();
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
 }
Exemplo n.º 21
0
 private void frmNguoiDung_Load(object sender, EventArgs e)
 {
     db = new Entities();
     NguoiDungCtrl.LoadBindingSource(viewNguoiDungBindingSource, db);
     VaiTroQuyenCtrl.ReconfigFormControls(this, db);
 }
Exemplo n.º 22
0
 private void frmVaiTroQuyen_Load(object sender, EventArgs e)
 {
     VaiTroCtrl.LoadLookUpEdit(ledVaiTro);
     VaiTroCtrl.LoadLookUpEdit(ledVaiTroKeThua);
     VaiTroQuyenCtrl.ReconfigFormControls(this);
 }
Exemplo n.º 23
0
        private void btnDangNhap_ItemClick(object sender, DevExpress.XtraBars.ItemClickEventArgs e)
        {
            frmLogin = new frmDangNhap();

            if (frmLogin.ShowDialog() == DialogResult.OK)
            {
                btnDangNhap.Enabled        = false;
                btnDangXuat.Enabled        = true;
                btnCapNhatTaiKhoan.Enabled = true;

                // Nếu là giám đốc
                if (Program.CurrentUser.ID_nhan_vien == null)
                {
                    // Chuc nang he thong
                    btnNguoiDung.Enabled = true;
                    btnNhatKy.Enabled    = true;
                    btnNhacNho.Enabled   = true;
                    btnSaoLuu.Enabled    = true;
                    //btnCauHinh.Enabled = true;
                    btnPhucHoi.Enabled = true;

                    // Chuc nang quan ly kho
                    btnNhapMoi.Enabled = true;
                    //btnNhapLai.Enabled = true;

                    // Chức năng quản lý danh mục
                    btnNhomVatTu.Enabled  = true;
                    btnNhaCungCap.Enabled = true;
                    btnNhanVien.Enabled   = true;

                    lblUser.Caption = "Giám đốc: " + (Program.CurrentUser.Ten_day_du != null ? Program.CurrentUser.Ten_day_du : "");
                }
                // Nếu là nhân viên
                else
                {
                    // Chuc nang he thong
                    btnNguoiDung.Enabled = false;
                    btnNhatKy.Enabled    = false;
                    btnNhacNho.Enabled   = false;
                    btnSaoLuu.Enabled    = false;
                    //btnCauHinh.Enabled = false;
                    btnPhucHoi.Enabled = false;

                    // Chuc nang quan ly kho
                    btnNhapMoi.Enabled = true;
                    //btnNhapLai.Enabled = true;

                    // Chức năng quản lý danh mục
                    btnNhomVatTu.Enabled  = false;
                    btnNhaCungCap.Enabled = false;
                    btnNhanVien.Enabled   = false;

                    lblUser.Caption = "Nhân viên: " + (Program.CurrentUser.Ten_day_du != null ? Program.CurrentUser.Ten_day_du : Program.CurrentUser.CAT_NhanVien.Ho_dem + " " + Program.CurrentUser.CAT_NhanVien.Ten);
                }

                CaiDatThongSoDongHo();

                if (Program.CurrentUser.Thoi_gian_cho != null)
                {
                    TotalTime = Program.CurrentUser.Thoi_gian_cho.Value;
                    TotalTime = TotalTime.Add(interval);
                    lblRemainingTimeMessage.Visibility = DevExpress.XtraBars.BarItemVisibility.Always;
                    lblRemainingTime.Visibility        = DevExpress.XtraBars.BarItemVisibility.Always;
                }
                else
                {
                    TotalTime = TimeSpan.FromMilliseconds((double)(RemainingTime + 2 * tmrDongHo.Interval));
                    lblRemainingTimeMessage.Visibility = DevExpress.XtraBars.BarItemVisibility.Never;
                    lblRemainingTime.Visibility        = DevExpress.XtraBars.BarItemVisibility.Never;
                }

                ActiveTime = new TimeSpan(0, 0, 0);

                tmrDongHo.Start();
                tmrTracker.Start();

                VaiTroQuyenCtrl.ReconfigFormControls(this);
            }
        }
 private void frmDanhSachPhieuXuat_Load(object sender, EventArgs e)
 {
     VaiTroQuyenCtrl.ReconfigFormControls(this);
 }