コード例 #1
0
 /**
  * Construct a summary of the active season.
  *
  */
 function BuildInfoTable($swimteamid = null)
 {
     //  Alternate the row colors
     $this->set_alt_color_flag(true);
     $team = new SwimTeam();
     if (is_null($swimteamid)) {
         $swimteamid = $this->getSwimTeamId();
     }
     if (!is_null($swimteamid) || $team->SwimTeamExistsById($swimteamid)) {
         $team->LoadSwimTeamById($swimteamid);
         $this->add_row(html_b("Organization"), SDIFCodeTables::GetOrgCode($team->getOrgCode()));
         $this->add_row(html_b("Team Code"), $team->getTeamCode());
         $this->add_row(html_b("Team Name"), $team->getTeamName());
         $this->add_row(html_b("Team Name Abbreviation"), $team->getTeamNameAbrv());
         $this->add_row(html_b("Team Addresss 1"), $team->getTeamAddress1());
         $this->add_row(html_b("Team Addresss 2"), $team->getTeamAddress2());
         $this->add_row(html_b("City"), $team->getTeamCity());
         $this->add_row(html_b("State"), $team->getTeamState());
         $this->add_row(html_b("Postal Code"), $team->getTeamPostalCode());
         $this->add_row(html_b("Country"), SDIFCodeTables::GetCountryCode($team->getTeamCountryCode()));
         $this->add_row(html_b("Region"), SDIFCodeTables::GetRegionCode($team->getRegionCode()));
         $this->add_row(html_b("Team Code 5th Character"), $team->getTeamCode5());
     } else {
         $this->add_row("No swim team details available.");
     }
 }
コード例 #2
0
 /**
  * This method is called only the first time the form
  * page is hit.  This enables u to query a DB and 
  * pre populate the FormElement objects with data.
  *
  */
 function form_init_data()
 {
     $this->set_hidden_element_value('_action', FT_ACTION_UPDATE);
     $this->set_hidden_element_value('swimteamid', $this->getSwimTeamId());
     $swimteam = new SwimTeam();
     $swimteam->LoadSwimTeamById($this->getSwimTeamId());
     $this->set_element_value('Organization', $swimteam->getOrgCode());
     $this->set_element_value('Team Code', $swimteam->getTeamCode());
     $this->set_element_value('Team Name', $swimteam->getTeamName());
     $this->set_element_value('Team Name Abbreviation', $swimteam->getTeamNameAbrv());
     $this->set_element_value('Team Address 1', $swimteam->getTeamAddress1());
     $this->set_element_value('Team Address 2', $swimteam->getTeamAddress2());
     $this->set_element_value('Team City', $swimteam->getTeamCity());
     $this->set_element_value('Team State', $swimteam->getTeamState());
     $this->set_element_value('Team Postal Code', $swimteam->getTeamPostalCode());
     $this->set_element_value('Team Country', $swimteam->getTeamCountryCode());
     $this->set_element_value('Region', $swimteam->getRegionCode());
     $this->set_element_value('Team Code 5th Character', $swimteam->getTeamCode5());
 }