public ActionResult BatchDel(string userCode) { AdminProvider provider = new AdminProvider(); string[] list = userCode.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries); List<string> ls = new List<string>(); int line = 0; foreach (string t in list) { line += provider.Delete(t); } if (line > 0) { this.ReturnJson.AddProperty("d", "success"); } else { this.ReturnJson.AddProperty("d", ""); } return Content(this.ReturnJson.ToString()); }
public ActionResult Delete(string userCode) { AdminProvider provider = new AdminProvider(); int line = provider.Delete(userCode); if (line > 0) { this.ReturnJson.AddProperty("d", "success"); } else { this.ReturnJson.AddProperty("d", ""); } return Content(this.ReturnJson.ToString()); }