Ejemplo n.º 1
0
        public ActionResult GetPlistRoleAccounts(GetPlistRoleAccounts input)
        {
            if (!ModelState.IsValid)
            {
                return(ModelState.ToJsonResult());
            }
            Debug.Assert(input.RoleId != null, "requestModel.RoleId != null");
            var roleUserAccountTrs = GetRequiredService <IAccountQuery>().GetPlistRoleAccountTrs(
                input.Key, input.RoleId.Value, input);

            Debug.Assert(input.Total != null, "requestModel.total != null");
            var data = new MiniGrid <Dictionary <string, object> > {
                total = input.Total.Value, data = roleUserAccountTrs
            };

            return(this.JsonResult(data));
        }
Ejemplo n.º 2
0
        public ActionResult GetPlistRoleAccounts(GetPlistRoleAccounts input)
        {
            if (!ModelState.IsValid)
            {
                return ModelState.ToJsonResult();
            }
            Debug.Assert(input.RoleId != null, "requestModel.RoleId != null");
            var roleUserAccountTrs = GetRequiredService<IAccountQuery>().GetPlistRoleAccountTrs(
                input.Key, input.RoleId.Value, input);
            Debug.Assert(input.Total != null, "requestModel.total != null");
            var data = new MiniGrid<Dictionary<string, object>> { total = input.Total.Value, data = roleUserAccountTrs };

            return this.JsonResult(data);
        }