public ActionResult PriceGuidePara(string type = "") { var manager = new BaoYangPriceGuideManager(); ViewBag.Type = type; return(View(new BaoYangGuideViewModel() { Warn = type == "warn" ? manager.SelectWarningLine() : null })); }
public async Task <ActionResult> UpdateListPrice(string pid, decimal originPrice, decimal price) { var manager = new BaoYangPriceGuideManager(); var warnLine = manager.SelectWarningLine().FirstOrDefault(p => p.MinGuidePrice <= originPrice && p.MaxGuidePrice >= originPrice); if (warnLine == null) { return(Json(-5)); } if ((originPrice + warnLine.UpperLimit) < price || (originPrice - warnLine.LowerLimit) > price) { return(Json(-4)); } else { var result = await UpdatePriceAsync(pid, price, "通过BYGLXT修改"); return(Json(result)); } }