Esempio n. 1
0
        public void Post([FromBody] Income values)
        {
            Income income = new Income(
                values.Description,
                values.Amount,
                values.StaffId
                );

            _incomeService.CreateIncome(income);
        }
        public ActionResult Create(IncomeEditModel incomeEditModel)
        {
            if (ModelState.IsValid)
            {
                var accountId = GetCurrentAccount();
                incomeEditModel.AccountId = accountId;

                _incomeService.CreateIncome(incomeEditModel);

                return(RedirectToAction("Index"));
            }

            return(View(incomeEditModel));
        }
Esempio n. 3
0
 public void CreateIncome([FromBody] IncomeDto item)
 {
     _incomeService.CreateIncome(item);
 }
        public async Task <IActionResult> CreateIncome(IncomeRequestModel model)
        {
            var income = await _incomeService.CreateIncome(model);

            return(Ok(income));
        }
Esempio n. 5
0
        public IActionResult CreateNewIncome(IncomeViewModel income)
        {
            _incomeService.CreateIncome(income);

            return(RedirectToAction("Index", "Budget"));
        }
 public void Post([FromBody] IncomeDetails createdObj)
 {
     _IncomeService.CreateIncome(createdObj);
 }