git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C451
This commit is contained in:
parent
08ed5ff404
commit
f5b3917ef1
2 changed files with 16 additions and 11 deletions
|
|
@ -9,6 +9,7 @@ var LinkPropuesta = "http://localhost/AYA.SlnSinort/PropuestaNormativa/DetallePr
|
|||
//aya-vsrv-apptt:2525
|
||||
var server = window.location.protocol + "//" + "localhost" + "/" + (window.location.pathname.split('/')[1]) + "/";
|
||||
var SinorLoginWCF = "http://localhost/AYA.SlnSinort.WCF/Sinort.svc";
|
||||
var SinorSignupWCF = "http://localhost/AYA.SlnSinort.WCF/SinortCatalogos.svc";
|
||||
var string_empty = "";
|
||||
var Atesa = {};
|
||||
var StarterTemplateVisible = true;
|
||||
|
|
|
|||
|
|
@ -24,16 +24,18 @@ function validarFormulario() {
|
|||
|
||||
var Contador = 0;
|
||||
var patron = /^[a-zñA-ZÑ\u00E0-\u00FC]+$/;
|
||||
var nombre;
|
||||
var apellido1;
|
||||
|
||||
if ($('#txtNombre').val().length > 0) {
|
||||
var usuario = document.getElementById("txtNombre").value;
|
||||
nombre = document.getElementById("txtNombre").value;
|
||||
|
||||
if (patron.test(usuario)) {
|
||||
if (patron.test(nombre)) {
|
||||
Contador++;
|
||||
}
|
||||
}
|
||||
if ($('#txtApellido1').val().length > 0) {
|
||||
var apellido1 = document.getElementById("txtApellido1").value;
|
||||
apellido1 = document.getElementById("txtApellido1").value;
|
||||
if (patron.test(apellido1)) {
|
||||
Contador++;
|
||||
}
|
||||
|
|
@ -76,8 +78,13 @@ function validarFormulario() {
|
|||
|
||||
if (Contador >= 6) {
|
||||
enviado = true;
|
||||
usuario = normalize($('#txtNombre').val().charAt(0).toLowerCase() + $('#txtApellido1').val()).toLowerCase();
|
||||
BuscarUsuario(usuario);
|
||||
nombre = normalize(nombre).toLowerCase();
|
||||
apellido1 = normalize(apellido1).toLowerCase();
|
||||
model = {
|
||||
codigo: nombre,
|
||||
filtro: apellido1
|
||||
}
|
||||
BuscarUsuario(model);
|
||||
|
||||
} else {
|
||||
toastr.warning('Los campos son obligatorios', Message_Warning);
|
||||
|
|
@ -107,12 +114,9 @@ var normalize = (function () {
|
|||
}
|
||||
|
||||
})();
|
||||
this.BuscarUsuario = function (usuario) {
|
||||
this.BuscarUsuario = function (model) {
|
||||
|
||||
|
||||
var uri = CatalogosWCF + '/api/BuscarUsuario';
|
||||
model = {
|
||||
codigo: usuario
|
||||
}
|
||||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
var uri = SinorSignupWCF + '/api/BuscarUsuario';
|
||||
AjaxPostData(uri, model, false, false, null, null, null);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue