Ejemplo n.º 1
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();
        }
Ejemplo n.º 2
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);
            }
        }