private void frmTransportationRecord_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmTrasportation frm = new frmTrasportation();

            frm.lblUserType.Text = lblUserType.Text;
            frm.lblUser.Text     = lblUser.Text;
            frm.Show();
        }
        private void transportationToolStripMenuItem1_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmTrasportation frm = new frmTrasportation();

            frm.lblUserType.Text = UserType.Text;
            frm.lblUser.Text     = User.Text;
            frm.Show();
        }
        private void dataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView1.SelectedRows[0];

            this.Hide();
            frmTrasportation frm = new frmTrasportation();

            // or simply use column name instead of index
            //dr.Cells["id"].Value.ToString();
            frm.Show();
            frm.txtRouteID.Text        = dr.Cells[0].Value.ToString();
            frm.txtSourceLocation.Text = dr.Cells[1].Value.ToString();
            frm.txtBusCharges.Text     = dr.Cells[2].Value.ToString();
            frm.lblUser.Text           = lblUser.Text;
            frm.lblUserType.Text       = lblUserType.Text;

            frm.btnDelete.Enabled        = true;
            frm.btnUpdate_record.Enabled = true;
            frm.btnSave.Enabled          = false;
            frm.txtSourceLocation.Focus();
            frm.label1.Text = label1.Text;
        }