public ActionResult DeleteUserInfo() { string strId = Request["strId"]; string[] strIds = strId.Split(','); List <int> list = new List <int>(); foreach (var item in strIds) { list.Add(int.Parse(item)); } if (userInfoService.DeleteEntities(list)) { return(Content("ok")); } else { return(Content("error")); } }
public ActionResult DeleteUserInfo() { string strID = Request["strId"]; string[] strIds = strID.Split(','); List <int> list = new List <int>(); foreach (string id in strIds) { list.Add(Convert.ToInt32(id)); } //将list集合存储的要删除的记录的编号传递到业务层 if (userInfoService.DeleteEntities(list)) { return(Content("ok")); } else { return(Content("no")); } return(Json(new { })); }