Esempio n. 1
0
 public Account SignUp(string username, string password, string email)
 {
     FailIfAlreadyRegistered(username, email);
     if (!username.IsNullOrWhiteSpace() && !email.IsNullOrWhiteSpace())
     {
         Account user = new Account();
         user.Password = password;
         user.BranchId = email;
         user.UserName = username;
         user.Email = email;
         user.OwnerId = email;
         user.DateCreated = DateTime.Now;
         user.LastActivityDate = DateTime.Now;
         user.LastLoginDate = DateTime.Now;
         user.Role = 1;
         try
         {
             userRepo.Save(user);
         }
         catch (Exception ex)
         {
             throw new Exception(ex.Message);
         }
         return user;
     }
     return null;
 }
Esempio n. 2
0
 public void Save(Account user)
 {
     ReportingRepository.Save<Account>(user);
 }