private void Issue_Closing(object sender, FormClosingEventArgs e)
        {
            if (Transactions)
            {
                if (MessageBox.Show("Do you wish to print the transaction listing report?", "Print Transactions",
                                    MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes)
                {
                    // Cancel the Closing event
                    //================================================
                    e.Cancel = true;

                    YarnTOptions repOptions = new YarnTOptions();
                    repOptions.FromDate       = Convert.ToDateTime(dateTimePicker1.Value.ToShortDateString());
                    repOptions.ToDate         = Convert.ToDateTime(dateTimePicker1.Value.ToShortDateString());
                    repOptions.ReportSelected = 0;
                    repOptions.TransNumber    = 800;

                    frmViewReport vRep = new frmViewReport(13, repOptions);
                    int           h    = Screen.PrimaryScreen.WorkingArea.Height;
                    int           w    = Screen.PrimaryScreen.WorkingArea.Width;
                    vRep.ClientSize = new Size(w, h);
                    vRep.ShowDialog(this);
                    Transactions = false;
                }
            }
        }
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            Button oBtn = sender as Button;

            if (oBtn != null)
            {
                YarnTOptions repOptions = new YarnTOptions();
                repOptions.FromDate       = Convert.ToDateTime(dtpFromDate.Value.ToShortDateString());
                repOptions.ToDate         = Convert.ToDateTime(dtpToDate.Value.ToShortDateString());
                repOptions.ReportSelected = ReportSelected;

                if (radioButton1.Checked)
                {
                    repOptions.TransNumber = transNumber[0];
                }
                else if (radioButton2.Checked)
                {
                    repOptions.TransNumber = transNumber[1];
                }
                else if (radioButton3.Checked)
                {
                    repOptions.TransNumber = transNumber[2];
                }
                else if (radioButton4.Checked)
                {
                    repOptions.TransNumber = transNumber[3];
                }

                frmViewReport vRep = new frmViewReport(13, repOptions);
                int           h    = Screen.PrimaryScreen.WorkingArea.Height;
                int           w    = Screen.PrimaryScreen.WorkingArea.Width;
                vRep.ClientSize = new Size(w, h);
                vRep.ShowDialog(this);
            }
        }