예제 #1
0
 private void loginbtn_Click(object sender, EventArgs e)
 {
     try
     {
         InputValidation();
         LoginValidation access    = new LoginValidation();
         var             data      = access.InputValidation(emailaddressltxt.Text, Passwordtxt.Text);
         Dashboard       dashboard = new Dashboard();
         this.Hide();
         if (access.GetRole(data))
         {
             dashboard.Show();
         }
         else
         {
             // Todo add login page for users.
             MessageBox.Show("you are not an admin");
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message);
     }
 }