예제 #1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     disciplines = service.GetAllDisciplines();
     rootInstructor.DataContext = instructor;
     if (type == WindowType.NewEntity)
     {
         this.Title = "Ny Instruktør";
     }
     else
     {
         this.Title = "Rediger Instruktør";
     }
     BindDisciplines();
 }
예제 #2
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";
            }
        }