Beispiel #1
0
        private void frmStudentRegistrationRecord2_FormClosing(object sender, FormClosingEventArgs e)
        {
            frmStudentRegistration frm = new frmStudentRegistration();

            this.Hide();
            frm.label1.Text = label5.Text;
            frm.label8.Text = label8.Text;
            frm.Show();
        }
        private void registrationToolStripMenuItem2_Click(object sender, EventArgs e)
        {
            this.Hide();
            frmStudentRegistration frm = new frmStudentRegistration();

            if (UserType.Text == "Admin")
            {
                frm.label1.Text = UserType.Text;

                frm.Show();
            }
            else
            {
                frm.label1.Text = UserType.Text;

                frm.Show();
            }
            frm.label8.Text = User.Text;
        }
Beispiel #3
0
 private void dataGridView3_RowHeaderMouseClick(object sender, DataGridViewCellMouseEventArgs e)
 {
     try
     {
         DataGridViewRow dr = dataGridView3.SelectedRows[0];
         this.Hide();
         frmStudentRegistration frm = new frmStudentRegistration();
         // or simply use column name instead of index
         //dr.Cells["id"].Value.ToString();
         frm.Show();
         frm.StudentName.Text       = dr.Cells[0].Value.ToString();
         frm.AdmissionNo.Text       = dr.Cells[1].Value.ToString();
         frm.DateOfAdmission.Text   = dr.Cells[2].Value.ToString();
         frm.FatherName.Text        = dr.Cells[3].Value.ToString();
         frm.MotherName.Text        = dr.Cells[4].Value.ToString();
         frm.Gender.Text            = dr.Cells[5].Value.ToString();
         frm.DOB.Text               = dr.Cells[6].Value.ToString();
         frm.Category.Text          = dr.Cells[7].Value.ToString();
         frm.Religion.Text          = dr.Cells[8].Value.ToString();
         frm.Session.Text           = dr.Cells[9].Value.ToString();
         frm.Address.Text           = dr.Cells[10].Value.ToString();
         frm.ContactNo.Text         = dr.Cells[11].Value.ToString();
         frm.Email.Text             = dr.Cells[12].Value.ToString();
         frm.Course.Text            = dr.Cells[13].Value.ToString();
         frm.Branch.Text            = dr.Cells[14].Value.ToString();
         frm.DocumentSubmitted.Text = dr.Cells[15].Value.ToString();
         frm.Nationality.Text       = dr.Cells[16].Value.ToString();
         frm.GuardianName.Text      = dr.Cells[17].Value.ToString();
         frm.GuardianAddress.Text   = dr.Cells[18].Value.ToString();
         frm.GuardianContactNo.Text = dr.Cells[19].Value.ToString();
         frm.HS.Text            = dr.Cells[20].Value.ToString();
         frm.HSYOP.Text         = dr.Cells[21].Value.ToString();
         frm.HSPercentage.Text  = dr.Cells[22].Value.ToString();
         frm.HSBoard.Text       = dr.Cells[23].Value.ToString();
         frm.HSS.Text           = dr.Cells[24].Value.ToString();
         frm.HSSYOP.Text        = dr.Cells[25].Value.ToString();
         frm.HSSPercentage.Text = dr.Cells[26].Value.ToString();
         frm.HSSBoard.Text      = dr.Cells[27].Value.ToString();
         frm.UG.Text            = dr.Cells[28].Value.ToString();
         frm.GYOP.Text          = dr.Cells[29].Value.ToString();
         frm.GPercentage.Text   = dr.Cells[30].Value.ToString();
         frm.GUniy.Text         = dr.Cells[31].Value.ToString();
         frm.PG.Text            = dr.Cells[32].Value.ToString();
         frm.PGYOP.Text         = dr.Cells[33].Value.ToString();
         frm.PGpercentage.Text  = dr.Cells[34].Value.ToString();
         frm.PGUniy.Text        = dr.Cells[35].Value.ToString();
         if (label5.Text == "Admin")
         {
             frm.label1.Text              = label5.Text;
             frm.btnDelete.Enabled        = true;
             frm.btnUpdate_record.Enabled = true;
         }
         else
         {
             frm.label1.Text              = label5.Text;
             frm.btnDelete.Enabled        = false;
             frm.btnUpdate_record.Enabled = false;
         }
         frm.label8.Text = label8.Text;
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }