private void hostelersToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            this.Hide();
            Frmhosteler frm = new Frmhosteler();

            frm.lblUserType.Text = UserType.Text;
            frm.lblUser.Text     = User.Text;
            frm.Show();
        }
Ejemplo n.º 2
0
        private void frmHostelerRecords_FormClosing(object sender, FormClosingEventArgs e)
        {
            this.Hide();
            Frmhosteler frm = new Frmhosteler();

            frm.lblUserType.Text = lblUserType.Text;
            frm.lblUser.Text     = lblUser.Text;
            frm.Show();
        }
Ejemplo n.º 3
0
        private void dataGridView5_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
        {
            DataGridViewRow dr = dataGridView5.SelectedRows[0];

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

            // or simply use column name instead of index
            //dr.Cells["id"].Value.ToString();
            frm.Show();
            frm.AdmissionNo.Text    = dr.Cells[0].Value.ToString();
            frm.StudentName.Text    = dr.Cells[1].Value.ToString();
            frm.txtClass.Text       = dr.Cells[2].Value.ToString();
            frm.cmbsection.Text     = dr.Cells[3].Value.ToString();
            frm.cmbHostelName.Text  = dr.Cells[4].Value.ToString();
            frm.dtpJoiningDate.Text = dr.Cells[5].Value.ToString();

            frm.btnDelete.Enabled        = true;
            frm.btnUpdate_record.Enabled = true;
            frm.AdmissionNo.Focus();
            frm.lblUser.Text    = lblUser.Text;
            frm.btnSave.Enabled = false;
        }