示例#1
0
        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));
        }
示例#2
0
        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));
        }