public CreateCourseWindow(ICouresRequester caller, CourseModel model) { InitializeComponent(); CallingWindow = caller; LoadListsData(); update = true; createCourseBtn.Content = "Update"; titleText.Text = "Update The Course"; title.Title = "UPDATE COURSE"; course = model; nameText.Text = course.Name; codeText.Text = course.Code; foreach (var eduYear in EduYears) { if (eduYear.Id == course.EduYear.Id) { eduYearCombobox.SelectedItem = eduYear; } } foreach (var outcome in course.CourseOutcomes) { OutcomeUserControl outcomeUserControl = new OutcomeUserControl(); outcomeUserControl.nameText.Text = outcome.Name; outcomeUserControl.descriptionText.Text = outcome.Description; TagData td = new TagData { IsNew = false, IsDeletable = GlobalConfig.Connection.CourseOutcome_IsDeletable(outcome.Id), Id = outcome.Id, Type = OutcomeType.CourseOutcome }; outcomeUserControl.Tag = td; outcomesList.Children.Add(outcomeUserControl); } }
public CreateCourseWindow(ICouresRequester caller) { InitializeComponent(); CallingWindow = caller; LoadListsData(); }