Example #1
0
 public bool Authenticate(AccountInfo info)
 {
     dal = new DAL();
     try
     {
         dal.OpenConnection();
         return dal.SpAuthenticateUser(info.userid, info.password);
     }
     catch (Exception ex)
     {
         throw new FaultException<AccountServiceFault>(new AccountServiceFault(ex.Message));
     }
     finally
     {
         dal.CloseConnection();
     }
 }
Example #2
0
 public bool Authenticate(AccountInfo info)
 {
     dal = new DAL();
     try
     {
         dal.OpenConnection();
         return(dal.SpAuthenticateUser(info.userid, info.password));
     }
     catch (Exception ex)
     {
         throw new FaultException <AccountServiceFault>(new AccountServiceFault(ex.Message));
     }
     finally
     {
         dal.CloseConnection();
     }
 }
Example #3
0
 public bool CreateAccount(AccountInfo info)
 {
     dal = new DAL();
     try
     {
         dal.OpenConnection();
         if (dal.SpIsUserExists(info.userid) > 0)
         {
             return false;
         }
         dal.SpInsertUser(info);
         return true;
     }
     catch (Exception ex)
     {
         throw new FaultException<AccountServiceFault>(new AccountServiceFault(ex.Message));
     }
     finally
     {
         dal.CloseConnection();
     }
 }
Example #4
0
 public bool CreateAccount(AccountInfo info)
 {
     dal = new DAL();
     try
     {
         dal.OpenConnection();
         if (dal.SpIsUserExists(info.userid) > 0)
         {
             return(false);
         }
         dal.SpInsertUser(info);
         return(true);
     }
     catch (Exception ex)
     {
         throw new FaultException <AccountServiceFault>(new AccountServiceFault(ex.Message));
     }
     finally
     {
         dal.CloseConnection();
     }
 }