public IActionResult Delete(int id) { ReceiptLiquidation receiptLiquidation = _receiptLiquidationService.GetById(id); receiptLiquidation.IsActive = false; _receiptLiquidationService.Update(receiptLiquidation); _receiptLiquidationService.Save(); return(Ok(new { message = "Xoa mem thanh cong" })); }
public void Update(ReceiptLiquidation receiptLiquidation) { try { _unitOfWork.ReceiptLiquidationRepository.Update(receiptLiquidation); } catch (Exception e) { _logger.LogError(e.Message, "update fail"); throw; } }
public void Add(ReceiptLiquidation receiptLiquidation) { try { _unitOfWork.ReceiptLiquidationRepository.Add(receiptLiquidation); } catch (Exception e) { _logger.LogError(e.Message, "add Fail"); throw; } }
public IActionResult CreateReceiptLiquidation([FromBody] ReceiptLiquidation model) { _receiptLiquidationService.Add(model); _receiptLiquidationService.Save(); return(Json(new { data = model, message = "Đẫ thêm thành công!" })); }