예제 #1
0
        public ActionResult _ListMenuInRole()
        {
            var db     = new RoleBusiness();
            int minRow = 0;
            int maxRow = 0;
            int Id     = 0;

            int.TryParse(HttpContext.Request["start"], out minRow);
            int length = 10;

            int.TryParse(HttpContext.Request["length"], out length);
            maxRow = (minRow + length);
            int draw = 0;

            int.TryParse(HttpContext.Request["draw"], out draw);
            string search      = HttpContext.Request["search[value]"].Trim();
            int    currentPage = (minRow / 10) + 1;

            int.TryParse(HttpContext.Request["Id"], out Id);

            var result = db.BS_ListMenuInRole(search, currentPage, 10, Id);

            return(Content(JsonConvert.SerializeObject(new
            {
                data = result.Data,
                draw = draw,
                recordsFiltered = result.Total,
                recordsTotal = result.Total
            })));
        }