RDocumentoDinamicoBlocoTexto.class.php
6.75 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
<?php
/*
**********************************************************************************
* *
* @package URBEM CNM - Soluções em Gestão Pública *
* @copyright (c) 2013 Confederação Nacional de Municípos *
* @author Confederação Nacional de Municípios *
* *
* O URBEM CNM é um software livre; você pode redistribuí-lo e/ou modificá-lo sob *
* os termos da Licença Pública Geral GNU conforme publicada pela Fundação do *
* Software Livre (FSF - Free Software Foundation); na versão 2 da Licença. *
* *
* Este programa é distribuído na expectativa de que seja útil, porém, *
* SEM NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE OU *
* ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública Geral do GNU *
* para mais detalhes. *
* *
* Você deve ter recebido uma cópia da Licença Pública Geral do GNU "LICENCA.txt" *
* com este programa; se não, escreva para a Free Software Foundation Inc., *
* no endereço 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
* *
**********************************************************************************
*/
?>
<?php
/**
* Classe de regra de negócio PessoalPrevidencia
* Data de Criação: 06/04/2005
* @author Analista: Leandro Oliveira
* @author Desenvolvedor: Vandré Miguel Ramos
* @package URBEM
* @subpackage Regra
Casos de uso: uc-01.01.00
*/
include_once '../../../../../../gestaoAdministrativa/fontes/PHP/framework/include/valida.inc.php';
include_once ( CAM_GA_ADM_MAPEAMENTO."TDocumentoDinamicoBlocoTexto.class.php" );
include_once ( CAM_GA_ADM_MAPEAMENTO."TDocumentoDinamicoDocumentoBlocoTexto.class.php" );
class RDocumentoDinamicoBlocoTexto
{
/**
* @access Private
* @var Integer
*/
var $inCodBloco;
/**
* @access Private
* @var String
*/
var $stTexto;
/**
* @access Private
* @var String
*/
var $stAlinhamento;
/**
* @access Private
* @var Object
*/
var $obTDocumentoDinamicoBlocoTexto;
/**
* @access Private
* @var Object
*/
var $obTDocumentoDinamicoDocumentoBlocoTexto;
/**
* @access Private
* @var Object
*/
var $obTransacao;
/**
* @access Public
* @param Integer $Valor
*/
function setCodBloco($valor) { $this->inCodBloco = $valor; }
/**
* @access Public
* @param String $Valor
*/
function setTexto($valor) { $this->stTexto = $valor ; }
/**
* @access Public
* @param String $Valor
*/
function setAlinhamento($valor) { $this->stAlinhamento = $valor ; }
/**
* @access Public
* @param Object $Valor
*/
function setTDocumentoDinamicoBlocoTexto($valor) { $this->obTDocumentoDinamicoBlocoTexto = $valor ; }
/**
* @access Public
* @param Object $Valor
*/
function setTDocumentoDinamicoDocumentoBlocoTexto($valor) { $this->obTDocumentoDinamicoDocumentoBlocoTexto = $valor ; }
/**
* @access Public
* @param Integer $Valor
*/
function getCodBloco() { return $this->inCodBloco ; }
/**
* @access Public
* @param Integer $Valor
*/
function getTexto() { return $this->stTexto ; }
/**
* @access Public
* @param String $Valor
*/
function getAlinhamento() { return $this->stAlinhamento; }
function getTDocumentoDinamicoDocumento() { return $this->obTDocumentoDinamicoDocumento ; }
/**
* @access Public
* @return Object
*/
function getTDocumentoDinamicoTagBase() { return $this->obTDocumentoDinamicoTagBase ; }
/**
* @access Public
* @return Object
*/
function getTDocumentoDinamicoBlocoTexto() { return $this->obTDocumentoDinamicoBlocoTexto ; }
/**
* @access Public
* @param Object $Valor
*/
function RDocumentoDinamicoBlocoTexto(&$roDocumentoDinamicoDocumento)
{
$this->setTDocumentoDinamicoBlocoTexto ( new TDocumentoDinamicoBlocoTexto );
$this->setTDocumentoDinamicoDocumentoBlocoTexto ( new TDocumentoDinamicoDocumentoBlocoTexto);
$this->roDocumentoDinamicoDocumento = &$roDocumentoDinamicoDocumento;
$this->obTransacao = new Transacao;
}
/**
* Inclui os dados do bloco texto
* @access Public
* @param Object $obTransacao Parâmetro Transação
* @return Object Objeto Erro
*/
function incluirBloco($boTransacao = "")
{
$obErro = $this->obTDocumentoDinamicoBlocoTexto->proximoCod ( $this->inCodBloco, $boTransacao );
if ( !$obErro->ocorreu() ) {
$this->obTDocumentoDinamicoBlocoTexto->setDado ( "cod_bloco" , $this->inCodBloco );
$this->obTDocumentoDinamicoBlocoTexto->setDado ( "texto" , $this->stTexto );
$this->obTDocumentoDinamicoBlocoTexto->setDado ( "alinhamento" , $this->stAlinhamento);
$obErro = $this->obTDocumentoDinamicoBlocoTexto->inclusao ( $boTransacao );
// $this->obTDocumentoDinamicoBlocoTexto->debug();
if ( !$obErro->ocorreu ()) {
$this->obTDocumentoDinamicoDocumentoBlocoTexto->setDado ( "cod_documento" , $this->roDocumentoDinamicoDocumento->getCodDocumento());
$this->obTDocumentoDinamicoDocumentoBlocoTexto->setDado ( "cod_bloco" , $this->inCodBloco );
$obErro = $this->obTDocumentoDinamicoDocumentoBlocoTexto->inclusao($boTransacao);
// $this->obTDocumentoDinamicoDocumentoBlocoTexto->debug();
}
}
return $obErro;
}
/**
* Excluir os dados do bloco texto
* @access Public
* @param Object $obTransacao Parâmetro Transação
* @return Object Objeto Erro
*/
function excluirBloco($boTransacao = "")
{
$this->obTDocumentoDinamicoBlocoTexto->setDado ( "cod_bloco" , $this->inCodBloco );
$this->obTDocumentoDinamicoDocumentoBlocoTexto->setDado ( "cod_bloco" , $this->inCodBloco);
$this->obTDocumentoDinamicoDocumentoBlocoTexto->setDado ( "cod_documento" , $this->roDocumentoDinamicoDocumento->getCodDOcumento());
$obErro = $this->obTDocumentoDinamicoDocumentoBlocoTexto->exclusao($boTransacao);
// $this->obTDocumentoDinamicoDocumentoBlocoTexto->debug();
if (!$obErro->ocorreu()) {
$obErro = $this->obTDocumentoDinamicoBlocoTexto->exclusao($boTransacao);
// $this->obTDocumentoDinamicoBlocoTexto->debug();
}
return $obErro;
}
}