public async Task <IHttpActionResult> DeleteReceipt(string id) { Receipt receipt = _SVC.GetReceipt(id); if (receipt == null) { return(NotFound()); } //if (_SVC.LookupOrder(new OrderQueryViewModel() { ReceiptNo = id }).Any(a => a.PurchaseNo.IsNotNullOrEmpty())) // return BadRequest("不可刪除已進貨交易"); await _SVC.DeleteReceipt(_SVC.GetReceipt(id)); return(Ok(receipt)); }
async public Task <ActionResult> Delete(string xTransNo) { return(Content(await _Service.DeleteReceipt(_Service.GetReceipt(xTransNo)))); }