private void button2_Click(object sender, EventArgs e) { prsnlduzletme frm = new prsnlduzletme(); frm.yeni = false; int id = (int)dataGridView1.SelectedRows[0].Cells[0].Value; frm.r = dataSet2.Personel.FindByper_id(id); if (frm.ShowDialog() == DialogResult.OK) { personelTableAdapter.Update(frm.r); } /* int id = (int)dataGridView1.SelectedRows[0].Cells[0].Value; * var duz_cari = (from x in db.calısan * where x.calısan_id == id * select x).FirstOrDefault(); * * * duz_cari.calısan_soyad = duz_cari.calısan_soyad.ToUpper(); * * db.SaveChanges(); * dataGridView1.DataSource = db.calısan.ToList();*/ }
private void button3_Click(object sender, EventArgs e) { prsnlduzletme frm = new prsnlduzletme(); frm.yeni = true; frm.r = dataSet2.Personel.NewPersonelRow(); if (frm.ShowDialog() == DialogResult.OK) { dataSet2.Personel.AddPersonelRow(frm.r); personelTableAdapter.Update(frm.r); } /*var personel = (from x in db.calısan * select new { adsoy = x.calısan_ad + " " + x.calısan_soyad.ToUpper(), }).ToList(); * * dataGridView1.DataSource = personel ;*/ }