/// <summary> /// Initializes a new instance of the <see cref="SchedulePeriodsForm"/> class. /// </summary> public SchedulePeriodsForm() { this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); InitializeComponent(); this.RefreshGrid(); }
/// <summary> /// Initializes a new instance of the <see cref="StationScheduleForm"/> class. /// </summary> public StationScheduleForm() { this.reportLogic = SWKM.Setup.IoC.Resolve<ReportLogic>(); this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); this.stationLogic = SWKM.Setup.IoC.Resolve<StationLogic>(); InitializeComponent(); var scheduleperiodsResponse = this.schedulePeriodLogic.GetSchedulePeriods(); if (scheduleperiodsResponse.Successful == true) { if (scheduleperiodsResponse.Objects.Any() && scheduleperiodsResponse.Objects.Any(s => s.ROUTE.Any(r => r.DELETEDDATE == null))) { this.schedulePeriodCbx.DisplayMember = "NAME"; this.schedulePeriodCbx.ValueMember = "ID"; this.scheduleperiods = scheduleperiodsResponse.Objects.ToList(); this.schedulePeriodCbx.DataSource = AutoMapper.Mapper.Map<IList<SWKM.DAL.SCHEDULEPERIOD>, IList<SWKM.BLL.Dto.BaseIdNameDto>>(this.scheduleperiods); this.ReloadData(); this.RefreshGrids(); this.IsValidForm = true; } else { MessageBox.Show(this, "Nie można wygenerowac rozkładu ponieważ w systemie nie ma zdefiniowanych okresów rozkładu jazdy zawierających trasy!", "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Warning); this.IsValidForm = false; } } else { MessageBox.Show(this, scheduleperiodsResponse.ErrorMessage, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error); this.IsValidForm = false; } }
/// <summary> /// Initializes a new instance of the <see cref="EditSchedulePeriodForm"/> class. /// </summary> /// <param name="form">The form.</param> public EditSchedulePeriodForm(SchedulePeriodsForm form) { this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); this.dayTypeTemplateLogic = SWKM.Setup.IoC.Resolve<DayTypeTemplateLogic>(); this.schedulePeriodsForm = form; InitializeComponent(); this.Text = this.footerLbl.Text = "Dodaj nowy okres rozkładu jazdy"; this.validFromDtp.Value = DateTime.Now; this.validToDtp.Value = this.validFromDtp.Value.AddDays(validToDayInterval); this.validToDtp.Enabled = this.isValidTo.Checked; var response = this.dayTypeTemplateLogic.GetDayTypeTemplates(); if (response.Successful == true) { this.dayTypeTemplateCbx.DataSource = response.Objects; this.dayTypeTemplateCbx.DisplayMember = "NAME"; this.dayTypeTemplateCbx.ValueMember = "ID"; } else { MessageBox.Show(this, response.ErrorMessage, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
/// <summary> /// Initializes a new instance of the <see cref="CoursesForm"/> class. /// </summary> public CoursesForm() { this.courseLogic = SWKM.Setup.IoC.Resolve<CourseLogic>(); this.lineLogic = SWKM.Setup.IoC.Resolve<LineLogic>(); this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); this.dayTypeLogic = SWKM.Setup.IoC.Resolve<DayTypeLogic>(); this.exceptionLogic = SWKM.Setup.IoC.Resolve<ExceptionLogic>(); InitializeComponent(); this.RefreshComboBoxes(); this.RefreshGrid(); }
/// <summary> /// Initializes a new instance of the <see cref="EditCourseForm"/> class. /// </summary> /// <param name="form">The form.</param> public EditCourseForm(CoursesForm form) { this.courseLogic = SWKM.Setup.IoC.Resolve<CourseLogic>(); this.lineLogic = SWKM.Setup.IoC.Resolve<LineLogic>(); this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); this.dayTypeLogic = SWKM.Setup.IoC.Resolve<DayTypeLogic>(); this.exceptionLogic = SWKM.Setup.IoC.Resolve<ExceptionLogic>(); this.coursesForm = form; InitializeComponent(); this.Text = this.footerLbl.Text = "Dodaj nowy kurs"; this.RefreshComboBoxes(); }
/// <summary> /// Initializes a new instance of the <see cref="EditLineForm"/> class. /// </summary> /// <param name="form">The form.</param> public EditLineForm(LinesForm form) { this.lineLogic = SWKM.Setup.IoC.Resolve<LineLogic>(); this.stationLogic = SWKM.Setup.IoC.Resolve<StationLogic>(); this.schedulePeriodLogic = SWKM.Setup.IoC.Resolve<SchedulePeriodLogic>(); this.linesForm = form; InitializeComponent(); this.Text = this.footerLbl.Text = "Dodaj nową linię"; this.selectedExceptionList = new List<BaseIdNameDto>(); this.selectedStationsList = new List<RouteStationDto>(); this.ReloadData(); }