示例#1
0
 public void DeleteInvoice(Guid id)
 {
     try
     {
         var invoiceBL = new InvoiceBL();
         invoiceBL.DeleteInvoice(id);
     }
     catch (Exception)
     {
         throw;
     }
 }
示例#2
0
        // 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);
        }
示例#3
0
        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);
        }
示例#4
0
        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);
        }