Beispiel #1
0
 /// <summary>
 /// This method registers user
 /// </summary>
 /// <returns></returns>
 public bool RegisterUser()
 {
     try
     {
         _registerService.SaveUser(_register.UserName, _register.Password);
         _registerService.SaveUserInfo(_register.FirstName, _register.LastName, _register.Email, _register.Gender, _register.Age);
         _registerService.SaveDataInDB();
         return(true);
     }
     catch (Exception e)
     {
         Logger.Logger.WriteToLogFile(DateTime.Now.ToString()
                                      + "\n" + e.ToString());
         _register.ErrorMessage("In the application sprang up an error! Please, check errors.txt file for more information!\n" + e.Message);
         return(false);
     }
 }