public Objects.Account CreateAccount(string FriendlyName, string AccountSid) { Account acc = new Account() {FriendlyName=FriendlyName, ParentSid=AccountSid }; try { accountRepo.Add(acc); } catch (Exception ex) { acc = new Account(); } return acc; }
public Account CreateAccount(string FriendlyName) { Account acc = new Account() { FriendlyName = FriendlyName}; try { accountRepo.Add(acc); } catch (Exception ex) { acc = new Account(); } return acc; }
public Objects.Account ChangeAccountStatus(string AccountSid, string Status) { var acc = GetAccount(AccountSid); acc.Status = Status; try { accountRepo.Update(acc); } catch (Exception ex) { acc = new Account(); } return acc; }
public Objects.Account ChangeAccountType(string AccountSid, string Type) { var acc = GetAccount(AccountSid); acc.Type = Type; ; try { accountRepo.Update(acc); } catch (Exception ex) { acc = new Account(); } return acc; }