public ActionResult AjaxDeleteSelectedItems() { bool isSuccess = true; string message = "操作已成功,稍候生效!"; string data = Request["SelectList"].ToString(); try { if (string.IsNullOrEmpty(data)) { isSuccess = false; message = "请选择要删除的收藏!"; } else { string[] strList = data.Split(','); for (int i = 0; i < strList.Length; i++) { CustomerFacade.DeleteMyFavorite(Convert.ToInt32(strList[i])); } } } catch { isSuccess = false; message = "系统异常,请稍候重试!"; } return(Json(new { Result = isSuccess, Message = message })); }
public ActionResult Ajax_DeleteMyFavorite() { var result = new AjaxResult() { Success = true }; var sysNo = int.Parse(Request["SysNo"]); CustomerFacade.DeleteMyFavorite(sysNo); var wishSysNos = CookieHelper.GetCookie <List <int> >("DeletedFavorite") ?? new List <int>(); wishSysNos.Add(sysNo); CookieHelper.SaveCookie("DeletedFavorite", wishSysNos); return(Json(result, JsonRequestBehavior.AllowGet)); }