Esempio n. 1
0
        private void buttonCredit_Click(object sender, EventArgs e)
        {
            paymentType = "Credit";
            selectPaymentType();
            DialogResult dialogResult = MessageDialog.Show("Confirm Payment", "Are you want to make the payment By Credit?? ");

            if (dialogResult == DialogResult.Yes)
            {
                this.invoice_form.paymentCompleted();
                InvoiceModel invoice  = new InvoiceModel();
                var          response = invoice.update_attributeForSingleRow(invoice, "is_credit", "1", this.invoice.id);
                if (response != null)
                {
                    DialogResult result = MessageDialog.Show("Your Payment Complete!", "Do you want to close payment form?");
                    if (result == DialogResult.Yes)
                    {
                        this.Close();
                    }
                }
                else
                {
                    MessageDialog.ShowAlert("Payment Error!", "Unable to create payment, Please contact with admin!");
                }
            }
        }