コード例 #1
0
        private void dataGridView1_DoubleClick(object sender, EventArgs e)
        {
            // düzenlen/siline öğrencileri tabloda görüntüle
            ogrenciEkleSilForm updateDeleteStdf = new ogrenciEkleSilForm();

            updateDeleteStdf.textBoxID.Text            = dataGridView1.CurrentRow.Cells[0].Value.ToString();
            updateDeleteStdf.textBoxFname.Text         = dataGridView1.CurrentRow.Cells[1].Value.ToString();
            updateDeleteStdf.textBoxLname.Text         = dataGridView1.CurrentRow.Cells[2].Value.ToString();
            updateDeleteStdf.dateTimePickerBdate.Value = (DateTime)dataGridView1.CurrentRow.Cells[3].Value;

            //cinsiyet
            if (dataGridView1.CurrentRow.Cells[4].Value.ToString() == "Female")
            {
                updateDeleteStdf.radioButtonFemale.Checked = true;
            }

            updateDeleteStdf.textBoxPhone.Text   = dataGridView1.CurrentRow.Cells[5].Value.ToString();
            updateDeleteStdf.textBoxAddress.Text = dataGridView1.CurrentRow.Cells[6].Value.ToString();

            //fotoğraf
            byte[] pic;
            pic = (byte[])dataGridView1.CurrentRow.Cells[7].Value;
            MemoryStream picture = new MemoryStream(pic);

            updateDeleteStdf.pictureBoxStudentImage.Image = Image.FromStream(picture);
            updateDeleteStdf.Show();
        }
コード例 #2
0
        private void düzenleSilToolStripMenuItem_Click(object sender, EventArgs e)
        {
            ogrenciEkleSilForm ogrenciEkle = new ogrenciEkleSilForm();

            ogrenciEkle.Show(this);
        }