private void ConfigureAddBreadcrumbs(BLL.Models.University university) { ConfigureListBreadcrumbs(university); ViewBag.Breadcrumbs.Add( new Breadcrumb { Controller = "DepartmentsManagement", Action = "Add", Title = "Dodawanie wydziału", Params = new Dictionary <string, string> { { "universityId", university.UniversityId.ToString() } } } ); }
private void ConfigureDepartmentsBreadcrumbs(BLL.Models.University university, bool includeTitleDescription) { ConfigureListBreadcrumbs(); ViewBag.Breadcrumbs.Add( new Breadcrumb { Controller = "List", Action = "Departments", Title = university.Abbreviation + (includeTitleDescription ? " - Wydziały" : ""), Params = new Dictionary <string, string> { { "universityId", university.UniversityId.ToString() } } } ); }
public IActionResult Add(UniversityViewModel vm) { if (!ModelState.IsValid) { return(View()); } var universityToAdd = new BLL.Models.University(vm.TitleOrFullName, vm.SubtitleOrAbbreviation); var success = _managementService.AddUniversity(universityToAdd); if (!success) { ModelState.AddModelError("ERROR", "Uczelnia o takiej nazwie lub skrócie już istnieje"); return(View(vm)); } return(RedirectToAction("Universities")); }
private void ConfigureListBreadcrumbs(BLL.Models.University university) { ViewBag.Breadcrumbs = new List <Breadcrumb> { new Breadcrumb { Controller = "UniversitiesManagement", Action = "Universities", Title = "Uczelnie" }, new Breadcrumb { Controller = "DepartmentsManagement", Action = "Departments", Title = university.Abbreviation, Params = new Dictionary <string, string> { { "universityId", university.UniversityId.ToString() } } } }; }
private void ConfigureListBreadcrumbs(BLL.Models.Semester semester, BLL.Models.Department department, BLL.Models.University university) { ViewBag.Breadcrumbs = new List <Breadcrumb> { new Breadcrumb { Controller = "List", Action = "AvailableUniversities", Title = "Uczelnie" }, new Breadcrumb { Controller = "List", Action = "Departments", Title = university.Abbreviation, Params = new Dictionary <string, string> { { "universityId", university.UniversityId.ToString() } } }, new Breadcrumb { Controller = "List", Action = "Semesters", Title = department.Abbreviation, Params = new Dictionary <string, string> { { "departmentId", department.DepartmentId.ToString() }, } }, new Breadcrumb { Controller = "List", Action = "Lessons", Title = semester.Number, Params = new Dictionary <string, string> { { "semesterId", semester.SemesterId.ToString() }, { "departmentId", department.DepartmentId.ToString() } } } }; }
private void ConfigureAddBreadcrumbs(BLL.Models.Semester semester, BLL.Models.Department department, BLL.Models.University university) { ConfigureListBreadcrumbs(semester, department, university); ViewBag.Breadcrumbs.Add( new Breadcrumb { Controller = "LessonsManagement", Action = "Add", Title = "Dodawanie przedmiotu", Params = new Dictionary <string, string> { { "semesterId", semester.SemesterId.ToString() }, { "departmentId", department.DepartmentId.ToString() } } } ); }
private void ConfigureLessonsBreadcrumbs(BLL.Models.Semester semester, BLL.Models.Department department, BLL.Models.University university) { ConfigureSemestersBreadcrumbs(department, includeTitleDescription: false); ViewBag.Breadcrumbs.Add( new Breadcrumb { Controller = "List", Action = "Lessons", Title = semester.Number + " - Przedmioty", Params = new Dictionary <string, string> { { "semesterId", semester.SemesterId.ToString() }, { "departmentId", department.DepartmentId.ToString() } } } ); }