private void btnGüncelle_Click(object sender, EventArgs e) { //conn.Open(); //string kayit kmt = new SqlCommand (" Update tbÜyeListesi set UyeAdı ='" ") //builder = new SqlCommandBuilder(da); //da.Update(ds, "tbÜyeListesi"); //MessageBox.Show("Güncellendi"); YeniKayıt ac = new YeniKayıt(); ac.Text = "Güncelle"; ac.txtUyeAdı.Text = dataGridView1.SelectedRows[0].Cells[1].Value.ToString(); ac.txtUyeAdı.Tag = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ac.txtUyeSoyadı.Text = dataGridView1.SelectedRows[0].Cells[2].Value.ToString(); ac.txtUyeSoyadı.Tag = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ac.txtOkul.Text = dataGridView1.SelectedRows[0].Cells[4].Value.ToString(); ac.txtOkul.Tag = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ac.txtMeslek.Text = dataGridView1.SelectedRows[0].Cells[5].Value.ToString(); ac.txtMeslek.Tag = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ac.dateTimePicker2.Text = dataGridView1.SelectedRows[0].Cells[6].Value.ToString(); ac.dateTimePicker2.Tag = dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ac.maskedTextBox2.Text = dataGridView1.SelectedRows[0].Cells[7].Value.ToString(); ac.maskedTextBox2.Tag = dataGridView1.SelectedRows[0].Cells[7].Value.ToString(); ac.ShowDialog(); DatagridYenile(); }
private void btnYeni_Click(object sender, EventArgs e) { conn.Open(); YeniKayıt ac = new YeniKayıt(); ac.ShowDialog(); conn.Close(); DatagridYenile(); }