public ActionResult AddRepairBill(int repairId) { var viewModel = new RepairBillViewModel() { id_naprawy = repairId, id_faktury = -1//It's a new repair bill so no meaningful index yet. }; return(View("EditRepairBill", viewModel)); }
public void ConfirmRepairBillEdit(int repairBillId, int repairId, int billNumber, float billPayment, DateTime?billDate) { var newRepairBill = new RepairBillViewModel() { id_naprawy = repairId, id_faktury = repairBillId, cena = billPayment, data_platnosci = billDate, numer_faktury = billNumber }; repairBillService.AddOrEditRepairBill(ViewModelMapper.Mapper.Map <RepairBillModel>(newRepairBill)); }