diff --git a/CarService/CarServiceWebApp/Controllers/HomeController.cs b/CarService/CarServiceWebApp/Controllers/HomeController.cs index aee65d5..c8ae70f 100644 --- a/CarService/CarServiceWebApp/Controllers/HomeController.cs +++ b/CarService/CarServiceWebApp/Controllers/HomeController.cs @@ -297,22 +297,7 @@ namespace CarServiceWebApp.Controllers [HttpPost] public IActionResult Attachment(int id, int selecteditem, int count) { - var existingAttachment = _itemForRepairLogic.ReadElement(new() { ItemId = selecteditem }); - if (existingAttachment == null) - { - _itemForRepairLogic.Create(new() { ItemId = selecteditem, RepairRequestId = id, Count = count }); - } - else - { - existingAttachment.Count = count; - _itemForRepairLogic.Update(new() - { - Id = existingAttachment.Id, - Count = existingAttachment.Count, - ItemId = existingAttachment.ItemId, - RepairRequestId = existingAttachment.RepairRequestId - }); - } + _itemForRepairLogic.Create(new() { ItemId = selecteditem, RepairRequestId = id, Count = count }); return Redirect($"~/Home/RepairRequest/{id}"); } [HttpGet] diff --git a/CarService/CarServiceWebApp/Files/ReportExcel.xlsx b/CarService/CarServiceWebApp/Files/ReportExcel.xlsx index ba50fc8..81e2bfd 100644 Binary files a/CarService/CarServiceWebApp/Files/ReportExcel.xlsx and b/CarService/CarServiceWebApp/Files/ReportExcel.xlsx differ diff --git a/CarService/CarServiceWebApp/Files/ReportPdf.pdf b/CarService/CarServiceWebApp/Files/ReportPdf.pdf index c189ae0..ec805d1 100644 Binary files a/CarService/CarServiceWebApp/Files/ReportPdf.pdf and b/CarService/CarServiceWebApp/Files/ReportPdf.pdf differ diff --git a/CarService/CarServiceWebApp/Files/ReportWord.docx b/CarService/CarServiceWebApp/Files/ReportWord.docx index aab1cd1..e0aeef4 100644 Binary files a/CarService/CarServiceWebApp/Files/ReportWord.docx and b/CarService/CarServiceWebApp/Files/ReportWord.docx differ