Example #1
0
        private void addNewToolStripMenuItem5_Click(object sender, EventArgs e)
        {
            prisonerdetails frm = new prisonerdetails();

            frm.MdiParent = this;
            frm.Show();
        }
Example #2
0
        private void DataGridView3_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            if (p1 == 0)
            {
                prisonerdetails r = null;

                foreach (Form f in Application.OpenForms)
                {
                    if (f is prisonerdetails)
                    {
                        r = (prisonerdetails)f;
                        break;
                    }
                }

                if (r == null)
                {
                    return;
                }

                DataGridViewRow row = DataGridView3.Rows[e.RowIndex];


                r.label7.Text    = row.Cells[0].Value.ToString();
                r.textBox1.Text  = row.Cells[1].Value.ToString();
                r.comboBox1.Text = row.Cells[2].Value.ToString();

                r.textBox2.Text = row.Cells[3].Value.ToString();
                r.textBox3.Text = row.Cells[4].Value.ToString();
                r.textBox4.Text = row.Cells[5].Value.ToString();
                r.textBox5.Text = row.Cells[6].Value.ToString();
                r.dpdob.Text    = row.Cells[7].Value.ToString();
                r.textBox6.Text = row.Cells[8].Value.ToString();

                r.groupBox1.Enabled = false;

                r.Button5.Enabled = true;
                r.Button6.Enabled = true;
                r.Button2.Enabled = false;

                this.Dispose();
            }
        }