Ejemplo n.º 1
0
 public PresentationViewModel()
 {
     PageTitle = "Add new Presentation";
     Presentation = new Model.Presentation { Id=0, Level = PresentationLevel.Level100.ToString().Replace("Level", "") };
     this.PresentationName = Presentation.Name;
     Description = Presentation.Description;
     Level = (PresentationLevel)Convert.ToInt32(Presentation.Level);
     mode = Mode.New;
 }
Ejemplo n.º 2
0
 private void GetEventPresentationsForSpeaker(int eventId, int personId)
 {
     BusyMessage = "Getting your Presentations...Please wait.";
     IsBusy = true;
     LoadOperation<Person> lo = context.Load(context.GetPersonWithPresentationsQuery(personId));
     lo.Completed += delegate
     {
         foreach (var p in lo.Entities)
         {
             foreach (var ps in p.PresentationSpeakers)
             {
                 EntitySpeakerPresentations.Add(ps.Presentation);
                 var presentation = new Model.Presentation
                 {
                     Id = ps.Presentation.Id,
                     Name = ps.Presentation.Name,
                     Description = ps.Presentation.Description,
                     Level = ps.Presentation.Level,
                     PresentationSpeakers = new ObservableCollection<PresentationSpeaker>(),
                     EventPresentations = new ObservableCollection<EventPresentation>(),
                     Files = new ObservableCollection<File>()
                 };
                 foreach (var speaker in ps.Presentation.PresentationSpeakers)
                 {
                     presentation.PresentationSpeakers.Add(speaker);
                 }
                 foreach (var eventPresentation in ps.Presentation.EventPresentations)
                 {
                     presentation.EventPresentations.Add(eventPresentation);
                 }
                 foreach (var file in ps.Presentation.Files)
                 {
                     presentation.Files.Add(file);
                 }
                 if (presentation.EventPresentations.Count > 0)
                 {
                     presentation.ApprovalStatus = ps.Presentation.EventPresentations.Where(e => e.EventId == App.Event.Id).FirstOrDefault().ApprovalStatus;
                 }
                 SpeakerPresentations.Add(presentation);
             }
         }
         if (SpeakerPresentations.Count > 0)
         {
             SelectedPresentation = SpeakerPresentations.FirstOrDefault();
         }
         IsBusy = false;
     };
 }
Ejemplo n.º 3
0
 public void EndEdit()
 {
     copyData = new Model.Presentation();
 }
Ejemplo n.º 4
0
        public void CancelEdit()
        {
            currentData = copyData;
            NotifyOfPropertyChange("");

        }
Ejemplo n.º 5
0
 public void BeginEdit()
 {
     copyData = currentData;
 }
Ejemplo n.º 6
0
      partial void Command_NewPresentation (CommandType commandType, object parameter, ref bool canExecute)
      {
         canExecute = true;
         if (CommandType.Execute == commandType)
         {
            ModelContext.ChangeTracker.Clear ();
            ModelContext.RunUntracked (() =>
               {
                  Presentation = new Model.Presentation (ModelContext);

                  Presentation.Update (null as BaseModelEntity);

                  Presentation.NewSlide ();
               });
         }
      }