Ejemplo n.º 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
            {
            }
        }
Ejemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                if (textBox1.Text != "")
                {
                    int i = Convert.ToInt32(textBox1.Text);

                    SQLConn.sqL = "SELECT * FROM payment WHERE InvoiceNo LIKE '" + i + "'";
                    SQLConn.ConnDB();
                    SQLConn.cmd = new MySqlCommand(SQLConn.sqL, SQLConn.conn);
                    SQLConn.dr  = SQLConn.cmd.ExecuteReader();

                    if (SQLConn.dr.Read() == true)
                    {
                        frmPrint abcd = new frmPrint(i, "frmPOS");
                        abcd.ShowDialog();
                    }
                    else
                    {
                        MessageBox.Show("Error:Invalid InvoiceNo.");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message.ToString());
            }
            this.Close();
        }
Ejemplo n.º 3
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
            {
            }
        }