public ActionResult SaveHref()
        {
            string strId = Request["strId"];

            string[] strIds = strId.Split(',');
            String   rt     = string.Empty;

            try
            {
                foreach (string id in strIds)
                {
                    T_SaveHtmlData savedata = new T_SaveHtmlData();
                    savedata.HtmldataID = long.Parse(id);
                    savedata.SaveTime   = DateTime.Now;
                    savedata.UserID     = LoginUser.ID;
                    savedata.GongGong   = Delflag;
                    //保存的时候进行主号标记
                    savedata.MasterID = Convert.ToBoolean(LoginUser.ThisMastr) ? LoginUser.ID : LoginUser.MasterID;
                    long ids = long.Parse(id);

                    if (T_SaveHtmlDataService.LoadEntities(x => x.HtmldataID == ids && x.UserID == LoginUser.ID).Count() <= 0)
                    {
                        T_SaveHtmlDataService.AddEntity(savedata);
                    }
                }
                rt = "ok";
            }
            catch (Exception ex)
            {
                rt = ex.ToString();
            }
            return(Content(rt));
        }
Example #2
0
        ///获取标记到期时间与条数
        ///
        public ActionResult GetBiaoJiDaoQiTime()
        {
            int Gint = (int)T_BoolItemService.LoadEntities(x => x.ID == 2).FirstOrDefault().@int;

            DateTime NowTime = MvcApplication.GetT_time();
            //int masterID =(Int32)( Convert.ToBoolean(LoginUser.ThisMastr) ? LoginUser.ID : LoginUser.MasterID);
            var tsave = T_SaveHtmlDataService.LoadEntities(x => x.UserID == LoginUser.ID && x.BiaoJiId == null && x.GongGong == 0).DefaultIfEmpty();

            return(Json(new { rows = tsave.ToList()[0] != null?tsave.Count():0, mess = "OK" }, JsonRequestBehavior.AllowGet));
        }
Example #3
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));
        }
Example #4
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       = LoginUser.ID,
                PageIndex  = pageIndex,
                PageSize   = pageSize,
                TotalCount = totalCount,
                Str        = Str,
                Tval       = Request["Tval"]
            };

            SetInfoParam(userInfoParam, T_ItemsService);
            //找到所有该人员信息
            var savelist       = T_SaveHtmlDataService.LoadPageEntities <DateTime>(pageIndex, pageSize, out totalCount, x => x.UserID == LoginUser.ID && x.GongGong == GongG && x.DelFlag == Delflag, x => x.SaveTime, false).DefaultIfEmpty();
            var ActionInfoList = T_FGJHtmlDataService.LoadSearchFrist(userInfoParam, false, true);

            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,
                Fwpingmi      = a.Pingmi_int,
                FwPingmiMoney = a.Money_int
            };

            return(Json(new { rows = temp, total = userInfoParam.TotalCount }, JsonRequestBehavior.AllowGet));
        }
Example #5
0
        public ActionResult EditBiaoJi()
        {
            string spik = Request["strId"].ToString();

            string[] thisS        = spik.Split(',');
            int      BiaojiInfoID = int.Parse(Request["BiaojiInfoID"]);

            foreach (string s in thisS)
            {
                int            id  = int.Parse(s);
                T_SaveHtmlData thd = T_SaveHtmlDataService.LoadEntities(x => x.ID == id).FirstOrDefault();
                thd.BiaoJiId   = BiaojiInfoID;
                thd.BiaoJiTime = DateTime.Now;
                T_SaveHtmlDataService.EditEntity(thd);
            }
            return(Content("ok"));
        }
Example #6
0
        public ActionResult saveitem()
        {
            if (Request["strId"] == null)
            {
                return(Content("errer"));
            }
            var id       = Convert.ToInt64(Request["strId"]);
            var savehtml = T_SaveHtmlDataService.LoadEntities(x => x.ID == id).FirstOrDefault();

            if (savehtml != null)
            {
                savehtml.UserID   = LoginUser.ID;
                savehtml.SaveTime = MvcApplication.GetT_time();
                savehtml.BiaoJiId = null;
                savehtml.GongGong = 0;
                savehtml.MasterID = LoginUser.MasterID;
                T_SaveHtmlDataService.EditEntity(savehtml);
                return(Content("ok"));
            }
            else
            {
                return(Content("数据库中不存在要查询的ID号!"));
            }
        }