private void DataGridView1_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            try
            {
                this.Hide();
                DataGridViewRow dr  = DataGridView1.SelectedRows[0];
                frmSchoolinfo   frm = new frmSchoolinfo();
                frm.Show();
                frm.txtID.Text               = dr.Cells[0].Value.ToString();
                frm.txtSchoolName.Text       = dr.Cells[1].Value.ToString();
                frm.txtAddress.Text          = dr.Cells[2].Value.ToString();
                frm.txtContactNo.Text        = dr.Cells[3].Value.ToString();
                frm.txtFax.Text              = dr.Cells[4].Value.ToString();
                frm.txtEmailID.Text          = dr.Cells[5].Value.ToString();
                frm.txtWebsite.Text          = dr.Cells[6].Value.ToString();
                frm.lblUser.Text             = lblUser.Text;
                frm.lblUserType.Text         = lblUserType.Text;
                frm.btnUpdate_record.Enabled = true;
                frm.btnSave.Enabled          = false;
                frm.btnDelete.Enabled        = true;
            }

            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void SchooltoolStripMenuItem4_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmSchoolinfo frm = new frmSchoolinfo();

            frm.lblUser.Text     = User.Text;
            frm.lblUserType.Text = UserType.Text;
            frm.Show();
        }
        private void frmSchoolRecords_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            frmSchoolinfo frm = new frmSchoolinfo();

            frm.lblUserType.Text = lblUserType.Text;
            frm.lblUser.Text     = lblUser.Text;
            frm.Show();
        }