Beispiel #1
0
 public void GetLeader()
 {
     if (this.WorshipLeaderID > 0)
     {
         return;
     }
     if (this.URL != String.Empty)
     {
         this.TeamURL = this.GetTeamURL();
         if (this.TeamURL != String.Empty)
         {
             dynamic teamMemberData = Utility.GetRequestObject(this.TeamURL);
             if (teamMemberData.data != null)
             {
                 foreach (dynamic itemDynamic in teamMemberData.data)
                 {
                     if (Array.IndexOf(PCOLeader.ValidPositions, itemDynamic.attributes.team_position_name) > -1)
                     {
                         PCOLeader thisLeader = new PCOLeader(itemDynamic);
                         // this.WorshipLeader = new PCOLeader(itemDynamic);
                         this.WorshipLeaderID = thisLeader.ID;
                         break;
                     }
                 }
             }
         }
     }
 }
Beispiel #2
0
 public static PCO.PCOLeader GetLeader(string leaderURL)
 {
     PCO.PCOLeader newLeader = null;
     if (leaderURL != String.Empty)
     {
         newLeader = new PCOLeader(Utility.GetRequestObject(leaderURL));
     }
     return(newLeader);
 }