Beispiel #1
0
 public UserDetailViewModel(TeamFoundationIdentity identity, IServiceProvider serviceProvider)
     : base(serviceProvider)
 {
     this.identity = identity;
     FillModelData();
     if (this.identity != null && !AllUsers.Contains(this.identity))
     {
         this.identity = AllUsers.FirstOrDefault(i => i.TeamFoundationId == this.identity.TeamFoundationId) ?? identity;
     }
 }
 /// <summary>
 /// We get all employees from DB and populates list to display them.
 /// </summary>
 public async void DisplayEmployees()
 {
     if (AllEmployees.Count == 0)
     {
         AllEmployees = await ApiHelper.Instance.GetAllEmployees();
     }
     foreach (Person p in AllEmployees)
     {
         if (!AllUsers.Contains(p))
         {
             AllUsers.Add(p);
         }
     }
 }