private void PopulateAuditInfo()
        {
            InventoryAuditVO audit = ADS.ActiveAudit;

            lblAuditStartDate.Text           = audit.AuditStartDate.ToString("MM/dd/yyyy hh:mm tt");
            lblMarketManager.Text            = audit.MarketManager;
            lblShopManager.Text              = audit.ActiveShopManager;
            lblAuditScope.Text               = audit.AuditScope.ToString();
            lblAuditor.Text                  = audit.Auditor;
            lblAuditReason.Text              = audit.AuditReason.ToString();
            lblMarketManagerPresent.Text     = audit.MarketManagerPresent ? "Yes" : "No";
            lblLastInventoryAudit.Text       = audit.LastAuditDate.ToString("MM/dd/yyyy");
            dpLastLayawayDate.Text           = string.Empty;
            lblCurrentInventoryBalance.Text  = audit.CurrentInventoryBalance.ToString("c");
            lblCurrentLoanBalance.Text       = audit.CurrentLoanBalance.ToString("c");
            lblCurrentCash.Text              = audit.CashInStore.ToString("c");
            lblPreviousInventoryBalance.Text = audit.PreviousInventoryBalance.ToString("c");
            lblPreviousLoanBalance.Text      = audit.PreviousLoanBalance.ToString("c");
            lblYTDShortage.Text              = audit.YTDShortage.ToString("c");
            lblOverShort.Text                = audit.OverShort.ToString("c");
            lblPYChgOff.Text                 = audit.PreviousYearCoff.ToString("c");
            lblHalfPercentTotal.Text         = audit.Tolerance.ToString("c");
            lblTotalChargeOn.Text            = audit.TotalChargeOn.ToString("c");
            lblTotalChargeOff.Text           = audit.TotalChargeOff.ToString("c");
            lblTotalTempIcns.Text            = audit.TempICNAdjustment.ToString("c");
        }
示例#2
0
        private void btnAbort_Click(object sender, EventArgs e)
        {
            if (gvAudits.SelectedRows.Count != 1)
            {
                return;
            }

            InventoryAuditVO audit = gvAudits.SelectedRows[0].Tag as InventoryAuditVO;

            if (audit == null)
            {
                return;
            }

            if (MessageBox.Show("All data will be lost. Are you sure you want to abort this audit?", "Abort Audit", MessageBoxButtons.YesNo) != DialogResult.Yes)
            {
                return;
            }

            audit.Status = AuditStatus.ABORT;

            CommonDatabaseContext dataContext = CreateCommonDatabaseContext();

            InventoryAuditProcedures.EditAudit(audit, dataContext);

            if (!dataContext.Result)
            {
                MessageBox.Show("Error while aborting audit.");
                return;
            }

            LoadAudits();
        }
示例#3
0
        private void AuditManager_Load(object sender, EventArgs e)
        {
            _CurrentlyInUpdateStatus = true;
            //this.DialogResult = DialogResult.Cancel;
            InventoryAuditVO audit = ADS.ActiveAudit;

            //// update to actual details, if audit is in progress
            updateStats(audit, (audit.UploadDate == DateTime.MinValue));
            _CurrentlyInUpdateStatus = false;

            lblAuditCompleteDate.Text = string.Empty;
            lblAuditor.Text           = audit.InitiatedBy;
            lblAuditScope.Text        = audit.AuditScope.ToString();
            lblAuditStartDate.Text    = audit.DateInitiated.ToString(DATE_FORMAT_STRING);

            lblExpectedItemsCost.Text = audit.ExpectedItems.Cost.ToString("c");
            lblExpectedItemsQty.Text  = audit.ExpectedItems.Quantity.ToString();

            lblExpectedGeneralMerchandiseCost.Text = audit.ExptedtedGeneral.Cost.ToString("c");
            lblExpectedGeneralMerchandiseQty.Text  = audit.ExptedtedGeneral.Quantity.ToString();

            lblExpectedJewelryCost.Text = audit.ExptectedJewlery.Cost.ToString("c");
            lblExpectedJewelryQty.Text  = audit.ExptectedJewlery.Quantity.ToString();

            lblExpectedCaccCost.Text = audit.GetTotalCaccCost().ToString("c");
            lblExpectedCaccQty.Text  = audit.GetTotalCaccQty().ToString();
        }
示例#4
0
        private void btnContinue_Click(object sender, EventArgs e)
        {
            if (gvAudits.SelectedRows.Count != 1)
            {
                return;
            }

            InventoryAuditVO audit = gvAudits.SelectedRows[0].Tag as InventoryAuditVO;

            if (audit == null)
            {
                return;
            }

            panelButtons.Enabled = false;
            ProcessingMessage    = new ProcessingMessage("Loading Audit Information", 0);
            ProcessingMessage.Show();
            CommonDatabaseContext dataContext = CreateCommonDatabaseContext();

            InventoryAuditProcedures.GetSummaryInfo(audit, dataContext);
            InventoryAuditProcedures.GetAdditionalAuditInfo(audit, dataContext);
            ProcessingMessage.Close();

            if (!dataContext.Result)
            {
                MessageBox.Show("Error loading CACC information");
                panelButtons.Enabled = true;
                return;
            }

            ADS.ActiveAudit = audit;

            switch (audit.Status)
            {
            case AuditStatus.ACTIVE:
                panelButtons.Enabled       = true;
                NavControlBox.IsCustom     = true;
                NavControlBox.CustomDetail = "VIEWACTIVEAUDIT";
                NavControlBox.Action       = NavBox.NavAction.SUBMIT;
                break;

            case AuditStatus.CLOSED:
                panelButtons.Enabled       = true;
                NavControlBox.IsCustom     = true;
                NavControlBox.CustomDetail = "VIEWCLOSEDAUDIT";
                NavControlBox.Action       = NavBox.NavAction.SUBMIT;
                break;

            default:
                MessageBox.Show("Status not implemented: " + audit.Status.ToString());
                panelButtons.Enabled = true;
                break;
            }
        }
示例#5
0
        private void updateStats(InventoryAuditVO audit, bool isNewAudit)
        {
            if (_CurrentlyInUpdateStatus)
            {
                // Prevent update stats from being called twice.
                return;
            }

            try
            {
                if (AuditReportsProcedures.getAuditStatusSummary(audit.StoreNumber, audit.AuditId, isNewAudit, out dsAuditStatusSummary))
                {
                    if (dsAuditStatusSummary.Tables.Contains("OUTPUT") && dsAuditStatusSummary.Tables["OUTPUT"].Rows.Count == 3)
                    {
                        lblItemsMissingQty.Text     = dsAuditStatusSummary.Tables["OUTPUT"].Rows[0][1].ToString();
                        lblCaccItemsMissingQty.Text = dsAuditStatusSummary.Tables["OUTPUT"].Rows[2][1].ToString();
                        ItemsUnexpectedQty.Text     = dsAuditStatusSummary.Tables["OUTPUT"].Rows[1][1].ToString();
                    }


                    // perhaps label20 ||
                    bool isCACCActual = InventoryAuditProcedures.setCaccTotals(audit, dsAuditStatusSummary.Tables[AuditReportsProcedures.PREAUDIT_CACC_SMRY].Rows, label20.Text != ACTUAL_CACC && isNewAudit);

                    if (isCACCActual)
                    {
                        label20.Text = ACTUAL_CACC;
                    }


                    lblCompactDiscsCost.Text = audit.CompactDiscSummary.Cost.ToString("c");
                    lblCompactDiscsQty.Text  = audit.CompactDiscSummary.Quantity.ToString();

                    lblVideoTapesCost.Text = audit.VideoTapeSummary.Cost.ToString("c");
                    lblVideoTapesQty.Text  = audit.VideoTapeSummary.Quantity.ToString();

                    lblStandardVideoGamesCost.Text = audit.StandardVideoGameSummary.Cost.ToString("c");
                    lblStandardVideoGamesQty.Text  = audit.StandardVideoGameSummary.Quantity.ToString();

                    lblPremiumVideoGamesCost.Text = audit.PremiumVideoGameSummary.Cost.ToString("c");
                    lblPremiumVideoGamesQty.Text  = audit.PremiumVideoGameSummary.Quantity.ToString();

                    lblDvdDiscsCost.Text = audit.DvdDiscSummary.Cost.ToString("c");
                    lblDvdDiscsQty.Text  = audit.DvdDiscSummary.Quantity.ToString();

                    lblExpectedCaccCost.Text = audit.GetTotalCaccCost().ToString("c");
                    lblExpectedCaccQty.Text  = audit.GetTotalCaccQty().ToString();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.StackTrace, "ERROR " + ex.Message);
            }
        }
示例#6
0
        private void InventoryQuestions_Load(object sender, EventArgs e)
        {
            InventoryAuditVO audit = ADS.ActiveAudit;

            lblAuditor.Text       = audit.Auditor;
            lblDiv.Text           = audit.Division;
            lblMarketManager.Text = audit.MarketManager;
            lblOverShort.Text     = audit.OverShort.ToString("c");
            lblStoreManager.Text  = audit.ActiveShopManager;
            lblYTDShortage.Text   = audit.YTDShortage.ToString("c");
            LoadQuestions();
            PopulateQuestions();
        }
        private void AuditResults_Load(object sender, EventArgs e)
        {
            if (ADS.ActiveAudit == null)
            {
                throw new NullReferenceException("ActiveAudit cannot be null.");
            }

            InventoryAuditVO audit = ADS.ActiveAudit;

            lblHeaderText.Text        = lblHeaderText.Text.Replace("<Shop>", audit.StoreNumber);
            lblAuditCompleteDate.Text = audit.DateCompleted.ToString("MM/dd/yyyy h:mm tt");
            lblAuditor.Text           = audit.InitiatedBy;
            lblAuditScope.Text        = audit.AuditScope.ToString();
            lblAuditStartDate.Text    = audit.DateInitiated.ToString("MM/dd/yyyy h:mm tt");
            lblUploadFromTrakker.Text = audit.UploadDate.ToString("MM/dd/yyyy h:mm tt");

            //lblItemsMissing.Text = string.Empty;
            //lblItemsUnexpected.Text = string.Empty;
            //lblCACCItemsMissing.Text = string.Empty;
            documentsPanel.Width = this.Width;
            LoadDocs();
        }
        private void btnContinue_Click(object sender, EventArgs e)
        {
            InventoryAuditVO audit = ADS.ActiveAudit;

            audit.AuditScope           = ((EnumPair <AuditScope>)cboAuditScope.SelectedItem).Value;
            audit.AuditType            = ((EnumPair <AuditType>)cboTypeOfAudit.SelectedItem).Value;
            audit.DateInitiated        = ShopDateTime.Instance.FullShopDateTime;
            audit.ExitingShopManager   = txtExitingShopManagerName.Text.Trim();
            audit.MarketManagerPresent = cboMarketManagerPresent.AnswerYes;
            audit.AuditReason          = ((EnumPair <AuditReason>)cboAuditReason.SelectedItem).Value;
            audit.ReportDetail         = ((EnumPair <AuditReportDetail>)cboReportDetail.SelectedItem).Value;

            CommonDatabaseContext dataContext = new CommonDatabaseContext();

            InventoryAuditProcedures.CreateAudit(audit, dataContext);

            if (!dataContext.Result)
            {
                MessageBox.Show("Error initiating audit.");
                return;
            }

            NavControlBox.Action = NavBox.NavAction.SUBMIT;
        }