Esempio n. 1
0
        public GetBudgetResponse GetBudget(GetBudgetRequest request)
        {
            var budget = _budgetServiceParams.BudgetRepository.GetBudgetById(request.BudgetId);
            GetBudgetResponse getBudgetResponse = new GetBudgetResponse();

            getBudgetResponse.Name = budget.Name;

            return(getBudgetResponse);
        }
Esempio n. 2
0
        public GetBudgetResponse ApiGetBudget(GetBudgetRequest GetBudgetRequest)
        {
            var GetBudgetResponse = new GetBudgetResponse();

            try
            {
                GetBudgetResponse = this.ExecuteApiGetBudget(GetBudgetRequest);
            }
            catch (Exception ex)
            {
                if (((HttpWebResponse)((WebException)ex.InnerException).Response).StatusCode == HttpStatusCode.Unauthorized)
                {
                    _apiAuthentication.GetToken(true);
                    GetBudgetResponse = this.ExecuteApiGetBudget(GetBudgetRequest);
                }
            }
            return(GetBudgetResponse);
        }