コード例 #1
0
ファイル: Invoice_Frame.cs プロジェクト: nazrulcse/epose
        private void voidInvoice_Click(object sender, EventArgs e)
        {
            DialogResult result = MessageDialog.Show("Delete Invoice!", "Are you sure want to delete invoice", "warning");

            if (result == DialogResult.Yes)
            {
                if (checkForInvoice())
                {
                    InvoiceItemModel invitem = new InvoiceItemModel();
                    invitem.delete(invitem, "invoice_id='" + this.inv.id + "'");
                    PaymentModel payment = new PaymentModel();
                    payment.delete(payment, "invoice_id='" + this.inv.id + "'");
                    inv.delete(this.inv);
                    resetInvoice(false);
                }
            }
        }