public EwhAccount ToEntity(EwhAccount ewhAccount, AddAccountDto account) { ewhAccount.AccountType = account.AccountType; ewhAccount.UserName = account.UserName; ewhAccount.Info = account.Info; return(ewhAccount); }
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; }
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); }
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); }
public bool UpdateAccount(EwhAccount account) { if (account.Save()) { account.SelfSync(); return(true); } return(false); }
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); }
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(); }
public AddAccountDto ToEntity(AddAccountDto dto, EwhAccount ewhAccount) { dto.AccountType = ewhAccount.AccountType; return(dto); }
public bool CreateAccount(EwhAccount account) { return(account.Create()); }