//搜索小秘书 load public ActionResult Getsech() { int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1; int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 10; var TotalCount = 0; var mp = ScrherSAVEService.LoadPageEntities(pageIndex, pageSize, out TotalCount, y => y.DEL == 0 && y.addUserID == LoginUser.ID, x => x.Addtime, false); var titem = T_ItemsService.LoadEntities(x => x.Icons == 2); List <seach> lss = new List <seach>(); foreach (var a in mp) { seach seh = new seach(); seh.ID = a.ID; seh.Addtime = a.Addtime; seh.CName = a.CName; seh.Srtmm = a.Srtmm; seh.Stpmm = a.Stpmm; seh.Stpmoney = a.Stpmoney; seh.Strmoney = a.Strmoney; seh.Quyu = a.Quyu; seh.HxID = a.HxID; seh.Zhuangxiu = a.Zhuangxiu; seh.hxstr = a.HxID == null ? "" : titem.Where(m => m.StrID == a.HxID).FirstOrDefault().Str; seh.maxcount = GetSeachdata(a.ID, pageIndex, pageSize); lss.Add(seh); } lss = lss.OrderByDescending(x => x.Addtime).ToList(); return(Json(new { rows = lss, total = TotalCount }, JsonRequestBehavior.AllowGet)); }
//short Delflag = (short)DelFlagEnum.Normarl; //short GongG = (short)GongGEnum.Show; //short hidden = (short)GongGEnum.heidden; public ActionResult Index() { var CityID = UserInfo_CityService.LoadEntities(x => x.UserInfo_ID == LoginUser.ID).FirstOrDefault(); var City = T_CityService.LoadEntities(x => x.ID == CityID.T_City_ID).FirstOrDefault().T_Quyu.ToList(); var Items = T_ItemsService.LoadEntities(x => x.DelFlag == null).ToList(); var ItemsCount = Items != null?Items.Distinct(new FastPropertyComparer <T_Items>("Bakstr")).ToList() : null; ViewBag.ItemsCount = ItemsCount.Count; ViewBag.City = City; ViewBag.Items = Items; return(View()); }
public ActionResult Index() { var Items = T_ItemsService.LoadEntities(x => x.DelFlag == null).ToList(); var ItemsCount = Items != null?Items.Distinct(new FastPropertyComparer <T_Items>("Bakstr")).ToList() : null; ViewBag.AllClick = LoginUser.Click; // 获取点击次数 ViewBag.OnClic = UserInfoService.GetMaxClick(LoginUser.ID); ViewBag.City = UserInfo_CityService.LoadMyCity_Quyu(LoginUser.ID); ViewBag.Items = Items; ViewBag.ItemsCount = ItemsCount.Count; ViewBag.LMasterID = LoginUser.MasterID; return(View()); }
public ActionResult Index() { var CityID = UserInfo_CityService.LoadEntities(x => x.UserInfo_ID == LoginUser.ID).FirstOrDefault(); var City = T_CityService.LoadEntities(x => x.ID == CityID.T_City_ID).FirstOrDefault().T_Quyu.ToList(); var Items = T_ItemsService.LoadEntities(x => x.DelFlag == null).ToList(); var ItemsCount = Items != null?Items.Distinct(new FastPropertyComparer <T_Items>("Bakstr")).ToList() : null; ViewBag.City = City; ViewBag.Items = Items; ViewBag.ItemsCount = ItemsCount.Count; var Itemsbool = T_BoolItemService.LoadEntities(x => x.str == "上传张数").FirstOrDefault(); if (Itemsbool == null) { return(Content("no:数据库[T_BoolItem][str]列没有限制上传张数的数据属性,检查数据库完整性!")); } var imagecount = UserSaveImageService.LoadEntities(x => x.UserSaveID == LoginUser.ID).DefaultIfEmpty(); ViewBag.imagecount = Itemsbool.@int; return(View()); }
public ActionResult GetHref() { int pageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1; int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 15; var totalCount = int.MaxValue; var CityID = UserInfo_CityService.LoadEntities(x => x.UserInfo_ID == LoginUser.ID).FirstOrDefault(); string Str = Request["Str"]; string Items = Request["Item"] == null?null: Request["Item"] == "all" ? null : Request["Item"]; //构建搜索条件 UserInfoParam userInfoParam = new UserInfoParam() { C_id = LoginUser.ID, PageIndex = pageIndex, PageSize = pageSize, TotalCount = totalCount, Str = Str, Tval = Request["Tval"], Items = Items, IsMaster = true }; //MyhtmlInfoController mhic = new MyhtmlInfoController(); //mhic.SetInfoParam(userInfoParam, T_ItemsService); if (Request["Tval"] != null) { #region 123 string str = userInfoParam.Tval.ToString(); string[] list = str.Split(','); string[] ti = list[3].Split('>'); userInfoParam.Zhuanxiu = ti[0] == "33" ? string.Empty : ti[0].ToString(); string[] ti2 = list[2].Split('>'); userInfoParam.Tingshi = ti2[0] == "26" ? string.Empty : ti2[0].ToString(); string[] ti0 = list[0].Split('>'); int imid = int.Parse(ti0[0]); userInfoParam.money = T_ItemsService.LoadEntities(x => x.ID == imid).FirstOrDefault().StrID.ToString(); string[] ti1 = list[1].Split('>'); int imid1 = int.Parse(ti1[0]); userInfoParam.Pingmu = T_ItemsService.LoadEntities(x => x.ID == imid1).FirstOrDefault().StrID.ToString(); #endregion } var usersaveinfo = T_UserSaveService.LoadSearchEntities(userInfoParam); //找到所有该人员信息 var savelist = T_UserSaveService.LoadPageEntities <DateTime>(pageIndex, pageSize, out totalCount, x => x.delflag == Delflag && x.UserID == LoginUser.ID, x => x.AddTime, false).DefaultIfEmpty(); // var ActionInfoList = T_FGJHtmlDataService.LoadSearchEntities(userInfoParam, false); //var biaoji = T_BiaoJiInfoService.LoadEntities(x=>x.DelFlag== Delflag).DefaultIfEmpty(); var Iitems = T_ItemsService.LoadEntities(x => x.Icons == 2 || x.Icons == 3).DefaultIfEmpty(); var temp = from a in usersaveinfo from b in Iitems where b.ID == a.ZhuanxiuStrID from c in Iitems where c.ID == a.HuxingStrID select new { ID = a.ID, TextName = a.TextName, //Image_str = (a.Image_str.IndexOf("有") >= 0 ? "有" : "无"), AddTime = a.AddTime, PresonName = a.PresonName, Address = a.Address, PresonPhoto = a.PresonPhoto, Money = a.Money, HuxingStrID = c != null ? c.Str : string.Empty, LouCheng = a.LouCheng, ZhuanxiuStrID = b != null ? b.Str : string.Empty, Chaoxiang = a.Chaoxiang, Nianxian = a.Nianxian, Mianji = a.Mianji, BiaoJiID = a.BiaoJiID, FwColors = a.T_BiaoJiInfo.Colors, Bak = a.Bak, Image = a.UserSaveImages.Count, Items = a.Items }; return(Json(new { rows = temp, total = totalCount }, JsonRequestBehavior.AllowGet)); }
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)); } }
public ActionResult Index() { ViewBag.City = T_CityService.LoadEntities(x => x.DelFlag == 0).DefaultIfEmpty().ToList(); ViewBag.ZhuangXiu = T_ItemsService.LoadEntities(x => x.Icons == 3).ToList(); return(View()); }