function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->importe->FormValue == $this->importe->CurrentValue && is_numeric(ew_StrToFloat($this->importe->CurrentValue))) {
         $this->importe->CurrentValue = ew_StrToFloat($this->importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id_deuda
     // detalle
     // importe
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id_deuda
         if (strval($this->id_deuda->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
             }
         } else {
             $this->id_deuda->ViewValue = NULL;
         }
         $this->id_deuda->ViewCustomAttributes = "";
         // detalle
         $this->detalle->ViewValue = $this->detalle->CurrentValue;
         $this->detalle->ViewCustomAttributes = "";
         // importe
         $this->importe->ViewValue = $this->importe->CurrentValue;
         $this->importe->ViewValue = ew_FormatCurrency($this->importe->ViewValue, 2, -2, -2, -2);
         $this->importe->ViewCustomAttributes = "";
         // id_deuda
         $this->id_deuda->LinkCustomAttributes = "";
         $this->id_deuda->HrefValue = "";
         $this->id_deuda->TooltipValue = "";
         // detalle
         $this->detalle->LinkCustomAttributes = "";
         $this->detalle->HrefValue = "";
         $this->detalle->TooltipValue = "";
         // importe
         $this->importe->LinkCustomAttributes = "";
         $this->importe->HrefValue = "";
         $this->importe->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // id_deuda
         $this->id_deuda->EditAttrs["class"] = "form-control";
         $this->id_deuda->EditCustomAttributes = "";
         if ($this->id_deuda->getSessionValue() != "") {
             $this->id_deuda->CurrentValue = $this->id_deuda->getSessionValue();
             $this->id_deuda->OldValue = $this->id_deuda->CurrentValue;
             if (strval($this->id_deuda->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                     $rswrk->Close();
                 } else {
                     $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
                 }
             } else {
                 $this->id_deuda->ViewValue = NULL;
             }
             $this->id_deuda->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_deuda->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["detalle_deudas"]->UserIDAllow("gridcls")) {
                 $sWhereWrk = $GLOBALS["deudas"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             $rowswrk = count($arwrk);
             for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
                 $arwrk[$rowcntwrk][3] = ew_FormatCurrency($arwrk[$rowcntwrk][3], 0, -2, -2, -2);
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_deuda->EditValue = $arwrk;
         }
         // detalle
         $this->detalle->EditAttrs["class"] = "form-control";
         $this->detalle->EditCustomAttributes = "";
         $this->detalle->EditValue = ew_HtmlEncode($this->detalle->CurrentValue);
         $this->detalle->PlaceHolder = ew_RemoveHtml($this->detalle->FldCaption());
         // importe
         $this->importe->EditAttrs["class"] = "form-control";
         $this->importe->EditCustomAttributes = "";
         $this->importe->EditValue = ew_HtmlEncode($this->importe->CurrentValue);
         $this->importe->PlaceHolder = ew_RemoveHtml($this->importe->FldCaption());
         if (strval($this->importe->EditValue) != "" && is_numeric($this->importe->EditValue)) {
             $this->importe->EditValue = ew_FormatNumber($this->importe->EditValue, -2, -2, -2, -2);
             $this->importe->OldValue = $this->importe->EditValue;
         }
         // Edit refer script
         // id_deuda
         $this->id_deuda->HrefValue = "";
         // detalle
         $this->detalle->HrefValue = "";
         // importe
         $this->importe->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id_deuda
         $this->id_deuda->EditAttrs["class"] = "form-control";
         $this->id_deuda->EditCustomAttributes = "";
         if ($this->id_deuda->getSessionValue() != "") {
             $this->id_deuda->CurrentValue = $this->id_deuda->getSessionValue();
             $this->id_deuda->OldValue = $this->id_deuda->CurrentValue;
             if (strval($this->id_deuda->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                     $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
                     $rswrk->Close();
                 } else {
                     $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
                 }
             } else {
                 $this->id_deuda->ViewValue = NULL;
             }
             $this->id_deuda->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_deuda->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["detalle_deudas"]->UserIDAllow("gridcls")) {
                 $sWhereWrk = $GLOBALS["deudas"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             $rowswrk = count($arwrk);
             for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
                 $arwrk[$rowcntwrk][3] = ew_FormatCurrency($arwrk[$rowcntwrk][3], 0, -2, -2, -2);
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_deuda->EditValue = $arwrk;
         }
         // detalle
         $this->detalle->EditAttrs["class"] = "form-control";
         $this->detalle->EditCustomAttributes = "";
         $this->detalle->EditValue = ew_HtmlEncode($this->detalle->CurrentValue);
         $this->detalle->PlaceHolder = ew_RemoveHtml($this->detalle->FldCaption());
         // importe
         $this->importe->EditAttrs["class"] = "form-control";
         $this->importe->EditCustomAttributes = "";
         $this->importe->EditValue = ew_HtmlEncode($this->importe->CurrentValue);
         $this->importe->PlaceHolder = ew_RemoveHtml($this->importe->FldCaption());
         if (strval($this->importe->EditValue) != "" && is_numeric($this->importe->EditValue)) {
             $this->importe->EditValue = ew_FormatNumber($this->importe->EditValue, -2, -2, -2, -2);
             $this->importe->OldValue = $this->importe->EditValue;
         }
         // Edit refer script
         // id_deuda
         $this->id_deuda->HrefValue = "";
         // detalle
         $this->detalle->HrefValue = "";
         // importe
         $this->importe->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #2
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // mes
     // anio
     // fecha
     // monto
     // id_usuario
     // id_socio
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewCustomAttributes = "";
         // mes
         $this->mes->ViewValue = $this->mes->CurrentValue;
         $this->mes->ViewCustomAttributes = "";
         // anio
         $this->anio->ViewValue = $this->anio->CurrentValue;
         $this->anio->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewValue = ew_FormatCurrency($this->monto->ViewValue, 0, -2, -2, -2);
         $this->monto->ViewCustomAttributes = "";
         // id_socio
         if (strval($this->id_socio->CurrentValue) != "") {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                 $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
             }
         } else {
             $this->id_socio->ViewValue = NULL;
         }
         $this->id_socio->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // mes
         $this->mes->LinkCustomAttributes = "";
         $this->mes->HrefValue = "";
         $this->mes->TooltipValue = "";
         // anio
         $this->anio->LinkCustomAttributes = "";
         $this->anio->HrefValue = "";
         $this->anio->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_socio
         $this->id_socio->LinkCustomAttributes = "";
         $this->id_socio->HrefValue = "";
         $this->id_socio->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) {
         $this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idservicio_medico_prestado
     // idcuenta
     // idservicio_medico
     // estado
     // costo
     // fecha_inicio
     // fecha_final
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idservicio_medico_prestado
         $this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;
         $this->idservicio_medico_prestado->ViewCustomAttributes = "";
         // idcuenta
         if (strval($this->idcuenta->CurrentValue) != "") {
             $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idcuenta->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;
             }
         } else {
             $this->idcuenta->ViewValue = NULL;
         }
         $this->idcuenta->ViewCustomAttributes = "";
         // idservicio_medico
         if (strval($this->idservicio_medico->CurrentValue) != "") {
             $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue;
             }
         } else {
             $this->idservicio_medico->ViewValue = NULL;
         }
         $this->idservicio_medico->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // costo
         $this->costo->ViewValue = $this->costo->CurrentValue;
         $this->costo->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7);
         $this->fecha_final->ViewCustomAttributes = "";
         // idcuenta
         $this->idcuenta->LinkCustomAttributes = "";
         $this->idcuenta->HrefValue = "";
         $this->idcuenta->TooltipValue = "";
         // idservicio_medico
         $this->idservicio_medico->LinkCustomAttributes = "";
         $this->idservicio_medico->HrefValue = "";
         $this->idservicio_medico->TooltipValue = "";
         // costo
         $this->costo->LinkCustomAttributes = "";
         $this->costo->HrefValue = "";
         $this->costo->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // idcuenta
         $this->idcuenta->EditAttrs["class"] = "form-control";
         $this->idcuenta->EditCustomAttributes = "";
         if ($this->idcuenta->getSessionValue() != "") {
             $this->idcuenta->CurrentValue = $this->idcuenta->getSessionValue();
             if (strval($this->idcuenta->CurrentValue) != "") {
                 $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idcuenta->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;
                 }
             } else {
                 $this->idcuenta->ViewValue = NULL;
             }
             $this->idcuenta->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idcuenta->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `cuenta`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->idcuenta->EditValue = $arwrk;
         }
         // idservicio_medico
         $this->idservicio_medico->EditAttrs["class"] = "form-control";
         $this->idservicio_medico->EditCustomAttributes = "";
         if ($this->idservicio_medico->getSessionValue() != "") {
             $this->idservicio_medico->CurrentValue = $this->idservicio_medico->getSessionValue();
             if (strval($this->idservicio_medico->CurrentValue) != "") {
                 $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue;
                 }
             } else {
                 $this->idservicio_medico->ViewValue = NULL;
             }
             $this->idservicio_medico->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idservicio_medico->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `servicio_medico`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->idservicio_medico->EditValue = $arwrk;
         }
         // costo
         $this->costo->EditAttrs["class"] = "form-control";
         $this->costo->EditCustomAttributes = "";
         $this->costo->EditValue = ew_HtmlEncode($this->costo->CurrentValue);
         $this->costo->PlaceHolder = ew_RemoveHtml($this->costo->FldCaption());
         if (strval($this->costo->EditValue) != "" && is_numeric($this->costo->EditValue)) {
             $this->costo->EditValue = ew_FormatNumber($this->costo->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // idcuenta
         $this->idcuenta->HrefValue = "";
         // idservicio_medico
         $this->idservicio_medico->HrefValue = "";
         // costo
         $this->costo->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
         $this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->sub_total->FormValue == $this->sub_total->CurrentValue && is_numeric(ew_StrToFloat($this->sub_total->CurrentValue))) {
         $this->sub_total->CurrentValue = ew_StrToFloat($this->sub_total->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
         $this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->comision_chofer->FormValue == $this->comision_chofer->CurrentValue && is_numeric(ew_StrToFloat($this->comision_chofer->CurrentValue))) {
         $this->comision_chofer->CurrentValue = ew_StrToFloat($this->comision_chofer->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
         $this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->total->FormValue == $this->total->CurrentValue && is_numeric(ew_StrToFloat($this->total->CurrentValue))) {
         $this->total->CurrentValue = ew_StrToFloat($this->total->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // responsable
     // Patente
     // kg_carga
     // tarifa
     // sub_total
     // porcentaje
     // comision_chofer
     // adelanto
     // total
     // Accumulate aggregate value
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
         if (is_numeric($this->sub_total->CurrentValue)) {
             $this->sub_total->Total += $this->sub_total->CurrentValue;
         }
         // Accumulate total
         if (is_numeric($this->comision_chofer->CurrentValue)) {
             $this->comision_chofer->Total += $this->comision_chofer->CurrentValue;
         }
         // Accumulate total
         if (is_numeric($this->total->CurrentValue)) {
             $this->total->Total += $this->total->CurrentValue;
         }
         // Accumulate total
     }
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // responsable
         $this->responsable->ViewValue = $this->responsable->CurrentValue;
         $this->responsable->ViewCustomAttributes = "";
         // Patente
         $this->Patente->ViewValue = $this->Patente->CurrentValue;
         $this->Patente->ViewCustomAttributes = "";
         // kg_carga
         $this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
         $this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 2, -2, -2, -2);
         $this->kg_carga->ViewCustomAttributes = "";
         // tarifa
         $this->tarifa->ViewValue = $this->tarifa->CurrentValue;
         $this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
         $this->tarifa->ViewCustomAttributes = "";
         // sub_total
         $this->sub_total->ViewValue = $this->sub_total->CurrentValue;
         $this->sub_total->ViewValue = ew_FormatCurrency($this->sub_total->ViewValue, 2, -2, -2, -2);
         $this->sub_total->ViewCustomAttributes = "";
         // porcentaje
         $this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
         $this->porcentaje->ViewValue = ew_FormatPercent($this->porcentaje->ViewValue, 2, -2, -2, -2);
         $this->porcentaje->ViewCustomAttributes = "";
         // comision_chofer
         $this->comision_chofer->ViewValue = $this->comision_chofer->CurrentValue;
         $this->comision_chofer->ViewValue = ew_FormatCurrency($this->comision_chofer->ViewValue, 2, -2, -1, -2);
         $this->comision_chofer->ViewCustomAttributes = "";
         // adelanto
         $this->adelanto->ViewValue = $this->adelanto->CurrentValue;
         $this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
         $this->adelanto->ViewCustomAttributes = "";
         // total
         $this->total->ViewValue = $this->total->CurrentValue;
         $this->total->ViewValue = ew_FormatCurrency($this->total->ViewValue, 2, -2, -2, -2);
         $this->total->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // responsable
         $this->responsable->LinkCustomAttributes = "";
         $this->responsable->HrefValue = "";
         $this->responsable->TooltipValue = "";
         // Patente
         $this->Patente->LinkCustomAttributes = "";
         $this->Patente->HrefValue = "";
         $this->Patente->TooltipValue = "";
         // kg_carga
         $this->kg_carga->LinkCustomAttributes = "";
         $this->kg_carga->HrefValue = "";
         $this->kg_carga->TooltipValue = "";
         // tarifa
         $this->tarifa->LinkCustomAttributes = "";
         $this->tarifa->HrefValue = "";
         $this->tarifa->TooltipValue = "";
         // sub_total
         $this->sub_total->LinkCustomAttributes = "";
         $this->sub_total->HrefValue = "";
         $this->sub_total->TooltipValue = "";
         // porcentaje
         $this->porcentaje->LinkCustomAttributes = "";
         $this->porcentaje->HrefValue = "";
         $this->porcentaje->TooltipValue = "";
         // comision_chofer
         $this->comision_chofer->LinkCustomAttributes = "";
         $this->comision_chofer->HrefValue = "";
         $this->comision_chofer->TooltipValue = "";
         // adelanto
         $this->adelanto->LinkCustomAttributes = "";
         $this->adelanto->HrefValue = "";
         $this->adelanto->TooltipValue = "";
         // total
         $this->total->LinkCustomAttributes = "";
         $this->total->HrefValue = "";
         $this->total->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // codigo
         $this->codigo->EditAttrs["class"] = "form-control";
         $this->codigo->EditCustomAttributes = "";
         $this->codigo->EditValue = ew_HtmlEncode($this->codigo->AdvancedSearch->SearchValue);
         $this->codigo->PlaceHolder = ew_RemoveHtml($this->codigo->FldCaption());
         // responsable
         $this->responsable->EditAttrs["class"] = "form-control";
         $this->responsable->EditCustomAttributes = "";
         $this->responsable->EditValue = ew_HtmlEncode($this->responsable->AdvancedSearch->SearchValue);
         $this->responsable->PlaceHolder = ew_RemoveHtml($this->responsable->FldCaption());
         // Patente
         $this->Patente->EditAttrs["class"] = "form-control";
         $this->Patente->EditCustomAttributes = "";
         $this->Patente->EditValue = ew_HtmlEncode($this->Patente->AdvancedSearch->SearchValue);
         $this->Patente->PlaceHolder = ew_RemoveHtml($this->Patente->FldCaption());
         // kg_carga
         $this->kg_carga->EditAttrs["class"] = "form-control";
         $this->kg_carga->EditCustomAttributes = "";
         $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->AdvancedSearch->SearchValue);
         $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
         // tarifa
         $this->tarifa->EditAttrs["class"] = "form-control";
         $this->tarifa->EditCustomAttributes = "";
         $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->AdvancedSearch->SearchValue);
         $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
         // sub_total
         $this->sub_total->EditAttrs["class"] = "form-control";
         $this->sub_total->EditCustomAttributes = "";
         $this->sub_total->EditValue = ew_HtmlEncode($this->sub_total->AdvancedSearch->SearchValue);
         $this->sub_total->PlaceHolder = ew_RemoveHtml($this->sub_total->FldCaption());
         // porcentaje
         $this->porcentaje->EditAttrs["class"] = "form-control";
         $this->porcentaje->EditCustomAttributes = "";
         $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->AdvancedSearch->SearchValue);
         $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
         // comision_chofer
         $this->comision_chofer->EditAttrs["class"] = "form-control";
         $this->comision_chofer->EditCustomAttributes = "";
         $this->comision_chofer->EditValue = ew_HtmlEncode($this->comision_chofer->AdvancedSearch->SearchValue);
         $this->comision_chofer->PlaceHolder = ew_RemoveHtml($this->comision_chofer->FldCaption());
         // adelanto
         $this->adelanto->EditAttrs["class"] = "form-control";
         $this->adelanto->EditCustomAttributes = "";
         $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->AdvancedSearch->SearchValue);
         $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
         // total
         $this->total->EditAttrs["class"] = "form-control";
         $this->total->EditCustomAttributes = "";
         $this->total->EditValue = ew_HtmlEncode($this->total->AdvancedSearch->SearchValue);
         $this->total->PlaceHolder = ew_RemoveHtml($this->total->FldCaption());
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATEINIT) {
         // Initialize aggregate row
         $this->sub_total->Total = 0;
         // Initialize total
         $this->comision_chofer->Total = 0;
         // Initialize total
         $this->total->Total = 0;
         // Initialize total
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATE) {
         // Aggregate row
         $this->sub_total->CurrentValue = $this->sub_total->Total;
         $this->sub_total->ViewValue = $this->sub_total->CurrentValue;
         $this->sub_total->ViewValue = ew_FormatCurrency($this->sub_total->ViewValue, 2, -2, -2, -2);
         $this->sub_total->ViewCustomAttributes = "";
         $this->sub_total->HrefValue = "";
         // Clear href value
         $this->comision_chofer->CurrentValue = $this->comision_chofer->Total;
         $this->comision_chofer->ViewValue = $this->comision_chofer->CurrentValue;
         $this->comision_chofer->ViewValue = ew_FormatCurrency($this->comision_chofer->ViewValue, 2, -2, -1, -2);
         $this->comision_chofer->ViewCustomAttributes = "";
         $this->comision_chofer->HrefValue = "";
         // Clear href value
         $this->total->CurrentValue = $this->total->Total;
         $this->total->ViewValue = $this->total->CurrentValue;
         $this->total->ViewValue = ew_FormatCurrency($this->total->ViewValue, 2, -2, -2, -2);
         $this->total->ViewCustomAttributes = "";
         $this->total->HrefValue = "";
         // Clear href value
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #5
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // mes
     // anio
     // fecha
     // monto
     // id_usuario
     // id_socio
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewCustomAttributes = "";
         // mes
         $this->mes->ViewValue = $this->mes->CurrentValue;
         $this->mes->ViewCustomAttributes = "";
         // anio
         $this->anio->ViewValue = $this->anio->CurrentValue;
         $this->anio->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewValue = ew_FormatCurrency($this->monto->ViewValue, 0, -2, -2, -2);
         $this->monto->ViewCustomAttributes = "";
         // id_socio
         if (strval($this->id_socio->CurrentValue) != "") {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                 $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
             }
         } else {
             $this->id_socio->ViewValue = NULL;
         }
         $this->id_socio->ViewCustomAttributes = "";
         // mes
         $this->mes->LinkCustomAttributes = "";
         $this->mes->HrefValue = "";
         $this->mes->TooltipValue = "";
         // anio
         $this->anio->LinkCustomAttributes = "";
         $this->anio->HrefValue = "";
         $this->anio->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_socio
         $this->id_socio->LinkCustomAttributes = "";
         $this->id_socio->HrefValue = "";
         $this->id_socio->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // mes
         $this->mes->EditAttrs["class"] = "form-control";
         $this->mes->EditCustomAttributes = "";
         $this->mes->EditValue = ew_HtmlEncode($this->mes->CurrentValue);
         $this->mes->PlaceHolder = ew_RemoveHtml($this->mes->FldCaption());
         // anio
         $this->anio->EditAttrs["class"] = "form-control";
         $this->anio->EditCustomAttributes = "";
         $this->anio->EditValue = ew_HtmlEncode($this->anio->CurrentValue);
         $this->anio->PlaceHolder = ew_RemoveHtml($this->anio->FldCaption());
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // monto
         $this->monto->EditAttrs["class"] = "form-control";
         $this->monto->EditCustomAttributes = "";
         $this->monto->EditValue = ew_HtmlEncode($this->monto->CurrentValue);
         $this->monto->PlaceHolder = ew_RemoveHtml($this->monto->FldCaption());
         if (strval($this->monto->EditValue) != "" && is_numeric($this->monto->EditValue)) {
             $this->monto->EditValue = ew_FormatNumber($this->monto->EditValue, -2, -2, -2, -2);
         }
         // id_socio
         $this->id_socio->EditAttrs["class"] = "form-control";
         $this->id_socio->EditCustomAttributes = "";
         if ($this->id_socio->getSessionValue() != "") {
             $this->id_socio->CurrentValue = $this->id_socio->getSessionValue();
             if (strval($this->id_socio->CurrentValue) != "") {
                 $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`activo`='S'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `propietario` DESC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                     $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
                 }
             } else {
                 $this->id_socio->ViewValue = NULL;
             }
             $this->id_socio->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_socio->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if (!$GLOBALS["deudas"]->UserIDAllow("add")) {
                 $sWhereWrk = $GLOBALS["socios"]->AddUserIDFilter($sWhereWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_socio->EditValue = $arwrk;
         }
         // Edit refer script
         // mes
         $this->mes->HrefValue = "";
         // anio
         $this->anio->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // monto
         $this->monto->HrefValue = "";
         // id_socio
         $this->id_socio->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #6
0
 function SetDbValueDef(&$rs, $value, $default, $skip = FALSE)
 {
     if ($skip && strval($value) == "" || !$this->Visible || $this->Disabled) {
         return;
     }
     switch ($this->FldType) {
         case 2:
         case 3:
         case 16:
         case 17:
         case 18:
             // Integer
             $value = trim($value);
             $DbValue = is_numeric($value) ? intval($value) : $default;
             break;
         case 19:
         case 20:
         case 21:
             // Big integer
             $value = trim($value);
             $DbValue = is_numeric($value) ? $value : $default;
             break;
         case 5:
         case 6:
         case 14:
         case 131:
             // Double
         // Double
         case 139:
         case 4:
             // Single
             $value = trim($value);
             $value = ew_StrToFloat($value);
             $DbValue = is_numeric($value) ? $value : $default;
             break;
         case 7:
         case 133:
         case 134:
         case 135:
             // Date
         // Date
         case 141:
             // XML
         // XML
         case 145:
             // Time
         // Time
         case 146:
             // DateTiemOffset
         // DateTiemOffset
         case 201:
         case 203:
         case 129:
         case 130:
         case 200:
         case 202:
             // String
             $value = trim($value);
             $DbValue = $value == "" ? $default : $value;
             break;
         case 128:
         case 204:
         case 205:
             // Binary
             $DbValue = is_null($value) ? $default : $value;
             break;
         case 72:
             // GUID
             $value = trim($value);
             $DbValue = $value != "" && ew_CheckGUID($value) ? $value : $default;
             break;
         case 11:
             // Boolean
             $DbValue = is_bool($value) || is_numeric($value) ? $value : $default;
             break;
         default:
             $DbValue = $value;
     }
     $this->setDbValue($DbValue);
     $rs[$this->FldName] = $this->DbValue;
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio_unitario->FormValue == $this->precio_unitario->CurrentValue && is_numeric(ew_StrToFloat($this->precio_unitario->CurrentValue))) {
         $this->precio_unitario->CurrentValue = ew_StrToFloat($this->precio_unitario->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idreceta
     // idempleado
     // idmedicina
     // fecha
     // cantidad
     // precio_unitario
     // idturno
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idreceta
         $this->idreceta->ViewValue = $this->idreceta->CurrentValue;
         $this->idreceta->ViewCustomAttributes = "";
         // idempleado
         if (strval($this->idempleado->CurrentValue) != "") {
             $sFilterWrk = "`idempleado`" . ew_SearchString("=", $this->idempleado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idempleado`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empleado`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idempleado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idempleado->ViewValue = $rswrk->fields('DispFld');
                 $this->idempleado->ViewValue .= ew_ValueSeparator(1, $this->idempleado) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->idempleado->ViewValue = $this->idempleado->CurrentValue;
             }
         } else {
             $this->idempleado->ViewValue = NULL;
         }
         $this->idempleado->ViewCustomAttributes = "";
         // idmedicina
         if (strval($this->idmedicina->CurrentValue) != "") {
             $sFilterWrk = "`idmedicina`" . ew_SearchString("=", $this->idmedicina->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idmedicina`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `medicina`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idmedicina, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idmedicina->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue;
             }
         } else {
             $this->idmedicina->ViewValue = NULL;
         }
         $this->idmedicina->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // cantidad
         $this->cantidad->ViewValue = $this->cantidad->CurrentValue;
         $this->cantidad->ViewCustomAttributes = "";
         // precio_unitario
         $this->precio_unitario->ViewValue = $this->precio_unitario->CurrentValue;
         $this->precio_unitario->ViewCustomAttributes = "";
         // idturno
         if (strval($this->idturno->CurrentValue) != "") {
             $sFilterWrk = "`idturno`" . ew_SearchString("=", $this->idturno->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idturno`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `turno`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idturno, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idturno->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idturno->ViewValue = $this->idturno->CurrentValue;
             }
         } else {
             $this->idturno->ViewValue = NULL;
         }
         $this->idturno->ViewCustomAttributes = "";
         // idreceta
         $this->idreceta->LinkCustomAttributes = "";
         $this->idreceta->HrefValue = "";
         $this->idreceta->TooltipValue = "";
         // idempleado
         $this->idempleado->LinkCustomAttributes = "";
         $this->idempleado->HrefValue = "";
         $this->idempleado->TooltipValue = "";
         // idmedicina
         $this->idmedicina->LinkCustomAttributes = "";
         $this->idmedicina->HrefValue = "";
         $this->idmedicina->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // cantidad
         $this->cantidad->LinkCustomAttributes = "";
         $this->cantidad->HrefValue = "";
         $this->cantidad->TooltipValue = "";
         // precio_unitario
         $this->precio_unitario->LinkCustomAttributes = "";
         $this->precio_unitario->HrefValue = "";
         $this->precio_unitario->TooltipValue = "";
         // idturno
         $this->idturno->LinkCustomAttributes = "";
         $this->idturno->HrefValue = "";
         $this->idturno->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #8
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio->FormValue == $this->precio->CurrentValue && is_numeric(ew_StrToFloat($this->precio->CurrentValue))) {
         $this->precio->CurrentValue = ew_StrToFloat($this->precio->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->entrega->FormValue == $this->entrega->CurrentValue && is_numeric(ew_StrToFloat($this->entrega->CurrentValue))) {
         $this->entrega->CurrentValue = ew_StrToFloat($this->entrega->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // nro_orden
     // fecha_recepcion
     // cliente
     // id_tipo_cliente
     // tel
     // cel
     // objetos
     // detalle_a_realizar
     // fecha_entrega
     // observaciones
     // id_estado
     // precio
     // entrega
     // saldo
     // foto1
     // foto2
     // usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // nro_orden
         $this->nro_orden->ViewValue = $this->nro_orden->CurrentValue;
         $this->nro_orden->ViewCustomAttributes = "";
         // fecha_recepcion
         $this->fecha_recepcion->ViewValue = $this->fecha_recepcion->CurrentValue;
         $this->fecha_recepcion->ViewValue = ew_FormatDateTime($this->fecha_recepcion->ViewValue, 7);
         $this->fecha_recepcion->ViewCustomAttributes = "";
         // cliente
         $this->cliente->ViewValue = $this->cliente->CurrentValue;
         $this->cliente->ViewCustomAttributes = "";
         // id_tipo_cliente
         if (strval($this->id_tipo_cliente->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_clientes`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_cliente` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_cliente->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->id_tipo_cliente->ViewValue = $this->id_tipo_cliente->CurrentValue;
             }
         } else {
             $this->id_tipo_cliente->ViewValue = NULL;
         }
         $this->id_tipo_cliente->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewCustomAttributes = "";
         // objetos
         $this->objetos->ViewValue = $this->objetos->CurrentValue;
         $this->objetos->ViewCustomAttributes = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->ViewValue = $this->detalle_a_realizar->CurrentValue;
         $this->detalle_a_realizar->ViewCustomAttributes = "";
         // fecha_entrega
         $this->fecha_entrega->ViewValue = $this->fecha_entrega->CurrentValue;
         $this->fecha_entrega->ViewValue = ew_FormatDateTime($this->fecha_entrega->ViewValue, 7);
         $this->fecha_entrega->ViewCustomAttributes = "";
         // observaciones
         $this->observaciones->ViewValue = $this->observaciones->CurrentValue;
         $this->observaciones->ViewCustomAttributes = "";
         // id_estado
         if (strval($this->id_estado->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estados`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_estado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `codigo` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_estado->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->id_estado->ViewValue = $this->id_estado->CurrentValue;
             }
         } else {
             $this->id_estado->ViewValue = NULL;
         }
         $this->id_estado->ViewCustomAttributes = "";
         // precio
         $this->precio->ViewValue = $this->precio->CurrentValue;
         $this->precio->ViewValue = ew_FormatCurrency($this->precio->ViewValue, 2, -2, -2, -2);
         $this->precio->ViewCustomAttributes = "";
         // entrega
         $this->entrega->ViewValue = $this->entrega->CurrentValue;
         $this->entrega->ViewValue = ew_FormatCurrency($this->entrega->ViewValue, 2, -2, -2, -2);
         $this->entrega->ViewCustomAttributes = "";
         // saldo
         $this->saldo->ViewValue = $this->saldo->CurrentValue;
         $this->saldo->ViewValue = ew_FormatCurrency($this->saldo->ViewValue, 2, -2, -2, -2);
         $this->saldo->ViewCustomAttributes = "";
         // foto1
         if (!ew_Empty($this->foto1->Upload->DbValue)) {
             $this->foto1->ImageAlt = $this->foto1->FldAlt();
             $this->foto1->ViewValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue;
         } else {
             $this->foto1->ViewValue = "";
         }
         $this->foto1->ViewCustomAttributes = "";
         // foto2
         if (!ew_Empty($this->foto2->Upload->DbValue)) {
             $this->foto2->ImageAlt = $this->foto2->FldAlt();
             $this->foto2->ViewValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue;
         } else {
             $this->foto2->ViewValue = "";
         }
         $this->foto2->ViewCustomAttributes = "";
         // nro_orden
         $this->nro_orden->LinkCustomAttributes = "";
         $this->nro_orden->HrefValue = "";
         $this->nro_orden->TooltipValue = "";
         // fecha_recepcion
         $this->fecha_recepcion->LinkCustomAttributes = "";
         $this->fecha_recepcion->HrefValue = "";
         $this->fecha_recepcion->TooltipValue = "";
         // cliente
         $this->cliente->LinkCustomAttributes = "";
         $this->cliente->HrefValue = "";
         $this->cliente->TooltipValue = "";
         // id_tipo_cliente
         $this->id_tipo_cliente->LinkCustomAttributes = "";
         $this->id_tipo_cliente->HrefValue = "";
         $this->id_tipo_cliente->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // objetos
         $this->objetos->LinkCustomAttributes = "";
         $this->objetos->HrefValue = "";
         $this->objetos->TooltipValue = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->LinkCustomAttributes = "";
         $this->detalle_a_realizar->HrefValue = "";
         $this->detalle_a_realizar->TooltipValue = "";
         // fecha_entrega
         $this->fecha_entrega->LinkCustomAttributes = "";
         $this->fecha_entrega->HrefValue = "";
         $this->fecha_entrega->TooltipValue = "";
         // observaciones
         $this->observaciones->LinkCustomAttributes = "";
         $this->observaciones->HrefValue = "";
         $this->observaciones->TooltipValue = "";
         // id_estado
         $this->id_estado->LinkCustomAttributes = "";
         $this->id_estado->HrefValue = "";
         $this->id_estado->TooltipValue = "";
         // precio
         $this->precio->LinkCustomAttributes = "";
         $this->precio->HrefValue = "";
         $this->precio->TooltipValue = "";
         // entrega
         $this->entrega->LinkCustomAttributes = "";
         $this->entrega->HrefValue = "";
         $this->entrega->TooltipValue = "";
         // foto1
         $this->foto1->LinkCustomAttributes = "";
         $this->foto1->HrefValue = "";
         $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue;
         $this->foto1->TooltipValue = "";
         // foto2
         $this->foto2->LinkCustomAttributes = "";
         $this->foto2->HrefValue = "";
         $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue;
         $this->foto2->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // nro_orden
         $this->nro_orden->EditCustomAttributes = "";
         $this->nro_orden->EditValue = $this->nro_orden->CurrentValue;
         $this->nro_orden->ViewCustomAttributes = "";
         // fecha_recepcion
         $this->fecha_recepcion->EditCustomAttributes = "";
         $this->fecha_recepcion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_recepcion->CurrentValue, 7));
         $this->fecha_recepcion->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_recepcion->FldCaption()));
         // cliente
         $this->cliente->EditCustomAttributes = "";
         $this->cliente->EditValue = ew_HtmlEncode($this->cliente->CurrentValue);
         $this->cliente->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cliente->FldCaption()));
         // id_tipo_cliente
         $this->id_tipo_cliente->EditCustomAttributes = "";
         if (trim(strval($this->id_tipo_cliente->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_clientes`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activo`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `tipo_cliente` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_tipo_cliente->EditValue = $arwrk;
         // tel
         $this->tel->EditCustomAttributes = "";
         $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue);
         $this->tel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->tel->FldCaption()));
         // cel
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cel->FldCaption()));
         // objetos
         $this->objetos->EditCustomAttributes = "";
         $this->objetos->EditValue = ew_HtmlEncode($this->objetos->CurrentValue);
         $this->objetos->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->objetos->FldCaption()));
         // detalle_a_realizar
         $this->detalle_a_realizar->EditCustomAttributes = "";
         $this->detalle_a_realizar->EditValue = $this->detalle_a_realizar->CurrentValue;
         $this->detalle_a_realizar->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->detalle_a_realizar->FldCaption()));
         // fecha_entrega
         $this->fecha_entrega->EditCustomAttributes = "";
         $this->fecha_entrega->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_entrega->CurrentValue, 7));
         $this->fecha_entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->fecha_entrega->FldCaption()));
         // observaciones
         $this->observaciones->EditCustomAttributes = "";
         $this->observaciones->EditValue = $this->observaciones->CurrentValue;
         $this->observaciones->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->observaciones->FldCaption()));
         // id_estado
         $this->id_estado->EditCustomAttributes = "";
         if (trim(strval($this->id_estado->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `estados`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activo`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_estado, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `codigo` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_estado->EditValue = $arwrk;
         // precio
         $this->precio->EditCustomAttributes = "";
         $this->precio->EditValue = ew_HtmlEncode($this->precio->CurrentValue);
         $this->precio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->precio->FldCaption()));
         if (strval($this->precio->EditValue) != "" && is_numeric($this->precio->EditValue)) {
             $this->precio->EditValue = ew_FormatNumber($this->precio->EditValue, -2, -2, -2, -2);
         }
         // entrega
         $this->entrega->EditCustomAttributes = "";
         $this->entrega->EditValue = ew_HtmlEncode($this->entrega->CurrentValue);
         $this->entrega->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->entrega->FldCaption()));
         if (strval($this->entrega->EditValue) != "" && is_numeric($this->entrega->EditValue)) {
             $this->entrega->EditValue = ew_FormatNumber($this->entrega->EditValue, -2, -2, -2, -2);
         }
         // foto1
         $this->foto1->EditCustomAttributes = "";
         if (!ew_Empty($this->foto1->Upload->DbValue)) {
             $this->foto1->ImageAlt = $this->foto1->FldAlt();
             $this->foto1->EditValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue;
         } else {
             $this->foto1->EditValue = "";
         }
         if ($this->CurrentAction == "I" && !$this->EventCancelled) {
             ew_RenderUploadField($this->foto1);
         }
         // foto2
         $this->foto2->EditCustomAttributes = "";
         if (!ew_Empty($this->foto2->Upload->DbValue)) {
             $this->foto2->ImageAlt = $this->foto2->FldAlt();
             $this->foto2->EditValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue;
         } else {
             $this->foto2->EditValue = "";
         }
         if ($this->CurrentAction == "I" && !$this->EventCancelled) {
             ew_RenderUploadField($this->foto2);
         }
         // Edit refer script
         // nro_orden
         $this->nro_orden->HrefValue = "";
         // fecha_recepcion
         $this->fecha_recepcion->HrefValue = "";
         // cliente
         $this->cliente->HrefValue = "";
         // id_tipo_cliente
         $this->id_tipo_cliente->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // objetos
         $this->objetos->HrefValue = "";
         // detalle_a_realizar
         $this->detalle_a_realizar->HrefValue = "";
         // fecha_entrega
         $this->fecha_entrega->HrefValue = "";
         // observaciones
         $this->observaciones->HrefValue = "";
         // id_estado
         $this->id_estado->HrefValue = "";
         // precio
         $this->precio->HrefValue = "";
         // entrega
         $this->entrega->HrefValue = "";
         // foto1
         $this->foto1->HrefValue = "";
         $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue;
         // foto2
         $this->foto2->HrefValue = "";
         $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue;
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     // Convert decimal values if posted back
     if ($this->teacher_rate->FormValue == $this->teacher_rate->CurrentValue && is_numeric(ew_StrToFloat($this->teacher_rate->CurrentValue))) {
         $this->teacher_rate->CurrentValue = ew_StrToFloat($this->teacher_rate->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // teacher_id
     // teacher_name
     // teacher_personal_page
     // teacher_avatar
     // teacher_description
     // teacher_work_place
     // teacher_active
     // teacher_acadamic_title
     // teacher_birthday
     // teacher_sex
     // teacher_faculty
     // teacher_dept
     // teacher_rate
     // teacher_personality
     // advices
     // teacher_research
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // teacher_id
         $this->teacher_id->ViewValue = $this->teacher_id->CurrentValue;
         $this->teacher_id->ViewCustomAttributes = "";
         // teacher_name
         $this->teacher_name->ViewValue = $this->teacher_name->CurrentValue;
         $this->teacher_name->ViewCustomAttributes = "";
         // teacher_personal_page
         $this->teacher_personal_page->ViewValue = $this->teacher_personal_page->CurrentValue;
         $this->teacher_personal_page->ViewCustomAttributes = "";
         // teacher_avatar
         $this->teacher_avatar->UploadPath = 'themes\\classic\\assets\\img\\Teacher_img';
         if (!ew_Empty($this->teacher_avatar->Upload->DbValue)) {
             $this->teacher_avatar->ImageAlt = $this->teacher_avatar->FldAlt();
             $this->teacher_avatar->ViewValue = ew_UploadPathEx(FALSE, $this->teacher_avatar->UploadPath) . $this->teacher_avatar->Upload->DbValue;
         } else {
             $this->teacher_avatar->ViewValue = "";
         }
         $this->teacher_avatar->ViewCustomAttributes = "";
         // teacher_description
         $this->teacher_description->ViewValue = $this->teacher_description->CurrentValue;
         $this->teacher_description->ViewCustomAttributes = "";
         // teacher_work_place
         $this->teacher_work_place->ViewValue = $this->teacher_work_place->CurrentValue;
         $this->teacher_work_place->ViewCustomAttributes = "";
         // teacher_active
         $this->teacher_active->ViewValue = $this->teacher_active->CurrentValue;
         $this->teacher_active->ViewCustomAttributes = "";
         // teacher_acadamic_title
         $this->teacher_acadamic_title->ViewValue = $this->teacher_acadamic_title->CurrentValue;
         $this->teacher_acadamic_title->ViewCustomAttributes = "";
         // teacher_birthday
         $this->teacher_birthday->ViewValue = $this->teacher_birthday->CurrentValue;
         $this->teacher_birthday->ViewCustomAttributes = "";
         // teacher_sex
         $this->teacher_sex->ViewValue = $this->teacher_sex->CurrentValue;
         $this->teacher_sex->ViewCustomAttributes = "";
         // teacher_faculty
         if (strval($this->teacher_faculty->CurrentValue) != "") {
             $sFilterWrk = "`faculty_id`" . ew_SearchString("=", $this->teacher_faculty->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_faculty`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->teacher_faculty->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->teacher_faculty->ViewValue = $this->teacher_faculty->CurrentValue;
             }
         } else {
             $this->teacher_faculty->ViewValue = NULL;
         }
         $this->teacher_faculty->ViewCustomAttributes = "";
         // teacher_dept
         if (strval($this->teacher_dept->CurrentValue) != "") {
             $sFilterWrk = "`dept_id`" . ew_SearchString("=", $this->teacher_dept->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `dept_id`, `dept_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_dept`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->teacher_dept->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->teacher_dept->ViewValue = $this->teacher_dept->CurrentValue;
             }
         } else {
             $this->teacher_dept->ViewValue = NULL;
         }
         $this->teacher_dept->ViewCustomAttributes = "";
         // teacher_rate
         $this->teacher_rate->ViewValue = $this->teacher_rate->CurrentValue;
         $this->teacher_rate->ViewCustomAttributes = "";
         // teacher_personality
         $this->teacher_personality->ViewValue = $this->teacher_personality->CurrentValue;
         $this->teacher_personality->ViewCustomAttributes = "";
         // advices
         $this->advices->ViewValue = $this->advices->CurrentValue;
         $this->advices->ViewCustomAttributes = "";
         // teacher_research
         $this->teacher_research->ViewValue = $this->teacher_research->CurrentValue;
         $this->teacher_research->ViewCustomAttributes = "";
         // teacher_id
         $this->teacher_id->LinkCustomAttributes = "";
         $this->teacher_id->HrefValue = "";
         $this->teacher_id->TooltipValue = "";
         // teacher_name
         $this->teacher_name->LinkCustomAttributes = "";
         $this->teacher_name->HrefValue = "";
         $this->teacher_name->TooltipValue = "";
         // teacher_personal_page
         $this->teacher_personal_page->LinkCustomAttributes = "";
         $this->teacher_personal_page->HrefValue = "";
         $this->teacher_personal_page->TooltipValue = "";
         // teacher_avatar
         $this->teacher_avatar->LinkCustomAttributes = "";
         $this->teacher_avatar->HrefValue = "";
         $this->teacher_avatar->TooltipValue = "";
         // teacher_description
         $this->teacher_description->LinkCustomAttributes = "";
         $this->teacher_description->HrefValue = "";
         $this->teacher_description->TooltipValue = "";
         // teacher_work_place
         $this->teacher_work_place->LinkCustomAttributes = "";
         $this->teacher_work_place->HrefValue = "";
         $this->teacher_work_place->TooltipValue = "";
         // teacher_active
         $this->teacher_active->LinkCustomAttributes = "";
         $this->teacher_active->HrefValue = "";
         $this->teacher_active->TooltipValue = "";
         // teacher_acadamic_title
         $this->teacher_acadamic_title->LinkCustomAttributes = "";
         $this->teacher_acadamic_title->HrefValue = "";
         $this->teacher_acadamic_title->TooltipValue = "";
         // teacher_birthday
         $this->teacher_birthday->LinkCustomAttributes = "";
         $this->teacher_birthday->HrefValue = "";
         $this->teacher_birthday->TooltipValue = "";
         // teacher_sex
         $this->teacher_sex->LinkCustomAttributes = "";
         $this->teacher_sex->HrefValue = "";
         $this->teacher_sex->TooltipValue = "";
         // teacher_faculty
         $this->teacher_faculty->LinkCustomAttributes = "";
         $this->teacher_faculty->HrefValue = "";
         $this->teacher_faculty->TooltipValue = "";
         // teacher_dept
         $this->teacher_dept->LinkCustomAttributes = "";
         $this->teacher_dept->HrefValue = "";
         $this->teacher_dept->TooltipValue = "";
         // teacher_rate
         $this->teacher_rate->LinkCustomAttributes = "";
         $this->teacher_rate->HrefValue = "";
         $this->teacher_rate->TooltipValue = "";
         // teacher_personality
         $this->teacher_personality->LinkCustomAttributes = "";
         $this->teacher_personality->HrefValue = "";
         $this->teacher_personality->TooltipValue = "";
         // advices
         $this->advices->LinkCustomAttributes = "";
         $this->advices->HrefValue = "";
         $this->advices->TooltipValue = "";
         // teacher_research
         $this->teacher_research->LinkCustomAttributes = "";
         $this->teacher_research->HrefValue = "";
         $this->teacher_research->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->total_gasto->FormValue == $this->total_gasto->CurrentValue && is_numeric(ew_StrToFloat($this->total_gasto->CurrentValue))) {
         $this->total_gasto->CurrentValue = ew_StrToFloat($this->total_gasto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // responsable
     // cuit_cuil
     // razon_social
     // Patente
     // marca
     // Tipo_carga
     // Origen
     // prov_desde
     // loc_desde
     // cp_desde
     // Destino
     // prov_hasta
     // loc_hasta
     // cp_hasta
     // fecha_ini
     // Km_ini
     // fecha_fin
     // km_fin
     // estado
     // nom_chofer
     // nom_guarda
     // total_gasto
     // Accumulate aggregate value
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
         if (is_numeric($this->total_gasto->CurrentValue)) {
             $this->total_gasto->Total += $this->total_gasto->CurrentValue;
         }
         // Accumulate total
     }
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // responsable
         $this->responsable->ViewValue = $this->responsable->CurrentValue;
         $this->responsable->ViewCustomAttributes = "";
         // cuit_cuil
         $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
         $this->cuit_cuil->ViewCustomAttributes = "";
         // razon_social
         $this->razon_social->ViewValue = $this->razon_social->CurrentValue;
         $this->razon_social->ViewCustomAttributes = "";
         // Patente
         $this->Patente->ViewValue = $this->Patente->CurrentValue;
         $this->Patente->ViewCustomAttributes = "";
         // marca
         $this->marca->ViewValue = $this->marca->CurrentValue;
         $this->marca->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // Origen
         $this->Origen->ViewValue = $this->Origen->CurrentValue;
         $this->Origen->ViewCustomAttributes = "";
         // prov_desde
         $this->prov_desde->ViewValue = $this->prov_desde->CurrentValue;
         $this->prov_desde->ViewCustomAttributes = "";
         // loc_desde
         $this->loc_desde->ViewValue = $this->loc_desde->CurrentValue;
         $this->loc_desde->ViewCustomAttributes = "";
         // cp_desde
         $this->cp_desde->ViewValue = $this->cp_desde->CurrentValue;
         $this->cp_desde->ViewCustomAttributes = "";
         // Destino
         $this->Destino->ViewValue = $this->Destino->CurrentValue;
         $this->Destino->ViewCustomAttributes = "";
         // prov_hasta
         $this->prov_hasta->ViewValue = $this->prov_hasta->CurrentValue;
         $this->prov_hasta->ViewCustomAttributes = "";
         // loc_hasta
         $this->loc_hasta->ViewValue = $this->loc_hasta->CurrentValue;
         $this->loc_hasta->ViewCustomAttributes = "";
         // cp_hasta
         $this->cp_hasta->ViewValue = $this->cp_hasta->CurrentValue;
         $this->cp_hasta->ViewCustomAttributes = "";
         // fecha_ini
         $this->fecha_ini->ViewValue = $this->fecha_ini->CurrentValue;
         $this->fecha_ini->ViewValue = ew_FormatDateTime($this->fecha_ini->ViewValue, 7);
         $this->fecha_ini->ViewCustomAttributes = "";
         // Km_ini
         $this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
         $this->Km_ini->ViewCustomAttributes = "";
         // fecha_fin
         $this->fecha_fin->ViewValue = $this->fecha_fin->CurrentValue;
         $this->fecha_fin->ViewValue = ew_FormatDateTime($this->fecha_fin->ViewValue, 7);
         $this->fecha_fin->ViewCustomAttributes = "";
         // km_fin
         $this->km_fin->ViewValue = $this->km_fin->CurrentValue;
         $this->km_fin->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // nom_chofer
         $this->nom_chofer->ViewValue = $this->nom_chofer->CurrentValue;
         $this->nom_chofer->ViewCustomAttributes = "";
         // nom_guarda
         $this->nom_guarda->ViewValue = $this->nom_guarda->CurrentValue;
         $this->nom_guarda->ViewCustomAttributes = "";
         // total_gasto
         $this->total_gasto->ViewValue = $this->total_gasto->CurrentValue;
         $this->total_gasto->ViewValue = ew_FormatCurrency($this->total_gasto->ViewValue, 0, -2, -2, -2);
         $this->total_gasto->ViewCustomAttributes = "";
         // responsable
         $this->responsable->LinkCustomAttributes = "";
         $this->responsable->HrefValue = "";
         $this->responsable->TooltipValue = "";
         // cuit_cuil
         $this->cuit_cuil->LinkCustomAttributes = "";
         $this->cuit_cuil->HrefValue = "";
         $this->cuit_cuil->TooltipValue = "";
         // razon_social
         $this->razon_social->LinkCustomAttributes = "";
         $this->razon_social->HrefValue = "";
         $this->razon_social->TooltipValue = "";
         // Patente
         $this->Patente->LinkCustomAttributes = "";
         $this->Patente->HrefValue = "";
         $this->Patente->TooltipValue = "";
         // marca
         $this->marca->LinkCustomAttributes = "";
         $this->marca->HrefValue = "";
         $this->marca->TooltipValue = "";
         // Tipo_carga
         $this->Tipo_carga->LinkCustomAttributes = "";
         $this->Tipo_carga->HrefValue = "";
         $this->Tipo_carga->TooltipValue = "";
         // Origen
         $this->Origen->LinkCustomAttributes = "";
         $this->Origen->HrefValue = "";
         $this->Origen->TooltipValue = "";
         // prov_desde
         $this->prov_desde->LinkCustomAttributes = "";
         $this->prov_desde->HrefValue = "";
         $this->prov_desde->TooltipValue = "";
         // loc_desde
         $this->loc_desde->LinkCustomAttributes = "";
         $this->loc_desde->HrefValue = "";
         $this->loc_desde->TooltipValue = "";
         // cp_desde
         $this->cp_desde->LinkCustomAttributes = "";
         $this->cp_desde->HrefValue = "";
         $this->cp_desde->TooltipValue = "";
         // Destino
         $this->Destino->LinkCustomAttributes = "";
         $this->Destino->HrefValue = "";
         $this->Destino->TooltipValue = "";
         // prov_hasta
         $this->prov_hasta->LinkCustomAttributes = "";
         $this->prov_hasta->HrefValue = "";
         $this->prov_hasta->TooltipValue = "";
         // loc_hasta
         $this->loc_hasta->LinkCustomAttributes = "";
         $this->loc_hasta->HrefValue = "";
         $this->loc_hasta->TooltipValue = "";
         // cp_hasta
         $this->cp_hasta->LinkCustomAttributes = "";
         $this->cp_hasta->HrefValue = "";
         $this->cp_hasta->TooltipValue = "";
         // fecha_ini
         $this->fecha_ini->LinkCustomAttributes = "";
         $this->fecha_ini->HrefValue = "";
         $this->fecha_ini->TooltipValue = "";
         // Km_ini
         $this->Km_ini->LinkCustomAttributes = "";
         $this->Km_ini->HrefValue = "";
         $this->Km_ini->TooltipValue = "";
         // fecha_fin
         $this->fecha_fin->LinkCustomAttributes = "";
         $this->fecha_fin->HrefValue = "";
         $this->fecha_fin->TooltipValue = "";
         // km_fin
         $this->km_fin->LinkCustomAttributes = "";
         $this->km_fin->HrefValue = "";
         $this->km_fin->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // nom_chofer
         $this->nom_chofer->LinkCustomAttributes = "";
         $this->nom_chofer->HrefValue = "";
         $this->nom_chofer->TooltipValue = "";
         // nom_guarda
         $this->nom_guarda->LinkCustomAttributes = "";
         $this->nom_guarda->HrefValue = "";
         $this->nom_guarda->TooltipValue = "";
         // total_gasto
         $this->total_gasto->LinkCustomAttributes = "";
         $this->total_gasto->HrefValue = "";
         $this->total_gasto->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATEINIT) {
         // Initialize aggregate row
         $this->total_gasto->Total = 0;
         // Initialize total
     } elseif ($this->RowType == EW_ROWTYPE_AGGREGATE) {
         // Aggregate row
         $this->total_gasto->CurrentValue = $this->total_gasto->Total;
         $this->total_gasto->ViewValue = $this->total_gasto->CurrentValue;
         $this->total_gasto->ViewValue = ew_FormatCurrency($this->total_gasto->ViewValue, 0, -2, -2, -2);
         $this->total_gasto->ViewCustomAttributes = "";
         $this->total_gasto->HrefValue = "";
         // Clear href value
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #11
0
 function SearchValueIsNumeric($Fld, $Value)
 {
     if (ew_IsFloatFormat($Fld->FldType)) {
         $Value = ew_StrToFloat($Value);
     }
     return is_numeric($Value);
 }
Example #12
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
         $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha
     // detalles
     // Importe
     // id_tipo_gasto
     // id_hoja_ruta
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // detalles
         $this->detalles->ViewValue = $this->detalles->CurrentValue;
         $this->detalles->ViewCustomAttributes = "";
         // Importe
         $this->Importe->ViewValue = $this->Importe->CurrentValue;
         $this->Importe->ViewValue = ew_FormatCurrency($this->Importe->ViewValue, 2, 0, 0, -1);
         $this->Importe->ViewCustomAttributes = "";
         // id_tipo_gasto
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='R'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
         // id_hoja_ruta
         if ($this->id_hoja_ruta->VirtualValue != "") {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
         } else {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
             if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `codigo` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 }
             } else {
                 $this->id_hoja_ruta->ViewValue = NULL;
             }
         }
         $this->id_hoja_ruta->ViewCustomAttributes = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // detalles
         $this->detalles->LinkCustomAttributes = "";
         $this->detalles->HrefValue = "";
         $this->detalles->TooltipValue = "";
         // Importe
         $this->Importe->LinkCustomAttributes = "";
         $this->Importe->HrefValue = "";
         $this->Importe->TooltipValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->LinkCustomAttributes = "";
         $this->id_tipo_gasto->HrefValue = "";
         $this->id_tipo_gasto->TooltipValue = "";
         // id_hoja_ruta
         $this->id_hoja_ruta->LinkCustomAttributes = "";
         $this->id_hoja_ruta->HrefValue = "";
         $this->id_hoja_ruta->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, 0, 0, -1);
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         if ($this->id_tipo_gasto->getSessionValue() != "") {
             $this->id_tipo_gasto->CurrentValue = $this->id_tipo_gasto->getSessionValue();
             if ($this->id_tipo_gasto->VirtualValue != "") {
                 $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
             } else {
                 if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                     $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                     $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                     $sWhereWrk = "";
                     $lookuptblfilter = "`clase`='R'";
                     if (strval($lookuptblfilter) != "") {
                         ew_AddFilter($sWhereWrk, $lookuptblfilter);
                     }
                     if ($sFilterWrk != "") {
                         ew_AddFilter($sWhereWrk, $sFilterWrk);
                     }
                     // Call Lookup selecting
                     $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                     if ($sWhereWrk != "") {
                         $sSqlWrk .= " WHERE " . $sWhereWrk;
                     }
                     $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                     $rswrk = $conn->Execute($sSqlWrk);
                     if ($rswrk && !$rswrk->EOF) {
                         // Lookup values found
                         $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                         $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                         $rswrk->Close();
                     } else {
                         $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                     }
                 } else {
                     $this->id_tipo_gasto->ViewValue = NULL;
                 }
             }
             $this->id_tipo_gasto->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_tipo_gasto->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='R'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_tipo_gasto->EditValue = $arwrk;
         }
         // id_hoja_ruta
         $this->id_hoja_ruta->EditAttrs["class"] = "form-control";
         $this->id_hoja_ruta->EditCustomAttributes = "";
         if ($this->id_hoja_ruta->getSessionValue() != "") {
             $this->id_hoja_ruta->CurrentValue = $this->id_hoja_ruta->getSessionValue();
             if ($this->id_hoja_ruta->VirtualValue != "") {
                 $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
             } else {
                 $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                     $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                     $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                     $sWhereWrk = "";
                     if ($sFilterWrk != "") {
                         ew_AddFilter($sWhereWrk, $sFilterWrk);
                     }
                     // Call Lookup selecting
                     $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                     if ($sWhereWrk != "") {
                         $sSqlWrk .= " WHERE " . $sWhereWrk;
                     }
                     $sSqlWrk .= " ORDER BY `codigo` ASC";
                     $rswrk = $conn->Execute($sSqlWrk);
                     if ($rswrk && !$rswrk->EOF) {
                         // Lookup values found
                         $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                         $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                         $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                         $rswrk->Close();
                     } else {
                         $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                     }
                 } else {
                     $this->id_hoja_ruta->ViewValue = NULL;
                 }
             }
             $this->id_hoja_ruta->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_ruta->EditValue = ew_HtmlEncode($this->id_hoja_ruta->CurrentValue);
             $this->id_hoja_ruta->PlaceHolder = ew_RemoveHtml($this->id_hoja_ruta->FldCaption());
         }
         // Edit refer script
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_ruta
         $this->id_hoja_ruta->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #13
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio_base->FormValue == $this->precio_base->CurrentValue && is_numeric(ew_StrToFloat($this->precio_base->CurrentValue))) {
         $this->precio_base->CurrentValue = ew_StrToFloat($this->precio_base->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje_comision->FormValue == $this->porcentaje_comision->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje_comision->CurrentValue))) {
         $this->porcentaje_comision->CurrentValue = ew_StrToFloat($this->porcentaje_comision->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // Tipo_carga
     // precio_base
     // porcentaje_comision
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // precio_base
         $this->precio_base->ViewValue = $this->precio_base->CurrentValue;
         $this->precio_base->ViewValue = ew_FormatCurrency($this->precio_base->ViewValue, 2, 0, 0, -1);
         $this->precio_base->ViewCustomAttributes = "";
         // porcentaje_comision
         $this->porcentaje_comision->ViewValue = $this->porcentaje_comision->CurrentValue;
         $this->porcentaje_comision->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->LinkCustomAttributes = "";
         $this->Tipo_carga->HrefValue = "";
         $this->Tipo_carga->TooltipValue = "";
         // precio_base
         $this->precio_base->LinkCustomAttributes = "";
         $this->precio_base->HrefValue = "";
         $this->precio_base->TooltipValue = "";
         // porcentaje_comision
         $this->porcentaje_comision->LinkCustomAttributes = "";
         $this->porcentaje_comision->HrefValue = "";
         $this->porcentaje_comision->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // Tipo_carga
         $this->Tipo_carga->EditAttrs["class"] = "form-control";
         $this->Tipo_carga->EditCustomAttributes = "";
         $this->Tipo_carga->EditValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // precio_base
         $this->precio_base->EditAttrs["class"] = "form-control";
         $this->precio_base->EditCustomAttributes = "";
         $this->precio_base->EditValue = $this->precio_base->CurrentValue;
         $this->precio_base->EditValue = ew_FormatCurrency($this->precio_base->EditValue, 2, 0, 0, -1);
         $this->precio_base->ViewCustomAttributes = "";
         // porcentaje_comision
         $this->porcentaje_comision->EditAttrs["class"] = "form-control";
         $this->porcentaje_comision->EditCustomAttributes = "";
         $this->porcentaje_comision->EditValue = ew_HtmlEncode($this->porcentaje_comision->CurrentValue);
         $this->porcentaje_comision->PlaceHolder = ew_RemoveHtml($this->porcentaje_comision->FldCaption());
         if (strval($this->porcentaje_comision->EditValue) != "" && is_numeric($this->porcentaje_comision->EditValue)) {
             $this->porcentaje_comision->EditValue = ew_FormatNumber($this->porcentaje_comision->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // Tipo_carga
         $this->Tipo_carga->HrefValue = "";
         // precio_base
         $this->precio_base->HrefValue = "";
         // porcentaje_comision
         $this->porcentaje_comision->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) {
         $this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idconsulta
     // fecha_cita
     // iddoctor
     // costo
     // fecha_inicio
     // fecha_final
     // estado
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idconsulta
         $this->idconsulta->ViewValue = $this->idconsulta->CurrentValue;
         $this->idconsulta->ViewCustomAttributes = "";
         // fecha_cita
         $this->fecha_cita->ViewValue = $this->fecha_cita->CurrentValue;
         $this->fecha_cita->ViewValue = ew_FormatDateTime($this->fecha_cita->ViewValue, 5);
         $this->fecha_cita->ViewCustomAttributes = "";
         // iddoctor
         $this->iddoctor->ViewValue = $this->iddoctor->CurrentValue;
         $this->iddoctor->ViewCustomAttributes = "";
         // costo
         $this->costo->ViewValue = $this->costo->CurrentValue;
         $this->costo->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 5);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 5);
         $this->fecha_final->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // idconsulta
         $this->idconsulta->LinkCustomAttributes = "";
         $this->idconsulta->HrefValue = "";
         $this->idconsulta->TooltipValue = "";
         // fecha_cita
         $this->fecha_cita->LinkCustomAttributes = "";
         $this->fecha_cita->HrefValue = "";
         $this->fecha_cita->TooltipValue = "";
         // iddoctor
         $this->iddoctor->LinkCustomAttributes = "";
         $this->iddoctor->HrefValue = "";
         $this->iddoctor->TooltipValue = "";
         // costo
         $this->costo->LinkCustomAttributes = "";
         $this->costo->HrefValue = "";
         $this->costo->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // fecha_final
         $this->fecha_final->LinkCustomAttributes = "";
         $this->fecha_final->HrefValue = "";
         $this->fecha_final->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #15
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->NUMBER->FormValue == $this->NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->NUMBER->CurrentValue))) {
         $this->NUMBER->CurrentValue = ew_StrToFloat($this->NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // CARD_ID
     // NAME_IN_CARD
     // NUMBER
     // CARD_TYPE_ID
     // USER_ID
     $this->USER_ID->CellCssStyle = "white-space: nowrap;";
     // BANK_ID
     // VALID_THRU_MONTH
     // VALID_THRU_YEAR
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // NAME_IN_CARD
         $this->NAME_IN_CARD->ViewValue = $this->NAME_IN_CARD->CurrentValue;
         $this->NAME_IN_CARD->ViewCustomAttributes = "";
         // NUMBER
         $this->NUMBER->ViewValue = $this->NUMBER->CurrentValue;
         $this->NUMBER->ViewCustomAttributes = "";
         // CARD_TYPE_ID
         if (strval($this->CARD_TYPE_ID->CurrentValue) != "") {
             $sFilterWrk = "`CARD_TYPE_ID`" . ew_SearchString("=", $this->CARD_TYPE_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `CARD_TYPE_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `card_type`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `CARD_TYPE_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `card_type`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->CARD_TYPE_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->CARD_TYPE_ID->ViewValue = $this->CARD_TYPE_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->CARD_TYPE_ID->ViewValue = $this->CARD_TYPE_ID->CurrentValue;
             }
         } else {
             $this->CARD_TYPE_ID->ViewValue = NULL;
         }
         $this->CARD_TYPE_ID->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // VALID_THRU_MONTH
         $this->VALID_THRU_MONTH->ViewValue = $this->VALID_THRU_MONTH->CurrentValue;
         $this->VALID_THRU_MONTH->ViewCustomAttributes = "";
         // VALID_THRU_YEAR
         $this->VALID_THRU_YEAR->ViewValue = $this->VALID_THRU_YEAR->CurrentValue;
         $this->VALID_THRU_YEAR->ViewCustomAttributes = "";
         // NAME_IN_CARD
         $this->NAME_IN_CARD->LinkCustomAttributes = "";
         $this->NAME_IN_CARD->HrefValue = "";
         $this->NAME_IN_CARD->TooltipValue = "";
         // NUMBER
         $this->NUMBER->LinkCustomAttributes = "";
         $this->NUMBER->HrefValue = "";
         $this->NUMBER->TooltipValue = "";
         // CARD_TYPE_ID
         $this->CARD_TYPE_ID->LinkCustomAttributes = "";
         $this->CARD_TYPE_ID->HrefValue = "";
         $this->CARD_TYPE_ID->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // VALID_THRU_MONTH
         $this->VALID_THRU_MONTH->LinkCustomAttributes = "";
         $this->VALID_THRU_MONTH->HrefValue = "";
         $this->VALID_THRU_MONTH->TooltipValue = "";
         // VALID_THRU_YEAR
         $this->VALID_THRU_YEAR->LinkCustomAttributes = "";
         $this->VALID_THRU_YEAR->HrefValue = "";
         $this->VALID_THRU_YEAR->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) {
         $this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idconsulta
     // idcuenta
     // fecha_cita
     // iddoctor
     // costo
     // fecha_inicio
     // fecha_final
     // estado
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idconsulta
         $this->idconsulta->ViewValue = $this->idconsulta->CurrentValue;
         $this->idconsulta->ViewCustomAttributes = "";
         // idcuenta
         if (strval($this->idcuenta->CurrentValue) != "") {
             $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcuenta, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idcuenta->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue;
             }
         } else {
             $this->idcuenta->ViewValue = NULL;
         }
         $this->idcuenta->ViewCustomAttributes = "";
         // fecha_cita
         $this->fecha_cita->ViewValue = $this->fecha_cita->CurrentValue;
         $this->fecha_cita->ViewValue = ew_FormatDateTime($this->fecha_cita->ViewValue, 7);
         $this->fecha_cita->ViewCustomAttributes = "";
         // iddoctor
         if (strval($this->iddoctor->CurrentValue) != "") {
             $sFilterWrk = "`iddoctor`" . ew_SearchString("=", $this->iddoctor->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `iddoctor`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `doctor`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->iddoctor, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->iddoctor->ViewValue = $rswrk->fields('DispFld');
                 $this->iddoctor->ViewValue .= ew_ValueSeparator(2, $this->iddoctor) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->iddoctor->ViewValue = $this->iddoctor->CurrentValue;
             }
         } else {
             $this->iddoctor->ViewValue = NULL;
         }
         $this->iddoctor->ViewCustomAttributes = "";
         // costo
         $this->costo->ViewValue = $this->costo->CurrentValue;
         $this->costo->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7);
         $this->fecha_final->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // idconsulta
         $this->idconsulta->LinkCustomAttributes = "";
         $this->idconsulta->HrefValue = "";
         $this->idconsulta->TooltipValue = "";
         // idcuenta
         $this->idcuenta->LinkCustomAttributes = "";
         $this->idcuenta->HrefValue = "";
         $this->idcuenta->TooltipValue = "";
         // fecha_cita
         $this->fecha_cita->LinkCustomAttributes = "";
         $this->fecha_cita->HrefValue = "";
         $this->fecha_cita->TooltipValue = "";
         // iddoctor
         $this->iddoctor->LinkCustomAttributes = "";
         $this->iddoctor->HrefValue = "";
         $this->iddoctor->TooltipValue = "";
         // costo
         $this->costo->LinkCustomAttributes = "";
         $this->costo->HrefValue = "";
         $this->costo->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // fecha_final
         $this->fecha_final->LinkCustomAttributes = "";
         $this->fecha_final->HrefValue = "";
         $this->fecha_final->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->CODE->FormValue == $this->CODE->CurrentValue && is_numeric(ew_StrToFloat($this->CODE->CurrentValue))) {
         $this->CODE->CurrentValue = ew_StrToFloat($this->CODE->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->AMOUNT->FormValue == $this->AMOUNT->CurrentValue && is_numeric(ew_StrToFloat($this->AMOUNT->CurrentValue))) {
         $this->AMOUNT->CurrentValue = ew_StrToFloat($this->AMOUNT->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // UPLOAD_FILE_DETAIL_ID
     // CODE
     // DESCRIPTION
     // DATE
     // AMOUNT
     // UPLOAD_FILE_ID
     // UPLOAD_FILE_DETAIL_STATUS_ID
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // UPLOAD_FILE_DETAIL_ID
         $this->UPLOAD_FILE_DETAIL_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // DATE
         $this->DATE->ViewValue = $this->DATE->CurrentValue;
         $this->DATE->ViewValue = ew_FormatDateTime($this->DATE->ViewValue, 7);
         $this->DATE->ViewCustomAttributes = "";
         // AMOUNT
         $this->AMOUNT->ViewValue = $this->AMOUNT->CurrentValue;
         $this->AMOUNT->ViewCustomAttributes = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->ViewValue = $this->UPLOAD_FILE_ID->CurrentValue;
         $this->UPLOAD_FILE_ID->ViewCustomAttributes = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewCustomAttributes = "";
         // UPLOAD_FILE_DETAIL_ID
         $this->UPLOAD_FILE_DETAIL_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_ID->HrefValue = "";
         $this->UPLOAD_FILE_DETAIL_ID->TooltipValue = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // DATE
         $this->DATE->LinkCustomAttributes = "";
         $this->DATE->HrefValue = "";
         $this->DATE->TooltipValue = "";
         // AMOUNT
         $this->AMOUNT->LinkCustomAttributes = "";
         $this->AMOUNT->HrefValue = "";
         $this->AMOUNT->TooltipValue = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_ID->HrefValue = "";
         $this->UPLOAD_FILE_ID->TooltipValue = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->HrefValue = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->iva->FormValue == $this->iva->CurrentValue && is_numeric(ew_StrToFloat($this->iva->CurrentValue))) {
         $this->iva->CurrentValue = ew_StrToFloat($this->iva->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
         $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha
     // detalles
     // iva
     // Importe
     // id_tipo_gasto
     // id_hoja_mantenimiento
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // detalles
         $this->detalles->ViewValue = $this->detalles->CurrentValue;
         $this->detalles->ViewCustomAttributes = "";
         // iva
         $this->iva->ViewValue = $this->iva->CurrentValue;
         $this->iva->ViewCustomAttributes = "";
         // Importe
         $this->Importe->ViewValue = $this->Importe->CurrentValue;
         $this->Importe->ViewCustomAttributes = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
         $this->id_tipo_gasto->ViewCustomAttributes = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
         $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // detalles
         $this->detalles->LinkCustomAttributes = "";
         $this->detalles->HrefValue = "";
         $this->detalles->TooltipValue = "";
         // iva
         $this->iva->LinkCustomAttributes = "";
         $this->iva->HrefValue = "";
         $this->iva->TooltipValue = "";
         // Importe
         $this->Importe->LinkCustomAttributes = "";
         $this->Importe->HrefValue = "";
         $this->Importe->TooltipValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->LinkCustomAttributes = "";
         $this->id_tipo_gasto->HrefValue = "";
         $this->id_tipo_gasto->TooltipValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->LinkCustomAttributes = "";
         $this->id_hoja_mantenimiento->HrefValue = "";
         $this->id_hoja_mantenimiento->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Convert decimal values if posted back
     if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) {
         $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BANK_ACCOUNT_ID
     // CODE
     // DESCRIPTION
     // ACCOUNT_NUMBER
     // BANK_ID
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue;
         $this->ACCOUNT_NUMBER->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue);
         } else {
             $this->ACTIVE->ViewValue = NULL;
         }
         $this->ACTIVE->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         $this->ACCOUNT_NUMBER->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #20
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->precio_base->FormValue == $this->precio_base->CurrentValue && is_numeric(ew_StrToFloat($this->precio_base->CurrentValue))) {
         $this->precio_base->CurrentValue = ew_StrToFloat($this->precio_base->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje_comision->FormValue == $this->porcentaje_comision->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje_comision->CurrentValue))) {
         $this->porcentaje_comision->CurrentValue = ew_StrToFloat($this->porcentaje_comision->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // Tipo_carga
     // precio_base
     // porcentaje_comision
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // Tipo_carga
         $this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
         $this->Tipo_carga->ViewCustomAttributes = "";
         // precio_base
         $this->precio_base->ViewValue = $this->precio_base->CurrentValue;
         $this->precio_base->ViewValue = ew_FormatCurrency($this->precio_base->ViewValue, 2, 0, 0, -1);
         $this->precio_base->ViewCustomAttributes = "";
         // porcentaje_comision
         $this->porcentaje_comision->ViewValue = $this->porcentaje_comision->CurrentValue;
         $this->porcentaje_comision->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // Tipo_carga
         $this->Tipo_carga->LinkCustomAttributes = "";
         $this->Tipo_carga->HrefValue = "";
         $this->Tipo_carga->TooltipValue = "";
         // precio_base
         $this->precio_base->LinkCustomAttributes = "";
         $this->precio_base->HrefValue = "";
         $this->precio_base->TooltipValue = "";
         // porcentaje_comision
         $this->porcentaje_comision->LinkCustomAttributes = "";
         $this->porcentaje_comision->HrefValue = "";
         $this->porcentaje_comision->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #21
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // id_deuda
     // fecha
     // monto
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // id_deuda
         if (strval($this->id_deuda->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
             }
         } else {
             $this->id_deuda->ViewValue = NULL;
         }
         $this->id_deuda->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewCustomAttributes = "";
         // id_usuario
         if (strval($this->id_usuario->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_usuario->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `usuario` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuario`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_usuario, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_usuario->ViewValue = $rswrk->fields('DispFld');
                 $this->id_usuario->ViewValue .= ew_ValueSeparator(1, $this->id_usuario) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
             }
         } else {
             $this->id_usuario->ViewValue = NULL;
         }
         $this->id_usuario->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // id_deuda
         $this->id_deuda->LinkCustomAttributes = "";
         $this->id_deuda->HrefValue = "";
         $this->id_deuda->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_usuario
         $this->id_usuario->LinkCustomAttributes = "";
         $this->id_usuario->HrefValue = "";
         $this->id_usuario->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->CODE->FormValue == $this->CODE->CurrentValue && is_numeric(ew_StrToFloat($this->CODE->CurrentValue))) {
         $this->CODE->CurrentValue = ew_StrToFloat($this->CODE->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->AMOUNT->FormValue == $this->AMOUNT->CurrentValue && is_numeric(ew_StrToFloat($this->AMOUNT->CurrentValue))) {
         $this->AMOUNT->CurrentValue = ew_StrToFloat($this->AMOUNT->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // UPLOAD_FILE_DETAIL_ID
     // CODE
     // DESCRIPTION
     // DATE
     // AMOUNT
     // UPLOAD_FILE_ID
     // UPLOAD_FILE_DETAIL_STATUS_ID
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // UPLOAD_FILE_DETAIL_ID
         $this->UPLOAD_FILE_DETAIL_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // DATE
         $this->DATE->ViewValue = $this->DATE->CurrentValue;
         $this->DATE->ViewValue = ew_FormatDateTime($this->DATE->ViewValue, 7);
         $this->DATE->ViewCustomAttributes = "";
         // AMOUNT
         $this->AMOUNT->ViewValue = $this->AMOUNT->CurrentValue;
         $this->AMOUNT->ViewCustomAttributes = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->ViewValue = $this->UPLOAD_FILE_ID->CurrentValue;
         $this->UPLOAD_FILE_ID->ViewCustomAttributes = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewValue = $this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue;
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // DATE
         $this->DATE->LinkCustomAttributes = "";
         $this->DATE->HrefValue = "";
         $this->DATE->TooltipValue = "";
         // AMOUNT
         $this->AMOUNT->LinkCustomAttributes = "";
         $this->AMOUNT->HrefValue = "";
         $this->AMOUNT->TooltipValue = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_ID->HrefValue = "";
         $this->UPLOAD_FILE_ID->TooltipValue = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->HrefValue = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // CODE
         $this->CODE->EditAttrs["class"] = "form-control";
         $this->CODE->EditCustomAttributes = "";
         $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue);
         $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
         if (strval($this->CODE->EditValue) != "" && is_numeric($this->CODE->EditValue)) {
             $this->CODE->EditValue = ew_FormatNumber($this->CODE->EditValue, -2, -1, -2, 0);
         }
         // DESCRIPTION
         $this->DESCRIPTION->EditAttrs["class"] = "form-control";
         $this->DESCRIPTION->EditCustomAttributes = "";
         $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue);
         $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
         // DATE
         $this->DATE->EditAttrs["class"] = "form-control";
         $this->DATE->EditCustomAttributes = "";
         $this->DATE->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->DATE->CurrentValue, 7));
         $this->DATE->PlaceHolder = ew_RemoveHtml($this->DATE->FldCaption());
         // AMOUNT
         $this->AMOUNT->EditAttrs["class"] = "form-control";
         $this->AMOUNT->EditCustomAttributes = "";
         $this->AMOUNT->EditValue = ew_HtmlEncode($this->AMOUNT->CurrentValue);
         $this->AMOUNT->PlaceHolder = ew_RemoveHtml($this->AMOUNT->FldCaption());
         if (strval($this->AMOUNT->EditValue) != "" && is_numeric($this->AMOUNT->EditValue)) {
             $this->AMOUNT->EditValue = ew_FormatNumber($this->AMOUNT->EditValue, -2, -1, -2, 0);
         }
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->EditAttrs["class"] = "form-control";
         $this->UPLOAD_FILE_ID->EditCustomAttributes = "";
         $this->UPLOAD_FILE_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_ID->CurrentValue);
         $this->UPLOAD_FILE_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_ID->FldCaption());
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditAttrs["class"] = "form-control";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_DETAIL_STATUS_ID->CurrentValue);
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_DETAIL_STATUS_ID->FldCaption());
         // Add refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // DATE
         $this->DATE->LinkCustomAttributes = "";
         $this->DATE->HrefValue = "";
         // AMOUNT
         $this->AMOUNT->LinkCustomAttributes = "";
         $this->AMOUNT->HrefValue = "";
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_ID->HrefValue = "";
         // UPLOAD_FILE_DETAIL_STATUS_ID
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_DETAIL_STATUS_ID->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #23
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->iva->FormValue == $this->iva->CurrentValue && is_numeric(ew_StrToFloat($this->iva->CurrentValue))) {
         $this->iva->CurrentValue = ew_StrToFloat($this->iva->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
         $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha
     // detalles
     // iva
     // Importe
     // id_tipo_gasto
     // id_hoja_ruta
     $this->id_hoja_ruta->CellCssStyle = "white-space: nowrap;";
     // id_hoja_mantenimiento
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // detalles
         $this->detalles->ViewValue = $this->detalles->CurrentValue;
         $this->detalles->ViewCustomAttributes = "";
         // iva
         $this->iva->ViewValue = $this->iva->CurrentValue;
         $this->iva->ViewCustomAttributes = "";
         // Importe
         $this->Importe->ViewValue = $this->Importe->CurrentValue;
         $this->Importe->ViewCustomAttributes = "";
         // id_tipo_gasto
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='M'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
         $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // detalles
         $this->detalles->LinkCustomAttributes = "";
         $this->detalles->HrefValue = "";
         $this->detalles->TooltipValue = "";
         // iva
         $this->iva->LinkCustomAttributes = "";
         $this->iva->HrefValue = "";
         $this->iva->TooltipValue = "";
         // Importe
         $this->Importe->LinkCustomAttributes = "";
         $this->Importe->HrefValue = "";
         $this->Importe->TooltipValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->LinkCustomAttributes = "";
         $this->id_tipo_gasto->HrefValue = "";
         $this->id_tipo_gasto->TooltipValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->LinkCustomAttributes = "";
         $this->id_hoja_mantenimiento->HrefValue = "";
         $this->id_hoja_mantenimiento->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // codigo
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // iva
         $this->iva->EditAttrs["class"] = "form-control";
         $this->iva->EditCustomAttributes = "";
         $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue);
         $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption());
         if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) {
             $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0);
             $this->iva->OldValue = $this->iva->EditValue;
         }
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0);
             $this->Importe->OldValue = $this->Importe->EditValue;
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
         if (strval($this->id_tipo_gasto->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='M'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld'));
                 $rswrk->Close();
             } else {
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
             }
         } else {
             $this->id_tipo_gasto->EditValue = NULL;
         }
         $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption());
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control";
         $this->id_hoja_mantenimiento->EditCustomAttributes = "";
         if ($this->id_hoja_mantenimiento->getSessionValue() != "") {
             $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue();
             $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue);
             $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption());
         }
         // Edit refer script
         // codigo
         $this->codigo->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // iva
         $this->iva->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // codigo
         $this->codigo->EditAttrs["class"] = "form-control";
         $this->codigo->EditCustomAttributes = "";
         $this->codigo->EditValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // detalles
         $this->detalles->EditAttrs["class"] = "form-control";
         $this->detalles->EditCustomAttributes = "";
         $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
         $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
         // iva
         $this->iva->EditAttrs["class"] = "form-control";
         $this->iva->EditCustomAttributes = "";
         $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue);
         $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption());
         if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) {
             $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0);
             $this->iva->OldValue = $this->iva->EditValue;
         }
         // Importe
         $this->Importe->EditAttrs["class"] = "form-control";
         $this->Importe->EditCustomAttributes = "";
         $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
         $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
         if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
             $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0);
             $this->Importe->OldValue = $this->Importe->EditValue;
         }
         // id_tipo_gasto
         $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
         $this->id_tipo_gasto->EditCustomAttributes = "";
         $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
         if (strval($this->id_tipo_gasto->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
             $sWhereWrk = "";
             $lookuptblfilter = "`clase`='M'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld'));
                 $rswrk->Close();
             } else {
                 $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue);
             }
         } else {
             $this->id_tipo_gasto->EditValue = NULL;
         }
         $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption());
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control";
         $this->id_hoja_mantenimiento->EditCustomAttributes = "";
         if ($this->id_hoja_mantenimiento->getSessionValue() != "") {
             $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue();
             $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue;
             $this->id_hoja_mantenimiento->ViewCustomAttributes = "";
         } else {
             $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue);
             $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption());
         }
         // Edit refer script
         // codigo
         $this->codigo->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // detalles
         $this->detalles->HrefValue = "";
         // iva
         $this->iva->HrefValue = "";
         // Importe
         $this->Importe->HrefValue = "";
         // id_tipo_gasto
         $this->id_tipo_gasto->HrefValue = "";
         // id_hoja_mantenimiento
         $this->id_hoja_mantenimiento->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #24
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
         $this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
         $this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
         $this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha_ini
     // id_cliente
     // id_localidad_origen
     // Origen
     // id_localidad_destino
     // Destino
     // Km_ini
     // estado
     // id_vehiculo
     // id_tipo_carga
     // km_fin
     // fecha_fin
     // adelanto
     // kg_carga
     // tarifa
     // porcentaje
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // fecha_ini
         $this->fecha_ini->ViewValue = $this->fecha_ini->CurrentValue;
         $this->fecha_ini->ViewValue = ew_FormatDateTime($this->fecha_ini->ViewValue, 7);
         $this->fecha_ini->ViewCustomAttributes = "";
         // id_cliente
         if (strval($this->id_cliente->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `clientes`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `razon_social` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_cliente->ViewValue = $rswrk->fields('DispFld');
                 $this->id_cliente->ViewValue .= ew_ValueSeparator(1, $this->id_cliente) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_cliente->ViewValue = $this->id_cliente->CurrentValue;
             }
         } else {
             $this->id_cliente->ViewValue = NULL;
         }
         $this->id_cliente->ViewCustomAttributes = "";
         // id_localidad_origen
         if ($this->id_localidad_origen->VirtualValue != "") {
             $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->VirtualValue;
         } else {
             if (strval($this->id_localidad_origen->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_origen->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_origen) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_origen) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->CurrentValue;
                 }
             } else {
                 $this->id_localidad_origen->ViewValue = NULL;
             }
         }
         $this->id_localidad_origen->ViewCustomAttributes = "";
         // Origen
         $this->Origen->ViewValue = $this->Origen->CurrentValue;
         $this->Origen->ViewCustomAttributes = "";
         // id_localidad_destino
         if ($this->id_localidad_destino->VirtualValue != "") {
             $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->VirtualValue;
         } else {
             if (strval($this->id_localidad_destino->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_destino->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_destino) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_destino) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->CurrentValue;
                 }
             } else {
                 $this->id_localidad_destino->ViewValue = NULL;
             }
         }
         $this->id_localidad_destino->ViewCustomAttributes = "";
         // Destino
         $this->Destino->ViewValue = $this->Destino->CurrentValue;
         $this->Destino->ViewCustomAttributes = "";
         // Km_ini
         $this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
         $this->Km_ini->ViewValue = ew_FormatNumber($this->Km_ini->ViewValue, 0, -2, -2, -2);
         $this->Km_ini->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // id_vehiculo
         if ($this->id_vehiculo->VirtualValue != "") {
             $this->id_vehiculo->ViewValue = $this->id_vehiculo->VirtualValue;
         } else {
             if (strval($this->id_vehiculo->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vehiculos`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `nombre` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_vehiculo->ViewValue = $rswrk->fields('DispFld');
                     $this->id_vehiculo->ViewValue .= ew_ValueSeparator(1, $this->id_vehiculo) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_vehiculo->ViewValue = $this->id_vehiculo->CurrentValue;
                 }
             } else {
                 $this->id_vehiculo->ViewValue = NULL;
             }
         }
         $this->id_vehiculo->ViewCustomAttributes = "";
         // id_tipo_carga
         if ($this->id_tipo_carga->VirtualValue != "") {
             $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->VirtualValue;
         } else {
             if (strval($this->id_tipo_carga->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_cargas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_carga->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_carga->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_carga) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 2, 0, 0, -1);
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->CurrentValue;
                 }
             } else {
                 $this->id_tipo_carga->ViewValue = NULL;
             }
         }
         $this->id_tipo_carga->ViewCustomAttributes = "";
         // km_fin
         $this->km_fin->ViewValue = $this->km_fin->CurrentValue;
         $this->km_fin->ViewValue = ew_FormatNumber($this->km_fin->ViewValue, 0, -2, -2, -2);
         $this->km_fin->ViewCustomAttributes = "";
         // fecha_fin
         $this->fecha_fin->ViewValue = $this->fecha_fin->CurrentValue;
         $this->fecha_fin->ViewValue = ew_FormatDateTime($this->fecha_fin->ViewValue, 7);
         $this->fecha_fin->ViewCustomAttributes = "";
         // adelanto
         $this->adelanto->ViewValue = $this->adelanto->CurrentValue;
         $this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
         $this->adelanto->ViewCustomAttributes = "";
         // kg_carga
         $this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
         $this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 0, -2, -2, -2);
         $this->kg_carga->ViewCustomAttributes = "";
         // tarifa
         $this->tarifa->ViewValue = $this->tarifa->CurrentValue;
         $this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
         $this->tarifa->ViewCustomAttributes = "";
         // porcentaje
         $this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
         $this->porcentaje->ViewCustomAttributes = "";
         // fecha_ini
         $this->fecha_ini->LinkCustomAttributes = "";
         $this->fecha_ini->HrefValue = "";
         $this->fecha_ini->TooltipValue = "";
         // id_cliente
         $this->id_cliente->LinkCustomAttributes = "";
         $this->id_cliente->HrefValue = "";
         $this->id_cliente->TooltipValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->LinkCustomAttributes = "";
         $this->id_localidad_origen->HrefValue = "";
         $this->id_localidad_origen->TooltipValue = "";
         // Origen
         $this->Origen->LinkCustomAttributes = "";
         $this->Origen->HrefValue = "";
         $this->Origen->TooltipValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->LinkCustomAttributes = "";
         $this->id_localidad_destino->HrefValue = "";
         $this->id_localidad_destino->TooltipValue = "";
         // Destino
         $this->Destino->LinkCustomAttributes = "";
         $this->Destino->HrefValue = "";
         $this->Destino->TooltipValue = "";
         // Km_ini
         $this->Km_ini->LinkCustomAttributes = "";
         $this->Km_ini->HrefValue = "";
         $this->Km_ini->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // id_vehiculo
         $this->id_vehiculo->LinkCustomAttributes = "";
         $this->id_vehiculo->HrefValue = "";
         $this->id_vehiculo->TooltipValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->LinkCustomAttributes = "";
         $this->id_tipo_carga->HrefValue = "";
         $this->id_tipo_carga->TooltipValue = "";
         // km_fin
         $this->km_fin->LinkCustomAttributes = "";
         $this->km_fin->HrefValue = "";
         $this->km_fin->TooltipValue = "";
         // fecha_fin
         $this->fecha_fin->LinkCustomAttributes = "";
         $this->fecha_fin->HrefValue = "";
         $this->fecha_fin->TooltipValue = "";
         // adelanto
         $this->adelanto->LinkCustomAttributes = "";
         $this->adelanto->HrefValue = "";
         $this->adelanto->TooltipValue = "";
         // kg_carga
         $this->kg_carga->LinkCustomAttributes = "";
         $this->kg_carga->HrefValue = "";
         $this->kg_carga->TooltipValue = "";
         // tarifa
         $this->tarifa->LinkCustomAttributes = "";
         $this->tarifa->HrefValue = "";
         $this->tarifa->TooltipValue = "";
         // porcentaje
         $this->porcentaje->LinkCustomAttributes = "";
         $this->porcentaje->HrefValue = "";
         $this->porcentaje->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // fecha_ini
         $this->fecha_ini->EditAttrs["class"] = "form-control";
         $this->fecha_ini->EditCustomAttributes = "";
         $this->fecha_ini->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_ini->CurrentValue, 7));
         $this->fecha_ini->PlaceHolder = ew_RemoveHtml($this->fecha_ini->FldCaption());
         // id_cliente
         $this->id_cliente->EditAttrs["class"] = "form-control";
         $this->id_cliente->EditCustomAttributes = "";
         if (trim(strval($this->id_cliente->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `clientes`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `razon_social` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_cliente->EditValue = $arwrk;
         // id_localidad_origen
         $this->id_localidad_origen->EditAttrs["class"] = "form-control";
         $this->id_localidad_origen->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_origen->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_origen->EditValue = $arwrk;
         // Origen
         $this->Origen->EditAttrs["class"] = "form-control";
         $this->Origen->EditCustomAttributes = "";
         $this->Origen->EditValue = ew_HtmlEncode($this->Origen->CurrentValue);
         $this->Origen->PlaceHolder = ew_RemoveHtml($this->Origen->FldCaption());
         // id_localidad_destino
         $this->id_localidad_destino->EditAttrs["class"] = "form-control";
         $this->id_localidad_destino->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_destino->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_destino->EditValue = $arwrk;
         // Destino
         $this->Destino->EditAttrs["class"] = "form-control";
         $this->Destino->EditCustomAttributes = "";
         $this->Destino->EditValue = ew_HtmlEncode($this->Destino->CurrentValue);
         $this->Destino->PlaceHolder = ew_RemoveHtml($this->Destino->FldCaption());
         // Km_ini
         $this->Km_ini->EditAttrs["class"] = "form-control";
         $this->Km_ini->EditCustomAttributes = "";
         $this->Km_ini->EditValue = ew_HtmlEncode($this->Km_ini->CurrentValue);
         $this->Km_ini->PlaceHolder = ew_RemoveHtml($this->Km_ini->FldCaption());
         // estado
         $this->estado->EditAttrs["class"] = "form-control";
         $this->estado->EditCustomAttributes = "";
         $this->estado->EditValue = ew_HtmlEncode($this->estado->CurrentValue);
         $this->estado->PlaceHolder = ew_RemoveHtml($this->estado->FldCaption());
         // id_vehiculo
         $this->id_vehiculo->EditAttrs["class"] = "form-control";
         $this->id_vehiculo->EditCustomAttributes = "";
         if (trim(strval($this->id_vehiculo->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vehiculos`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `nombre` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_vehiculo->EditValue = $arwrk;
         // id_tipo_carga
         $this->id_tipo_carga->EditAttrs["class"] = "form-control";
         $this->id_tipo_carga->EditCustomAttributes = "";
         if (trim(strval($this->id_tipo_carga->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_cargas`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         $rowswrk = count($arwrk);
         for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
             $arwrk[$rowcntwrk][2] = ew_FormatCurrency($arwrk[$rowcntwrk][2], 2, 0, 0, -1);
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_tipo_carga->EditValue = $arwrk;
         // km_fin
         $this->km_fin->EditAttrs["class"] = "form-control";
         $this->km_fin->EditCustomAttributes = "";
         $this->km_fin->EditValue = ew_HtmlEncode($this->km_fin->CurrentValue);
         $this->km_fin->PlaceHolder = ew_RemoveHtml($this->km_fin->FldCaption());
         // fecha_fin
         $this->fecha_fin->EditAttrs["class"] = "form-control";
         $this->fecha_fin->EditCustomAttributes = "";
         $this->fecha_fin->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_fin->CurrentValue, 7));
         $this->fecha_fin->PlaceHolder = ew_RemoveHtml($this->fecha_fin->FldCaption());
         // adelanto
         $this->adelanto->EditAttrs["class"] = "form-control";
         $this->adelanto->EditCustomAttributes = "";
         $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->CurrentValue);
         $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
         if (strval($this->adelanto->EditValue) != "" && is_numeric($this->adelanto->EditValue)) {
             $this->adelanto->EditValue = ew_FormatNumber($this->adelanto->EditValue, -2, -2, -2, -2);
         }
         // kg_carga
         $this->kg_carga->EditAttrs["class"] = "form-control";
         $this->kg_carga->EditCustomAttributes = "";
         $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->CurrentValue);
         $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
         // tarifa
         $this->tarifa->EditAttrs["class"] = "form-control";
         $this->tarifa->EditCustomAttributes = "";
         $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->CurrentValue);
         $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
         if (strval($this->tarifa->EditValue) != "" && is_numeric($this->tarifa->EditValue)) {
             $this->tarifa->EditValue = ew_FormatNumber($this->tarifa->EditValue, -2, -2, -2, -2);
         }
         // porcentaje
         $this->porcentaje->EditAttrs["class"] = "form-control";
         $this->porcentaje->EditCustomAttributes = "";
         $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->CurrentValue);
         $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
         if (strval($this->porcentaje->EditValue) != "" && is_numeric($this->porcentaje->EditValue)) {
             $this->porcentaje->EditValue = ew_FormatNumber($this->porcentaje->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // fecha_ini
         $this->fecha_ini->HrefValue = "";
         // id_cliente
         $this->id_cliente->HrefValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->HrefValue = "";
         // Origen
         $this->Origen->HrefValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->HrefValue = "";
         // Destino
         $this->Destino->HrefValue = "";
         // Km_ini
         $this->Km_ini->HrefValue = "";
         // estado
         $this->estado->HrefValue = "";
         // id_vehiculo
         $this->id_vehiculo->HrefValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->HrefValue = "";
         // km_fin
         $this->km_fin->HrefValue = "";
         // fecha_fin
         $this->fecha_fin->HrefValue = "";
         // adelanto
         $this->adelanto->HrefValue = "";
         // kg_carga
         $this->kg_carga->HrefValue = "";
         // tarifa
         $this->tarifa->HrefValue = "";
         // porcentaje
         $this->porcentaje->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #25
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->importe->FormValue == $this->importe->CurrentValue && is_numeric(ew_StrToFloat($this->importe->CurrentValue))) {
         $this->importe->CurrentValue = ew_StrToFloat($this->importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // descripcion
     // importe
     // fecha_creacion
     // activa
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->ViewValue = $this->descripcion->CurrentValue;
         $this->descripcion->ViewCustomAttributes = "";
         // importe
         $this->importe->ViewValue = $this->importe->CurrentValue;
         $this->importe->ViewValue = ew_FormatCurrency($this->importe->ViewValue, 0, -2, -2, -2);
         $this->importe->ViewCustomAttributes = "";
         // fecha_creacion
         $this->fecha_creacion->ViewValue = $this->fecha_creacion->CurrentValue;
         $this->fecha_creacion->ViewValue = ew_FormatDateTime($this->fecha_creacion->ViewValue, 7);
         $this->fecha_creacion->ViewCustomAttributes = "";
         // activa
         if (strval($this->activa->CurrentValue) != "") {
             switch ($this->activa->CurrentValue) {
                 case $this->activa->FldTagValue(1):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(1) != "" ? $this->activa->FldTagCaption(1) : $this->activa->CurrentValue;
                     break;
                 case $this->activa->FldTagValue(2):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(2) != "" ? $this->activa->FldTagCaption(2) : $this->activa->CurrentValue;
                     break;
                 default:
                     $this->activa->ViewValue = $this->activa->CurrentValue;
             }
         } else {
             $this->activa->ViewValue = NULL;
         }
         $this->activa->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->LinkCustomAttributes = "";
         $this->descripcion->HrefValue = "";
         $this->descripcion->TooltipValue = "";
         // importe
         $this->importe->LinkCustomAttributes = "";
         $this->importe->HrefValue = "";
         $this->importe->TooltipValue = "";
         // fecha_creacion
         $this->fecha_creacion->LinkCustomAttributes = "";
         $this->fecha_creacion->HrefValue = "";
         $this->fecha_creacion->TooltipValue = "";
         // activa
         $this->activa->LinkCustomAttributes = "";
         $this->activa->HrefValue = "";
         $this->activa->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // descripcion
         $this->descripcion->EditAttrs["class"] = "form-control";
         $this->descripcion->EditCustomAttributes = "";
         $this->descripcion->EditValue = ew_HtmlEncode($this->descripcion->CurrentValue);
         $this->descripcion->PlaceHolder = ew_RemoveHtml($this->descripcion->FldCaption());
         // importe
         $this->importe->EditAttrs["class"] = "form-control";
         $this->importe->EditCustomAttributes = "";
         $this->importe->EditValue = ew_HtmlEncode($this->importe->CurrentValue);
         $this->importe->PlaceHolder = ew_RemoveHtml($this->importe->FldCaption());
         if (strval($this->importe->EditValue) != "" && is_numeric($this->importe->EditValue)) {
             $this->importe->EditValue = ew_FormatNumber($this->importe->EditValue, -2, -2, -2, -2);
         }
         // fecha_creacion
         $this->fecha_creacion->EditAttrs["class"] = "form-control";
         $this->fecha_creacion->EditCustomAttributes = "";
         $this->fecha_creacion->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_creacion->CurrentValue, 7));
         $this->fecha_creacion->PlaceHolder = ew_RemoveHtml($this->fecha_creacion->FldCaption());
         // activa
         $this->activa->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activa->FldTagValue(1), $this->activa->FldTagCaption(1) != "" ? $this->activa->FldTagCaption(1) : $this->activa->FldTagValue(1));
         $arwrk[] = array($this->activa->FldTagValue(2), $this->activa->FldTagCaption(2) != "" ? $this->activa->FldTagCaption(2) : $this->activa->FldTagValue(2));
         $this->activa->EditValue = $arwrk;
         // Edit refer script
         // descripcion
         $this->descripcion->HrefValue = "";
         // importe
         $this->importe->HrefValue = "";
         // fecha_creacion
         $this->fecha_creacion->HrefValue = "";
         // activa
         $this->activa->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #26
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->BOARDING_ID->FormValue == $this->BOARDING_ID->CurrentValue && is_numeric(ew_StrToFloat($this->BOARDING_ID->CurrentValue))) {
         $this->BOARDING_ID->CurrentValue = ew_StrToFloat($this->BOARDING_ID->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->WEIGHT->FormValue == $this->WEIGHT->CurrentValue && is_numeric(ew_StrToFloat($this->WEIGHT->CurrentValue))) {
         $this->WEIGHT->CurrentValue = ew_StrToFloat($this->WEIGHT->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BAGGAGE_ID
     // BOARDING_ID
     // PASSANGER_ID
     // WEIGHT
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // BAGGAGE_ID
         $this->BAGGAGE_ID->ViewValue = $this->BAGGAGE_ID->CurrentValue;
         $this->BAGGAGE_ID->ViewCustomAttributes = "";
         // BOARDING_ID
         $this->BOARDING_ID->ViewValue = $this->BOARDING_ID->CurrentValue;
         $this->BOARDING_ID->ViewCustomAttributes = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->ViewValue = $this->PASSANGER_ID->CurrentValue;
         $this->PASSANGER_ID->ViewCustomAttributes = "";
         // WEIGHT
         $this->WEIGHT->ViewValue = $this->WEIGHT->CurrentValue;
         $this->WEIGHT->ViewCustomAttributes = "";
         // BAGGAGE_ID
         $this->BAGGAGE_ID->LinkCustomAttributes = "";
         $this->BAGGAGE_ID->HrefValue = "";
         $this->BAGGAGE_ID->TooltipValue = "";
         // BOARDING_ID
         $this->BOARDING_ID->LinkCustomAttributes = "";
         $this->BOARDING_ID->HrefValue = "";
         $this->BOARDING_ID->TooltipValue = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         $this->PASSANGER_ID->TooltipValue = "";
         // WEIGHT
         $this->WEIGHT->LinkCustomAttributes = "";
         $this->WEIGHT->HrefValue = "";
         $this->WEIGHT->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // BAGGAGE_ID
         $this->BAGGAGE_ID->EditAttrs["class"] = "form-control";
         $this->BAGGAGE_ID->EditCustomAttributes = "";
         $this->BAGGAGE_ID->EditValue = $this->BAGGAGE_ID->CurrentValue;
         $this->BAGGAGE_ID->ViewCustomAttributes = "";
         // BOARDING_ID
         $this->BOARDING_ID->EditAttrs["class"] = "form-control";
         $this->BOARDING_ID->EditCustomAttributes = "";
         $this->BOARDING_ID->EditValue = ew_HtmlEncode($this->BOARDING_ID->CurrentValue);
         $this->BOARDING_ID->PlaceHolder = ew_RemoveHtml($this->BOARDING_ID->FldCaption());
         if (strval($this->BOARDING_ID->EditValue) != "" && is_numeric($this->BOARDING_ID->EditValue)) {
             $this->BOARDING_ID->EditValue = ew_FormatNumber($this->BOARDING_ID->EditValue, -2, -1, -2, 0);
         }
         // PASSANGER_ID
         $this->PASSANGER_ID->EditAttrs["class"] = "form-control";
         $this->PASSANGER_ID->EditCustomAttributes = "";
         $this->PASSANGER_ID->EditValue = ew_HtmlEncode($this->PASSANGER_ID->CurrentValue);
         $this->PASSANGER_ID->PlaceHolder = ew_RemoveHtml($this->PASSANGER_ID->FldCaption());
         // WEIGHT
         $this->WEIGHT->EditAttrs["class"] = "form-control";
         $this->WEIGHT->EditCustomAttributes = "";
         $this->WEIGHT->EditValue = ew_HtmlEncode($this->WEIGHT->CurrentValue);
         $this->WEIGHT->PlaceHolder = ew_RemoveHtml($this->WEIGHT->FldCaption());
         if (strval($this->WEIGHT->EditValue) != "" && is_numeric($this->WEIGHT->EditValue)) {
             $this->WEIGHT->EditValue = ew_FormatNumber($this->WEIGHT->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // BAGGAGE_ID
         $this->BAGGAGE_ID->LinkCustomAttributes = "";
         $this->BAGGAGE_ID->HrefValue = "";
         // BOARDING_ID
         $this->BOARDING_ID->LinkCustomAttributes = "";
         $this->BOARDING_ID->HrefValue = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         // WEIGHT
         $this->WEIGHT->LinkCustomAttributes = "";
         $this->WEIGHT->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) {
         $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // BANK_ACCOUNT_ID
     // CODE
     // DESCRIPTION
     // ACCOUNT_NUMBER
     // BANK_ID
     // ACTIVE
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue;
         $this->ACCOUNT_NUMBER->ViewCustomAttributes = "";
         // BANK_ID
         if (strval($this->BANK_ID->CurrentValue) != "") {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
             switch (@$gsLanguage) {
                 case "es":
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
                 default:
                     $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
                     $sWhereWrk = "";
                     break;
             }
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
             // Call Lookup selecting
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = Conn()->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $arwrk = array();
                 $arwrk[1] = $rswrk->fields('DispFld');
                 $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
             }
         } else {
             $this->BANK_ID->ViewValue = NULL;
         }
         $this->BANK_ID->ViewCustomAttributes = "";
         // ACTIVE
         if (strval($this->ACTIVE->CurrentValue) != "") {
             $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue);
         } else {
             $this->ACTIVE->ViewValue = NULL;
         }
         $this->ACTIVE->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         $this->ACCOUNT_NUMBER->TooltipValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         $this->BANK_ID->TooltipValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
         $this->ACTIVE->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // CODE
         $this->CODE->EditAttrs["class"] = "form-control";
         $this->CODE->EditCustomAttributes = "";
         $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue);
         $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption());
         // DESCRIPTION
         $this->DESCRIPTION->EditAttrs["class"] = "form-control";
         $this->DESCRIPTION->EditCustomAttributes = "";
         $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue);
         $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->EditAttrs["class"] = "form-control";
         $this->ACCOUNT_NUMBER->EditCustomAttributes = "";
         $this->ACCOUNT_NUMBER->EditValue = ew_HtmlEncode($this->ACCOUNT_NUMBER->CurrentValue);
         $this->ACCOUNT_NUMBER->PlaceHolder = ew_RemoveHtml($this->ACCOUNT_NUMBER->FldCaption());
         if (strval($this->ACCOUNT_NUMBER->EditValue) != "" && is_numeric($this->ACCOUNT_NUMBER->EditValue)) {
             $this->ACCOUNT_NUMBER->EditValue = ew_FormatNumber($this->ACCOUNT_NUMBER->EditValue, -2, -1, -2, 0);
         }
         // BANK_ID
         $this->BANK_ID->EditAttrs["class"] = "form-control";
         $this->BANK_ID->EditCustomAttributes = "";
         if (trim(strval($this->BANK_ID->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
         }
         switch (@$gsLanguage) {
             case "es":
                 $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`";
                 $sWhereWrk = "";
                 break;
             default:
                 $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`";
                 $sWhereWrk = "";
                 break;
         }
         ew_AddFilter($sWhereWrk, $sFilterWrk);
         $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
         // Call Lookup selecting
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = Conn()->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->BANK_ID->EditValue = $arwrk;
         // ACTIVE
         $this->ACTIVE->EditAttrs["class"] = "form-control";
         $this->ACTIVE->EditCustomAttributes = "";
         $this->ACTIVE->EditValue = $this->ACTIVE->Options(TRUE);
         // Edit refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // ACCOUNT_NUMBER
         $this->ACCOUNT_NUMBER->LinkCustomAttributes = "";
         $this->ACCOUNT_NUMBER->HrefValue = "";
         // BANK_ID
         $this->BANK_ID->LinkCustomAttributes = "";
         $this->BANK_ID->HrefValue = "";
         // ACTIVE
         $this->ACTIVE->LinkCustomAttributes = "";
         $this->ACTIVE->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #28
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->population->FormValue == $this->population->CurrentValue && is_numeric(ew_StrToFloat($this->population->CurrentValue))) {
         $this->population->CurrentValue = ew_StrToFloat($this->population->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // name
     // address
     // localAddress
     // localSubnetMask
     // port
     // icon
     // flag
     // timezone
     // allowedSecurityLevel
     // population
     // gamebuild
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // address
         $this->address->ViewValue = $this->address->CurrentValue;
         $this->address->ViewCustomAttributes = "";
         // localAddress
         $this->localAddress->ViewValue = $this->localAddress->CurrentValue;
         $this->localAddress->ViewCustomAttributes = "";
         // port
         $this->port->ViewValue = $this->port->CurrentValue;
         $this->port->ViewCustomAttributes = "";
         // icon
         if (strval($this->icon->CurrentValue) != "") {
             switch ($this->icon->CurrentValue) {
                 case $this->icon->FldTagValue(1):
                     $this->icon->ViewValue = $this->icon->FldTagCaption(1) != "" ? $this->icon->FldTagCaption(1) : $this->icon->CurrentValue;
                     break;
                 case $this->icon->FldTagValue(2):
                     $this->icon->ViewValue = $this->icon->FldTagCaption(2) != "" ? $this->icon->FldTagCaption(2) : $this->icon->CurrentValue;
                     break;
                 case $this->icon->FldTagValue(3):
                     $this->icon->ViewValue = $this->icon->FldTagCaption(3) != "" ? $this->icon->FldTagCaption(3) : $this->icon->CurrentValue;
                     break;
                 case $this->icon->FldTagValue(4):
                     $this->icon->ViewValue = $this->icon->FldTagCaption(4) != "" ? $this->icon->FldTagCaption(4) : $this->icon->CurrentValue;
                     break;
                 case $this->icon->FldTagValue(5):
                     $this->icon->ViewValue = $this->icon->FldTagCaption(5) != "" ? $this->icon->FldTagCaption(5) : $this->icon->CurrentValue;
                     break;
                 default:
                     $this->icon->ViewValue = $this->icon->CurrentValue;
             }
         } else {
             $this->icon->ViewValue = NULL;
         }
         $this->icon->ViewCustomAttributes = "";
         // timezone
         if (strval($this->timezone->CurrentValue) != "") {
             switch ($this->timezone->CurrentValue) {
                 case $this->timezone->FldTagValue(1):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(1) != "" ? $this->timezone->FldTagCaption(1) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(2):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(2) != "" ? $this->timezone->FldTagCaption(2) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(3):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(3) != "" ? $this->timezone->FldTagCaption(3) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(4):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(4) != "" ? $this->timezone->FldTagCaption(4) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(5):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(5) != "" ? $this->timezone->FldTagCaption(5) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(6):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(6) != "" ? $this->timezone->FldTagCaption(6) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(7):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(7) != "" ? $this->timezone->FldTagCaption(7) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(8):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(8) != "" ? $this->timezone->FldTagCaption(8) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(9):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(9) != "" ? $this->timezone->FldTagCaption(9) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(10):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(10) != "" ? $this->timezone->FldTagCaption(10) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(11):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(11) != "" ? $this->timezone->FldTagCaption(11) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(12):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(12) != "" ? $this->timezone->FldTagCaption(12) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(13):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(13) != "" ? $this->timezone->FldTagCaption(13) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(14):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(14) != "" ? $this->timezone->FldTagCaption(14) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(15):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(15) != "" ? $this->timezone->FldTagCaption(15) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(16):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(16) != "" ? $this->timezone->FldTagCaption(16) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(17):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(17) != "" ? $this->timezone->FldTagCaption(17) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(18):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(18) != "" ? $this->timezone->FldTagCaption(18) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(19):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(19) != "" ? $this->timezone->FldTagCaption(19) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(20):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(20) != "" ? $this->timezone->FldTagCaption(20) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(21):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(21) != "" ? $this->timezone->FldTagCaption(21) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(22):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(22) != "" ? $this->timezone->FldTagCaption(22) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(23):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(23) != "" ? $this->timezone->FldTagCaption(23) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(24):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(24) != "" ? $this->timezone->FldTagCaption(24) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(25):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(25) != "" ? $this->timezone->FldTagCaption(25) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(26):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(26) != "" ? $this->timezone->FldTagCaption(26) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(27):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(27) != "" ? $this->timezone->FldTagCaption(27) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(28):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(28) != "" ? $this->timezone->FldTagCaption(28) : $this->timezone->CurrentValue;
                     break;
                 case $this->timezone->FldTagValue(29):
                     $this->timezone->ViewValue = $this->timezone->FldTagCaption(29) != "" ? $this->timezone->FldTagCaption(29) : $this->timezone->CurrentValue;
                     break;
                 default:
                     $this->timezone->ViewValue = $this->timezone->CurrentValue;
             }
         } else {
             $this->timezone->ViewValue = NULL;
         }
         $this->timezone->ViewCustomAttributes = "";
         // allowedSecurityLevel
         $this->allowedSecurityLevel->ViewValue = $this->allowedSecurityLevel->CurrentValue;
         $this->allowedSecurityLevel->ViewCustomAttributes = "";
         // population
         $this->population->ViewValue = $this->population->CurrentValue;
         $this->population->ViewCustomAttributes = "";
         // gamebuild
         $this->gamebuild->ViewValue = $this->gamebuild->CurrentValue;
         $this->gamebuild->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // address
         $this->address->LinkCustomAttributes = "";
         $this->address->HrefValue = "";
         $this->address->TooltipValue = "";
         // localAddress
         $this->localAddress->LinkCustomAttributes = "";
         $this->localAddress->HrefValue = "";
         $this->localAddress->TooltipValue = "";
         // port
         $this->port->LinkCustomAttributes = "";
         $this->port->HrefValue = "";
         $this->port->TooltipValue = "";
         // icon
         $this->icon->LinkCustomAttributes = "";
         $this->icon->HrefValue = "";
         $this->icon->TooltipValue = "";
         // timezone
         $this->timezone->LinkCustomAttributes = "";
         $this->timezone->HrefValue = "";
         $this->timezone->TooltipValue = "";
         // allowedSecurityLevel
         $this->allowedSecurityLevel->LinkCustomAttributes = "";
         $this->allowedSecurityLevel->HrefValue = "";
         $this->allowedSecurityLevel->TooltipValue = "";
         // population
         $this->population->LinkCustomAttributes = "";
         $this->population->HrefValue = "";
         $this->population->TooltipValue = "";
         // gamebuild
         $this->gamebuild->LinkCustomAttributes = "";
         $this->gamebuild->HrefValue = "";
         $this->gamebuild->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Example #29
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->importe->FormValue == $this->importe->CurrentValue && is_numeric(ew_StrToFloat($this->importe->CurrentValue))) {
         $this->importe->CurrentValue = ew_StrToFloat($this->importe->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // descripcion
     // importe
     // fecha_creacion
     // activa
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->ViewValue = $this->descripcion->CurrentValue;
         $this->descripcion->ViewCustomAttributes = "";
         // importe
         $this->importe->ViewValue = $this->importe->CurrentValue;
         $this->importe->ViewCustomAttributes = "";
         // fecha_creacion
         $this->fecha_creacion->ViewValue = $this->fecha_creacion->CurrentValue;
         $this->fecha_creacion->ViewValue = ew_FormatDateTime($this->fecha_creacion->ViewValue, 7);
         $this->fecha_creacion->ViewCustomAttributes = "";
         // activa
         if (strval($this->activa->CurrentValue) != "") {
             switch ($this->activa->CurrentValue) {
                 case $this->activa->FldTagValue(1):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(1) != "" ? $this->activa->FldTagCaption(1) : $this->activa->CurrentValue;
                     break;
                 case $this->activa->FldTagValue(2):
                     $this->activa->ViewValue = $this->activa->FldTagCaption(2) != "" ? $this->activa->FldTagCaption(2) : $this->activa->CurrentValue;
                     break;
                 default:
                     $this->activa->ViewValue = $this->activa->CurrentValue;
             }
         } else {
             $this->activa->ViewValue = NULL;
         }
         $this->activa->ViewCustomAttributes = "";
         // id_usuario
         $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
         $this->id_usuario->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // descripcion
         $this->descripcion->LinkCustomAttributes = "";
         $this->descripcion->HrefValue = "";
         $this->descripcion->TooltipValue = "";
         // importe
         $this->importe->LinkCustomAttributes = "";
         $this->importe->HrefValue = "";
         $this->importe->TooltipValue = "";
         // fecha_creacion
         $this->fecha_creacion->LinkCustomAttributes = "";
         $this->fecha_creacion->HrefValue = "";
         $this->fecha_creacion->TooltipValue = "";
         // activa
         $this->activa->LinkCustomAttributes = "";
         $this->activa->HrefValue = "";
         $this->activa->TooltipValue = "";
         // id_usuario
         $this->id_usuario->LinkCustomAttributes = "";
         $this->id_usuario->HrefValue = "";
         $this->id_usuario->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Convert decimal values if posted back
     if ($this->TIME_LIMIT->FormValue == $this->TIME_LIMIT->CurrentValue && is_numeric(ew_StrToFloat($this->TIME_LIMIT->CurrentValue))) {
         $this->TIME_LIMIT->CurrentValue = ew_StrToFloat($this->TIME_LIMIT->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->TICKET_NUMBER_TIME_LIMIT->FormValue == $this->TICKET_NUMBER_TIME_LIMIT->CurrentValue && is_numeric(ew_StrToFloat($this->TICKET_NUMBER_TIME_LIMIT->CurrentValue))) {
         $this->TICKET_NUMBER_TIME_LIMIT->CurrentValue = ew_StrToFloat($this->TICKET_NUMBER_TIME_LIMIT->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->TICKET_NUMBER->FormValue == $this->TICKET_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->TICKET_NUMBER->CurrentValue))) {
         $this->TICKET_NUMBER->CurrentValue = ew_StrToFloat($this->TICKET_NUMBER->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // RESERVATION_ID
     // CODE
     // DESCRIPTION
     // TIME_LIMIT
     // TICKET_NUMBER_TIME_LIMIT
     // TICKET_NUMBER
     // RESERVATION_STATUS_ID
     // ADITIONAL_INFO
     // DATETIME
     // USER_ID
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // RESERVATION_ID
         $this->RESERVATION_ID->ViewValue = $this->RESERVATION_ID->CurrentValue;
         $this->RESERVATION_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // TIME_LIMIT
         $this->TIME_LIMIT->ViewValue = $this->TIME_LIMIT->CurrentValue;
         $this->TIME_LIMIT->ViewCustomAttributes = "";
         // TICKET_NUMBER_TIME_LIMIT
         $this->TICKET_NUMBER_TIME_LIMIT->ViewValue = $this->TICKET_NUMBER_TIME_LIMIT->CurrentValue;
         $this->TICKET_NUMBER_TIME_LIMIT->ViewCustomAttributes = "";
         // TICKET_NUMBER
         $this->TICKET_NUMBER->ViewValue = $this->TICKET_NUMBER->CurrentValue;
         $this->TICKET_NUMBER->ViewCustomAttributes = "";
         // RESERVATION_STATUS_ID
         $this->RESERVATION_STATUS_ID->ViewValue = $this->RESERVATION_STATUS_ID->CurrentValue;
         $this->RESERVATION_STATUS_ID->ViewCustomAttributes = "";
         // ADITIONAL_INFO
         $this->ADITIONAL_INFO->ViewValue = $this->ADITIONAL_INFO->CurrentValue;
         $this->ADITIONAL_INFO->ViewCustomAttributes = "";
         // DATETIME
         $this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;
         $this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 7);
         $this->DATETIME->ViewCustomAttributes = "";
         // USER_ID
         $this->USER_ID->ViewValue = $this->USER_ID->CurrentValue;
         $this->USER_ID->ViewCustomAttributes = "";
         // RESERVATION_ID
         $this->RESERVATION_ID->LinkCustomAttributes = "";
         $this->RESERVATION_ID->HrefValue = "";
         $this->RESERVATION_ID->TooltipValue = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // TIME_LIMIT
         $this->TIME_LIMIT->LinkCustomAttributes = "";
         $this->TIME_LIMIT->HrefValue = "";
         $this->TIME_LIMIT->TooltipValue = "";
         // TICKET_NUMBER_TIME_LIMIT
         $this->TICKET_NUMBER_TIME_LIMIT->LinkCustomAttributes = "";
         $this->TICKET_NUMBER_TIME_LIMIT->HrefValue = "";
         $this->TICKET_NUMBER_TIME_LIMIT->TooltipValue = "";
         // TICKET_NUMBER
         $this->TICKET_NUMBER->LinkCustomAttributes = "";
         $this->TICKET_NUMBER->HrefValue = "";
         $this->TICKET_NUMBER->TooltipValue = "";
         // RESERVATION_STATUS_ID
         $this->RESERVATION_STATUS_ID->LinkCustomAttributes = "";
         $this->RESERVATION_STATUS_ID->HrefValue = "";
         $this->RESERVATION_STATUS_ID->TooltipValue = "";
         // ADITIONAL_INFO
         $this->ADITIONAL_INFO->LinkCustomAttributes = "";
         $this->ADITIONAL_INFO->HrefValue = "";
         $this->ADITIONAL_INFO->TooltipValue = "";
         // DATETIME
         $this->DATETIME->LinkCustomAttributes = "";
         $this->DATETIME->HrefValue = "";
         $this->DATETIME->TooltipValue = "";
         // USER_ID
         $this->USER_ID->LinkCustomAttributes = "";
         $this->USER_ID->HrefValue = "";
         $this->USER_ID->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }