Ejemplo n.º 1
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            REQUEST req = new REQUEST
            {
                EMP_ID    = EMP.EMP_ID,
                NEW_EMAIL = tbNewEMail.Text
            };

            db.REQUEST.Add(req);
            db.SaveChanges();
        }
Ejemplo n.º 2
0
        private void Button_Click_1(object sender, RoutedEventArgs e)
        {
            REQUEST req = dg.SelectedItem as REQUEST;

            if (req == null)
            {
                return;
            }
            db.REQUEST.Remove(req);
            db.SaveChanges();
            dg.ItemsSource = db.REQUEST.ToList();
        }
Ejemplo n.º 3
0
        private void Button_Click(object sender, RoutedEventArgs e)
        {
            REQUEST req = dg.SelectedItem as REQUEST;

            if (req == null)
            {
                return;
            }
            EMPLOYEE emp = db.EMPLOYEE.Where(c => c.EMP_ID == req.EMP_ID).SingleOrDefault();

            emp.EMAIL = req.NEW_EMAIL;
            db.REQUEST.Remove(req);
            db.SaveChanges();
            dg.ItemsSource = db.REQUEST.ToList();
        }