public ActionResult AjaxCreateProductNotify(FormCollection form)
        {
            int    productSysNo = Convert.ToInt32(Request["ProductSysNo"]);
            string email        = HttpUtility.UrlDecode(Request["Email"].ToString());

            var temp = ProductNotifyFacade.GetProductNotify(email, productSysNo);

            if (temp != null)
            {
                return(Json(new
                {
                    Result = false,
                    Message = "该邮箱已订阅此商品!"
                }));
            }
            ProductNotifyInfo entity = new ProductNotifyInfo()
            {
                CustomerSysNo = CurrUser.UserSysNo,
                ProductSysNo  = productSysNo,
                Email         = email,
                Status        = 0
            };

            ProductNotifyFacade.CreateProductNotify(entity);
            return(Json(new
            {
                Result = true,
                Message = "订阅到货通知成功!"
            }));
        }
Beispiel #2
0
        void ProductNotifyQueryResult_LoadingDataSource(object sender, LoadingDataEventArgs e)
        {
            ProductNotifyFacade facade = new ProductNotifyFacade();

            facade.GetProductNotifyByQuery(model, e.PageSize, e.PageIndex, e.SortField, (obj, org) =>
            {
                this.ProductNotifyQueryResult.ItemsSource = org.Result.Rows;
                this.ProductNotifyQueryResult.TotalCount  = org.Result.TotalCount;
            });
        }
        public ActionResult AjaxDeleteProductNotify(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]);
                    ProductNotifyFacade.DeleteProductNotify(sysNo, CurrUser.UserSysNo);
                }
            }
            return(Json("操作已成功,稍候生效!"));
        }
 public ActionResult AjaxClearProductNotify(FormCollection form)
 {
     ProductNotifyFacade.ClearProductNotify(CurrUser.UserSysNo);
     return(Json("操作已成功,稍候生效!"));
 }