function RenderEditRow() { global $conn, $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // idempleado $this->idempleado->EditAttrs["class"] = "form-control"; $this->idempleado->EditCustomAttributes = ""; $this->idempleado->EditValue = $this->idempleado->CurrentValue; $this->idempleado->ViewCustomAttributes = ""; // nombre $this->nombre->EditAttrs["class"] = "form-control"; $this->nombre->EditCustomAttributes = ""; $this->nombre->EditValue = ew_HtmlEncode($this->nombre->CurrentValue); $this->nombre->PlaceHolder = ew_RemoveHtml($this->nombre->FldCaption()); // apellido $this->apellido->EditAttrs["class"] = "form-control"; $this->apellido->EditCustomAttributes = ""; $this->apellido->EditValue = ew_HtmlEncode($this->apellido->CurrentValue); $this->apellido->PlaceHolder = ew_RemoveHtml($this->apellido->FldCaption()); // cui $this->cui->EditAttrs["class"] = "form-control"; $this->cui->EditCustomAttributes = ""; $this->cui->EditValue = ew_HtmlEncode($this->cui->CurrentValue); $this->cui->PlaceHolder = ew_RemoveHtml($this->cui->FldCaption()); // telefono $this->telefono->EditAttrs["class"] = "form-control"; $this->telefono->EditCustomAttributes = ""; $this->telefono->EditValue = ew_HtmlEncode($this->telefono->CurrentValue); $this->telefono->PlaceHolder = ew_RemoveHtml($this->telefono->FldCaption()); // direccion $this->direccion->EditAttrs["class"] = "form-control"; $this->direccion->EditCustomAttributes = ""; $this->direccion->EditValue = ew_HtmlEncode($this->direccion->CurrentValue); $this->direccion->PlaceHolder = ew_RemoveHtml($this->direccion->FldCaption()); // estado $this->estado->EditCustomAttributes = ""; $arwrk = array(); $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1)); $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2)); $this->estado->EditValue = $arwrk; // idhospital $this->idhospital->EditAttrs["class"] = "form-control"; $this->idhospital->EditCustomAttributes = ""; if ($this->idhospital->getSessionValue() != "") { $this->idhospital->CurrentValue = $this->idhospital->getSessionValue(); if (strval($this->idhospital->CurrentValue) != "") { $sFilterWrk = "`idhospital`" . ew_SearchString("=", $this->idhospital->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idhospital`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hospital`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idhospital, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idhospital->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idhospital->ViewValue = $this->idhospital->CurrentValue; } } else { $this->idhospital->ViewValue = NULL; } $this->idhospital->ViewCustomAttributes = ""; } else { } // Call Row Rendered event $this->Row_Rendered(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // doc_id // doc_url // doc_name // doc_scribd_id // doc_description // doc_title // doc_status // doc_author // doc_type // doc_path // subject_dept // subject_type // subject_faculty // doc_author_name // doc_publisher // subject_general_faculty_id if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // doc_id $this->doc_id->ViewValue = $this->doc_id->CurrentValue; $this->doc_id->ViewCustomAttributes = ""; // doc_url $this->doc_url->ViewValue = $this->doc_url->CurrentValue; $this->doc_url->ImageAlt = $this->doc_url->FldAlt(); $this->doc_url->ViewCustomAttributes = ""; // doc_name $this->doc_name->ViewValue = $this->doc_name->CurrentValue; $this->doc_name->ViewCustomAttributes = ""; // doc_scribd_id $this->doc_scribd_id->ViewValue = $this->doc_scribd_id->CurrentValue; $this->doc_scribd_id->ViewCustomAttributes = ""; // doc_description $this->doc_description->ViewValue = $this->doc_description->CurrentValue; $this->doc_description->ViewCustomAttributes = ""; // doc_title $this->doc_title->ViewValue = $this->doc_title->CurrentValue; $this->doc_title->ViewCustomAttributes = ""; // doc_status $this->doc_status->ViewValue = $this->doc_status->CurrentValue; $this->doc_status->ViewCustomAttributes = ""; // doc_author $this->doc_author->ViewValue = $this->doc_author->CurrentValue; $this->doc_author->ViewCustomAttributes = ""; // doc_type $this->doc_type->ViewValue = $this->doc_type->CurrentValue; $this->doc_type->ViewCustomAttributes = ""; // doc_path $this->doc_path->ViewValue = $this->doc_path->CurrentValue; $this->doc_path->ViewCustomAttributes = ""; // subject_dept if (strval($this->subject_dept->CurrentValue) != "") { $sFilterWrk = "`dept_id`" . ew_SearchString("=", $this->subject_dept->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `dept_id`, `dept_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_dept`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_dept->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_dept->ViewValue = $this->subject_dept->CurrentValue; } } else { $this->subject_dept->ViewValue = NULL; } $this->subject_dept->ViewCustomAttributes = ""; // subject_type if (strval($this->subject_type->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->subject_type->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id`, `subject_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_subject_type`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_type->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_type->ViewValue = $this->subject_type->CurrentValue; } } else { $this->subject_type->ViewValue = NULL; } $this->subject_type->ViewCustomAttributes = ""; // subject_faculty if (strval($this->subject_faculty->CurrentValue) != "") { $sFilterWrk = "`faculty_id`" . ew_SearchString("=", $this->subject_faculty->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_faculty`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_faculty->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_faculty->ViewValue = $this->subject_faculty->CurrentValue; } } else { $this->subject_faculty->ViewValue = NULL; } $this->subject_faculty->ViewCustomAttributes = ""; // doc_author_name $this->doc_author_name->ViewValue = $this->doc_author_name->CurrentValue; $this->doc_author_name->ViewCustomAttributes = ""; // doc_publisher $this->doc_publisher->ViewValue = $this->doc_publisher->CurrentValue; $this->doc_publisher->ViewCustomAttributes = ""; // subject_general_faculty_id if (strval($this->subject_general_faculty_id->CurrentValue) != "") { $sFilterWrk = "`faculty_id`" . ew_SearchString("=", $this->subject_general_faculty_id->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_faculty`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_general_faculty_id->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_general_faculty_id->ViewValue = $this->subject_general_faculty_id->CurrentValue; } } else { $this->subject_general_faculty_id->ViewValue = NULL; } $this->subject_general_faculty_id->ViewCustomAttributes = ""; // doc_url $this->doc_url->LinkCustomAttributes = ""; $this->doc_url->HrefValue = ""; $this->doc_url->TooltipValue = ""; // doc_name $this->doc_name->LinkCustomAttributes = ""; $this->doc_name->HrefValue = ""; $this->doc_name->TooltipValue = ""; // doc_scribd_id $this->doc_scribd_id->LinkCustomAttributes = ""; $this->doc_scribd_id->HrefValue = ""; $this->doc_scribd_id->TooltipValue = ""; // doc_description $this->doc_description->LinkCustomAttributes = ""; $this->doc_description->HrefValue = ""; $this->doc_description->TooltipValue = ""; // doc_title $this->doc_title->LinkCustomAttributes = ""; $this->doc_title->HrefValue = ""; $this->doc_title->TooltipValue = ""; // doc_status $this->doc_status->LinkCustomAttributes = ""; $this->doc_status->HrefValue = ""; $this->doc_status->TooltipValue = ""; // doc_author $this->doc_author->LinkCustomAttributes = ""; $this->doc_author->HrefValue = ""; $this->doc_author->TooltipValue = ""; // doc_type $this->doc_type->LinkCustomAttributes = ""; $this->doc_type->HrefValue = ""; $this->doc_type->TooltipValue = ""; // doc_path $this->doc_path->LinkCustomAttributes = ""; $this->doc_path->HrefValue = ""; $this->doc_path->TooltipValue = ""; // subject_dept $this->subject_dept->LinkCustomAttributes = ""; $this->subject_dept->HrefValue = ""; $this->subject_dept->TooltipValue = ""; // subject_type $this->subject_type->LinkCustomAttributes = ""; $this->subject_type->HrefValue = ""; $this->subject_type->TooltipValue = ""; // subject_faculty $this->subject_faculty->LinkCustomAttributes = ""; $this->subject_faculty->HrefValue = ""; $this->subject_faculty->TooltipValue = ""; // doc_author_name $this->doc_author_name->LinkCustomAttributes = ""; $this->doc_author_name->HrefValue = ""; $this->doc_author_name->TooltipValue = ""; // doc_publisher $this->doc_publisher->LinkCustomAttributes = ""; $this->doc_publisher->HrefValue = ""; $this->doc_publisher->TooltipValue = ""; // subject_general_faculty_id $this->subject_general_faculty_id->LinkCustomAttributes = ""; $this->subject_general_faculty_id->HrefValue = ""; $this->subject_general_faculty_id->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // doc_url $this->doc_url->EditCustomAttributes = ""; $this->doc_url->EditValue = ew_HtmlEncode($this->doc_url->CurrentValue); // doc_name $this->doc_name->EditCustomAttributes = ""; $this->doc_name->EditValue = ew_HtmlEncode($this->doc_name->CurrentValue); // doc_scribd_id $this->doc_scribd_id->EditCustomAttributes = ""; $this->doc_scribd_id->EditValue = ew_HtmlEncode($this->doc_scribd_id->CurrentValue); // doc_description $this->doc_description->EditCustomAttributes = ""; $this->doc_description->EditValue = ew_HtmlEncode($this->doc_description->CurrentValue); // doc_title $this->doc_title->EditCustomAttributes = ""; $this->doc_title->EditValue = ew_HtmlEncode($this->doc_title->CurrentValue); // doc_status $this->doc_status->EditCustomAttributes = ""; $this->doc_status->EditValue = ew_HtmlEncode($this->doc_status->CurrentValue); // doc_author $this->doc_author->EditCustomAttributes = ""; $this->doc_author->EditValue = ew_HtmlEncode($this->doc_author->CurrentValue); // doc_type $this->doc_type->EditCustomAttributes = ""; $this->doc_type->EditValue = ew_HtmlEncode($this->doc_type->CurrentValue); // doc_path $this->doc_path->EditCustomAttributes = ""; $this->doc_path->EditValue = ew_HtmlEncode($this->doc_path->CurrentValue); // subject_dept $this->subject_dept->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `dept_id`, `dept_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_dept`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } 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->subject_dept->EditValue = $arwrk; // subject_type $this->subject_type->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `id`, `subject_type_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_subject_type`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } 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->subject_type->EditValue = $arwrk; // subject_faculty $this->subject_faculty->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_faculty`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } 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->subject_faculty->EditValue = $arwrk; // doc_author_name $this->doc_author_name->EditCustomAttributes = ""; $this->doc_author_name->EditValue = ew_HtmlEncode($this->doc_author_name->CurrentValue); // doc_publisher $this->doc_publisher->EditCustomAttributes = ""; $this->doc_publisher->EditValue = ew_HtmlEncode($this->doc_publisher->CurrentValue); // subject_general_faculty_id $this->subject_general_faculty_id->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_faculty`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } 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->subject_general_faculty_id->EditValue = $arwrk; // Edit refer script // doc_url $this->doc_url->HrefValue = ""; // doc_name $this->doc_name->HrefValue = ""; // doc_scribd_id $this->doc_scribd_id->HrefValue = ""; // doc_description $this->doc_description->HrefValue = ""; // doc_title $this->doc_title->HrefValue = ""; // doc_status $this->doc_status->HrefValue = ""; // doc_author $this->doc_author->HrefValue = ""; // doc_type $this->doc_type->HrefValue = ""; // doc_path $this->doc_path->HrefValue = ""; // subject_dept $this->subject_dept->HrefValue = ""; // subject_type $this->subject_type->HrefValue = ""; // subject_faculty $this->subject_faculty->HrefValue = ""; // doc_author_name $this->doc_author_name->HrefValue = ""; // doc_publisher $this->doc_publisher->HrefValue = ""; // subject_general_faculty_id $this->subject_general_faculty_id->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs $this->AddUrl = $this->GetAddUrl(); $this->EditUrl = $this->GetEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); $this->ListUrl = $this->GetListUrl(); $this->SetupOtherOptions(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // scat_id // category_id // scat_name // scat_description // scat_picture if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // scat_id $this->scat_id->ViewValue = $this->scat_id->CurrentValue; $this->scat_id->ViewCustomAttributes = ""; // category_id if (strval($this->category_id->CurrentValue) != "") { $sFilterWrk = "`category_id`" . ew_SearchString("=", $this->category_id->CurrentValue, EW_DATATYPE_NUMBER, ""); $sSqlWrk = "SELECT `category_id`, `category_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `category`"; $sWhereWrk = ""; ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->category_id, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->category_id->ViewValue = $this->category_id->DisplayValue($arwrk); $rswrk->Close(); } else { $this->category_id->ViewValue = $this->category_id->CurrentValue; } } else { $this->category_id->ViewValue = NULL; } $this->category_id->ViewCustomAttributes = ""; // scat_name $this->scat_name->ViewValue = $this->scat_name->CurrentValue; $this->scat_name->ViewCustomAttributes = ""; // scat_description $this->scat_description->ViewValue = $this->scat_description->CurrentValue; $this->scat_description->ViewCustomAttributes = ""; // scat_picture if (!ew_Empty($this->scat_picture->Upload->DbValue)) { $this->scat_picture->ViewValue = $this->scat_picture->Upload->DbValue; } else { $this->scat_picture->ViewValue = ""; } $this->scat_picture->ViewCustomAttributes = ""; // scat_id $this->scat_id->LinkCustomAttributes = ""; $this->scat_id->HrefValue = ""; $this->scat_id->TooltipValue = ""; // category_id $this->category_id->LinkCustomAttributes = ""; $this->category_id->HrefValue = ""; $this->category_id->TooltipValue = ""; // scat_name $this->scat_name->LinkCustomAttributes = ""; $this->scat_name->HrefValue = ""; $this->scat_name->TooltipValue = ""; // scat_description $this->scat_description->LinkCustomAttributes = ""; $this->scat_description->HrefValue = ""; $this->scat_description->TooltipValue = ""; // scat_picture $this->scat_picture->LinkCustomAttributes = ""; $this->scat_picture->HrefValue = ""; $this->scat_picture->HrefValue2 = $this->scat_picture->UploadPath . $this->scat_picture->Upload->DbValue; $this->scat_picture->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // 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 $Security, $Language, $gsLanguage; // Initialize URLs // Convert decimal values if posted back if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) { $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // BANK_ACCOUNT_ID // CODE // DESCRIPTION // ACCOUNT_NUMBER // BANK_ID // ACTIVE if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // CODE $this->CODE->ViewValue = $this->CODE->CurrentValue; $this->CODE->ViewCustomAttributes = ""; // DESCRIPTION $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue; $this->DESCRIPTION->ViewCustomAttributes = ""; // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue; $this->ACCOUNT_NUMBER->ViewCustomAttributes = ""; // BANK_ID if (strval($this->BANK_ID->CurrentValue) != "") { $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, ""); switch (@$gsLanguage) { case "es": $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`"; $sWhereWrk = ""; break; default: $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`"; $sWhereWrk = ""; break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk); $rswrk->Close(); } else { $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue; } } else { $this->BANK_ID->ViewValue = NULL; } $this->BANK_ID->ViewCustomAttributes = ""; // ACTIVE if (strval($this->ACTIVE->CurrentValue) != "") { $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue); } else { $this->ACTIVE->ViewValue = NULL; } $this->ACTIVE->ViewCustomAttributes = ""; // CODE $this->CODE->LinkCustomAttributes = ""; $this->CODE->HrefValue = ""; $this->CODE->TooltipValue = ""; // DESCRIPTION $this->DESCRIPTION->LinkCustomAttributes = ""; $this->DESCRIPTION->HrefValue = ""; $this->DESCRIPTION->TooltipValue = ""; // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->LinkCustomAttributes = ""; $this->ACCOUNT_NUMBER->HrefValue = ""; $this->ACCOUNT_NUMBER->TooltipValue = ""; // BANK_ID $this->BANK_ID->LinkCustomAttributes = ""; $this->BANK_ID->HrefValue = ""; $this->BANK_ID->TooltipValue = ""; // ACTIVE $this->ACTIVE->LinkCustomAttributes = ""; $this->ACTIVE->HrefValue = ""; $this->ACTIVE->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // CODE $this->CODE->EditAttrs["class"] = "form-control"; $this->CODE->EditCustomAttributes = ""; $this->CODE->EditValue = ew_HtmlEncode($this->CODE->CurrentValue); $this->CODE->PlaceHolder = ew_RemoveHtml($this->CODE->FldCaption()); // DESCRIPTION $this->DESCRIPTION->EditAttrs["class"] = "form-control"; $this->DESCRIPTION->EditCustomAttributes = ""; $this->DESCRIPTION->EditValue = ew_HtmlEncode($this->DESCRIPTION->CurrentValue); $this->DESCRIPTION->PlaceHolder = ew_RemoveHtml($this->DESCRIPTION->FldCaption()); // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->EditAttrs["class"] = "form-control"; $this->ACCOUNT_NUMBER->EditCustomAttributes = ""; $this->ACCOUNT_NUMBER->EditValue = ew_HtmlEncode($this->ACCOUNT_NUMBER->CurrentValue); $this->ACCOUNT_NUMBER->PlaceHolder = ew_RemoveHtml($this->ACCOUNT_NUMBER->FldCaption()); if (strval($this->ACCOUNT_NUMBER->EditValue) != "" && is_numeric($this->ACCOUNT_NUMBER->EditValue)) { $this->ACCOUNT_NUMBER->EditValue = ew_FormatNumber($this->ACCOUNT_NUMBER->EditValue, -2, -1, -2, 0); } // BANK_ID $this->BANK_ID->EditAttrs["class"] = "form-control"; $this->BANK_ID->EditCustomAttributes = ""; if (trim(strval($this->BANK_ID->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, ""); } switch (@$gsLanguage) { case "es": $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`"; $sWhereWrk = ""; break; default: $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `bank`"; $sWhereWrk = ""; break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->BANK_ID->EditValue = $arwrk; // ACTIVE $this->ACTIVE->EditAttrs["class"] = "form-control"; $this->ACTIVE->EditCustomAttributes = ""; $this->ACTIVE->EditValue = $this->ACTIVE->Options(TRUE); // Edit refer script // CODE $this->CODE->LinkCustomAttributes = ""; $this->CODE->HrefValue = ""; // DESCRIPTION $this->DESCRIPTION->LinkCustomAttributes = ""; $this->DESCRIPTION->HrefValue = ""; // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->LinkCustomAttributes = ""; $this->ACCOUNT_NUMBER->HrefValue = ""; // BANK_ID $this->BANK_ID->LinkCustomAttributes = ""; $this->BANK_ID->HrefValue = ""; // ACTIVE $this->ACTIVE->LinkCustomAttributes = ""; $this->ACTIVE->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
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 // idcuenta // idpaciente // fecha_inicio // fecha_final // estado if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // idcuenta $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue; $this->idcuenta->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`, '' 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'); $rswrk->Close(); } else { $this->idpaciente->ViewValue = $this->idpaciente->CurrentValue; } } else { $this->idpaciente->ViewValue = NULL; } $this->idpaciente->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; default: $this->estado->ViewValue = $this->estado->CurrentValue; } } else { $this->estado->ViewValue = NULL; } $this->estado->ViewCustomAttributes = ""; // idpaciente $this->idpaciente->LinkCustomAttributes = ""; $this->idpaciente->HrefValue = ""; $this->idpaciente->TooltipValue = ""; // fecha_inicio $this->fecha_inicio->LinkCustomAttributes = ""; $this->fecha_inicio->HrefValue = ""; $this->fecha_inicio->TooltipValue = ""; // fecha_final $this->fecha_final->LinkCustomAttributes = ""; $this->fecha_final->HrefValue = ""; $this->fecha_final->TooltipValue = ""; // estado $this->estado->LinkCustomAttributes = ""; $this->estado->HrefValue = ""; $this->estado->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id // lesson_id // video_link // active if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id $this->id->ViewValue = $this->id->CurrentValue; $this->id->ViewCustomAttributes = ""; // lesson_id if (strval($this->lesson_id->CurrentValue) != "") { $sFilterWrk = "`lesson_id`" . ew_SearchString("=", $this->lesson_id->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `lesson_id`, `lesson_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_lesson`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->lesson_id->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->lesson_id->ViewValue = $this->lesson_id->CurrentValue; } } else { $this->lesson_id->ViewValue = NULL; } $this->lesson_id->ViewCustomAttributes = ""; // video_link $this->video_link->ViewValue = $this->video_link->CurrentValue; $this->video_link->ViewCustomAttributes = ""; // active $this->active->ViewValue = $this->active->CurrentValue; $this->active->ViewCustomAttributes = ""; // id $this->id->LinkCustomAttributes = ""; $this->id->HrefValue = ""; $this->id->TooltipValue = ""; // lesson_id $this->lesson_id->LinkCustomAttributes = ""; $this->lesson_id->HrefValue = ""; $this->lesson_id->TooltipValue = ""; // video_link $this->video_link->LinkCustomAttributes = ""; $this->video_link->HrefValue = ""; $this->video_link->TooltipValue = ""; // active $this->active->LinkCustomAttributes = ""; $this->active->HrefValue = ""; $this->active->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // id $this->id->EditCustomAttributes = ""; $this->id->EditValue = $this->id->CurrentValue; $this->id->ViewCustomAttributes = ""; // lesson_id $this->lesson_id->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `lesson_id`, `lesson_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tbl_lesson`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } 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->lesson_id->EditValue = $arwrk; // video_link $this->video_link->EditCustomAttributes = ""; $this->video_link->EditValue = ew_HtmlEncode($this->video_link->CurrentValue); // active $this->active->EditCustomAttributes = ""; $this->active->EditValue = ew_HtmlEncode($this->active->CurrentValue); // Edit refer script // id $this->id->HrefValue = ""; // lesson_id $this->lesson_id->HrefValue = ""; // video_link $this->video_link->HrefValue = ""; // active $this->active->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->AddUrl = $this->GetAddUrl(); $this->EditUrl = $this->GetEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); $this->ListUrl = $this->GetListUrl(); $this->SetupOtherOptions(); // Convert decimal values if posted back if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) { $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id // mes // anio // fecha // monto // id_usuario // id_socio if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id $this->id->ViewCustomAttributes = ""; // mes $this->mes->ViewValue = $this->mes->CurrentValue; $this->mes->ViewCustomAttributes = ""; // anio $this->anio->ViewValue = $this->anio->CurrentValue; $this->anio->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = $this->fecha->CurrentValue; $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // monto $this->monto->ViewValue = $this->monto->CurrentValue; $this->monto->ViewValue = ew_FormatCurrency($this->monto->ViewValue, 0, -2, -2, -2); $this->monto->ViewCustomAttributes = ""; // id_socio if (strval($this->id_socio->CurrentValue) != "") { $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_socio, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `propietario` DESC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_socio->ViewValue = $rswrk->fields('DispFld'); $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld'); $rswrk->Close(); } else { $this->id_socio->ViewValue = $this->id_socio->CurrentValue; } } else { $this->id_socio->ViewValue = NULL; } $this->id_socio->ViewCustomAttributes = ""; // id $this->id->LinkCustomAttributes = ""; $this->id->HrefValue = ""; $this->id->TooltipValue = ""; // mes $this->mes->LinkCustomAttributes = ""; $this->mes->HrefValue = ""; $this->mes->TooltipValue = ""; // anio $this->anio->LinkCustomAttributes = ""; $this->anio->HrefValue = ""; $this->anio->TooltipValue = ""; // fecha $this->fecha->LinkCustomAttributes = ""; $this->fecha->HrefValue = ""; $this->fecha->TooltipValue = ""; // monto $this->monto->LinkCustomAttributes = ""; $this->monto->HrefValue = ""; $this->monto->TooltipValue = ""; // id_socio $this->id_socio->LinkCustomAttributes = ""; $this->id_socio->HrefValue = ""; $this->id_socio->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Convert decimal values if posted back if ($this->iva->FormValue == $this->iva->CurrentValue && is_numeric(ew_StrToFloat($this->iva->CurrentValue))) { $this->iva->CurrentValue = ew_StrToFloat($this->iva->CurrentValue); } // Convert decimal values if posted back if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) { $this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // codigo // fecha // detalles // iva // Importe // id_tipo_gasto // id_hoja_ruta $this->id_hoja_ruta->CellCssStyle = "white-space: nowrap;"; // id_hoja_mantenimiento if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // codigo $this->codigo->ViewValue = $this->codigo->CurrentValue; $this->codigo->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = $this->fecha->CurrentValue; $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // detalles $this->detalles->ViewValue = $this->detalles->CurrentValue; $this->detalles->ViewCustomAttributes = ""; // iva $this->iva->ViewValue = $this->iva->CurrentValue; $this->iva->ViewCustomAttributes = ""; // Importe $this->Importe->ViewValue = $this->Importe->CurrentValue; $this->Importe->ViewCustomAttributes = ""; // id_tipo_gasto if ($this->id_tipo_gasto->VirtualValue != "") { $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue; } else { $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue; if (strval($this->id_tipo_gasto->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`"; $sWhereWrk = ""; $lookuptblfilter = "`clase`='M'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_gasto` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue; } } else { $this->id_tipo_gasto->ViewValue = NULL; } } $this->id_tipo_gasto->ViewCustomAttributes = ""; // id_hoja_mantenimiento $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue; $this->id_hoja_mantenimiento->ViewCustomAttributes = ""; // codigo $this->codigo->LinkCustomAttributes = ""; $this->codigo->HrefValue = ""; $this->codigo->TooltipValue = ""; // fecha $this->fecha->LinkCustomAttributes = ""; $this->fecha->HrefValue = ""; $this->fecha->TooltipValue = ""; // detalles $this->detalles->LinkCustomAttributes = ""; $this->detalles->HrefValue = ""; $this->detalles->TooltipValue = ""; // iva $this->iva->LinkCustomAttributes = ""; $this->iva->HrefValue = ""; $this->iva->TooltipValue = ""; // Importe $this->Importe->LinkCustomAttributes = ""; $this->Importe->HrefValue = ""; $this->Importe->TooltipValue = ""; // id_tipo_gasto $this->id_tipo_gasto->LinkCustomAttributes = ""; $this->id_tipo_gasto->HrefValue = ""; $this->id_tipo_gasto->TooltipValue = ""; // id_hoja_mantenimiento $this->id_hoja_mantenimiento->LinkCustomAttributes = ""; $this->id_hoja_mantenimiento->HrefValue = ""; $this->id_hoja_mantenimiento->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // codigo // fecha $this->fecha->EditAttrs["class"] = "form-control"; $this->fecha->EditCustomAttributes = ""; $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7)); $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption()); // detalles $this->detalles->EditAttrs["class"] = "form-control"; $this->detalles->EditCustomAttributes = ""; $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue); $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption()); // iva $this->iva->EditAttrs["class"] = "form-control"; $this->iva->EditCustomAttributes = ""; $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue); $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption()); if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) { $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0); $this->iva->OldValue = $this->iva->EditValue; } // Importe $this->Importe->EditAttrs["class"] = "form-control"; $this->Importe->EditCustomAttributes = ""; $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue); $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption()); if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) { $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0); $this->Importe->OldValue = $this->Importe->EditValue; } // id_tipo_gasto $this->id_tipo_gasto->EditAttrs["class"] = "form-control"; $this->id_tipo_gasto->EditCustomAttributes = ""; $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue); if (strval($this->id_tipo_gasto->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`"; $sWhereWrk = ""; $lookuptblfilter = "`clase`='M'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_gasto` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld')); $rswrk->Close(); } else { $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue); } } else { $this->id_tipo_gasto->EditValue = NULL; } $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption()); // id_hoja_mantenimiento $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control"; $this->id_hoja_mantenimiento->EditCustomAttributes = ""; if ($this->id_hoja_mantenimiento->getSessionValue() != "") { $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue(); $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue; $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue; $this->id_hoja_mantenimiento->ViewCustomAttributes = ""; } else { $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue); $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption()); } // Edit refer script // codigo $this->codigo->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // detalles $this->detalles->HrefValue = ""; // iva $this->iva->HrefValue = ""; // Importe $this->Importe->HrefValue = ""; // id_tipo_gasto $this->id_tipo_gasto->HrefValue = ""; // id_hoja_mantenimiento $this->id_hoja_mantenimiento->HrefValue = ""; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // codigo $this->codigo->EditAttrs["class"] = "form-control"; $this->codigo->EditCustomAttributes = ""; $this->codigo->EditValue = $this->codigo->CurrentValue; $this->codigo->ViewCustomAttributes = ""; // fecha $this->fecha->EditAttrs["class"] = "form-control"; $this->fecha->EditCustomAttributes = ""; $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7)); $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption()); // detalles $this->detalles->EditAttrs["class"] = "form-control"; $this->detalles->EditCustomAttributes = ""; $this->detalles->EditValue = ew_HtmlEncode($this->detalles->CurrentValue); $this->detalles->PlaceHolder = ew_RemoveHtml($this->detalles->FldCaption()); // iva $this->iva->EditAttrs["class"] = "form-control"; $this->iva->EditCustomAttributes = ""; $this->iva->EditValue = ew_HtmlEncode($this->iva->CurrentValue); $this->iva->PlaceHolder = ew_RemoveHtml($this->iva->FldCaption()); if (strval($this->iva->EditValue) != "" && is_numeric($this->iva->EditValue)) { $this->iva->EditValue = ew_FormatNumber($this->iva->EditValue, -2, -1, -2, 0); $this->iva->OldValue = $this->iva->EditValue; } // Importe $this->Importe->EditAttrs["class"] = "form-control"; $this->Importe->EditCustomAttributes = ""; $this->Importe->EditValue = ew_HtmlEncode($this->Importe->CurrentValue); $this->Importe->PlaceHolder = ew_RemoveHtml($this->Importe->FldCaption()); if (strval($this->Importe->EditValue) != "" && is_numeric($this->Importe->EditValue)) { $this->Importe->EditValue = ew_FormatNumber($this->Importe->EditValue, -2, -1, -2, 0); $this->Importe->OldValue = $this->Importe->EditValue; } // id_tipo_gasto $this->id_tipo_gasto->EditAttrs["class"] = "form-control"; $this->id_tipo_gasto->EditCustomAttributes = ""; $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue); if (strval($this->id_tipo_gasto->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`"; $sWhereWrk = ""; $lookuptblfilter = "`clase`='M'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_gasto` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tipo_gasto->EditValue = ew_HtmlEncode($rswrk->fields('DispFld')); $rswrk->Close(); } else { $this->id_tipo_gasto->EditValue = ew_HtmlEncode($this->id_tipo_gasto->CurrentValue); } } else { $this->id_tipo_gasto->EditValue = NULL; } $this->id_tipo_gasto->PlaceHolder = ew_RemoveHtml($this->id_tipo_gasto->FldCaption()); // id_hoja_mantenimiento $this->id_hoja_mantenimiento->EditAttrs["class"] = "form-control"; $this->id_hoja_mantenimiento->EditCustomAttributes = ""; if ($this->id_hoja_mantenimiento->getSessionValue() != "") { $this->id_hoja_mantenimiento->CurrentValue = $this->id_hoja_mantenimiento->getSessionValue(); $this->id_hoja_mantenimiento->OldValue = $this->id_hoja_mantenimiento->CurrentValue; $this->id_hoja_mantenimiento->ViewValue = $this->id_hoja_mantenimiento->CurrentValue; $this->id_hoja_mantenimiento->ViewCustomAttributes = ""; } else { $this->id_hoja_mantenimiento->EditValue = ew_HtmlEncode($this->id_hoja_mantenimiento->CurrentValue); $this->id_hoja_mantenimiento->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimiento->FldCaption()); } // Edit refer script // codigo $this->codigo->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // detalles $this->detalles->HrefValue = ""; // iva $this->iva->HrefValue = ""; // Importe $this->Importe->HrefValue = ""; // id_tipo_gasto $this->id_tipo_gasto->HrefValue = ""; // id_hoja_mantenimiento $this->id_hoja_mantenimiento->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderListRow() { global $conn, $Security, $gsLanguage; // Call Row Rendering event $this->Row_Rendering(); // Common render codes // TopicQuestionID // Question // TopicID // TopicQuestionID $this->TopicQuestionID->ViewValue = $this->TopicQuestionID->CurrentValue; $this->TopicQuestionID->ViewCustomAttributes = ""; // Question $this->Question->ViewValue = $this->Question->CurrentValue; $this->Question->ViewCustomAttributes = ""; // TopicID if (strval($this->TopicID->CurrentValue) != "") { $sFilterWrk = "`TopicID`" . ew_SearchString("=", $this->TopicID->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `TopicID`, `Name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `Topics`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->TopicID, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->TopicID->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->TopicID->ViewValue = $this->TopicID->CurrentValue; } } else { $this->TopicID->ViewValue = NULL; } $this->TopicID->ViewCustomAttributes = ""; // TopicQuestionID $this->TopicQuestionID->LinkCustomAttributes = ""; $this->TopicQuestionID->HrefValue = ""; $this->TopicQuestionID->TooltipValue = ""; // Question $this->Question->LinkCustomAttributes = ""; $this->Question->HrefValue = ""; $this->Question->TooltipValue = ""; // TopicID $this->TopicID->LinkCustomAttributes = ""; $this->TopicID->HrefValue = ""; $this->TopicID->TooltipValue = ""; // Call Row Rendered event $this->Row_Rendered(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Convert decimal values if posted back if ($this->monto->FormValue == $this->monto->CurrentValue && is_numeric(ew_StrToFloat($this->monto->CurrentValue))) { $this->monto->CurrentValue = ew_StrToFloat($this->monto->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id // id_deuda // fecha // monto // id_usuario if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id $this->id->ViewValue = $this->id->CurrentValue; $this->id->ViewCustomAttributes = ""; // id_deuda if (strval($this->id_deuda->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_deuda, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_deuda->ViewValue = $rswrk->fields('DispFld'); $this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld'); $this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_deuda->ViewValue = $this->id_deuda->CurrentValue; } } else { $this->id_deuda->ViewValue = NULL; } $this->id_deuda->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // monto $this->monto->ViewValue = $this->monto->CurrentValue; $this->monto->ViewCustomAttributes = ""; // id_usuario if (strval($this->id_usuario->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->id_usuario->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id`, `usuario` AS `DispFld`, `nombre` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `usuario`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_usuario, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_usuario->ViewValue = $rswrk->fields('DispFld'); $this->id_usuario->ViewValue .= ew_ValueSeparator(1, $this->id_usuario) . $rswrk->fields('Disp2Fld'); $rswrk->Close(); } else { $this->id_usuario->ViewValue = $this->id_usuario->CurrentValue; } } else { $this->id_usuario->ViewValue = NULL; } $this->id_usuario->ViewCustomAttributes = ""; // id $this->id->LinkCustomAttributes = ""; $this->id->HrefValue = ""; $this->id->TooltipValue = ""; // id_deuda $this->id_deuda->LinkCustomAttributes = ""; $this->id_deuda->HrefValue = ""; $this->id_deuda->TooltipValue = ""; // fecha $this->fecha->LinkCustomAttributes = ""; $this->fecha->HrefValue = ""; $this->fecha->TooltipValue = ""; // monto $this->monto->LinkCustomAttributes = ""; $this->monto->HrefValue = ""; $this->monto->TooltipValue = ""; // id_usuario $this->id_usuario->LinkCustomAttributes = ""; $this->id_usuario->HrefValue = ""; $this->id_usuario->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function 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(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // ID // Password // Email // Created // Type if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // ID $this->ID->ViewValue = $this->ID->CurrentValue; $this->ID->ViewCustomAttributes = ""; // Password $this->Password->ViewValue = $this->Password->CurrentValue; $this->Password->ViewCustomAttributes = ""; // Email $this->_Email->ViewValue = $this->_Email->CurrentValue; $this->_Email->ViewCustomAttributes = ""; // Created $this->Created->ViewValue = $this->Created->CurrentValue; $this->Created->ViewValue = ew_FormatDateTime($this->Created->ViewValue, 5); $this->Created->ViewCustomAttributes = ""; // Type if (strval($this->Type->CurrentValue) != "") { $sFilterWrk = "`UserTypeID`" . ew_SearchString("=", $this->Type->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `UserTypeID`, `Name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `UserTypes`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->Type, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->Type->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->Type->ViewValue = $this->Type->CurrentValue; } } else { $this->Type->ViewValue = NULL; } $this->Type->ViewCustomAttributes = ""; // Password $this->Password->LinkCustomAttributes = ""; $this->Password->HrefValue = ""; $this->Password->TooltipValue = ""; // Email $this->_Email->LinkCustomAttributes = ""; $this->_Email->HrefValue = ""; $this->_Email->TooltipValue = ""; // Created $this->Created->LinkCustomAttributes = ""; $this->Created->HrefValue = ""; $this->Created->TooltipValue = ""; // Type $this->Type->LinkCustomAttributes = ""; $this->Type->HrefValue = ""; $this->Type->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // Password $this->Password->EditCustomAttributes = ""; $this->Password->EditValue = ew_HtmlEncode($this->Password->CurrentValue); $this->Password->PlaceHolder = ew_RemoveHtml($this->Password->FldCaption()); // Email $this->_Email->EditCustomAttributes = ""; $this->_Email->EditValue = ew_HtmlEncode($this->_Email->CurrentValue); $this->_Email->PlaceHolder = ew_RemoveHtml($this->_Email->FldCaption()); // Created $this->Created->EditCustomAttributes = ""; $this->Created->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->Created->CurrentValue, 5)); $this->Created->PlaceHolder = ew_RemoveHtml($this->Created->FldCaption()); // Type $this->Type->EditCustomAttributes = ""; $sFilterWrk = ""; $sSqlWrk = "SELECT `UserTypeID`, `Name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `UserTypes`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->Type, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->Type->EditValue = $arwrk; // Edit refer script // Password $this->Password->HrefValue = ""; // Email $this->_Email->HrefValue = ""; // Created $this->Created->HrefValue = ""; // Type $this->Type->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // 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(); } }
function RenderListRow() { global $conn, $Security; // Call Row Rendering event $this->Row_Rendering(); // Common render codes // cliente $this->cliente->CellCssStyle = "white-space: nowrap;"; // objetos $this->objetos->CellCssStyle = "white-space: nowrap;"; // precio $this->precio->CellCssStyle = "white-space: nowrap;"; // entrega $this->entrega->CellCssStyle = "white-space: nowrap;"; // saldo $this->saldo->CellCssStyle = "white-space: nowrap;"; // estado $this->estado->CellCssStyle = "white-space: nowrap;"; // fecha_recepcion $this->fecha_recepcion->CellCssStyle = "white-space: nowrap;"; // fecha_entrega $this->fecha_entrega->CellCssStyle = "white-space: nowrap;"; // foto1 $this->foto1->CellCssStyle = "white-space: nowrap;"; // foto2 $this->foto2->CellCssStyle = "white-space: nowrap;"; // cliente $this->cliente->ViewValue = $this->cliente->CurrentValue; $this->cliente->ViewCustomAttributes = ""; // objetos $this->objetos->ViewValue = $this->objetos->CurrentValue; $this->objetos->ViewCustomAttributes = ""; // precio $this->precio->ViewValue = $this->precio->CurrentValue; $this->precio->ViewCustomAttributes = ""; // entrega $this->entrega->ViewValue = $this->entrega->CurrentValue; $this->entrega->ViewCustomAttributes = ""; // saldo $this->saldo->ViewValue = $this->saldo->CurrentValue; $this->saldo->ViewCustomAttributes = ""; // estado if (strval($this->estado->CurrentValue) != "") { $sFilterWrk = "`estado`" . ew_SearchString("=", $this->estado->CurrentValue, EW_DATATYPE_STRING); $sSqlWrk = "SELECT `estado`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estados`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->estado, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `codigo` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->estado->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->estado->ViewValue = $this->estado->CurrentValue; } } else { $this->estado->ViewValue = NULL; } $this->estado->ViewCustomAttributes = ""; // fecha_recepcion $this->fecha_recepcion->ViewValue = $this->fecha_recepcion->CurrentValue; $this->fecha_recepcion->ViewValue = ew_FormatDateTime($this->fecha_recepcion->ViewValue, 7); $this->fecha_recepcion->ViewCustomAttributes = ""; // fecha_entrega $this->fecha_entrega->ViewValue = $this->fecha_entrega->CurrentValue; $this->fecha_entrega->ViewValue = ew_FormatDateTime($this->fecha_entrega->ViewValue, 7); $this->fecha_entrega->ViewCustomAttributes = ""; // foto1 if (!ew_Empty($this->foto1->Upload->DbValue)) { $this->foto1->ImageWidth = 40; $this->foto1->ImageHeight = 40; $this->foto1->ImageAlt = $this->foto1->FldAlt(); $this->foto1->ViewValue = ew_UploadPathEx(FALSE, $this->foto1->UploadPath) . $this->foto1->Upload->DbValue; } else { $this->foto1->ViewValue = ""; } $this->foto1->ViewCustomAttributes = ""; // foto2 if (!ew_Empty($this->foto2->Upload->DbValue)) { $this->foto2->ImageWidth = 10; $this->foto2->ImageHeight = 10; $this->foto2->ImageAlt = $this->foto2->FldAlt(); $this->foto2->ViewValue = ew_UploadPathEx(FALSE, $this->foto2->UploadPath) . $this->foto2->Upload->DbValue; } else { $this->foto2->ViewValue = ""; } $this->foto2->ViewCustomAttributes = ""; // cliente $this->cliente->LinkCustomAttributes = ""; $this->cliente->HrefValue = ""; $this->cliente->TooltipValue = ""; // objetos $this->objetos->LinkCustomAttributes = ""; $this->objetos->HrefValue = ""; $this->objetos->TooltipValue = ""; // precio $this->precio->LinkCustomAttributes = ""; $this->precio->HrefValue = ""; $this->precio->TooltipValue = ""; // entrega $this->entrega->LinkCustomAttributes = ""; $this->entrega->HrefValue = ""; $this->entrega->TooltipValue = ""; // saldo $this->saldo->LinkCustomAttributes = ""; $this->saldo->HrefValue = ""; $this->saldo->TooltipValue = ""; // estado $this->estado->LinkCustomAttributes = ""; $this->estado->HrefValue = ""; $this->estado->TooltipValue = ""; // fecha_recepcion $this->fecha_recepcion->LinkCustomAttributes = ""; $this->fecha_recepcion->HrefValue = ""; $this->fecha_recepcion->TooltipValue = ""; // fecha_entrega $this->fecha_entrega->LinkCustomAttributes = ""; $this->fecha_entrega->HrefValue = ""; $this->fecha_entrega->TooltipValue = ""; // foto1 $this->foto1->LinkCustomAttributes = ""; $this->foto1->HrefValue = ""; $this->foto1->HrefValue2 = $this->foto1->UploadPath . $this->foto1->Upload->DbValue; $this->foto1->TooltipValue = ""; // foto2 $this->foto2->LinkCustomAttributes = ""; $this->foto2->HrefValue = ""; $this->foto2->HrefValue2 = $this->foto2->UploadPath . $this->foto2->Upload->DbValue; $this->foto2->TooltipValue = ""; // Call Row Rendered event $this->Row_Rendered(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // 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(); } }
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_detail_nilai // id_nilai // id_mapel // nilai_afektif // nilai_komulatif // nilai_psikomotorik // nilai_rata_rata if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id_detail_nilai $this->id_detail_nilai->ViewValue = $this->id_detail_nilai->CurrentValue; $this->id_detail_nilai->ViewCustomAttributes = ""; // id_nilai $this->id_nilai->ViewValue = $this->id_nilai->CurrentValue; $this->id_nilai->ViewCustomAttributes = ""; // id_mapel if (strval($this->id_mapel->CurrentValue) != "") { $sFilterWrk = "`id_mapel`" . ew_SearchString("=", $this->id_mapel->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id_mapel`, `nama_mapel` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `mapel`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_mapel, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_mapel->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_mapel->ViewValue = $this->id_mapel->CurrentValue; } } else { $this->id_mapel->ViewValue = NULL; } $this->id_mapel->ViewCustomAttributes = ""; // nilai_afektif $this->nilai_afektif->ViewValue = $this->nilai_afektif->CurrentValue; $this->nilai_afektif->ViewCustomAttributes = ""; // nilai_komulatif $this->nilai_komulatif->ViewValue = $this->nilai_komulatif->CurrentValue; $this->nilai_komulatif->ViewCustomAttributes = ""; // nilai_psikomotorik $this->nilai_psikomotorik->ViewValue = $this->nilai_psikomotorik->CurrentValue; $this->nilai_psikomotorik->ViewCustomAttributes = ""; // nilai_rata_rata $this->nilai_rata_rata->ViewValue = $this->nilai_rata_rata->CurrentValue; $this->nilai_rata_rata->ViewCustomAttributes = ""; // id_mapel $this->id_mapel->LinkCustomAttributes = ""; $this->id_mapel->HrefValue = ""; $this->id_mapel->TooltipValue = ""; // nilai_afektif $this->nilai_afektif->LinkCustomAttributes = ""; $this->nilai_afektif->HrefValue = ""; $this->nilai_afektif->TooltipValue = ""; // nilai_komulatif $this->nilai_komulatif->LinkCustomAttributes = ""; $this->nilai_komulatif->HrefValue = ""; $this->nilai_komulatif->TooltipValue = ""; // nilai_psikomotorik $this->nilai_psikomotorik->LinkCustomAttributes = ""; $this->nilai_psikomotorik->HrefValue = ""; $this->nilai_psikomotorik->TooltipValue = ""; // nilai_rata_rata $this->nilai_rata_rata->LinkCustomAttributes = ""; $this->nilai_rata_rata->HrefValue = ""; $this->nilai_rata_rata->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // idmedicina // descripcion // estado // idlaboratorio // idhospital if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // idmedicina $this->idmedicina->ViewValue = $this->idmedicina->CurrentValue; $this->idmedicina->ViewCustomAttributes = ""; // descripcion $this->descripcion->ViewValue = $this->descripcion->CurrentValue; $this->descripcion->ViewCustomAttributes = ""; // estado if (strval($this->estado->CurrentValue) != "") { switch ($this->estado->CurrentValue) { case $this->estado->FldTagValue(1): $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue; break; case $this->estado->FldTagValue(2): $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue; break; default: $this->estado->ViewValue = $this->estado->CurrentValue; } } else { $this->estado->ViewValue = NULL; } $this->estado->ViewCustomAttributes = ""; // idlaboratorio if (strval($this->idlaboratorio->CurrentValue) != "") { $sFilterWrk = "`idlaboratorio`" . ew_SearchString("=", $this->idlaboratorio->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idlaboratorio`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `laboratorio`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idlaboratorio, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idlaboratorio->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idlaboratorio->ViewValue = $this->idlaboratorio->CurrentValue; } } else { $this->idlaboratorio->ViewValue = NULL; } $this->idlaboratorio->ViewCustomAttributes = ""; // idhospital $this->idhospital->ViewValue = $this->idhospital->CurrentValue; $this->idhospital->ViewCustomAttributes = ""; // idmedicina $this->idmedicina->LinkCustomAttributes = ""; $this->idmedicina->HrefValue = ""; $this->idmedicina->TooltipValue = ""; // descripcion $this->descripcion->LinkCustomAttributes = ""; $this->descripcion->HrefValue = ""; $this->descripcion->TooltipValue = ""; // estado $this->estado->LinkCustomAttributes = ""; $this->estado->HrefValue = ""; $this->estado->TooltipValue = ""; // idlaboratorio $this->idlaboratorio->LinkCustomAttributes = ""; $this->idlaboratorio->HrefValue = ""; $this->idlaboratorio->TooltipValue = ""; // idhospital $this->idhospital->LinkCustomAttributes = ""; $this->idhospital->HrefValue = ""; $this->idhospital->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_SEARCH) { // Search row // idmedicina $this->idmedicina->EditAttrs["class"] = "form-control"; $this->idmedicina->EditCustomAttributes = ""; $this->idmedicina->EditValue = ew_HtmlEncode($this->idmedicina->AdvancedSearch->SearchValue); $this->idmedicina->PlaceHolder = ew_RemoveHtml($this->idmedicina->FldCaption()); // descripcion $this->descripcion->EditAttrs["class"] = "form-control"; $this->descripcion->EditCustomAttributes = ""; $this->descripcion->EditValue = ew_HtmlEncode($this->descripcion->AdvancedSearch->SearchValue); $this->descripcion->PlaceHolder = ew_RemoveHtml($this->descripcion->FldCaption()); // estado $this->estado->EditAttrs["class"] = "form-control"; $this->estado->EditCustomAttributes = ""; $arwrk = array(); $arwrk[] = array($this->estado->FldTagValue(1), $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->FldTagValue(1)); $arwrk[] = array($this->estado->FldTagValue(2), $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->FldTagValue(2)); array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"))); $this->estado->EditValue = $arwrk; // idlaboratorio $this->idlaboratorio->EditAttrs["class"] = "form-control"; $this->idlaboratorio->EditCustomAttributes = ""; // idhospital $this->idhospital->EditAttrs["class"] = "form-control"; $this->idhospital->EditCustomAttributes = ""; $this->idhospital->EditValue = ew_HtmlEncode($this->idhospital->AdvancedSearch->SearchValue); $this->idhospital->PlaceHolder = ew_RemoveHtml($this->idhospital->FldCaption()); } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
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(); } }
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 RenderListRow() { global $conn, $Security; // Call Row Rendering event $this->Row_Rendering(); // Common render codes // subject_type_id // subject_group_type // active // detail // subject_group // subject_dept // subject_faculty // subject_type_id $this->subject_type_id->ViewValue = $this->subject_type_id->CurrentValue; $this->subject_type_id->ViewCustomAttributes = ""; // subject_group_type $this->subject_group_type->ViewValue = $this->subject_group_type->CurrentValue; $this->subject_group_type->ViewCustomAttributes = ""; // active $this->active->ViewValue = $this->active->CurrentValue; $this->active->ViewCustomAttributes = ""; // detail $this->detail->ViewValue = $this->detail->CurrentValue; $this->detail->ViewCustomAttributes = ""; // subject_group if (strval($this->subject_group->CurrentValue) != "") { $sFilterWrk = "`id`" . ew_SearchString("=", $this->subject_group->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id`, `subject_group_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_subject_group`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_group->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_group->ViewValue = $this->subject_group->CurrentValue; } } else { $this->subject_group->ViewValue = NULL; } $this->subject_group->ViewCustomAttributes = ""; // subject_dept if (strval($this->subject_dept->CurrentValue) != "") { $sFilterWrk = "`dept_id`" . ew_SearchString("=", $this->subject_dept->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `dept_id`, `dept_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_dept`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_dept->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_dept->ViewValue = $this->subject_dept->CurrentValue; } } else { $this->subject_dept->ViewValue = NULL; } $this->subject_dept->ViewCustomAttributes = ""; // subject_faculty if (strval($this->subject_faculty->CurrentValue) != "") { $sFilterWrk = "`faculty_id`" . ew_SearchString("=", $this->subject_faculty->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_faculty`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->subject_faculty->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->subject_faculty->ViewValue = $this->subject_faculty->CurrentValue; } } else { $this->subject_faculty->ViewValue = NULL; } $this->subject_faculty->ViewCustomAttributes = ""; // subject_type_id $this->subject_type_id->LinkCustomAttributes = ""; $this->subject_type_id->HrefValue = ""; $this->subject_type_id->TooltipValue = ""; // subject_group_type $this->subject_group_type->LinkCustomAttributes = ""; $this->subject_group_type->HrefValue = ""; $this->subject_group_type->TooltipValue = ""; // active $this->active->LinkCustomAttributes = ""; $this->active->HrefValue = ""; $this->active->TooltipValue = ""; // detail $this->detail->LinkCustomAttributes = ""; $this->detail->HrefValue = ""; $this->detail->TooltipValue = ""; // subject_group $this->subject_group->LinkCustomAttributes = ""; $this->subject_group->HrefValue = ""; $this->subject_group->TooltipValue = ""; // subject_dept $this->subject_dept->LinkCustomAttributes = ""; $this->subject_dept->HrefValue = ""; $this->subject_dept->TooltipValue = ""; // subject_faculty $this->subject_faculty->LinkCustomAttributes = ""; $this->subject_faculty->HrefValue = ""; $this->subject_faculty->TooltipValue = ""; // Call Row Rendered event $this->Row_Rendered(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->ViewUrl = $this->GetViewUrl(); $this->EditUrl = $this->GetEditUrl(); $this->InlineEditUrl = $this->GetInlineEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->InlineCopyUrl = $this->GetInlineCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // id_tramite // fecha // hora // titulo // descripcion // id_usuario $this->id_usuario->CellCssStyle = "white-space: nowrap;"; // archivo if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // id_tramite if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->ViewValue = $rswrk->fields('DispFld'); $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->ViewValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; // fecha $this->fecha->ViewValue = $this->fecha->CurrentValue; $this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7); $this->fecha->ViewCustomAttributes = ""; // hora $this->hora->ViewValue = $this->hora->CurrentValue; $this->hora->ViewCustomAttributes = ""; // titulo $this->titulo->ViewValue = $this->titulo->CurrentValue; $this->titulo->ViewCustomAttributes = ""; // archivo if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->ViewValue = $this->archivo->Upload->DbValue; } else { $this->archivo->ViewValue = ""; } $this->archivo->ViewCustomAttributes = ""; // id_tramite $this->id_tramite->LinkCustomAttributes = ""; $this->id_tramite->HrefValue = ""; $this->id_tramite->TooltipValue = ""; // fecha $this->fecha->LinkCustomAttributes = ""; $this->fecha->HrefValue = ""; $this->fecha->TooltipValue = ""; // hora $this->hora->LinkCustomAttributes = ""; $this->hora->HrefValue = ""; $this->hora->TooltipValue = ""; // titulo $this->titulo->LinkCustomAttributes = ""; $this->titulo->HrefValue = ""; $this->titulo->TooltipValue = ""; // archivo $this->archivo->LinkCustomAttributes = ""; $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; $this->archivo->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // id_tramite $this->id_tramite->EditAttrs["class"] = "form-control"; $this->id_tramite->EditCustomAttributes = ""; if ($this->id_tramite->getSessionValue() != "") { $this->id_tramite->CurrentValue = $this->id_tramite->getSessionValue(); $this->id_tramite->OldValue = $this->id_tramite->CurrentValue; if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->ViewValue = $rswrk->fields('DispFld'); $this->id_tramite->ViewValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->ViewValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->ViewValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->ViewValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; } else { if (trim(strval($this->id_tramite->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } $rowswrk = count($arwrk); for ($rowcntwrk = 0; $rowcntwrk < $rowswrk; $rowcntwrk++) { $arwrk[$rowcntwrk][2] = ew_FormatDateTime($arwrk[$rowcntwrk][2], 7); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->id_tramite->EditValue = $arwrk; } // fecha // hora // titulo $this->titulo->EditAttrs["class"] = "form-control"; $this->titulo->EditCustomAttributes = ""; $this->titulo->EditValue = ew_HtmlEncode($this->titulo->CurrentValue); $this->titulo->PlaceHolder = ew_RemoveHtml($this->titulo->FldCaption()); // archivo $this->archivo->EditAttrs["class"] = "form-control"; $this->archivo->EditCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->EditValue = $this->archivo->Upload->DbValue; } else { $this->archivo->EditValue = ""; } if (!ew_Empty($this->archivo->CurrentValue)) { $this->archivo->Upload->FileName = $this->archivo->CurrentValue; } if (is_numeric($this->RowIndex) && !$this->EventCancelled) { ew_RenderUploadField($this->archivo, $this->RowIndex); } // Edit refer script // id_tramite $this->id_tramite->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // hora $this->hora->HrefValue = ""; // titulo $this->titulo->HrefValue = ""; // archivo $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; } elseif ($this->RowType == EW_ROWTYPE_EDIT) { // Edit row // id_tramite $this->id_tramite->EditAttrs["class"] = "form-control"; $this->id_tramite->EditCustomAttributes = ""; if ($this->id_tramite->VirtualValue != "") { $this->id_tramite->ViewValue = $this->id_tramite->VirtualValue; } else { if (strval($this->id_tramite->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tramite->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha` AS `Disp2Fld`, `Titulo` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tramites`"; $sWhereWrk = ""; $lookuptblfilter = "`estado`<>'F'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tramite, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `fecha` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tramite->EditValue = $rswrk->fields('DispFld'); $this->id_tramite->EditValue .= ew_ValueSeparator(1, $this->id_tramite) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7); $this->id_tramite->EditValue .= ew_ValueSeparator(2, $this->id_tramite) . $rswrk->fields('Disp3Fld'); $rswrk->Close(); } else { $this->id_tramite->EditValue = $this->id_tramite->CurrentValue; } } else { $this->id_tramite->EditValue = NULL; } } $this->id_tramite->ViewCustomAttributes = ""; // fecha // hora // titulo $this->titulo->EditAttrs["class"] = "form-control"; $this->titulo->EditCustomAttributes = ""; $this->titulo->EditValue = $this->titulo->CurrentValue; $this->titulo->ViewCustomAttributes = ""; // archivo $this->archivo->EditAttrs["class"] = "form-control"; $this->archivo->EditCustomAttributes = ""; if (!ew_Empty($this->archivo->Upload->DbValue)) { $this->archivo->EditValue = $this->archivo->Upload->DbValue; } else { $this->archivo->EditValue = ""; } $this->archivo->ViewCustomAttributes = ""; // Edit refer script // id_tramite $this->id_tramite->HrefValue = ""; // fecha $this->fecha->HrefValue = ""; // hora $this->hora->HrefValue = ""; // titulo $this->titulo->HrefValue = ""; // archivo $this->archivo->HrefValue = ""; $this->archivo->HrefValue2 = $this->archivo->UploadPath . $this->archivo->Upload->DbValue; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
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 // EvaluateAnswerID // EvAnswer // lastModified // Date // ID if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // EvaluateAnswerID $this->EvaluateAnswerID->ViewValue = $this->EvaluateAnswerID->CurrentValue; $this->EvaluateAnswerID->ViewCustomAttributes = ""; // lastModified $this->lastModified->ViewValue = $this->lastModified->CurrentValue; $this->lastModified->ViewValue = ew_FormatDateTime($this->lastModified->ViewValue, 5); $this->lastModified->ViewCustomAttributes = ""; // Date $this->Date->ViewValue = $this->Date->CurrentValue; $this->Date->ViewValue = ew_FormatDateTime($this->Date->ViewValue, 5); $this->Date->ViewCustomAttributes = ""; // ID if (strval($this->ID->CurrentValue) != "") { $sFilterWrk = "`ID`" . ew_SearchString("=", $this->ID->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `ID`, `Email` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `Users`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->ID, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->ID->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->ID->ViewValue = $this->ID->CurrentValue; } } else { $this->ID->ViewValue = NULL; } $this->ID->ViewCustomAttributes = ""; // EvaluateAnswerID $this->EvaluateAnswerID->LinkCustomAttributes = ""; $this->EvaluateAnswerID->HrefValue = ""; $this->EvaluateAnswerID->TooltipValue = ""; // lastModified $this->lastModified->LinkCustomAttributes = ""; $this->lastModified->HrefValue = ""; $this->lastModified->TooltipValue = ""; // Date $this->Date->LinkCustomAttributes = ""; $this->Date->HrefValue = ""; $this->Date->TooltipValue = ""; // ID $this->ID->LinkCustomAttributes = ""; $this->ID->HrefValue = ""; $this->ID->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs $this->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(); } }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Convert decimal values if posted back if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) { $this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // idservicio_medico_prestado // idcuenta // idservicio_medico // estado // costo // fecha_inicio // fecha_final if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // idservicio_medico_prestado $this->idservicio_medico_prestado->ViewValue = $this->idservicio_medico_prestado->CurrentValue; $this->idservicio_medico_prestado->ViewCustomAttributes = ""; // idcuenta if (strval($this->idcuenta->CurrentValue) != "") { $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idcuenta, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idcuenta->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue; } } else { $this->idcuenta->ViewValue = NULL; } $this->idcuenta->ViewCustomAttributes = ""; // idservicio_medico if (strval($this->idservicio_medico->CurrentValue) != "") { $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue; } } else { $this->idservicio_medico->ViewValue = NULL; } $this->idservicio_medico->ViewCustomAttributes = ""; // estado if (strval($this->estado->CurrentValue) != "") { switch ($this->estado->CurrentValue) { case $this->estado->FldTagValue(1): $this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue; break; case $this->estado->FldTagValue(2): $this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue; break; case $this->estado->FldTagValue(3): $this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue; break; default: $this->estado->ViewValue = $this->estado->CurrentValue; } } else { $this->estado->ViewValue = NULL; } $this->estado->ViewCustomAttributes = ""; // costo $this->costo->ViewValue = $this->costo->CurrentValue; $this->costo->ViewCustomAttributes = ""; // fecha_inicio $this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue; $this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 7); $this->fecha_inicio->ViewCustomAttributes = ""; // fecha_final $this->fecha_final->ViewValue = $this->fecha_final->CurrentValue; $this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 7); $this->fecha_final->ViewCustomAttributes = ""; // idcuenta $this->idcuenta->LinkCustomAttributes = ""; $this->idcuenta->HrefValue = ""; $this->idcuenta->TooltipValue = ""; // idservicio_medico $this->idservicio_medico->LinkCustomAttributes = ""; $this->idservicio_medico->HrefValue = ""; $this->idservicio_medico->TooltipValue = ""; // costo $this->costo->LinkCustomAttributes = ""; $this->costo->HrefValue = ""; $this->costo->TooltipValue = ""; } elseif ($this->RowType == EW_ROWTYPE_ADD) { // Add row // idcuenta $this->idcuenta->EditAttrs["class"] = "form-control"; $this->idcuenta->EditCustomAttributes = ""; if ($this->idcuenta->getSessionValue() != "") { $this->idcuenta->CurrentValue = $this->idcuenta->getSessionValue(); if (strval($this->idcuenta->CurrentValue) != "") { $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `cuenta`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idcuenta, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idcuenta->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idcuenta->ViewValue = $this->idcuenta->CurrentValue; } } else { $this->idcuenta->ViewValue = NULL; } $this->idcuenta->ViewCustomAttributes = ""; } else { if (trim(strval($this->idcuenta->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`idcuenta`" . ew_SearchString("=", $this->idcuenta->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT `idcuenta`, `idcuenta` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `cuenta`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idcuenta, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->idcuenta->EditValue = $arwrk; } // idservicio_medico $this->idservicio_medico->EditAttrs["class"] = "form-control"; $this->idservicio_medico->EditCustomAttributes = ""; if ($this->idservicio_medico->getSessionValue() != "") { $this->idservicio_medico->CurrentValue = $this->idservicio_medico->getSessionValue(); if (strval($this->idservicio_medico->CurrentValue) != "") { $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `servicio_medico`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->idservicio_medico->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->idservicio_medico->ViewValue = $this->idservicio_medico->CurrentValue; } } else { $this->idservicio_medico->ViewValue = NULL; } $this->idservicio_medico->ViewCustomAttributes = ""; } else { if (trim(strval($this->idservicio_medico->CurrentValue)) == "") { $sFilterWrk = "0=1"; } else { $sFilterWrk = "`idservicio_medico`" . ew_SearchString("=", $this->idservicio_medico->CurrentValue, EW_DATATYPE_NUMBER); } $sSqlWrk = "SELECT `idservicio_medico`, `descripcion` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld`, '' AS `SelectFilterFld`, '' AS `SelectFilterFld2`, '' AS `SelectFilterFld3`, '' AS `SelectFilterFld4` FROM `servicio_medico`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->idservicio_medico, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); $arwrk = $rswrk ? $rswrk->GetRows() : array(); if ($rswrk) { $rswrk->Close(); } array_unshift($arwrk, array("", $Language->Phrase("PleaseSelect"), "", "", "", "", "", "", "")); $this->idservicio_medico->EditValue = $arwrk; } // costo $this->costo->EditAttrs["class"] = "form-control"; $this->costo->EditCustomAttributes = ""; $this->costo->EditValue = ew_HtmlEncode($this->costo->CurrentValue); $this->costo->PlaceHolder = ew_RemoveHtml($this->costo->FldCaption()); if (strval($this->costo->EditValue) != "" && is_numeric($this->costo->EditValue)) { $this->costo->EditValue = ew_FormatNumber($this->costo->EditValue, -2, -1, -2, 0); } // Edit refer script // idcuenta $this->idcuenta->HrefValue = ""; // idservicio_medico $this->idservicio_medico->HrefValue = ""; // costo $this->costo->HrefValue = ""; } if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) { // Add / Edit / Search row $this->SetupFieldTitles(); } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderEditRow() { global $conn, $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // id_socio $this->id_socio->EditAttrs["class"] = "form-control"; $this->id_socio->EditCustomAttributes = ""; if ($this->id_socio->getSessionValue() != "") { $this->id_socio->CurrentValue = $this->id_socio->getSessionValue(); if (strval($this->id_socio->CurrentValue) != "") { $sFilterWrk = "`socio_nro`" . ew_SearchString("=", $this->id_socio->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `socio_nro`, `propietario` AS `DispFld`, `comercio` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `socios`"; $sWhereWrk = ""; $lookuptblfilter = "`activo`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_socio, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `propietario` DESC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_socio->ViewValue = $rswrk->fields('DispFld'); $this->id_socio->ViewValue .= ew_ValueSeparator(1, $this->id_socio) . $rswrk->fields('Disp2Fld'); $rswrk->Close(); } else { $this->id_socio->ViewValue = $this->id_socio->CurrentValue; } } else { $this->id_socio->ViewValue = NULL; } $this->id_socio->ViewCustomAttributes = ""; } else { } // id_detalles $this->id_detalles->EditAttrs["class"] = "form-control"; $this->id_detalles->EditCustomAttributes = ""; if ($this->id_detalles->getSessionValue() != "") { $this->id_detalles->CurrentValue = $this->id_detalles->getSessionValue(); if (strval($this->id_detalles->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_detalles->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `nombre` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `detalles`"; $sWhereWrk = ""; $lookuptblfilter = "`activa`='S'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_detalles, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `nombre` DESC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_detalles->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_detalles->ViewValue = $this->id_detalles->CurrentValue; } } else { $this->id_detalles->ViewValue = NULL; } $this->id_detalles->ViewCustomAttributes = ""; } else { } // fecha_alta $this->fecha_alta->EditAttrs["class"] = "form-control"; $this->fecha_alta->EditCustomAttributes = ""; $this->fecha_alta->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_alta->CurrentValue, 7)); $this->fecha_alta->PlaceHolder = ew_RemoveHtml($this->fecha_alta->FldCaption()); // fecha_baja $this->fecha_baja->EditAttrs["class"] = "form-control"; $this->fecha_baja->EditCustomAttributes = ""; $this->fecha_baja->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha_baja->CurrentValue, 7)); $this->fecha_baja->PlaceHolder = ew_RemoveHtml($this->fecha_baja->FldCaption()); // Call Row Rendered event $this->Row_Rendered(); }
function RenderRow() { global $conn, $Security, $Language; global $gsLanguage; // Initialize URLs // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // nilai_id // nis // nip // semester // kelas if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // nilai_id $this->nilai_id->ViewValue = $this->nilai_id->CurrentValue; $this->nilai_id->ViewCustomAttributes = ""; // nis if (strval($this->nis->CurrentValue) != "") { $sFilterWrk = "`id_siswa`" . ew_SearchString("=", $this->nis->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `id_siswa`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `siswa`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->nis, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->nis->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->nis->ViewValue = $this->nis->CurrentValue; } } else { $this->nis->ViewValue = NULL; } $this->nis->ViewCustomAttributes = ""; // nip if (strval($this->nip->CurrentValue) != "") { $sFilterWrk = "`guru_id`" . ew_SearchString("=", $this->nip->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `guru_id`, `nama` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `guru`"; $sWhereWrk = ""; if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->nip, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->nip->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->nip->ViewValue = $this->nip->CurrentValue; } } else { $this->nip->ViewValue = NULL; } $this->nip->ViewCustomAttributes = ""; // semester $this->semester->ViewValue = $this->semester->CurrentValue; $this->semester->ViewCustomAttributes = ""; // kelas $this->kelas->ViewValue = $this->kelas->CurrentValue; $this->kelas->ViewCustomAttributes = ""; // nis $this->nis->LinkCustomAttributes = ""; $this->nis->HrefValue = ""; $this->nis->TooltipValue = ""; // nip $this->nip->LinkCustomAttributes = ""; $this->nip->HrefValue = ""; $this->nip->TooltipValue = ""; // semester $this->semester->LinkCustomAttributes = ""; $this->semester->HrefValue = ""; $this->semester->TooltipValue = ""; // kelas $this->kelas->LinkCustomAttributes = ""; $this->kelas->HrefValue = ""; $this->kelas->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }
function RenderEditRow() { global $conn, $Security, $gsLanguage, $Language; // Call Row Rendering event $this->Row_Rendering(); // codigo $this->codigo->EditAttrs["class"] = "form-control"; $this->codigo->EditCustomAttributes = ""; $this->codigo->EditValue = $this->codigo->CurrentValue; $this->codigo->ViewCustomAttributes = ""; // detalle $this->detalle->EditAttrs["class"] = "form-control"; $this->detalle->EditCustomAttributes = ""; $this->detalle->EditValue = ew_HtmlEncode($this->detalle->CurrentValue); $this->detalle->PlaceHolder = ew_RemoveHtml($this->detalle->FldCaption()); // fecha $this->fecha->EditAttrs["class"] = "form-control"; $this->fecha->EditCustomAttributes = ""; $this->fecha->EditValue = ew_HtmlEncode(ew_FormatDateTime($this->fecha->CurrentValue, 7)); $this->fecha->PlaceHolder = ew_RemoveHtml($this->fecha->FldCaption()); // id_tipo_gasto $this->id_tipo_gasto->EditAttrs["class"] = "form-control"; $this->id_tipo_gasto->EditCustomAttributes = ""; if ($this->id_tipo_gasto->getSessionValue() != "") { $this->id_tipo_gasto->CurrentValue = $this->id_tipo_gasto->getSessionValue(); if ($this->id_tipo_gasto->VirtualValue != "") { $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue; } else { if (strval($this->id_tipo_gasto->CurrentValue) != "") { $sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER); $sSqlWrk = "SELECT `codigo`, `tipo_gasto` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`"; $sWhereWrk = ""; $lookuptblfilter = "`clase`='M'"; if (strval($lookuptblfilter) != "") { ew_AddFilter($sWhereWrk, $lookuptblfilter); } if ($sFilterWrk != "") { ew_AddFilter($sWhereWrk, $sFilterWrk); } // Call Lookup selecting $this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk); if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $sSqlWrk .= " ORDER BY `tipo_gasto` ASC"; $rswrk = $conn->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld'); $rswrk->Close(); } else { $this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue; } } else { $this->id_tipo_gasto->ViewValue = NULL; } } $this->id_tipo_gasto->ViewCustomAttributes = ""; } else { } // id_hoja_mantenimeinto $this->id_hoja_mantenimeinto->EditAttrs["class"] = "form-control"; $this->id_hoja_mantenimeinto->EditCustomAttributes = ""; if ($this->id_hoja_mantenimeinto->getSessionValue() != "") { $this->id_hoja_mantenimeinto->CurrentValue = $this->id_hoja_mantenimeinto->getSessionValue(); $this->id_hoja_mantenimeinto->ViewValue = $this->id_hoja_mantenimeinto->CurrentValue; $this->id_hoja_mantenimeinto->ViewCustomAttributes = ""; } else { $this->id_hoja_mantenimeinto->EditValue = ew_HtmlEncode($this->id_hoja_mantenimeinto->CurrentValue); $this->id_hoja_mantenimeinto->PlaceHolder = ew_RemoveHtml($this->id_hoja_mantenimeinto->FldCaption()); } // id_usuario // Call Row Rendered event $this->Row_Rendered(); }
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 RenderRow() { global $Security, $Language, $gsLanguage; // Initialize URLs $this->AddUrl = $this->GetAddUrl(); $this->EditUrl = $this->GetEditUrl(); $this->CopyUrl = $this->GetCopyUrl(); $this->DeleteUrl = $this->GetDeleteUrl(); $this->ListUrl = $this->GetListUrl(); $this->SetupOtherOptions(); // Convert decimal values if posted back if ($this->ACCOUNT_NUMBER->FormValue == $this->ACCOUNT_NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue))) { $this->ACCOUNT_NUMBER->CurrentValue = ew_StrToFloat($this->ACCOUNT_NUMBER->CurrentValue); } // Call Row_Rendering event $this->Row_Rendering(); // Common render codes for all row types // BANK_ACCOUNT_ID // CODE // DESCRIPTION // ACCOUNT_NUMBER // BANK_ID // ACTIVE if ($this->RowType == EW_ROWTYPE_VIEW) { // View row // CODE $this->CODE->ViewValue = $this->CODE->CurrentValue; $this->CODE->ViewCustomAttributes = ""; // DESCRIPTION $this->DESCRIPTION->ViewValue = $this->DESCRIPTION->CurrentValue; $this->DESCRIPTION->ViewCustomAttributes = ""; // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->ViewValue = $this->ACCOUNT_NUMBER->CurrentValue; $this->ACCOUNT_NUMBER->ViewCustomAttributes = ""; // BANK_ID if (strval($this->BANK_ID->CurrentValue) != "") { $sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, ""); switch (@$gsLanguage) { case "es": $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`"; $sWhereWrk = ""; break; default: $sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`"; $sWhereWrk = ""; break; } ew_AddFilter($sWhereWrk, $sFilterWrk); $this->Lookup_Selecting($this->BANK_ID, $sWhereWrk); // Call Lookup selecting if ($sWhereWrk != "") { $sSqlWrk .= " WHERE " . $sWhereWrk; } $rswrk = Conn()->Execute($sSqlWrk); if ($rswrk && !$rswrk->EOF) { // Lookup values found $arwrk = array(); $arwrk[1] = $rswrk->fields('DispFld'); $this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk); $rswrk->Close(); } else { $this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue; } } else { $this->BANK_ID->ViewValue = NULL; } $this->BANK_ID->ViewCustomAttributes = ""; // ACTIVE if (strval($this->ACTIVE->CurrentValue) != "") { $this->ACTIVE->ViewValue = $this->ACTIVE->OptionCaption($this->ACTIVE->CurrentValue); } else { $this->ACTIVE->ViewValue = NULL; } $this->ACTIVE->ViewCustomAttributes = ""; // CODE $this->CODE->LinkCustomAttributes = ""; $this->CODE->HrefValue = ""; $this->CODE->TooltipValue = ""; // DESCRIPTION $this->DESCRIPTION->LinkCustomAttributes = ""; $this->DESCRIPTION->HrefValue = ""; $this->DESCRIPTION->TooltipValue = ""; // ACCOUNT_NUMBER $this->ACCOUNT_NUMBER->LinkCustomAttributes = ""; $this->ACCOUNT_NUMBER->HrefValue = ""; $this->ACCOUNT_NUMBER->TooltipValue = ""; // BANK_ID $this->BANK_ID->LinkCustomAttributes = ""; $this->BANK_ID->HrefValue = ""; $this->BANK_ID->TooltipValue = ""; // ACTIVE $this->ACTIVE->LinkCustomAttributes = ""; $this->ACTIVE->HrefValue = ""; $this->ACTIVE->TooltipValue = ""; } // Call Row Rendered event if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) { $this->Row_Rendered(); } }