Ejemplo n.º 1
0
        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            JudgesAdd judgesAdd = new JudgesAdd(context);

            judgesAdd.ShowDialog();
            if (judgesAdd.NewJudge != null)
            {
                context.Judges.Local.Add(judgesAdd.NewJudge);
            }
            context.SaveChanges();
        }
Ejemplo n.º 2
0
        private void btnAddJudge_Click(object sender, RoutedEventArgs e)
        {
            JudgesAdd judgesAdd = new JudgesAdd(context);

            judgesAdd.ShowDialog();
            if (judgesAdd.NewJudge != null)
            {
                context.Judges.Local.Add(judgesAdd.NewJudge);
            }
            context.SaveChanges();
            cmbBoxJudges.ItemsSource = context.Judges.Local.OrderBy(p => p.JudgeLastName).ToList();
        }