Пример #1
0
        public async Task <ActionResult> Create([Bind(Include = "Id,Month,Year,NamePayment")] Calculation calculation)
        {
            if (ModelState.IsValid)
            {
                APIcalculationDetailsController detailsController = new APIcalculationDetailsController();
                await detailsController.PostProcesscalculation(calculation);

                return(RedirectToAction("Details\\" + calculation.Id.ToString()));
            }

            return(View(calculation));
        }
Пример #2
0
 public async Task <ActionResult> Edit([Bind(Include = "Id,Month,Year,NamePayment")] Calculation calculation)
 {
     if (ModelState.IsValid)
     {
         APIcalculationDetailsController aPIcalculationDetailsController = new APIcalculationDetailsController();
         foreach (var item in aPIcalculationDetailsController.GetcalculationDetails())
         {
             item.DetailValue = item.Employe.Salary;
             await aPIcalculationDetailsController.PutcalculationDetail(item.Id, item);
         }
         return(RedirectToAction("Detail"));
     }
     return(View(calculation));
 }