Your IP : 52.14.228.67


Current Path : /home/meharicl/www/recensement2/
Upload File :
Current File : /home/meharicl/www/recensement2/recensement_num_serie.php

<?php
//Include Common Files @1-1D4E9EF6
define("RelativePath", ".");
define("PathToCurrentPage", "/");
define("FileName", "recensement_num_serie.php");
include_once(RelativePath . "/Common.php");
include_once(RelativePath . "/Template.php");
include_once(RelativePath . "/Sorter.php");
include_once(RelativePath . "/Navigator.php");
//End Include Common Files

//Include Page implementation @2-11B45D65
include_once(RelativePath . "/top.php");
//End Include Page implementation

class clsGridgrdNumSerie { //grdNumSerie class @3-6FA8BB90

//Variables @3-6E51DF5A

    // Public variables
    public $ComponentType = "Grid";
    public $ComponentName;
    public $Visible;
    public $Errors;
    public $ErrorBlock;
    public $ds;
    public $DataSource;
    public $PageSize;
    public $IsEmpty;
    public $ForceIteration = false;
    public $HasRecord = false;
    public $SorterName = "";
    public $SorterDirection = "";
    public $PageNumber;
    public $RowNumber;
    public $ControlsVisible = array();

    public $CCSEvents = "";
    public $CCSEventResult;

    public $RelativePath = "";
    public $Attributes;

    // Grid Controls
    public $StaticControls;
    public $RowControls;
//End Variables

//Class_Initialize Event @3-E63851D2
    function clsGridgrdNumSerie($RelativePath, & $Parent)
    {
        global $FileName;
        global $CCSLocales;
        global $DefaultDateFormat;
        $this->ComponentName = "grdNumSerie";
        $this->Visible = True;
        $this->Parent = & $Parent;
        $this->RelativePath = $RelativePath;
        $this->Errors = new clsErrors();
        $this->ErrorBlock = "Grid grdNumSerie";
        $this->Attributes = new clsAttributes($this->ComponentName . ":");
        $this->DataSource = new clsgrdNumSerieDataSource($this);
        $this->ds = & $this->DataSource;
        $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
        if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
            $this->PageSize = 1000;
        else
            $this->PageSize = intval($this->PageSize);
        if ($this->PageSize > 1000)
            $this->PageSize = 1000;
        if($this->PageSize == 0)
            $this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<BR>Error: (CCS06) Invalid page size.</p>");
        $this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
        if ($this->PageNumber <= 0) $this->PageNumber = 1;

        $this->numero_serie_annee = new clsControl(ccsLabel, "numero_serie_annee", "numero_serie_annee", ccsText, "", CCGetRequestParam("numero_serie_annee", ccsGet, NULL), $this);
        $this->numero_serie_type = new clsControl(ccsLabel, "numero_serie_type", "numero_serie_type", ccsText, "", CCGetRequestParam("numero_serie_type", ccsGet, NULL), $this);
        $this->numero_serie_nombre = new clsControl(ccsLabel, "numero_serie_nombre", "numero_serie_nombre", ccsInteger, "", CCGetRequestParam("numero_serie_nombre", ccsGet, NULL), $this);
        $this->numero_serie_start = new clsControl(ccsLabel, "numero_serie_start", "numero_serie_start", ccsText, "", CCGetRequestParam("numero_serie_start", ccsGet, NULL), $this);
        $this->numero_serie_end = new clsControl(ccsLabel, "numero_serie_end", "numero_serie_end", ccsText, "", CCGetRequestParam("numero_serie_end", ccsGet, NULL), $this);
        $this->lblInfo = new clsControl(ccsLabel, "lblInfo", "lblInfo", ccsText, "", CCGetRequestParam("lblInfo", ccsGet, NULL), $this);
    }
//End Class_Initialize Event

//Initialize Method @3-90E704C5
    function Initialize()
    {
        if(!$this->Visible) return;

        $this->DataSource->PageSize = & $this->PageSize;
        $this->DataSource->AbsolutePage = & $this->PageNumber;
        $this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
    }
//End Initialize Method

//Show Method @3-AC4341AF
    function Show()
    {
        $Tpl = CCGetTemplate($this);
        global $CCSLocales;
        if(!$this->Visible) return;

        $this->RowNumber = 0;


        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);


        $this->DataSource->Prepare();
        $this->DataSource->Open();
        $this->HasRecord = $this->DataSource->has_next_record();
        $this->IsEmpty = ! $this->HasRecord;
        $this->Attributes->Show();

        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
        if(!$this->Visible) return;

        $GridBlock = "Grid " . $this->ComponentName;
        $ParentPath = $Tpl->block_path;
        $Tpl->block_path = $ParentPath . "/" . $GridBlock;


        if (!$this->IsEmpty) {
            $this->ControlsVisible["numero_serie_annee"] = $this->numero_serie_annee->Visible;
            $this->ControlsVisible["numero_serie_type"] = $this->numero_serie_type->Visible;
            $this->ControlsVisible["numero_serie_nombre"] = $this->numero_serie_nombre->Visible;
            $this->ControlsVisible["numero_serie_start"] = $this->numero_serie_start->Visible;
            $this->ControlsVisible["numero_serie_end"] = $this->numero_serie_end->Visible;
            $this->ControlsVisible["lblInfo"] = $this->lblInfo->Visible;
            while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) &&  ($this->HasRecord = $this->DataSource->has_next_record()))) {
                $this->RowNumber++;
                if ($this->HasRecord) {
                    $this->DataSource->next_record();
                    $this->DataSource->SetValues();
                }
                $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
                $this->numero_serie_annee->SetValue($this->DataSource->numero_serie_annee->GetValue());
                $this->numero_serie_type->SetValue($this->DataSource->numero_serie_type->GetValue());
                $this->numero_serie_nombre->SetValue($this->DataSource->numero_serie_nombre->GetValue());
                $this->numero_serie_start->SetValue($this->DataSource->numero_serie_start->GetValue());
                $this->numero_serie_end->SetValue($this->DataSource->numero_serie_end->GetValue());
                $this->Attributes->SetValue("rowNumber", $this->RowNumber);
                $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                $this->Attributes->Show();
                $this->numero_serie_annee->Show();
                $this->numero_serie_type->Show();
                $this->numero_serie_nombre->Show();
                $this->numero_serie_start->Show();
                $this->numero_serie_end->Show();
                $this->lblInfo->Show();
                $Tpl->block_path = $ParentPath . "/" . $GridBlock;
                $Tpl->parse("Row", true);
            }
        }
        else { // Show NoRecords block if no records are found
            $this->Attributes->Show();
            $Tpl->parse("NoRecords", false);
        }

        $errors = $this->GetErrors();
        if(strlen($errors))
        {
            $Tpl->replaceblock("", $errors);
            $Tpl->block_path = $ParentPath;
            return;
        }
        $Tpl->parse();
        $Tpl->block_path = $ParentPath;
        $this->DataSource->close();
    }
//End Show Method

//GetErrors Method @3-FDBF6ADD
    function GetErrors()
    {
        $errors = "";
        $errors = ComposeStrings($errors, $this->numero_serie_annee->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_type->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_nombre->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_start->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_end->Errors->ToString());
        $errors = ComposeStrings($errors, $this->lblInfo->Errors->ToString());
        $errors = ComposeStrings($errors, $this->Errors->ToString());
        $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
        return $errors;
    }
//End GetErrors Method

} //End grdNumSerie Class @3-FCB6E20C

class clsgrdNumSerieDataSource extends clsDBcnxRecensement {  //grdNumSerieDataSource Class @3-2734B564

//DataSource Variables @3-9017D0D2
    public $Parent = "";
    public $CCSEvents = "";
    public $CCSEventResult;
    public $ErrorBlock;
    public $CmdExecution;

    public $CountSQL;
    public $wp;


    // Datasource fields
    public $numero_serie_annee;
    public $numero_serie_type;
    public $numero_serie_nombre;
    public $numero_serie_start;
    public $numero_serie_end;
//End DataSource Variables

//DataSourceClass_Initialize Event @3-5196D747
    function clsgrdNumSerieDataSource(& $Parent)
    {
        $this->Parent = & $Parent;
        $this->ErrorBlock = "Grid grdNumSerie";
        $this->Initialize();
        $this->numero_serie_annee = new clsField("numero_serie_annee", ccsText, "");
        
        $this->numero_serie_type = new clsField("numero_serie_type", ccsText, "");
        
        $this->numero_serie_nombre = new clsField("numero_serie_nombre", ccsInteger, "");
        
        $this->numero_serie_start = new clsField("numero_serie_start", ccsText, "");
        
        $this->numero_serie_end = new clsField("numero_serie_end", ccsText, "");
        

    }
//End DataSourceClass_Initialize Event

//SetOrder Method @3-9788DA9E
    function SetOrder($SorterName, $SorterDirection)
    {
        $this->Order = "numero_serie_annee, numero_serie_id";
        $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, 
            "");
    }
//End SetOrder Method

//Prepare Method @3-14D6CD9D
    function Prepare()
    {
        global $CCSLocales;
        global $DefaultDateFormat;
    }
//End Prepare Method

//Open Method @3-8029E04D
    function Open()
    {
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
        $this->CountSQL = "SELECT COUNT(*)\n\n" .
        "FROM rec_numero_serie";
        $this->SQL = "SELECT * \n\n" .
        "FROM rec_numero_serie {SQL_Where} {SQL_OrderBy}";
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
        if ($this->CountSQL) 
            $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
        else
            $this->RecordsCount = "CCS not counted";
        $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
    }
//End Open Method

//SetValues Method @3-B6F1C89C
    function SetValues()
    {
        $this->numero_serie_annee->SetDBValue($this->f("numero_serie_annee"));
        $this->numero_serie_type->SetDBValue($this->f("numero_serie_type"));
        $this->numero_serie_nombre->SetDBValue(trim($this->f("numero_serie_nombre")));
        $this->numero_serie_start->SetDBValue($this->f("numero_serie_start"));
        $this->numero_serie_end->SetDBValue($this->f("numero_serie_end"));
    }
//End SetValues Method

} //End grdNumSerieDataSource Class @3-FCB6E20C

class clsGridgrdRecensement { //grdRecensement class @11-FBCC9EE1

//Variables @11-6E51DF5A

    // Public variables
    public $ComponentType = "Grid";
    public $ComponentName;
    public $Visible;
    public $Errors;
    public $ErrorBlock;
    public $ds;
    public $DataSource;
    public $PageSize;
    public $IsEmpty;
    public $ForceIteration = false;
    public $HasRecord = false;
    public $SorterName = "";
    public $SorterDirection = "";
    public $PageNumber;
    public $RowNumber;
    public $ControlsVisible = array();

    public $CCSEvents = "";
    public $CCSEventResult;

    public $RelativePath = "";
    public $Attributes;

    // Grid Controls
    public $StaticControls;
    public $RowControls;
//End Variables

//Class_Initialize Event @11-C64BAFE6
    function clsGridgrdRecensement($RelativePath, & $Parent)
    {
        global $FileName;
        global $CCSLocales;
        global $DefaultDateFormat;
        $this->ComponentName = "grdRecensement";
        $this->Visible = True;
        $this->Parent = & $Parent;
        $this->RelativePath = $RelativePath;
        $this->Errors = new clsErrors();
        $this->ErrorBlock = "Grid grdRecensement";
        $this->Attributes = new clsAttributes($this->ComponentName . ":");
        $this->DataSource = new clsgrdRecensementDataSource($this);
        $this->ds = & $this->DataSource;
        $this->PageSize = CCGetParam($this->ComponentName . "PageSize", "");
        if(!is_numeric($this->PageSize) || !strlen($this->PageSize))
            $this->PageSize = 10000;
        else
            $this->PageSize = intval($this->PageSize);
        if ($this->PageSize > 10000)
            $this->PageSize = 10000;
        if($this->PageSize == 0)
            $this->Errors->addError("<p>Form: Grid " . $this->ComponentName . "<BR>Error: (CCS06) Invalid page size.</p>");
        $this->PageNumber = intval(CCGetParam($this->ComponentName . "Page", 1));
        if ($this->PageNumber <= 0) $this->PageNumber = 1;

        $this->id = new clsControl(ccsLabel, "id", "id", ccsInteger, "", CCGetRequestParam("id", ccsGet, NULL), $this);
        $this->mehari_an = new clsControl(ccsLabel, "mehari_an", "mehari_an", ccsText, "", CCGetRequestParam("mehari_an", ccsGet, NULL), $this);
        $this->mehari_type = new clsControl(ccsLabel, "mehari_type", "mehari_type", ccsText, "", CCGetRequestParam("mehari_type", ccsGet, NULL), $this);
        $this->mehari_numero_serie = new clsControl(ccsLabel, "mehari_numero_serie", "mehari_numero_serie", ccsInteger, "", CCGetRequestParam("mehari_numero_serie", ccsGet, NULL), $this);
        $this->mehari_date_circulation = new clsControl(ccsLabel, "mehari_date_circulation", "mehari_date_circulation", ccsDate, $DefaultDateFormat, CCGetRequestParam("mehari_date_circulation", ccsGet, NULL), $this);
        $this->lblNumSerieGroup = new clsControl(ccsLabel, "lblNumSerieGroup", "lblNumSerieGroup", ccsText, "", CCGetRequestParam("lblNumSerieGroup", ccsGet, NULL), $this);
        $this->lblNumSerieOK = new clsControl(ccsLabel, "lblNumSerieOK", "lblNumSerieOK", ccsText, "", CCGetRequestParam("lblNumSerieOK", ccsGet, NULL), $this);
        $this->numero_serie_annee = new clsControl(ccsLabel, "numero_serie_annee", "numero_serie_annee", ccsText, "", CCGetRequestParam("numero_serie_annee", ccsGet, NULL), $this);
        $this->numero_serie_type = new clsControl(ccsLabel, "numero_serie_type", "numero_serie_type", ccsText, "", CCGetRequestParam("numero_serie_type", ccsGet, NULL), $this);
        $this->numero_serie_nombre = new clsControl(ccsLabel, "numero_serie_nombre", "numero_serie_nombre", ccsText, "", CCGetRequestParam("numero_serie_nombre", ccsGet, NULL), $this);
        $this->lblCompteur = new clsControl(ccsLabel, "lblCompteur", "lblCompteur", ccsText, "", CCGetRequestParam("lblCompteur", ccsGet, NULL), $this);
    }
//End Class_Initialize Event

//Initialize Method @11-90E704C5
    function Initialize()
    {
        if(!$this->Visible) return;

        $this->DataSource->PageSize = & $this->PageSize;
        $this->DataSource->AbsolutePage = & $this->PageNumber;
        $this->DataSource->SetOrder($this->SorterName, $this->SorterDirection);
    }
//End Initialize Method

//Show Method @11-465635FD
    function Show()
    {
        $Tpl = CCGetTemplate($this);
        global $CCSLocales;
        if(!$this->Visible) return;

        $this->RowNumber = 0;


        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeSelect", $this);


        $this->DataSource->Prepare();
        $this->DataSource->Open();
        $this->HasRecord = $this->DataSource->has_next_record();
        $this->IsEmpty = ! $this->HasRecord;
        $this->Attributes->Show();

        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShow", $this);
        if(!$this->Visible) return;

        $GridBlock = "Grid " . $this->ComponentName;
        $ParentPath = $Tpl->block_path;
        $Tpl->block_path = $ParentPath . "/" . $GridBlock;


        if (!$this->IsEmpty) {
            $this->ControlsVisible["id"] = $this->id->Visible;
            $this->ControlsVisible["mehari_an"] = $this->mehari_an->Visible;
            $this->ControlsVisible["mehari_type"] = $this->mehari_type->Visible;
            $this->ControlsVisible["mehari_numero_serie"] = $this->mehari_numero_serie->Visible;
            $this->ControlsVisible["mehari_date_circulation"] = $this->mehari_date_circulation->Visible;
            $this->ControlsVisible["lblNumSerieGroup"] = $this->lblNumSerieGroup->Visible;
            $this->ControlsVisible["lblNumSerieOK"] = $this->lblNumSerieOK->Visible;
            $this->ControlsVisible["numero_serie_annee"] = $this->numero_serie_annee->Visible;
            $this->ControlsVisible["numero_serie_type"] = $this->numero_serie_type->Visible;
            $this->ControlsVisible["numero_serie_nombre"] = $this->numero_serie_nombre->Visible;
            $this->ControlsVisible["lblCompteur"] = $this->lblCompteur->Visible;
            while ($this->ForceIteration || (($this->RowNumber < $this->PageSize) &&  ($this->HasRecord = $this->DataSource->has_next_record()))) {
                $this->RowNumber++;
                if ($this->HasRecord) {
                    $this->DataSource->next_record();
                    $this->DataSource->SetValues();
                }
                $Tpl->block_path = $ParentPath . "/" . $GridBlock . "/Row";
                $this->id->SetValue($this->DataSource->id->GetValue());
                $this->mehari_an->SetValue($this->DataSource->mehari_an->GetValue());
                $this->mehari_type->SetValue($this->DataSource->mehari_type->GetValue());
                $this->mehari_numero_serie->SetValue($this->DataSource->mehari_numero_serie->GetValue());
                $this->mehari_date_circulation->SetValue($this->DataSource->mehari_date_circulation->GetValue());
                $this->numero_serie_annee->SetValue($this->DataSource->numero_serie_annee->GetValue());
                $this->numero_serie_type->SetValue($this->DataSource->numero_serie_type->GetValue());
                $this->numero_serie_nombre->SetValue($this->DataSource->numero_serie_nombre->GetValue());
                $this->Attributes->SetValue("rowNumber", $this->RowNumber);
                $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeShowRow", $this);
                $this->Attributes->Show();
                $this->id->Show();
                $this->mehari_an->Show();
                $this->mehari_type->Show();
                $this->mehari_numero_serie->Show();
                $this->mehari_date_circulation->Show();
                $this->lblNumSerieGroup->Show();
                $this->lblNumSerieOK->Show();
                $this->numero_serie_annee->Show();
                $this->numero_serie_type->Show();
                $this->numero_serie_nombre->Show();
                $this->lblCompteur->Show();
                $Tpl->block_path = $ParentPath . "/" . $GridBlock;
                $Tpl->parse("Row", true);
            }
        }
        else { // Show NoRecords block if no records are found
            $this->Attributes->Show();
            $Tpl->parse("NoRecords", false);
        }

        $errors = $this->GetErrors();
        if(strlen($errors))
        {
            $Tpl->replaceblock("", $errors);
            $Tpl->block_path = $ParentPath;
            return;
        }
        $Tpl->parse();
        $Tpl->block_path = $ParentPath;
        $this->DataSource->close();
    }
//End Show Method

//GetErrors Method @11-BFCC4B2C
    function GetErrors()
    {
        $errors = "";
        $errors = ComposeStrings($errors, $this->id->Errors->ToString());
        $errors = ComposeStrings($errors, $this->mehari_an->Errors->ToString());
        $errors = ComposeStrings($errors, $this->mehari_type->Errors->ToString());
        $errors = ComposeStrings($errors, $this->mehari_numero_serie->Errors->ToString());
        $errors = ComposeStrings($errors, $this->mehari_date_circulation->Errors->ToString());
        $errors = ComposeStrings($errors, $this->lblNumSerieGroup->Errors->ToString());
        $errors = ComposeStrings($errors, $this->lblNumSerieOK->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_annee->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_type->Errors->ToString());
        $errors = ComposeStrings($errors, $this->numero_serie_nombre->Errors->ToString());
        $errors = ComposeStrings($errors, $this->lblCompteur->Errors->ToString());
        $errors = ComposeStrings($errors, $this->Errors->ToString());
        $errors = ComposeStrings($errors, $this->DataSource->Errors->ToString());
        return $errors;
    }
//End GetErrors Method

} //End grdRecensement Class @11-FCB6E20C

class clsgrdRecensementDataSource extends clsDBcnxRecensement {  //grdRecensementDataSource Class @11-A0E35979

//DataSource Variables @11-AA73060F
    public $Parent = "";
    public $CCSEvents = "";
    public $CCSEventResult;
    public $ErrorBlock;
    public $CmdExecution;

    public $CountSQL;
    public $wp;


    // Datasource fields
    public $id;
    public $mehari_an;
    public $mehari_type;
    public $mehari_numero_serie;
    public $mehari_date_circulation;
    public $numero_serie_annee;
    public $numero_serie_type;
    public $numero_serie_nombre;
//End DataSource Variables

//DataSourceClass_Initialize Event @11-910677A1
    function clsgrdRecensementDataSource(& $Parent)
    {
        $this->Parent = & $Parent;
        $this->ErrorBlock = "Grid grdRecensement";
        $this->Initialize();
        $this->id = new clsField("id", ccsInteger, "");
        
        $this->mehari_an = new clsField("mehari_an", ccsText, "");
        
        $this->mehari_type = new clsField("mehari_type", ccsText, "");
        
        $this->mehari_numero_serie = new clsField("mehari_numero_serie", ccsInteger, "");
        
        $this->mehari_date_circulation = new clsField("mehari_date_circulation", ccsDate, $this->DateFormat);
        
        $this->numero_serie_annee = new clsField("numero_serie_annee", ccsText, "");
        
        $this->numero_serie_type = new clsField("numero_serie_type", ccsText, "");
        
        $this->numero_serie_nombre = new clsField("numero_serie_nombre", ccsText, "");
        

    }
//End DataSourceClass_Initialize Event

//SetOrder Method @11-7AE3CF87
    function SetOrder($SorterName, $SorterDirection)
    {
        $this->Order = "numero_serie_annee, numero_serie_id, mehari_an, mehari_numero_serie";
        $this->Order = CCGetOrder($this->Order, $SorterName, $SorterDirection, 
            "");
    }
//End SetOrder Method

//Prepare Method @11-14D6CD9D
    function Prepare()
    {
        global $CCSLocales;
        global $DefaultDateFormat;
    }
//End Prepare Method

//Open Method @11-25767A35
    function Open()
    {
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeBuildSelect", $this->Parent);
        $this->CountSQL = "SELECT COUNT(*)\n\n" .
        "FROM rec_mehari INNER JOIN rec_numero_serie ON\n\n" .
        "rec_mehari.mehari_numero_serie_id = rec_numero_serie.numero_serie_id";
        $this->SQL = "SELECT numero_serie_annee, numero_serie_type, numero_serie_nombre, numero_serie_start, numero_serie_end, rec_mehari.* \n\n" .
        "FROM rec_mehari INNER JOIN rec_numero_serie ON\n\n" .
        "rec_mehari.mehari_numero_serie_id = rec_numero_serie.numero_serie_id {SQL_Where} {SQL_OrderBy}";
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "BeforeExecuteSelect", $this->Parent);
        if ($this->CountSQL) 
            $this->RecordsCount = CCGetDBValue(CCBuildSQL($this->CountSQL, $this->Where, ""), $this);
        else
            $this->RecordsCount = "CCS not counted";
        $this->query($this->OptimizeSQL(CCBuildSQL($this->SQL, $this->Where, $this->Order)));
        $this->CCSEventResult = CCGetEvent($this->CCSEvents, "AfterExecuteSelect", $this->Parent);
    }
//End Open Method

//SetValues Method @11-D3A3A992
    function SetValues()
    {
        $this->id->SetDBValue(trim($this->f("id")));
        $this->mehari_an->SetDBValue($this->f("mehari_an"));
        $this->mehari_type->SetDBValue($this->f("mehari_type"));
        $this->mehari_numero_serie->SetDBValue(trim($this->f("mehari_numero_serie")));
        $this->mehari_date_circulation->SetDBValue(trim($this->f("mehari_date_circulation")));
        $this->numero_serie_annee->SetDBValue($this->f("numero_serie_annee"));
        $this->numero_serie_type->SetDBValue($this->f("numero_serie_type"));
        $this->numero_serie_nombre->SetDBValue($this->f("numero_serie_nombre"));
    }
//End SetValues Method

} //End grdRecensementDataSource Class @11-FCB6E20C

//Initialize Page @1-887FA679
// Variables
$FileName = "";
$Redirect = "";
$Tpl = "";
$TemplateFileName = "";
$BlockToParse = "";
$ComponentName = "";
$Attributes = "";

// Events;
$CCSEvents = "";
$CCSEventResult = "";
$TemplateSource = "";

$FileName = FileName;
$Redirect = "";
$TemplateFileName = "recensement_num_serie.html";
$BlockToParse = "main";
$TemplateEncoding = "UTF-8";
$ContentType = "text/html";
$PathToRoot = "./";
$PathToRootOpt = "";
$Scripts = "|";
$Charset = $Charset ? $Charset : "utf-8";
//End Initialize Page

//Include events file @1-420AACFE
include_once("./recensement_num_serie_events.php");
//End Include events file

//Before Initialize @1-E870CEBC
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeInitialize", $MainPage);
//End Before Initialize

//Initialize Objects @1-793FBEEE
$DBcnxRecensement = new clsDBcnxRecensement();
$MainPage->Connections["cnxRecensement"] = & $DBcnxRecensement;
$Attributes = new clsAttributes("page:");
$Attributes->SetValue("pathToRoot", $PathToRoot);
$MainPage->Attributes = & $Attributes;

// Controls
$top = new clstop("", "top", $MainPage);
$top->Initialize();
$grdNumSerie = new clsGridgrdNumSerie("", $MainPage);
$grdRecensement = new clsGridgrdRecensement("", $MainPage);
$MainPage->top = & $top;
$MainPage->grdNumSerie = & $grdNumSerie;
$MainPage->grdRecensement = & $grdRecensement;
$grdNumSerie->Initialize();
$grdRecensement->Initialize();
$ScriptIncludes = "";
$SList = explode("|", $Scripts);
foreach ($SList as $Script) {
    if ($Script != "") $ScriptIncludes = $ScriptIncludes . "<script src=\"" . $PathToRoot . $Script . "\" type=\"text/javascript\"></script>\n";
}
$Attributes->SetValue("scriptIncludes", $ScriptIncludes);

BindEvents();

$CCSEventResult = CCGetEvent($CCSEvents, "AfterInitialize", $MainPage);

if ($Charset) {
    header("Content-Type: " . $ContentType . "; charset=" . $Charset);
} else {
    header("Content-Type: " . $ContentType);
}
//End Initialize Objects

//Initialize HTML Template @1-28F2FDD6
$CCSEventResult = CCGetEvent($CCSEvents, "OnInitializeView", $MainPage);
$Tpl = new clsTemplate($FileEncoding, $TemplateEncoding);
if (strlen($TemplateSource)) {
    $Tpl->LoadTemplateFromStr($TemplateSource, $BlockToParse, "UTF-8");
} else {
    $Tpl->LoadTemplate(PathToCurrentPage . $TemplateFileName, $BlockToParse, "UTF-8");
}
$Tpl->SetVar("CCS_PathToRoot", $PathToRoot);
$Tpl->block_path = "/$BlockToParse";
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeShow", $MainPage);
$Attributes->SetValue("pathToRoot", "");
$Attributes->Show();
//End Initialize HTML Template

//Execute Components @1-DC3EC8FB
$top->Operations();
//End Execute Components

//Go to destination page @1-B2A65033
if($Redirect)
{
    $CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
    $DBcnxRecensement->close();
    header("Location: " . $Redirect);
    $top->Class_Terminate();
    unset($top);
    unset($grdNumSerie);
    unset($grdRecensement);
    unset($Tpl);
    exit;
}
//End Go to destination page

//Show Page @1-7B62C230
$top->Show();
$grdNumSerie->Show();
$grdRecensement->Show();
$Tpl->block_path = "";
$Tpl->Parse($BlockToParse, false);
if (!isset($main_block)) $main_block = $Tpl->GetVar($BlockToParse);
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeOutput", $MainPage);
if ($CCSEventResult) echo $main_block;
//End Show Page

//Unload Page @1-13C321D9
$CCSEventResult = CCGetEvent($CCSEvents, "BeforeUnload", $MainPage);
$DBcnxRecensement->close();
$top->Class_Terminate();
unset($top);
unset($grdNumSerie);
unset($grdRecensement);
unset($Tpl);
//End Unload Page


?>