<?php
class importActions extends wtActions
{
    public function executeIndex()
    {
        return ViewResponse::NONE;
    }
    
    public function executeList()
    {
        $this->Titulo = "Proceso de Sincronizaci&oacute;n";
        $this->a_GrupoLinea = iImportData::get_grupo_linea();
        $this->a_Marca = iImportData::get_marca();
    }
    
    public function executeGrid()
    {
        $this->block = $this->getRequestParameter( 'block' );
        
        $this->a_DataRs     = iImportData::select_products( $this->getRequestParameterAll() );
        
        ViewResponse::getInstance()->setMethodAjax();
    }

    public function executeRequest()
    {
        $type = $this->getRequestParameter( 'type' );

        switch ( $type ) 
        {
            case 'load_line_prod':
                $value_id = $this->getRequestParameter( 'value_id' );

                $a_linea_prod = iImportData::get_linea_prod( $value_id );
                foreach ( $a_linea_prod as $key => $o_value ) 
                {
                    $a_data[$o_value->linea_prod_id] = $o_value->linea_prod_desc;
                }
                echo json_encode( $a_data );
                exit;
            break;
        }
    }
}