function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // iddoctor_especialidad
     // iddoctor
     // idespecialidad
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // iddoctor_especialidad
         $this->iddoctor_especialidad->ViewValue = $this->iddoctor_especialidad->CurrentValue;
         $this->iddoctor_especialidad->ViewCustomAttributes = "";
         // iddoctor
         if (strval($this->iddoctor->CurrentValue) != "") {
             $sFilterWrk = "`iddoctor`" . ew_SearchString("=", $this->iddoctor->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `iddoctor`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `doctor`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->iddoctor, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->iddoctor->ViewValue = $rswrk->fields('DispFld');
                 $this->iddoctor->ViewValue .= ew_ValueSeparator(2, $this->iddoctor) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->iddoctor->ViewValue = $this->iddoctor->CurrentValue;
             }
         } else {
             $this->iddoctor->ViewValue = NULL;
         }
         $this->iddoctor->ViewCustomAttributes = "";
         // idespecialidad
         if (strval($this->idespecialidad->CurrentValue) != "") {
             $sFilterWrk = "`idespecialidad`" . ew_SearchString("=", $this->idespecialidad->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idespecialidad`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `especialidad`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idespecialidad, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idespecialidad->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idespecialidad->ViewValue = $this->idespecialidad->CurrentValue;
             }
         } else {
             $this->idespecialidad->ViewValue = NULL;
         }
         $this->idespecialidad->ViewCustomAttributes = "";
         // iddoctor
         $this->iddoctor->LinkCustomAttributes = "";
         $this->iddoctor->HrefValue = "";
         $this->iddoctor->TooltipValue = "";
         // idespecialidad
         $this->idespecialidad->LinkCustomAttributes = "";
         $this->idespecialidad->HrefValue = "";
         $this->idespecialidad->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // iddoctor
         $this->iddoctor->EditAttrs["class"] = "form-control";
         $this->iddoctor->EditCustomAttributes = "";
         if (trim(strval($this->iddoctor->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`iddoctor`" . ew_SearchString("=", $this->iddoctor->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `iddoctor`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `doctor`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->iddoctor, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->iddoctor->EditValue = $arwrk;
         // idespecialidad
         $this->idespecialidad->EditAttrs["class"] = "form-control";
         $this->idespecialidad->EditCustomAttributes = "";
         if ($this->idespecialidad->getSessionValue() != "") {
             $this->idespecialidad->CurrentValue = $this->idespecialidad->getSessionValue();
             if (strval($this->idespecialidad->CurrentValue) != "") {
                 $sFilterWrk = "`idespecialidad`" . ew_SearchString("=", $this->idespecialidad->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idespecialidad`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `especialidad`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idespecialidad, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idespecialidad->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idespecialidad->ViewValue = $this->idespecialidad->CurrentValue;
                 }
             } else {
                 $this->idespecialidad->ViewValue = NULL;
             }
             $this->idespecialidad->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idespecialidad->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idespecialidad`" . ew_SearchString("=", $this->idespecialidad->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idespecialidad`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `especialidad`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idespecialidad, $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->idespecialidad->EditValue = $arwrk;
         }
         // Edit refer script
         // iddoctor
         $this->iddoctor->HrefValue = "";
         // idespecialidad
         $this->idespecialidad->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
     // accountId
     // permissionId
     // granted
     // realmId
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // accountId
         if (strval($this->accountId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->accountId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `username` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `account`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->accountId->ViewValue = $rswrk->fields('DispFld');
                 $this->accountId->ViewValue .= ew_ValueSeparator(1, $this->accountId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->accountId->ViewValue = $this->accountId->CurrentValue;
             }
         } else {
             $this->accountId->ViewValue = NULL;
         }
         $this->accountId->ViewCustomAttributes = "";
         // permissionId
         if ($this->permissionId->VirtualValue != "") {
             $this->permissionId->ViewValue = $this->permissionId->VirtualValue;
         } else {
             if (strval($this->permissionId->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->permissionId->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `rbac_permissions`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->permissionId->ViewValue = $rswrk->fields('DispFld');
                     $this->permissionId->ViewValue .= ew_ValueSeparator(1, $this->permissionId) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->permissionId->ViewValue = $this->permissionId->CurrentValue;
                 }
             } else {
                 $this->permissionId->ViewValue = NULL;
             }
         }
         $this->permissionId->ViewCustomAttributes = "";
         // granted
         if (strval($this->granted->CurrentValue) != "") {
             switch ($this->granted->CurrentValue) {
                 case $this->granted->FldTagValue(1):
                     $this->granted->ViewValue = $this->granted->FldTagCaption(1) != "" ? $this->granted->FldTagCaption(1) : $this->granted->CurrentValue;
                     break;
                 case $this->granted->FldTagValue(2):
                     $this->granted->ViewValue = $this->granted->FldTagCaption(2) != "" ? $this->granted->FldTagCaption(2) : $this->granted->CurrentValue;
                     break;
                 default:
                     $this->granted->ViewValue = $this->granted->CurrentValue;
             }
         } else {
             $this->granted->ViewValue = NULL;
         }
         $this->granted->ViewCustomAttributes = "";
         // realmId
         if (strval($this->realmId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->realmId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `realmlist`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->realmId->ViewValue = $rswrk->fields('DispFld');
                 $this->realmId->ViewValue .= ew_ValueSeparator(1, $this->realmId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->realmId->ViewValue = $this->realmId->CurrentValue;
             }
         } else {
             $this->realmId->ViewValue = NULL;
         }
         $this->realmId->ViewCustomAttributes = "";
         // accountId
         $this->accountId->LinkCustomAttributes = "";
         $this->accountId->HrefValue = "";
         $this->accountId->TooltipValue = "";
         // permissionId
         $this->permissionId->LinkCustomAttributes = "";
         $this->permissionId->HrefValue = "";
         $this->permissionId->TooltipValue = "";
         // granted
         $this->granted->LinkCustomAttributes = "";
         $this->granted->HrefValue = "";
         $this->granted->TooltipValue = "";
         // realmId
         $this->realmId->LinkCustomAttributes = "";
         $this->realmId->HrefValue = "";
         $this->realmId->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // accountId
         $this->accountId->EditCustomAttributes = "";
         if (strval($this->accountId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->accountId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `username` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `account`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->accountId->EditValue = $rswrk->fields('DispFld');
                 $this->accountId->EditValue .= ew_ValueSeparator(1, $this->accountId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->accountId->EditValue = $this->accountId->CurrentValue;
             }
         } else {
             $this->accountId->EditValue = NULL;
         }
         $this->accountId->ViewCustomAttributes = "";
         // permissionId
         $this->permissionId->EditCustomAttributes = "";
         if ($this->permissionId->VirtualValue != "") {
             $this->permissionId->ViewValue = $this->permissionId->VirtualValue;
         } else {
             if (strval($this->permissionId->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->permissionId->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `rbac_permissions`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->permissionId->EditValue = $rswrk->fields('DispFld');
                     $this->permissionId->EditValue .= ew_ValueSeparator(1, $this->permissionId) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->permissionId->EditValue = $this->permissionId->CurrentValue;
                 }
             } else {
                 $this->permissionId->EditValue = NULL;
             }
         }
         $this->permissionId->ViewCustomAttributes = "";
         // granted
         $this->granted->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->granted->FldTagValue(1), $this->granted->FldTagCaption(1) != "" ? $this->granted->FldTagCaption(1) : $this->granted->FldTagValue(1));
         $arwrk[] = array($this->granted->FldTagValue(2), $this->granted->FldTagCaption(2) != "" ? $this->granted->FldTagCaption(2) : $this->granted->FldTagValue(2));
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect")));
         $this->granted->EditValue = $arwrk;
         // realmId
         $this->realmId->EditCustomAttributes = "";
         if (strval($this->realmId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->realmId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `realmlist`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->realmId->EditValue = $rswrk->fields('DispFld');
                 $this->realmId->EditValue .= ew_ValueSeparator(1, $this->realmId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->realmId->EditValue = $this->realmId->CurrentValue;
             }
         } else {
             $this->realmId->EditValue = NULL;
         }
         $this->realmId->ViewCustomAttributes = "";
         // Edit refer script
         // accountId
         $this->accountId->HrefValue = "";
         // permissionId
         $this->permissionId->HrefValue = "";
         // granted
         $this->granted->HrefValue = "";
         // realmId
         $this->realmId->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();
     }
 }
                            $selwrk = strval($receta->idempleado->CurrentValue) == strval($arwrk[$rowcntwrk][0]) ? " selected=\"selected\"" : "";
                            if ($selwrk != "") {
                                $emptywrk = FALSE;
                            }
                            ?>
<option value="<?php 
                            echo ew_HtmlEncode($arwrk[$rowcntwrk][0]);
                            ?>
"<?php 
                            echo $selwrk;
                            ?>
>
<?php 
                            echo $arwrk[$rowcntwrk][1];
                            if ($arwrk[$rowcntwrk][2] != "") {
                                echo ew_ValueSeparator(1, $receta->idempleado);
                                echo $arwrk[$rowcntwrk][2];
                            }
                            ?>
</option>
<?php 
                        }
                    }
                    if (@$emptywrk) {
                        $receta->idempleado->OldValue = "";
                    }
                    ?>
</select>
<?php 
                    $sSqlWrk = "SELECT `idempleado`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empleado`";
                    $sWhereWrk = "";
Exemplo n.º 4
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // realmid
     // acctid
     // numchars
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // realmid
         if (strval($this->realmid->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->realmid->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `realmlist`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->realmid->ViewValue = $rswrk->fields('DispFld');
                 $this->realmid->ViewValue .= ew_ValueSeparator(1, $this->realmid) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->realmid->ViewValue = $this->realmid->CurrentValue;
             }
         } else {
             $this->realmid->ViewValue = NULL;
         }
         $this->realmid->ViewCustomAttributes = "";
         // acctid
         if (strval($this->acctid->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->acctid->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `username` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `account`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->acctid->ViewValue = $rswrk->fields('DispFld');
                 $this->acctid->ViewValue .= ew_ValueSeparator(1, $this->acctid) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->acctid->ViewValue = $this->acctid->CurrentValue;
             }
         } else {
             $this->acctid->ViewValue = NULL;
         }
         $this->acctid->ViewCustomAttributes = "";
         // numchars
         $this->numchars->ViewValue = $this->numchars->CurrentValue;
         $this->numchars->ViewCustomAttributes = "";
         // realmid
         $this->realmid->LinkCustomAttributes = "";
         $this->realmid->HrefValue = "";
         $this->realmid->TooltipValue = "";
         // acctid
         $this->acctid->LinkCustomAttributes = "";
         $this->acctid->HrefValue = "";
         $this->acctid->TooltipValue = "";
         // numchars
         $this->numchars->LinkCustomAttributes = "";
         $this->numchars->HrefValue = "";
         $this->numchars->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 5
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // Patente
     // cantidad_rueda
     // nombre
     // modelo
     // id_chofer
     // id_guarda
     // id_marca
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // codigo
         $this->codigo->ViewValue = $this->codigo->CurrentValue;
         $this->codigo->ViewCustomAttributes = "";
         // Patente
         $this->Patente->ViewValue = $this->Patente->CurrentValue;
         $this->Patente->ViewCustomAttributes = "";
         // cantidad_rueda
         $this->cantidad_rueda->ViewValue = $this->cantidad_rueda->CurrentValue;
         $this->cantidad_rueda->ViewCustomAttributes = "";
         // nombre
         $this->nombre->ViewValue = $this->nombre->CurrentValue;
         $this->nombre->ViewCustomAttributes = "";
         // modelo
         $this->modelo->ViewValue = $this->modelo->CurrentValue;
         $this->modelo->ViewCustomAttributes = "";
         // id_chofer
         if ($this->id_chofer->VirtualValue != "") {
             $this->id_chofer->ViewValue = $this->id_chofer->VirtualValue;
         } else {
             if (strval($this->id_chofer->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_chofer->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `choferes`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_chofer, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `nombre` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_chofer->ViewValue = $rswrk->fields('DispFld');
                     $this->id_chofer->ViewValue .= ew_ValueSeparator(1, $this->id_chofer) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_chofer->ViewValue = $this->id_chofer->CurrentValue;
                 }
             } else {
                 $this->id_chofer->ViewValue = NULL;
             }
         }
         $this->id_chofer->ViewCustomAttributes = "";
         // id_guarda
         if ($this->id_guarda->VirtualValue != "") {
             $this->id_guarda->ViewValue = $this->id_guarda->VirtualValue;
         } else {
             if (strval($this->id_guarda->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_guarda->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `choferes`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_guarda, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `nombre` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_guarda->ViewValue = $rswrk->fields('DispFld');
                     $this->id_guarda->ViewValue .= ew_ValueSeparator(1, $this->id_guarda) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_guarda->ViewValue = $this->id_guarda->CurrentValue;
                 }
             } else {
                 $this->id_guarda->ViewValue = NULL;
             }
         }
         $this->id_guarda->ViewCustomAttributes = "";
         // id_marca
         if ($this->id_marca->VirtualValue != "") {
             $this->id_marca->ViewValue = $this->id_marca->VirtualValue;
         } else {
             if (strval($this->id_marca->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_marca->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `marca` AS `DispFld`, `modelo` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `marcas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_marca, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `marca` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_marca->ViewValue = $rswrk->fields('DispFld');
                     $this->id_marca->ViewValue .= ew_ValueSeparator(1, $this->id_marca) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_marca->ViewValue = $this->id_marca->CurrentValue;
                 }
             } else {
                 $this->id_marca->ViewValue = NULL;
             }
         }
         $this->id_marca->ViewCustomAttributes = "";
         // codigo
         $this->codigo->LinkCustomAttributes = "";
         $this->codigo->HrefValue = "";
         $this->codigo->TooltipValue = "";
         // Patente
         $this->Patente->LinkCustomAttributes = "";
         $this->Patente->HrefValue = "";
         $this->Patente->TooltipValue = "";
         // cantidad_rueda
         $this->cantidad_rueda->LinkCustomAttributes = "";
         $this->cantidad_rueda->HrefValue = "";
         $this->cantidad_rueda->TooltipValue = "";
         // nombre
         $this->nombre->LinkCustomAttributes = "";
         $this->nombre->HrefValue = "";
         $this->nombre->TooltipValue = "";
         // modelo
         $this->modelo->LinkCustomAttributes = "";
         $this->modelo->HrefValue = "";
         $this->modelo->TooltipValue = "";
         // id_chofer
         $this->id_chofer->LinkCustomAttributes = "";
         $this->id_chofer->HrefValue = "";
         $this->id_chofer->TooltipValue = "";
         // id_guarda
         $this->id_guarda->LinkCustomAttributes = "";
         $this->id_guarda->HrefValue = "";
         $this->id_guarda->TooltipValue = "";
         // id_marca
         $this->id_marca->LinkCustomAttributes = "";
         $this->id_marca->HrefValue = "";
         $this->id_marca->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 6
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // id_deuda
     // fecha
     // monto
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewValue = $this->id->CurrentValue;
         $this->id->ViewCustomAttributes = "";
         // id_deuda
         if (strval($this->id_deuda->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
                 $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
             }
         } else {
             $this->id_deuda->ViewValue = NULL;
         }
         $this->id_deuda->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewCustomAttributes = "";
         // id_usuario
         if (strval($this->id_usuario->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_usuario->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `usuario` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuario`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_usuario, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_usuario->ViewValue = $rswrk->fields('DispFld');
                 $this->id_usuario->ViewValue .= ew_ValueSeparator(1, $this->id_usuario) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
             }
         } else {
             $this->id_usuario->ViewValue = NULL;
         }
         $this->id_usuario->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // id_deuda
         $this->id_deuda->LinkCustomAttributes = "";
         $this->id_deuda->HrefValue = "";
         $this->id_deuda->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_usuario
         $this->id_usuario->LinkCustomAttributes = "";
         $this->id_usuario->HrefValue = "";
         $this->id_usuario->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 7
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();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Subscriptions2;
     // Call Row_Rendering event
     $Subscriptions2->Row_Rendering();
     // Common render codes for all row types
     // OrderID
     $Subscriptions2->OrderID->CellCssStyle = "";
     $Subscriptions2->OrderID->CellCssClass = "";
     // DeliveryDate
     $Subscriptions2->DeliveryDate->CellCssStyle = "";
     $Subscriptions2->DeliveryDate->CellCssClass = "";
     // CustomerID
     $Subscriptions2->CustomerID->CellCssStyle = "";
     $Subscriptions2->CustomerID->CellCssClass = "";
     // WeeklyMeals
     $Subscriptions2->WeeklyMeals->CellCssStyle = "";
     $Subscriptions2->WeeklyMeals->CellCssClass = "";
     // WeeklyReg
     $Subscriptions2->WeeklyReg->CellCssStyle = "";
     $Subscriptions2->WeeklyReg->CellCssClass = "";
     // WeeklyVeg
     $Subscriptions2->WeeklyVeg->CellCssStyle = "";
     $Subscriptions2->WeeklyVeg->CellCssClass = "";
     // PromoCodeID
     $Subscriptions2->PromoCodeID->CellCssStyle = "";
     $Subscriptions2->PromoCodeID->CellCssClass = "";
     // TransactionNumber
     $Subscriptions2->TransactionNumber->CellCssStyle = "";
     $Subscriptions2->TransactionNumber->CellCssClass = "";
     // Want
     $Subscriptions2->Want->CellCssStyle = "";
     $Subscriptions2->Want->CellCssClass = "";
     // DontWant
     $Subscriptions2->DontWant->CellCssStyle = "";
     $Subscriptions2->DontWant->CellCssClass = "";
     // Comments
     $Subscriptions2->Comments->CellCssStyle = "";
     $Subscriptions2->Comments->CellCssClass = "";
     // SubscriptionID
     $Subscriptions2->SubscriptionID->CellCssStyle = "";
     $Subscriptions2->SubscriptionID->CellCssClass = "";
     if ($Subscriptions2->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Subscriptions2->OrderID->ViewValue = $Subscriptions2->OrderID->CurrentValue;
         $Subscriptions2->OrderID->CssStyle = "";
         $Subscriptions2->OrderID->CssClass = "";
         $Subscriptions2->OrderID->ViewCustomAttributes = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->ViewValue = $Subscriptions2->DeliveryDate->CurrentValue;
         $Subscriptions2->DeliveryDate->ViewValue = ew_FormatDateTime($Subscriptions2->DeliveryDate->ViewValue, 6);
         $Subscriptions2->DeliveryDate->CssStyle = "";
         $Subscriptions2->DeliveryDate->CssClass = "";
         $Subscriptions2->DeliveryDate->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Subscriptions2->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Subscriptions2->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Subscriptions2->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->CustomerID->ViewValue = $Subscriptions2->CustomerID->CurrentValue;
             }
         } else {
             $Subscriptions2->CustomerID->ViewValue = NULL;
         }
         $Subscriptions2->CustomerID->CssStyle = "";
         $Subscriptions2->CustomerID->CssClass = "";
         $Subscriptions2->CustomerID->ViewCustomAttributes = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->ViewValue = $Subscriptions2->WeeklyMeals->CurrentValue;
         $Subscriptions2->WeeklyMeals->CssStyle = "";
         $Subscriptions2->WeeklyMeals->CssClass = "";
         $Subscriptions2->WeeklyMeals->ViewCustomAttributes = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->ViewValue = $Subscriptions2->WeeklyReg->CurrentValue;
         $Subscriptions2->WeeklyReg->CssStyle = "";
         $Subscriptions2->WeeklyReg->CssClass = "";
         $Subscriptions2->WeeklyReg->ViewCustomAttributes = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->ViewValue = $Subscriptions2->WeeklyVeg->CurrentValue;
         $Subscriptions2->WeeklyVeg->CssStyle = "";
         $Subscriptions2->WeeklyVeg->CssClass = "";
         $Subscriptions2->WeeklyVeg->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Subscriptions2->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Subscriptions2->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->PromoCodeID->ViewValue = $Subscriptions2->PromoCodeID->CurrentValue;
             }
         } else {
             $Subscriptions2->PromoCodeID->ViewValue = NULL;
         }
         $Subscriptions2->PromoCodeID->CssStyle = "";
         $Subscriptions2->PromoCodeID->CssClass = "";
         $Subscriptions2->PromoCodeID->ViewCustomAttributes = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->ViewValue = $Subscriptions2->TransactionNumber->CurrentValue;
         $Subscriptions2->TransactionNumber->CssStyle = "";
         $Subscriptions2->TransactionNumber->CssClass = "";
         $Subscriptions2->TransactionNumber->ViewCustomAttributes = "";
         // Want
         if (strval($Subscriptions2->Want->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->Want->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->Want->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->Want->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->Want->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->Want->ViewValue = $Subscriptions2->Want->CurrentValue;
             }
         } else {
             $Subscriptions2->Want->ViewValue = NULL;
         }
         $Subscriptions2->Want->CssStyle = "";
         $Subscriptions2->Want->CssClass = "";
         $Subscriptions2->Want->ViewCustomAttributes = "";
         // DontWant
         if (strval($Subscriptions2->DontWant->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->DontWant->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->DontWant->ViewValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->DontWant->ViewValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->DontWant->ViewValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->DontWant->ViewValue = $Subscriptions2->DontWant->CurrentValue;
             }
         } else {
             $Subscriptions2->DontWant->ViewValue = NULL;
         }
         $Subscriptions2->DontWant->CssStyle = "";
         $Subscriptions2->DontWant->CssClass = "";
         $Subscriptions2->DontWant->ViewCustomAttributes = "";
         // Comments
         $Subscriptions2->Comments->ViewValue = $Subscriptions2->Comments->CurrentValue;
         $Subscriptions2->Comments->CssStyle = "";
         $Subscriptions2->Comments->CssClass = "";
         $Subscriptions2->Comments->ViewCustomAttributes = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->ViewValue = $Subscriptions2->SubscriptionID->CurrentValue;
         $Subscriptions2->SubscriptionID->CssStyle = "";
         $Subscriptions2->SubscriptionID->CssClass = "";
         $Subscriptions2->SubscriptionID->ViewCustomAttributes = "";
         // OrderID
         $Subscriptions2->OrderID->HrefValue = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->HrefValue = "";
         // CustomerID
         $Subscriptions2->CustomerID->HrefValue = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->HrefValue = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->HrefValue = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->HrefValue = "";
         // PromoCodeID
         $Subscriptions2->PromoCodeID->HrefValue = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->HrefValue = "";
         // Want
         $Subscriptions2->Want->HrefValue = "";
         // DontWant
         $Subscriptions2->DontWant->HrefValue = "";
         // Comments
         $Subscriptions2->Comments->HrefValue = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->HrefValue = "";
     } elseif ($Subscriptions2->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // OrderID
         $Subscriptions2->OrderID->EditCustomAttributes = "";
         $Subscriptions2->OrderID->EditValue = $Subscriptions2->OrderID->CurrentValue;
         $Subscriptions2->OrderID->CssStyle = "";
         $Subscriptions2->OrderID->CssClass = "";
         $Subscriptions2->OrderID->ViewCustomAttributes = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->EditCustomAttributes = "";
         $Subscriptions2->DeliveryDate->EditValue = $Subscriptions2->DeliveryDate->CurrentValue;
         $Subscriptions2->DeliveryDate->EditValue = ew_FormatDateTime($Subscriptions2->DeliveryDate->EditValue, 6);
         $Subscriptions2->DeliveryDate->CssStyle = "";
         $Subscriptions2->DeliveryDate->CssClass = "";
         $Subscriptions2->DeliveryDate->ViewCustomAttributes = "";
         // CustomerID
         $Subscriptions2->CustomerID->EditCustomAttributes = "";
         if (strval($Subscriptions2->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Subscriptions2->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->CustomerID->EditValue = $rswrk->fields('LastName');
                 $Subscriptions2->CustomerID->EditValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Subscriptions2->CustomerID->EditValue = $Subscriptions2->CustomerID->CurrentValue;
             }
         } else {
             $Subscriptions2->CustomerID->EditValue = NULL;
         }
         $Subscriptions2->CustomerID->CssStyle = "";
         $Subscriptions2->CustomerID->CssClass = "";
         $Subscriptions2->CustomerID->ViewCustomAttributes = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->EditCustomAttributes = "";
         $Subscriptions2->WeeklyMeals->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyMeals->CurrentValue);
         // WeeklyReg
         $Subscriptions2->WeeklyReg->EditCustomAttributes = "";
         $Subscriptions2->WeeklyReg->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyReg->CurrentValue);
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->EditCustomAttributes = "";
         $Subscriptions2->WeeklyVeg->EditValue = ew_HtmlEncode($Subscriptions2->WeeklyVeg->CurrentValue);
         // PromoCodeID
         $Subscriptions2->PromoCodeID->EditCustomAttributes = "";
         $sSqlWrk = "SELECT `PromoCodeID`, `PromoCodeName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `PromoCodes`";
         $sWhereWrk = "";
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE {$sWhereWrk}";
         }
         $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", "Please Select"));
         $Subscriptions2->PromoCodeID->EditValue = $arwrk;
         // TransactionNumber
         $Subscriptions2->TransactionNumber->EditCustomAttributes = "";
         $Subscriptions2->TransactionNumber->EditValue = ew_HtmlEncode($Subscriptions2->TransactionNumber->CurrentValue);
         // Want
         $Subscriptions2->Want->EditCustomAttributes = "";
         if (strval($Subscriptions2->Want->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->Want->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->Want->EditValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->Want->EditValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->Want->EditValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->Want->EditValue = $Subscriptions2->Want->CurrentValue;
             }
         } else {
             $Subscriptions2->Want->EditValue = NULL;
         }
         $Subscriptions2->Want->CssStyle = "";
         $Subscriptions2->Want->CssClass = "";
         $Subscriptions2->Want->ViewCustomAttributes = "";
         // DontWant
         $Subscriptions2->DontWant->EditCustomAttributes = "";
         if (strval($Subscriptions2->DontWant->CurrentValue) != "") {
             $arwrk = explode(",", $Subscriptions2->DontWant->CurrentValue);
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
             $sWhereWrk = "";
             foreach ($arwrk as $wrk) {
                 if ($sWhereWrk != "") {
                     $sWhereWrk .= " OR ";
                 }
                 $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= "(" . $sWhereWrk . ")";
             }
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Subscriptions2->DontWant->EditValue = "";
                 $ari = 0;
                 while (!$rswrk->EOF) {
                     $Subscriptions2->DontWant->EditValue .= $rswrk->fields('ItemName');
                     $rswrk->MoveNext();
                     if (!$rswrk->EOF) {
                         $Subscriptions2->DontWant->EditValue .= ew_ViewOptionSeparator($ari);
                     }
                     // Separate Options
                     $ari++;
                 }
                 $rswrk->Close();
             } else {
                 $Subscriptions2->DontWant->EditValue = $Subscriptions2->DontWant->CurrentValue;
             }
         } else {
             $Subscriptions2->DontWant->EditValue = NULL;
         }
         $Subscriptions2->DontWant->CssStyle = "";
         $Subscriptions2->DontWant->CssClass = "";
         $Subscriptions2->DontWant->ViewCustomAttributes = "";
         // Comments
         $Subscriptions2->Comments->EditCustomAttributes = "";
         $Subscriptions2->Comments->EditValue = $Subscriptions2->Comments->CurrentValue;
         $Subscriptions2->Comments->CssStyle = "";
         $Subscriptions2->Comments->CssClass = "";
         $Subscriptions2->Comments->ViewCustomAttributes = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->EditCustomAttributes = "";
         $Subscriptions2->SubscriptionID->EditValue = $Subscriptions2->SubscriptionID->CurrentValue;
         $Subscriptions2->SubscriptionID->CssStyle = "";
         $Subscriptions2->SubscriptionID->CssClass = "";
         $Subscriptions2->SubscriptionID->ViewCustomAttributes = "";
         // Edit refer script
         // OrderID
         $Subscriptions2->OrderID->HrefValue = "";
         // DeliveryDate
         $Subscriptions2->DeliveryDate->HrefValue = "";
         // CustomerID
         $Subscriptions2->CustomerID->HrefValue = "";
         // WeeklyMeals
         $Subscriptions2->WeeklyMeals->HrefValue = "";
         // WeeklyReg
         $Subscriptions2->WeeklyReg->HrefValue = "";
         // WeeklyVeg
         $Subscriptions2->WeeklyVeg->HrefValue = "";
         // PromoCodeID
         $Subscriptions2->PromoCodeID->HrefValue = "";
         // TransactionNumber
         $Subscriptions2->TransactionNumber->HrefValue = "";
         // Want
         $Subscriptions2->Want->HrefValue = "";
         // DontWant
         $Subscriptions2->DontWant->HrefValue = "";
         // Comments
         $Subscriptions2->Comments->HrefValue = "";
         // SubscriptionID
         $Subscriptions2->SubscriptionID->HrefValue = "";
     }
     // Call Row Rendered event
     $Subscriptions2->Row_Rendered();
 }
Exemplo n.º 9
0
<input type="hidden" data-field="x_id_hoja_ruta" name="x<?php 
                    echo $gastos_grid->RowIndex;
                    ?>
_id_hoja_ruta" id="x<?php 
                    echo $gastos_grid->RowIndex;
                    ?>
_id_hoja_ruta" value="<?php 
                    echo ew_HtmlEncode($gastos->id_hoja_ruta->CurrentValue);
                    ?>
"<?php 
                    echo $wrkonchange;
                    ?>
>
<?php 
                    $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld` FROM `hoja_rutas`";
                    $sWhereWrk = "`codigo` LIKE '{query_value}%' OR CONCAT(`codigo`,'" . ew_ValueSeparator(1, $Page->id_hoja_ruta) . "',DATE_FORMAT(`fecha_ini`, '%d/%m/%Y'),'" . ew_ValueSeparator(2, $Page->id_hoja_ruta) . "',`Origen`) LIKE '{query_value}%'";
                    if (!$GLOBALS["gastos"]->UserIDAllow("grid")) {
                        $sWhereWrk = $GLOBALS["hoja_rutas"]->AddUserIDFilter($sWhereWrk);
                    }
                    // Call Lookup selecting
                    $gastos->Lookup_Selecting($gastos->id_hoja_ruta, $sWhereWrk);
                    if ($sWhereWrk != "") {
                        $sSqlWrk .= " WHERE " . $sWhereWrk;
                    }
                    $sSqlWrk .= " ORDER BY `codigo` ASC";
                    $sSqlWrk .= " LIMIT " . EW_AUTO_SUGGEST_MAX_ENTRIES;
                    ?>
<input type="hidden" name="q_x<?php 
                    echo $gastos_grid->RowIndex;
                    ?>
_id_hoja_ruta" id="q_x<?php 
 function RenderListRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // iddoctor_servicio_medico_prestado
     // iddoctor
     // idservicio_medico_prestado
     // iddoctor_servicio_medico_prestado
     $this->iddoctor_servicio_medico_prestado->ViewValue = $this->iddoctor_servicio_medico_prestado->CurrentValue;
     $this->iddoctor_servicio_medico_prestado->ViewCustomAttributes = "";
     // iddoctor
     if (strval($this->iddoctor->CurrentValue) != "") {
         $sFilterWrk = "`iddoctor`" . ew_SearchString("=", $this->iddoctor->CurrentValue, EW_DATATYPE_NUMBER);
         $sSqlWrk = "SELECT `iddoctor`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `doctor`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->iddoctor, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->iddoctor->ViewValue = $rswrk->fields('DispFld');
             $this->iddoctor->ViewValue .= ew_ValueSeparator(2, $this->iddoctor) . $rswrk->fields('Disp3Fld');
             $rswrk->Close();
         } else {
             $this->iddoctor->ViewValue = $this->iddoctor->CurrentValue;
         }
     } else {
         $this->iddoctor->ViewValue = NULL;
     }
     $this->iddoctor->ViewCustomAttributes = "";
     // idservicio_medico_prestado
     $this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;
     if (strval($this->idservicio_medico_prestado->CurrentValue) != "") {
         $sFilterWrk = "`idservicio_medico_prestado`" . ew_SearchString("=", $this->idservicio_medico_prestado->CurrentValue, EW_DATATYPE_NUMBER);
         $sSqlWrk = "SELECT `idservicio_medico_prestado`, `idservicio_medico_prestado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico_prestado`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->idservicio_medico_prestado, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->idservicio_medico_prestado->ViewValue = $rswrk->fields('DispFld');
             $rswrk->Close();
         } else {
             $this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue;
         }
     } else {
         $this->idservicio_medico_prestado->ViewValue = NULL;
     }
     $this->idservicio_medico_prestado->ViewCustomAttributes = "";
     // iddoctor_servicio_medico_prestado
     $this->iddoctor_servicio_medico_prestado->LinkCustomAttributes = "";
     $this->iddoctor_servicio_medico_prestado->HrefValue = "";
     $this->iddoctor_servicio_medico_prestado->TooltipValue = "";
     // iddoctor
     $this->iddoctor->LinkCustomAttributes = "";
     $this->iddoctor->HrefValue = "";
     $this->iddoctor->TooltipValue = "";
     // idservicio_medico_prestado
     $this->idservicio_medico_prestado->LinkCustomAttributes = "";
     $this->idservicio_medico_prestado->HrefValue = "";
     $this->idservicio_medico_prestado->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 11
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // socio_nro
     // id_actividad
     $this->id_actividad->CellCssStyle = "white-space: nowrap;";
     // id_usuario
     // propietario
     // comercio
     // direccion_comercio
     // activo
     // mail
     // tel
     // cel
     // cuit_cuil
     // 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 = "";
     // id_usuario
     $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
     $this->id_usuario->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 = "";
     // socio_nro
     $this->socio_nro->LinkCustomAttributes = "";
     $this->socio_nro->HrefValue = "";
     $this->socio_nro->TooltipValue = "";
     // id_actividad
     $this->id_actividad->LinkCustomAttributes = "";
     $this->id_actividad->HrefValue = "";
     $this->id_actividad->TooltipValue = "";
     // id_usuario
     $this->id_usuario->LinkCustomAttributes = "";
     $this->id_usuario->HrefValue = "";
     $this->id_usuario->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 = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 12
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
         $this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
         $this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
     }
     // Convert decimal values if posted back
     if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
         $this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // codigo
     // fecha_ini
     // id_cliente
     // id_localidad_origen
     // Origen
     // id_localidad_destino
     // Destino
     // Km_ini
     // estado
     // id_vehiculo
     // id_tipo_carga
     // km_fin
     // fecha_fin
     // adelanto
     // kg_carga
     // tarifa
     // porcentaje
     // id_usuario
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // fecha_ini
         $this->fecha_ini->ViewValue = $this->fecha_ini->CurrentValue;
         $this->fecha_ini->ViewValue = ew_FormatDateTime($this->fecha_ini->ViewValue, 7);
         $this->fecha_ini->ViewCustomAttributes = "";
         // id_cliente
         if (strval($this->id_cliente->CurrentValue) != "") {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `clientes`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `razon_social` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_cliente->ViewValue = $rswrk->fields('DispFld');
                 $this->id_cliente->ViewValue .= ew_ValueSeparator(1, $this->id_cliente) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_cliente->ViewValue = $this->id_cliente->CurrentValue;
             }
         } else {
             $this->id_cliente->ViewValue = NULL;
         }
         $this->id_cliente->ViewCustomAttributes = "";
         // id_localidad_origen
         if ($this->id_localidad_origen->VirtualValue != "") {
             $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->VirtualValue;
         } else {
             if (strval($this->id_localidad_origen->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_origen->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_origen) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_origen->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_origen) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_origen->ViewValue = $this->id_localidad_origen->CurrentValue;
                 }
             } else {
                 $this->id_localidad_origen->ViewValue = NULL;
             }
         }
         $this->id_localidad_origen->ViewCustomAttributes = "";
         // Origen
         $this->Origen->ViewValue = $this->Origen->CurrentValue;
         $this->Origen->ViewCustomAttributes = "";
         // id_localidad_destino
         if ($this->id_localidad_destino->VirtualValue != "") {
             $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->VirtualValue;
         } else {
             if (strval($this->id_localidad_destino->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `v_localidad_provincia`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `localidad` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_localidad_destino->ViewValue = $rswrk->fields('DispFld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(1, $this->id_localidad_destino) . $rswrk->fields('Disp2Fld');
                     $this->id_localidad_destino->ViewValue .= ew_ValueSeparator(2, $this->id_localidad_destino) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_localidad_destino->ViewValue = $this->id_localidad_destino->CurrentValue;
                 }
             } else {
                 $this->id_localidad_destino->ViewValue = NULL;
             }
         }
         $this->id_localidad_destino->ViewCustomAttributes = "";
         // Destino
         $this->Destino->ViewValue = $this->Destino->CurrentValue;
         $this->Destino->ViewCustomAttributes = "";
         // Km_ini
         $this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
         $this->Km_ini->ViewValue = ew_FormatNumber($this->Km_ini->ViewValue, 0, -2, -2, -2);
         $this->Km_ini->ViewCustomAttributes = "";
         // estado
         $this->estado->ViewValue = $this->estado->CurrentValue;
         $this->estado->ViewCustomAttributes = "";
         // id_vehiculo
         if ($this->id_vehiculo->VirtualValue != "") {
             $this->id_vehiculo->ViewValue = $this->id_vehiculo->VirtualValue;
         } else {
             if (strval($this->id_vehiculo->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `vehiculos`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `nombre` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_vehiculo->ViewValue = $rswrk->fields('DispFld');
                     $this->id_vehiculo->ViewValue .= ew_ValueSeparator(1, $this->id_vehiculo) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_vehiculo->ViewValue = $this->id_vehiculo->CurrentValue;
                 }
             } else {
                 $this->id_vehiculo->ViewValue = NULL;
             }
         }
         $this->id_vehiculo->ViewCustomAttributes = "";
         // id_tipo_carga
         if ($this->id_tipo_carga->VirtualValue != "") {
             $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->VirtualValue;
         } else {
             if (strval($this->id_tipo_carga->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_cargas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_carga->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_carga->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_carga) . ew_FormatCurrency($rswrk->fields('Disp2Fld'), 2, 0, 0, -1);
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_carga->ViewValue = $this->id_tipo_carga->CurrentValue;
                 }
             } else {
                 $this->id_tipo_carga->ViewValue = NULL;
             }
         }
         $this->id_tipo_carga->ViewCustomAttributes = "";
         // km_fin
         $this->km_fin->ViewValue = $this->km_fin->CurrentValue;
         $this->km_fin->ViewValue = ew_FormatNumber($this->km_fin->ViewValue, 0, -2, -2, -2);
         $this->km_fin->ViewCustomAttributes = "";
         // fecha_fin
         $this->fecha_fin->ViewValue = $this->fecha_fin->CurrentValue;
         $this->fecha_fin->ViewValue = ew_FormatDateTime($this->fecha_fin->ViewValue, 7);
         $this->fecha_fin->ViewCustomAttributes = "";
         // adelanto
         $this->adelanto->ViewValue = $this->adelanto->CurrentValue;
         $this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
         $this->adelanto->ViewCustomAttributes = "";
         // kg_carga
         $this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
         $this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 0, -2, -2, -2);
         $this->kg_carga->ViewCustomAttributes = "";
         // tarifa
         $this->tarifa->ViewValue = $this->tarifa->CurrentValue;
         $this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
         $this->tarifa->ViewCustomAttributes = "";
         // porcentaje
         $this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
         $this->porcentaje->ViewCustomAttributes = "";
         // fecha_ini
         $this->fecha_ini->LinkCustomAttributes = "";
         $this->fecha_ini->HrefValue = "";
         $this->fecha_ini->TooltipValue = "";
         // id_cliente
         $this->id_cliente->LinkCustomAttributes = "";
         $this->id_cliente->HrefValue = "";
         $this->id_cliente->TooltipValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->LinkCustomAttributes = "";
         $this->id_localidad_origen->HrefValue = "";
         $this->id_localidad_origen->TooltipValue = "";
         // Origen
         $this->Origen->LinkCustomAttributes = "";
         $this->Origen->HrefValue = "";
         $this->Origen->TooltipValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->LinkCustomAttributes = "";
         $this->id_localidad_destino->HrefValue = "";
         $this->id_localidad_destino->TooltipValue = "";
         // Destino
         $this->Destino->LinkCustomAttributes = "";
         $this->Destino->HrefValue = "";
         $this->Destino->TooltipValue = "";
         // Km_ini
         $this->Km_ini->LinkCustomAttributes = "";
         $this->Km_ini->HrefValue = "";
         $this->Km_ini->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // id_vehiculo
         $this->id_vehiculo->LinkCustomAttributes = "";
         $this->id_vehiculo->HrefValue = "";
         $this->id_vehiculo->TooltipValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->LinkCustomAttributes = "";
         $this->id_tipo_carga->HrefValue = "";
         $this->id_tipo_carga->TooltipValue = "";
         // km_fin
         $this->km_fin->LinkCustomAttributes = "";
         $this->km_fin->HrefValue = "";
         $this->km_fin->TooltipValue = "";
         // fecha_fin
         $this->fecha_fin->LinkCustomAttributes = "";
         $this->fecha_fin->HrefValue = "";
         $this->fecha_fin->TooltipValue = "";
         // adelanto
         $this->adelanto->LinkCustomAttributes = "";
         $this->adelanto->HrefValue = "";
         $this->adelanto->TooltipValue = "";
         // kg_carga
         $this->kg_carga->LinkCustomAttributes = "";
         $this->kg_carga->HrefValue = "";
         $this->kg_carga->TooltipValue = "";
         // tarifa
         $this->tarifa->LinkCustomAttributes = "";
         $this->tarifa->HrefValue = "";
         $this->tarifa->TooltipValue = "";
         // porcentaje
         $this->porcentaje->LinkCustomAttributes = "";
         $this->porcentaje->HrefValue = "";
         $this->porcentaje->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_EDIT) {
         // Edit row
         // fecha_ini
         $this->fecha_ini->EditAttrs["class"] = "form-control";
         $this->fecha_ini->EditCustomAttributes = "";
         $this->fecha_ini->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_ini->CurrentValue, 7));
         $this->fecha_ini->PlaceHolder = ew_RemoveHtml($this->fecha_ini->FldCaption());
         // id_cliente
         $this->id_cliente->EditAttrs["class"] = "form-control";
         $this->id_cliente->EditCustomAttributes = "";
         if (trim(strval($this->id_cliente->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_cliente->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cuit_cuil` AS `DispFld`, `razon_social` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `clientes`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_cliente, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `razon_social` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_cliente->EditValue = $arwrk;
         // id_localidad_origen
         $this->id_localidad_origen->EditAttrs["class"] = "form-control";
         $this->id_localidad_origen->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_origen->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_origen->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_origen, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_origen->EditValue = $arwrk;
         // Origen
         $this->Origen->EditAttrs["class"] = "form-control";
         $this->Origen->EditCustomAttributes = "";
         $this->Origen->EditValue = ew_HtmlEncode($this->Origen->CurrentValue);
         $this->Origen->PlaceHolder = ew_RemoveHtml($this->Origen->FldCaption());
         // id_localidad_destino
         $this->id_localidad_destino->EditAttrs["class"] = "form-control";
         $this->id_localidad_destino->EditCustomAttributes = "";
         if (trim(strval($this->id_localidad_destino->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_localidad_destino->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `cp` AS `DispFld`, `localidad` AS `Disp2Fld`, `provincia` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `v_localidad_provincia`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_localidad_destino, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `localidad` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_localidad_destino->EditValue = $arwrk;
         // Destino
         $this->Destino->EditAttrs["class"] = "form-control";
         $this->Destino->EditCustomAttributes = "";
         $this->Destino->EditValue = ew_HtmlEncode($this->Destino->CurrentValue);
         $this->Destino->PlaceHolder = ew_RemoveHtml($this->Destino->FldCaption());
         // Km_ini
         $this->Km_ini->EditAttrs["class"] = "form-control";
         $this->Km_ini->EditCustomAttributes = "";
         $this->Km_ini->EditValue = ew_HtmlEncode($this->Km_ini->CurrentValue);
         $this->Km_ini->PlaceHolder = ew_RemoveHtml($this->Km_ini->FldCaption());
         // estado
         $this->estado->EditAttrs["class"] = "form-control";
         $this->estado->EditCustomAttributes = "";
         $this->estado->EditValue = ew_HtmlEncode($this->estado->CurrentValue);
         $this->estado->PlaceHolder = ew_RemoveHtml($this->estado->FldCaption());
         // id_vehiculo
         $this->id_vehiculo->EditAttrs["class"] = "form-control";
         $this->id_vehiculo->EditCustomAttributes = "";
         if (trim(strval($this->id_vehiculo->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_vehiculo->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Patente` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `vehiculos`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_vehiculo, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `nombre` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_vehiculo->EditValue = $arwrk;
         // id_tipo_carga
         $this->id_tipo_carga->EditAttrs["class"] = "form-control";
         $this->id_tipo_carga->EditCustomAttributes = "";
         if (trim(strval($this->id_tipo_carga->CurrentValue)) == "") {
             $sFilterWrk = "0=1";
         } else {
             $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_carga->CurrentValue, EW_DATATYPE_NUMBER);
         }
         $sSqlWrk = "SELECT `codigo`, `Tipo_carga` AS `DispFld`, `precio_base` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tipo_cargas`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_tipo_carga, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $sSqlWrk .= " ORDER BY `Tipo_carga` ASC";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         $rowswrk = count($arwrk);
         for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) {
             $arwrk[$rowcntwrk][2] = ew_FormatCurrency($arwrk[$rowcntwrk][2], 2, 0, 0, -1);
         }
         array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", ""));
         $this->id_tipo_carga->EditValue = $arwrk;
         // km_fin
         $this->km_fin->EditAttrs["class"] = "form-control";
         $this->km_fin->EditCustomAttributes = "";
         $this->km_fin->EditValue = ew_HtmlEncode($this->km_fin->CurrentValue);
         $this->km_fin->PlaceHolder = ew_RemoveHtml($this->km_fin->FldCaption());
         // fecha_fin
         $this->fecha_fin->EditAttrs["class"] = "form-control";
         $this->fecha_fin->EditCustomAttributes = "";
         $this->fecha_fin->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_fin->CurrentValue, 7));
         $this->fecha_fin->PlaceHolder = ew_RemoveHtml($this->fecha_fin->FldCaption());
         // adelanto
         $this->adelanto->EditAttrs["class"] = "form-control";
         $this->adelanto->EditCustomAttributes = "";
         $this->adelanto->EditValue = ew_HtmlEncode($this->adelanto->CurrentValue);
         $this->adelanto->PlaceHolder = ew_RemoveHtml($this->adelanto->FldCaption());
         if (strval($this->adelanto->EditValue) != "" && is_numeric($this->adelanto->EditValue)) {
             $this->adelanto->EditValue = ew_FormatNumber($this->adelanto->EditValue, -2, -2, -2, -2);
         }
         // kg_carga
         $this->kg_carga->EditAttrs["class"] = "form-control";
         $this->kg_carga->EditCustomAttributes = "";
         $this->kg_carga->EditValue = ew_HtmlEncode($this->kg_carga->CurrentValue);
         $this->kg_carga->PlaceHolder = ew_RemoveHtml($this->kg_carga->FldCaption());
         // tarifa
         $this->tarifa->EditAttrs["class"] = "form-control";
         $this->tarifa->EditCustomAttributes = "";
         $this->tarifa->EditValue = ew_HtmlEncode($this->tarifa->CurrentValue);
         $this->tarifa->PlaceHolder = ew_RemoveHtml($this->tarifa->FldCaption());
         if (strval($this->tarifa->EditValue) != "" && is_numeric($this->tarifa->EditValue)) {
             $this->tarifa->EditValue = ew_FormatNumber($this->tarifa->EditValue, -2, -2, -2, -2);
         }
         // porcentaje
         $this->porcentaje->EditAttrs["class"] = "form-control";
         $this->porcentaje->EditCustomAttributes = "";
         $this->porcentaje->EditValue = ew_HtmlEncode($this->porcentaje->CurrentValue);
         $this->porcentaje->PlaceHolder = ew_RemoveHtml($this->porcentaje->FldCaption());
         if (strval($this->porcentaje->EditValue) != "" && is_numeric($this->porcentaje->EditValue)) {
             $this->porcentaje->EditValue = ew_FormatNumber($this->porcentaje->EditValue, -2, -1, -2, 0);
         }
         // Edit refer script
         // fecha_ini
         $this->fecha_ini->HrefValue = "";
         // id_cliente
         $this->id_cliente->HrefValue = "";
         // id_localidad_origen
         $this->id_localidad_origen->HrefValue = "";
         // Origen
         $this->Origen->HrefValue = "";
         // id_localidad_destino
         $this->id_localidad_destino->HrefValue = "";
         // Destino
         $this->Destino->HrefValue = "";
         // Km_ini
         $this->Km_ini->HrefValue = "";
         // estado
         $this->estado->HrefValue = "";
         // id_vehiculo
         $this->id_vehiculo->HrefValue = "";
         // id_tipo_carga
         $this->id_tipo_carga->HrefValue = "";
         // km_fin
         $this->km_fin->HrefValue = "";
         // fecha_fin
         $this->fecha_fin->HrefValue = "";
         // adelanto
         $this->adelanto->HrefValue = "";
         // kg_carga
         $this->kg_carga->HrefValue = "";
         // tarifa
         $this->tarifa->HrefValue = "";
         // porcentaje
         $this->porcentaje->HrefValue = "";
     }
     if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
         // Add / Edit / Search row
         $this->SetupFieldTitles();
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idinternado
     // fecha_inicio
     // fecha_final
     // estado
     // fecha
     // idhabitacion
     // idpaciente
     // es_operacion
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idinternado
         $this->idinternado->ViewValue = $this->idinternado->CurrentValue;
         $this->idinternado->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7);
         $this->fecha_final->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // idhabitacion
         if (strval($this->idhabitacion->CurrentValue) != "") {
             $sFilterWrk = "`idhabitacion`" . ew_SearchString("=", $this->idhabitacion->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idhabitacion`, `numero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `habitacion`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idhabitacion, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idhabitacion->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idhabitacion->ViewValue = $this->idhabitacion->CurrentValue;
             }
         } else {
             $this->idhabitacion->ViewValue = NULL;
         }
         $this->idhabitacion->ViewCustomAttributes = "";
         // idpaciente
         if (strval($this->idpaciente->CurrentValue) != "") {
             $sFilterWrk = "`idpaciente`" . ew_SearchString("=", $this->idpaciente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idpaciente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `paciente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idpaciente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idpaciente->ViewValue = $rswrk->fields('DispFld');
                 $this->idpaciente->ViewValue .= ew_ValueSeparator(2, $this->idpaciente) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->idpaciente->ViewValue = $this->idpaciente->CurrentValue;
             }
         } else {
             $this->idpaciente->ViewValue = NULL;
         }
         $this->idpaciente->ViewCustomAttributes = "";
         // es_operacion
         if (strval($this->es_operacion->CurrentValue) != "") {
             switch ($this->es_operacion->CurrentValue) {
                 case $this->es_operacion->FldTagValue(1):
                     $this->es_operacion->ViewValue = $this->es_operacion->FldTagCaption(1) != "" ? $this->es_operacion->FldTagCaption(1) : $this->es_operacion->CurrentValue;
                     break;
                 case $this->es_operacion->FldTagValue(2):
                     $this->es_operacion->ViewValue = $this->es_operacion->FldTagCaption(2) != "" ? $this->es_operacion->FldTagCaption(2) : $this->es_operacion->CurrentValue;
                     break;
                 default:
                     $this->es_operacion->ViewValue = $this->es_operacion->CurrentValue;
             }
         } else {
             $this->es_operacion->ViewValue = NULL;
         }
         $this->es_operacion->ViewCustomAttributes = "";
         // idinternado
         $this->idinternado->LinkCustomAttributes = "";
         $this->idinternado->HrefValue = "";
         $this->idinternado->TooltipValue = "";
         // fecha_inicio
         $this->fecha_inicio->LinkCustomAttributes = "";
         $this->fecha_inicio->HrefValue = "";
         $this->fecha_inicio->TooltipValue = "";
         // fecha_final
         $this->fecha_final->LinkCustomAttributes = "";
         $this->fecha_final->HrefValue = "";
         $this->fecha_final->TooltipValue = "";
         // estado
         $this->estado->LinkCustomAttributes = "";
         $this->estado->HrefValue = "";
         $this->estado->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // idhabitacion
         $this->idhabitacion->LinkCustomAttributes = "";
         $this->idhabitacion->HrefValue = "";
         $this->idhabitacion->TooltipValue = "";
         // idpaciente
         $this->idpaciente->LinkCustomAttributes = "";
         $this->idpaciente->HrefValue = "";
         $this->idpaciente->TooltipValue = "";
         // es_operacion
         $this->es_operacion->LinkCustomAttributes = "";
         $this->es_operacion->HrefValue = "";
         $this->es_operacion->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 14
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
     // realmid
     $this->realmid->CellCssStyle = "white-space: nowrap;";
     // starttime
     $this->starttime->CellCssStyle = "white-space: nowrap;";
     // uptime
     $this->uptime->CellCssStyle = "white-space: nowrap;";
     // maxplayers
     $this->maxplayers->CellCssStyle = "white-space: nowrap;";
     // revision
     $this->revision->CellCssStyle = "white-space: nowrap;";
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // realmid
         if (strval($this->realmid->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->realmid->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `realmlist`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `id` ASC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->realmid->ViewValue = $rswrk->fields('DispFld');
                 $this->realmid->ViewValue .= ew_ValueSeparator(1, $this->realmid) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->realmid->ViewValue = $this->realmid->CurrentValue;
             }
         } else {
             $this->realmid->ViewValue = NULL;
         }
         $this->realmid->ViewCustomAttributes = "";
         // starttime
         $this->starttime->ViewValue = $this->starttime->CurrentValue;
         $this->starttime->ViewCustomAttributes = "";
         // uptime
         $this->uptime->ViewValue = $this->uptime->CurrentValue;
         $this->uptime->ViewCustomAttributes = "";
         // maxplayers
         $this->maxplayers->ViewValue = $this->maxplayers->CurrentValue;
         $this->maxplayers->ViewCustomAttributes = "";
         // realmid
         $this->realmid->LinkCustomAttributes = "";
         $this->realmid->HrefValue = "";
         $this->realmid->TooltipValue = "";
         // starttime
         $this->starttime->LinkCustomAttributes = "";
         $this->starttime->HrefValue = "";
         $this->starttime->TooltipValue = "";
         // uptime
         $this->uptime->LinkCustomAttributes = "";
         $this->uptime->HrefValue = "";
         $this->uptime->TooltipValue = "";
         // maxplayers
         $this->maxplayers->LinkCustomAttributes = "";
         $this->maxplayers->HrefValue = "";
         $this->maxplayers->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 15
0
 function RenderRow()
 {
     global $conn, $Security, $Orders;
     // Call Row_Rendering event
     $Orders->Row_Rendering();
     // Common render codes for all row types
     // CustomerID
     $Orders->CustomerID->CellCssStyle = "";
     $Orders->CustomerID->CellCssClass = "";
     // TransactionNumber
     $Orders->TransactionNumber->CellCssStyle = "";
     $Orders->TransactionNumber->CellCssClass = "";
     // DateOrdered
     $Orders->DateOrdered->CellCssStyle = "";
     $Orders->DateOrdered->CellCssClass = "";
     // Total
     $Orders->Total->CellCssStyle = "";
     $Orders->Total->CellCssClass = "";
     // DeliveryDate
     $Orders->DeliveryDate->CellCssStyle = "";
     $Orders->DeliveryDate->CellCssClass = "";
     // PromoCodeID
     $Orders->PromoCodeID->CellCssStyle = "";
     $Orders->PromoCodeID->CellCssClass = "";
     // Timestamp
     $Orders->Timestamp->CellCssStyle = "";
     $Orders->Timestamp->CellCssClass = "";
     // Sequence
     $Orders->Sequence->CellCssStyle = "";
     $Orders->Sequence->CellCssClass = "";
     if ($Orders->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Orders->OrderID->ViewValue = $Orders->OrderID->CurrentValue;
         $Orders->OrderID->CssStyle = "";
         $Orders->OrderID->CssClass = "";
         $Orders->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Orders->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
             }
         } else {
             $Orders->CustomerID->ViewValue = NULL;
         }
         $Orders->CustomerID->CssStyle = "";
         $Orders->CustomerID->CssClass = "";
         $Orders->CustomerID->ViewCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->ViewValue = $Orders->TransactionNumber->CurrentValue;
         $Orders->TransactionNumber->CssStyle = "";
         $Orders->TransactionNumber->CssClass = "";
         $Orders->TransactionNumber->ViewCustomAttributes = "";
         // DateOrdered
         $Orders->DateOrdered->ViewValue = $Orders->DateOrdered->CurrentValue;
         $Orders->DateOrdered->ViewValue = ew_FormatDateTime($Orders->DateOrdered->ViewValue, 6);
         $Orders->DateOrdered->CssStyle = "";
         $Orders->DateOrdered->CssClass = "";
         $Orders->DateOrdered->ViewCustomAttributes = "";
         // Total
         $Orders->Total->ViewValue = $Orders->Total->CurrentValue;
         $Orders->Total->ViewValue = ew_FormatCurrency($Orders->Total->ViewValue, 2, -2, 0, -2);
         $Orders->Total->CssStyle = "";
         $Orders->Total->CssClass = "";
         $Orders->Total->ViewCustomAttributes = "";
         // DeliveryDate
         $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
         $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
         $Orders->DeliveryDate->CssStyle = "";
         $Orders->DeliveryDate->CssClass = "";
         $Orders->DeliveryDate->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Orders->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Orders->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Orders->PromoCodeID->ViewValue = $Orders->PromoCodeID->CurrentValue;
             }
         } else {
             $Orders->PromoCodeID->ViewValue = NULL;
         }
         $Orders->PromoCodeID->CssStyle = "";
         $Orders->PromoCodeID->CssClass = "";
         $Orders->PromoCodeID->ViewCustomAttributes = "";
         // Timestamp
         $Orders->Timestamp->ViewValue = $Orders->Timestamp->CurrentValue;
         $Orders->Timestamp->ViewValue = ew_FormatDateTime($Orders->Timestamp->ViewValue, 6);
         $Orders->Timestamp->CssStyle = "";
         $Orders->Timestamp->CssClass = "";
         $Orders->Timestamp->ViewCustomAttributes = "";
         // Sequence
         $Orders->Sequence->ViewValue = $Orders->Sequence->CurrentValue;
         $Orders->Sequence->CssStyle = "";
         $Orders->Sequence->CssClass = "";
         $Orders->Sequence->ViewCustomAttributes = "";
         // CustomerID
         $Orders->CustomerID->HrefValue = "";
         // TransactionNumber
         $Orders->TransactionNumber->HrefValue = "";
         // DateOrdered
         $Orders->DateOrdered->HrefValue = "";
         // Total
         $Orders->Total->HrefValue = "";
         // DeliveryDate
         $Orders->DeliveryDate->HrefValue = "";
         // PromoCodeID
         $Orders->PromoCodeID->HrefValue = "";
         // Timestamp
         $Orders->Timestamp->HrefValue = "";
         // Sequence
         $Orders->Sequence->HrefValue = "";
     } elseif ($Orders->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // CustomerID
         $Orders->CustomerID->EditCustomAttributes = "";
         if ($Orders->CustomerID->getSessionValue() != "") {
             $Orders->CustomerID->CurrentValue = $Orders->CustomerID->getSessionValue();
             if (strval($Orders->CustomerID->CurrentValue) != "") {
                 $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
                 $sSqlWrk .= " ORDER BY `LastName` Asc";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup value(s) found
                     $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                     $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                     $rswrk->Close();
                 } else {
                     $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
                 }
             } else {
                 $Orders->CustomerID->ViewValue = NULL;
             }
             $Orders->CustomerID->CssStyle = "";
             $Orders->CustomerID->CssClass = "";
             $Orders->CustomerID->ViewCustomAttributes = "";
         } else {
             $sSqlWrk = "SELECT `CustomerID`, `LastName`, `FirstName`, '' AS SelectFilterFld FROM `Customers`";
             $sWhereWrk = "";
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE {$sWhereWrk}";
             }
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             $arwrk = $rswrk ? $rswrk->GetRows() : array();
             if ($rswrk) {
                 $rswrk->Close();
             }
             array_unshift($arwrk, array("", "Please Select", ""));
             $Orders->CustomerID->EditValue = $arwrk;
         }
         // TransactionNumber
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue = ew_HtmlEncode($Orders->TransactionNumber->CurrentValue);
         // DateOrdered
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->DateOrdered->CurrentValue, 6));
         // Total
         $Orders->Total->EditCustomAttributes = "";
         $Orders->Total->EditValue = ew_HtmlEncode($Orders->Total->CurrentValue);
         // DeliveryDate
         $Orders->DeliveryDate->EditCustomAttributes = "";
         if ($Orders->DeliveryDate->getSessionValue() != "") {
             $Orders->DeliveryDate->CurrentValue = $Orders->DeliveryDate->getSessionValue();
             $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
             $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
             $Orders->DeliveryDate->CssStyle = "";
             $Orders->DeliveryDate->CssClass = "";
             $Orders->DeliveryDate->ViewCustomAttributes = "";
         } else {
             $Orders->DeliveryDate->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->DeliveryDate->CurrentValue, 6));
         }
         // PromoCodeID
         $Orders->PromoCodeID->EditCustomAttributes = "";
         $sSqlWrk = "SELECT `PromoCodeID`, `PromoCodeName`, '' AS Disp2Fld, '' AS SelectFilterFld FROM `PromoCodes`";
         $sWhereWrk = "";
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE {$sWhereWrk}";
         }
         $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         $arwrk = $rswrk ? $rswrk->GetRows() : array();
         if ($rswrk) {
             $rswrk->Close();
         }
         array_unshift($arwrk, array("", "Please Select"));
         $Orders->PromoCodeID->EditValue = $arwrk;
         // Timestamp
         $Orders->Timestamp->EditCustomAttributes = "";
         $Orders->Timestamp->EditValue = ew_HtmlEncode(ew_FormatDateTime($Orders->Timestamp->CurrentValue, 6));
         // Sequence
         $Orders->Sequence->EditCustomAttributes = "";
         $Orders->Sequence->EditValue = ew_HtmlEncode($Orders->Sequence->CurrentValue);
     }
     // Call Row Rendered event
     $Orders->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
     // idinternado
     // fecha_inicio
     // fecha_final
     // estado
     // fecha
     // idhabitacion
     // idpaciente
     // es_operacion
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idinternado
         $this->idinternado->ViewValue = $this->idinternado->CurrentValue;
         $this->idinternado->ViewCustomAttributes = "";
         // fecha_inicio
         $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
         $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7);
         $this->fecha_inicio->ViewCustomAttributes = "";
         // fecha_final
         $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
         $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7);
         $this->fecha_final->ViewCustomAttributes = "";
         // estado
         if (strval($this->estado->CurrentValue) != "") {
             switch ($this->estado->CurrentValue) {
                 case $this->estado->FldTagValue(1):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(2):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
                     break;
                 case $this->estado->FldTagValue(3):
                     $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
                     break;
                 default:
                     $this->estado->ViewValue = $this->estado->CurrentValue;
             }
         } else {
             $this->estado->ViewValue = NULL;
         }
         $this->estado->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // idhabitacion
         if (strval($this->idhabitacion->CurrentValue) != "") {
             $sFilterWrk = "`idhabitacion`" . ew_SearchString("=", $this->idhabitacion->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idhabitacion`, `numero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `habitacion`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idhabitacion, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idhabitacion->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idhabitacion->ViewValue = $this->idhabitacion->CurrentValue;
             }
         } else {
             $this->idhabitacion->ViewValue = NULL;
         }
         $this->idhabitacion->ViewCustomAttributes = "";
         // idpaciente
         if (strval($this->idpaciente->CurrentValue) != "") {
             $sFilterWrk = "`idpaciente`" . ew_SearchString("=", $this->idpaciente->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idpaciente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `paciente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idpaciente, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idpaciente->ViewValue = $rswrk->fields('DispFld');
                 $this->idpaciente->ViewValue .= ew_ValueSeparator(2, $this->idpaciente) . $rswrk->fields('Disp3Fld');
                 $rswrk->Close();
             } else {
                 $this->idpaciente->ViewValue = $this->idpaciente->CurrentValue;
             }
         } else {
             $this->idpaciente->ViewValue = NULL;
         }
         $this->idpaciente->ViewCustomAttributes = "";
         // es_operacion
         if (strval($this->es_operacion->CurrentValue) != "") {
             switch ($this->es_operacion->CurrentValue) {
                 case $this->es_operacion->FldTagValue(1):
                     $this->es_operacion->ViewValue = $this->es_operacion->FldTagCaption(1) != "" ? $this->es_operacion->FldTagCaption(1) : $this->es_operacion->CurrentValue;
                     break;
                 case $this->es_operacion->FldTagValue(2):
                     $this->es_operacion->ViewValue = $this->es_operacion->FldTagCaption(2) != "" ? $this->es_operacion->FldTagCaption(2) : $this->es_operacion->CurrentValue;
                     break;
                 default:
                     $this->es_operacion->ViewValue = $this->es_operacion->CurrentValue;
             }
         } else {
             $this->es_operacion->ViewValue = NULL;
         }
         $this->es_operacion->ViewCustomAttributes = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // idhabitacion
         $this->idhabitacion->LinkCustomAttributes = "";
         $this->idhabitacion->HrefValue = "";
         $this->idhabitacion->TooltipValue = "";
         // idpaciente
         $this->idpaciente->LinkCustomAttributes = "";
         $this->idpaciente->HrefValue = "";
         $this->idpaciente->TooltipValue = "";
         // es_operacion
         $this->es_operacion->LinkCustomAttributes = "";
         $this->es_operacion->HrefValue = "";
         $this->es_operacion->TooltipValue = "";
     } elseif ($this->RowType == EW_ROWTYPE_ADD) {
         // Add row
         // fecha
         $this->fecha->EditAttrs["class"] = "form-control";
         $this->fecha->EditCustomAttributes = "";
         $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
         $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
         // idhabitacion
         $this->idhabitacion->EditAttrs["class"] = "form-control";
         $this->idhabitacion->EditCustomAttributes = "";
         if ($this->idhabitacion->getSessionValue() != "") {
             $this->idhabitacion->CurrentValue = $this->idhabitacion->getSessionValue();
             if (strval($this->idhabitacion->CurrentValue) != "") {
                 $sFilterWrk = "`idhabitacion`" . ew_SearchString("=", $this->idhabitacion->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idhabitacion`, `numero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `habitacion`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idhabitacion, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idhabitacion->ViewValue = $rswrk->fields('DispFld');
                     $rswrk->Close();
                 } else {
                     $this->idhabitacion->ViewValue = $this->idhabitacion->CurrentValue;
                 }
             } else {
                 $this->idhabitacion->ViewValue = NULL;
             }
             $this->idhabitacion->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idhabitacion->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idhabitacion`" . ew_SearchString("=", $this->idhabitacion->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idhabitacion`, `numero` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `habitacion`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idhabitacion, $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->idhabitacion->EditValue = $arwrk;
         }
         // idpaciente
         $this->idpaciente->EditAttrs["class"] = "form-control";
         $this->idpaciente->EditCustomAttributes = "";
         if ($this->idpaciente->getSessionValue() != "") {
             $this->idpaciente->CurrentValue = $this->idpaciente->getSessionValue();
             if (strval($this->idpaciente->CurrentValue) != "") {
                 $sFilterWrk = "`idpaciente`" . ew_SearchString("=", $this->idpaciente->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `idpaciente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `paciente`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->idpaciente, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->idpaciente->ViewValue = $rswrk->fields('DispFld');
                     $this->idpaciente->ViewValue .= ew_ValueSeparator(2, $this->idpaciente) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->idpaciente->ViewValue = $this->idpaciente->CurrentValue;
                 }
             } else {
                 $this->idpaciente->ViewValue = NULL;
             }
             $this->idpaciente->ViewCustomAttributes = "";
         } else {
             if (trim(strval($this->idpaciente->CurrentValue)) == "") {
                 $sFilterWrk = "0=1";
             } else {
                 $sFilterWrk = "`idpaciente`" . ew_SearchString("=", $this->idpaciente->CurrentValue, EW_DATATYPE_NUMBER);
             }
             $sSqlWrk = "SELECT `idpaciente`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, `apellido` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `paciente`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idpaciente, $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->idpaciente->EditValue = $arwrk;
         }
         // es_operacion
         $this->es_operacion->EditCustomAttributes = "";
         $arwrk = array();
         $arwrk[] = array($this->es_operacion->FldTagValue(1), $this->es_operacion->FldTagCaption(1) != "" ? $this->es_operacion->FldTagCaption(1) : $this->es_operacion->FldTagValue(1));
         $arwrk[] = array($this->es_operacion->FldTagValue(2), $this->es_operacion->FldTagCaption(2) != "" ? $this->es_operacion->FldTagCaption(2) : $this->es_operacion->FldTagValue(2));
         $this->es_operacion->EditValue = $arwrk;
         // Edit refer script
         // fecha
         $this->fecha->HrefValue = "";
         // idhabitacion
         $this->idhabitacion->HrefValue = "";
         // idpaciente
         $this->idpaciente->HrefValue = "";
         // es_operacion
         $this->es_operacion->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();
     }
 }
Exemplo n.º 17
0
 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();
 }
Exemplo n.º 18
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 = "";
     // fecha
     $this->fecha->EditAttrs["class"] = "form-control";
     $this->fecha->EditCustomAttributes = "";
     $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7));
     $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption());
     // detalles
     $this->detalles->EditAttrs["class"] = "form-control";
     $this->detalles->EditCustomAttributes = "";
     $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue);
     $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption());
     // Importe
     $this->Importe->EditAttrs["class"] = "form-control";
     $this->Importe->EditCustomAttributes = "";
     $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue);
     $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption());
     if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) {
         $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, 0, 0, -1);
     }
     // id_tipo_gasto
     $this->id_tipo_gasto->EditAttrs["class"] = "form-control";
     $this->id_tipo_gasto->EditCustomAttributes = "";
     if ($this->id_tipo_gasto->getSessionValue() != "") {
         $this->id_tipo_gasto->CurrentValue = $this->id_tipo_gasto->getSessionValue();
         if ($this->id_tipo_gasto->VirtualValue != "") {
             $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
         } else {
             if (strval($this->id_tipo_gasto->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
                 $sWhereWrk = "";
                 $lookuptblfilter = "`clase`='R'";
                 if (strval($lookuptblfilter) != "") {
                     ew_AddFilter($sWhereWrk, $lookuptblfilter);
                 }
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
                     $this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
                 }
             } else {
                 $this->id_tipo_gasto->ViewValue = NULL;
             }
         }
         $this->id_tipo_gasto->ViewCustomAttributes = "";
     } else {
     }
     // id_hoja_ruta
     $this->id_hoja_ruta->EditAttrs["class"] = "form-control";
     $this->id_hoja_ruta->EditCustomAttributes = "";
     if ($this->id_hoja_ruta->getSessionValue() != "") {
         $this->id_hoja_ruta->CurrentValue = $this->id_hoja_ruta->getSessionValue();
         if ($this->id_hoja_ruta->VirtualValue != "") {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
         } else {
             $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
             if (strval($this->id_hoja_ruta->CurrentValue) != "") {
                 $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 // Call Lookup selecting
                 $this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $sSqlWrk .= " ORDER BY `codigo` ASC";
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
                     $this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
                     $rswrk->Close();
                 } else {
                     $this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
                 }
             } else {
                 $this->id_hoja_ruta->ViewValue = NULL;
             }
         }
         $this->id_hoja_ruta->ViewCustomAttributes = "";
     } else {
         $this->id_hoja_ruta->EditValue = ew_HtmlEncode($this->id_hoja_ruta->CurrentValue);
         $this->id_hoja_ruta->PlaceHolder = ew_RemoveHtml($this->id_hoja_ruta->FldCaption());
     }
     // id_usuario
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 19
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // DeliveryDate
     $this->DeliveryDate->ViewValue = $this->DeliveryDate->CurrentValue;
     $this->DeliveryDate->ViewValue = ew_FormatDateTime($this->DeliveryDate->ViewValue, 6);
     $this->DeliveryDate->CssStyle = "";
     $this->DeliveryDate->CssClass = "";
     $this->DeliveryDate->ViewCustomAttributes = "";
     // CustomerID
     if (strval($this->CustomerID->CurrentValue) != "") {
         $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($this->CustomerID->CurrentValue) . "";
         $sSqlWrk .= " ORDER BY `LastName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->CustomerID->ViewValue = $rswrk->fields('LastName');
             $this->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
             $rswrk->Close();
         } else {
             $this->CustomerID->ViewValue = $this->CustomerID->CurrentValue;
         }
     } else {
         $this->CustomerID->ViewValue = NULL;
     }
     $this->CustomerID->CssStyle = "";
     $this->CustomerID->CssClass = "";
     $this->CustomerID->ViewCustomAttributes = "";
     // WeeklyMeals
     $this->WeeklyMeals->ViewValue = $this->WeeklyMeals->CurrentValue;
     $this->WeeklyMeals->CssStyle = "";
     $this->WeeklyMeals->CssClass = "";
     $this->WeeklyMeals->ViewCustomAttributes = "";
     // WeeklyReg
     $this->WeeklyReg->ViewValue = $this->WeeklyReg->CurrentValue;
     $this->WeeklyReg->CssStyle = "";
     $this->WeeklyReg->CssClass = "";
     $this->WeeklyReg->ViewCustomAttributes = "";
     // WeeklyVeg
     $this->WeeklyVeg->ViewValue = $this->WeeklyVeg->CurrentValue;
     $this->WeeklyVeg->CssStyle = "";
     $this->WeeklyVeg->CssClass = "";
     $this->WeeklyVeg->ViewCustomAttributes = "";
     // TransactionNumber
     $this->TransactionNumber->ViewValue = $this->TransactionNumber->CurrentValue;
     $this->TransactionNumber->CssStyle = "";
     $this->TransactionNumber->CssClass = "";
     $this->TransactionNumber->ViewCustomAttributes = "";
     // Want
     if (strval($this->Want->CurrentValue) != "") {
         $arwrk = explode(",", $this->Want->CurrentValue);
         $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
         $sWhereWrk = "";
         foreach ($arwrk as $wrk) {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " OR ";
             }
             $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= "(" . $sWhereWrk . ")";
         }
         $sSqlWrk .= " ORDER BY `ItemName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->Want->ViewValue = "";
             $ari = 0;
             while (!$rswrk->EOF) {
                 $this->Want->ViewValue .= $rswrk->fields('ItemName');
                 $rswrk->MoveNext();
                 if (!$rswrk->EOF) {
                     $this->Want->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
                 // Separate Options
                 $ari++;
             }
             $rswrk->Close();
         } else {
             $this->Want->ViewValue = $this->Want->CurrentValue;
         }
     } else {
         $this->Want->ViewValue = NULL;
     }
     $this->Want->CssStyle = "";
     $this->Want->CssClass = "";
     $this->Want->ViewCustomAttributes = "";
     // DontWant
     if (strval($this->DontWant->CurrentValue) != "") {
         $arwrk = explode(",", $this->DontWant->CurrentValue);
         $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE ";
         $sWhereWrk = "";
         foreach ($arwrk as $wrk) {
             if ($sWhereWrk != "") {
                 $sWhereWrk .= " OR ";
             }
             $sWhereWrk .= "`ItemID` = " . ew_AdjustSql(trim($wrk)) . "";
         }
         if ($sWhereWrk != "") {
             $sSqlWrk .= "(" . $sWhereWrk . ")";
         }
         $sSqlWrk .= " ORDER BY `ItemName` Asc";
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup value(s) found
             $this->DontWant->ViewValue = "";
             $ari = 0;
             while (!$rswrk->EOF) {
                 $this->DontWant->ViewValue .= $rswrk->fields('ItemName');
                 $rswrk->MoveNext();
                 if (!$rswrk->EOF) {
                     $this->DontWant->ViewValue .= ew_ViewOptionSeparator($ari);
                 }
                 // Separate Options
                 $ari++;
             }
             $rswrk->Close();
         } else {
             $this->DontWant->ViewValue = $this->DontWant->CurrentValue;
         }
     } else {
         $this->DontWant->ViewValue = NULL;
     }
     $this->DontWant->CssStyle = "";
     $this->DontWant->CssClass = "";
     $this->DontWant->ViewCustomAttributes = "";
     // Comments
     $this->Comments->ViewValue = $this->Comments->CurrentValue;
     $this->Comments->CssStyle = "";
     $this->Comments->CssClass = "";
     $this->Comments->ViewCustomAttributes = "";
     // DeliveryDate
     $this->DeliveryDate->HrefValue = "";
     // CustomerID
     $this->CustomerID->HrefValue = "";
     // WeeklyMeals
     $this->WeeklyMeals->HrefValue = "";
     // WeeklyReg
     $this->WeeklyReg->HrefValue = "";
     // WeeklyVeg
     $this->WeeklyVeg->HrefValue = "";
     // TransactionNumber
     $this->TransactionNumber->HrefValue = "";
     // Want
     $this->Want->HrefValue = "";
     // DontWant
     $this->DontWant->HrefValue = "";
     // Comments
     $this->Comments->HrefValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 20
0
 function RenderRow()
 {
     global $conn, $Security, $Orders;
     // Call Row_Rendering event
     $Orders->Row_Rendering();
     // Common render codes for all row types
     // OrderID
     $Orders->OrderID->CellCssStyle = "";
     $Orders->OrderID->CellCssClass = "";
     // CustomerID
     $Orders->CustomerID->CellCssStyle = "";
     $Orders->CustomerID->CellCssClass = "";
     // TransactionNumber
     $Orders->TransactionNumber->CellCssStyle = "";
     $Orders->TransactionNumber->CellCssClass = "";
     // DateOrdered
     $Orders->DateOrdered->CellCssStyle = "";
     $Orders->DateOrdered->CellCssClass = "";
     // Total
     $Orders->Total->CellCssStyle = "";
     $Orders->Total->CellCssClass = "";
     // DeliveryDate
     $Orders->DeliveryDate->CellCssStyle = "";
     $Orders->DeliveryDate->CellCssClass = "";
     // PromoCodeID
     $Orders->PromoCodeID->CellCssStyle = "";
     $Orders->PromoCodeID->CellCssClass = "";
     // Sequence
     $Orders->Sequence->CellCssStyle = "";
     $Orders->Sequence->CellCssClass = "";
     if ($Orders->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderID
         $Orders->OrderID->ViewValue = $Orders->OrderID->CurrentValue;
         $Orders->OrderID->CssStyle = "";
         $Orders->OrderID->CssClass = "";
         $Orders->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($Orders->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($Orders->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $Orders->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $Orders->CustomerID->ViewValue = $Orders->CustomerID->CurrentValue;
             }
         } else {
             $Orders->CustomerID->ViewValue = NULL;
         }
         $Orders->CustomerID->CssStyle = "";
         $Orders->CustomerID->CssClass = "";
         $Orders->CustomerID->ViewCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->ViewValue = $Orders->TransactionNumber->CurrentValue;
         $Orders->TransactionNumber->CssStyle = "";
         $Orders->TransactionNumber->CssClass = "";
         $Orders->TransactionNumber->ViewCustomAttributes = "";
         // DateOrdered
         $Orders->DateOrdered->ViewValue = $Orders->DateOrdered->CurrentValue;
         $Orders->DateOrdered->ViewValue = ew_FormatDateTime($Orders->DateOrdered->ViewValue, 6);
         $Orders->DateOrdered->CssStyle = "";
         $Orders->DateOrdered->CssClass = "";
         $Orders->DateOrdered->ViewCustomAttributes = "";
         // Total
         $Orders->Total->ViewValue = $Orders->Total->CurrentValue;
         $Orders->Total->ViewValue = ew_FormatCurrency($Orders->Total->ViewValue, 2, -2, 0, -2);
         $Orders->Total->CssStyle = "";
         $Orders->Total->CssClass = "";
         $Orders->Total->ViewCustomAttributes = "";
         // DeliveryDate
         $Orders->DeliveryDate->ViewValue = $Orders->DeliveryDate->CurrentValue;
         $Orders->DeliveryDate->ViewValue = ew_FormatDateTime($Orders->DeliveryDate->ViewValue, 6);
         $Orders->DeliveryDate->CssStyle = "";
         $Orders->DeliveryDate->CssClass = "";
         $Orders->DeliveryDate->ViewCustomAttributes = "";
         // PromoCodeID
         if (strval($Orders->PromoCodeID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `PromoCodeName` FROM `PromoCodes` WHERE `PromoCodeID` = " . ew_AdjustSql($Orders->PromoCodeID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `PromoCodeName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $Orders->PromoCodeID->ViewValue = $rswrk->fields('PromoCodeName');
                 $rswrk->Close();
             } else {
                 $Orders->PromoCodeID->ViewValue = $Orders->PromoCodeID->CurrentValue;
             }
         } else {
             $Orders->PromoCodeID->ViewValue = NULL;
         }
         $Orders->PromoCodeID->CssStyle = "";
         $Orders->PromoCodeID->CssClass = "";
         $Orders->PromoCodeID->ViewCustomAttributes = "";
         // Sequence
         $Orders->Sequence->ViewValue = $Orders->Sequence->CurrentValue;
         $Orders->Sequence->CssStyle = "";
         $Orders->Sequence->CssClass = "";
         $Orders->Sequence->ViewCustomAttributes = "";
         // OrderID
         $Orders->OrderID->HrefValue = "";
         // CustomerID
         $Orders->CustomerID->HrefValue = "";
         // TransactionNumber
         $Orders->TransactionNumber->HrefValue = "";
         // DateOrdered
         $Orders->DateOrdered->HrefValue = "";
         // Total
         $Orders->Total->HrefValue = "";
         // DeliveryDate
         $Orders->DeliveryDate->HrefValue = "";
         // PromoCodeID
         $Orders->PromoCodeID->HrefValue = "";
         // Sequence
         $Orders->Sequence->HrefValue = "";
     } elseif ($Orders->RowType == EW_ROWTYPE_SEARCH) {
         // Search row
         // OrderID
         $Orders->OrderID->EditCustomAttributes = "";
         $Orders->OrderID->EditValue = ew_HtmlEncode($Orders->OrderID->AdvancedSearch->SearchValue);
         // CustomerID
         $Orders->CustomerID->EditCustomAttributes = "";
         $Orders->CustomerID->EditCustomAttributes = "";
         // TransactionNumber
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue);
         $Orders->TransactionNumber->EditCustomAttributes = "";
         $Orders->TransactionNumber->EditValue2 = ew_HtmlEncode($Orders->TransactionNumber->AdvancedSearch->SearchValue2);
         // DateOrdered
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue, 6), 6));
         $Orders->DateOrdered->EditCustomAttributes = "";
         $Orders->DateOrdered->EditValue2 = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DateOrdered->AdvancedSearch->SearchValue2, 6), 6));
         // Total
         $Orders->Total->EditCustomAttributes = "";
         $Orders->Total->EditValue = ew_HtmlEncode($Orders->Total->AdvancedSearch->SearchValue);
         // DeliveryDate
         $Orders->DeliveryDate->EditCustomAttributes = "";
         $Orders->DeliveryDate->EditValue = ew_HtmlEncode(ew_FormatDateTime(ew_UnFormatDateTime($Orders->DeliveryDate->AdvancedSearch->SearchValue, 6), 6));
         // PromoCodeID
         $Orders->PromoCodeID->EditCustomAttributes = "";
         // Sequence
         $Orders->Sequence->EditCustomAttributes = "";
         $Orders->Sequence->EditValue = ew_HtmlEncode($Orders->Sequence->AdvancedSearch->SearchValue);
     }
     // Call Row Rendered event
     $Orders->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();
     }
 }
Exemplo n.º 22
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->ViewUrl = $this->GetViewUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->InlineEditUrl = $this->GetInlineEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->InlineCopyUrl = $this->GetInlineCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // socio_nro
     // id_rubro
     // id_usuario
     // propietario
     // comercio
     // direccion_comercio
     // activo
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // socio_nro
         $this->socio_nro->ViewValue = $this->socio_nro->CurrentValue;
         $this->socio_nro->ViewCustomAttributes = "";
         // id_rubro
         if (strval($this->id_rubro->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_rubro->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `rubro` AS `DispFld`, `Descripcion` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `rubros`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_rubro, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_rubro->ViewValue = $rswrk->fields('DispFld');
                 $this->id_rubro->ViewValue .= ew_ValueSeparator(1, $this->id_rubro) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_rubro->ViewValue = $this->id_rubro->CurrentValue;
             }
         } else {
             $this->id_rubro->ViewValue = NULL;
         }
         $this->id_rubro->ViewCustomAttributes = "";
         // id_usuario
         if (strval($this->id_usuario->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_usuario->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `usuario` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuario`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_usuario, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_usuario->ViewValue = $rswrk->fields('DispFld');
                 $this->id_usuario->ViewValue .= ew_ValueSeparator(1, $this->id_usuario) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
             }
         } else {
             $this->id_usuario->ViewValue = NULL;
         }
         $this->id_usuario->ViewCustomAttributes = "";
         // 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 = "";
         // socio_nro
         $this->socio_nro->LinkCustomAttributes = "";
         $this->socio_nro->HrefValue = "";
         $this->socio_nro->TooltipValue = "";
         // id_rubro
         $this->id_rubro->LinkCustomAttributes = "";
         $this->id_rubro->HrefValue = "";
         $this->id_rubro->TooltipValue = "";
         // id_usuario
         $this->id_usuario->LinkCustomAttributes = "";
         $this->id_usuario->HrefValue = "";
         $this->id_usuario->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 = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 23
0
 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();
 }
Exemplo n.º 24
0
 function RenderListRow()
 {
     global $conn, $Security;
     // Call Row Rendering event
     $this->Row_Rendering();
     // Common render codes
     // id
     // id_deuda
     // fecha
     // monto
     // id_usuario
     // id
     $this->id->ViewValue = $this->id->CurrentValue;
     $this->id->ViewCustomAttributes = "";
     // id_deuda
     if (strval($this->id_deuda->CurrentValue) != "") {
         $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
         $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->id_deuda->ViewValue = $rswrk->fields('DispFld');
             $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
             $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . $rswrk->fields('Disp3Fld');
             $rswrk->Close();
         } else {
             $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
         }
     } else {
         $this->id_deuda->ViewValue = NULL;
     }
     $this->id_deuda->ViewCustomAttributes = "";
     // fecha
     $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
     $this->fecha->ViewCustomAttributes = "";
     // monto
     $this->monto->ViewValue = $this->monto->CurrentValue;
     $this->monto->ViewCustomAttributes = "";
     // id_usuario
     if (strval($this->id_usuario->CurrentValue) != "") {
         $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_usuario->CurrentValue, EW_DATATYPE_NUMBER);
         $sSqlWrk = "SELECT `id`, `usuario` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuario`";
         $sWhereWrk = "";
         if ($sFilterWrk != "") {
             ew_AddFilter($sWhereWrk, $sFilterWrk);
         }
         // Call Lookup selecting
         $this->Lookup_Selecting($this->id_usuario, $sWhereWrk);
         if ($sWhereWrk != "") {
             $sSqlWrk .= " WHERE " . $sWhereWrk;
         }
         $rswrk = $conn->Execute($sSqlWrk);
         if ($rswrk && !$rswrk->EOF) {
             // Lookup values found
             $this->id_usuario->ViewValue = $rswrk->fields('DispFld');
             $this->id_usuario->ViewValue .= ew_ValueSeparator(1, $this->id_usuario) . $rswrk->fields('Disp2Fld');
             $rswrk->Close();
         } else {
             $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue;
         }
     } else {
         $this->id_usuario->ViewValue = NULL;
     }
     $this->id_usuario->ViewCustomAttributes = "";
     // id
     $this->id->LinkCustomAttributes = "";
     $this->id->HrefValue = "";
     $this->id->TooltipValue = "";
     // id_deuda
     $this->id_deuda->LinkCustomAttributes = "";
     $this->id_deuda->HrefValue = "";
     $this->id_deuda->TooltipValue = "";
     // fecha
     $this->fecha->LinkCustomAttributes = "";
     $this->fecha->HrefValue = "";
     $this->fecha->TooltipValue = "";
     // monto
     $this->monto->LinkCustomAttributes = "";
     $this->monto->HrefValue = "";
     $this->monto->TooltipValue = "";
     // id_usuario
     $this->id_usuario->LinkCustomAttributes = "";
     $this->id_usuario->HrefValue = "";
     $this->id_usuario->TooltipValue = "";
     // Call Row Rendered event
     $this->Row_Rendered();
 }
Exemplo n.º 25
0
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     $this->AddUrl = $this->GetAddUrl();
     $this->EditUrl = $this->GetEditUrl();
     $this->CopyUrl = $this->GetCopyUrl();
     $this->DeleteUrl = $this->GetDeleteUrl();
     $this->ListUrl = $this->GetListUrl();
     $this->SetupOtherOptions();
     // Convert decimal values if posted back
     if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) {
         $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // id
     // mes
     // anio
     // fecha
     // monto
     // id_usuario
     // id_socio
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // id
         $this->id->ViewCustomAttributes = "";
         // mes
         $this->mes->ViewValue = $this->mes->CurrentValue;
         $this->mes->ViewCustomAttributes = "";
         // anio
         $this->anio->ViewValue = $this->anio->CurrentValue;
         $this->anio->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // monto
         $this->monto->ViewValue = $this->monto->CurrentValue;
         $this->monto->ViewValue = ew_FormatCurrency($this->monto->ViewValue, 0, -2, -2, -2);
         $this->monto->ViewCustomAttributes = "";
         // id_socio
         if (strval($this->id_socio->CurrentValue) != "") {
             $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`";
             $sWhereWrk = "";
             $lookuptblfilter = "`activo`='S'";
             if (strval($lookuptblfilter) != "") {
                 ew_AddFilter($sWhereWrk, $lookuptblfilter);
             }
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->id_socio, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $sSqlWrk .= " ORDER BY `propietario` DESC";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->id_socio->ViewValue = $rswrk->fields('DispFld');
                 $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->id_socio->ViewValue = $this->id_socio->CurrentValue;
             }
         } else {
             $this->id_socio->ViewValue = NULL;
         }
         $this->id_socio->ViewCustomAttributes = "";
         // id
         $this->id->LinkCustomAttributes = "";
         $this->id->HrefValue = "";
         $this->id->TooltipValue = "";
         // mes
         $this->mes->LinkCustomAttributes = "";
         $this->mes->HrefValue = "";
         $this->mes->TooltipValue = "";
         // anio
         $this->anio->LinkCustomAttributes = "";
         $this->anio->HrefValue = "";
         $this->anio->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // monto
         $this->monto->LinkCustomAttributes = "";
         $this->monto->HrefValue = "";
         $this->monto->TooltipValue = "";
         // id_socio
         $this->id_socio->LinkCustomAttributes = "";
         $this->id_socio->HrefValue = "";
         $this->id_socio->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo n.º 26
0
 function RenderRow()
 {
     global $conn, $Security, $OrderDetails;
     // Call Row_Rendering event
     $OrderDetails->Row_Rendering();
     // Common render codes for all row types
     // OrderDetailsID
     $OrderDetails->OrderDetailsID->CellCssStyle = "";
     $OrderDetails->OrderDetailsID->CellCssClass = "";
     // OrderID
     $OrderDetails->OrderID->CellCssStyle = "";
     $OrderDetails->OrderID->CellCssClass = "";
     // CustomerID
     $OrderDetails->CustomerID->CellCssStyle = "";
     $OrderDetails->CustomerID->CellCssClass = "";
     // ItemID
     $OrderDetails->ItemID->CellCssStyle = "";
     $OrderDetails->ItemID->CellCssClass = "";
     // Count
     $OrderDetails->Count->CellCssStyle = "";
     $OrderDetails->Count->CellCssClass = "";
     // VegCount
     $OrderDetails->VegCount->CellCssStyle = "";
     $OrderDetails->VegCount->CellCssClass = "";
     // Chefs_Tasting
     $OrderDetails->Chefs_Tasting->CellCssStyle = "";
     $OrderDetails->Chefs_Tasting->CellCssClass = "";
     if ($OrderDetails->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // OrderDetailsID
         $OrderDetails->OrderDetailsID->ViewValue = $OrderDetails->OrderDetailsID->CurrentValue;
         $OrderDetails->OrderDetailsID->CssStyle = "";
         $OrderDetails->OrderDetailsID->CssClass = "";
         $OrderDetails->OrderDetailsID->ViewCustomAttributes = "";
         // OrderID
         $OrderDetails->OrderID->ViewValue = $OrderDetails->OrderID->CurrentValue;
         $OrderDetails->OrderID->CssStyle = "";
         $OrderDetails->OrderID->CssClass = "";
         $OrderDetails->OrderID->ViewCustomAttributes = "";
         // CustomerID
         if (strval($OrderDetails->CustomerID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `LastName`, `FirstName` FROM `Customers` WHERE `CustomerID` = " . ew_AdjustSql($OrderDetails->CustomerID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `LastName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->CustomerID->ViewValue = $rswrk->fields('LastName');
                 $OrderDetails->CustomerID->ViewValue .= ew_ValueSeparator(0) . $rswrk->fields('FirstName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->CustomerID->ViewValue = $OrderDetails->CustomerID->CurrentValue;
             }
         } else {
             $OrderDetails->CustomerID->ViewValue = NULL;
         }
         $OrderDetails->CustomerID->CssStyle = "";
         $OrderDetails->CustomerID->CssClass = "";
         $OrderDetails->CustomerID->ViewCustomAttributes = "";
         // ItemID
         if (strval($OrderDetails->ItemID->CurrentValue) != "") {
             $sSqlWrk = "SELECT `ItemName` FROM `Items` WHERE `ItemID` = " . ew_AdjustSql($OrderDetails->ItemID->CurrentValue) . "";
             $sSqlWrk .= " ORDER BY `ItemName` Asc";
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup value(s) found
                 $OrderDetails->ItemID->ViewValue = $rswrk->fields('ItemName');
                 $rswrk->Close();
             } else {
                 $OrderDetails->ItemID->ViewValue = $OrderDetails->ItemID->CurrentValue;
             }
         } else {
             $OrderDetails->ItemID->ViewValue = NULL;
         }
         $OrderDetails->ItemID->CssStyle = "";
         $OrderDetails->ItemID->CssClass = "";
         $OrderDetails->ItemID->ViewCustomAttributes = "";
         // Count
         $OrderDetails->Count->ViewValue = $OrderDetails->Count->CurrentValue;
         $OrderDetails->Count->CssStyle = "";
         $OrderDetails->Count->CssClass = "";
         $OrderDetails->Count->ViewCustomAttributes = "";
         // VegCount
         $OrderDetails->VegCount->ViewValue = $OrderDetails->VegCount->CurrentValue;
         $OrderDetails->VegCount->CssStyle = "";
         $OrderDetails->VegCount->CssClass = "";
         $OrderDetails->VegCount->ViewCustomAttributes = "";
         // Amount
         $OrderDetails->Amount->ViewValue = $OrderDetails->Amount->CurrentValue;
         $OrderDetails->Amount->ViewValue = ew_FormatCurrency($OrderDetails->Amount->ViewValue, 2, -2, 0, -2);
         $OrderDetails->Amount->CssStyle = "";
         $OrderDetails->Amount->CssClass = "";
         $OrderDetails->Amount->ViewCustomAttributes = "";
         // Chefs_Tasting
         if (strval($OrderDetails->Chefs_Tasting->CurrentValue) != "") {
             switch ($OrderDetails->Chefs_Tasting->CurrentValue) {
                 case "0":
                     $OrderDetails->Chefs_Tasting->ViewValue = "No";
                     break;
                 case "1":
                     $OrderDetails->Chefs_Tasting->ViewValue = "Yes";
                     break;
                 default:
                     $OrderDetails->Chefs_Tasting->ViewValue = $OrderDetails->Chefs_Tasting->CurrentValue;
             }
         } else {
             $OrderDetails->Chefs_Tasting->ViewValue = NULL;
         }
         $OrderDetails->Chefs_Tasting->CssStyle = "";
         $OrderDetails->Chefs_Tasting->CssClass = "";
         $OrderDetails->Chefs_Tasting->ViewCustomAttributes = "";
         // OrderDetailsID
         $OrderDetails->OrderDetailsID->HrefValue = "";
         // OrderID
         $OrderDetails->OrderID->HrefValue = "";
         // CustomerID
         $OrderDetails->CustomerID->HrefValue = "";
         // ItemID
         $OrderDetails->ItemID->HrefValue = "";
         // Count
         $OrderDetails->Count->HrefValue = "";
         // VegCount
         $OrderDetails->VegCount->HrefValue = "";
         // Chefs_Tasting
         $OrderDetails->Chefs_Tasting->HrefValue = "";
     }
     // Call Row Rendered event
     $OrderDetails->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
     // accountId
     // permissionId
     // granted
     // realmId
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // accountId
         if (strval($this->accountId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->accountId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `username` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `account`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->accountId->ViewValue = $rswrk->fields('DispFld');
                 $this->accountId->ViewValue .= ew_ValueSeparator(1, $this->accountId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->accountId->ViewValue = $this->accountId->CurrentValue;
             }
         } else {
             $this->accountId->ViewValue = NULL;
         }
         $this->accountId->ViewCustomAttributes = "";
         // permissionId
         if ($this->permissionId->VirtualValue != "") {
             $this->permissionId->ViewValue = $this->permissionId->VirtualValue;
         } else {
             if (strval($this->permissionId->CurrentValue) != "") {
                 $sFilterWrk = "`id`" . ew_SearchString("=", $this->permissionId->CurrentValue, EW_DATATYPE_NUMBER);
                 $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `rbac_permissions`";
                 $sWhereWrk = "";
                 if ($sFilterWrk != "") {
                     ew_AddFilter($sWhereWrk, $sFilterWrk);
                 }
                 if ($sWhereWrk != "") {
                     $sSqlWrk .= " WHERE " . $sWhereWrk;
                 }
                 $rswrk = $conn->Execute($sSqlWrk);
                 if ($rswrk && !$rswrk->EOF) {
                     // Lookup values found
                     $this->permissionId->ViewValue = $rswrk->fields('DispFld');
                     $this->permissionId->ViewValue .= ew_ValueSeparator(1, $this->permissionId) . $rswrk->fields('Disp2Fld');
                     $rswrk->Close();
                 } else {
                     $this->permissionId->ViewValue = $this->permissionId->CurrentValue;
                 }
             } else {
                 $this->permissionId->ViewValue = NULL;
             }
         }
         $this->permissionId->ViewCustomAttributes = "";
         // granted
         if (strval($this->granted->CurrentValue) != "") {
             switch ($this->granted->CurrentValue) {
                 case $this->granted->FldTagValue(1):
                     $this->granted->ViewValue = $this->granted->FldTagCaption(1) != "" ? $this->granted->FldTagCaption(1) : $this->granted->CurrentValue;
                     break;
                 case $this->granted->FldTagValue(2):
                     $this->granted->ViewValue = $this->granted->FldTagCaption(2) != "" ? $this->granted->FldTagCaption(2) : $this->granted->CurrentValue;
                     break;
                 default:
                     $this->granted->ViewValue = $this->granted->CurrentValue;
             }
         } else {
             $this->granted->ViewValue = NULL;
         }
         $this->granted->ViewCustomAttributes = "";
         // realmId
         if (strval($this->realmId->CurrentValue) != "") {
             $sFilterWrk = "`id`" . ew_SearchString("=", $this->realmId->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `id`, `id` AS `DispFld`, `name` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `realmlist`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->realmId->ViewValue = $rswrk->fields('DispFld');
                 $this->realmId->ViewValue .= ew_ValueSeparator(1, $this->realmId) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->realmId->ViewValue = $this->realmId->CurrentValue;
             }
         } else {
             $this->realmId->ViewValue = NULL;
         }
         $this->realmId->ViewCustomAttributes = "";
         // accountId
         $this->accountId->LinkCustomAttributes = "";
         $this->accountId->HrefValue = "";
         $this->accountId->TooltipValue = "";
         // permissionId
         $this->permissionId->LinkCustomAttributes = "";
         $this->permissionId->HrefValue = "";
         $this->permissionId->TooltipValue = "";
         // granted
         $this->granted->LinkCustomAttributes = "";
         $this->granted->HrefValue = "";
         $this->granted->TooltipValue = "";
         // realmId
         $this->realmId->LinkCustomAttributes = "";
         $this->realmId->HrefValue = "";
         $this->realmId->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
 function RenderRow()
 {
     global $conn, $Security, $Language;
     global $gsLanguage;
     // Initialize URLs
     // Convert decimal values if posted back
     if ($this->precio_unitario->FormValue == $this->precio_unitario->CurrentValue && is_numeric(ew_StrToFloat($this->precio_unitario->CurrentValue))) {
         $this->precio_unitario->CurrentValue = ew_StrToFloat($this->precio_unitario->CurrentValue);
     }
     // Call Row_Rendering event
     $this->Row_Rendering();
     // Common render codes for all row types
     // idreceta
     // idempleado
     // idmedicina
     // fecha
     // cantidad
     // precio_unitario
     // idturno
     if ($this->RowType == EW_ROWTYPE_VIEW) {
         // View row
         // idreceta
         $this->idreceta->ViewValue = $this->idreceta->CurrentValue;
         $this->idreceta->ViewCustomAttributes = "";
         // idempleado
         if (strval($this->idempleado->CurrentValue) != "") {
             $sFilterWrk = "`idempleado`" . ew_SearchString("=", $this->idempleado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idempleado`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empleado`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idempleado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idempleado->ViewValue = $rswrk->fields('DispFld');
                 $this->idempleado->ViewValue .= ew_ValueSeparator(1, $this->idempleado) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->idempleado->ViewValue = $this->idempleado->CurrentValue;
             }
         } else {
             $this->idempleado->ViewValue = NULL;
         }
         $this->idempleado->ViewCustomAttributes = "";
         // idmedicina
         if (strval($this->idmedicina->CurrentValue) != "") {
             $sFilterWrk = "`idmedicina`" . ew_SearchString("=", $this->idmedicina->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idmedicina`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `medicina`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idmedicina, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idmedicina->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue;
             }
         } else {
             $this->idmedicina->ViewValue = NULL;
         }
         $this->idmedicina->ViewCustomAttributes = "";
         // fecha
         $this->fecha->ViewValue = $this->fecha->CurrentValue;
         $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
         $this->fecha->ViewCustomAttributes = "";
         // cantidad
         $this->cantidad->ViewValue = $this->cantidad->CurrentValue;
         $this->cantidad->ViewCustomAttributes = "";
         // precio_unitario
         $this->precio_unitario->ViewValue = $this->precio_unitario->CurrentValue;
         $this->precio_unitario->ViewCustomAttributes = "";
         // idturno
         if (strval($this->idturno->CurrentValue) != "") {
             $sFilterWrk = "`idturno`" . ew_SearchString("=", $this->idturno->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idturno`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `turno`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idturno, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idturno->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idturno->ViewValue = $this->idturno->CurrentValue;
             }
         } else {
             $this->idturno->ViewValue = NULL;
         }
         $this->idturno->ViewCustomAttributes = "";
         // idreceta
         $this->idreceta->LinkCustomAttributes = "";
         $this->idreceta->HrefValue = "";
         $this->idreceta->TooltipValue = "";
         // idempleado
         $this->idempleado->LinkCustomAttributes = "";
         $this->idempleado->HrefValue = "";
         $this->idempleado->TooltipValue = "";
         // idmedicina
         $this->idmedicina->LinkCustomAttributes = "";
         $this->idmedicina->HrefValue = "";
         $this->idmedicina->TooltipValue = "";
         // fecha
         $this->fecha->LinkCustomAttributes = "";
         $this->fecha->HrefValue = "";
         $this->fecha->TooltipValue = "";
         // cantidad
         $this->cantidad->LinkCustomAttributes = "";
         $this->cantidad->HrefValue = "";
         $this->cantidad->TooltipValue = "";
         // precio_unitario
         $this->precio_unitario->LinkCustomAttributes = "";
         $this->precio_unitario->HrefValue = "";
         $this->precio_unitario->TooltipValue = "";
         // idturno
         $this->idturno->LinkCustomAttributes = "";
         $this->idturno->HrefValue = "";
         $this->idturno->TooltipValue = "";
     }
     // Call Row Rendered event
     if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
         $this->Row_Rendered();
     }
 }
Exemplo 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();
     }
 }
 function RenderEditRow()
 {
     global $conn, $Security, $gsLanguage, $Language;
     // Call Row Rendering event
     $this->Row_Rendering();
     // idreceta
     $this->idreceta->EditAttrs["class"] = "form-control";
     $this->idreceta->EditCustomAttributes = "";
     $this->idreceta->EditValue = $this->idreceta->CurrentValue;
     $this->idreceta->ViewCustomAttributes = "";
     // idempleado
     $this->idempleado->EditAttrs["class"] = "form-control";
     $this->idempleado->EditCustomAttributes = "";
     if ($this->idempleado->getSessionValue() != "") {
         $this->idempleado->CurrentValue = $this->idempleado->getSessionValue();
         if (strval($this->idempleado->CurrentValue) != "") {
             $sFilterWrk = "`idempleado`" . ew_SearchString("=", $this->idempleado->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idempleado`, `nombre` AS `DispFld`, `apellido` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `empleado`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idempleado, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idempleado->ViewValue = $rswrk->fields('DispFld');
                 $this->idempleado->ViewValue .= ew_ValueSeparator(1, $this->idempleado) . $rswrk->fields('Disp2Fld');
                 $rswrk->Close();
             } else {
                 $this->idempleado->ViewValue = $this->idempleado->CurrentValue;
             }
         } else {
             $this->idempleado->ViewValue = NULL;
         }
         $this->idempleado->ViewCustomAttributes = "";
     } else {
     }
     // idmedicina
     $this->idmedicina->EditAttrs["class"] = "form-control";
     $this->idmedicina->EditCustomAttributes = "";
     if ($this->idmedicina->getSessionValue() != "") {
         $this->idmedicina->CurrentValue = $this->idmedicina->getSessionValue();
         if (strval($this->idmedicina->CurrentValue) != "") {
             $sFilterWrk = "`idmedicina`" . ew_SearchString("=", $this->idmedicina->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idmedicina`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `medicina`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idmedicina, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idmedicina->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue;
             }
         } else {
             $this->idmedicina->ViewValue = NULL;
         }
         $this->idmedicina->ViewCustomAttributes = "";
     } else {
     }
     // 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());
     // cantidad
     $this->cantidad->EditAttrs["class"] = "form-control";
     $this->cantidad->EditCustomAttributes = "";
     $this->cantidad->EditValue = ew_HtmlEncode($this->cantidad->CurrentValue);
     $this->cantidad->PlaceHolder = ew_RemoveHtml($this->cantidad->FldCaption());
     // precio_unitario
     $this->precio_unitario->EditAttrs["class"] = "form-control";
     $this->precio_unitario->EditCustomAttributes = "";
     $this->precio_unitario->EditValue = ew_HtmlEncode($this->precio_unitario->CurrentValue);
     $this->precio_unitario->PlaceHolder = ew_RemoveHtml($this->precio_unitario->FldCaption());
     if (strval($this->precio_unitario->EditValue) != "" && is_numeric($this->precio_unitario->EditValue)) {
         $this->precio_unitario->EditValue = ew_FormatNumber($this->precio_unitario->EditValue, -2, -1, -2, 0);
     }
     // idturno
     $this->idturno->EditAttrs["class"] = "form-control";
     $this->idturno->EditCustomAttributes = "";
     if ($this->idturno->getSessionValue() != "") {
         $this->idturno->CurrentValue = $this->idturno->getSessionValue();
         if (strval($this->idturno->CurrentValue) != "") {
             $sFilterWrk = "`idturno`" . ew_SearchString("=", $this->idturno->CurrentValue, EW_DATATYPE_NUMBER);
             $sSqlWrk = "SELECT `idturno`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `turno`";
             $sWhereWrk = "";
             if ($sFilterWrk != "") {
                 ew_AddFilter($sWhereWrk, $sFilterWrk);
             }
             // Call Lookup selecting
             $this->Lookup_Selecting($this->idturno, $sWhereWrk);
             if ($sWhereWrk != "") {
                 $sSqlWrk .= " WHERE " . $sWhereWrk;
             }
             $rswrk = $conn->Execute($sSqlWrk);
             if ($rswrk && !$rswrk->EOF) {
                 // Lookup values found
                 $this->idturno->ViewValue = $rswrk->fields('DispFld');
                 $rswrk->Close();
             } else {
                 $this->idturno->ViewValue = $this->idturno->CurrentValue;
             }
         } else {
             $this->idturno->ViewValue = NULL;
         }
         $this->idturno->ViewCustomAttributes = "";
     } else {
     }
     // idcuenta
     $this->idcuenta->EditAttrs["class"] = "form-control";
     $this->idcuenta->EditCustomAttributes = "";
     $this->idcuenta->EditValue = ew_HtmlEncode($this->idcuenta->CurrentValue);
     $this->idcuenta->PlaceHolder = ew_RemoveHtml($this->idcuenta->FldCaption());
     // Call Row Rendered event
     $this->Row_Rendered();
 }