Esempio n. 1
0
        private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            this.Visible = false;
            StudentReg f2 = new StudentReg();

            f2.btnupdate.Visible = true;
            f2.txtv.Visible      = false;
            f2.txtid1.Visible    = true;
            f2.btnsave.Visible   = false;
            f2.txtid1.text       = this.dataGridView1.CurrentRow.Cells[0].Value.ToString();
            f2.txtname.text      = this.dataGridView1.CurrentRow.Cells[1].Value.ToString();
            f2.txtsurname.text   = this.dataGridView1.CurrentRow.Cells[2].Value.ToString();
            f2.mrktxtdob.Text    = this.dataGridView1.CurrentRow.Cells[3].Value.ToString();
            f2.cmbgender.Text    = this.dataGridView1.CurrentRow.Cells[4].Value.ToString();
            f2.mrktxtcontct.Text = this.dataGridView1.CurrentRow.Cells[5].Value.ToString();
            f2.txtadd.Text       = this.dataGridView1.CurrentRow.Cells[6].Value.ToString();
            f2.txtourses.text    = this.dataGridView1.CurrentRow.Cells[7].Value.ToString();
            f2.cmbduration.Text  = this.dataGridView1.CurrentRow.Cells[8].Value.ToString();
            f2.cmbmoth.Text      = this.dataGridView1.CurrentRow.Cells[9].Value.ToString();
            f2.mrktxtdate.Text   = this.dataGridView1.CurrentRow.Cells[10].Value.ToString();
            f2.txtemail.text     = this.dataGridView1.CurrentRow.Cells[12].Value.ToString();
            // f2.pictureBox1.Image = this.dataGridView1.CurrentRow.Cells[12].Value as Image;

            f2.ShowDialog();
        }
Esempio n. 2
0
        private void btnrecord_Click(object sender, EventArgs e)
        {
            StudentReg stdreg = new StudentReg();

            stdreg.ShowDialog();
        }