예제 #1
0
        //修改登陆积分
        public ActionResult EditJiFen()
        {
            int jifen      = Convert.ToInt32(Request["jifen"]);
            var temp_jifen = T_BoolItemService.LoadEntities(x => x.ItemsID == 98).FirstOrDefault();

            temp_jifen.@int = jifen;
            if (T_BoolItemService.EditEntity(temp_jifen))
            {
                return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { ret = "修改积分出现错误!" }, JsonRequestBehavior.AllowGet));
            }
        }
예제 #2
0
        //修改菜单显示
        public ActionResult EditMenuYorN()
        {
            bool value = Convert.ToInt32(Request["value"]) == 0?true:false;
            int  type  = Convert.ToInt32(Request["type"]);
            var  temp  = T_BoolItemService.LoadEntities(x => x.ThisItem == 9 && x.@int == type).FirstOrDefault();

            temp.BOLL_ = value;
            if (T_BoolItemService.EditEntity(temp))
            {
                return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
            }
            else
            {
                return(Json(new { ret = "修改数据出现错误!" }, JsonRequestBehavior.AllowGet));
            }
        }
예제 #3
0
        //修改微信首页显示行数
        public ActionResult editslider()
        {
            var  val = Convert.ToInt32(Request["val"]);
            long id  = Convert.ToInt64(Request["id"]);

            var tbl = T_BoolItemService.LoadEntities(x => x.ID == id).FirstOrDefault();

            if (tbl != null)
            {
                tbl.@int = val;
                if (T_BoolItemService.EditEntity(tbl))
                {
                    return(Json(new { ret = "ok" }, JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json(new { ret = "修改失败!" }, JsonRequestBehavior.AllowGet));
                }
            }
            else
            {
                return(Json(new { ret = "未找到要修改的数据!" }, JsonRequestBehavior.AllowGet));
            }
        }