public frmDiscount(List <PosExt> posPosExtList, PosExt focusePos) { ListPosExt = posPosExtList; FocusePostExt = focusePos; discountType = DiscountType.SingleDiscount; InitializeComponent(); }
public frmModifyPrice(PosExt posExt) { InitializeComponent(); this.PosExt = posExt; this.txtRetail.Text = posExt.RetailPrice.ToString(); this.Text = $"修改[{posExt.Name}]价格"; }
/// <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; } } } }
/// <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); }
private void CalcDiscount(DiscountType discountType, List <PosExt> listPosExt, PosExt focusePostExt) { }