Exemplo n.º 1
0
 private void LoginButton_Click(object sender, EventArgs e)
 {
     if (db.IsValidLogin(UserText.Text, PasswordText.Text))
     {
         this.Hide();
         Form formToShow;
         if (db.CheckRights(UserText.Text))
         {
             formToShow = new TeacherForm();
         }
         else
         {
             formToShow = new StudentSelectForm(db.getuserid(UserText.Text));
         }
         formToShow.ShowDialog();
         formToShow.Dispose();
         PasswordText.Text = "";
         this.Show();
     }
     else
     {
         PasswordText.Text = "";
         string            message = "Wrong Passwort/User!";
         string            caption = "Vocabulator Login Error";
         MessageBoxButtons buttons = MessageBoxButtons.OK;
         DialogResult      result  = MessageBox.Show(message, caption, buttons);
     }
 }
Exemplo n.º 2
0
        private void BackBtn_Click(object sender, EventArgs e)
        {
            this.Hide();
            Form form = new StudentSelectForm(userId);

            form.ShowDialog();
        }
Exemplo n.º 3
0
        private void StudentForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            Form form = new StudentSelectForm(userId);

            form.ShowDialog();
        }
Exemplo n.º 4
0
        private void ReportStudentForm_FormClosed(object sender, FormClosedEventArgs e)
        {
            this.Hide();
            Form formToShow = new StudentSelectForm(userid);

            formToShow.ShowDialog();
        }