private void button2_Click(object sender, EventArgs e)
 {
     if (ts_voucher_id == -1)
     {
         c.ErrorBox("No Voucher Found/Linked");
         return;
     }
     if (ts == 1)
     {
         DataTable            table   = c.getTableRows("Twist_Voucher", "Voucher_ID=" + ts_voucher_id);
         DataRow              voucher = table.Rows[0];
         M_V1_cartonTwistForm f       = new M_V1_cartonTwistForm(voucher, false, new M_V_history(1));
         f.deleteButton.Visible = false;
         f.StartPosition        = FormStartPosition.CenterScreen;
         f.Show();
     }
     if (ts == 2)
     {
         DataTable            table   = c.getTableRows("Sales_Voucher", "Voucher_ID=" + ts_voucher_id);
         DataRow              voucher = table.Rows[0];
         M_VC_cartonSalesForm f       = new M_VC_cartonSalesForm(voucher, false, new M_V_history(1), "Carton");
         f.deleteButton.Visible = false;
         f.StartPosition        = FormStartPosition.CenterScreen;
         f.Show();
     }
 }
        private void button6_Click(object sender, EventArgs e)
        {
            foreach (Form form in Application.OpenForms)
            {
                if (form.GetType() == typeof(M_VC_cartonSalesForm))
                {
                    form.WindowState = FormWindowState.Normal;
                    form.Activate();
                    return;
                }
            }
            M_VC_cartonSalesForm f = new M_VC_cartonSalesForm("Carton");

            Global.background.show_form(f);
        }
Example #3
0
        private void button6_Click(object sender, EventArgs e)
        {
            M_VC_cartonSalesForm f = new M_VC_cartonSalesForm("Carton");

            Global.background.show_form(f);
        }