public SelectScheduleForCourseCommand(NavigationStore navigationStore, NotificationStore notificationStore, TimeTableDto timeTableData) { var groupViewModel = new ScheduleForCourseViewModel(timeTableData); _navigationService = new NavigationService <ScheduleForCourseViewModel>(navigationStore, groupViewModel); }
public MessageDTO addUpdateTimeTable(TimeTableDto timeTable) { TimeTable timeT = Mapper.Map <TimeTableDto, TimeTable>(timeTable); Message msg = _class.addUpdateTimeTable(timeT); var result = Mapper.Map <Message, MessageDTO>(msg); return(result); }
public SelectDegreeCommand(NavigationStore navigationStore, ScheduleManager scheduleManager, TimeTableDto timeTableData, NotificationStore notificationStore) { var courseViewModel = new CoursesViewModel(scheduleManager, navigationStore, notificationStore); courseViewModel.SetTimeTableData(timeTableData); _navigationService = new NavigationService <CoursesViewModel>(navigationStore, courseViewModel); }
public SelectScheduleTypeCommand(NavigationStore navigationStore, NotificationStore notificationStore, ScheduleManager scheduleManager, TimeTableDto timeTableData) { _navigationStore = navigationStore; _notificationStore = notificationStore; _scheduleManager = scheduleManager; _timeTableData = timeTableData; }
public SelectGroupCommand(NavigationStore navigationStore, NotificationStore notificationStore, ScheduleManager scheduleManager, TimeTableDto timeTableData) { var groupsViewModel = new ScheduleTypeViewModel(scheduleManager, navigationStore, notificationStore); groupsViewModel.SetTimeTableData(timeTableData); _navigationService = new NavigationService <ScheduleTypeViewModel>(navigationStore, groupsViewModel); }
public ActionResult SubmitTimeTable(TimeTableDto timeTable) { MessageDTO message = new MessageDTO(); WCFProxy.Using((delegate(IClassSetupService client) { message = client.addUpdateTimeTable(timeTable); })); return(Json(message.message, JsonRequestBehavior.AllowGet)); }
internal TimeTableDto HateoasMainLinksTimeTable(TimeTableDto timeTable) { var timeTableDto = timeTable; timeTableDto.Links.Add(UrlLink("all", "GetTimeTables", null)); timeTableDto.Links.Add(UrlLink("_self", "GetTimeTablesId", new { id = timeTableDto.Id })); timeTableDto.Links.Add(UrlLink("_next", "GetTimeTablesId", new { id = timeTableDto.Id + 1 })); timeTableDto.Links.Add(UrlLink("_startDestination", "GetTimeTableByStartDestination", new { startDestination = "gothenburg", includePassengers = true, includeRoutes = true })); timeTableDto.Links.Add(UrlLink("_endDestination", "GetTimeTableByEndDestination", new { endDestination = "gothenburg", includePassengers = true, includeRoutes = true })); return(timeTableDto); }
public async Task <ActionResult <TimeTableDto> > PostEvent(TimeTableDto timetableDto) { try { var mappedEntity = _mapper.Map <TimeTable>(timetableDto); _timeTableRepository.Add(mappedEntity); if (await _timeTableRepository.Save()) { return(Created($"/api/v1.0/Timetables/{mappedEntity.Id}", _mapper.Map <TimeTable>(mappedEntity))); } } catch (Exception e) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Database Failure: {e.Message}")); } return(BadRequest()); }
public ActionResult TimeTable() { Pagination paginateModel = new Pagination() { PageNumber = 1, PageSize = 500, Skip = 0, SortColumn = "", TotalCount = 0 }; ClassRoomCollection classRoomsCollection = new ClassRoomCollection(); WCFProxy.Using((delegate(IClassSetupService client) { classRoomsCollection = client.getStandardDivision(null, null, 1, paginateModel); })); ViewBag.SchoolId = 1; ViewBag.ClassList = classRoomsCollection.ClassRoom; TimeTableDto timeTableDto = new TimeTableDto(); return(View(timeTableDto)); }
public async Task <ActionResult <TimeTableDto> > PutTimeTable(int id, TimeTableDto timeTableDto) { try { var oldTimeTable = await _timeTableRepository.GetTimeTableById(id); if (oldTimeTable == null) { return(NotFound($"Could not find timetable with id {id}")); } var newTimeTable = _mapper.Map(timeTableDto, oldTimeTable); _timeTableRepository.Update(newTimeTable); if (await _timeTableRepository.Save()) { return(NoContent()); } } catch (Exception e) { return(this.StatusCode(StatusCodes.Status500InternalServerError, $"Database Failure: {e.Message}")); } return(BadRequest()); }
public ScheduleForCourseViewModel(TimeTableDto timeTableDto) { _timeTableDto = timeTableDto; }