private void button2_Click(object sender, EventArgs e)
        {
            if (bill_dgv.RowCount > 0 && cash_nud.Value >= Convert.ToDecimal(total))
            {
                TransactionControl.updateDatabase(bill_dgv, invoiceno_lbl.Text, Program.logged_id.ToString());
                PrintReceipt();
                invoiceno_lbl.Text = TransactionControl.genrateInvoiceNo().ToString();
                bill_dgv.Rows.Clear();
                total_lbl.ResetText();
                change_lbl.ResetText();
                if (parentCashierForm != null)
                {
                    parentCashierForm.parentButtonActivation(true);
                }
            }
            else if (cash_nud.Value < Convert.ToDecimal(total))
            {
                cash_nud.ResetText();
                MessageBox.Show("Insufficient Money", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }
            else
            {
                MessageBox.Show("Select Atleast One Product!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
            }

            // thic.close();
        }
 private void create_order_Load(object sender, EventArgs e)
 {
     load_dgv1();
     invoiceno_lbl.Text = TransactionControl.genrateInvoiceNo().ToString();
 }