<?php
class eventclass_socio  extends TableEventsBase {
	
	function init() {
		$this->events = array(
			'AfterAdd' => true,
			'AfterEdit' => true 
		);
		$this->fieldValues = array(
			'filterLimit' => array(
				 
			),
			'mapIcon' => array(
				 
			),
			'viewCustom' => array(
				 
			),
			'lookupWhere' => array(
				 
			),
			'viewFileText' => array(
				 
			),
			'defaultValue' => array(
				 
			),
			'autoUpdateValue' => array(
				 
			),
			'uploadFolder' => array(
				'foto_actual' => true,
				'foto_Ci' => true 
			),
			'viewPluginInit' => array(
				 
			),
			'editPluginInit' => array(
				 
			) 
		);
			}
		function AfterAdd( &$values, &$keys, $inline, $pageObject ) {
			$data = array();
	$keyvalues = array();
	$data["accionista"] = $values["id_Socio"];
	$keyvalues["id_derecho_Propietario"] = $values["id_dp"];
	
	DB::UPDATE("derecho_propietario", $data , $keyvalues );
	
	
	
	// Place event code here.
	// Use "Add Action" button to add code snippets.
			;
			
		}
	
		function AfterEdit( &$values, $where, &$oldvalues, &$keys, $inline, $pageObject ) {
			$data = array();
	$keyvalues = array();
	$data["accionista"] = $values["id_Socio"];
	$keyvalues["id_derecho_Propietario"] = $values["id_dp"];
	
	DB::UPDATE("derecho_propietario", $data , $keyvalues );
	
			;
			
		}
	public function folder_foto_actual( $file ) {
		$folder = ""
		;$folder = "files/imagen_cliente";
		;
		return $folder;
	}
	
	public function folder_foto_Ci( $file ) {
		$folder = ""
		;$folder = "files/ci";
		;
		return $folder;
	}	

}


?>