/// <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="SelectExceptionForm"/> class. /// </summary> /// <param name="form">The form.</param> /// <param name="lineId">The line id.</param> public SelectExceptionForm(EditLineForm form, int lineId = 0) { this.exceptionLogic = SWKM.Setup.IoC.Resolve<ExceptionLogic>(); this.lineId = lineId; this.editLineForm = form; InitializeComponent(); var response = exceptionLogic.GetAllLineExceptions(lineId); if (response.Successful == true) { this.selectedExceptionList = response.Objects; this.RefreshGrid(); } else { MessageBox.Show(this, response.ErrorMessage, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error); } }