private void toolStripMenuItem6_Click(object sender, EventArgs e)
        {
            this.Close();
            login l = new B_8.login();

            l.Show();
        }
Пример #2
0
        private void login1()
        {
            if (!link)
            {
                DataRow dataRow = SQLFunctions.checkFbLogIn(fbMail);

                if (dataRow == null)
                {
                    MessageBox.Show("This facebook account is not linked to any system user\nPlease link your Facebook account and try again");
                    B_8.login login = new B_8.login();
                    login.Show();
                }
                else if (SQLFunctions.checkLogIn(Convert.ToInt32(dataRow[0]), dataRow[1].ToString()))
                {
                    if (SQLFunctions.checkRole(Convert.ToInt32(dataRow[0])) == "Student")
                    {
                        FormMenuStudent mainForm = new FormMenuStudent(Convert.ToInt32(dataRow[0]), dataRow[1].ToString());
                        mainForm.Show();
                    }
                    else if (SQLFunctions.checkRole(Convert.ToInt32(dataRow[0])) == "SecretaryA")
                    {
                        FormMenuSecretary mainForm = new FormMenuSecretary(Convert.ToInt32(dataRow[0]), dataRow[1].ToString());
                        mainForm.Show();
                    }
                    else if (SQLFunctions.checkRole(Convert.ToInt32(dataRow[0])) == "Exam Department")
                    {
                        FormMenuExamDepartment mainForm = new FormMenuExamDepartment();
                        mainForm.Show();
                    }
                    else if (SQLFunctions.checkRole(Convert.ToInt32(dataRow[0])) == "Admin")
                    {
                        FormMenuAdmin mainForm = new FormMenuAdmin();
                        mainForm.Show();
                    }
                    else
                    {
                        B_8.login login = new B_8.login(true, SQLFunctions.convertFbMailToMail(fbMail), dataRow[1].ToString());
                    }
                }
            }
            else
            {
                SQLFunctions.linkFbAccount(mail, fbMail);
                MessageBox.Show("Your facebook account was succesfuly linked");
                this.Hide();
            }
        }
Пример #3
0
 private void button1_Click(object sender, EventArgs e)
 {
     B_8.login login = new B_8.login();
     login.Show();
     this.Dispose();
 }