Exemplo n.º 1
0
        private void btn_Back2_Click(object sender, EventArgs e)
        {
            TeacherPanel teacherPanel = new TeacherPanel(id);

            teacherPanel.Show();
            this.Hide();
        }
Exemplo n.º 2
0
 private void btn_enter_Click(object sender, EventArgs e)
 {
     if (this.LogInType.GetItemText(this.LogInType.SelectedItem) == "دانشجو")
     {
         if (authentication(0, username_id.Text, password1.Text))
         {
             StudentPanel studentPanel = new StudentPanel(username_id.Text);
             studentPanel.Show();
             this.Hide();
         }
     }
     else if (this.LogInType.GetItemText(this.LogInType.SelectedItem) == "استاد")
     {
         if (authentication(1, username_id.Text, password1.Text))
         {
             TeacherPanel teacherPanel = new TeacherPanel(username_id.Text);
             teacherPanel.Show();
             this.Hide();
         }
     }
     else if (this.LogInType.GetItemText(LogInType.SelectedItem) == "آموزش")
     {
         if (authentication(2, username_id.Text, password1.Text))
         {
             ManagerPanel amoozesh = new ManagerPanel(username_id.Text);
             amoozesh.Show();
             this.Hide();
         }
     }
 }
Exemplo n.º 3
0
 private void confirm2_Click(object sender, EventArgs e)
 {
     if (master.EditPassword(currentpassword2.Text, newpassword2.Text, confirmpassword2.Text) == 2)
     {
         FileStream      file = File.Create("Uni");
         BinaryFormatter bf   = new BinaryFormatter();
         bf.Serialize(file, Universal.instance);
         file.Close();
         TeacherPanel teacherPanel = new TeacherPanel(id);
         teacherPanel.Show();
         this.Hide();
     }
     else if (master.EditPassword(currentpassword2.Text, newpassword2.Text, confirmpassword2.Text) == 1)
     {
         errorProvider2.SetError(confirmpassword2, "تکرار رمز عبور صحیح نیست");
     }
     else
     {
         errorProvider1.SetError(currentpassword2, "رمز عبور اشتباه است");
     }
 }