public ActionResult AjaxCancelProductPriceNotify(FormCollection form) { int sysNo = Convert.ToInt32(Request["SysNo"].ToString()); ProductPriceNotifyFacade.CancelProductPriceNotify(sysNo, CurrUser.UserSysNo); return(Json("操作已成功,稍候生效!")); }
public ActionResult AjaxCreateProductPriceNotify(FormCollection form) { int productSysNo = Convert.ToInt32(Request["ProductSysNo"]); decimal expectedPrice = Convert.ToDecimal(Request["ExpectedPrice"]); decimal instantPrice = Convert.ToDecimal(Request["InstantPrice"]); bool isFavorite = Convert.ToBoolean(Request["IsFavorite"]); var temp = ProductPriceNotifyFacade.GetProductPriceNotify(CurrUser.UserSysNo, productSysNo); if (temp != null) { return(Json(new { Result = false, Message = "您已经订阅了此商品的降价通知!" })); } LoginUser suer = UserMgr.ReadUserInfo(); CustomerInfo customerInfo = CustomerFacade.GetCustomerInfo(suer.UserSysNo); if (string.IsNullOrEmpty(customerInfo.Email)) { return(Json(new { Result = false, Message = "您的帐号未关联邮箱,请到帐户中心个人信息中设置邮箱!" })); } if (isFavorite && !ProductFacade.IsProductWished(productSysNo, CurrUser.UserSysNo)) { CustomerFacade.AddProductToWishList(CurrUser.UserSysNo, productSysNo);//加入收藏 } ProductPriceNotifyInfo entity = new ProductPriceNotifyInfo() { CustomerSysNo = CurrUser.UserSysNo, ProductSysNo = productSysNo, ExpectedPrice = expectedPrice, InstantPrice = instantPrice }; ProductPriceNotifyFacade.CreateProductPriceNotify(entity); return(Json(new { Result = true, Message = "订阅降价通知成功!" })); }
public ActionResult AjaxDeleteProductPriceNotify(FormCollection form) { string data = Request["SelectList"].ToString(); string[] strList = data.Split(','); for (int i = 0; i < strList.Length; i++) { if (!string.IsNullOrEmpty(strList[i])) { var sysNo = Convert.ToInt32(strList[i]); ProductPriceNotifyFacade.DeleteProductPriceNotify(sysNo, CurrUser.UserSysNo); } } return(Json("操作已成功,稍候生效!")); }
public ActionResult AjaxUpdateProductPriceNotify(FormCollection form) { int sysNo = Convert.ToInt32(Request["SysNo"].ToString()); decimal expectedPrice = Convert.ToDecimal(Request["ExpectedPrice"]); decimal instantPrice = Convert.ToDecimal(Request["InstantPrice"]); ProductPriceNotifyInfo entity = new ProductPriceNotifyInfo() { SysNo = sysNo, CustomerSysNo = CurrUser.UserSysNo, ExpectedPrice = expectedPrice, InstantPrice = instantPrice }; ProductPriceNotifyFacade.UpdateProductPriceNotify(entity); return(Json("操作已成功,稍候生效!")); }
public ActionResult AjaxClearProductPriceNotify(FormCollection form) { ProductPriceNotifyFacade.ClearProductPriceNotify(CurrUser.UserSysNo); return(Json("操作已成功,稍候生效!")); }