Ejemplo n.º 1
0
        public IEnumerable <dynamic> Get(RequestWrapper req)
        {
            req.LoadSettingXmlString("<settings defaultOrderBy='RoleSeq'></settings>");
            var result = new sys_roleService().GetModelList(req.ToParamQuery());

            return(result);
        }
Ejemplo n.º 2
0
        public IEnumerable <dynamic> Get(RequestWrapper req)
        {
            req.SetJson("{orderby:'RoleSeq'}");
            var result = new sys_roleService().GetModelList(req.ToParamQuery());

            return(result);
        }
Ejemplo n.º 3
0
 public void EditPermission(string id, dynamic data)
 {
     var service = new sys_roleService();
     service.EditRoleMenu(id, data.menus as JToken);
     service.EditRoleMenuButton(id, data.buttons as JToken);
     service.EditRolePermission(id, data.permissions as JToken);
     service.EditRoleMenuColumns(id, data.columns as JToken);
 }
Ejemplo n.º 4
0
        public void EditPermission(string id, dynamic data)
        {
            var service = new sys_roleService();

            service.EditRoleMenu(id, data.menus as JToken);
            service.EditRoleMenuButton(id, data.buttons as JToken);
            service.EditRolePermission(id, data.permissions as JToken);
            service.EditRoleMenuColumns(id, data.columns as JToken);
        }
Ejemplo n.º 5
0
        public void Edit(dynamic data)
        {
            var wrappers = RequestWrapper.InstanceArray(1);
            wrappers[0].SetXml(@"
<settings>
    <table>sys_role</table>
    <where><c column='RoleCode' values='{_id}'></c></where>
</settings>");

            var service = new sys_roleService();
            var result = service.Edit(data, null, wrappers);
        }
Ejemplo n.º 6
0
        public void Edit(dynamic data)
        {
            var wrappers = RequestWrapper.InstanceArray(1);

            wrappers[0].SetXml(@"
<settings>
    <table>sys_role</table>
    <where><c column='RoleCode' values='{_id}'></c></where>
</settings>");

            var service = new sys_roleService();
            var result  = service.Edit(data, null, wrappers);
        }
Ejemplo n.º 7
0
        public dynamic GetRoleMenu(string id) 
        {
            var service = new sys_roleService();
            var pQuery = ParamQuery.Instance().Select(String.Format(@" A.MenuCode,
        (case when exists(select 1 from sys_roleMenuMap B where B.MenuCode = A.MenuCode and B.RoleCode = '{0}')
              then '1' 
              else '0' end) as chk
            ", id)).From("sys_menu A")
             .Where("A.IsEnable", true);

            var result = service.GetDynamicList(pQuery);
            return result;
        }
Ejemplo n.º 8
0
        public dynamic GetRoleMenu(string id)
        {
            var service = new sys_roleService();
            var pQuery  = ParamQuery.Instance().Select(String.Format(@" A.MenuCode,
        (case when exists(select 1 from sys_roleMenuMap B where B.MenuCode = A.MenuCode and B.RoleCode = '{0}')
              then '1' 
              else '0' end) as chk
            ", id)).From("sys_menu A")
                          .Where("A.IsEnable", true);

            var result = service.GetDynamicList(pQuery);

            return(result);
        }
Ejemplo n.º 9
0
        public void Edit(dynamic data)
        {
            var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@"
<settings>
    <table>
        sys_role
    </table>
    <where>
        <field name='RoleCode' cp='equal' variable='_id'></field>
    </where>
</settings>");

            var service = new sys_roleService();
            var result  = service.Edit(null, listWrapper, data);
        }
Ejemplo n.º 10
0
        public void Edit(dynamic data)
        {
            var listWrapper = RequestWrapper.Instance().LoadSettingXmlString(@"
<settings>
    <table>
        sys_role
    </table>
    <where>
        <field name='RoleCode' cp='equal' variable='_id'></field>
    </where>
</settings>");

            var service = new sys_roleService();
            var result = service.Edit(null, listWrapper, data);
        }
Ejemplo n.º 11
0
        public void EditRoleMembers(string id, dynamic data)
        {
            var service = new sys_roleService();

            service.SaveRoleMembers(id, data as JToken);
        }
Ejemplo n.º 12
0
 public void EditRoleMembers(string id, dynamic data)
 {
     var service = new sys_roleService();
     service.SaveRoleMembers(id, data as JToken);
 }
Ejemplo n.º 13
0
 public IEnumerable<dynamic> Get(RequestWrapper req)
 {
     req.SetJson("{orderby:'RoleSeq'}");
     var result = new sys_roleService().GetModelList(req.ToParamQuery());
     return result;
 }
Ejemplo n.º 14
0
 public IEnumerable<dynamic> Get(RequestWrapper req)
 {
     req.LoadSettingXmlString("<settings defaultOrderBy='RoleSeq'></settings>");
     var result = new sys_roleService().GetModelList(req.ToParamQuery());
     return result;
 }