Exemple #1
0
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            rootFitnessClass.DataContext = fitnessClass;
            cmbDisciplines.ItemsSource   = service.GetAllDisciplines();
            cmbInstructor.ItemsSource    = service.GetAllInstructors();
            cmbGym.ItemsSource           = service.GetAllGyms();
            string content = "Sal ";

            if (fitnessClass.Gym != null)
            {
                content += "Sal (max " + fitnessClass.Gym.MaxCapacity + ")";
            }
            lblGym.Content = content; //binding skift farve?
            if (type == WindowType.NewEntity)
            {
                this.Title = "Ny Fitnesstime";
            }
            else
            {
                this.Title = "Rediger Fitnesstime";
            }
        }