예제 #1
0
        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" }));
        }
예제 #2
0
 public void Update(ReceiptLiquidation receiptLiquidation)
 {
     try
     {
         _unitOfWork.ReceiptLiquidationRepository.Update(receiptLiquidation);
     }
     catch (Exception e)
     {
         _logger.LogError(e.Message, "update fail");
         throw;
     }
 }
예제 #3
0
 public void Add(ReceiptLiquidation receiptLiquidation)
 {
     try
     {
         _unitOfWork.ReceiptLiquidationRepository.Add(receiptLiquidation);
     }
     catch (Exception e)
     {
         _logger.LogError(e.Message, "add Fail");
         throw;
     }
 }
예제 #4
0
 public IActionResult CreateReceiptLiquidation([FromBody] ReceiptLiquidation model)
 {
     _receiptLiquidationService.Add(model);
     _receiptLiquidationService.Save();
     return(Json(new { data = model, message = "Đẫ thêm thành công!" }));
 }