private void button3_Click(object sender, RoutedEventArgs e) { Grqer g = context.Grqers.ToList()[index]; context.Grqers.Remove(g); context.SaveChanges(); }
private void button1_Click(object sender, RoutedEventArgs e) { Insert w2 = new Insert(); w2.Show(); w2.Closing += (object senderr, System.ComponentModel.CancelEventArgs ee) => { Grqer a = new Grqer(); a.vernagir = w2.textBox.Text; a.heghinak = w2.textBox1.Text; a.gin = int.Parse(w2.textBox2.Text); a.qanak = int.Parse(w2.textBox3.Text); context.Grqers.Add(a); context.SaveChanges(); }; }
private void button2_Click(object sender, RoutedEventArgs e) { Edit ed = new Edit(); Grqer g = context.Grqers.ToList()[index]; ed.textBox.Text = g.vernagir; ed.textBox1.Text = g.heghinak; ed.textBox2.Text = g.gin.ToString(); ed.textBox3.Text = g.qanak.ToString(); ed.Show(); ed.Closing += (object senderr, System.ComponentModel.CancelEventArgs ee) => { g.vernagir = ed.textBox.Text; g.heghinak = ed.textBox1.Text; g.gin += int.Parse(ed.textBox2.Text); g.qanak += int.Parse(ed.textBox3.Text); context.SaveChanges(); }; }