public ActionResult GetList_Modules() { var Cookie = Request.Cookies["ServiPlus"]; var Token = Cookie.Value; string[] nums = Token.Split('=').ToArray(); string User = nums[1]; var user = FacadeUsers.GetUserByToken(User); if (user.ProfileID == 7) { var lsTA = FacadeModuleService.GetAllBYModuleList(user.ModuleID.Value).Select(p => new SelectListItem() { Text = p.ID + " - " + p.Base, Value = p.ModuleID.ToString() }).ToList <SelectListItem>(); return(Json(lsTA, JsonRequestBehavior.AllowGet)); } else { var ls = FacadeModuleService.GetAll().Select(p => new SelectListItem() { Text = p.ID + " - " + p.Base, Value = p.ModuleID.ToString() }).ToList <SelectListItem>(); return(Json(ls, JsonRequestBehavior.AllowGet)); } }