Пример #1
0
        private void button2_Click(object sender, EventArgs e)
        {
            AnketV2Context db      = new AnketV2Context();
            var            eskihal = db.Sorular.Find(GelenSoru.SoruID);

            eskihal.SoruCumlesi     = txtSoruDuzenle.Text;
            db.Entry(eskihal).State = EntityState.Modified;
            db.SaveChanges();
            Form1 f = (Form1)Application.OpenForms["Form1"];

            f.SorulariYenile();
            f.CevapEkle();
            this.Close();
        }
Пример #2
0
        private void button1_Click(object sender, EventArgs e)
        {
            AnketV2Context db           = new AnketV2Context();
            var            duzenlenecek = db.Sorular.Find(GelenSoru.SoruID);

            duzenlenecek.SoruCumlesi     = textBox1.Text;
            db.Entry(duzenlenecek).State = EntityState.Modified;
            db.SaveChanges();
            Form1 f = (Form1)Application.OpenForms["Form1"];

            f.Form1_Load(sender, e);
            f.SorulariYenile();
            f.CevaplariYenile();
            this.Close();
        }