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"]; //构建搜索条件 UserInfoParam userInfoParam = new UserInfoParam() { C_id = Convert.ToInt32(LoginUser.ID), PageIndex = pageIndex, PageSize = pageSize, TotalCount = totalCount, Str = Str, Tval = Request["Tval"] }; MyhtmlInfoController.SetInfoParam(userInfoParam, T_ItemsService); //MyhtmlInfoController mhc = new MyhtmlInfoController(); //mhc.SetInfoParam //找到所有该人员信息 var savelist = T_SaveHtmlDataService.LoadPageEntities <DateTime>(pageIndex, pageSize, out totalCount, x => x.UserInfo.MasterID == LoginUser.ID && x.DelFlag == Delflag, x => x.SaveTime, false).DefaultIfEmpty(); var ActionInfoList = T_FGJHtmlDataService.LoadSearchFrist(userInfoParam, false, false); var temp = from a in ActionInfoList from b in savelist where b.HtmldataID == a.ID 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 = a.photo, Laiyuan = a.Laiyuan, FwSumMoney = a.FwSumMoney, FwHuXing = a.FwHuXing, FwLoucheng = a.FwLoucheng, FwZhuangxiu = a.FwZhuangxiu, FwChaoxiang = a.FwChaoxiang, FwNianxian = a.FwNianxian, FwMianji = a.FwMianji, FwBiaoJi = b.BiaoJiId, FwBiaoJiID = b.ID, FwColors = b.T_BiaoJiInfo.Colors, FwUserName = b.UserInfo.UName }; return(Json(new { rows = temp, total = userInfoParam.TotalCount }, JsonRequestBehavior.AllowGet)); }
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"]; //构建搜索条件 UserInfoParam userInfoParam = new UserInfoParam() { //C_id =null, PageIndex = pageIndex, PageSize = pageSize, TotalCount = totalCount, Str = Str, MasterID = (bool)LoginUser.ThisMastr ? LoginUser.ID : (int)LoginUser.MasterID, Tval = Request["Tval"] }; MyhtmlInfoController.SetInfoParam(userInfoParam, T_ItemsService); var tem = T_SaveHtmlDataService.LoadSearchEntities(userInfoParam, true); //var tem = T_SaveHtmlDataService.LoadSearch(userInfoParam); //找到所有该人员信息 // var savelist = T_SaveHtmlDataService.LoadPageEntities<DateTime>(pageIndex, pageSize, out totalCount, x => x.DelFlag == Delflag && x.GongGong == hidden, x => x.SaveTime, false).DefaultIfEmpty(); // var ActionInfoList = T_FGJHtmlDataService.LoadSearchEntities(userInfoParam, false, true); var temp = from a in tem select new { ID = a.ID, HLName = a.T_FGJHtmlData.HLName, Image_str = (a.T_FGJHtmlData.Image_str.IndexOf("有") >= 0 ? "有" : "无"), FbTime = a.T_FGJHtmlData.FbTime, PersonName = a.T_FGJHtmlData.PersonName, Address = a.T_FGJHtmlData.Address, Laiyuan = a.T_FGJHtmlData.Laiyuan, FwSumMoney = a.T_FGJHtmlData.FwSumMoney, FwHuXing = a.T_FGJHtmlData.FwHuXing, FwLoucheng = a.T_FGJHtmlData.FwLoucheng, FwZhuangxiu = a.T_FGJHtmlData.FwZhuangxiu, FwChaoxiang = a.T_FGJHtmlData.FwChaoxiang, FwNianxian = a.T_FGJHtmlData.FwNianxian, FwMianji = a.T_FGJHtmlData.FwMianji, FwBiaoJi = a.BiaoJiId, FwBiaoJiID = a.ID, FwColors = a.T_BiaoJiInfo.Colors, FWsaveName = a.UserInfo.UName }; return(Json(new { rows = temp, total = userInfoParam.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 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 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)); } }