private void button3_Click(object sender, EventArgs e)
        {
            if (fbl.IsExistCSFaculty(this.loginUserName) || fbl.IsExistEEEFaculty(this.loginUserName) || fbl.IsExistBBAFaculty(this.loginUserName))
            {
                this.Hide();
                FacultyPage fp = new FacultyPage(loginUserName, department);    //for faculty
                fp.Show();
            }
            else
            {
                this.Hide();
                FacultyList fl = new FacultyList(loginUserName, department);       //for admin
                fl.Show();
            }

            //if (loginUserName != null && loginUserName.Length == 8)
            //{
            //    this.Hide();
            //    FacultyList fl = new FacultyList(loginUserName, department);
            //    fl.Show();
            //}
            //else if (loginUserName != null && loginUserName.Length == 7)
            //{
            //    this.Hide();
            //    FacultyPage fp = new FacultyPage(loginUserName, department);
            //    fp.Show();
            //}
        }
Exemplo n.º 2
0
        private void button2_Click(object sender, EventArgs e)
        {
            this.Hide();
            FacultyPage obj = new FacultyPage();

            obj.Show();
        }
Exemplo n.º 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (loginUserName.Length == 7)
     {
         this.Hide();
         FacultyPage fp = new FacultyPage(loginUserName, department);
         fp.Show();
     }
     else
     {
         this.Hide();
         StudentPage sp = new StudentPage(loginUserName, department);
         sp.Show();
     }
 }
 private void button1_Click(object sender, EventArgs e)
 {
     if (textBox1.Text.Length == 8)
     {
         if (abl.IsValidAdmin(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             this.Hide();
             AdminPage obj = new AdminPage(loginUserName);
             obj.Show();
             MessageBox.Show("LogIn Successful");
         }
         else
         {
             MessageBox.Show("Please check your UserName and Password");
             textBox1.Text = "";
             textBox2.Text = "";
         }
     }
     else if (textBox1.Text.Length == 7)
     {
         if (fbl.IsValidCSFaculty(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "CS";
             this.Hide();
             FacultyPage fp = new FacultyPage(loginUserName, department);
             fp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else if (fbl.IsValidEEEFaculty(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "EEE";
             this.Hide();
             FacultyPage fp = new FacultyPage(loginUserName, department);
             fp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else if (fbl.IsValidBBAFaculty(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "BBA";
             this.Hide();
             FacultyPage fp = new FacultyPage(loginUserName, department);
             fp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else
         {
             MessageBox.Show("Please check your UserName and Password");
             textBox1.Text = "";
             textBox2.Text = "";
         }
     }
     else if (textBox1.Text.Length == 6)
     {
         if (sbl.IsValidCSStudent(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "CS";
             this.Hide();
             StudentPage sp = new StudentPage(loginUserName, department);
             sp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else if (sbl.IsValidEEEStudent(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "EEE";
             this.Hide();
             StudentPage sp = new StudentPage(loginUserName, department);
             sp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else if (sbl.IsValidBBAStudent(textBox1.Text, textBox2.Text))
         {
             loginUserName = textBox1.Text;
             department    = "BBA";
             this.Hide();
             StudentPage sp = new StudentPage(loginUserName, department);
             sp.Show();
             MessageBox.Show("LogIn Successful");
         }
         else
         {
             MessageBox.Show("Please check your UserName and Password");
             textBox1.Text = "";
             textBox2.Text = "";
         }
     }
     else
     {
         MessageBox.Show("Please check your UserName and Password");
         textBox1.Text = "";
         textBox2.Text = "";
     }
 }