Exemplo n.º 1
0
        public ActionResult GetHref()
        {
            UserInfoParam uip = new UserInfoParam();

            uip.PageIndex = Request["page"] != null?int.Parse(Request["page"]) : 1;

            uip.PageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 5;

            uip.TotalCount = 0;
            uip.CityID     = LoginUser.CityID;
            uip.Str        = Request["Str"] != null ? Request["Str"] : null;
            uip.Isee       = Request["Isee"] != null?Convert.ToBoolean(Request["Isee"]) : false;

            uip.C_id = LoginUser.ID;
            var actioninfolist = T_QiuZhuQiuGouService.LoadSearchEntities(uip);
            var temp           = from a in actioninfolist
                                 select new
            {
                ID         = a.ID,
                Hname      = a.Hname,
                QuYu       = a.QuYu,
                JuShi      = a.JuShi,
                Money      = a.Money,
                FBtime     = a.FBtime,
                Hperson    = a.Hperson,
                Photo      = a.Photo,
                GuiShuDi   = a.GuiShuDi,
                ClickCount = a.SeeQzCzs.Count,
                IsQZ       = "QZ"
            };

            return(Json(new { rows = temp, total = uip.TotalCount }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 2
0
 //添加求租信息
 public ActionResult AddQiuZhu(T_QiuZhuQiuGou tqz)
 {
     if (tqz.ID <= 0)
     {
         tqz.User_ID     = LoginUser.ID;
         tqz.AddUserTime = MvcApplication.GetT_time();
         T_QiuZhuQiuGouService.AddEntity(tqz);
         return(Json(new { ret = "ok", JsonRequestBehavior.AllowGet }));
     }
     else
     {
         return(Json(new { msg = "添加出错,请联系管理员!~", JsonRequestBehavior.AllowGet }));
     }
 }
Exemplo n.º 3
0
        //删除求租信息
        public ActionResult Delqiuzhu()
        {
            var id    = Convert.ToInt64(Request["IDs"]);
            var tdata = T_QiuZhuQiuGouService.LoadEntities(x => x.ID == id && x.User_ID == LoginUser.ID).FirstOrDefault();

            if (tdata != null)
            {
                if (T_QiuZhuQiuGouService.DeleteEntity(tdata))
                {
                    return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { msg = "没有成功删除信息!" }, JsonRequestBehavior.AllowGet));
                }
            }
            return(Json(new { msg = "数据库中没有找到要删除的项目!" }, JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 4
0
        //获取添加求租信息
        public ActionResult GetQiuZhu()
        {
            int pageIdex = Request["page"] != null?int.Parse(Request["page"]) : 1;

            int pageSize = Request["rows"] != null?int.Parse(Request["rows"]) : 35;

            int totalcount = int.MaxValue;
            var mydata     = T_QiuZhuQiuGouService.LoadPageEntities(pageIdex, pageSize, out totalcount, x => x.User_ID == LoginUser.ID, x => x.AddUserTime, false);
            var temp       = from a in mydata
                             select new
            {
                ID         = a.ID,
                HLName     = a.Hname,
                FbTime     = a.FBtime,
                PersonName = a.Hperson,
                GuiShuDi   = a.GuiShuDi,
                photo      = a.Photo,
                FwSumMoney = a.Money,
                JuShi      = a.JuShi,
                Address    = a.QuYu
            };

            return(Json(new { rows = temp, total = totalcount }, JsonRequestBehavior.AllowGet));
        }