Ejemplo n.º 1
0
        private void AddOutcome_Click(object sender, RoutedEventArgs e)
        {
            // TODO - fix the placement system for the letters
            OutcomeUserControl outcome = new OutcomeUserControl();

            outcome.nameText.Text = Convert.ToChar(outcomesList.Children.Count + 65).ToString();
            TagData td = new TagData
            {
                Id          = -1,
                IsDeletable = true,
                IsNew       = true,
                Type        = OutcomeType.CourseOutcome
            };

            outcome.Tag = td;
            outcomesList.Children.Add(outcome);
        }
Ejemplo n.º 2
0
        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);
            }
        }