public override void GetItemInfo()
 {
     if ((this.m_haveWholesalePurview && this.m_ProductInfo.EnableWholesale) && (this.m_Quantity >= this.m_ProductInfo.PriceInfo.NumberWholesale1))
     {
         base.SaleType = 4;
     }
     else
     {
         base.SaleType = 1;
     }
     base.Price            = ProductPrice.GetTruePrice(this.m_ProductInfo, this.m_Quantity, this.m_UserInfo, this.m_Property, this.m_haveWholesalePurview);
     base.Price            = AbstractItemInfo.TaxRateCompute(this.m_NeedInvoice, this.m_ProductInfo, base.Price);
     base.ProductName      = this.m_ProductInfo.ProductName;
     base.Unit             = this.m_ProductInfo.Unit;
     base.Amount           = this.m_Quantity;
     base.PriceMarket      = this.m_ProductInfo.PriceMarket;
     base.ServiceTerm      = this.m_ProductInfo.ServiceTerm;
     base.ServiceTermUnit  = this.m_ProductInfo.ServiceTermUnit;
     base.Remark           = "";
     base.BeginDate        = DateTime.Today;
     base.PresentExp       = this.m_ProductInfo.PresentExp;
     base.PresentMoney     = this.m_ProductInfo.PresentMoney;
     base.PresentPoint     = this.m_ProductInfo.PresentPoint;
     base.ProductId        = this.m_ProductInfo.ProductId;
     base.TableName        = this.m_ProductInfo.TableName;
     base.ProductKind      = this.m_ProductInfo.ProductKind;
     base.TotalWeight      = this.m_ProductInfo.Weight * base.Amount;
     base.SubTotal         = base.Price * this.m_Quantity;
     base.Property         = this.m_Property;
     base.ProductCharacter = this.m_ProductInfo.ProductCharacter;
     base.Weight           = this.m_ProductInfo.Weight;
 }
示例#2
0
        public override void GetItemInfo()
        {
            int presentNumber;

            switch (this.m_ProductInfo.SalePromotionType)
            {
            case 1:
            case 3:
                if ((this.m_ShoppingCartPresentInfoList != null) && !AbstractItemInfo.FoundInCart(this.m_ShoppingCartPresentInfoList, this.m_ProductInfo.ProductId))
                {
                    base.IsNull = true;
                    return;
                }
                base.ProductName = this.m_ProductInfo.ProductName;
                base.Unit        = this.m_ProductInfo.Unit;
                if ((this.m_ProductInfo.SalePromotionType == 1) && (this.m_ProductInfo.MinNumber != 0))
                {
                    presentNumber = DataConverter.CLng(this.m_Quantity / this.m_ProductInfo.MinNumber) * this.m_ProductInfo.PresentNumber;
                }
                else
                {
                    presentNumber = this.m_ProductInfo.PresentNumber;
                }
                base.Amount          = presentNumber;
                base.PriceMarket     = this.m_ProductInfo.PriceMarket;
                base.Price           = 0M;
                base.ServiceTerm     = this.m_ProductInfo.ServiceTerm;
                base.ServiceTermUnit = this.m_ProductInfo.ServiceTermUnit;
                base.Remark          = GetSalePromotionTypeRemark(this.m_ProductInfo);
                base.SaleType        = 3;
                base.BeginDate       = DateTime.Today;
                base.PresentExp      = 0;
                base.PresentMoney    = 0M;
                base.PresentPoint    = 0;
                base.ProductKind     = this.m_ProductInfo.ProductKind;
                base.TotalWeight     = this.m_ProductInfo.Weight * base.Amount;
                base.SubTotal        = 0M;
                base.Id               = this.m_ProductInfo.ProductId;
                base.isPresent        = true;
                base.Weight           = this.m_ProductInfo.Weight;
                base.ProductCharacter = this.m_ProductInfo.ProductCharacter;
                base.TableName        = this.m_ProductInfo.TableName;
                return;

            case 2:
            case 4:
            {
                PresentInfo presentById = Present.GetPresentById(DataConverter.CLng(this.m_ProductInfo.PresentId));
                if (presentById.IsNull)
                {
                    base.IsNull = true;
                    return;
                }
                if ((this.m_ShoppingCartPresentInfoList != null) && !AbstractItemInfo.FoundInCart(this.m_ShoppingCartPresentInfoList, presentById.PresentId))
                {
                    base.IsNull = true;
                    return;
                }
                base.ProductName = presentById.PresentName;
                base.Unit        = presentById.Unit;
                if ((this.m_ProductInfo.SalePromotionType == 2) && (this.m_ProductInfo.MinNumber != 0))
                {
                    presentNumber = DataConverter.CLng(this.m_Quantity / this.m_ProductInfo.MinNumber) * this.m_ProductInfo.PresentNumber;
                }
                else
                {
                    presentNumber = this.m_ProductInfo.PresentNumber;
                }
                base.Amount      = presentNumber;
                base.PriceMarket = presentById.PriceMarket;
                base.Price       = presentById.Price;
                if (presentById.Price > 0M)
                {
                    base.SaleType = 2;
                }
                else
                {
                    base.SaleType = 3;
                }
                base.ServiceTerm     = presentById.ServiceTerm;
                base.ServiceTermUnit = presentById.ServiceTermUnit;
                base.Remark          = GetSalePromotionTypeRemark(this.m_ProductInfo);
                base.BeginDate       = DateTime.Today;
                base.PresentExp      = 0;
                base.PresentMoney    = 0M;
                base.PresentPoint    = 0;
                base.TotalWeight     = this.m_ProductInfo.Weight * base.Amount;
                base.SubTotal        = presentById.Price * presentNumber;
                base.Id               = presentById.PresentId;
                base.isPresent        = true;
                base.Weight           = presentById.Weight;
                base.ProductCharacter = presentById.ProductCharacter;
                return;
            }
            }
        }