private bool registrationCheck()
 {
     BL.BO.User _user = bl.GetUser(this.userName);
     if (_user != null)
     {
         if (_user.Password == this.password)
         {
             return(true);
         }
     }
     return(false);
 }
 private bool registrationCheck()
 {
     BL.BO.User _user = bl.GetUser(this.userName);
     if (_user != null)
     {
         if (_user.Password == this.password)
         {
             if (_user.Admin)
             {
                 return(true);
             }
             else
             {
                 MessageBox.Show("You don't have permission to enter!");
                 return(false);
             }
         }
     }
     MessageBox.Show("One or more field are wrong");
     return(false);
 }
示例#3
0
 private void userDataGrid_SelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     this.user = userDataGrid.SelectedItem as BL.BO.User;
     btnGivePermission.IsEnabled   = true;
     btnRevokePermission.IsEnabled = true;
 }