Exemple #1
0
        private void bgwZeroOutInv_DoWork(object sender, DoWorkEventArgs e)
        {
            try
            {
                mstStatus = "Connecting to database...";
                bgwZeroOutInv.ReportProgress(10);

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

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

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

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

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

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

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

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