예제 #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;//更新实收的价格

        }
예제 #2
0
파일: Goods.cs 프로젝트: guipaa/PDF.NET
 /// <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;
 }
예제 #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();
        }
예제 #4
0
파일: Customer.cs 프로젝트: guipaa/PDF.NET
        /// <summary>
        /// 选购想买的商品
        /// </summary>
        public void LikeBuy(Goods goods)
        {
            this._goodss.Add(goods);

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

        }
예제 #6
0
파일: Customer.cs 프로젝트: JobsLj/PDF.NET
 /// <summary>
 /// 选购想买的商品
 /// </summary>
 public void LikeBuy(Goods goods)
 {
     this._goodss.Add(goods);
 }