public JsonResult NeedsList(string keywords, string type, string status, string beginTime, string endTime, int pageIndex, int pageSize) { int totalCount = 0; int pageCount = 0; var result = UserNeedsBusiness.FindNeedsList(keywords,type, "", status, pageSize, pageIndex, ref totalCount, ref pageCount, beginTime, endTime); JsonDictionary.Add("totalCount", totalCount); JsonDictionary.Add("pageCount", pageCount); JsonDictionary.Add("items", result); return new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }; }
/// <summary> /// 租售信息 /// </summary> /// <param name="type"></param> /// <param name="ismyself"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <returns></returns> public JsonResult NeedsList(string type, bool ismyself, int pageIndex, int pageSize) { int total = 0; int pageCount = 0; var list = UserNeedsBusiness.FindNeedsList(type, ismyself ? CurrentUser.UserID : "", pageSize, pageIndex, ref total, ref pageCount, !ismyself?CurrentUser.UserID:"", ismyself?"1,2,3,4,5,6":""); JsonDictionary.Add("items", list); JsonDictionary.Add("totalCount", total); JsonDictionary.Add("pageCount", pageCount); return(new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
/// <summary> /// 最新需求 /// </summary> /// <param name="type"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <returns></returns> public JsonResult GetNewNeeds(string type, int pageIndex, int pageSize) { int total = 0; int pageCount = 0; var list = UserNeedsBusiness.FindNeedsList(type, "", pageSize, pageIndex, ref total, ref pageCount); JsonDictionary.Add("items", list); JsonDictionary.Add("totalCount", total); JsonDictionary.Add("pageCount", pageCount); return(new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }
/// <summary> /// 获取聘请信息 /// </summary> /// <param name="sex"></param> /// <param name="pageIndex"></param> /// <param name="pageSize"></param> /// <param name="type"></param> /// <param name="address"></param> /// <param name="age"></param> /// <param name="cdesc"></param> /// <returns></returns> public JsonResult GetUserNeedsList(int sex, int pageIndex, int pageSize, string type = "1", string address = "", string age = "", string cdesc = "") { int total = 0; int pageCount = 0; var list = UserNeedsBusiness.FindNeedsList(type, "", pageSize, pageIndex, ref total, ref pageCount, "", "", sex, age, address); JsonDictionary.Add("items", list); JsonDictionary.Add("totalCount", total); JsonDictionary.Add("pageCount", pageCount); return(new JsonResult { Data = JsonDictionary, JsonRequestBehavior = JsonRequestBehavior.AllowGet }); }