コード例 #1
0
 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);
         }
     }
 }
コード例 #2
0
 public ProfileViewModel(Participant p)
 {
     Age = p.Age;
     Home = p.Home;
     Id = -1;
     ImagePath = p.ImagePath;
     Name = p.Name;
 }
コード例 #3
0
 public DropdownOption(Participant p)
 {
     Text = p.Name;
     Value = p.Id.ToString();
     DefaultSelected = false;
 }