private void SetOurTeam() { EditTeam objOurTeam = new EditTeam("Our Team"); objOurTeam.gridAway.Visibility = Visibility.Hidden; gridControl.Children.Add(objOurTeam); }
private void SetOtherTeam() { EditTeam objOtherTeam = new EditTeam("Other Team"); objOtherTeam.gridhome.Visibility = Visibility.Hidden; gridControl.Children.Add(objOtherTeam); }
private void EditTeam() { if (lstTeam.SelectedIndex == -1) { MessageBox.Show("please select one team!"); return; } string lstSelect = (lstTeam.SelectedItem as ListBoxItem).Content.ToString(); switch (lstSelect) { case "OtherTeam(OtherTeam)": EditTeam objOtherTeam = new EditTeam("Other Team"); objOtherTeam.gridhome.Visibility = Visibility.Hidden; gridControl.Children.Add(objOtherTeam); break; case "OurTeam(OurTeam)": EditTeam objOurTeam = new EditTeam("Our Team"); objOurTeam.gridAway.Visibility = Visibility.Hidden; gridControl.Children.Add(objOurTeam); break; } }