Esempio n. 1
0
        //[SupportFilter(ActionName = "Allot")]
        public JsonResult GetRoleListByUser(GridPager pager, string userId)
        {
            if (string.IsNullOrWhiteSpace(userId))
            {
                return(Json(0));
            }
            var roleList = m_BLL.GetRoleListByUser(userId);
            var jsonData = new
            {
                total = pager.totalRows,
                rows  = (
                    from r in roleList
                    select new
                {
                    Id = r.Id,
                    Name = r.Name,
                    Description = r.Description,
                    Flag = r.Flag == "0" ? "0" : "1",
                }
                    ).ToArray()
            };

            return(Json(jsonData));
        }