Ejemplo n.º 1
0
 private void loginBtn_Click(object sender, EventArgs e)
 {
     if (password_txt.Text == "")
     {
         password_error.Visible = true;
     }
     else
     {
         password_error.Visible = false;
     }
     if (username_txt.Text == "")
     {
         username_error.Visible = true;
     }
     else
     {
         username_error.Visible = false;
     }
     if (username_error.Visible || password_error.Visible)
     {
         MainClass.ShowMSG("Field with * are required", "Sorry.....", "Error");
     }
     else
     {
         if (main.getFacultyLogin(username_txt.Text, password_txt.Text))
         {
             if (MainClass.EMPLOYEEROLE == "Director" || MainClass.EMPLOYEEROLE == "Head of Departments" || MainClass.EMPLOYEEROLE == "Professor" || MainClass.EMPLOYEEROLE == "Associate Professor" || MainClass.EMPLOYEEROLE == "Lecturer" || MainClass.EMPLOYEEROLE == "Lab Instructor" || MainClass.EMPLOYEEROLE == "Visiting Faculty")
             {
                 FacultyDashBoard hs = new FacultyDashBoard();
                 main.showWindow(hs, this, MultiDocInterface.ActiveForm);
             }
             else if (MainClass.EMPLOYEEROLE == "Admin" || MainClass.EMPLOYEEROLE == "Manager Academics")
             {
                 HomeScreen hs = new HomeScreen();
                 main.showWindow(hs, this, MultiDocInterface.ActiveForm);
             }
             else
             {
                 MainClass.ShowMSG("Invalid Login Details", "Error.....", "Error");
             }
         }
         else
         {
             MainClass.ShowMSG("Invalid Login Details", "Error.....", "Error");
         }
     }
 }
Ejemplo n.º 2
0
        private void backBtn_Click(object sender, EventArgs e)
        {
            HomeScreen hs = new HomeScreen();

            main.showWindow(hs, this, MultiDocInterface.ActiveForm);
        }