Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once('class.dbaccess.php');
require_once('class.evento.php');
require_once('class.inscripcionestados.php');
require_once('class.filter.php');
require_once('class.page.php');
require_once('class.catalogo.php');
class Catalogos extends DBAccess implements IFilterable
{
public function ParseFilter(array $filter)
{
$sql = '';
if ($filter['Denominacion'] != "")
{
$sql.= " AND c.Denominacion LIKE '%" . DB::StringUnquoted($filter['Denominacion']) . "%'";
}
if ($filter['IdEvento'] != "")
{
$sql.= " AND c.IdEvento = " . DB::Number($filter['IdEvento']);
}
if (isset($filter['IdSexo']))
{
$sql.= " AND ia.Sexo = " . DB::Number($filter['IdSexo']);
}
if (isset($filter['Otonio']) && $filter['Otonio'] == 1)
{
$sql.= " AND ia.Otonio = 1";
}
if (isset($filter['FICCC']) && $filter['FICCC'] == 1)
{
$sql.= " AND ia.FICCC = 1";
}
if (isset($filter['IdEventosPruebasFuncional']) && $filter['IdEventosPruebasFuncional'] == 1)
{
$sql.= " AND iapf.IdEventosPruebasFuncional = " . DB::Number($filter['IdEventosPruebasFuncional']);
}
if (isset($filter['TipoAptitud']))
{
$sql.= " AND ec.TipoAptitud = " . DB::Bool($filter['TipoAptitud']);
}
return $sql;
}
public function GetPagesCount(Page $oPage, $filter = false)
{
$sql = " SELECT COUNT(1) / " . DB::Number($oPage->Size) . " AS Count ";
$sql.= " FROM tblCatalogo c ";
$sql.= " WHERE 1";
if ($filter)
$sql.= " " . $this->ParseFilter($filter);
if (!($oRes = $this->GetQuery($sql)) )
return false;
if ( !($oRow = $oRes->GetRow()) )
return false;
$Count = $oRow['Count'];
return ceil($Count);
}
public function GetAllCatalogoMorfologico(array $filter = NULL, Page $oPage = NULL)
{
$sql = " SELECT c.* ";
$sql.= " FROM tblCatalogo c";
$sql.= " INNER JOIN tblInscripcionAnimales ia ON c.IdEvento = ia.IdEvento AND c.IdAnimal = ia.IdAnimal AND c.Sba = ia.Sba";
$sql.= " LEFT JOIN tblEventosMorfologicosCategorias ec ON ia.IdEventosMorfologicosCategoria = ec.IdEventosMorfologicosCategoria OR ia.IdTipoAptitudCategoria = ec.IdEventosMorfologicosCategoria";
$sql.= " WHERE ec.IdEventosMorfologicosCategoria <> 0";
$sql.= " AND ec.IdEventosMorfologicosCategoria <> ''";
$sql.= " AND ec.IdEventosMorfologicosCategoria IS NOT NULL ";
$sql.= " AND ia.Estado <> 0";
if ($filter)
$sql.= $this->ParseFilter($filter);
$sql.= " GROUP BY c.Box ";
if (!$filter['TipoAptitud']) {
$sql.= " ORDER BY c.Box ASC ";
} else {
$sql.= " ORDER BY c.IdTipoAptitudCategoria ASC, c.FNac DESC ";
}
if ($oPage != NULL)
$sql.= " " . Pageable::ParsePage($oPage);
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetAllCatalogoMorfologicoFICCC(array $filter = NULL, Page $oPage = NULL)
{
$sql = " SELECT * ";
$sql.= " FROM tblCatalogo c";
$sql.= " INNER JOIN tblInscripcionAnimales ia ON c.IdEvento = ia.IdEvento AND c.IdAnimal = ia.IdAnimal";
$sql.= " WHERE c.IdEventosMorfologicosCategoria <> 0";
$sql.= " AND c.IdEventosMorfologicosCategoria <> ''";
$sql.= " AND c.IdEventosMorfologicosCategoria IS NOT NULL ";
$sql.= " AND ia.Estado <> 0";
if ($filter)
$sql.= $this->ParseFilter($filter);
$sql.= " ORDER BY c.IdEventosMorfologicosCategoria, c.FNac DESC, c.Box ASC ";
if ($oPage != NULL)
$sql.= " " . Pageable::ParsePage($oPage);
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetAllByIdPruebaFuncionalIdEvento($IdPruebaFuncional, $IdEvento, $Order = NULL)
{
$sql = " SELECT c.*,";
$sql.= " efp.Nombre AS PruebaFuncional,";
$sql.= " efpc.Nombre AS CategoriaFuncional";
$sql.= " FROM tblCatalogo c";
$sql.= " INNER JOIN tblInscripcionAnimales ia ON c.IdEvento = ia.IdEvento AND c.IdAnimal = ia.IdAnimal";
$sql.= " INNER JOIN tblInscripcionesAnimalesPruebasFuncionales iapf ON ia.IdInscripcion = iapf.IdInscripcion";
$sql.= " INNER JOIN tblEventosFuncionalesPruebas efp";
$sql.= " ON iapf.IdEventosFuncionalesPrueba = efp.IdEventosFuncionalesPrueba";
$sql.= " LEFT JOIN tblEventosFuncionalesPruebasCategorias efpc";
$sql.= " ON iapf.IdEventosFuncionalesPruebasCategoria = efpc.IdEventosFuncionalesPruebasCategoria";
$sql.= " WHERE iapf.IdEventosFuncionalesPrueba = " . $IdPruebaFuncional;
$sql.= " AND c.IdEvento = " . $IdEvento;
$sql.= " AND ia.Estado <> " . DB::Number(InscripcionEstados::Rechazada);
$sql.= " AND ia.Estado <> '0'";
$sql.= " AND iapf.Estado <> " . DB::Number(InscripcionEstados::Rechazada);
$sql.= " AND iapf.Estado <> '0'";
$sql.= " AND (iapf.ListaEspera = 0 OR iapf.ListaEspera IS NULL)";
//$sql.= " GROUP BY ia.Box ASC";
$sql.= " GROUP BY c.Box, efpc.IdEventosFuncionalesPruebasCategoria";
if ($Order)
{
switch ($Order)
{
case 'Posicion':
$sql.= " ORDER BY iapf.Posicion, iapf.IdInscripcionesAnimalesPruebasFuncional ASC";
break;
case 'Orden':
$sql.= " ORDER BY iapf.IdOrden, iapf.IdInscripcionesAnimalesPruebasFuncional ASC";
break;
case 'CategoriaFuncional':
$sql.= " ORDER BY iapf.IdEventosFuncionalesPruebasCategoria, ia.FNac DESC";
break;
case 'Sexo':
$sql.= " ORDER BY ia.Sexo = 2, ia.Sexo = 1, ia.Sexo = 0, ia.FNac DESC ";
break;
case 'SexoInv':
if ($IdPruebaFuncional != 5)
$sql.= " ORDER BY ia.Sexo = 1, ia.Sexo = 0, ia.Sexo = 2, ia.FNac DESC, c.BoxFreno ASC";
else
$sql.= " ORDER BY efpc.IdEventosFuncionalesPruebasCategoria, ia.Sexo = 1, ia.Sexo = 0, ia.Sexo = 2, ia.FNac DESC ";
break;
case 'Sexo2':
$sql.= " ORDER BY ia.Sexo DESC, ia.FNac DESC ";
break;
case 'Box':
if ($IdPruebaFuncional == 6 || $IdPruebaFuncional == 2 || $IdPruebaFuncional == 1)
$sql.= " ORDER BY efpc.IdEventosFuncionalesPruebasCategoria, ia.Box ";
else
$sql.= " ORDER BY c.Box ";
break;
case 'FNac':
$sql.= " ORDER BY ia.FNac DESC ";
break;
case 'Posicion':
$sql.= " ORDER BY iapf.Posicion DESC ";
break;
default:
$sql.= " ORDER BY iapf.IdInscripcionesAnimalesPruebasFuncional ASC";
break;
}
}
else
{
if ($IdPruebaFuncional == 6)
$sql.= " ORDER BY efpc.IdEventosFuncionalesPruebasCategoria, ia.Box ";
else
{
//$sql.= " ORDER BY iapf.IdInscripcionesAnimalesPruebasFuncional ASC";
$sql.= " ORDER BY ia.Sexo = 0, ia.Sexo = 2, ia.Sexo = 1, ia.FNac DESC";
}
}
// if ($IdPruebaFuncional == 5) {
// print_R($sql);exit;
// }
//$sql.= " ORDER BY iapf.IdInscripcionesAnimalesPruebasFuncional";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetAllBoxesByIdEvento($IdEvento)
{
$sql = " SELECT * ";
$sql.= " FROM tblCatalogo ";
$sql.= " WHERE IdEvento = " . DB::Number($IdEvento);
$sql.= " GROUP BY Box ";
$sql.= " ORDER BY Box ";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetAllBoxesRemateByIdEvento($IdEvento)
{
$sql = " SELECT c.* ";
$sql.= " FROM tblCatalogo c";
$sql.= " INNER JOIN tblInscripcionAnimales ia ON c.IdEvento = ia.IdEvento AND c.IdAnimal = ia.IdAnimal AND c.Sba = ia.Sba";
$sql.= " WHERE c.IdEvento = " . DB::Number($IdEvento);
$sql.= " AND ia.Remate = 1";
$sql.= " ORDER BY c.Box ";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetByIdEventoBox($IdEvento, $Box)
{
$sql = " SELECT * ";
$sql.= " FROM tblCatalogo ";
$sql.= " WHERE IdEvento = " . DB::Number($IdEvento);
$sql.= " AND Box = " . DB::Number($Box);
if (!($oRes = $this->GetQuery($sql)))
return false;
if (!($oRow = $oRes->GetRow()))
return false;
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
return $oCatalogo;
}
public function GetByLastAnimal($IdAnimal, $Sba, $Rp)
{
$sql = " SELECT c.* ";
$sql.= " FROM tblCatalogo c";
$sql.= " WHERE IdAnimal = " . DB::Number($IdAnimal);
$sql.= " AND SBA = " . DB::String($Sba);
$sql.= " AND RP = " . DB::String($rp);
$sql.= " ORDER BY IdCatalogo DESC";
$sql.= " LIMIT 1";
if (!($oRes = $this->GetQuery($sql)))
return false;
if (!($oRow = $oRes->GetRow()))
return false;
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
return $oCatalogo;
}
public function GetAll(array $filter = NULL, Page $oPage = NULL)
{
$sql = " SELECT c.* ";
$sql.= " FROM tblCatalogo c";
$sql.= " INNER JOIN tblInscripcionAnimales ia ON c.IdEvento = ia.IdEvento AND c.IdAnimal = ia.IdAnimal AND c.Sba = ia.Sba";
$sql.= " LEFT JOIN tblInscripcionesAnimalesPruebasFuncionales iapf ON iapf.IdInscripcion = ia.IdInscripcion";
$sql.= " WHERE 1";
if ($filter)
$sql.= $this->ParseFilter($filter);
$sql.= " GROUP BY ia.IdInscripcion ";
$sql.= " ORDER BY Box ASC ";
if ($oPage != NULL)
$sql.= " " . Pageable::ParsePage($oPage);
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetByIdEvento($IdEvento)
{
$sql = " SELECT * ";
$sql.= " FROM tblCatalogo ";
$sql.= " WHERE IdEvento = $IdEvento ";
if (!($oRes = $this->GetQuery($sql)))
return false;
$arr = array();
while ($oRow = $oRes->GetRow())
{
$oCatalogo = new Catalogo();
$oCatalogo->ParseFromArray($oRow);
array_push($arr, $oCatalogo);
$oRes->MoveNext();
}
return $arr;
}
public function GetCountRows(array $filter = NULL)
{
$sql = "SELECT * ";
$sql.= " FROM tblCatalogo c";
$sql.= " WHERE 1";
if ($filter)
$sql.= $this->ParseFilter($filter);
if (!($oRes = $this->GetQuery($sql)))
return false;
$CountRows = $oRes->NumRows();
return $CountRows;
}
public function Create(Catalogo $oCatalogo)
{
$arr = array(
'IdEvento' => DB::Number($oCatalogo->IdEvento),
'IdAnimal' => DB::Number($oCatalogo->IdAnimal),
'Denominacion' => DB::String($oCatalogo->Denominacion),
'MorfologiaCategoria' => DB::String($oCatalogo->MorfologiaCategoria),
'IdEventosMorfologicosCategoria' => DB::Number($oCatalogo->IdEventosMorfologicosCategoria),
'Expositor' => DB::String($oCatalogo->Expositor),
'Cabania' => DB::String($oCatalogo->Cabania),
'Criador' => DB::String($oCatalogo->Criador),
'Lugar' => DB::String($oCatalogo->Lugar),
'SBA' => DB::Number($oCatalogo->SBA),
'RP' => DB::Number($oCatalogo->RP),
'FNac' => DB::Date($oCatalogo->FNac),
'Pelo' => DB::String($oCatalogo->Pelo),
'Gen' => DB::String($oCatalogo->Gen),
'Box' => DB::Number($oCatalogo->Box),
'NombreAnimal' => DB::String($oCatalogo->NombreAnimal),
'SBAP' => DB::Number($oCatalogo->SBAP),
'RPP' => DB::Number($oCatalogo->RPP),
'GenP' => DB::String($oCatalogo->GenP),
'PeloP' => DB::String($oCatalogo->PeloP),
'NombreP' => DB::String($oCatalogo->NombreP),
'SBAM' => DB::Number($oCatalogo->SBAM),
'RPM' => DB::Number($oCatalogo->RPM),
'GenM' => DB::String($oCatalogo->GenM),
'PeloM' => DB::String($oCatalogo->PeloM),
'NombreM' => DB::String($oCatalogo->NombreM),
'SBAPP' => DB::Number($oCatalogo->SBAPP),
'RPPP' => DB::Number($oCatalogo->RPPP),
'GenPP' => DB::String($oCatalogo->GenPP),
'PeloPP' => DB::String($oCatalogo->PeloPP),
'NombrePP' => DB::String($oCatalogo->NombrePP),
'SBAPM' => DB::Number($oCatalogo->SBAPM),
'RPPM' => DB::Number($oCatalogo->RPPM),
'GenPM' => DB::String($oCatalogo->GenPM),
'PeloPM' => DB::String($oCatalogo->PeloPM),
'NombrePM' => DB::String($oCatalogo->NombrePM),
'SBAMP' => DB::Number($oCatalogo->SBAMP),
'RPMP' => DB::Number($oCatalogo->RPMP),
'GenMP' => DB::String($oCatalogo->GenMP),
'PeloMP' => DB::String($oCatalogo->PeloMP),
'NombreMP' => DB::String($oCatalogo->NombreMP),
'SBAMM' => DB::Number($oCatalogo->SBAMM),
'RPMM' => DB::Number($oCatalogo->RPMM),
'GenMM' => DB::String($oCatalogo->GenMM),
'PeloMM' => DB::String($oCatalogo->PeloMM),
'NombreMM' => DB::String($oCatalogo->NombreMM),
'SBAPPP' => DB::Number($oCatalogo->SBAPPP),
'RPPPP' => DB::Number($oCatalogo->RPPPP),
'GenPPP' => DB::String($oCatalogo->GenPPP),
'PeloPPP' => DB::String($oCatalogo->PeloPPP),
'NombrePPP' => DB::String($oCatalogo->NombrePPP),
'SBAPPM' => DB::Number($oCatalogo->SBAPPM),
'RPPPM' => DB::Number($oCatalogo->RPPPM),
'GenPPM' => DB::String($oCatalogo->GenPPM),
'PeloPPM' => DB::String($oCatalogo->PeloPPM),
'NombrePPM' => DB::String($oCatalogo->NombrePPM),
'SBAPMP' => DB::Number($oCatalogo->SBAPMP),
'RPPMP' => DB::Number($oCatalogo->RPPMP),
'GenPMP' => DB::String($oCatalogo->GenPMP),
'PeloPMP' => DB::String($oCatalogo->PeloPMP),
'NombrePMP' => DB::String($oCatalogo->NombrePMP),
'SBAPMM' => DB::Number($oCatalogo->SBAPMM),
'RPPMM' => DB::Number($oCatalogo->RPPMM),
'GenPMM' => DB::String($oCatalogo->GenPMM),
'PeloPMM' => DB::String($oCatalogo->PeloPMM),
'NombrePMM' => DB::String($oCatalogo->NombrePMM),
'SBAMPP' => DB::Number($oCatalogo->SBAMPP),
'RPMPP' => DB::Number($oCatalogo->RPMPP),
'GenMPP' => DB::String($oCatalogo->GenMPP),
'PeloMPP' => DB::String($oCatalogo->PeloMPP),
'NombreMPP' => DB::String($oCatalogo->NombreMPP),
'SBAMPM' => DB::Number($oCatalogo->SBAMPM),
'RPMPM' => DB::Number($oCatalogo->RPMPM),
'GenMPM' => DB::String($oCatalogo->GenMPM),
'PeloMPM' => DB::String($oCatalogo->PeloMPM),
'NombreMPM' => DB::String($oCatalogo->NombreMPM),
'SBAMMP' => DB::Number($oCatalogo->SBAMMP),
'RPMMP' => DB::Number($oCatalogo->RPMMP),
'GenMMP' => DB::String($oCatalogo->GenMMP),
'PeloMMP' => DB::String($oCatalogo->PeloMMP),
'NombreMMP' => DB::String($oCatalogo->NombreMMP),
'SBAMMM' => DB::Number($oCatalogo->SBAMMM),
'RPMMM' => DB::Number($oCatalogo->RPMMM),
'GenMMM' => DB::String($oCatalogo->GenMMM),
'PeloMMM' => DB::String($oCatalogo->PeloMMM),
'NombreMMM' => DB::String($oCatalogo->NombreMMM),
'BoxFreno' => DB::Number($oCatalogo->BoxFreno),
'MorfologiaCategoriaTA' => DB::String($oCatalogo->MorfologiaCategoriaTA),
'IdTipoAptitudCategoria' => DB::Number($oCatalogo->IdTipoAptitudCategoria)
);
if (!$this->Insert('tblCatalogo', $arr))
return false;
return $oCatalogo;
}
public function Update(Catalogo $oCatalogo)
{
$where = " IdCatalogo = " . DB::Number($oCatalogo->IdCatalogo);
$arr = array(
'IdEvento' => DB::String($oCatalogo->IdEvento),
'IdAnimal' => DB::Number($oCatalogo->IdAnimal),
'Denominacion' => DB::String($oCatalogo->Denominacion),
'MorfologiaCategoria' => DB::String($oCatalogo->MorfologiaCategoria),
'IdEventosMorfologicosCategoria' => DB::String($oCatalogo->IdEventosMorfologicosCategoria),
'Expositor' => DB::String($oCatalogo->Expositor),
'Cabania' => DB::String($oCatalogo->Cabania),
'Criador' => DB::String($oCatalogo->Criador),
'Lugar' => DB::String($oCatalogo->Lugar),
'SBA' => DB::String($oCatalogo->SBA),
'RP' => DB::String($oCatalogo->RP),
'FNac' => DB::String($oCatalogo->FNac),
'Pelo' => DB::String($oCatalogo->Pelo),
'Gen' => DB::String($oCatalogo->Gen),
'Box' => DB::String($oCatalogo->Box),
'NombreAnimal' => DB::String($oCatalogo->NombreAnimal),
'SBAP' => DB::String($oCatalogo->SBAP),
'RPP' => DB::String($oCatalogo->RPP),
'GenP' => DB::String($oCatalogo->GenP),
'PeloP' => DB::String($oCatalogo->PeloP),
'NombreP' => DB::String($oCatalogo->NombreP),
'SBAM' => DB::String($oCatalogo->SBAM),
'RPM' => DB::String($oCatalogo->RPM),
'GenM' => DB::String($oCatalogo->GenM),
'PeloM' => DB::String($oCatalogo->PeloM),
'NombreM' => DB::String($oCatalogo->NombreM),
'SBAPP' => DB::String($oCatalogo->SBAPP),
'RPPP' => DB::String($oCatalogo->RPPP),
'GenPP' => DB::String($oCatalogo->GenPP),
'PeloPP' => DB::String($oCatalogo->PeloPP),
'NombrePP' => DB::String($oCatalogo->NombrePP),
'SBAPM' => DB::String($oCatalogo->SBAPM),
'RPPM' => DB::String($oCatalogo->RPPM),
'GenPM' => DB::String($oCatalogo->GenPM),
'PeloPM' => DB::String($oCatalogo->PeloPM),
'NombrePM' => DB::String($oCatalogo->NombrePM),
'SBAMP' => DB::String($oCatalogo->SBAMP),
'RPMP' => DB::String($oCatalogo->RPMP),
'GenMP' => DB::String($oCatalogo->GenMP),
'PeloMP' => DB::String($oCatalogo->PeloMP),
'NombreMP' => DB::String($oCatalogo->NombreMP),
'SBAMM' => DB::String($oCatalogo->SBAMM),
'RPMM' => DB::String($oCatalogo->RPMM),
'GenMM' => DB::String($oCatalogo->GenMM),
'PeloMM' => DB::String($oCatalogo->PeloMM),
'NombreMM' => DB::String($oCatalogo->NombreMM),
'SBAPPP' => DB::String($oCatalogo->SBAPPP),
'RPPPP' => DB::String($oCatalogo->RPPPP),
'GenPPP' => DB::String($oCatalogo->GenPPP),
'PeloPPP' => DB::String($oCatalogo->PeloPPP),
'NombrePPP' => DB::String($oCatalogo->NombrePPP),
'SBAPPM' => DB::String($oCatalogo->SBAPPM),
'RPPPM' => DB::String($oCatalogo->RPPPM),
'GenPPM' => DB::String($oCatalogo->GenPPM),
'PeloPPM' => DB::String($oCatalogo->PeloPPM),
'NombrePPM' => DB::String($oCatalogo->NombrePPM),
'SBAPMP' => DB::String($oCatalogo->SBAPMP),
'RPPMP' => DB::String($oCatalogo->RPPMP),
'GenPMP' => DB::String($oCatalogo->GenPMP),
'PeloPMP' => DB::String($oCatalogo->PeloPMP),
'NombrePMP' => DB::String($oCatalogo->NombrePMP),
'SBAPMM' => DB::String($oCatalogo->SBAPMM),
'RPPMM' => DB::String($oCatalogo->RPPMM),
'GenPMM' => DB::String($oCatalogo->GenPMM),
'PeloPMM' => DB::String($oCatalogo->PeloPMM),
'NombrePMM' => DB::String($oCatalogo->NombrePMM),
'SBAMPP' => DB::String($oCatalogo->SBAMPP),
'RPMPP' => DB::String($oCatalogo->RPMPP),
'GenMPP' => DB::String($oCatalogo->GenMPP),
'PeloMPP' => DB::String($oCatalogo->PeloMPP),
'NombreMPP' => DB::String($oCatalogo->NombreMPP),
'SBAMPM' => DB::String($oCatalogo->SBAMPM),
'RPMPM' => DB::String($oCatalogo->RPMPM),
'GenMPM' => DB::String($oCatalogo->GenMPM),
'PeloMPM' => DB::String($oCatalogo->PeloMPM),
'NombreMPM' => DB::String($oCatalogo->NombreMPM),
'SBAMMP' => DB::String($oCatalogo->SBAMMP),
'RPMMP' => DB::String($oCatalogo->RPMMP),
'GenMMP' => DB::String($oCatalogo->GenMMP),
'PeloMMP' => DB::String($oCatalogo->PeloMMP),
'NombreMMP' => DB::String($oCatalogo->NombreMMP),
'SBAMMM' => DB::String($oCatalogo->SBAMMM),
'RPMMM' => DB::String($oCatalogo->RPMMM),
'GenMMM' => DB::String($oCatalogo->GenMMM),
'PeloMMM' => DB::String($oCatalogo->PeloMMM),
'NombreMMM' => DB::String($oCatalogo->NombreMMM),
'BoxFreno' => DB::Number($oCatalogo->BoxFreno),
'MorfologiaCategoriaTA' => DB::String($oCatalogo->MorfologiaCategoriaTA),
'IdTipoAptitudCategoria' => DB::Number($oCatalogo->IdTipoAptitudCategoria)
);
if (!DBAccess::Update('tblCatalogos', $arr, $where))
return false;
return $oCatalogo;
}
public function DeleteByIdEvento($IdEvento)
{
if (!DBAccess::$db->Begin())
return false;
$where = " IdEvento = " . DB::Number($IdEvento);
if (!DBAccess::Delete('tblCatalogo', $where))
{
DBAccess::$db->Rollback();
return false;
}
DBAccess::$db->Commit();
return true;
}
}
?>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat