Example #1
0
        private void settle_b_Click(object sender, EventArgs e)
        {
            frmPayment pay = new frmPayment(invoiceNo, totalAmount, Money_Debt, accType.Text, accNo.Text, "frmPOS");

            pay.ShowDialog();

            /// After Payment  control will get here
            /// Control will add Payment to dataBase and after that transactions and transactiondetails
            /// Control will then Print Reciept from last Entry

            if (SQLConn.payment == "yes")
            {
                addTransactions();
                addTransactionsDetails();
                frmPrint pri = new frmPrint(invoiceNo, "frmPOS");
                pri.ShowDialog();
                SQLConn.payment = "";
                if (Interaction.MsgBox("Do you want to perform another transaction?", MsgBoxStyle.YesNo, "New Transaction.") == MsgBoxResult.Yes)
                {
                    trans_b.PerformClick();
                }
                else
                {
                    this.Close();
                }
            }

            else
            {
            }
        }
Example #2
0
        private void button2_Click(object sender, EventArgs e)
        {
            stockreturn();

            //  foreach (ListViewItem eachItem in ListView1.CheckedItems)
            //{
            //     eachItem.Remove();
            // }

            // CallAll();
            frmPayment pay = new frmPayment(invoiceNo, totalAmount, Money_Debt, accType.Text, accidTxt.Text, "frmSReturn");

            pay.ShowDialog();


            if (SQLConn.payment == "yes")
            {
                addTransactions();
                addTransactionsDetails();
                frmPrint pri = new frmPrint(invoiceNo, "frmSReturn");
                pri.ShowDialog();
                SQLConn.payment = "";
                if (Interaction.MsgBox("Do you want to perform another transaction?", MsgBoxStyle.YesNo, "New Transaction.") == MsgBoxResult.Yes)
                {
                    clear_trans();
                }
                else
                {
                    this.Close();
                }
            }

            else
            {
            }
        }