Example #1
0
        public ResponseClientAccounts AccountsRequest(bool include_inactive, string identifier)
        {
            RequestClientAccounts  request  = new RequestClientAccounts(include_inactive, identifier);
            ResponseClientAccounts response = ResponseClientAccounts.ResponseToAllClients(request);

            return(response);
        }
Example #2
0
        public ResponseClientAccounts ClientAccounts(RequestClientAccounts requestClientAccounts)
        {
            ResponseClientAccounts objClientAccounts = new ResponseClientAccounts();
            string identifier;

            identifier = requestClientAccounts.Identifier;

            try
            {
                var accountTbl = entities.accountTables.ToList();
                foreach (accountTable item in accountTbl)
                {
                    if (item.IDENTIFIER == identifier)
                    {
                        Account tempAccount = new Account();
                        tempAccount.Account_Name  = item.ACCOUNT_NAME;
                        tempAccount.Account_State = item.ACCOUNT_STATE;
                        tempAccount.Account_Type  = item.ACCOUNT_TYPE;
                        tempAccount.Balance       = item.BALANCE;

                        objClientAccounts.Accounts.Add(tempAccount);
                    }
                }
                objClientAccounts.Success = true;
                objClientAccounts.Message = "Se han obtenido todas las cuentas del cliente!";
            }
            catch
            {
                objClientAccounts.Success = false;
                objClientAccounts.Message = "Este cliente no tiene cuentas";
            }

            return(objClientAccounts);
        }
Example #3
0
        public ResponseClientAccounts AllAccountsOfClient(string identifier, bool include_inactive)
        {
            RequestClientAccounts  c  = new RequestClientAccounts(include_inactive, identifier);
            ResponseClientAccounts ca = ResponseClientAccounts.ResponseToAllClients(c);

            return(ca);
        }