public ParticipantWelcomeViewModel(Participant p)
 {
     OpenSessions = new Dictionary<string, int>();
     this.Age = p.Age;
     this.Home = p.Home;
     this.Id = p.Id;
     this.ImagePath = p.ImagePath;
     this.Name = p.Name;
     this.Username = p.Username;
     foreach(var session in p.Sessions)
     {
         if (!session.Completed)
         {
             OpenSessions.Add(session.Name, session.Id);
         }
     }
 }
 public ProfileViewModel(Participant p)
 {
     Age = p.Age;
     Home = p.Home;
     Id = -1;
     ImagePath = p.ImagePath;
     Name = p.Name;
 }
Exemplo n.º 3
0
 public DropdownOption(Participant p)
 {
     Text = p.Name;
     Value = p.Id.ToString();
     DefaultSelected = false;
 }