Пример #1
0
        public CX_PhieuCX(String mPhieuID, String mLoaiPhieu, String mTuNgay, String mDenNgay, MTGlobal.MT_ROLE mActRole, bool isAddNew = false)
        {
            InitializeComponent();

            this.lblTitle.Content = "LÂP PHIẾU GỬI CHÀNH";
            this.pPhieuID         = mPhieuID;
            this.pTuNgay          = mTuNgay == "" ? DateTime.Now.ToShortDateString() : mTuNgay;
            this.pDenNgay         = mDenNgay == "" ? DateTime.Now.ToShortDateString() : mDenNgay;
            this.pLoaiPhieu       = mLoaiPhieu;
            this.pACT_ROLE        = mActRole;

            Dlg = Utils.shwWait();
            setUserRight();
            if (isAddNew)
            {
                fdoAdd();
            }
            else
            {
                BindData();
                MTGlobal.SetGridReadOnly(grdPhieu, tblView, true);
                setReadOnly(true);
            }
            System.Threading.Thread oThreSP = new System.Threading.Thread(LoadSanPham);
            oThreSP.Start();

            Utils.closeWait(Dlg);
        }
Пример #2
0
        public TC_PhieuThu(String mPhieuTCID, String mLoaiPhieu, String mTuNgay, String mDenNgay,
                           MTGlobal.MT_ROLE mActRole, bool isAddNew = false)
        {
            InitializeComponent();
            this.lblTitle.Content = "LẬP PHIẾU THU";
            this.pPhieuTCID       = mPhieuTCID;
            this.pTuNgay          = mTuNgay == "" ? DateTime.Now.ToShortDateString() : mTuNgay;
            this.pDenNgay         = mDenNgay == "" ? DateTime.Now.ToShortDateString() : mDenNgay;
            this.pLoaiPhieu       = mLoaiPhieu;
            this.pACT_ROLE        = mActRole;

            Dlg = Utils.shwWait();

            setUserRight();
            if (isAddNew)
            {
                fdoAdd();
            }
            else
            {
                BindData();
                MTGlobal.SetGridReadOnly(grdPhieuThuCT, tblView, true);
                setReadOnly(true);
            }

            Utils.closeWait(Dlg);
        }
Пример #3
0
        public TC_PhieuThuFrm(String mPhieuTCID, String mLoaiPhieu, String mTuNgay, String mDenNgay,
                              MTGlobal.MT_ROLE mActRole, bool isAddNew = false)
        {
            InitializeComponent();
            this.pPhieuTCID = mPhieuTCID;
            this.pTuNgay    = mTuNgay == "" ? DateTime.Now.ToShortDateString() : mTuNgay;
            this.pDenNgay   = mDenNgay == "" ? DateTime.Now.ToShortDateString() : mDenNgay;
            this.pLoaiPhieu = mLoaiPhieu;
            this.pACT_ROLE  = mActRole;

            lblTitle.Text     = mLoaiPhieu == MTGlobal.PT ? "Phiếu thu - " + MTGlobal.RPT_COMPANY : "Phiếu chi - " + MTGlobal.RPT_COMPANY;
            lblTitleText.Text = mLoaiPhieu == MTGlobal.PT ? "Phiếu thu" : "Phiếu chi";

            Dlg = Utils.shwWait();

            setUserRight();
            loadCustomerToLookupEdit();
            loadLydoToLookupEdit();
            loadNhanVienToLookupEdit();
            loadTaiKhoanToLookupEdit();
            if (isAddNew)
            {
                fdoAdd();
            }
            else
            {
                BindData();
                SysPar.SetGridReadOnly(true, gvPhieuThuCT);
                setReadOnly(true);
            }

            Utils.closeWait(Dlg);
        }
Пример #4
0
        public CX_PhieuCX(String mPhieuID, String mLoaiPhieu, String mTuNgay, String mDenNgay, MTGlobal.MT_ROLE mActRole, bool isAddNew = false)
        {
            InitializeComponent();

            this.pPhieuID   = mPhieuID;
            this.pTuNgay    = mTuNgay == "" ? DateTime.Now.ToShortDateString() : mTuNgay;
            this.pDenNgay   = mDenNgay == "" ? DateTime.Now.ToShortDateString() : mDenNgay;
            this.pLoaiPhieu = mLoaiPhieu;
            this.pACT_ROLE  = mActRole;

            Dlg = Utils.shwWait();
            setUserRight();
            loadCustomerToLookupEdit();
            loadCarToLookupEdit();
            if (isAddNew)
            {
                fdoAdd();
            }
            else
            {
                BindData();
                SysPar.SetGridReadOnly(true, gvPhieu);
                setReadOnly(true);
            }
            System.Threading.Thread oThreSP = new System.Threading.Thread(LoadSanPham);
            oThreSP.Start();

            Utils.closeWait(Dlg);
        }
Пример #5
0
        public NX_PhieuXuat(String mPhieuNXID, String mLoaiPhieu, String mTuNgay, String mDenNgay, MTGlobal.MT_ROLE mActRole, bool isAddNew = false)
        {
            InitializeComponent();
            this.lblTitle.Text = "Phiếu xuất kho - " + MTGlobal.RPT_COMPANY;
            this.pPhieuNXID    = mPhieuNXID;
            this.pTuNgay       = mTuNgay == "" ? DateTime.Now.ToShortDateString() : mTuNgay;
            this.pDenNgay      = mDenNgay == "" ? DateTime.Now.ToShortDateString() : mDenNgay;
            this.pLoaiPhieu    = mLoaiPhieu;
            this.pACT_ROLE     = mActRole;

            Dlg = Utils.shwWait();
            setUserRight();
            loadWarehourseToLookupEdit();
            loadCustomerToLookupEdit();
            loadLydoToLookupEdit();
            if (isAddNew)
            {
                fdoAdd();
            }
            else
            {
                BindData();
                SysPar.SetGridReadOnly(true, gvPhieuXuat);
                setReadOnly(true);
            }

            System.Threading.Thread oThreSP = new System.Threading.Thread(LoadSanPham);
            oThreSP.Start();

            Utils.closeWait(Dlg);
        }