public IActionResult UpdateMedicine([FromBody] Invoice_DetailViewModel invoiceDetailVm)
 {
     if (!ModelState.IsValid)
     {
         IEnumerable <ModelError> allErrors = ModelState.Values.SelectMany(v => v.Errors);
         return(new BadRequestObjectResult(allErrors));
     }
     _invoiceDetailService.Update(invoiceDetailVm);
     _invoiceDetailService.SaveChanges();
     return(new OkObjectResult(invoiceDetailVm));
 }
Пример #2
0
        public void Update(Invoice_DetailViewModel Invoice_DetailVM)
        {
            var page = Mapper.Map <Invoice_DetailViewModel, Invoice_Detail>(Invoice_DetailVM);

            _Invoice_DetailRepository.Update(page);
        }
Пример #3
0
        public void Add(Invoice_DetailViewModel Invoice_DetailVM)
        {
            var model = Mapper.Map <Invoice_DetailViewModel, Invoice_Detail>(Invoice_DetailVM);

            _Invoice_DetailRepository.Add(model);
        }