//用户列表 public ActionResult UserList() { //用户类型 DataTable dtUserType = AppEnum.GetEnumKeyName(typeof(AppEnum.UserType)); ViewData["dtUserType"] = dtUserType; int pageIndex = 1; int pageCount = 20; int totalCount = 0; if (Request.Form["pageNum"] != null) { pageIndex = Convert.ToInt32(Request.Form["pageNum"]); } if (Request.Form["numPerPage"] != null) { pageCount = Convert.ToInt32(Request.Form["numPerPage"]); } //用户列表 Hashtable ht = new Hashtable(); string sUserID = Request.Form["sUserID"]; string sUserType = Request.Form["sUserType"]; string sDesc = Request.Form["orderDirection"]; if (!string.IsNullOrEmpty(sUserID)) { ht.Add("UserID", sUserID); ViewData["uUserID"] = sUserID;// } if (!string.IsNullOrEmpty(sUserType) && sUserType != "-9999") { ht.Add("UserType", sUserType); ViewData["uUserType"] = sUserType;// } if (string.IsNullOrEmpty(sDesc)) { sDesc = "DESC"; } ht.Add("Sort", sDesc); DataSet dsUserList = GetUserDs(pageIndex, pageCount, ht); totalCount = Convert.ToInt32(dsUserList.Tables[1].Rows[0][0]); ViewData["dsUserList"] = dsUserList; ViewData["pageIndex"] = pageIndex; ViewData["pageCount"] = pageCount; ViewData["totalCount"] = totalCount; return(View()); }