Example #1
0
 public frmDiscount(List <PosExt> posPosExtList, PosExt focusePos)
 {
     ListPosExt    = posPosExtList;
     FocusePostExt = focusePos;
     discountType  = DiscountType.SingleDiscount;
     InitializeComponent();
 }
Example #2
0
 public frmModifyPrice(PosExt posExt)
 {
     InitializeComponent();
     this.PosExt         = posExt;
     this.txtRetail.Text = posExt.RetailPrice.ToString();
     this.Text           = $"修改[{posExt.Name}]价格";
 }
Example #3
0
        /// <summary>
        /// 修改商品价格
        /// </summary>
        /// <param name="posExt"></param>
        private void FrmMdy_ModifyPriceEvent(PosExt posExt)
        {
            if (decimal.Parse(posExt.RetailPrice.ToString()) >= 0)
            {
                int rowHander = gvGoods.FocusedRowHandle;
                var focusRow  = gvGoods.GetRow(rowHander) as PosExt;

                var totalAmount = posExt.RetailPrice * focusRow.SaleQuantity;
                gvGoods.SetFocusedRowCellValue("RetailPrice", posExt.RetailPrice);
                gvGoods.SetFocusedRowCellValue("PosSalesAmount", totalAmount);
                gvGoods.SetRowCellValue(rowHander, gvGoods.Columns["RetailPrice"], posExt.RetailPrice);
                gvGoods.SetRowCellValue(rowHander, gvGoods.Columns["PosSalesAmount"], totalAmount);
                gvGoods.UpdateCurrentRow();
                gvGoods.UpdateSummary();
                gvGoods.UpdateTotalSummary();

                if (PosGoodsList != null && PosGoodsList.Any())
                {
                    var tk = PosGoodsList.FirstOrDefault(s => s.ID == posExt.ID);
                    if (tk != null)
                    {
                        tk.RetailPrice    = posExt.RetailPrice;
                        tk.PosSalesAmount = totalAmount;
                    }
                }
            }
        }
Example #4
0
        /// <summary>
        /// 查询单品折扣
        /// </summary>
        /// <param name="enity"></param>
        /// <returns></returns>
        public static GoodsGrantEntity DiscountGoodsItem(PosExt enity)
        {
            var sWhere         = $"StoreID='{enity.StoreID}' and BarID='{enity.BarID}' and  IsAllowDiscount=1 and DiscountPrice>0";
            var grantGoodsList = SysBLL.Instance.GetALL <GoodsGrantEntity>(where : $"{sWhere}");

            if (null != grantGoodsList && grantGoodsList.Count > 0)
            {
                return(grantGoodsList[0]);
            }
            return(null);
        }
Example #5
0
 private void CalcDiscount(DiscountType discountType, List <PosExt> listPosExt, PosExt focusePostExt)
 {
 }