Beispiel #1
0
        /// <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();
        }
Beispiel #2
0
        /// <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="EditDayTemplateForm"/> class.
        /// </summary>
        /// <param name="form">The form.</param>
        public EditDayTemplateForm(DayTemplateForm form)
        {
            this.dayTypeTemplateLogic = SWKM.Setup.IoC.Resolve<DayTypeTemplateLogic>();
            this.dayTypeLogic = SWKM.Setup.IoC.Resolve<DayTypeLogic>();
            this.dayTemplateForm = form;

            InitializeComponent();
            this.Text = this.footerLbl.Text = "Dodaj nowy szablon typu dnia";

            var response = dayTypeLogic.GetDayTypes();

            if (response.Successful == true)
            {
                this.dayTypesGrid.DataSource = dayTypesList = response.Objects;
                this.choosedList = new List<SWKM.BLL.Dto.DayTypeTemplateListDto>();
            }
            else
            {
                MessageBox.Show(this, response.ErrorMessage, "Błąd", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }