コード例 #1
0
        private void btn_back32_Click(object sender, EventArgs e)
        {
            ManagerPanel managerPanel = new ManagerPanel("");

            managerPanel.Show();
            this.Hide();
        }
コード例 #2
0
        private void btn_back31_Click(object sender, EventArgs e)
        {
            ManagerPanel managerPanel = new ManagerPanel(id);

            managerPanel.Show();
            this.Close();
        }
コード例 #3
0
        private void btn_back36_Click(object sender, EventArgs e)
        {
            ManagerPanel amoozesh = new ManagerPanel(id);

            amoozesh.Show();
            this.Hide();
        }
コード例 #4
0
ファイル: EnterPage.cs プロジェクト: ThreeBadBoys/University
 private void btn_enter_Click(object sender, EventArgs e)
 {
     if (this.LogInType.GetItemText(this.LogInType.SelectedItem) == "دانشجو")
     {
         if (authentication(0, Int32.Parse(username_id.Text), password1.Text))
         {
             StudentPanel studentPanel = new StudentPanel(Int32.Parse((username_id.Text)));
             studentPanel.Show();
             this.Hide();
         }
     }
     else if (this.LogInType.GetItemText(this.LogInType.SelectedItem) == "استاد")
     {
         if (authentication(1, Int32.Parse(username_id.Text), password1.Text))
         {
             MasterPanel teacherPanel = new MasterPanel(Int32.Parse(username_id.Text));
             teacherPanel.Show();
             this.Hide();
         }
     }
     else if (this.LogInType.GetItemText(LogInType.SelectedItem) == "آموزش")
     {
         if (authentication(2, Int32.Parse(username_id.Text), password1.Text))
         {
             ManagerPanel amoozesh = new ManagerPanel(Int32.Parse(username_id.Text));
             amoozesh.Show();
             this.Hide();
         }
     }
 }
コード例 #5
0
        private void btn_signup_master_Click(object sender, EventArgs e)
        {
            mng.SignUpMaster(firstname_input.Text, lastname_input.Text, new List <Course>());
            //FileStream file = File.Create("Uni");
            //BinaryFormatter bf = new BinaryFormatter();
            //bf.Serialize(file, Universal.instance);
            //file.Close();
            ManagerPanel managerpanel = new ManagerPanel(id);

            managerpanel.Show();
            this.Hide();
        }
コード例 #6
0
        private void btn_std_signup_Click(object sender, EventArgs e)
        {
            mng.SignUpStudent(std_first_name.Text, std_last_name.Text, std_major.Text);
            //FileStream file = File.Create("Uni");
            //BinaryFormatter bf = new BinaryFormatter();
            //bf.Serialize(file, Universal.instance);
            //file.Close();
            ManagerPanel managerpanel = new ManagerPanel(id);

            managerpanel.Show();
            this.Hide();
        }
コード例 #7
0
        private void btn_std_signup_Click(object sender, EventArgs e)
        {
            mng.SignUpManager(mng_first_name.Text, mng_last_name.Text, password.Text);
            FileStream      file = File.Create("Uni");
            BinaryFormatter bf   = new BinaryFormatter();

            bf.Serialize(file, Universal.instance);
            file.Close();
            ManagerPanel managerpanel = new ManagerPanel(id);

            managerpanel.Show();
            this.Hide();
        }
コード例 #8
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (mng.RemoveStudentsSemester(Int32.Parse(id_input.Text)))
     {
         //FileStream file = File.Create("Uni");
         //BinaryFormatter bf = new BinaryFormatter();
         //bf.Serialize(file, Universal.instance);
         //file.Close();
         ManagerPanel managerpanel = new ManagerPanel(id);
         managerpanel.Show();
         this.Hide();
     }
 }
コード例 #9
0
        private void btn_remove_Click(object sender, EventArgs e)
        {
            mng.RemoveMasterFully(textBox1.Text);
            FileStream      file = File.Create("Uni");
            BinaryFormatter bf   = new BinaryFormatter();

            bf.Serialize(file, Universal.instance);
            file.Close();
            ManagerPanel managerpanel = new ManagerPanel(id);

            managerpanel.Show();
            this.Close();
        }
コード例 #10
0
 private void btn_add_course_Click(object sender, EventArgs e)
 {
     if (mng.AddCourse(code.Text, name.Text, masterCode.Text, time.Text, examTime.Text, Convert.ToInt32(val.Text)))
     {
         FileStream      file = File.Create("Uni");
         BinaryFormatter bf   = new BinaryFormatter();
         bf.Serialize(file, Universal.instance);
         file.Close();
         ManagerPanel mn = new ManagerPanel(id);
         mn.Show();
         this.Hide();
     }
 }
コード例 #11
0
 private void btn_remove_Click(object sender, EventArgs e)
 {
     if (id != Int32.Parse(textBox1.Text))
     {
         if (mng.RemoveManagerFully(Int32.Parse(textBox1.Text)))
         {
             //FileStream file = File.Create("Uni");
             //BinaryFormatter bf = new BinaryFormatter();
             //bf.Serialize(file, Universal.instance);
             //file.Close();
             ManagerPanel managerpanel = new ManagerPanel(id);
             managerpanel.Show();
             this.Hide();
         }
     }
 }
コード例 #12
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
         {
             //Showing Error #Not Found
             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();
             teacherPanel.Show();
             this.Hide();
         }
         else
         {
             TeacherPanel teacherPanel = new TeacherPanel();
             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();
         }
     }
 }
コード例 #13
0
 private void confirm_Click(object sender, EventArgs e)
 {
     if (mng.EditPassword(currentpassword.Text, newpassword.Text, confirmpassword.Text) == 2)
     {
         FileStream      file = File.Create("Uni");
         BinaryFormatter bf   = new BinaryFormatter();
         bf.Serialize(file, Universal.instance);
         file.Close();
         ManagerPanel managerpanel = new ManagerPanel(id);
         managerpanel.Show();
         this.Hide();
     }
     else if (mng.EditPassword(currentpassword.Text, newpassword.Text, confirmpassword.Text) == 1)
     {
         errorProvider2.SetError(confirmpassword, "تکرار رمز عبور صحیح نیست");
     }
     else
     {
         errorProvider1.SetError(currentpassword, "رمز عبور اشتباه است");
     }
 }
コード例 #14
0
        private void SignUpManagerPanel_FormClosing(object sender, FormClosingEventArgs e)
        {
            ManagerPanel managerPanel = new ManagerPanel("");

            managerPanel.Show();
        }