public CourseUpdate(ICourseViewModel courseViewModel, Course course) { InitializeComponent(); _courseViewModel = courseViewModel; courseToBeUpdated = course; InitializeCourseUserControl(); }
public CourseRead(ICourseViewModel courseViewModel) { InitializeComponent(); _courseViewModel = courseViewModel; //LoadData(); CourseSearchUserControl courseSearchUserControl = new CourseSearchUserControl(_courseViewModel); pnlSearchCourses.Controls.Add(courseSearchUserControl); courseSearchUserControl.Dock = DockStyle.Fill; }
/// <summary> /// класс конвертации курса /// xslt /// </summary> /// <param name="_course">представление курса</param> /// <param name="_params">xslt параметры</param> /// <exception cref="ArgumentNullException"></exception> public XSLTConvertView(ICourseViewModel _course,XSLTParamsView _params) { if (_course == null || _params == null) throw new ArgumentNullException(); course = _course; convParams = _params; course.CheckedItem += ChangeProperty; convParams.Updated += ChangeProperty; СonvertCommand = new ConvertCommand(this); }
/// <summary> /// класс конвертации курса /// xslt /// </summary> /// <param name="_course">представление курса</param> /// <param name="_params">xslt параметры</param> /// <exception cref="ArgumentNullException"></exception> public XSLTConvertView(ICourseViewModel _course, XSLTParamsView _params) { if (_course == null || _params == null) { throw new ArgumentNullException(); } course = _course; convParams = _params; course.CheckedItem += ChangeProperty; convParams.Updated += ChangeProperty; СonvertCommand = new ConvertCommand(this); }
public CourseCreate(ICourseViewModel courseViewModel) { _courseViewModel = courseViewModel; InitializeComponent(); _departments = _courseViewModel.GetDepartments(); _departments.Insert(0, new Department() { ID = 0, DepartmentCode = "", DepartmentDescription = "Please Select" }); ucCourse.cboDepartment.DataSource = _departments; ucCourse.cboDepartment.DisplayMember = "DepartmentDescription"; ucCourse.cboDepartment.ValueMember = "DepartmentCode"; ucCourse.lblID.Hide(); ucCourse.txtID.Hide(); }
public Index(IDepartmentViewModel departmentViewModel, ICourseViewModel courseViewModel) { InitializeComponent(); _departmentViewModel = departmentViewModel; _courseViewModel = courseViewModel; //1. Instantiate the Department user control. DepartmentSearchUserControl departmentSearchUserControl = new DepartmentSearchUserControl(_departmentViewModel); //2. Add it to Tab page with name tabDepartments tabIndex.TabPages["tabDepartments"].Controls.Add(departmentSearchUserControl); //3. Dock the department user control as fill. departmentSearchUserControl.Dock = DockStyle.Fill; //4. Instantiate user control for courses. CourseSearchUserControl courseSearchUserControl = new CourseSearchUserControl(_courseViewModel); //5. Add it to tab page tabCorses. tabIndex.TabPages["tabCourses"].Controls.Add(courseSearchUserControl); //6. Dock user control for courses as fill. courseSearchUserControl.Dock = DockStyle.Fill; }
public Index(IDepartmentViewModel departmentViewModel, ICourseViewModel courseViewModel, IProfessorViewModel professorViewModel, IStudentViewModel studentViewModel) { _departmentViewModel = departmentViewModel; _courseViewModel = courseViewModel; _professorViewModel = professorViewModel; _studentViewModel = studentViewModel; InitializeComponent(); //1. Instantiate the Department user control. DepartmentSearchUserControl departmentSearchUserControl = new DepartmentSearchUserControl(_departmentViewModel); //2. Add it to Tab page with name tabDepartments tabIndex.TabPages["pageDepartments"].Controls.Add(departmentSearchUserControl); //3. Dock the department user control as fill. departmentSearchUserControl.Dock = DockStyle.Fill; //4. Instantiate user control for courses. CourseSearchUserControl courseSearchUserControl = new CourseSearchUserControl(_courseViewModel); //5. Add it to tab page pageCourses. tabIndex.TabPages["pageCourses"].Controls.Add(courseSearchUserControl); //6. Dock user control for courses as fill. courseSearchUserControl.Dock = DockStyle.Fill; //7. Instantiate user control for courses. ProfessorSearchUserControl professorSearchUserControl = new ProfessorSearchUserControl(_professorViewModel); //8. Add it to tab page pageCourses. tabIndex.TabPages["pageProfessors"].Controls.Add(professorSearchUserControl); //9. Dock user control for courses as fill. professorSearchUserControl.Dock = DockStyle.Fill; //10. Instantiate user control for students. StudentSearchUserControl studentSearchUserControl = new StudentSearchUserControl(_studentViewModel); //11. Add it to tab page pageStudents. tabIndex.TabPages["pageStudents"].Controls.Add(studentSearchUserControl); //12. Dock user control for courses as fill. studentSearchUserControl.Dock = DockStyle.Fill; }
public CourseRead(ICourseViewModel courseViewModel) { InitializeComponent(); _courseViewModel = courseViewModel; LoadData(); }
public CourseSearchUserControl(ICourseViewModel courseViewModel) { InitializeComponent(); _courseViewModel = courseViewModel; LoadData(); }