Exemple #1
0
        public bool login()
        {
            AdminMapper adminmapper = new AdminMapper(MysqlDb.GetInstance());

            if (adminmapper.CheckLogin("admin", passwordBox1.Password))
            {
                return(true);
            }
            else
            {
                MessageBox.Show("Wachtwoord is onjuist.");
                return(false);
            }
        }
Exemple #2
0
        protected Pair ProcessRow(Pair pair, MySqlDataReader Reader)
        {
            pair.ID = Reader.GetInt32(0);
            pair.Number_of_guests = Reader.GetInt32(1);
            StudentMapper studentmapper = new StudentMapper(MysqlDb.GetInstance());

            pair.Student1_id = Reader.GetInt32(2);
            try
            {
                pair.Student2_id = Reader.GetInt32(3);
            }
            catch (Exception e)
            {
                pair.Student2_id = 0;
            }
            return(pair);
        }
Exemple #3
0
        public void Init(MainWindow mainWindow)
        {
            this.PDFexporter = new PDFExporter(mainWindow.GridOverzichtList);

            this.DB = MysqlDb.GetInstance();

            this.BlockedTimeslotMapper = new BlockedTimeslotMapper(this.DB);
            this.SessionMapper         = new SessionMapper(this.DB);
            this.UserMapper            = new UserMapper(this.DB);
            this.ClassroomMapper       = new ClassroomMapper(this.DB);
            this.StudentMapper         = new StudentMapper(this.DB);
            this.DaytimeMapper         = new DaytimeMapper(this.DB);
            this.TeacherMapper         = new TeacherMapper(this.DB);
            this.ExpertMapper          = new ExpertMapper(this.DB);
            this.PairMapper            = new PairMapper(this.DB);
            this.EmailTemplateMapper   = new EmailTemplateMapper(this.DB);
            this.LetterTemplateMapper  = new LetterTemplateMapper(this.DB);
            this.TimeslotMapper        = new TimeslotMapper(this.DB);

            this.Timeslots    = this.TimeslotMapper.FindAll();
            this.toPlanWindow = new UnPlannedPairs();

            this.MainWindow = mainWindow;
        }