<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PopUpLupaCliente.aspx.cs" Inherits="LeaseOperWeb.Paginas.PopUpLupaCliente" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
#textRut {
width: 85px;
}
#textOperacion {
width: 91px;
}
.auto-style1 {
width: 115px;
}
</style>
<link href="../css/style-css.css" rel="stylesheet" type="text/css" />
<!--#include file="../Scripts/jquery.includes.htm"-->
<script>
$(document).ready(function () {
defineFormato();
});
function defineFormato() {
$("#txtOperacion").keyup(function () {
this.value = this.value.replace(/[^0-9\.]/g, '');
});
$("#txtRut").keyup(function () {
this.value = this.value.replace(/[^0-9\.]/g, '');
});
}
function OperacionBlur() {
if ($("#txtOperacion").val() === '') {
showMessage('Debe indicar la operación');
return;
}
}
function RutBlur() {
}
function Buscar() {
try {
var rut = $("#txtRut").val();
var nombre = $("#txtNombre").val();
var operacion = $("#txtOperacion").val();
var parametros = "{'rut':'" + rut + "','nombre':'" + nombre + "','operacion':'" + operacion + "'}";
var data = jutils.ajax.serverCall("Buscar", parametros, arguments.callee.name);
if (data !== "SD") {
$('#lblIdCliente').text(data[0]['id_cliente']);
var $temp = $("<input>");
$("body").append($temp);
$temp.val($('#lblIdCliente').text()).select();
document.execCommand("copy");
$temp.remove();
showMessage('Id. Cliente copiado en PortaPapeles');
}
else if (data.substring(0, 1) === "*") {
showMessage(data);
$('#lblIdCliente').text('');
} else if (data === "SD") {
showMessage('No se encontraron datos');
$('#lblIdCliente').text('');
}
} catch (e) {
jutils.showError(e, arguments.callee.name);
}
}
</script>
</head>
<body>
<form id="form1" runat="server">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="10">
</td>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="borde">
<tr>
<td>
<div class="">
<div class="">
<div class="">
</div>
</div>
<div class="">
</div>
</div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="">
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="caja-datos">
<tr>
<td width="10" rowspan="7"></td>
<td></td>
<td align="right" class="auto-style1">
</tr>
<tr>
<td width="70px" align="left">Rut:</td>
<td align="left" class="auto-style1">
<input id="txtRut" type="text" maxlength="13" class="caja-datos" onblur="RutBlur()" />
</td>
<td width="90px" align="left">Nombre Cliente:</td>
<td align="left" class="auto-style1">
<input id="txtNombre" type="text" maxlength="100" class="caja-datos"
style="width: 151px" />
</td>
<td class="auto-style1">
<input id="btnBuscar" type="button" value="Buscar" class="btn_buscar" onclick="Buscar()"
title="Buscar ID. Cliente" /></td>
<td align="left" class="auto-style1"> <td align="right">
</tr>
<tr>
<td width="70px" align="left">Operación:</td>
<td align="left" class="auto-style1">
<input id="txtOperacion" type="text" maxlength="20" class="caja-datos" onblur="OperacionBlur()" /></td>
<td width="90px" align="left"> </td>
<td align="left" class="auto-style1"> </td>
<td class="auto-style1"> </td>
<td align="left" class="auto-style1"> <td align="right">
</tr>
<tr>
<td colspan="7" height="10"></td>
</tr>
<tr>
<td colspan="7" height="10"> </td>
</tr>
<tr>
<td colspan="7" height="10"> </td>
</tr>
<tr>
<td colspan="7" height="10">ID.Cliente:
<label id="lblIdCliente" style="cursor: pointer;"></label>
</td>
</tr>
</table>
</td>
<td width="10" rowspan="3"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td>
<div class="">
<div class="">
<div class="">
</div>
</div>
</div>
</td>
</tr>
</table>
</form>
</body>
</html>
No hay comentarios:
Publicar un comentario