コード例 #1
0
        private void btnComplete_Click(object sender, EventArgs e)
        {
            bool printFeatures = false;

            if (chkPrintFeaturesTag.Checked)
            {
                printFeatures = true;
            }
            Item.PfiTags = Utilities.GetIntegerValue(txtTagsToReprint.Text);
            try
            {
                DesktopSession.PrintTags(Item, printFeatures);
                this.Hide();
                MessageBox.Show("Tag(s) printed successfully.");
                if (SenderObject == ReprintVerifySender.ChangeRetailPrice)
                {
                    ChangeRetailPriceSearch itemSearchFrm = new ChangeRetailPriceSearch(DesktopSession);
                    Form currForm = DesktopSession.HistorySession.Lookup(itemSearchFrm);
                    if (currForm.GetType() == typeof(ChangeRetailPriceSearch))
                    {
                        currForm.Show();
                    }
                }
                this.Close();
            }
            catch (Exception eX)
            {
                if (FileLogger.Instance.IsLogError)
                {
                    FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Cannot re-print tag.  Exception thrown: {0} {1}", eX, eX.Message);
                }
                MessageBox.Show("Failed to print tag.  Please try again.");
            }
        }
コード例 #2
0
        public static bool ProcessChargeonNewItems(DesktopSession desktopSession, List <Item> tempItems, string storeNumber)
        {
            foreach (Item pItem in tempItems)
            {
                if (pItem != null)
                {
                    QuickCheck pItemQInfo   = pItem.QuickInformation;
                    Int64[]    primaryMasks = getMasks(pItem);

                    //Insert MDSE record for this pawn item
                    //Calculate the cost amount of the item
                    //Requirement is that cost will be 65% of the amount entered as retail amount
                    //decimal itemCost = Utilities.GetDecimalValue(.65) * Utilities.GetDecimalValue(pItem.ItemAmount);
                    decimal itemCost = pItem.ItemAmount;
                    string  errorCode;
                    string  errorMessage;
                    bool    curRetValue = ProcessTenderProcedures.ExecuteInsertMDSERecord(
                        pItem.mStore, pItem.mStore, pItem.mYear, pItem.mDocNumber,
                        "" + pItem.mDocType, 1, 0, pItem.CategoryCode,
                        "", itemCost,
                        0, pItemQInfo.Manufacturer,
                        pItemQInfo.Model, pItemQInfo.SerialNumber, pItemQInfo.Weight,
                        primaryMasks, pItem.TicketDescription, pItem.ItemAmount,
                        pItem.StorageFee, "AUDIT",
                        ShopDateTime.Instance.ShopDate.FormatDate(), ShopDateTime.Instance.ShopDate.ToShortDateString() + " " + ShopDateTime.Instance.ShopTime.ToString(), "", "", pItem.mDocType, "", out errorCode, out errorMessage);
                    if (!curRetValue)
                    {
                        return(false);
                    }

                    foreach (ItemAttribute iAttr in pItem.Attributes)
                    {
                        if (iAttr.Answer.AnswerCode == OTHERDSC_CODE)
                        {
                            bool otherDscVal = ProcessTenderProcedures.ExecuteInsertOtherDscRecord(
                                storeNumber, pItem.mStore, pItem.mYear, pItem.mDocNumber,
                                "" + pItem.mDocType, 1, 0, iAttr.MaskOrder,
                                iAttr.Answer.AnswerText, "AUDIT", out errorCode, out errorMessage);
                            if (!otherDscVal)
                            {
                                return(false);
                            }
                        }
                    }

                    MerchandiseProcedures.UpdateMerchandiseRetailPrice(desktopSession,
                                                                       new Icn(pItem.Icn), pItem.RetailPrice, out errorCode, out errorMessage, storeNumber);
                    if (errorCode != "0")
                    {
                        return(false);
                    }
                    desktopSession.PrintTags(pItem, CurrentContext.AUDITCHARGEON);
                }
            }

            return(true);
        }