public ActionResult DeleteInfo() { string id = Request["id"]; Business.Sys_Employee Sys_Employee = new Business.Sys_Employee(); Sys_Employee.DeleteInfo(id); return(Content("1")); }
/// <summary> /// 分页获得集合数据 /// </summary> /// <param name="limit"></param> /// <param name="offset"></param> /// <param name="Number"></param> /// <param name="Name"></param> /// <param name="DataType"></param> /// <returns></returns> public JsonResult GetList(int limit, int offset, string Number, string Name, string DataType) { Business.Sys_Employee Sys_Employee = new Business.Sys_Employee(); StringBuilder sb = new StringBuilder(); if (!string.IsNullOrEmpty(Number)) { sb.Append(" and Number='" + Number + "'"); } if (!string.IsNullOrEmpty(Name)) { sb.Append(" and Name='" + Name + "'"); } if (!string.IsNullOrEmpty(DataType)) { sb.Append(" and DataType='" + DataType + "'"); } return(Json(new { total = Sys_Employee.GetCount(sb.ToString()), rows = Sys_Employee.GetList(limit, offset, sb.ToString()) }, JsonRequestBehavior.AllowGet)); }