Ejemplo n.º 1
0
        public IActionResult Index()
        {
            var model = new LinksIndexView();

            model.DepartmentId   = DepartmentId;
            model.Links          = _departmentLinksService.GetAllLinksForDepartment(DepartmentId);
            model.CanCreateLinks = _limitsService.CanDepartmentUseLinks(DepartmentId);

            var department = _departmentsService.GetDepartmentById(DepartmentId);

            model.Code = department.LinkCode;

            return(View(model));
        }
Ejemplo n.º 2
0
        public async Task <IActionResult> Index()
        {
            var model = new LinksIndexView();

            model.DepartmentId = DepartmentId;
            model.Links        = await _departmentLinksService.GetAllLinksForDepartmentAsync(DepartmentId);

            model.CanCreateLinks = await _limitsService.CanDepartmentUseLinksAsync(DepartmentId);

            var department = await _departmentsService.GetDepartmentByIdAsync(DepartmentId);

            model.Code = department.LinkCode;

            return(View(model));
        }