Example #1
0
 public static bool Authenticate(string email, string password, DBManagerClient DB)
 {
     try
     {
         User userToAuthenticate = DB.getUserByEmail(email);
         if (userToAuthenticate == null)
         {
             return(false);
         }
         if (userToAuthenticate.password != password)
         {
             return(false);
         }
         else
         {
             return(true);
         }
     }
     catch (Exception e)
     {
         return(false);
     }
 }
Example #2
0
 public UserManager()
 {
     this.DB = new DBManagerClient();
 }
Example #3
0
 public CategoryManager()
 {
     this.DB = new DBManagerClient();
 }
Example #4
0
 public ProductManager()
 {
     this.DB = new DBManagerClient();
 }
Example #5
0
 public BrandManager()
 {
     this.DB = new DBManagerClient();
 }