Example #1
0
        public async Task <IActionResult> GetByHouseId(int houseId)
        {
            var cashFlows = await CashFlowRepository.GetByHouseId(houseId);

            //var VmcashFlows = Mapper.Map<IEnumerable<VmCashFlow>>(cashFlows);
            return(Ok(cashFlows));
        }
Example #2
0
        public async Task <IActionResult> GetByMonth(int month)
        {
            var cashFlows = await CashFlowRepository.GetByMonthAsync(month);

            var VmcashFlows = Mapper.Map <IEnumerable <VmCashFlow> >(cashFlows);

            return(Ok(VmcashFlows));
        }
Example #3
0
        public async Task <IActionResult> Post(CashFlow cashFlow)
        {
            cashFlow.CreationDate = DateTime.Now;
            await CashFlowRepository.AddAsync(cashFlow);

            await UnitOfWork.SaveAsync();

            return(Ok(new { code = 200 }));
        }
Example #4
0
        public Dashboard()
        {
            registry = new RepositoryRegistry();
            registry.Configure();

            accountRepository  = RepositoryFactory.GetObject <AccountRepository>(RepositoryId.ACCOUNT_REPOSITORY);
            cashFlowRepository = RepositoryFactory.GetObject <CashFlowRepository>(RepositoryId.CASHFLOW_REPOSITORY);
            chartRepository    = RepositoryFactory.GetObject <ChartRepository>(RepositoryId.CHART_REPOSITORY);
            settingRepository  = RepositoryFactory.GetObject <SettingRepository>(RepositoryId.SETTING_REPOSITORY);


            InitializeComponent();
        }