예제 #1
0
        private void bgwZeroOutInvNeg_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                mstStatus = "Connecting to database...";
                bgwZeroOutInvNeg.ReportProgress(10);

                AceSoft.RetailPlus.Client.MasterDB clsMasterConnection = new AceSoft.RetailPlus.Client.MasterDB();
                clsMasterConnection.GetConnection();

                mstStatus = "Updating product negative quantity to zero...";
                bgwZeroOutInvNeg.ReportProgress(20);
                Data.ProductInventories clsProductInventories = new Data.ProductInventories(clsMasterConnection.Connection, clsMasterConnection.Transaction);
                clsProductInventories.ZeroOutNegativeInventorygByBranch(mclsBranchDetails.BranchID);

                mstStatus = "Commiting to database...";
                bgwZeroOutInvNeg.ReportProgress(90);
                clsMasterConnection.CommitAndDispose();

                bgwZeroOutInvNeg.ReportProgress(100);
            }
            catch { throw; }
        }
예제 #2
0
        private void bgwZeroOutInvNeg_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                mstStatus = "Connecting to database...";
                bgwZeroOutInvNeg.ReportProgress(10);

                AceSoft.RetailPlus.Client.MasterDB clsMasterConnection = new AceSoft.RetailPlus.Client.MasterDB();
                clsMasterConnection.GetConnection();

                mstStatus = "Updating product negative quantity to zero...";
                bgwZeroOutInvNeg.ReportProgress(20);
                Data.ProductInventories clsProductInventories = new Data.ProductInventories(clsMasterConnection.Connection, clsMasterConnection.Transaction);
                clsProductInventories.ZeroOutNegativeInventorygByBranch(mclsBranchDetails.BranchID);

                mstStatus = "Commiting to database...";
                bgwZeroOutInvNeg.ReportProgress(90);
                clsMasterConnection.CommitAndDispose();

                bgwZeroOutInvNeg.ReportProgress(100);
            }
            catch { throw; }
        }