本文整理汇总了PHP中ew_StrToFloat函数的典型用法代码示例。如果您正苦于以下问题:PHP ew_StrToFloat函数的具体用法?PHP ew_StrToFloat怎么用?PHP ew_StrToFloat使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ew_StrToFloat函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->importe->FormValue == $this->importe->CurrentValue && is_numeric(ew_StrToFloat($this->importe->CurrentValue))) {
$this->importe->CurrentValue = ew_StrToFloat($this->importe->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// id_deuda
// detalle
// importe
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// id_deuda
if (strval($this->id_deuda->CurrentValue) != "") {
$sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
$sWhereWrk = "";
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
// Call Lookup selecting
$this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->id_deuda->ViewValue = $rswrk->fields('DispFld');
$this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
$this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
$rswrk->Close();
} else {
$this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
}
} else {
$this->id_deuda->ViewValue = NULL;
}
$this->id_deuda->ViewCustomAttributes = "";
// detalle
$this->detalle->ViewValue = $this->detalle->CurrentValue;
$this->detalle->ViewCustomAttributes = "";
// importe
$this->importe->ViewValue = $this->importe->CurrentValue;
$this->importe->ViewValue = ew_FormatCurrency($this->importe->ViewValue, 2, -2, -2, -2);
$this->importe->ViewCustomAttributes = "";
// id_deuda
$this->id_deuda->LinkCustomAttributes = "";
$this->id_deuda->HrefValue = "";
$this->id_deuda->TooltipValue = "";
// detalle
$this->detalle->LinkCustomAttributes = "";
$this->detalle->HrefValue = "";
$this->detalle->TooltipValue = "";
// importe
$this->importe->LinkCustomAttributes = "";
$this->importe->HrefValue = "";
$this->importe->TooltipValue = "";
} elseif ($this->RowType == EW_ROWTYPE_ADD) {
// Add row
// id_deuda
$this->id_deuda->EditAttrs["class"] = "form-control";
$this->id_deuda->EditCustomAttributes = "";
if ($this->id_deuda->getSessionValue() != "") {
$this->id_deuda->CurrentValue = $this->id_deuda->getSessionValue();
$this->id_deuda->OldValue = $this->id_deuda->CurrentValue;
if (strval($this->id_deuda->CurrentValue) != "") {
$sFilterWrk = "`id`" . ew_SearchString("=", $this->id_deuda->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT `id`, `mes` AS `DispFld`, `anio` AS `Disp2Fld`, `monto` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `deudas`";
$sWhereWrk = "";
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
// Call Lookup selecting
$this->Lookup_Selecting($this->id_deuda, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->id_deuda->ViewValue = $rswrk->fields('DispFld');
$this->id_deuda->ViewValue .= ew_ValueSeparator(1, $this->id_deuda) . $rswrk->fields('Disp2Fld');
$this->id_deuda->ViewValue .= ew_ValueSeparator(2, $this->id_deuda) . ew_FormatCurrency($rswrk->fields('Disp3Fld'), 0, -2, -2, -2);
$rswrk->Close();
} else {
$this->id_deuda->ViewValue = $this->id_deuda->CurrentValue;
}
} else {
$this->id_deuda->ViewValue = NULL;
}
$this->id_deuda->ViewCustomAttributes = "";
} else {
if (trim(strval($this->id_deuda->CurrentValue)) == "") {
$sFilterWrk = "0=1";
//.........这里部分代码省略.........
示例2: RenderRow
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
//.........这里部分代码省略.........
示例3: RenderRow
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 = "";
//.........这里部分代码省略.........
示例4: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
$this->ViewUrl = $this->GetViewUrl();
$this->EditUrl = $this->GetEditUrl();
$this->InlineEditUrl = $this->GetInlineEditUrl();
$this->CopyUrl = $this->GetCopyUrl();
$this->InlineCopyUrl = $this->GetInlineCopyUrl();
$this->DeleteUrl = $this->GetDeleteUrl();
// Convert decimal values if posted back
if ($this->tarifa->FormValue == $this->tarifa->CurrentValue && is_numeric(ew_StrToFloat($this->tarifa->CurrentValue))) {
$this->tarifa->CurrentValue = ew_StrToFloat($this->tarifa->CurrentValue);
}
// Convert decimal values if posted back
if ($this->sub_total->FormValue == $this->sub_total->CurrentValue && is_numeric(ew_StrToFloat($this->sub_total->CurrentValue))) {
$this->sub_total->CurrentValue = ew_StrToFloat($this->sub_total->CurrentValue);
}
// Convert decimal values if posted back
if ($this->porcentaje->FormValue == $this->porcentaje->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje->CurrentValue))) {
$this->porcentaje->CurrentValue = ew_StrToFloat($this->porcentaje->CurrentValue);
}
// Convert decimal values if posted back
if ($this->comision_chofer->FormValue == $this->comision_chofer->CurrentValue && is_numeric(ew_StrToFloat($this->comision_chofer->CurrentValue))) {
$this->comision_chofer->CurrentValue = ew_StrToFloat($this->comision_chofer->CurrentValue);
}
// Convert decimal values if posted back
if ($this->adelanto->FormValue == $this->adelanto->CurrentValue && is_numeric(ew_StrToFloat($this->adelanto->CurrentValue))) {
$this->adelanto->CurrentValue = ew_StrToFloat($this->adelanto->CurrentValue);
}
// Convert decimal values if posted back
if ($this->total->FormValue == $this->total->CurrentValue && is_numeric(ew_StrToFloat($this->total->CurrentValue))) {
$this->total->CurrentValue = ew_StrToFloat($this->total->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// codigo
// responsable
// Patente
// kg_carga
// tarifa
// sub_total
// porcentaje
// comision_chofer
// adelanto
// total
// Accumulate aggregate value
if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
if (is_numeric($this->sub_total->CurrentValue)) {
$this->sub_total->Total += $this->sub_total->CurrentValue;
}
// Accumulate total
if (is_numeric($this->comision_chofer->CurrentValue)) {
$this->comision_chofer->Total += $this->comision_chofer->CurrentValue;
}
// Accumulate total
if (is_numeric($this->total->CurrentValue)) {
$this->total->Total += $this->total->CurrentValue;
}
// Accumulate total
}
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// codigo
$this->codigo->ViewValue = $this->codigo->CurrentValue;
$this->codigo->ViewCustomAttributes = "";
// responsable
$this->responsable->ViewValue = $this->responsable->CurrentValue;
$this->responsable->ViewCustomAttributes = "";
// Patente
$this->Patente->ViewValue = $this->Patente->CurrentValue;
$this->Patente->ViewCustomAttributes = "";
// kg_carga
$this->kg_carga->ViewValue = $this->kg_carga->CurrentValue;
$this->kg_carga->ViewValue = ew_FormatNumber($this->kg_carga->ViewValue, 2, -2, -2, -2);
$this->kg_carga->ViewCustomAttributes = "";
// tarifa
$this->tarifa->ViewValue = $this->tarifa->CurrentValue;
$this->tarifa->ViewValue = ew_FormatCurrency($this->tarifa->ViewValue, 2, -2, -2, -2);
$this->tarifa->ViewCustomAttributes = "";
// sub_total
$this->sub_total->ViewValue = $this->sub_total->CurrentValue;
$this->sub_total->ViewValue = ew_FormatCurrency($this->sub_total->ViewValue, 2, -2, -2, -2);
$this->sub_total->ViewCustomAttributes = "";
// porcentaje
$this->porcentaje->ViewValue = $this->porcentaje->CurrentValue;
$this->porcentaje->ViewValue = ew_FormatPercent($this->porcentaje->ViewValue, 2, -2, -2, -2);
$this->porcentaje->ViewCustomAttributes = "";
// comision_chofer
$this->comision_chofer->ViewValue = $this->comision_chofer->CurrentValue;
$this->comision_chofer->ViewValue = ew_FormatCurrency($this->comision_chofer->ViewValue, 2, -2, -1, -2);
$this->comision_chofer->ViewCustomAttributes = "";
// adelanto
$this->adelanto->ViewValue = $this->adelanto->CurrentValue;
$this->adelanto->ViewValue = ew_FormatCurrency($this->adelanto->ViewValue, 2, -2, -2, -2);
$this->adelanto->ViewCustomAttributes = "";
// total
$this->total->ViewValue = $this->total->CurrentValue;
//.........这里部分代码省略.........
示例5: RenderRow
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());
//.........这里部分代码省略.........
示例6: SetDbValueDef
function SetDbValueDef(&$rs, $value, $default, $skip = FALSE)
{
if ($skip && strval($value) == "" || !$this->Visible || $this->Disabled) {
return;
}
switch ($this->FldType) {
case 2:
case 3:
case 16:
case 17:
case 18:
// Integer
$value = trim($value);
$DbValue = is_numeric($value) ? intval($value) : $default;
break;
case 19:
case 20:
case 21:
// Big integer
$value = trim($value);
$DbValue = is_numeric($value) ? $value : $default;
break;
case 5:
case 6:
case 14:
case 131:
// Double
// Double
case 139:
case 4:
// Single
$value = trim($value);
$value = ew_StrToFloat($value);
$DbValue = is_numeric($value) ? $value : $default;
break;
case 7:
case 133:
case 134:
case 135:
// Date
// Date
case 141:
// XML
// XML
case 145:
// Time
// Time
case 146:
// DateTiemOffset
// DateTiemOffset
case 201:
case 203:
case 129:
case 130:
case 200:
case 202:
// String
$value = trim($value);
$DbValue = $value == "" ? $default : $value;
break;
case 128:
case 204:
case 205:
// Binary
$DbValue = is_null($value) ? $default : $value;
break;
case 72:
// GUID
$value = trim($value);
$DbValue = $value != "" && ew_CheckGUID($value) ? $value : $default;
break;
case 11:
// Boolean
$DbValue = is_bool($value) || is_numeric($value) ? $value : $default;
break;
default:
$DbValue = $value;
}
$this->setDbValue($DbValue);
$rs[$this->FldName] = $this->DbValue;
}
示例7: RenderRow
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) {
//.........这里部分代码省略.........
示例8: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->precio->FormValue == $this->precio->CurrentValue && is_numeric(ew_StrToFloat($this->precio->CurrentValue))) {
$this->precio->CurrentValue = ew_StrToFloat($this->precio->CurrentValue);
}
// Convert decimal values if posted back
if ($this->entrega->FormValue == $this->entrega->CurrentValue && is_numeric(ew_StrToFloat($this->entrega->CurrentValue))) {
$this->entrega->CurrentValue = ew_StrToFloat($this->entrega->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// nro_orden
// fecha_recepcion
// cliente
// id_tipo_cliente
// tel
// cel
// objetos
// detalle_a_realizar
// fecha_entrega
// observaciones
// id_estado
// precio
// entrega
// saldo
// foto1
// foto2
// usuario
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// nro_orden
$this->nro_orden->ViewValue = $this->nro_orden->CurrentValue;
$this->nro_orden->ViewCustomAttributes = "";
// fecha_recepcion
$this->fecha_recepcion->ViewValue = $this->fecha_recepcion->CurrentValue;
$this->fecha_recepcion->ViewValue = ew_FormatDateTime($this->fecha_recepcion->ViewValue, 7);
$this->fecha_recepcion->ViewCustomAttributes = "";
// cliente
$this->cliente->ViewValue = $this->cliente->CurrentValue;
$this->cliente->ViewCustomAttributes = "";
// id_tipo_cliente
if (strval($this->id_tipo_cliente->CurrentValue) != "") {
$sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_cliente->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT DISTINCT `codigo`, `tipo_cliente` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_clientes`";
$sWhereWrk = "";
$lookuptblfilter = "`activo`='S'";
if (strval($lookuptblfilter) != "") {
ew_AddFilter($sWhereWrk, $lookuptblfilter);
}
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
// Call Lookup selecting
$this->Lookup_Selecting($this->id_tipo_cliente, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$sSqlWrk .= " ORDER BY `tipo_cliente` ASC";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->id_tipo_cliente->ViewValue = $rswrk->fields('DispFld');
$rswrk->Close();
} else {
$this->id_tipo_cliente->ViewValue = $this->id_tipo_cliente->CurrentValue;
}
} else {
$this->id_tipo_cliente->ViewValue = NULL;
}
$this->id_tipo_cliente->ViewCustomAttributes = "";
// tel
$this->tel->ViewValue = $this->tel->CurrentValue;
$this->tel->ViewCustomAttributes = "";
// cel
$this->cel->ViewValue = $this->cel->CurrentValue;
$this->cel->ViewCustomAttributes = "";
// objetos
$this->objetos->ViewValue = $this->objetos->CurrentValue;
$this->objetos->ViewCustomAttributes = "";
// detalle_a_realizar
$this->detalle_a_realizar->ViewValue = $this->detalle_a_realizar->CurrentValue;
$this->detalle_a_realizar->ViewCustomAttributes = "";
// fecha_entrega
$this->fecha_entrega->ViewValue = $this->fecha_entrega->CurrentValue;
$this->fecha_entrega->ViewValue = ew_FormatDateTime($this->fecha_entrega->ViewValue, 7);
$this->fecha_entrega->ViewCustomAttributes = "";
// observaciones
$this->observaciones->ViewValue = $this->observaciones->CurrentValue;
$this->observaciones->ViewCustomAttributes = "";
// id_estado
if (strval($this->id_estado->CurrentValue) != "") {
$sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_estado->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT DISTINCT `codigo`, `estado` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `estados`";
$sWhereWrk = "";
$lookuptblfilter = "`activo`='S'";
//.........这里部分代码省略.........
示例9: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
$this->AddUrl = $this->GetAddUrl();
$this->EditUrl = $this->GetEditUrl();
$this->CopyUrl = $this->GetCopyUrl();
$this->DeleteUrl = $this->GetDeleteUrl();
$this->ListUrl = $this->GetListUrl();
// Convert decimal values if posted back
if ($this->teacher_rate->FormValue == $this->teacher_rate->CurrentValue && is_numeric(ew_StrToFloat($this->teacher_rate->CurrentValue))) {
$this->teacher_rate->CurrentValue = ew_StrToFloat($this->teacher_rate->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// teacher_id
// teacher_name
// teacher_personal_page
// teacher_avatar
// teacher_description
// teacher_work_place
// teacher_active
// teacher_acadamic_title
// teacher_birthday
// teacher_sex
// teacher_faculty
// teacher_dept
// teacher_rate
// teacher_personality
// advices
// teacher_research
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// teacher_id
$this->teacher_id->ViewValue = $this->teacher_id->CurrentValue;
$this->teacher_id->ViewCustomAttributes = "";
// teacher_name
$this->teacher_name->ViewValue = $this->teacher_name->CurrentValue;
$this->teacher_name->ViewCustomAttributes = "";
// teacher_personal_page
$this->teacher_personal_page->ViewValue = $this->teacher_personal_page->CurrentValue;
$this->teacher_personal_page->ViewCustomAttributes = "";
// teacher_avatar
$this->teacher_avatar->UploadPath = 'themes\\classic\\assets\\img\\Teacher_img';
if (!ew_Empty($this->teacher_avatar->Upload->DbValue)) {
$this->teacher_avatar->ImageAlt = $this->teacher_avatar->FldAlt();
$this->teacher_avatar->ViewValue = ew_UploadPathEx(FALSE, $this->teacher_avatar->UploadPath) . $this->teacher_avatar->Upload->DbValue;
} else {
$this->teacher_avatar->ViewValue = "";
}
$this->teacher_avatar->ViewCustomAttributes = "";
// teacher_description
$this->teacher_description->ViewValue = $this->teacher_description->CurrentValue;
$this->teacher_description->ViewCustomAttributes = "";
// teacher_work_place
$this->teacher_work_place->ViewValue = $this->teacher_work_place->CurrentValue;
$this->teacher_work_place->ViewCustomAttributes = "";
// teacher_active
$this->teacher_active->ViewValue = $this->teacher_active->CurrentValue;
$this->teacher_active->ViewCustomAttributes = "";
// teacher_acadamic_title
$this->teacher_acadamic_title->ViewValue = $this->teacher_acadamic_title->CurrentValue;
$this->teacher_acadamic_title->ViewCustomAttributes = "";
// teacher_birthday
$this->teacher_birthday->ViewValue = $this->teacher_birthday->CurrentValue;
$this->teacher_birthday->ViewCustomAttributes = "";
// teacher_sex
$this->teacher_sex->ViewValue = $this->teacher_sex->CurrentValue;
$this->teacher_sex->ViewCustomAttributes = "";
// teacher_faculty
if (strval($this->teacher_faculty->CurrentValue) != "") {
$sFilterWrk = "`faculty_id`" . ew_SearchString("=", $this->teacher_faculty->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT `faculty_id`, `faculty_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_faculty`";
$sWhereWrk = "";
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->teacher_faculty->ViewValue = $rswrk->fields('DispFld');
$rswrk->Close();
} else {
$this->teacher_faculty->ViewValue = $this->teacher_faculty->CurrentValue;
}
} else {
$this->teacher_faculty->ViewValue = NULL;
}
$this->teacher_faculty->ViewCustomAttributes = "";
// teacher_dept
if (strval($this->teacher_dept->CurrentValue) != "") {
$sFilterWrk = "`dept_id`" . ew_SearchString("=", $this->teacher_dept->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT `dept_id`, `dept_name` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tbl_dept`";
$sWhereWrk = "";
if ($sFilterWrk != "") {
//.........这里部分代码省略.........
示例10: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
$this->ViewUrl = $this->GetViewUrl();
$this->EditUrl = $this->GetEditUrl();
$this->InlineEditUrl = $this->GetInlineEditUrl();
$this->CopyUrl = $this->GetCopyUrl();
$this->InlineCopyUrl = $this->GetInlineCopyUrl();
$this->DeleteUrl = $this->GetDeleteUrl();
// Convert decimal values if posted back
if ($this->total_gasto->FormValue == $this->total_gasto->CurrentValue && is_numeric(ew_StrToFloat($this->total_gasto->CurrentValue))) {
$this->total_gasto->CurrentValue = ew_StrToFloat($this->total_gasto->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// responsable
// cuit_cuil
// razon_social
// Patente
// marca
// Tipo_carga
// Origen
// prov_desde
// loc_desde
// cp_desde
// Destino
// prov_hasta
// loc_hasta
// cp_hasta
// fecha_ini
// Km_ini
// fecha_fin
// km_fin
// estado
// nom_chofer
// nom_guarda
// total_gasto
// Accumulate aggregate value
if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT && $this->RowType != EW_ROWTYPE_AGGREGATE) {
if (is_numeric($this->total_gasto->CurrentValue)) {
$this->total_gasto->Total += $this->total_gasto->CurrentValue;
}
// Accumulate total
}
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// responsable
$this->responsable->ViewValue = $this->responsable->CurrentValue;
$this->responsable->ViewCustomAttributes = "";
// cuit_cuil
$this->cuit_cuil->ViewValue = $this->cuit_cuil->CurrentValue;
$this->cuit_cuil->ViewCustomAttributes = "";
// razon_social
$this->razon_social->ViewValue = $this->razon_social->CurrentValue;
$this->razon_social->ViewCustomAttributes = "";
// Patente
$this->Patente->ViewValue = $this->Patente->CurrentValue;
$this->Patente->ViewCustomAttributes = "";
// marca
$this->marca->ViewValue = $this->marca->CurrentValue;
$this->marca->ViewCustomAttributes = "";
// Tipo_carga
$this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
$this->Tipo_carga->ViewCustomAttributes = "";
// Origen
$this->Origen->ViewValue = $this->Origen->CurrentValue;
$this->Origen->ViewCustomAttributes = "";
// prov_desde
$this->prov_desde->ViewValue = $this->prov_desde->CurrentValue;
$this->prov_desde->ViewCustomAttributes = "";
// loc_desde
$this->loc_desde->ViewValue = $this->loc_desde->CurrentValue;
$this->loc_desde->ViewCustomAttributes = "";
// cp_desde
$this->cp_desde->ViewValue = $this->cp_desde->CurrentValue;
$this->cp_desde->ViewCustomAttributes = "";
// Destino
$this->Destino->ViewValue = $this->Destino->CurrentValue;
$this->Destino->ViewCustomAttributes = "";
// prov_hasta
$this->prov_hasta->ViewValue = $this->prov_hasta->CurrentValue;
$this->prov_hasta->ViewCustomAttributes = "";
// loc_hasta
$this->loc_hasta->ViewValue = $this->loc_hasta->CurrentValue;
$this->loc_hasta->ViewCustomAttributes = "";
// cp_hasta
$this->cp_hasta->ViewValue = $this->cp_hasta->CurrentValue;
$this->cp_hasta->ViewCustomAttributes = "";
// fecha_ini
$this->fecha_ini->ViewValue = $this->fecha_ini->CurrentValue;
$this->fecha_ini->ViewValue = ew_FormatDateTime($this->fecha_ini->ViewValue, 7);
$this->fecha_ini->ViewCustomAttributes = "";
// Km_ini
$this->Km_ini->ViewValue = $this->Km_ini->CurrentValue;
$this->Km_ini->ViewCustomAttributes = "";
// fecha_fin
$this->fecha_fin->ViewValue = $this->fecha_fin->CurrentValue;
//.........这里部分代码省略.........
示例11: SearchValueIsNumeric
function SearchValueIsNumeric($Fld, $Value)
{
if (ew_IsFloatFormat($Fld->FldType)) {
$Value = ew_StrToFloat($Value);
}
return is_numeric($Value);
}
示例12: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->Importe->FormValue == $this->Importe->CurrentValue && is_numeric(ew_StrToFloat($this->Importe->CurrentValue))) {
$this->Importe->CurrentValue = ew_StrToFloat($this->Importe->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// codigo
// fecha
// detalles
// Importe
// id_tipo_gasto
// id_hoja_ruta
// id_usuario
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// codigo
$this->codigo->ViewValue = $this->codigo->CurrentValue;
$this->codigo->ViewCustomAttributes = "";
// fecha
$this->fecha->ViewValue = $this->fecha->CurrentValue;
$this->fecha->ViewValue = ew_FormatDateTime($this->fecha->ViewValue, 7);
$this->fecha->ViewCustomAttributes = "";
// detalles
$this->detalles->ViewValue = $this->detalles->CurrentValue;
$this->detalles->ViewCustomAttributes = "";
// Importe
$this->Importe->ViewValue = $this->Importe->CurrentValue;
$this->Importe->ViewValue = ew_FormatCurrency($this->Importe->ViewValue, 2, 0, 0, -1);
$this->Importe->ViewCustomAttributes = "";
// id_tipo_gasto
if ($this->id_tipo_gasto->VirtualValue != "") {
$this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->VirtualValue;
} else {
if (strval($this->id_tipo_gasto->CurrentValue) != "") {
$sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_tipo_gasto->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT DISTINCT `codigo`, `codigo` AS `DispFld`, `tipo_gasto` AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `tipo_gastos`";
$sWhereWrk = "";
$lookuptblfilter = "`clase`='R'";
if (strval($lookuptblfilter) != "") {
ew_AddFilter($sWhereWrk, $lookuptblfilter);
}
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
// Call Lookup selecting
$this->Lookup_Selecting($this->id_tipo_gasto, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$sSqlWrk .= " ORDER BY `tipo_gasto` ASC";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->id_tipo_gasto->ViewValue = $rswrk->fields('DispFld');
$this->id_tipo_gasto->ViewValue .= ew_ValueSeparator(1, $this->id_tipo_gasto) . $rswrk->fields('Disp2Fld');
$rswrk->Close();
} else {
$this->id_tipo_gasto->ViewValue = $this->id_tipo_gasto->CurrentValue;
}
} else {
$this->id_tipo_gasto->ViewValue = NULL;
}
}
$this->id_tipo_gasto->ViewCustomAttributes = "";
// id_hoja_ruta
if ($this->id_hoja_ruta->VirtualValue != "") {
$this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->VirtualValue;
} else {
$this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
if (strval($this->id_hoja_ruta->CurrentValue) != "") {
$sFilterWrk = "`codigo`" . ew_SearchString("=", $this->id_hoja_ruta->CurrentValue, EW_DATATYPE_NUMBER);
$sSqlWrk = "SELECT `codigo`, `codigo` AS `DispFld`, `fecha_ini` AS `Disp2Fld`, `Origen` AS `Disp3Fld`, '' AS `Disp4Fld` FROM `hoja_rutas`";
$sWhereWrk = "";
if ($sFilterWrk != "") {
ew_AddFilter($sWhereWrk, $sFilterWrk);
}
// Call Lookup selecting
$this->Lookup_Selecting($this->id_hoja_ruta, $sWhereWrk);
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$sSqlWrk .= " ORDER BY `codigo` ASC";
$rswrk = $conn->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$this->id_hoja_ruta->ViewValue = $rswrk->fields('DispFld');
$this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(1, $this->id_hoja_ruta) . ew_FormatDateTime($rswrk->fields('Disp2Fld'), 7);
$this->id_hoja_ruta->ViewValue .= ew_ValueSeparator(2, $this->id_hoja_ruta) . $rswrk->fields('Disp3Fld');
$rswrk->Close();
} else {
$this->id_hoja_ruta->ViewValue = $this->id_hoja_ruta->CurrentValue;
}
} else {
$this->id_hoja_ruta->ViewValue = NULL;
//.........这里部分代码省略.........
示例13: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->precio_base->FormValue == $this->precio_base->CurrentValue && is_numeric(ew_StrToFloat($this->precio_base->CurrentValue))) {
$this->precio_base->CurrentValue = ew_StrToFloat($this->precio_base->CurrentValue);
}
// Convert decimal values if posted back
if ($this->porcentaje_comision->FormValue == $this->porcentaje_comision->CurrentValue && is_numeric(ew_StrToFloat($this->porcentaje_comision->CurrentValue))) {
$this->porcentaje_comision->CurrentValue = ew_StrToFloat($this->porcentaje_comision->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// codigo
// Tipo_carga
// precio_base
// porcentaje_comision
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// codigo
$this->codigo->ViewValue = $this->codigo->CurrentValue;
$this->codigo->ViewCustomAttributes = "";
// Tipo_carga
$this->Tipo_carga->ViewValue = $this->Tipo_carga->CurrentValue;
$this->Tipo_carga->ViewCustomAttributes = "";
// precio_base
$this->precio_base->ViewValue = $this->precio_base->CurrentValue;
$this->precio_base->ViewValue = ew_FormatCurrency($this->precio_base->ViewValue, 2, 0, 0, -1);
$this->precio_base->ViewCustomAttributes = "";
// porcentaje_comision
$this->porcentaje_comision->ViewValue = $this->porcentaje_comision->CurrentValue;
$this->porcentaje_comision->ViewCustomAttributes = "";
// Tipo_carga
$this->Tipo_carga->LinkCustomAttributes = "";
$this->Tipo_carga->HrefValue = "";
$this->Tipo_carga->TooltipValue = "";
// precio_base
$this->precio_base->LinkCustomAttributes = "";
$this->precio_base->HrefValue = "";
$this->precio_base->TooltipValue = "";
// porcentaje_comision
$this->porcentaje_comision->LinkCustomAttributes = "";
$this->porcentaje_comision->HrefValue = "";
$this->porcentaje_comision->TooltipValue = "";
} elseif ($this->RowType == EW_ROWTYPE_EDIT) {
// Edit row
// Tipo_carga
$this->Tipo_carga->EditAttrs["class"] = "form-control";
$this->Tipo_carga->EditCustomAttributes = "";
$this->Tipo_carga->EditValue = $this->Tipo_carga->CurrentValue;
$this->Tipo_carga->ViewCustomAttributes = "";
// precio_base
$this->precio_base->EditAttrs["class"] = "form-control";
$this->precio_base->EditCustomAttributes = "";
$this->precio_base->EditValue = $this->precio_base->CurrentValue;
$this->precio_base->EditValue = ew_FormatCurrency($this->precio_base->EditValue, 2, 0, 0, -1);
$this->precio_base->ViewCustomAttributes = "";
// porcentaje_comision
$this->porcentaje_comision->EditAttrs["class"] = "form-control";
$this->porcentaje_comision->EditCustomAttributes = "";
$this->porcentaje_comision->EditValue = ew_HtmlEncode($this->porcentaje_comision->CurrentValue);
$this->porcentaje_comision->PlaceHolder = ew_RemoveHtml($this->porcentaje_comision->FldCaption());
if (strval($this->porcentaje_comision->EditValue) != "" && is_numeric($this->porcentaje_comision->EditValue)) {
$this->porcentaje_comision->EditValue = ew_FormatNumber($this->porcentaje_comision->EditValue, -2, -1, -2, 0);
}
// Edit refer script
// Tipo_carga
$this->Tipo_carga->HrefValue = "";
// precio_base
$this->precio_base->HrefValue = "";
// porcentaje_comision
$this->porcentaje_comision->HrefValue = "";
}
if ($this->RowType == EW_ROWTYPE_ADD || $this->RowType == EW_ROWTYPE_EDIT || $this->RowType == EW_ROWTYPE_SEARCH) {
// Add / Edit / Search row
$this->SetupFieldTitles();
}
// Call Row Rendered event
if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
$this->Row_Rendered();
}
}
示例14: RenderRow
function RenderRow()
{
global $conn, $Security, $Language;
global $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->costo->FormValue == $this->costo->CurrentValue && is_numeric(ew_StrToFloat($this->costo->CurrentValue))) {
$this->costo->CurrentValue = ew_StrToFloat($this->costo->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// idconsulta
// fecha_cita
// iddoctor
// costo
// fecha_inicio
// fecha_final
// estado
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// idconsulta
$this->idconsulta->ViewValue = $this->idconsulta->CurrentValue;
$this->idconsulta->ViewCustomAttributes = "";
// fecha_cita
$this->fecha_cita->ViewValue = $this->fecha_cita->CurrentValue;
$this->fecha_cita->ViewValue = ew_FormatDateTime($this->fecha_cita->ViewValue, 5);
$this->fecha_cita->ViewCustomAttributes = "";
// iddoctor
$this->iddoctor->ViewValue = $this->iddoctor->CurrentValue;
$this->iddoctor->ViewCustomAttributes = "";
// costo
$this->costo->ViewValue = $this->costo->CurrentValue;
$this->costo->ViewCustomAttributes = "";
// fecha_inicio
$this->fecha_inicio->ViewValue = $this->fecha_inicio->CurrentValue;
$this->fecha_inicio->ViewValue = ew_FormatDateTime($this->fecha_inicio->ViewValue, 5);
$this->fecha_inicio->ViewCustomAttributes = "";
// fecha_final
$this->fecha_final->ViewValue = $this->fecha_final->CurrentValue;
$this->fecha_final->ViewValue = ew_FormatDateTime($this->fecha_final->ViewValue, 5);
$this->fecha_final->ViewCustomAttributes = "";
// estado
if (strval($this->estado->CurrentValue) != "") {
switch ($this->estado->CurrentValue) {
case $this->estado->FldTagValue(1):
$this->estado->ViewValue = $this->estado->FldTagCaption(1) != "" ? $this->estado->FldTagCaption(1) : $this->estado->CurrentValue;
break;
case $this->estado->FldTagValue(2):
$this->estado->ViewValue = $this->estado->FldTagCaption(2) != "" ? $this->estado->FldTagCaption(2) : $this->estado->CurrentValue;
break;
case $this->estado->FldTagValue(3):
$this->estado->ViewValue = $this->estado->FldTagCaption(3) != "" ? $this->estado->FldTagCaption(3) : $this->estado->CurrentValue;
break;
default:
$this->estado->ViewValue = $this->estado->CurrentValue;
}
} else {
$this->estado->ViewValue = NULL;
}
$this->estado->ViewCustomAttributes = "";
// idconsulta
$this->idconsulta->LinkCustomAttributes = "";
$this->idconsulta->HrefValue = "";
$this->idconsulta->TooltipValue = "";
// fecha_cita
$this->fecha_cita->LinkCustomAttributes = "";
$this->fecha_cita->HrefValue = "";
$this->fecha_cita->TooltipValue = "";
// iddoctor
$this->iddoctor->LinkCustomAttributes = "";
$this->iddoctor->HrefValue = "";
$this->iddoctor->TooltipValue = "";
// costo
$this->costo->LinkCustomAttributes = "";
$this->costo->HrefValue = "";
$this->costo->TooltipValue = "";
// fecha_inicio
$this->fecha_inicio->LinkCustomAttributes = "";
$this->fecha_inicio->HrefValue = "";
$this->fecha_inicio->TooltipValue = "";
// fecha_final
$this->fecha_final->LinkCustomAttributes = "";
$this->fecha_final->HrefValue = "";
$this->fecha_final->TooltipValue = "";
// estado
$this->estado->LinkCustomAttributes = "";
$this->estado->HrefValue = "";
$this->estado->TooltipValue = "";
}
// Call Row Rendered event
if ($this->RowType != EW_ROWTYPE_AGGREGATEINIT) {
$this->Row_Rendered();
}
}
示例15: RenderRow
function RenderRow()
{
global $Security, $Language, $gsLanguage;
// Initialize URLs
// Convert decimal values if posted back
if ($this->NUMBER->FormValue == $this->NUMBER->CurrentValue && is_numeric(ew_StrToFloat($this->NUMBER->CurrentValue))) {
$this->NUMBER->CurrentValue = ew_StrToFloat($this->NUMBER->CurrentValue);
}
// Call Row_Rendering event
$this->Row_Rendering();
// Common render codes for all row types
// CARD_ID
// NAME_IN_CARD
// NUMBER
// CARD_TYPE_ID
// USER_ID
$this->USER_ID->CellCssStyle = "white-space: nowrap;";
// BANK_ID
// VALID_THRU_MONTH
// VALID_THRU_YEAR
if ($this->RowType == EW_ROWTYPE_VIEW) {
// View row
// NAME_IN_CARD
$this->NAME_IN_CARD->ViewValue = $this->NAME_IN_CARD->CurrentValue;
$this->NAME_IN_CARD->ViewCustomAttributes = "";
// NUMBER
$this->NUMBER->ViewValue = $this->NUMBER->CurrentValue;
$this->NUMBER->ViewCustomAttributes = "";
// CARD_TYPE_ID
if (strval($this->CARD_TYPE_ID->CurrentValue) != "") {
$sFilterWrk = "`CARD_TYPE_ID`" . ew_SearchString("=", $this->CARD_TYPE_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
switch (@$gsLanguage) {
case "es":
$sSqlWrk = "SELECT `CARD_TYPE_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `card_type`";
$sWhereWrk = "";
break;
default:
$sSqlWrk = "SELECT `CARD_TYPE_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `card_type`";
$sWhereWrk = "";
break;
}
ew_AddFilter($sWhereWrk, $sFilterWrk);
$this->Lookup_Selecting($this->CARD_TYPE_ID, $sWhereWrk);
// Call Lookup selecting
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$rswrk = Conn()->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$arwrk = array();
$arwrk[1] = $rswrk->fields('DispFld');
$this->CARD_TYPE_ID->ViewValue = $this->CARD_TYPE_ID->DisplayValue($arwrk);
$rswrk->Close();
} else {
$this->CARD_TYPE_ID->ViewValue = $this->CARD_TYPE_ID->CurrentValue;
}
} else {
$this->CARD_TYPE_ID->ViewValue = NULL;
}
$this->CARD_TYPE_ID->ViewCustomAttributes = "";
// BANK_ID
if (strval($this->BANK_ID->CurrentValue) != "") {
$sFilterWrk = "`BANK_ID`" . ew_SearchString("=", $this->BANK_ID->CurrentValue, EW_DATATYPE_NUMBER, "");
switch (@$gsLanguage) {
case "es":
$sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
$sWhereWrk = "";
break;
default:
$sSqlWrk = "SELECT `BANK_ID`, `DESCRIPTION` AS `DispFld`, '' AS `Disp2Fld`, '' AS `Disp3Fld`, '' AS `Disp4Fld` FROM `bank`";
$sWhereWrk = "";
break;
}
ew_AddFilter($sWhereWrk, $sFilterWrk);
$this->Lookup_Selecting($this->BANK_ID, $sWhereWrk);
// Call Lookup selecting
if ($sWhereWrk != "") {
$sSqlWrk .= " WHERE " . $sWhereWrk;
}
$rswrk = Conn()->Execute($sSqlWrk);
if ($rswrk && !$rswrk->EOF) {
// Lookup values found
$arwrk = array();
$arwrk[1] = $rswrk->fields('DispFld');
$this->BANK_ID->ViewValue = $this->BANK_ID->DisplayValue($arwrk);
$rswrk->Close();
} else {
$this->BANK_ID->ViewValue = $this->BANK_ID->CurrentValue;
}
} else {
$this->BANK_ID->ViewValue = NULL;
}
$this->BANK_ID->ViewCustomAttributes = "";
// VALID_THRU_MONTH
$this->VALID_THRU_MONTH->ViewValue = $this->VALID_THRU_MONTH->CurrentValue;
$this->VALID_THRU_MONTH->ViewCustomAttributes = "";
// VALID_THRU_YEAR
$this->VALID_THRU_YEAR->ViewValue = $this->VALID_THRU_YEAR->CurrentValue;
$this->VALID_THRU_YEAR->ViewCustomAttributes = "";
//.........这里部分代码省略.........