Beispiel #1
0
        /// <summary>
        /// 收银
        /// </summary>
        public void CashRegisters(Goods goods)
        {
            this._totalAmount += goods.GoodsPrice * goods.GoodsNumber;
            //同一中商品,只要条码相同,则不论批次是否相同,都是一个价格
            GoodsSalePriceVM spVM=GoodsSalePriceList.Where(p => p.SerialNumber == goods.SerialNumber).First();
            goods.GoodsPrice = spVM.DiscountPrice;//更新实收的价格

        }
Beispiel #2
0
 /// <summary>
 /// 取出该商品,并使得库存减少响应数量,得到选购的商品
 /// </summary>
 /// <param name="number"></param>
 /// <returns></returns>
 public Goods TakeOut(int number)
 {
     Goods goods = new Goods();
     goods.GoodsName = this.GoodsName;
     goods.GoodsPrice = this.GoodsPrice;
     goods.SerialNumber = this.SerialNumber;
     if (number > this.GoodsNumber)
         number = this.GoodsNumber;
     this.GoodsNumber -= number;
     goods.GoodsNumber = number;
     return goods;
 }
Beispiel #3
0
        protected void btnBuy_Click(object sender, EventArgs e)
        {
            Goods goods = new Goods();
            goods.GoodsID = int.Parse(ViewState["BuyGoodsID"].ToString ());
            goods.GoodsName = ViewState["BuyGoodsName"].ToString();
            goods.SerialNumber = ViewState["SerialNumber"].ToString();
            goods.GoodsPrice = decimal.Parse(ViewState["BuyOnePrice"].ToString());
            goods.GoodsNumber =int.Parse( this.txtBuyCount.Text);


            Customer customer = (Customer)Session["Curr_Customer"];
            customer.LikeBuy(goods);
            lblGoodsCount.Text = customer.Goodss.Count.ToString();
        }
Beispiel #4
0
        /// <summary>
        /// 选购想买的商品
        /// </summary>
        public void LikeBuy(Goods goods)
        {
            this._goodss.Add(goods);

        }
Beispiel #5
0
        /// <summary>
        /// 收银
        /// </summary>
        public void CashRegisters(Goods goods)
        {
            this._totalAmount += goods.GoodsPrice * goods.GoodsNumber;

        }
Beispiel #6
0
 /// <summary>
 /// 选购想买的商品
 /// </summary>
 public void LikeBuy(Goods goods)
 {
     this._goodss.Add(goods);
 }