function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // idempleado
     $this->idempleado->EditAttrs["class"] = "form-control";
     $this->idempleado->EditCustomAttributes = "";
     $this->idempleado->EditValue = $this->idempleado->CurrentValue;
     $this->idempleado->ViewCustomAttributes = "";
     // nombre
     $this->nombre->EditAttrs["class"] = "form-control";
     $this->nombre->EditCustomAttributes = "";
     $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
     $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());
     // apellido
     $this->apellido->EditAttrs["class"] = "form-control";
     $this->apellido->EditCustomAttributes = "";
     $this->apellido->EditValue = ew_HtmlEncode($this->apellido->CurrentValue);
     $this->apellido->PlaceHolder = ew_RemoveHtml($this->apellido->FldCaption());
     // cui
     $this->cui->EditAttrs["class"] = "form-control";
     $this->cui->EditCustomAttributes = "";
     $this->cui->EditValue = ew_HtmlEncode($this->cui->CurrentValue);
     $this->cui->PlaceHolder = ew_RemoveHtml($this->cui->FldCaption());
     // telefono
     $this->telefono->EditAttrs["class"] = "form-control";
     $this->telefono->EditCustomAttributes = "";
     $this->telefono->EditValue = ew_HtmlEncode($this->telefono->CurrentValue);
     $this->telefono->PlaceHolder = ew_RemoveHtml($this->telefono->FldCaption());
     // direccion
     $this->direccion->EditAttrs["class"] = "form-control";
     $this->direccion->EditCustomAttributes = "";
     $this->direccion->EditValue = ew_HtmlEncode($this->direccion->CurrentValue);
     $this->direccion->PlaceHolder = ew_RemoveHtml($this->direccion->FldCaption());
     // estado
     $this->estado->EditCustomAttributes = "";
     $arwrk = array();
     $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
     $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
     $this->estado->EditValue = $arwrk;
     // idhospital
     $this->idhospital->EditAttrs["class"] = "form-control";
     $this->idhospital->EditCustomAttributes = "";
     if ($this->idhospital->getSessionValue() != "") {
         $this->idhospital->CurrentValue = $this->idhospital->getSessionValue();
         if (strval($this->idhospital->CurrentValue) != "") {
             $sFilterWrk = "`idhospital`" . ew_SearchString("=", $this->idhospital->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idhospital`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hospital`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idhospital, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idhospital->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idhospital->ViewValue = $this->idhospital->CurrentValue;
             }
         } else {
             $this->idhospital->ViewValue = NULL;
         }
         $this->idhospital->ViewCustomAttributes = "";
     } else {
     }
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Esempio n. 2
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // tipo_gasto
     $this->tipo_gasto->EditAttrs["class"] = "form-control";
     $this->tipo_gasto->EditCustomAttributes = "";
     $this->tipo_gasto->EditValue = ew_HtmlEncode($this->tipo_gasto->CurrentValue);
     $this->tipo_gasto->PlaceHolder = ew_RemoveHtml($this->tipo_gasto->FldCaption());
     // clase
     $this->clase->EditCustomAttributes = "";
     $arwrk = array();
     $arwrk[] = array($this->clase->FldTagValue(1), $this->clase->FldTagCaption(1) != "" ? $this->clase->FldTagCaption(1) : $this->clase->FldTagValue(1));
     $arwrk[] = array($this->clase->FldTagValue(2), $this->clase->FldTagCaption(2) != "" ? $this->clase->FldTagCaption(2) : $this->clase->FldTagValue(2));
     $this->clase->EditValue = $arwrk;
     // Call Row Rendered event
     $this->Row_Rendered();
 }
 function RenderEditRow()
 {
     global $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // CARD_TYPE_ID
     $this->CARD_TYPE_ID->EditAttrs["class"] = "form-control";
     $this->CARD_TYPE_ID->EditCustomAttributes = "";
     $this->CARD_TYPE_ID->EditValue = $this->CARD_TYPE_ID->CurrentValue;
     $this->CARD_TYPE_ID->ViewCustomAttributes = "";
     // DESCRIPTION
     $this->DESCRIPTION->EditAttrs["class"] = "form-control";
     $this->DESCRIPTION->EditCustomAttributes = "";
     $this->DESCRIPTION->EditValue = $this->DESCRIPTION->CurrentValue;
     $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption());
     // Call Row Rendered event
     $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();
     }
 }
Esempio n. 5
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // memberID
     // name
     // email
     // joined
     // facebook
     // twitter
     // twitch
     // skype
     // birthday
     // profession
     // game_type
     // division
     // has_expansion
     // notes
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // memberID
         $this->memberID->ViewValue = $this->memberID->CurrentValue;
         $this->memberID->ViewCustomAttributes = "";
         // name
         $this->name->ViewValue = $this->name->CurrentValue;
         $this->name->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewCustomAttributes = "";
         // joined
         $this->joined->ViewValue = $this->joined->CurrentValue;
         $this->joined->ViewValue = ew_FormatDateTime($this->joined->ViewValue, undefined);
         $this->joined->ViewCustomAttributes = "";
         // facebook
         $this->facebook->ViewValue = $this->facebook->CurrentValue;
         $this->facebook->ViewCustomAttributes = "";
         // twitter
         $this->twitter->ViewValue = $this->twitter->CurrentValue;
         $this->twitter->ViewCustomAttributes = "";
         // twitch
         $this->twitch->ViewValue = $this->twitch->CurrentValue;
         $this->twitch->ViewCustomAttributes = "";
         // skype
         $this->skype->ViewValue = $this->skype->CurrentValue;
         $this->skype->ViewCustomAttributes = "";
         // birthday
         $this->birthday->ViewValue = $this->birthday->CurrentValue;
         $this->birthday->ViewValue = ew_FormatDateTime($this->birthday->ViewValue, 5);
         $this->birthday->ViewCustomAttributes = "";
         // profession
         if (strval($this->profession->CurrentValue) != "") {
             $this->profession->ViewValue = "";
             $arwrk = explode(",", strval($this->profession->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->profession->ViewValue .= $this->profession->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->profession->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->profession->ViewValue = NULL;
         }
         $this->profession->ViewCustomAttributes = "";
         // game_type
         if (strval($this->game_type->CurrentValue) != "") {
             $this->game_type->ViewValue = "";
             $arwrk = explode(",", strval($this->game_type->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->game_type->ViewValue .= $this->game_type->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->game_type->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->game_type->ViewValue = NULL;
         }
         $this->game_type->ViewCustomAttributes = "";
         // division
         if (strval($this->division->CurrentValue) != "") {
             $this->division->ViewValue = "";
             $arwrk = explode(",", strval($this->division->CurrentValue));
             $cnt = count($arwrk);
             for ($ari = 0; $ari < $cnt; $ari++) {
                 $this->division->ViewValue .= $this->division->OptionCaption(trim($arwrk[$ari]));
                 if ($ari < $cnt - 1) {
                     $this->division->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
             }
         } else {
             $this->division->ViewValue = NULL;
         }
         $this->division->ViewCustomAttributes = "";
         // has_expansion
         if (strval($this->has_expansion->CurrentValue) != "") {
             $this->has_expansion->ViewValue = $this->has_expansion->OptionCaption($this->has_expansion->CurrentValue);
         } else {
             $this->has_expansion->ViewValue = NULL;
         }
         $this->has_expansion->ViewCustomAttributes = "";
         // notes
         $this->notes->ViewValue = $this->notes->CurrentValue;
         $this->notes->ViewCustomAttributes = "";
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         $this->name->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // joined
         $this->joined->LinkCustomAttributes = "";
         $this->joined->HrefValue = "";
         $this->joined->TooltipValue = "";
         // facebook
         $this->facebook->LinkCustomAttributes = "";
         if (!ew_Empty($this->facebook->CurrentValue)) {
             $this->facebook->HrefValue = !empty($this->facebook->ViewValue) ? ew_RemoveHtml($this->facebook->ViewValue) : $this->facebook->CurrentValue;
             // Add prefix/suffix
             $this->facebook->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->facebook->HrefValue = ew_ConvertFullUrl($this->facebook->HrefValue);
             }
         } else {
             $this->facebook->HrefValue = "";
         }
         $this->facebook->TooltipValue = "";
         // twitter
         $this->twitter->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitter->CurrentValue)) {
             $this->twitter->HrefValue = !empty($this->twitter->ViewValue) ? ew_RemoveHtml($this->twitter->ViewValue) : $this->twitter->CurrentValue;
             // Add prefix/suffix
             $this->twitter->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitter->HrefValue = ew_ConvertFullUrl($this->twitter->HrefValue);
             }
         } else {
             $this->twitter->HrefValue = "";
         }
         $this->twitter->TooltipValue = "";
         // twitch
         $this->twitch->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitch->CurrentValue)) {
             $this->twitch->HrefValue = !empty($this->twitch->ViewValue) ? ew_RemoveHtml($this->twitch->ViewValue) : $this->twitch->CurrentValue;
             // Add prefix/suffix
             $this->twitch->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitch->HrefValue = ew_ConvertFullUrl($this->twitch->HrefValue);
             }
         } else {
             $this->twitch->HrefValue = "";
         }
         $this->twitch->TooltipValue = "";
         // skype
         $this->skype->LinkCustomAttributes = "";
         $this->skype->HrefValue = "";
         $this->skype->TooltipValue = "";
         // birthday
         $this->birthday->LinkCustomAttributes = "";
         $this->birthday->HrefValue = "";
         $this->birthday->TooltipValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         $this->profession->TooltipValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         $this->game_type->TooltipValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         $this->division->TooltipValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         $this->has_expansion->TooltipValue = "";
         // notes
         $this->notes->LinkCustomAttributes = "";
         if (!ew_Empty($this->notes->CurrentValue)) {
             $this->notes->HrefValue = !empty($this->notes->ViewValue) ? ew_RemoveHtml($this->notes->ViewValue) : $this->notes->CurrentValue;
             // Add prefix/suffix
             $this->notes->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->notes->HrefValue = ew_ConvertFullUrl($this->notes->HrefValue);
             }
         } else {
             $this->notes->HrefValue = "";
         }
         $this->notes->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // name
         $this->name->EditAttrs["class"] = "form-control";
         $this->name->EditCustomAttributes = "";
         $this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);
         $this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // joined
         // facebook
         $this->facebook->EditAttrs["class"] = "form-control";
         $this->facebook->EditCustomAttributes = "";
         $this->facebook->EditValue = ew_HtmlEncode($this->facebook->CurrentValue);
         $this->facebook->PlaceHolder = ew_RemoveHtml($this->facebook->FldCaption());
         // twitter
         $this->twitter->EditAttrs["class"] = "form-control";
         $this->twitter->EditCustomAttributes = "";
         $this->twitter->EditValue = ew_HtmlEncode($this->twitter->CurrentValue);
         $this->twitter->PlaceHolder = ew_RemoveHtml($this->twitter->FldCaption());
         // twitch
         $this->twitch->EditAttrs["class"] = "form-control";
         $this->twitch->EditCustomAttributes = "";
         $this->twitch->EditValue = ew_HtmlEncode($this->twitch->CurrentValue);
         $this->twitch->PlaceHolder = ew_RemoveHtml($this->twitch->FldCaption());
         // skype
         $this->skype->EditAttrs["class"] = "form-control";
         $this->skype->EditCustomAttributes = "";
         $this->skype->EditValue = ew_HtmlEncode($this->skype->CurrentValue);
         $this->skype->PlaceHolder = ew_RemoveHtml($this->skype->FldCaption());
         // birthday
         $this->birthday->EditAttrs["class"] = "form-control";
         $this->birthday->EditCustomAttributes = "";
         $this->birthday->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->birthday->CurrentValue, 5));
         $this->birthday->PlaceHolder = ew_RemoveHtml($this->birthday->FldCaption());
         // profession
         $this->profession->EditAttrs["class"] = "form-control";
         $this->profession->EditCustomAttributes = "";
         $this->profession->EditValue = $this->profession->Options(FALSE);
         // game_type
         $this->game_type->EditCustomAttributes = "";
         $this->game_type->EditValue = $this->game_type->Options(FALSE);
         // division
         $this->division->EditCustomAttributes = "";
         $this->division->EditValue = $this->division->Options(FALSE);
         // has_expansion
         $this->has_expansion->EditCustomAttributes = "";
         $this->has_expansion->EditValue = $this->has_expansion->Options(TRUE);
         // notes
         $this->notes->EditAttrs["class"] = "form-control";
         $this->notes->EditCustomAttributes = "";
         $this->notes->EditValue = ew_HtmlEncode($this->notes->CurrentValue);
         $this->notes->PlaceHolder = ew_RemoveHtml($this->notes->FldCaption());
         // Edit refer script
         // name
         $this->name->LinkCustomAttributes = "";
         $this->name->HrefValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         // joined
         $this->joined->LinkCustomAttributes = "";
         $this->joined->HrefValue = "";
         // facebook
         $this->facebook->LinkCustomAttributes = "";
         if (!ew_Empty($this->facebook->CurrentValue)) {
             $this->facebook->HrefValue = !empty($this->facebook->EditValue) ? ew_RemoveHtml($this->facebook->EditValue) : $this->facebook->CurrentValue;
             // Add prefix/suffix
             $this->facebook->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->facebook->HrefValue = ew_ConvertFullUrl($this->facebook->HrefValue);
             }
         } else {
             $this->facebook->HrefValue = "";
         }
         // twitter
         $this->twitter->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitter->CurrentValue)) {
             $this->twitter->HrefValue = !empty($this->twitter->EditValue) ? ew_RemoveHtml($this->twitter->EditValue) : $this->twitter->CurrentValue;
             // Add prefix/suffix
             $this->twitter->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitter->HrefValue = ew_ConvertFullUrl($this->twitter->HrefValue);
             }
         } else {
             $this->twitter->HrefValue = "";
         }
         // twitch
         $this->twitch->LinkCustomAttributes = "";
         if (!ew_Empty($this->twitch->CurrentValue)) {
             $this->twitch->HrefValue = !empty($this->twitch->EditValue) ? ew_RemoveHtml($this->twitch->EditValue) : $this->twitch->CurrentValue;
             // Add prefix/suffix
             $this->twitch->LinkAttrs["target"] = "_blank";
             // Add target
             if ($this->Export != "") {
                 $this->twitch->HrefValue = ew_ConvertFullUrl($this->twitch->HrefValue);
             }
         } else {
             $this->twitch->HrefValue = "";
         }
         // skype
         $this->skype->LinkCustomAttributes = "";
         $this->skype->HrefValue = "";
         // birthday
         $this->birthday->LinkCustomAttributes = "";
         $this->birthday->HrefValue = "";
         // profession
         $this->profession->LinkCustomAttributes = "";
         $this->profession->HrefValue = "";
         // game_type
         $this->game_type->LinkCustomAttributes = "";
         $this->game_type->HrefValue = "";
         // division
         $this->division->LinkCustomAttributes = "";
         $this->division->HrefValue = "";
         // has_expansion
         $this->has_expansion->LinkCustomAttributes = "";
         $this->has_expansion->HrefValue = "";
         // notes
         $this->notes->LinkCustomAttributes = "";
         if (!ew_Empty($this->notes->CurrentValue)) {
             $this->notes->HrefValue = !empty($this->notes->EditValue) ? ew_RemoveHtml($this->notes->EditValue) : $this->notes->CurrentValue;
             // Add prefix/suffix
             $this->notes->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->notes->HrefValue = ew_ConvertFullUrl($this->notes->HrefValue);
             }
         } else {
             $this->notes->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();
     }
 }
Esempio n. 6
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();
     }
 }
Esempio n. 7
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();
     }
 }
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // PASSANGER_ID
     // CODE
     // FIRSTNAME
     // SECONDNAME
     // LASTNAME
     // SURNAME
     // MAIL
     // PASSANGER_TYPE_ID
     // USER_ID
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // PASSANGER_ID
         $this->PASSANGER_ID->ViewValue = $this->PASSANGER_ID->CurrentValue;
         $this->PASSANGER_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // FIRSTNAME
         $this->FIRSTNAME->ViewValue = $this->FIRSTNAME->CurrentValue;
         $this->FIRSTNAME->ViewCustomAttributes = "";
         // SECONDNAME
         $this->SECONDNAME->ViewValue = $this->SECONDNAME->CurrentValue;
         $this->SECONDNAME->ViewCustomAttributes = "";
         // LASTNAME
         $this->LASTNAME->ViewValue = $this->LASTNAME->CurrentValue;
         $this->LASTNAME->ViewCustomAttributes = "";
         // SURNAME
         $this->SURNAME->ViewValue = $this->SURNAME->CurrentValue;
         $this->SURNAME->ViewCustomAttributes = "";
         // MAIL
         $this->MAIL->ViewValue = $this->MAIL->CurrentValue;
         $this->MAIL->ViewCustomAttributes = "";
         // PASSANGER_TYPE_ID
         $this->PASSANGER_TYPE_ID->ViewValue = $this->PASSANGER_TYPE_ID->CurrentValue;
         $this->PASSANGER_TYPE_ID->ViewCustomAttributes = "";
         // USER_ID
         $this->USER_ID->ViewValue = $this->USER_ID->CurrentValue;
         $this->USER_ID->ViewCustomAttributes = "";
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         $this->PASSANGER_ID->TooltipValue = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // FIRSTNAME
         $this->FIRSTNAME->LinkCustomAttributes = "";
         $this->FIRSTNAME->HrefValue = "";
         $this->FIRSTNAME->TooltipValue = "";
         // SECONDNAME
         $this->SECONDNAME->LinkCustomAttributes = "";
         $this->SECONDNAME->HrefValue = "";
         $this->SECONDNAME->TooltipValue = "";
         // LASTNAME
         $this->LASTNAME->LinkCustomAttributes = "";
         $this->LASTNAME->HrefValue = "";
         $this->LASTNAME->TooltipValue = "";
         // SURNAME
         $this->SURNAME->LinkCustomAttributes = "";
         $this->SURNAME->HrefValue = "";
         $this->SURNAME->TooltipValue = "";
         // MAIL
         $this->MAIL->LinkCustomAttributes = "";
         $this->MAIL->HrefValue = "";
         $this->MAIL->TooltipValue = "";
         // PASSANGER_TYPE_ID
         $this->PASSANGER_TYPE_ID->LinkCustomAttributes = "";
         $this->PASSANGER_TYPE_ID->HrefValue = "";
         $this->PASSANGER_TYPE_ID->TooltipValue = "";
         // USER_ID
         $this->USER_ID->LinkCustomAttributes = "";
         $this->USER_ID->HrefValue = "";
         $this->USER_ID->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // PASSANGER_ID
         $this->PASSANGER_ID->EditAttrs["class"] = "form-control";
         $this->PASSANGER_ID->EditCustomAttributes = "";
         $this->PASSANGER_ID->EditValue = $this->PASSANGER_ID->CurrentValue;
         $this->PASSANGER_ID->ViewCustomAttributes = "";
         // 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());
         // FIRSTNAME
         $this->FIRSTNAME->EditAttrs["class"] = "form-control";
         $this->FIRSTNAME->EditCustomAttributes = "";
         $this->FIRSTNAME->EditValue = ew_HtmlEncode($this->FIRSTNAME->CurrentValue);
         $this->FIRSTNAME->PlaceHolder = ew_RemoveHtml($this->FIRSTNAME->FldCaption());
         // SECONDNAME
         $this->SECONDNAME->EditAttrs["class"] = "form-control";
         $this->SECONDNAME->EditCustomAttributes = "";
         $this->SECONDNAME->EditValue = ew_HtmlEncode($this->SECONDNAME->CurrentValue);
         $this->SECONDNAME->PlaceHolder = ew_RemoveHtml($this->SECONDNAME->FldCaption());
         // LASTNAME
         $this->LASTNAME->EditAttrs["class"] = "form-control";
         $this->LASTNAME->EditCustomAttributes = "";
         $this->LASTNAME->EditValue = ew_HtmlEncode($this->LASTNAME->CurrentValue);
         $this->LASTNAME->PlaceHolder = ew_RemoveHtml($this->LASTNAME->FldCaption());
         // SURNAME
         $this->SURNAME->EditAttrs["class"] = "form-control";
         $this->SURNAME->EditCustomAttributes = "";
         $this->SURNAME->EditValue = ew_HtmlEncode($this->SURNAME->CurrentValue);
         $this->SURNAME->PlaceHolder = ew_RemoveHtml($this->SURNAME->FldCaption());
         // MAIL
         $this->MAIL->EditAttrs["class"] = "form-control";
         $this->MAIL->EditCustomAttributes = "";
         $this->MAIL->EditValue = ew_HtmlEncode($this->MAIL->CurrentValue);
         $this->MAIL->PlaceHolder = ew_RemoveHtml($this->MAIL->FldCaption());
         // PASSANGER_TYPE_ID
         $this->PASSANGER_TYPE_ID->EditAttrs["class"] = "form-control";
         $this->PASSANGER_TYPE_ID->EditCustomAttributes = "";
         $this->PASSANGER_TYPE_ID->EditValue = ew_HtmlEncode($this->PASSANGER_TYPE_ID->CurrentValue);
         $this->PASSANGER_TYPE_ID->PlaceHolder = ew_RemoveHtml($this->PASSANGER_TYPE_ID->FldCaption());
         // USER_ID
         $this->USER_ID->EditAttrs["class"] = "form-control";
         $this->USER_ID->EditCustomAttributes = "";
         $this->USER_ID->EditValue = ew_HtmlEncode($this->USER_ID->CurrentValue);
         $this->USER_ID->PlaceHolder = ew_RemoveHtml($this->USER_ID->FldCaption());
         // Edit refer script
         // PASSANGER_ID
         $this->PASSANGER_ID->LinkCustomAttributes = "";
         $this->PASSANGER_ID->HrefValue = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // FIRSTNAME
         $this->FIRSTNAME->LinkCustomAttributes = "";
         $this->FIRSTNAME->HrefValue = "";
         // SECONDNAME
         $this->SECONDNAME->LinkCustomAttributes = "";
         $this->SECONDNAME->HrefValue = "";
         // LASTNAME
         $this->LASTNAME->LinkCustomAttributes = "";
         $this->LASTNAME->HrefValue = "";
         // SURNAME
         $this->SURNAME->LinkCustomAttributes = "";
         $this->SURNAME->HrefValue = "";
         // MAIL
         $this->MAIL->LinkCustomAttributes = "";
         $this->MAIL->HrefValue = "";
         // PASSANGER_TYPE_ID
         $this->PASSANGER_TYPE_ID->LinkCustomAttributes = "";
         $this->PASSANGER_TYPE_ID->HrefValue = "";
         // USER_ID
         $this->USER_ID->LinkCustomAttributes = "";
         $this->USER_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();
     }
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // 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`, `socio_nro` AS `DispFld`, `propietario` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $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 {
     }
     // id_montos
     $this->id_montos->EditAttrs["class"] = "form-control";
     $this->id_montos->EditCustomAttributes = "";
     if ($this->id_montos->getSessionValue() != "") {
         $this->id_montos->CurrentValue = $this->id_montos->getSessionValue();
         if (strval($this->id_montos->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_montos->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `descripcion` AS `DispFld`, `importe` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `montos`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_montos, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_montos->ViewValue = $rswrk->fields('DispFld');
                 $this->id_montos->ViewValue .= ew_ValueSeparator(1, $this->id_montos) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 0, -2, -2, -2);
                 $rswrk->Close();
             } else {
                 $this->id_montos->ViewValue = $this->id_montos->CurrentValue;
             }
         } else {
             $this->id_montos->ViewValue = NULL;
         }
         $this->id_montos->ViewCustomAttributes = "";
     } else {
     }
     // id_usuario
     // 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());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Esempio n. 10
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // url
     // tdate
     // account_id
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // url
         $this->url->ViewValue = $this->url->CurrentValue;
         $this->url->ViewCustomAttributes = "";
         // account_id
         $this->account_id->ViewValue = $this->account_id->CurrentValue;
         $this->account_id->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // url
         $this->url->LinkCustomAttributes = "";
         $this->url->HrefValue = "";
         $this->url->TooltipValue = "";
         // account_id
         $this->account_id->LinkCustomAttributes = "";
         $this->account_id->HrefValue = "";
         $this->account_id->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id
         $this->id->EditAttrs["class"] = "form-control";
         $this->id->EditCustomAttributes = "";
         $this->id->EditValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // url
         $this->url->EditAttrs["class"] = "form-control";
         $this->url->EditCustomAttributes = "";
         $this->url->EditValue = ew_HtmlEncode($this->url->CurrentValue);
         $this->url->PlaceHolder = ew_RemoveHtml($this->url->FldCaption());
         // account_id
         $this->account_id->EditAttrs["class"] = "form-control";
         $this->account_id->EditCustomAttributes = "";
         if (!$Security->IsAdmin() && $Security->IsLoggedIn() && !$this->UserIDAllow("edit")) {
             // Non system admin
             $this->account_id->CurrentValue = CurrentUserID();
             $this->account_id->EditValue = $this->account_id->CurrentValue;
             $this->account_id->ViewCustomAttributes = "";
         } else {
             $this->account_id->EditValue = ew_HtmlEncode($this->account_id->CurrentValue);
             $this->account_id->PlaceHolder = ew_RemoveHtml($this->account_id->FldCaption());
         }
         // Edit refer script
         // id
         $this->id->HrefValue = "";
         // url
         $this->url->HrefValue = "";
         // account_id
         $this->account_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();
     }
 }
Esempio n. 11
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // ID
     // Password
     // Email
     // Created
     // Type
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // ID
         $this->ID->ViewValue = $this->ID->CurrentValue;
         $this->ID->ViewCustomAttributes = "";
         // Password
         $this->Password->ViewValue = $this->Password->CurrentValue;
         $this->Password->ViewCustomAttributes = "";
         // Email
         $this->_Email->ViewValue = $this->_Email->CurrentValue;
         $this->_Email->ViewCustomAttributes = "";
         // Created
         $this->Created->ViewValue = $this->Created->CurrentValue;
         $this->Created->ViewValue = ew_FormatDateTime($this->Created->ViewValue, 5);
         $this->Created->ViewCustomAttributes = "";
         // Type
         if (strval($this->Type->CurrentValue) != "") {
             $sFilterWrk = "`UserTypeID`" . ew_SearchString("=", $this->Type->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `UserTypeID`, `Name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `UserTypes`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->Type, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->Type->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->Type->ViewValue = $this->Type->CurrentValue;
             }
         } else {
             $this->Type->ViewValue = NULL;
         }
         $this->Type->ViewCustomAttributes = "";
         // Password
         $this->Password->LinkCustomAttributes = "";
         $this->Password->HrefValue = "";
         $this->Password->TooltipValue = "";
         // Email
         $this->_Email->LinkCustomAttributes = "";
         $this->_Email->HrefValue = "";
         $this->_Email->TooltipValue = "";
         // Created
         $this->Created->LinkCustomAttributes = "";
         $this->Created->HrefValue = "";
         $this->Created->TooltipValue = "";
         // Type
         $this->Type->LinkCustomAttributes = "";
         $this->Type->HrefValue = "";
         $this->Type->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // Password
         $this->Password->EditCustomAttributes = "";
         $this->Password->EditValue = ew_HtmlEncode($this->Password->CurrentValue);
         $this->Password->PlaceHolder = ew_RemoveHtml($this->Password->FldCaption());
         // Email
         $this->_Email->EditCustomAttributes = "";
         $this->_Email->EditValue = ew_HtmlEncode($this->_Email->CurrentValue);
         $this->_Email->PlaceHolder = ew_RemoveHtml($this->_Email->FldCaption());
         // Created
         $this->Created->EditCustomAttributes = "";
         $this->Created->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Created->CurrentValue, 5));
         $this->Created->PlaceHolder = ew_RemoveHtml($this->Created->FldCaption());
         // Type
         $this->Type->EditCustomAttributes = "";
         $sFilterWrk = "";
         $sSqlWrk = "SELECT `UserTypeID`, `Name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `UserTypes`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->Type, $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->Type->EditValue = $arwrk;
         // Edit refer script
         // Password
         $this->Password->HrefValue = "";
         // Email
         $this->_Email->HrefValue = "";
         // Created
         $this->Created->HrefValue = "";
         // Type
         $this->Type->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
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idpais
     // nombre
     // nombre oficial
     // gentilicio
     // flag
     // idcontinente
     // estado
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idpais
         $this->idpais->ViewValue = $this->idpais->CurrentValue;
         $this->idpais->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // nombre oficial
         $this->nombre_oficial->ViewValue = $this->nombre_oficial->CurrentValue;
         $this->nombre_oficial->ViewCustomAttributes = "";
         // gentilicio
         $this->gentilicio->ViewValue = $this->gentilicio->CurrentValue;
         $this->gentilicio->ViewCustomAttributes = "";
         // flag
         $this->flag->ViewValue = $this->flag->CurrentValue;
         $this->flag->ViewCustomAttributes = "";
         // idcontinente
         if (strval($this->idcontinente->CurrentValue) != "") {
             $sFilterWrk = "`idcontinente`" . ew_SearchString("=", $this->idcontinente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `continente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcontinente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idcontinente->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idcontinente->ViewValue = $this->idcontinente->CurrentValue;
             }
         } else {
             $this->idcontinente->ViewValue = NULL;
         }
         $this->idcontinente->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;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // nombre oficial
         $this->nombre_oficial->LinkCustomAttributes = "";
         $this->nombre_oficial->HrefValue = "";
         $this->nombre_oficial->TooltipValue = "";
         // gentilicio
         $this->gentilicio->LinkCustomAttributes = "";
         $this->gentilicio->HrefValue = "";
         $this->gentilicio->TooltipValue = "";
         // flag
         $this->flag->LinkCustomAttributes = "";
         $this->flag->HrefValue = "";
         $this->flag->TooltipValue = "";
         // idcontinente
         $this->idcontinente->LinkCustomAttributes = "";
         $this->idcontinente->HrefValue = "";
         $this->idcontinente->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // nombre
         $this->nombre->EditAttrs["class"] = "form-control";
         $this->nombre->EditCustomAttributes = "";
         $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
         $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());
         // nombre oficial
         $this->nombre_oficial->EditAttrs["class"] = "form-control";
         $this->nombre_oficial->EditCustomAttributes = "";
         $this->nombre_oficial->EditValue = ew_HtmlEncode($this->nombre_oficial->CurrentValue);
         $this->nombre_oficial->PlaceHolder = ew_RemoveHtml($this->nombre_oficial->FldCaption());
         // gentilicio
         $this->gentilicio->EditAttrs["class"] = "form-control";
         $this->gentilicio->EditCustomAttributes = "";
         $this->gentilicio->EditValue = ew_HtmlEncode($this->gentilicio->CurrentValue);
         $this->gentilicio->PlaceHolder = ew_RemoveHtml($this->gentilicio->FldCaption());
         // flag
         $this->flag->EditAttrs["class"] = "form-control";
         $this->flag->EditCustomAttributes = "";
         $this->flag->EditValue = ew_HtmlEncode($this->flag->CurrentValue);
         $this->flag->PlaceHolder = ew_RemoveHtml($this->flag->FldCaption());
         // idcontinente
         $this->idcontinente->EditAttrs["class"] = "form-control";
         $this->idcontinente->EditCustomAttributes = "";
         if ($this->idcontinente->getSessionValue() != "") {
             $this->idcontinente->CurrentValue = $this->idcontinente->getSessionValue();
             $this->idcontinente->OldValue = $this->idcontinente->CurrentValue;
             if (strval($this->idcontinente->CurrentValue) != "") {
                 $sFilterWrk = "`idcontinente`" . ew_SearchString("=", $this->idcontinente->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `continente`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idcontinente, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idcontinente->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idcontinente->ViewValue = $this->idcontinente->CurrentValue;
                 }
             } else {
                 $this->idcontinente->ViewValue = NULL;
             }
             $this->idcontinente->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idcontinente->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idcontinente`" . ew_SearchString("=", $this->idcontinente->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `continente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcontinente, $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->idcontinente->EditValue = $arwrk;
         }
         // estado
         $this->estado->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
         $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
         $this->estado->EditValue = $arwrk;
         // Edit refer script
         // nombre
         $this->nombre->HrefValue = "";
         // nombre oficial
         $this->nombre_oficial->HrefValue = "";
         // gentilicio
         $this->gentilicio->HrefValue = "";
         // flag
         $this->flag->HrefValue = "";
         // idcontinente
         $this->idcontinente->HrefValue = "";
         // estado
         $this->estado->HrefValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // nombre
         $this->nombre->EditAttrs["class"] = "form-control";
         $this->nombre->EditCustomAttributes = "";
         $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
         $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());
         // nombre oficial
         $this->nombre_oficial->EditAttrs["class"] = "form-control";
         $this->nombre_oficial->EditCustomAttributes = "";
         $this->nombre_oficial->EditValue = ew_HtmlEncode($this->nombre_oficial->CurrentValue);
         $this->nombre_oficial->PlaceHolder = ew_RemoveHtml($this->nombre_oficial->FldCaption());
         // gentilicio
         $this->gentilicio->EditAttrs["class"] = "form-control";
         $this->gentilicio->EditCustomAttributes = "";
         $this->gentilicio->EditValue = ew_HtmlEncode($this->gentilicio->CurrentValue);
         $this->gentilicio->PlaceHolder = ew_RemoveHtml($this->gentilicio->FldCaption());
         // flag
         $this->flag->EditAttrs["class"] = "form-control";
         $this->flag->EditCustomAttributes = "";
         $this->flag->EditValue = ew_HtmlEncode($this->flag->CurrentValue);
         $this->flag->PlaceHolder = ew_RemoveHtml($this->flag->FldCaption());
         // idcontinente
         $this->idcontinente->EditAttrs["class"] = "form-control";
         $this->idcontinente->EditCustomAttributes = "";
         if ($this->idcontinente->getSessionValue() != "") {
             $this->idcontinente->CurrentValue = $this->idcontinente->getSessionValue();
             $this->idcontinente->OldValue = $this->idcontinente->CurrentValue;
             if (strval($this->idcontinente->CurrentValue) != "") {
                 $sFilterWrk = "`idcontinente`" . ew_SearchString("=", $this->idcontinente->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `continente`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idcontinente, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idcontinente->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idcontinente->ViewValue = $this->idcontinente->CurrentValue;
                 }
             } else {
                 $this->idcontinente->ViewValue = NULL;
             }
             $this->idcontinente->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idcontinente->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idcontinente`" . ew_SearchString("=", $this->idcontinente->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idcontinente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `continente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idcontinente, $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->idcontinente->EditValue = $arwrk;
         }
         // estado
         $this->estado->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
         $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
         $this->estado->EditValue = $arwrk;
         // Edit refer script
         // nombre
         $this->nombre->HrefValue = "";
         // nombre oficial
         $this->nombre_oficial->HrefValue = "";
         // gentilicio
         $this->gentilicio->HrefValue = "";
         // flag
         $this->flag->HrefValue = "";
         // idcontinente
         $this->idcontinente->HrefValue = "";
         // estado
         $this->estado->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();
     }
 }
Esempio n. 13
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // delivery_id
     // m_id
     // package_id
     // customer_name
     // customer_cell
     // date
     // month
     // category
     // amount
     // Details
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // delivery_id
         $this->delivery_id->ViewValue = $this->delivery_id->CurrentValue;
         $this->delivery_id->ViewCustomAttributes = "";
         // m_id
         if ($this->m_id->VirtualValue != "") {
             $this->m_id->ViewValue = $this->m_id->VirtualValue;
         } else {
             $this->m_id->ViewValue = $this->m_id->CurrentValue;
             if (strval($this->m_id->CurrentValue) != "") {
                 $sFilterWrk = "`mid`" . ew_SearchString("=", $this->m_id->CurrentValue, EW_DATATYPE_NUMBER, "");
                 $sSqlWrk = "SELECT `mid`, `mcardnumber` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `members`";
                 $sWhereWrk = "";
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
                 $this->Lookup_Selecting($this->m_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->m_id->ViewValue = $this->m_id->DisplayValue($arwrk);
                     $rswrk->Close();
                 } else {
                     $this->m_id->ViewValue = $this->m_id->CurrentValue;
                 }
             } else {
                 $this->m_id->ViewValue = NULL;
             }
         }
         $this->m_id->ViewCustomAttributes = "";
         // package_id
         if (strval($this->package_id->CurrentValue) != "") {
             $sFilterWrk = "`package_id`" . ew_SearchString("=", $this->package_id->CurrentValue, EW_DATATYPE_NUMBER, "");
             $sSqlWrk = "SELECT `package_id`, `package_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `package`";
             $sWhereWrk = "";
             ew_AddFilter($sWhereWrk, $sFilterWrk);
             $this->Lookup_Selecting($this->package_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->package_id->ViewValue = $this->package_id->DisplayValue($arwrk);
                 $rswrk->Close();
             } else {
                 $this->package_id->ViewValue = $this->package_id->CurrentValue;
             }
         } else {
             $this->package_id->ViewValue = NULL;
         }
         $this->package_id->ViewCustomAttributes = "";
         // customer_name
         $this->customer_name->ViewValue = $this->customer_name->CurrentValue;
         $this->customer_name->ViewCustomAttributes = "";
         // customer_cell
         $this->customer_cell->ViewValue = $this->customer_cell->CurrentValue;
         $this->customer_cell->ViewCustomAttributes = "";
         // date
         $this->date->ViewValue = $this->date->CurrentValue;
         $this->date->ViewValue = ew_FormatDateTime($this->date->ViewValue, 7);
         $this->date->ViewCustomAttributes = "";
         // month
         if (strval($this->month->CurrentValue) != "") {
             $this->month->ViewValue = $this->month->OptionCaption($this->month->CurrentValue);
         } else {
             $this->month->ViewValue = NULL;
         }
         $this->month->ViewCustomAttributes = "";
         // category
         if (strval($this->category->CurrentValue) != "") {
             $this->category->ViewValue = $this->category->OptionCaption($this->category->CurrentValue);
         } else {
             $this->category->ViewValue = NULL;
         }
         $this->category->ViewCustomAttributes = "";
         // amount
         $this->amount->ViewValue = $this->amount->CurrentValue;
         $this->amount->ViewCustomAttributes = "";
         // Details
         $this->Details->ViewValue = $this->Details->CurrentValue;
         $this->Details->ViewCustomAttributes = "";
         // m_id
         $this->m_id->LinkCustomAttributes = "";
         $this->m_id->HrefValue = "";
         $this->m_id->TooltipValue = "";
         // package_id
         $this->package_id->LinkCustomAttributes = "";
         $this->package_id->HrefValue = "";
         $this->package_id->TooltipValue = "";
         // customer_name
         $this->customer_name->LinkCustomAttributes = "";
         $this->customer_name->HrefValue = "";
         $this->customer_name->TooltipValue = "";
         // customer_cell
         $this->customer_cell->LinkCustomAttributes = "";
         $this->customer_cell->HrefValue = "";
         $this->customer_cell->TooltipValue = "";
         // date
         $this->date->LinkCustomAttributes = "";
         $this->date->HrefValue = "";
         $this->date->TooltipValue = "";
         // month
         $this->month->LinkCustomAttributes = "";
         $this->month->HrefValue = "";
         $this->month->TooltipValue = "";
         // category
         $this->category->LinkCustomAttributes = "";
         $this->category->HrefValue = "";
         $this->category->TooltipValue = "";
         // amount
         $this->amount->LinkCustomAttributes = "";
         $this->amount->HrefValue = "";
         $this->amount->TooltipValue = "";
         // Details
         $this->Details->LinkCustomAttributes = "";
         $this->Details->HrefValue = "";
         $this->Details->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // m_id
         $this->m_id->EditAttrs["class"] = "form-control";
         $this->m_id->EditCustomAttributes = "";
         $this->m_id->EditValue = ew_HtmlEncode($this->m_id->CurrentValue);
         $this->m_id->PlaceHolder = ew_RemoveHtml($this->m_id->FldCaption());
         // package_id
         $this->package_id->EditCustomAttributes = "";
         if (trim(strval($this->package_id->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`package_id`" . ew_SearchString("=", $this->package_id->CurrentValue, EW_DATATYPE_NUMBER, "");
         }
         $sSqlWrk = "SELECT `package_id`, `package_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, `package_id` AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `package`";
         $sWhereWrk = "";
         ew_AddFilter($sWhereWrk, $sFilterWrk);
         $this->Lookup_Selecting($this->package_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] = ew_HtmlEncode($rswrk->fields('DispFld'));
             $this->package_id->ViewValue = $this->package_id->DisplayValue($arwrk);
         } else {
             $this->package_id->ViewValue = $Language->Phrase("PleaseSelect");
         }
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->package_id->EditValue = $arwrk;
         // customer_name
         $this->customer_name->EditAttrs["class"] = "form-control";
         $this->customer_name->EditCustomAttributes = "";
         $this->customer_name->EditValue = ew_HtmlEncode($this->customer_name->CurrentValue);
         $this->customer_name->PlaceHolder = ew_RemoveHtml($this->customer_name->FldCaption());
         // customer_cell
         $this->customer_cell->EditAttrs["class"] = "form-control";
         $this->customer_cell->EditCustomAttributes = "";
         $this->customer_cell->EditValue = ew_HtmlEncode($this->customer_cell->CurrentValue);
         $this->customer_cell->PlaceHolder = ew_RemoveHtml($this->customer_cell->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());
         // month
         $this->month->EditAttrs["class"] = "form-control";
         $this->month->EditCustomAttributes = "";
         $this->month->EditValue = $this->month->Options(TRUE);
         // category
         $this->category->EditAttrs["class"] = "form-control";
         $this->category->EditCustomAttributes = "";
         $this->category->EditValue = $this->category->Options(TRUE);
         // 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());
         // Details
         $this->Details->EditAttrs["class"] = "form-control";
         $this->Details->EditCustomAttributes = "";
         $this->Details->EditValue = ew_HtmlEncode($this->Details->CurrentValue);
         $this->Details->PlaceHolder = ew_RemoveHtml($this->Details->FldCaption());
         // Edit refer script
         // m_id
         $this->m_id->HrefValue = "";
         // package_id
         $this->package_id->HrefValue = "";
         // customer_name
         $this->customer_name->HrefValue = "";
         // customer_cell
         $this->customer_cell->HrefValue = "";
         // date
         $this->date->HrefValue = "";
         // month
         $this->month->HrefValue = "";
         // category
         $this->category->HrefValue = "";
         // amount
         $this->amount->HrefValue = "";
         // Details
         $this->Details->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();
     }
 }
Esempio n. 14
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // Titulo
     $this->Titulo->EditAttrs["class"] = "form-control";
     $this->Titulo->EditCustomAttributes = "";
     $this->Titulo->EditValue = ew_HtmlEncode($this->Titulo->CurrentValue);
     $this->Titulo->PlaceHolder = ew_RemoveHtml($this->Titulo->FldCaption());
     // 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());
     // fecha
     // id_usuario
     // archivo
     $this->archivo->EditAttrs["class"] = "form-control";
     $this->archivo->EditCustomAttributes = "";
     if (!ew_Empty($this->archivo->Upload->DbValue)) {
         $this->archivo->EditValue = $this->archivo->Upload->DbValue;
     } else {
         $this->archivo->EditValue = "";
     }
     if (!ew_Empty($this->archivo->CurrentValue)) {
         $this->archivo->Upload->FileName = $this->archivo->CurrentValue;
     }
     // estado
     $this->estado->EditCustomAttributes = "";
     $arwrk = array();
     $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
     $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
     $arwrk[] = array($this->estado->FldTagValue(3), $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->FldTagValue(3));
     $this->estado->EditValue = $arwrk;
     // Call Row Rendered event
     $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();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idmedicina
     // descripcion
     // estado
     // idlaboratorio
     // idhospital
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idmedicina
         $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue;
         $this->idmedicina->ViewCustomAttributes = "";
         // descripcion
         $this->descripcion->ViewValue = $this->descripcion->CurrentValue;
         $this->descripcion->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;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // idlaboratorio
         if (strval($this->idlaboratorio->CurrentValue) != "") {
             $sFilterWrk = "`idlaboratorio`" . ew_SearchString("=", $this->idlaboratorio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idlaboratorio`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `laboratorio`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idlaboratorio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idlaboratorio->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idlaboratorio->ViewValue = $this->idlaboratorio->CurrentValue;
             }
         } else {
             $this->idlaboratorio->ViewValue = NULL;
         }
         $this->idlaboratorio->ViewCustomAttributes = "";
         // idhospital
         $this->idhospital->ViewValue = $this->idhospital->CurrentValue;
         $this->idhospital->ViewCustomAttributes = "";
         // idmedicina
         $this->idmedicina->LinkCustomAttributes = "";
         $this->idmedicina->HrefValue = "";
         $this->idmedicina->TooltipValue = "";
         // descripcion
         $this->descripcion->LinkCustomAttributes = "";
         $this->descripcion->HrefValue = "";
         $this->descripcion->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // idlaboratorio
         $this->idlaboratorio->LinkCustomAttributes = "";
         $this->idlaboratorio->HrefValue = "";
         $this->idlaboratorio->TooltipValue = "";
         // idhospital
         $this->idhospital->LinkCustomAttributes = "";
         $this->idhospital->HrefValue = "";
         $this->idhospital->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // idmedicina
         $this->idmedicina->EditAttrs["class"] = "form-control";
         $this->idmedicina->EditCustomAttributes = "";
         $this->idmedicina->EditValue = ew_HtmlEncode($this->idmedicina->AdvancedSearch->SearchValue);
         $this->idmedicina->PlaceHolder = ew_RemoveHtml($this->idmedicina->FldCaption());
         // descripcion
         $this->descripcion->EditAttrs["class"] = "form-control";
         $this->descripcion->EditCustomAttributes = "";
         $this->descripcion->EditValue = ew_HtmlEncode($this->descripcion->AdvancedSearch->SearchValue);
         $this->descripcion->PlaceHolder = ew_RemoveHtml($this->descripcion->FldCaption());
         // estado
         $this->estado->EditAttrs["class"] = "form-control";
         $this->estado->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
         $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect")));
         $this->estado->EditValue = $arwrk;
         // idlaboratorio
         $this->idlaboratorio->EditAttrs["class"] = "form-control";
         $this->idlaboratorio->EditCustomAttributes = "";
         // idhospital
         $this->idhospital->EditAttrs["class"] = "form-control";
         $this->idhospital->EditCustomAttributes = "";
         $this->idhospital->EditValue = ew_HtmlEncode($this->idhospital->AdvancedSearch->SearchValue);
         $this->idhospital->PlaceHolder = ew_RemoveHtml($this->idhospital->FldCaption());
     }
     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();
     }
 }
Esempio n. 16
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // estado
     // activo
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // activo
         if (strval($this->activo->CurrentValue) != "") {
             switch ($this->activo->CurrentValue) {
                 case $this->activo->FldTagValue(1):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                     break;
                 case $this->activo->FldTagValue(2):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                     break;
                 default:
                     $this->activo->ViewValue = $this->activo->CurrentValue;
             }
         } else {
             $this->activo->ViewValue = NULL;
         }
         $this->activo->ViewCustomAttributes = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // activo
         $this->activo->LinkCustomAttributes = "";
         $this->activo->HrefValue = "";
         $this->activo->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // estado
         $this->estado->EditCustomAttributes = "";
         $this->estado->EditValue = ew_HtmlEncode($this->estado->CurrentValue);
         $this->estado->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->estado->FldCaption()));
         // activo
         $this->activo->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activo->FldTagValue(1), $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->FldTagValue(1));
         $arwrk[] = array($this->activo->FldTagValue(2), $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->FldTagValue(2));
         $this->activo->EditValue = $arwrk;
         // Edit refer script
         // estado
         $this->estado->HrefValue = "";
         // activo
         $this->activo->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();
     }
 }
Esempio n. 17
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // client_id
     $this->client_id->EditAttrs["class"] = "form-control";
     $this->client_id->EditCustomAttributes = "";
     $this->client_id->EditValue = $this->client_id->CurrentValue;
     $this->client_id->ViewCustomAttributes = "";
     // login_id
     $this->login_id->EditAttrs["class"] = "form-control";
     $this->login_id->EditCustomAttributes = "";
     $this->login_id->EditValue = ew_HtmlEncode($this->login_id->CurrentValue);
     $this->login_id->PlaceHolder = ew_RemoveHtml($this->login_id->FldCaption());
     // name
     $this->name->EditAttrs["class"] = "form-control";
     $this->name->EditCustomAttributes = "";
     $this->name->EditValue = ew_HtmlEncode($this->name->CurrentValue);
     $this->name->PlaceHolder = ew_RemoveHtml($this->name->FldCaption());
     // pass
     $this->pass->EditAttrs["class"] = "form-control";
     $this->pass->EditCustomAttributes = "";
     $this->pass->EditValue = ew_HtmlEncode($this->pass->CurrentValue);
     $this->pass->PlaceHolder = ew_RemoveHtml($this->pass->FldCaption());
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Esempio n. 18
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // Titulo
     // Descripcion
     // fecha
     // id_usuario
     // archivo
     // estado
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // Titulo
         $this->Titulo->ViewValue = $this->Titulo->CurrentValue;
         $this->Titulo->ViewCustomAttributes = "";
         // Descripcion
         $this->Descripcion->ViewValue = $this->Descripcion->CurrentValue;
         $this->Descripcion->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // archivo
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->ViewValue = $this->archivo->Upload->DbValue;
         } else {
             $this->archivo->ViewValue = "";
         }
         $this->archivo->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 = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // Titulo
         $this->Titulo->LinkCustomAttributes = "";
         $this->Titulo->HrefValue = "";
         $this->Titulo->TooltipValue = "";
         // Descripcion
         $this->Descripcion->LinkCustomAttributes = "";
         $this->Descripcion->HrefValue = "";
         $this->Descripcion->TooltipValue = "";
         // archivo
         $this->archivo->LinkCustomAttributes = "";
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->HrefValue = "%u";
             // Add prefix/suffix
             $this->archivo->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->archivo->HrefValue = ew_ConvertFullUrl($this->archivo->HrefValue);
             }
         } else {
             $this->archivo->HrefValue = "";
         }
         $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue;
         $this->archivo->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
     } 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 = "";
         // Titulo
         $this->Titulo->EditAttrs["class"] = "form-control";
         $this->Titulo->EditCustomAttributes = "";
         $this->Titulo->EditValue = ew_HtmlEncode($this->Titulo->CurrentValue);
         $this->Titulo->PlaceHolder = ew_RemoveHtml($this->Titulo->FldCaption());
         // 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());
         // archivo
         $this->archivo->EditAttrs["class"] = "form-control";
         $this->archivo->EditCustomAttributes = "";
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->EditValue = $this->archivo->Upload->DbValue;
         } else {
             $this->archivo->EditValue = "";
         }
         if (!ew_Empty($this->archivo->CurrentValue)) {
             $this->archivo->Upload->FileName = $this->archivo->CurrentValue;
         }
         if ($this->CurrentAction == "I" && !$this->EventCancelled) {
             ew_RenderUploadField($this->archivo);
         }
         // estado
         $this->estado->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1));
         $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2));
         $arwrk[] = array($this->estado->FldTagValue(3), $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->FldTagValue(3));
         $this->estado->EditValue = $arwrk;
         // Edit refer script
         // codigo
         $this->codigo->HrefValue = "";
         // Titulo
         $this->Titulo->HrefValue = "";
         // Descripcion
         $this->Descripcion->HrefValue = "";
         // archivo
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->HrefValue = "%u";
             // Add prefix/suffix
             $this->archivo->LinkAttrs["target"] = "";
             // Add target
             if ($this->Export != "") {
                 $this->archivo->HrefValue = ew_ConvertFullUrl($this->archivo->HrefValue);
             }
         } else {
             $this->archivo->HrefValue = "";
         }
         $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue;
         // estado
         $this->estado->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();
     }
 }
Esempio n. 19
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // FLIGHT_ID
     // CODE
     // DESCRIPTION
     // AIRPLANE_ID
     // AIR_PORT_ID_DEPARTURE
     // AIR_PORT_ID_ARRIVAL
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // FLIGHT_ID
         $this->FLIGHT_ID->ViewValue = $this->FLIGHT_ID->CurrentValue;
         $this->FLIGHT_ID->ViewCustomAttributes = "";
         // CODE
         $this->CODE->ViewValue = $this->CODE->CurrentValue;
         $this->CODE->ViewCustomAttributes = "";
         // DESCRIPTION
         $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue;
         $this->DESCRIPTION->ViewCustomAttributes = "";
         // AIRPLANE_ID
         $this->AIRPLANE_ID->ViewValue = $this->AIRPLANE_ID->CurrentValue;
         $this->AIRPLANE_ID->ViewCustomAttributes = "";
         // AIR_PORT_ID_DEPARTURE
         $this->AIR_PORT_ID_DEPARTURE->ViewValue = $this->AIR_PORT_ID_DEPARTURE->CurrentValue;
         $this->AIR_PORT_ID_DEPARTURE->ViewCustomAttributes = "";
         // AIR_PORT_ID_ARRIVAL
         $this->AIR_PORT_ID_ARRIVAL->ViewValue = $this->AIR_PORT_ID_ARRIVAL->CurrentValue;
         $this->AIR_PORT_ID_ARRIVAL->ViewCustomAttributes = "";
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         $this->CODE->TooltipValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         $this->DESCRIPTION->TooltipValue = "";
         // AIRPLANE_ID
         $this->AIRPLANE_ID->LinkCustomAttributes = "";
         $this->AIRPLANE_ID->HrefValue = "";
         $this->AIRPLANE_ID->TooltipValue = "";
         // AIR_PORT_ID_DEPARTURE
         $this->AIR_PORT_ID_DEPARTURE->LinkCustomAttributes = "";
         $this->AIR_PORT_ID_DEPARTURE->HrefValue = "";
         $this->AIR_PORT_ID_DEPARTURE->TooltipValue = "";
         // AIR_PORT_ID_ARRIVAL
         $this->AIR_PORT_ID_ARRIVAL->LinkCustomAttributes = "";
         $this->AIR_PORT_ID_ARRIVAL->HrefValue = "";
         $this->AIR_PORT_ID_ARRIVAL->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());
         // 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());
         // AIRPLANE_ID
         $this->AIRPLANE_ID->EditAttrs["class"] = "form-control";
         $this->AIRPLANE_ID->EditCustomAttributes = "";
         $this->AIRPLANE_ID->EditValue = ew_HtmlEncode($this->AIRPLANE_ID->CurrentValue);
         $this->AIRPLANE_ID->PlaceHolder = ew_RemoveHtml($this->AIRPLANE_ID->FldCaption());
         // AIR_PORT_ID_DEPARTURE
         $this->AIR_PORT_ID_DEPARTURE->EditAttrs["class"] = "form-control";
         $this->AIR_PORT_ID_DEPARTURE->EditCustomAttributes = "";
         $this->AIR_PORT_ID_DEPARTURE->EditValue = ew_HtmlEncode($this->AIR_PORT_ID_DEPARTURE->CurrentValue);
         $this->AIR_PORT_ID_DEPARTURE->PlaceHolder = ew_RemoveHtml($this->AIR_PORT_ID_DEPARTURE->FldCaption());
         // AIR_PORT_ID_ARRIVAL
         $this->AIR_PORT_ID_ARRIVAL->EditAttrs["class"] = "form-control";
         $this->AIR_PORT_ID_ARRIVAL->EditCustomAttributes = "";
         $this->AIR_PORT_ID_ARRIVAL->EditValue = ew_HtmlEncode($this->AIR_PORT_ID_ARRIVAL->CurrentValue);
         $this->AIR_PORT_ID_ARRIVAL->PlaceHolder = ew_RemoveHtml($this->AIR_PORT_ID_ARRIVAL->FldCaption());
         // Add refer script
         // CODE
         $this->CODE->LinkCustomAttributes = "";
         $this->CODE->HrefValue = "";
         // DESCRIPTION
         $this->DESCRIPTION->LinkCustomAttributes = "";
         $this->DESCRIPTION->HrefValue = "";
         // AIRPLANE_ID
         $this->AIRPLANE_ID->LinkCustomAttributes = "";
         $this->AIRPLANE_ID->HrefValue = "";
         // AIR_PORT_ID_DEPARTURE
         $this->AIR_PORT_ID_DEPARTURE->LinkCustomAttributes = "";
         $this->AIR_PORT_ID_DEPARTURE->HrefValue = "";
         // AIR_PORT_ID_ARRIVAL
         $this->AIR_PORT_ID_ARRIVAL->LinkCustomAttributes = "";
         $this->AIR_PORT_ID_ARRIVAL->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();
     }
 }
Esempio n. 20
0
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // 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);
     }
     // Call Row Rendered event
     $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();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id_tramite
     // fecha
     // hora
     // titulo
     // descripcion
     // id_usuario
     $this->id_usuario->CellCssStyle = "white-space: nowrap;";
     // archivo
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id_tramite
         if ($this->id_tramite->VirtualValue != "") {
             $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue;
         } else {
             if (strval($this->id_tramite->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`estado`<>'F'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `fecha` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tramite->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue;
                 }
             } else {
                 $this->id_tramite->ViewValue = NULL;
             }
         }
         $this->id_tramite->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // hora
         $this->hora->ViewValue = $this->hora->CurrentValue;
         $this->hora->ViewCustomAttributes = "";
         // titulo
         $this->titulo->ViewValue = $this->titulo->CurrentValue;
         $this->titulo->ViewCustomAttributes = "";
         // archivo
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->ViewValue = $this->archivo->Upload->DbValue;
         } else {
             $this->archivo->ViewValue = "";
         }
         $this->archivo->ViewCustomAttributes = "";
         // id_tramite
         $this->id_tramite->LinkCustomAttributes = "";
         $this->id_tramite->HrefValue = "";
         $this->id_tramite->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // hora
         $this->hora->LinkCustomAttributes = "";
         $this->hora->HrefValue = "";
         $this->hora->TooltipValue = "";
         // titulo
         $this->titulo->LinkCustomAttributes = "";
         $this->titulo->HrefValue = "";
         $this->titulo->TooltipValue = "";
         // archivo
         $this->archivo->LinkCustomAttributes = "";
         $this->archivo->HrefValue = "";
         $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue;
         $this->archivo->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // id_tramite
         $this->id_tramite->EditAttrs["class"] = "form-control";
         $this->id_tramite->EditCustomAttributes = "";
         if ($this->id_tramite->getSessionValue() != "") {
             $this->id_tramite->CurrentValue = $this->id_tramite->getSessionValue();
             $this->id_tramite->OldValue = $this->id_tramite->CurrentValue;
             if ($this->id_tramite->VirtualValue != "") {
                 $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue;
             } else {
                 if (strval($this->id_tramite->CurrentValue) != "") {
                     $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER);
                     $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`";
                     $sWhereWrk = "";
                     $lookuptblfilter = "`estado`<>'F'";
                     if (strval($lookuptblfilter) != "") {
                         ew_AddFilter($sWhereWrk, $lookuptblfilter);
                     }
                     if ($sFilterWrk != "") {
                         ew_AddFilter($sWhereWrk, $sFilterWrk);
                     }
                     // Call Lookup selecting
                     $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
                     if ($sWhereWrk != "") {
                         $sSqlWrk .= " WHERE " . $sWhereWrk;
                     }
                     $sSqlWrk .= " ORDER BY `fecha` ASC";
                     $rswrk = $conn->Execute($sSqlWrk);
                     if ($rswrk && !$rswrk->EOF) {
                         // Lookup values found
                         $this->id_tramite->ViewValue = $rswrk->fields('DispFld');
                         $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                         $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld');
                         $rswrk->Close();
                     } else {
                         $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue;
                     }
                 } else {
                     $this->id_tramite->ViewValue = NULL;
                 }
             }
             $this->id_tramite->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->id_tramite->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tramites`";
             $sWhereWrk = "";
             $lookuptblfilter = "`estado`<>'F'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `fecha` 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_FormatDateTime($arwrk[$rowcntwrk][2], 7);
             }
             array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
             $this->id_tramite->EditValue = $arwrk;
         }
         // fecha
         // hora
         // titulo
         $this->titulo->EditAttrs["class"] = "form-control";
         $this->titulo->EditCustomAttributes = "";
         $this->titulo->EditValue = ew_HtmlEncode($this->titulo->CurrentValue);
         $this->titulo->PlaceHolder = ew_RemoveHtml($this->titulo->FldCaption());
         // archivo
         $this->archivo->EditAttrs["class"] = "form-control";
         $this->archivo->EditCustomAttributes = "";
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->EditValue = $this->archivo->Upload->DbValue;
         } else {
             $this->archivo->EditValue = "";
         }
         if (!ew_Empty($this->archivo->CurrentValue)) {
             $this->archivo->Upload->FileName = $this->archivo->CurrentValue;
         }
         if (is_numeric($this->RowIndex) && !$this->EventCancelled) {
             ew_RenderUploadField($this->archivo, $this->RowIndex);
         }
         // Edit refer script
         // id_tramite
         $this->id_tramite->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // hora
         $this->hora->HrefValue = "";
         // titulo
         $this->titulo->HrefValue = "";
         // archivo
         $this->archivo->HrefValue = "";
         $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue;
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id_tramite
         $this->id_tramite->EditAttrs["class"] = "form-control";
         $this->id_tramite->EditCustomAttributes = "";
         if ($this->id_tramite->VirtualValue != "") {
             $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue;
         } else {
             if (strval($this->id_tramite->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`estado`<>'F'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tramite, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `fecha` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tramite->EditValue = $rswrk->fields('DispFld');
                     $this->id_tramite->EditValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_tramite->EditValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tramite->EditValue = $this->id_tramite->CurrentValue;
                 }
             } else {
                 $this->id_tramite->EditValue = NULL;
             }
         }
         $this->id_tramite->ViewCustomAttributes = "";
         // fecha
         // hora
         // titulo
         $this->titulo->EditAttrs["class"] = "form-control";
         $this->titulo->EditCustomAttributes = "";
         $this->titulo->EditValue = $this->titulo->CurrentValue;
         $this->titulo->ViewCustomAttributes = "";
         // archivo
         $this->archivo->EditAttrs["class"] = "form-control";
         $this->archivo->EditCustomAttributes = "";
         if (!ew_Empty($this->archivo->Upload->DbValue)) {
             $this->archivo->EditValue = $this->archivo->Upload->DbValue;
         } else {
             $this->archivo->EditValue = "";
         }
         $this->archivo->ViewCustomAttributes = "";
         // Edit refer script
         // id_tramite
         $this->id_tramite->HrefValue = "";
         // fecha
         $this->fecha->HrefValue = "";
         // hora
         $this->hora->HrefValue = "";
         // titulo
         $this->titulo->HrefValue = "";
         // archivo
         $this->archivo->HrefValue = "";
         $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->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();
     }
 }
Esempio n. 22
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // EvaluateQuestionID
     // EvQuestion
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // EvaluateQuestionID
         $this->EvaluateQuestionID->ViewValue = $this->EvaluateQuestionID->CurrentValue;
         $this->EvaluateQuestionID->ViewCustomAttributes = "";
         // EvQuestion
         $this->EvQuestion->ViewValue = $this->EvQuestion->CurrentValue;
         $this->EvQuestion->ViewCustomAttributes = "";
         // EvQuestion
         $this->EvQuestion->LinkCustomAttributes = "";
         $this->EvQuestion->HrefValue = "";
         $this->EvQuestion->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // EvQuestion
         $this->EvQuestion->EditCustomAttributes = "";
         $this->EvQuestion->EditValue = ew_HtmlEncode($this->EvQuestion->CurrentValue);
         $this->EvQuestion->PlaceHolder = ew_RemoveHtml($this->EvQuestion->FldCaption());
         // Edit refer script
         // EvQuestion
         $this->EvQuestion->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 RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // 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 {
     }
     // id_detalles
     $this->id_detalles->EditAttrs["class"] = "form-control";
     $this->id_detalles->EditCustomAttributes = "";
     if ($this->id_detalles->getSessionValue() != "") {
         $this->id_detalles->CurrentValue = $this->id_detalles->getSessionValue();
         if (strval($this->id_detalles->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_detalles->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `detalles`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activa`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_detalles, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `nombre` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_detalles->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->id_detalles->ViewValue = $this->id_detalles->CurrentValue;
             }
         } else {
             $this->id_detalles->ViewValue = NULL;
         }
         $this->id_detalles->ViewCustomAttributes = "";
     } else {
     }
     // fecha_alta
     $this->fecha_alta->EditAttrs["class"] = "form-control";
     $this->fecha_alta->EditCustomAttributes = "";
     $this->fecha_alta->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_alta->CurrentValue, 7));
     $this->fecha_alta->PlaceHolder = ew_RemoveHtml($this->fecha_alta->FldCaption());
     // fecha_baja
     $this->fecha_baja->EditAttrs["class"] = "form-control";
     $this->fecha_baja->EditCustomAttributes = "";
     $this->fecha_baja->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_baja->CurrentValue, 7));
     $this->fecha_baja->PlaceHolder = ew_RemoveHtml($this->fecha_baja->FldCaption());
     // Call Row Rendered event
     $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();
     }
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // codigo
     $this->codigo->EditAttrs["class"] = "form-control";
     $this->codigo->EditCustomAttributes = "";
     $this->codigo->EditValue = $this->codigo->CurrentValue;
     $this->codigo->ViewCustomAttributes = "";
     // 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());
     // 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());
     // 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 `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 = "";
     } else {
     }
     // id_hoja_mantenimeinto
     $this->id_hoja_mantenimeinto->EditAttrs["class"] = "form-control";
     $this->id_hoja_mantenimeinto->EditCustomAttributes = "";
     if ($this->id_hoja_mantenimeinto->getSessionValue() != "") {
         $this->id_hoja_mantenimeinto->CurrentValue = $this->id_hoja_mantenimeinto->getSessionValue();
         $this->id_hoja_mantenimeinto->ViewValue = $this->id_hoja_mantenimeinto->CurrentValue;
         $this->id_hoja_mantenimeinto->ViewCustomAttributes = "";
     } else {
         $this->id_hoja_mantenimeinto->EditValue = ew_HtmlEncode($this->id_hoja_mantenimeinto->CurrentValue);
         $this->id_hoja_mantenimeinto->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimeinto->FldCaption());
     }
     // id_usuario
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Esempio n. 26
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // nombre
     // direccion
     // fecha_nacimiento
     // tel
     // cel
     // email
     // fecha_inicio
     // cetegoria
     // datos
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // direccion
         $this->direccion->ViewValue = $this->direccion->CurrentValue;
         $this->direccion->ViewCustomAttributes = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->ViewValue = $this->fecha_nacimiento->CurrentValue;
         $this->fecha_nacimiento->ViewValue = ew_FormatDateTime($this->fecha_nacimiento->ViewValue, 7);
         $this->fecha_nacimiento->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewCustomAttributes = "";
         // email
         $this->_email->ViewValue = $this->_email->CurrentValue;
         $this->_email->ViewValue = strtolower($this->_email->ViewValue);
         $this->_email->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 = "";
         // cetegoria
         $this->cetegoria->ViewValue = $this->cetegoria->CurrentValue;
         $this->cetegoria->ViewValue = ew_FormatNumber($this->cetegoria->ViewValue, 0, -2, -2, -2);
         $this->cetegoria->ViewCustomAttributes = "";
         // datos
         $this->datos->ViewValue = $this->datos->CurrentValue;
         $this->datos->ViewCustomAttributes = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // direccion
         $this->direccion->LinkCustomAttributes = "";
         $this->direccion->HrefValue = "";
         $this->direccion->TooltipValue = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->LinkCustomAttributes = "";
         $this->fecha_nacimiento->HrefValue = "";
         $this->fecha_nacimiento->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // email
         $this->_email->LinkCustomAttributes = "";
         $this->_email->HrefValue = "";
         $this->_email->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // cetegoria
         $this->cetegoria->LinkCustomAttributes = "";
         $this->cetegoria->HrefValue = "";
         $this->cetegoria->TooltipValue = "";
         // datos
         $this->datos->LinkCustomAttributes = "";
         $this->datos->HrefValue = "";
         $this->datos->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // nombre
         $this->nombre->EditAttrs["class"] = "form-control";
         $this->nombre->EditCustomAttributes = "";
         $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue);
         $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption());
         // direccion
         $this->direccion->EditAttrs["class"] = "form-control";
         $this->direccion->EditCustomAttributes = "";
         $this->direccion->EditValue = ew_HtmlEncode($this->direccion->CurrentValue);
         $this->direccion->PlaceHolder = ew_RemoveHtml($this->direccion->FldCaption());
         // fecha_nacimiento
         $this->fecha_nacimiento->EditAttrs["class"] = "form-control";
         $this->fecha_nacimiento->EditCustomAttributes = "";
         $this->fecha_nacimiento->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_nacimiento->CurrentValue, 7));
         $this->fecha_nacimiento->PlaceHolder = ew_RemoveHtml($this->fecha_nacimiento->FldCaption());
         // tel
         $this->tel->EditAttrs["class"] = "form-control";
         $this->tel->EditCustomAttributes = "";
         $this->tel->EditValue = ew_HtmlEncode($this->tel->CurrentValue);
         $this->tel->PlaceHolder = ew_RemoveHtml($this->tel->FldCaption());
         // cel
         $this->cel->EditAttrs["class"] = "form-control";
         $this->cel->EditCustomAttributes = "";
         $this->cel->EditValue = ew_HtmlEncode($this->cel->CurrentValue);
         $this->cel->PlaceHolder = ew_RemoveHtml($this->cel->FldCaption());
         // email
         $this->_email->EditAttrs["class"] = "form-control";
         $this->_email->EditCustomAttributes = "";
         $this->_email->EditValue = ew_HtmlEncode($this->_email->CurrentValue);
         $this->_email->PlaceHolder = ew_RemoveHtml($this->_email->FldCaption());
         // fecha_inicio
         $this->fecha_inicio->EditAttrs["class"] = "form-control";
         $this->fecha_inicio->EditCustomAttributes = "";
         $this->fecha_inicio->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_inicio->CurrentValue, 7));
         $this->fecha_inicio->PlaceHolder = ew_RemoveHtml($this->fecha_inicio->FldCaption());
         // cetegoria
         $this->cetegoria->EditAttrs["class"] = "form-control";
         $this->cetegoria->EditCustomAttributes = "";
         $this->cetegoria->EditValue = ew_HtmlEncode($this->cetegoria->CurrentValue);
         $this->cetegoria->PlaceHolder = ew_RemoveHtml($this->cetegoria->FldCaption());
         // datos
         $this->datos->EditAttrs["class"] = "form-control";
         $this->datos->EditCustomAttributes = "";
         $this->datos->EditValue = ew_HtmlEncode($this->datos->CurrentValue);
         $this->datos->PlaceHolder = ew_RemoveHtml($this->datos->FldCaption());
         // Edit refer script
         // nombre
         $this->nombre->HrefValue = "";
         // direccion
         $this->direccion->HrefValue = "";
         // fecha_nacimiento
         $this->fecha_nacimiento->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // email
         $this->_email->HrefValue = "";
         // fecha_inicio
         $this->fecha_inicio->HrefValue = "";
         // cetegoria
         $this->cetegoria->HrefValue = "";
         // datos
         $this->datos->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
     // 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();
     }
 }
Esempio n. 28
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();
     }
 }
Esempio n. 29
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // socio_nro
     // id_actividad
     // id_usuario
     // propietario
     // comercio
     // direccion_comercio
     // activo
     // mail
     // tel
     // cel
     // cuit_cuil
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // socio_nro
         $this->socio_nro->ViewValue = $this->socio_nro->CurrentValue;
         $this->socio_nro->ViewCustomAttributes = "";
         // id_actividad
         if (strval($this->id_actividad->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_actividad->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `actividad` AS `DispFld`, `descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `actividad`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activa`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_actividad, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_actividad->ViewValue = $rswrk->fields('DispFld');
                 $this->id_actividad->ViewValue .= ew_ValueSeparator(1, $this->id_actividad) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_actividad->ViewValue = $this->id_actividad->CurrentValue;
             }
         } else {
             $this->id_actividad->ViewValue = NULL;
         }
         $this->id_actividad->ViewCustomAttributes = "";
         // propietario
         $this->propietario->ViewValue = $this->propietario->CurrentValue;
         $this->propietario->ViewCustomAttributes = "";
         // comercio
         $this->comercio->ViewValue = $this->comercio->CurrentValue;
         $this->comercio->ViewCustomAttributes = "";
         // direccion_comercio
         $this->direccion_comercio->ViewValue = $this->direccion_comercio->CurrentValue;
         $this->direccion_comercio->ViewCustomAttributes = "";
         // activo
         if (strval($this->activo->CurrentValue) != "") {
             switch ($this->activo->CurrentValue) {
                 case $this->activo->FldTagValue(1):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->CurrentValue;
                     break;
                 case $this->activo->FldTagValue(2):
                     $this->activo->ViewValue = $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->CurrentValue;
                     break;
                 default:
                     $this->activo->ViewValue = $this->activo->CurrentValue;
             }
         } else {
             $this->activo->ViewValue = NULL;
         }
         $this->activo->ViewCustomAttributes = "";
         // mail
         $this->mail->ViewValue = $this->mail->CurrentValue;
         $this->mail->ViewValue = strtolower($this->mail->ViewValue);
         $this->mail->ViewCustomAttributes = "";
         // tel
         $this->tel->ViewValue = $this->tel->CurrentValue;
         $this->tel->ViewValue = trim($this->tel->ViewValue);
         $this->tel->ViewCustomAttributes = "";
         // cel
         $this->cel->ViewValue = $this->cel->CurrentValue;
         $this->cel->ViewValue = trim($this->cel->ViewValue);
         $this->cel->ViewCustomAttributes = "";
         // cuit_cuil
         $this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
         $this->cuit_cuil->ViewValue = ew_FormatNumber($this->cuit_cuil->ViewValue, 0, -2, -2, -2);
         $this->cuit_cuil->ViewCustomAttributes = "";
         // id_actividad
         $this->id_actividad->LinkCustomAttributes = "";
         $this->id_actividad->HrefValue = "";
         $this->id_actividad->TooltipValue = "";
         // propietario
         $this->propietario->LinkCustomAttributes = "";
         $this->propietario->HrefValue = "";
         $this->propietario->TooltipValue = "";
         // comercio
         $this->comercio->LinkCustomAttributes = "";
         $this->comercio->HrefValue = "";
         $this->comercio->TooltipValue = "";
         // direccion_comercio
         $this->direccion_comercio->LinkCustomAttributes = "";
         $this->direccion_comercio->HrefValue = "";
         $this->direccion_comercio->TooltipValue = "";
         // activo
         $this->activo->LinkCustomAttributes = "";
         $this->activo->HrefValue = "";
         $this->activo->TooltipValue = "";
         // mail
         $this->mail->LinkCustomAttributes = "";
         $this->mail->HrefValue = "";
         $this->mail->TooltipValue = "";
         // tel
         $this->tel->LinkCustomAttributes = "";
         $this->tel->HrefValue = "";
         $this->tel->TooltipValue = "";
         // cel
         $this->cel->LinkCustomAttributes = "";
         $this->cel->HrefValue = "";
         $this->cel->TooltipValue = "";
         // cuit_cuil
         $this->cuit_cuil->LinkCustomAttributes = "";
         $this->cuit_cuil->HrefValue = "";
         $this->cuit_cuil->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // id_actividad
         $this->id_actividad->EditCustomAttributes = "";
         if (trim(strval($this->id_actividad->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_actividad->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `id`, `actividad` AS `DispFld`, `descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `actividad`";
         $sWhereWrk = "";
         $lookuptblfilter = "`activa`='S'";
         if (strval($lookuptblfilter) != "") {
             ew_AddFilter($sWhereWrk, $lookuptblfilter);
         }
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_actividad, $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->id_actividad->EditValue = $arwrk;
         // propietario
         $this->propietario->EditCustomAttributes = "";
         $this->propietario->EditValue = ew_HtmlEncode($this->propietario->CurrentValue);
         $this->propietario->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->propietario->FldCaption()));
         // comercio
         $this->comercio->EditCustomAttributes = "";
         $this->comercio->EditValue = ew_HtmlEncode($this->comercio->CurrentValue);
         $this->comercio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->comercio->FldCaption()));
         // direccion_comercio
         $this->direccion_comercio->EditCustomAttributes = "";
         $this->direccion_comercio->EditValue = ew_HtmlEncode($this->direccion_comercio->CurrentValue);
         $this->direccion_comercio->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->direccion_comercio->FldCaption()));
         // activo
         $this->activo->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->activo->FldTagValue(1), $this->activo->FldTagCaption(1) != "" ? $this->activo->FldTagCaption(1) : $this->activo->FldTagValue(1));
         $arwrk[] = array($this->activo->FldTagValue(2), $this->activo->FldTagCaption(2) != "" ? $this->activo->FldTagCaption(2) : $this->activo->FldTagValue(2));
         $this->activo->EditValue = $arwrk;
         // mail
         $this->mail->EditCustomAttributes = "";
         $this->mail->EditValue = ew_HtmlEncode($this->mail->CurrentValue);
         $this->mail->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->mail->FldCaption()));
         // 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()));
         // cuit_cuil
         $this->cuit_cuil->EditCustomAttributes = "";
         $this->cuit_cuil->EditValue = ew_HtmlEncode($this->cuit_cuil->CurrentValue);
         $this->cuit_cuil->PlaceHolder = ew_HtmlEncode(ew_RemoveHtml($this->cuit_cuil->FldCaption()));
         // Edit refer script
         // id_actividad
         $this->id_actividad->HrefValue = "";
         // propietario
         $this->propietario->HrefValue = "";
         // comercio
         $this->comercio->HrefValue = "";
         // direccion_comercio
         $this->direccion_comercio->HrefValue = "";
         // activo
         $this->activo->HrefValue = "";
         // mail
         $this->mail->HrefValue = "";
         // tel
         $this->tel->HrefValue = "";
         // cel
         $this->cel->HrefValue = "";
         // cuit_cuil
         $this->cuit_cuil->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();
     }
 }
Esempio n. 30
0
 function RenderRow()
 {
     global $Security, $Language, $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // UPLOAD_FILE_ID
     // PATH
     // PROCESS
     // BANK_ACCOUNT_ID
     // UPLOAD_FILE_STATUS_ID
     // DATETIME
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // UPLOAD_FILE_ID
         $this->UPLOAD_FILE_ID->ViewValue = $this->UPLOAD_FILE_ID->CurrentValue;
         $this->UPLOAD_FILE_ID->ViewCustomAttributes = "";
         // PATH
         if (!ew_Empty($this->PATH->Upload->DbValue)) {
             $this->PATH->ViewValue = $this->PATH->Upload->DbValue;
         } else {
             $this->PATH->ViewValue = "";
         }
         $this->PATH->ViewCustomAttributes = "";
         // PROCESS
         $this->PROCESS->ViewValue = $this->PROCESS->CurrentValue;
         $this->PROCESS->ViewCustomAttributes = "";
         // BANK_ACCOUNT_ID
         $this->BANK_ACCOUNT_ID->ViewValue = $this->BANK_ACCOUNT_ID->CurrentValue;
         $this->BANK_ACCOUNT_ID->ViewCustomAttributes = "";
         // UPLOAD_FILE_STATUS_ID
         $this->UPLOAD_FILE_STATUS_ID->ViewValue = $this->UPLOAD_FILE_STATUS_ID->CurrentValue;
         $this->UPLOAD_FILE_STATUS_ID->ViewCustomAttributes = "";
         // DATETIME
         $this->DATETIME->ViewValue = $this->DATETIME->CurrentValue;
         $this->DATETIME->ViewValue = ew_FormatDateTime($this->DATETIME->ViewValue, 7);
         $this->DATETIME->ViewCustomAttributes = "";
         // PATH
         $this->PATH->LinkCustomAttributes = "";
         $this->PATH->HrefValue = "";
         $this->PATH->HrefValue2 = $this->PATH->UploadPath . $this->PATH->Upload->DbValue;
         $this->PATH->TooltipValue = "";
         // PROCESS
         $this->PROCESS->LinkCustomAttributes = "";
         $this->PROCESS->HrefValue = "";
         $this->PROCESS->TooltipValue = "";
         // BANK_ACCOUNT_ID
         $this->BANK_ACCOUNT_ID->LinkCustomAttributes = "";
         $this->BANK_ACCOUNT_ID->HrefValue = "";
         $this->BANK_ACCOUNT_ID->TooltipValue = "";
         // UPLOAD_FILE_STATUS_ID
         $this->UPLOAD_FILE_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_STATUS_ID->HrefValue = "";
         $this->UPLOAD_FILE_STATUS_ID->TooltipValue = "";
         // DATETIME
         $this->DATETIME->LinkCustomAttributes = "";
         $this->DATETIME->HrefValue = "";
         $this->DATETIME->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // PATH
         $this->PATH->EditAttrs["class"] = "form-control";
         $this->PATH->EditCustomAttributes = "";
         if (!ew_Empty($this->PATH->Upload->DbValue)) {
             $this->PATH->EditValue = $this->PATH->Upload->DbValue;
         } else {
             $this->PATH->EditValue = "";
         }
         if (!ew_Empty($this->PATH->CurrentValue)) {
             $this->PATH->Upload->FileName = $this->PATH->CurrentValue;
         }
         if (($this->CurrentAction == "I" || $this->CurrentAction == "C") && !$this->EventCancelled) {
             ew_RenderUploadField($this->PATH);
         }
         // PROCESS
         $this->PROCESS->EditAttrs["class"] = "form-control";
         $this->PROCESS->EditCustomAttributes = "";
         $this->PROCESS->EditValue = ew_HtmlEncode($this->PROCESS->CurrentValue);
         $this->PROCESS->PlaceHolder = ew_RemoveHtml($this->PROCESS->FldCaption());
         // BANK_ACCOUNT_ID
         $this->BANK_ACCOUNT_ID->EditAttrs["class"] = "form-control";
         $this->BANK_ACCOUNT_ID->EditCustomAttributes = "";
         $this->BANK_ACCOUNT_ID->EditValue = ew_HtmlEncode($this->BANK_ACCOUNT_ID->CurrentValue);
         $this->BANK_ACCOUNT_ID->PlaceHolder = ew_RemoveHtml($this->BANK_ACCOUNT_ID->FldCaption());
         // UPLOAD_FILE_STATUS_ID
         $this->UPLOAD_FILE_STATUS_ID->EditAttrs["class"] = "form-control";
         $this->UPLOAD_FILE_STATUS_ID->EditCustomAttributes = "";
         $this->UPLOAD_FILE_STATUS_ID->EditValue = ew_HtmlEncode($this->UPLOAD_FILE_STATUS_ID->CurrentValue);
         $this->UPLOAD_FILE_STATUS_ID->PlaceHolder = ew_RemoveHtml($this->UPLOAD_FILE_STATUS_ID->FldCaption());
         // DATETIME
         $this->DATETIME->EditAttrs["class"] = "form-control";
         $this->DATETIME->EditCustomAttributes = "";
         $this->DATETIME->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->DATETIME->CurrentValue, 7));
         $this->DATETIME->PlaceHolder = ew_RemoveHtml($this->DATETIME->FldCaption());
         // Add refer script
         // PATH
         $this->PATH->LinkCustomAttributes = "";
         $this->PATH->HrefValue = "";
         $this->PATH->HrefValue2 = $this->PATH->UploadPath . $this->PATH->Upload->DbValue;
         // PROCESS
         $this->PROCESS->LinkCustomAttributes = "";
         $this->PROCESS->HrefValue = "";
         // BANK_ACCOUNT_ID
         $this->BANK_ACCOUNT_ID->LinkCustomAttributes = "";
         $this->BANK_ACCOUNT_ID->HrefValue = "";
         // UPLOAD_FILE_STATUS_ID
         $this->UPLOAD_FILE_STATUS_ID->LinkCustomAttributes = "";
         $this->UPLOAD_FILE_STATUS_ID->HrefValue = "";
         // DATETIME
         $this->DATETIME->LinkCustomAttributes = "";
         $this->DATETIME->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();
     }
 }