示例#1
0
        private void button1_Click(object sender, RoutedEventArgs e)
        {
            Team team = new Team();
            team.ID = Guid.NewGuid();
            Win_Team win = new Win_Team(team);

            RanceEntities entites = new RanceEntities();
            entites.Team.AddObject(team);
            if (win.ShowDialog() == true)
            {
                save(entites, team);
                fresh();
            }
        }
示例#2
0
        private void button2_Click(object sender, RoutedEventArgs e)
        {
            Team team = this.grd_TeamMgt.SelectedItem as Team;
            if (team != null)
            {
                RanceEntities entites = new RanceEntities();
                team = load(entites, team);

                Win_Team win = new Win_Team(team);
                if (win.ShowDialog() == true)
                {
                    save(entites, team);
                    fresh();
                }
            }
        }