Пример #1
0
 public ArrayList GetContactsByUser(string userName)
 {
     try {
         if (this.Login(AuthHeader.UserName, AuthHeader.Key)) {
             using (UsersDAO usersDAO = new UsersDAO(this.connection)) {
                 return usersDAO.GetContacts(userName);
             }
         }
         else {
             this.Log.Warn("Error de autentificacion. Usuario: " + AuthHeader.UserName);
             return null;
         }
     }
     catch (Exception e) {
         this.Log.ErrorException("Excepcion en SOREWebService.GetContactsByUser: " + e.Message, e);
         throw e;
     }
 }
Пример #2
0
 public bool NewUser(UserVO userData)
 {
     try {
         if (this.Login(AuthHeader.UserName, AuthHeader.Key)) {
             using (UsersDAO usersDAO = new UsersDAO(this.connection)) {
                 return usersDAO.InsertUser(userData);
             }
         }
         else {
             this.Log.Warn("Error de autentificacion. Usuario: " + AuthHeader.UserName);
             return false;
         }
     }
     catch (Exception e) {
         this.Log.ErrorException("Excepcion en SOREWebService.NewUser: " + e.Message, e);
         throw e;
     }
 }