/// <summary>
        /// 获取权限组列表
        /// </summary>
        /// <returns></returns>
        public JsonResult getGroupList()
        {
            DaPowerGroup dal = new DaPowerGroup();
            IList<PowerGroup> areas = dal.getList();

            var result = new CustomJsonResult();
            result.Data = new { total = areas.Count, rows = areas };
            return result;
        }
        public JsonResult addGroup(string name, string memo)
        {
            PowerGroup en = new PowerGroup();
            en.name = name;
            en.memo = memo;

            DaPowerGroup dal = new DaPowerGroup();
            var result = new CustomJsonResult();
            result.Data = dal.add(en);
            return result;
        }
        public JsonResult updateGroup(string id, string name, string memo)
        {
            PowerGroup en = new PowerGroup();
            en.id = Convert.ToInt32(id);
            en.name = name;
            en.memo = memo;

            DaPowerGroup dal = new DaPowerGroup();
            var result = new CustomJsonResult();
            result.Data = dal.update(en);
            return result;
        }
示例#4
0
        /// <summary>
        /// 获取权限组列表
        /// </summary>
        /// <returns></returns>
        public JsonResult drpGroupList()
        {
            DaPowerGroup dal = new DaPowerGroup();
            IList<PowerGroup> groups = dal.getList();

            var result = new CustomJsonResult();
            result.Data = groups;
            return result;
        }
示例#5
0
        /// <summary>
        /// 删除操作岗位
        /// </summary>
        /// <param name="id">权限组ID</param>
        /// <returns></returns>
        public JsonResult Group_remove(string id)
        {
            PowerGroup en = new PowerGroup();
            en.id = Convert.ToInt32(id);

            DaPowerGroup dal = new DaPowerGroup();
            var result = new CustomJsonResult();
            result.Data = dal.delete(en);
            return result;
        }