Exemple #1
0
 /**
  * @param int $groupId
  * @return AddressGroup
  */
 function SelectGroupById($groupId)
 {
     $group = null;
     if (!$this->_dbConnection->Execute($this->_commandCreator->SelectGroupById($groupId))) {
         return $group;
     }
     $row = $this->_dbConnection->GetNextRecord();
     if ($row) {
         $group = new AddressGroup();
         $group->Id = $groupId;
         $group->GroupStrId = $row->group_str_id;
         $group->IdUser = $row->id_user;
         $group->Name = $row->group_nm;
         $group->Email = $row->email;
         $group->Company = $row->company;
         $group->Street = $row->street;
         $group->City = $row->city;
         $group->State = $row->state;
         $group->Zip = $row->zip;
         $group->Country = $row->country;
         $group->Phone = $row->phone;
         $group->Fax = $row->fax;
         $group->Web = $row->web;
         $group->IsOrganization = (bool) $row->organization;
         $this->_dbConnection->FreeResult();
     }
     return $group;
 }