public void DeleteInvoice(Guid id) { try { var invoiceBL = new InvoiceBL(); invoiceBL.DeleteInvoice(id); } catch (Exception) { throw; } }
// DELETE: api/Unit/5 public ServerResponse Delete(string id) { var res = new ServerResponse(); using (InvoiceBL InvoiceBL = new InvoiceBL()) { try { res.Data = InvoiceBL.DeleteInvoice(id); } catch (Exception ex) { res.Success = false; } } return(res); }
public AjaxResult DeleteInvoice(Guid invoiceId) { var ajaxResult = new AjaxResult(); try { using (InvoiceBL invoiceBL = new InvoiceBL()) { invoiceBL.DeleteInvoice(invoiceId); ajaxResult.Success = true; } } catch (Exception) { ajaxResult.Success = false; ajaxResult.Messenger = "Có lỗi xảy ra khi xóa một hóa đơn. Vui lòng liên hệ MISA!"; } return(ajaxResult); }
public AjaxResult DeleteMultiInvoice(List <Guid> listInvoiceID) { var ajaxResult = new AjaxResult(); try { using (InvoiceBL invoiceBL = new InvoiceBL()) { foreach (var invoiceID in listInvoiceID) { invoiceBL.DeleteInvoice(invoiceID); } ajaxResult.Success = true; } } catch (Exception) { ajaxResult.Success = false; ajaxResult.Messenger = "Có lỗi xảy ra khi xóa nhiều hóa đơn. Vui lòng liên hệ MISA!"; } return(ajaxResult); }