public JsonResult Delete(System.Int32 id) { RemovePosReceiptOfTestingRequest request = new RemovePosReceiptOfTestingRequest(); request.ReceiptOfTestingId = id; RemovePosReceiptOfTestingResponse response = _posReceiptOfTestingService.RemovePosReceiptOfTesting(request); return(Json(response)); }
public RemovePosReceiptOfTestingResponse RemovePosReceiptOfTesting(RemovePosReceiptOfTestingRequest request) { RemovePosReceiptOfTestingResponse response = new RemovePosReceiptOfTestingResponse(); response.Errors = new List <BusinessRule>(); try { if (_posReceiptOfTestingRepository.Remove(request.ReceiptOfTestingId) > 0) { response.PosReceiptOfTestingDeleted = true; } } catch (Exception ex) { response.Errors.Add(new BusinessRule("DAL", "DAL_ERROR: " + ex.Message)); } return(response); }