示例#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;
        }
示例#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;
        }
示例#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;
        }
示例#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;
        }