Beispiel #1
0
        public EwhAccount ToEntity(EwhAccount ewhAccount, AddAccountDto account)
        {
            ewhAccount.AccountType = account.AccountType;
            ewhAccount.UserName    = account.UserName;
            ewhAccount.Info        = account.Info;

            return(ewhAccount);
        }
Beispiel #2
0
        public string Save(EwhAccount account)
        {
            var acc = _accountRepository.Get(account.AccountId);

            _ewhMapper.ToEntity(acc ?? new core.Users.Account(), account);
            _accountRepository.AddOrUpdate(acc);
            return(acc.Id);
        }
 public AccountInfoDto(EwhAccount entity)
 {
     this.AccountId   = entity.AccountId;
     this.AccountType = entity.AccountType;
     this.UserName    = entity.UserName;
     this.Status      = entity.Status;
     this.Info        = entity.Info;
 }
Beispiel #4
0
 public void ToEntity(EwhAccount ewhAccount, Account account)
 {
     ewhAccount.AccountType = account.AccountType;
     ewhAccount.UserName    = account.UserName;
     ewhAccount.Status      = account.Status;
     ewhAccount.Websites    = account.Websites;
     ewhAccount.Info        = account.Info;
 }
        public EwhAccount ToEntity(EwhAccount entity)
        {
            entity.AccountType = this.AccountType;
            entity.Info        = this.Info;
            entity.Status      = this.Status;
            entity.Websites    = this.Websites;

            return(entity);
        }
Beispiel #6
0
        EwhAccount IEwhMapper.ToEntity(EwhAccount ewhAccount, Account account)
        {
            ewhAccount.AccountType = account.AccountType;
            ewhAccount.UserName    = account.UserName;
            ewhAccount.Websites    = account.Websites;
            ewhAccount.Info        = account.Info;

            return(ewhAccount);
        }
Beispiel #7
0
 public bool UpdateAccount(EwhAccount account)
 {
     if (account.Save())
     {
         account.SelfSync();
         return(true);
     }
     return(false);
 }
Beispiel #8
0
        public Account ToEntity(Account account, EwhAccount ewhAccount)
        {
            account.AccountType  = ewhAccount.AccountType;
            account.Info         = ewhAccount.Info;
            account.Password     = ewhAccount.Password;
            account.PasswordSalt = ewhAccount.PasswordSaft;
            account.Status       = ewhAccount.Status;
            account.UserName     = ewhAccount.UserName;
            account.Websites     = ewhAccount.Websites;

            return(account);
        }
Beispiel #9
0
        public bool CreateAccount(AddAccountDto dto)
        {
            var ewhAccount = entityFactory.InitAccount();
            var check      = false;

            if (ewhAccount.Create(dto))
            {
                check           = true;
                EwhAccountAdded = ewhAccount;
            }
            SyncStatus(this, ewhAccount);
            return(check);
        }
 public AccountDetailDto(EwhAccount entity) : base(entity)
 {
     this.Websites = entity.Websites;
 }
 public AccountInfoCanAccessWebsiteDto(EwhAccount entity, string websiteId) : base(entity)
 {
     this.AccessLevels = entity.Websites.Where(x => x.WebsiteId == websiteId).Select(x => x.AccessLevels).FirstOrDefault();
 }
Beispiel #12
0
        public AddAccountDto ToEntity(AddAccountDto dto, EwhAccount ewhAccount)
        {
            dto.AccountType = ewhAccount.AccountType;

            return(dto);
        }
Beispiel #13
0
 public bool CreateAccount(EwhAccount account)
 {
     return(account.Create());
 }