Example #1
0
        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;
        }
Example #2
0
        public Account CreateAccount(string FriendlyName)
        {
            Account acc = new Account() { FriendlyName = FriendlyName};
            try
            {
                accountRepo.Add(acc);
            }
            catch (Exception ex)
            {
                acc = new Account();
            }

            return acc;
        }
Example #3
0
        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;
        }
Example #4
0
        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;
        }