Пример #1
0
}
$nivelAutorizacao = GetAuthorizationLevel($dataConnector->mysqlConnection, $functionalities["gerenciamentoContratos"]);
if ($nivelAutorizacao <= 1) {
    DisplayNotAuthorizedWarning();
    exit;
}
// Cria os objetos de mapeamento objeto-relacional
$contractDAO = new ContractDAO($dataConnector->mysqlConnection);
$contractDAO->showErrors = 1;
$subContractDAO = new SubContractDAO($dataConnector->mysqlConnection);
$subContractDAO->showErrors = 1;
$contractChargeDAO = new ContractChargeDAO($dataConnector->mysqlConnection);
$contractChargeDAO->showErrors = 1;
$contractBonusDAO = new ContractBonusDAO($dataConnector->mysqlConnection);
$contractBonusDAO->showErrors = 1;
$adjustmentRateDAO = new AdjustmentRateDAO($dataConnector->mysqlConnection);
$adjustmentRateDAO->showErrors = 1;
// Busca os dados do contrato
$contract = $contractDAO->RetrieveRecord($id);
// Busca o índice de reajuste
$adjustmentRate = $adjustmentRateDAO->RetrieveRecord($contract->indiceReajuste);
// Busca todos os subcontratos pertencentes ao contrato
$subContractArray = $subContractDAO->RetrieveRecordArray("contrato_id = " . $id);
?>

    <h1>Reajuste de contrato</h1><br/>
    <h1><?php 
echo str_pad('_', 52, '_', STR_PAD_LEFT);
?>
</h1>
    <div style="clear:both;">
Пример #2
0
 static function GetAlias($mysqlConnection, $id)
 {
     $alias = "";
     $adjustmentRateDAO = new AdjustmentRateDAO($mysqlConnection);
     $adjustmentRateDAO->showErrors = 1;
     $adjustmentRate = $adjustmentRateDAO->RetrieveRecord($id);
     if ($adjustmentRate != null) {
         $alias = $adjustmentRate->sigla;
     }
     return $alias;
 }
Пример #3
0
include_once "../../DataAccessObjects/AdjustmentRateDAO.php";
include_once "../../DataTransferObjects/AdjustmentRateDTO.php";
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('mySql');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
$nivelAutorizacao = GetAuthorizationLevel($dataConnector->mysqlConnection, $functionalities["gerenciamentoContratos"]);
if ($nivelAutorizacao <= 1) {
    DisplayNotAuthorizedWarning();
    exit;
}
// Cria o objeto de mapeamento objeto-relacional
$adjustmentRateDAO = new AdjustmentRateDAO($dataConnector->mysqlConnection);
$adjustmentRateDAO->showErrors = 1;
// Traz a lista de indices cadastrados
$adjustmentRateArray = $adjustmentRateDAO->RetrieveRecordArray();
?>
    <h1>Administração - Indices de reajuste</h1>
    <form id="fLista" name="fLista" action="Frontend/<?php 
echo $currentDir;
?>
/acao.php" method="post">
        <div class="clear">
            <fieldset>
                <legend>Ações:</legend>
                <a href="#" id="checkall" class="button" >
                    Todos
                </a>
Пример #4
0
include_once "../../DataAccessObjects/AdjustmentRateDAO.php";
include_once "../../DataTransferObjects/AdjustmentRateDTO.php";
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('mySql');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
$nivelAutorizacao = GetAuthorizationLevel($dataConnector->mysqlConnection, $functionalities["gerenciamentoContratos"]);
if ($nivelAutorizacao <= 1) {
    DisplayNotAuthorizedWarning();
    exit;
}
// Cria o objeto de mapeamento objeto-relacional
$adjustmentRateDAO = new AdjustmentRateDAO($dataConnector->mysqlConnection);
$adjustmentRateDAO->showErrors = 1;
$id = 0;
$adjustmentRate = new AdjustmentRateDTO();
if (isset($_REQUEST["id"]) && $_REQUEST["id"] != 0) {
    $id = $_REQUEST["id"];
    $adjustmentRate = $adjustmentRateDAO->RetrieveRecord($id);
}
?>

    <h1>Administração - Indice de Reajuste</h1>
    <form name="fDados" action="Frontend/<?php 
echo $currentDir;
?>
/acao.php" method="post" >
        <input type="hidden" name="acao" value="store" />
Пример #5
0
include_once "../../DataAccessObjects/AdjustmentRateDAO.php";
include_once "../../DataTransferObjects/AdjustmentRateDTO.php";
if (!isset($_REQUEST["acao"])) {
    echo "Erro no processamento da requisição.";
    exit;
}
$acao = $_REQUEST["acao"];
// Abre a conexao com o banco de dados
$dataConnector = new DataConnector('mySql');
$dataConnector->OpenConnection();
if ($dataConnector->mysqlConnection == null) {
    echo 'Não foi possível se connectar ao bando de dados!';
    exit;
}
// Cria o objeto de mapeamento objeto-relacional
$adjustmentRateDAO = new AdjustmentRateDAO($dataConnector->mysqlConnection);
$adjustmentRateDAO->showErrors = 1;
if ($acao == "store") {
    $id = 0;
    $adjustmentRate = new AdjustmentRateDTO();
    if (isset($_REQUEST["id"]) && $_REQUEST["id"] != 0) {
        $id = $_REQUEST["id"];
        $adjustmentRate = $adjustmentRateDAO->RetrieveRecord($id);
    }
    $adjustmentRate->sigla = $_REQUEST["sigla"];
    $adjustmentRate->nome = $_REQUEST["nome"];
    $adjustmentRate->aliquota = $_REQUEST["aliquota"];
    $recordId = $adjustmentRateDAO->StoreRecord($adjustmentRate);
    if ($recordId == null) {
        echo "Não foi possivel efetuar a operação...";
        exit;
Пример #6
0
     $newValue = $actionLog->valor;
     $checkBoxCaption = array("0" => "desmarcado", "1" => "marcado");
     if ($actionLog->propriedade == 'status') {
         $newValue = ContractDAO::GetStatusAsText($newValue);
     }
     if ($actionLog->propriedade == 'categoria') {
         $newValue = ContractDAO::GetCategoryAsText($newValue);
     }
     if ($actionLog->propriedade == 'vendedor') {
         $newValue = SalesPersonDAO::GetSalesPersonName($dataConnector->sqlserverConnection, $newValue);
     }
     if ($actionLog->propriedade == 'contato') {
         $newValue = ContactPersonDAO::GetContactPersonName($dataConnector->sqlserverConnection, $newValue);
     }
     if ($actionLog->propriedade == 'indiceReajuste') {
         $newValue = AdjustmentRateDAO::GetAlias($dataConnector->mysqlConnection, $newValue);
     }
     if ($actionLog->propriedade == 'global') {
         $newValue = $checkBoxCaption[$newValue];
     }
     $action = '<u>' . $actionLog->propriedade . '</u>' . ' alterado para ' . '&quot' . $newValue . '&quot';
     if ($actionLog->transacao == 'INSERT') {
         $action = "Contrato incluido no sistema";
     }
 }
 if ($actionLog->tipoObjeto == 'itemContrato') {
     $serialNumber = EquipmentDAO::GetSerialNumber($dataConnector->sqlserverConnection, $actionLog->idObjeto);
     if ($actionLog->transacao == 'INSERT') {
         $action = 'Equipamento ' . $serialNumber . ' adicionado ao contrato';
     }
     if ($actionLog->transacao == 'DELETE') {