public ActionResult deleteseach() { var strId = Convert.ToInt64(Request["strId"]); var Deltemp = ScrherSAVEService.LoadEntities(x => x.ID == strId).FirstOrDefault(); if (ScrherSAVEService.DeleteEntity(Deltemp)) { return(Json("ok", JsonRequestBehavior.AllowGet)); } return(Json("no", JsonRequestBehavior.AllowGet)); }
public int GetSeachdata(long XmsID, int pageIndex, int pageSize) { var CityID = UserInfo_CityService.LoadEntities(x => x.UserInfo_ID == LoginUser.ID).FirstOrDefault(); var totalCount = 0; UserInfoParam Uxms = new UserInfoParam(); var xms = ScrherSAVEService.LoadEntities(x => x.ID == XmsID && x.DEL == 0).FirstOrDefault(); Uxms.PageIndex = pageIndex; Uxms.PageSize = pageSize; Uxms.TotalCount = totalCount; Uxms.ssve = xms; Uxms.C_id = CityID.T_City_ID; T_FGJHtmlDataService.LoadSearchPM(Uxms); return(Uxms.TotalCount); }
public ActionResult GetHref() { var CityID = UserInfo_CityService.LoadEntities(x => x.UserInfo_ID == LoginUser.ID).FirstOrDefault(); int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1; int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 35; bool Strb = Request["boot_mp"] != null?Convert.ToBoolean(Request["boot_mp"]) : false; if (Strb) { #region MyRegion var totalCount = int.MaxValue; UserInfoParam Uxms = new UserInfoParam(); if (Request["XmsId"] != null) { #region 小秘书搜索 int XmsID = Request["XmsId"] != null?Convert.ToInt32(Request["XmsId"]) : 0; var xms = ScrherSAVEService.LoadEntities(x => x.ID == XmsID && x.DEL == 0).FirstOrDefault(); addsechmishu(xms); Uxms.PageIndex = pageIndex; Uxms.PageSize = pageSize; Uxms.TotalCount = totalCount; Uxms.ssve = xms; Uxms.C_id = CityID.T_City_ID; #endregion } else { #region 正常搜索 Uxms.PageIndex = pageIndex; Uxms.PageSize = pageSize; Uxms.TotalCount = totalCount; Uxms.Mon1 = Request["Mon1"] != null ? Request["Mon1"].Trim().Length > 0 ? int.Parse(Request["Mon1"]) : 0 : 0; Uxms.Mon2 = Request["Mon2"] != null ? Request["Mon2"].Trim().Length > 0 ? int.Parse(Request["Mon2"]) : 999999 : 999999; Uxms.Pm1 = Request["Pm1"] != null ? Request["Pm1"].Trim().Length > 0 ? int.Parse(Request["Pm1"]) : 0 : 0; Uxms.Pm2 = Request["Pm2"] != null ? Request["Pm2"].Trim().Length > 0 ? int.Parse(Request["Pm2"]) : 99999999 : 99999999; Uxms.quyu = Request["SeQuyu"].ToString(); Uxms.C_id = CityID.T_City_ID; #endregion } var actioninfolist = T_FGJHtmlDataService.LoadSearchPM(Uxms); var UscrClick = T_SeeClickPhotoService.LoadEntities(x => x.UserID == LoginUser.ID).DefaultIfEmpty(); var temp = from a in actioninfolist select new { ID = a.ID, HLName = a.HLName, Image_str = (a.Image_str.IndexOf("有") >= 0 ? "有" : "无"), FbTime = a.FbTime, PersonName = a.PersonName, Address = a.Address, photo = UscrClick.Where(x => x.T_FgjID == a.ID).FirstOrDefault() != null ? a.photo : string.Empty, Laiyuan = a.Laiyuan, FwSumMoney = a.FwSumMoney, FwHuXing = a.FwHuXing, FwLoucheng = a.FwLoucheng, FwZhuangxiu = a.FwZhuangxiu, FwChaoxiang = a.FwChaoxiang, FwNianxian = a.FwNianxian, FwMianji = a.FwMianji }; return(Json(new { rows = temp, total = Uxms.TotalCount }, JsonRequestBehavior.AllowGet)); #endregion } else { string Str = Request["Str"]; var totalCount = int.MaxValue; //构建搜索条件 UserInfoParam userInfoParam = new UserInfoParam() { PageIndex = pageIndex, PageSize = pageSize, TotalCount = totalCount, Str = Str, C_id = CityID.T_City_ID }; if (Request["Tval"] != null) { #region MyRegion string str = Request["Tval"]; string[] list = str.Split(','); for (int i = 0; i < list.Length; i++) { string[] ti = list[i].Split('>'); int cc = int.Parse(ti[0]); var this_i = T_ItemsService.LoadEntities(x => x.ID == cc).FirstOrDefault(); switch (this_i.Icons) { case 0: userInfoParam.money = ti[1].Trim() == "0" ? null : this_i.StrID.ToString(); break; case 1: userInfoParam.Pingmu = ti[1].Trim() == "0" ? null : this_i.StrID.ToString(); break; case 2: userInfoParam.Tingshi = ti[1].Trim() == "0" ? null : this_i.StrID.ToString(); break; case 3: userInfoParam.Zhuanxiu = ti[1].Trim() == "0" ? null : ti[1].ToString().Trim() == "装修" ? null : ti[1]; break; } } #endregion } var temp = GetJson(userInfoParam); return(Json(new { rows = temp, total = userInfoParam.TotalCount }, JsonRequestBehavior.AllowGet)); } }