コード例 #1
0
        public JsonResult DeleteInfo(string ID)
        {
            var mql2 = RMS_MenusSet.Id.Equal(ID);
            int f    = MDBiz.Remove <RMS_MenusSet>(mql2);

            return(Json("OK", JsonRequestBehavior.AllowGet));
        }
コード例 #2
0
        public JsonResult GetInfo(string ID)
        {
            var       mql2   = RMS_MenusSet.SelectAll().Where(RMS_MenusSet.Id.Equal(ID));
            RMS_Menus Rmodel = MDBiz.GetEntity(mql2);

            //  groupsBiz.Add(rol);
            return(Json(Rmodel, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
        public JsonResult GetJson()
        {
            var sql = RMS_MenusSet.SelectAll();
            List <RMS_Menus> listAll  = MDBiz.GetOwnList <RMS_Menus>(sql);
            List <TreeMenus> listTree = MDBiz.GetTreeManus(listAll);

            return(Json(listTree));
        }
コード例 #4
0
        public JsonResult DeleteInfo(string ID)
        {
            var mql2 = RMS_MenusSet.Id.Equal(ID);
            int f    = MDBiz.Remove <RMS_MenusSet>(mql2);

            SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.除, "菜单管理--删除", true, WebClientIP, "菜单管理");
            return(Json("OK", JsonRequestBehavior.AllowGet));
        }
コード例 #5
0
        public JsonResult EditInfo(RMS_Menus Mode)
        {
            Random rnd   = new Random();
            bool   IsAdd = false;

            if (!(Mode.Id != null && !Mode.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                Mode.Id         = Guid.NewGuid();
                Mode.CreateTime = DateTime.Now;
                Mode.ModifyTime = DateTime.Now;
                Mode.IsEnable   = true;
                Mode.IsShow     = true;
                MDBiz.Add(Mode);
                SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.新增, "菜单管理--新增", true, WebClientIP, "菜单管理");
                return(Json("ok", JsonRequestBehavior.AllowGet));
            }
            else
            {
                Mode.WhereExpression = RMS_MenusSet.Id.Equal(Mode.Id);
                //  spmodel.GroupId = GroupId;
                Mode.CreateTime = DateTime.Now;
                Mode.ModifyTime = DateTime.Now;
                if (MDBiz.Update(Mode) > 0)
                {
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "菜单管理--修改", true, WebClientIP, "菜单管理");
                    return(Json("ok", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    SysOperateLogBiz.AddSysOperateLog(UserData.Id.ToString(), UserData.UserName, e3net.Mode.OperatEnumName.修改, "菜单管理--修改", false, WebClientIP, "菜单管理");
                    return(Json("Nok", JsonRequestBehavior.AllowGet));
                }
            }
        }
コード例 #6
0
        public JsonResult EditInfo(RMS_Menus Mode)
        {
            Random rnd   = new Random();
            bool   IsAdd = false;

            if (!(Mode.Id != null && !Mode.Id.ToString().Equals("00000000-0000-0000-0000-000000000000")))//id为空,是添加
            {
                IsAdd = true;
            }
            if (IsAdd)
            {
                Mode.Id         = Guid.NewGuid();
                Mode.CreateTime = DateTime.Now;
                Mode.ModifyTime = DateTime.Now;
                Mode.IsEnable   = true;
                Mode.IsShow     = true;
                MDBiz.Add(Mode);

                return(Json("ok", JsonRequestBehavior.AllowGet));
            }
            else
            {
                Mode.WhereExpression = RMS_MenusSet.Id.Equal(Mode.Id);
                //  spmodel.GroupId = GroupId;
                Mode.CreateTime = DateTime.Now;
                Mode.ModifyTime = DateTime.Now;
                if (MDBiz.Update(Mode) > 0)
                {
                    return(Json("ok", JsonRequestBehavior.AllowGet));
                }
                else
                {
                    return(Json("Nok", JsonRequestBehavior.AllowGet));
                }
            }
        }