예제 #1
0
        public void Merge(PBItemData itemData)
        {
            if ((itemData.Properties & PBItemProperties.CdClass) == PBItemProperties.CdClass)
            {
                this.CdClass = itemData.CdClass;
            }
            if ((itemData.Properties & PBItemProperties.NmClass) == PBItemProperties.NmClass)
            {
                this.NmClass = itemData.NmClass;
            }
            if ((itemData.Properties & PBItemProperties.CdItem) == PBItemProperties.CdItem)
            {
                this.CdItem = itemData.CdItem;
            }
            if ((itemData.Properties & PBItemProperties.NmItem) == PBItemProperties.NmItem)
            {
                this.NmItem = itemData.NmItem;
            }
            if ((itemData.Properties & PBItemProperties.FgClass) == PBItemProperties.FgClass)
            {
                this.FgClass = itemData.FgClass;
            }
            if ((itemData.Properties & PBItemProperties.Qty) == PBItemProperties.Qty)
            {
                this.Qty = itemData.Qty;
            }
            if ((itemData.Properties & PBItemProperties.FgCanc) == PBItemProperties.FgCanc)
            {
                this.FgCanc  = itemData.FgCanc;
                this.QtyCanc = itemData.QtyCanc;
                this.Qty     = itemData.Qty;
            }
            if ((itemData.Properties & PBItemProperties.Price) == PBItemProperties.Price)
            {
                this.UtSprc = itemData.UtSprc;
            }

            if (!string.IsNullOrEmpty(itemData.CdDp))
            {
                this.CdDp = itemData.CdDp;
            }

            if (!string.IsNullOrEmpty(itemData.FgTax))
            {
                this.FgTax = itemData.FgTax;
            }

            this.Barcode         = string.IsNullOrEmpty(itemData.Barcode) ? this.Barcode : itemData.Barcode;
            this.FgUtSprcChanged = itemData.FgUtSprcChanged;
            this.PercDisc        = itemData.PercDisc;
            this.AmDisc          = itemData.AmDisc;
            this.AmEnuri         = itemData.AmEnuri;

            this.Properties |= itemData.Properties;
        }
예제 #2
0
        static public SaleItemType GetSaleItemType(PBItemData itemData)
        {
            if (string.IsNullOrEmpty(itemData.FgClass))
            {
                return(SaleItemType.NoItem);
            }

            int nFgClass = TypeHelper.ToInt32(itemData.FgClass);

            if (nFgClass < 60 || nFgClass > 69)
            {
                return(SaleItemType.NormalItem);
            }
            else
            {
                return(SaleItemType.OnlineItem);
            }
        }