Esempio n. 1
0
        public MainTeacherForm(string id, string sqlconnstring)
        {
            InitializeComponent();
            SQLConnections.Init(sqlconnstring);
            MainForm = this;

            // Group buttons
            this.buttons = new List <ButtonBase>();
            this.buttons.Add(btnExam);
            this.buttons.Add(btnClass);
            this.buttons.Add(btnReport);
            this.setBold(btnExam);

            this.TeacherID = id;
            this.Teacher   = SQLConnections.QueryTeacher(id);

            // Change title
            this.Text = Teacher.ID + " - GV " + Teacher.Name;

            // Change ExamUserControl
            this.examUC.labelCurrentExams.Text = SQLConnections.QueryCurrentExamAmount(id) + "";

            // Load Classes
            this.LoadClasses();
        }