internal void Initialize(UCComboBox ucSchoolClass)
        {
            ucSchoolClass.SetLabelName("Choose school class");
            ucSchoolClass.ComboBox.DataSource = GetAllSchoolClasses();

            ucSchoolClass.ComboBox.SelectedIndex = -1;
        }
Example #2
0
        public SchoolClassController(UCTextBox ucClassName, UCComboBox ucTeacher)
        {
            this.ucClassName = ucClassName;
            this.ucTeacher   = ucTeacher;

            ucClassName.SetLabelName("Class name");
            ucTeacher.SetLabelName("Class elder");
        }
        internal void Initialize(UCTextBox ucFirstName, UCTextBox ucLastName, UCComboBox ucSchoolClass)
        {
            ucFirstName.SetLabelName("First name");
            ucLastName.SetLabelName("Last name");
            ucSchoolClass.SetLabelName("School class");

            ucSchoolClass.ComboBox.DataSource = GetAllSchoolClasses();

            ucSchoolClass.ComboBox.SelectedIndex = -1;
            ucSchoolClass.ComboBox.Text          = "Select school class";
        }
        internal void Initialize(Student studentUpdate, UCTextBox ucFirstName, UCTextBox ucLastName, UCComboBox ucSchoolClass)
        {
            student = studentUpdate;
            ucFirstName.SetLabelName("First name");
            ucLastName.SetLabelName("Last name");
            ucSchoolClass.SetLabelName("School class");

            ucFirstName.TextBox.Text = student.FirstName;
            ucLastName.TextBox.Text  = student.LastName;
            List <SchoolClass> sc = GetAllSchoolClasses();

            ucSchoolClass.ComboBox.DataSource = sc;

            ucSchoolClass.ComboBox.SelectedItem = sc.Single(s => s.Id == student.SchoolClass.Id);
        }
Example #5
0
        internal void Initialize(UCTextBox ucFirstName, UCTextBox ucLastName, UCTextBox ucEmail, UCTextBox ucPassword, UCComboBox ucSubject)
        {
            ucFirstName.SetLabelName("First name");
            ucLastName.SetLabelName("Last name");
            ucEmail.SetLabelName("Email");
            ucPassword.SetLabelName("Password");
            ucSubject.SetLabelName("Subject");

            ucPassword.TextBox.PasswordChar = '*';



            ucSubject.ComboBox.DataSource    = GetAllSubjects();
            ucSubject.ComboBox.DisplayMember = "SubjectName";
            ucSubject.ComboBox.SelectedIndex = -1;
            ucSubject.ComboBox.Text          = "Select subject";
        }