コード例 #1
0
        public IList <PensionListModel> GetPensions(string userId)
        {
            IList <PensionListModel> result = null;

            using (var httpClient = new HttpClientExtended())
            {
                var response = httpClient.GetList <PersonalFinanceManager.DTOs.Pension.PensionList>($"/Pension/GetList/{userId}");
                result = response.Select(AutoMapper.Mapper.Map <PensionListModel>).ToList();
            }
            return(result);
        }
コード例 #2
0
        public IList <PaymentMethodListModel> GetPaymentMethods()
        {
            IList <PaymentMethodListModel> result = null;

            using (var httpClient = new HttpClientExtended())
            {
                var response = httpClient.GetList <PersonalFinanceManager.DTOs.PaymentMethod.PaymentMethodList>($"/PaymentMethod/GetList");
                result = response.Select(AutoMapper.Mapper.Map <PaymentMethodListModel>).ToList();
            }
            return(result);
        }
コード例 #3
0
        public IList <ExpenditureTypeListModel> GetExpenditureTypes()
        {
            IList <ExpenditureTypeListModel> result = null;

            using (var httpClient = new HttpClientExtended())
            {
                var response = httpClient.GetList <PersonalFinanceManager.DTOs.ExpenseType.ExpenseTypeList>($"/ExpenseType/GetList");
                result = response.Select(AutoMapper.Mapper.Map <ExpenditureTypeListModel>).ToList();
            }
            return(result);
        }
コード例 #4
0
        public IList <TaxListModel> GetTaxesByType(string currentUser, TaxType incomeTax)
        {
            IList <TaxListModel> result = null;

            using (var httpClient = new HttpClientExtended())
            {
                var taxTypeId = (int)TaxType.IncomeTax;
                var response  = httpClient.GetList <PersonalFinanceManager.DTOs.Tax.TaxList>($"/Tax/GetTaxesByType/{currentUser}/{taxTypeId}");
                result = response.Select(AutoMapper.Mapper.Map <TaxListModel>).ToList();
            }
            return(result);
        }