public static function generateSelect()
 {
     $statuses = InsertStatusDao::getAll();
     $html = "<select name=\"insertstatus\">";
     foreach ($statuses as $status) {
         $html = $html . $status->toOptionHTML();
     }
     $html = $html . "</select>";
     return $html;
 }
 private static function populateInsertionOrder($row)
 {
     $adRep;
     if (isset($row['AdRepId'])) {
         $adRep = AdRepDao::getAdRepByID($row['AdRepId']);
     } else {
         $adRep = AdRep::unassignedAdRep();
     }
     $client = ClientDao::getClientByID($row['ClientID']);
     $status = InsertStatusDao::getByID($row['StatusID']);
     if (isset($row['DesignStatusID'])) {
         $designStatus = DesignStatusDao::getByID($row['DesignStatusID']);
     } else {
         $designStatus = DesignStatus::emptyDesignStatus();
     }
     $billingStatus = BillingStatus::getStatusForName($row['BillingStatus']);
     return new InsertionOrder($row['InsertID'], $adRep, $client, $status, $designStatus, $billingStatus, $row['CreatedDate'], $row['UpdatedDate'], $row['InsertDate'], $row['Columns'], $row['Height'], $row['NumPlacements'], $row['Design'], $row['Color'], $row['NumInserts'], $row['Image']);
 }