public static void UpdateProductPriceNotify(ProductPriceNotifyInfo entity) { DataCommand dataCommand = DataCommandManager.GetDataCommand("Customer_UpdateProductPriceNotify"); dataCommand.SetParameterValue("@SysNo", entity.SysNo); dataCommand.SetParameterValue("@CustomerSysNo", entity.CustomerSysNo); dataCommand.SetParameterValue("@ExpectedPrice", entity.ExpectedPrice); dataCommand.SetParameterValue("@InstantPrice", entity.InstantPrice); dataCommand.ExecuteNonQuery(); }
public static int CreateProductPriceNotify(ProductPriceNotifyInfo entity) { DataCommand dataCommand = DataCommandManager.GetDataCommand("Customer_CreateProductPriceNotify"); dataCommand.SetParameterValue("@CustomerSysNo", entity.CustomerSysNo); dataCommand.SetParameterValue("@ProductSysNo", entity.ProductSysNo); dataCommand.SetParameterValue("@ExpectedPrice", entity.ExpectedPrice); dataCommand.SetParameterValue("@InstantPrice", entity.InstantPrice); dataCommand.SetParameterValue("@LanguageCode", ConstValue.LanguageCode); dataCommand.SetParameterValue("@CompanyCode", ConstValue.CompanyCode); dataCommand.SetParameterValue("@StoreCompanyCode", ConstValue.StoreCompanyCode); return(dataCommand.ExecuteScalar <int>()); }
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 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 static void UpdateProductPriceNotify(ProductPriceNotifyInfo entity) { ProductPriceNotifyDA.UpdateProductPriceNotify(entity); }
public static int CreateProductPriceNotify(ProductPriceNotifyInfo entity) { return(ProductPriceNotifyDA.CreateProductPriceNotify(entity)); }