public ActionResult DeleteInfo() { Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer(); if (Sys_ContractCustomer.DeleteInfo(Request["ID"])) { return(Content("1")); } return(Content("0")); }
public ActionResult Edit() { Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer(); Model.ContractCustomer ContractCustomer = Sys_ContractCustomer.GetInfo(Request["ID"]); ViewData["GetSexList"] = GetSexList(ContractCustomer.Sex); ViewData["GetTypeList"] = GetTypeList(ContractCustomer.IsSign); ViewData["ID"] = Request["ID"]; return(View(ContractCustomer)); }
public ActionResult EditInfo(Model.ContractCustomer ContractCustomer) { Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer(); ViewData["GetSexList"] = GetSexList(); ViewData["GetTypeList"] = GetTypeList(); if (Sys_ContractCustomer.UpdateInfo(ContractCustomer)) { return(Content("1")); } return(Content("0")); }
/// <summary> /// 分页获得数据信息 /// </summary> /// <param name="limit">页码大小</param> /// <param name="offset">从第几条数据开始</param> /// <param name="UserName">用户名</param> /// <param name="Role">角色ID</param> /// <returns></returns> public JsonResult GetList(int offset, string RealName, string IsSign) { Business.Sys_ContractCustomer Sys_ContractCustomer = new Business.Sys_ContractCustomer(); StringBuilder sb = new StringBuilder(); if (!string.IsNullOrEmpty(RealName)) { sb.Append(" and RealName='" + RealName + "'"); } if (!string.IsNullOrEmpty(IsSign)) { sb.Append(" and IsSign='" + IsSign + "'"); } List <Model.ContractCustomer> ContractCustomerList = Sys_ContractCustomer.GetList(offset, sb.ToString()); return(Json(new { total = Sys_ContractCustomer.GetListCount(sb.ToString()), rows = ContractCustomerList }, JsonRequestBehavior.AllowGet)); }