コード例 #1
0
        /// <summary>
        /// Lors du clique sur un bouton "cmdDayPeriod" : affichage du formulaire "frmClassManager"
        /// Puis masquage du formulaire "frmHome" et affichage du formulaire "frmClassManager".
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void cmdDayPeriod_Click(object sender, EventArgs e)
        {
            Button cmdDayPeriodClick = (Button)sender;
            string date     = null;
            int    idCourse = -1;
            string idPeriod = null;

            date     = dataBase.DateFromIdDate(cmdDayPeriodClick);
            idPeriod = cmdDayPeriodClick.Name.Substring(13);
            idCourse = dataBase.ElementSearchedFromReference("idCourse", "Course", "idPeriod", idPeriod, "AND idTeacher='" + idTeacher.ToString() + "' AND date='" + date + "'");

            dataBase.CloseConnection();

            if (!idCourse.Equals(null))
            {
                this.Hide();

                frmClassManager formClassManager = new frmClassManager(dataBase, formAuthentication, this, idCourse);
                formClassManager.Show();
                formClassManager.BringToFront();
            }
        }
コード例 #2
0
        /// <summary>
        /// Constructeur
        /// </summary>
        /// <param name="dataBaseSent"></param>
        /// <param name="formClassManagerSent"></param>
        /// <param name="idStudentSent"></param>
        /// <param name="idCourseSent"></param>
        /// <param name="pathToFileSent"></param>
        public frmStudentManager(DataBase dataBaseSent, frmClassManager formClassManagerSent, int idStudentSent, int idCourseSent, string pathToFileSent)
        {
            InitializeComponent();

            ChangeInterfaceLanguage();

            this.dataBase         = dataBaseSent;
            this.formClassManager = formClassManagerSent;

            this.idStudent = idStudentSent;
            this.idCourse  = idCourseSent;

            pctStudent.ImageLocation = pathToFileSent;

            NewStudentProfil();

            ClasseNameOnLabel();
            DisciplineNameOnLabel();

            StudentFullNameOnLabel();

            OldNumberAbsenceOnLabelAndCheckBox();
            OldNumberLatenessOnLabelAndCheckBox();
        }