Exemplo n.º 1
0
        /// <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;
        }
Exemplo n.º 2
0
        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;
        }
Exemplo n.º 3
0
        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;
        }
Exemplo n.º 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;
        }
Exemplo n.º 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;
        }