git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C102
This commit is contained in:
parent
ab161e8256
commit
0c2586554b
5 changed files with 143 additions and 40 deletions
|
|
@ -23,6 +23,9 @@ namespace AYA.SlnSinort.WCF
|
||||||
|
|
||||||
[OperationContract]
|
[OperationContract]
|
||||||
ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model);
|
ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model);
|
||||||
|
|
||||||
|
[OperationContract]
|
||||||
|
int EnviarCorreo();
|
||||||
//[OperationContract]
|
//[OperationContract]
|
||||||
//ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
//ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
|
var model = {};
|
||||||
|
|
||||||
jQuery(document).ready(function () {
|
jQuery(document).ready(function () {
|
||||||
|
|
||||||
|
|
@ -19,22 +19,18 @@ this.getDataModel = function () {
|
||||||
$("#btnAgregarUsuario").click(function () {
|
$("#btnAgregarUsuario").click(function () {
|
||||||
AgregarUsuario();
|
AgregarUsuario();
|
||||||
});
|
});
|
||||||
$('#btnGuardarForo').click(function () {
|
|
||||||
GuardarPropuesta();
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#GridConvocados').TableInit(0, false, true, true, false, null, null);
|
$('#GridConvocados').TableInit(0, false, true, true, false, null, null);
|
||||||
|
|
||||||
$(function () {
|
$("#btnGuardarForo").unbind("click");
|
||||||
$("#txtFechaInicio").datepicker();
|
$('#btnGuardarForo').click(function () {
|
||||||
});
|
GuardarForo();
|
||||||
$(function () {
|
|
||||||
$("#txtFechaFinalizacion").datepicker();
|
|
||||||
});
|
|
||||||
$(function () {
|
|
||||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#txtFechaInicio").datepicker();
|
||||||
|
$("#txtFechaFinalizacion").datepicker();
|
||||||
|
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.AbrirConvocados = function () {
|
this.AbrirConvocados = function () {
|
||||||
|
|
@ -43,11 +39,6 @@ this.AbrirConvocados = function () {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$('#tableParticipantes').on('click', 'button', function () {
|
|
||||||
|
|
||||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
|
||||||
tableParticipantes.row($(this).parents('tr')).remove().draw();
|
|
||||||
});
|
|
||||||
|
|
||||||
this.CargarUsuarios = function (filtro) {
|
this.CargarUsuarios = function (filtro) {
|
||||||
|
|
||||||
|
|
@ -109,6 +100,7 @@ this.AgregarUsuario = function () {
|
||||||
$('#hiddenUsuario').val('');
|
$('#hiddenUsuario').val('');
|
||||||
$('#txtUsuario').val('');
|
$('#txtUsuario').val('');
|
||||||
}
|
}
|
||||||
|
//TABLES
|
||||||
$('#tableUsuarios').on('click', 'button', function () {
|
$('#tableUsuarios').on('click', 'button', function () {
|
||||||
|
|
||||||
var data = $('#tableUsuarios').DataTable().row($(this).parents('tr')).data();
|
var data = $('#tableUsuarios').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
@ -121,7 +113,96 @@ $('#tableUsuarios').on('click', 'button', function () {
|
||||||
$('#modalUsuario').modal('hide');
|
$('#modalUsuario').modal('hide');
|
||||||
|
|
||||||
});
|
});
|
||||||
|
$('#tableParticipantes').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
tableParticipantes.row($(this).parents('tr')).remove().draw();
|
||||||
|
});
|
||||||
|
$('#tableParticipantes').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
tableParticipantes.row($(this).parents('tr')).remove().draw();
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
this.LimpiarUsuario = function () {
|
this.LimpiarUsuario = function () {
|
||||||
$('#hiddenUsuario').val('');
|
$('#hiddenUsuario').val('');
|
||||||
$('#txtUsuario').val('');
|
$('#txtUsuario').val('');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.GuardarForo = function () {
|
||||||
|
|
||||||
|
if (!$("#formForo").valid()) {
|
||||||
|
toastr.warning("Ingresar todos los campos que son requeridos.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!confirm("Va a ingresar un nuevo foro .\n ¿Desea continuar?"))
|
||||||
|
{ return; }
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/GuardarProyectoNormativo';
|
||||||
|
LeerFormulario();
|
||||||
|
AjaxPostData(uri, model, false, true, GuardarConvocadosForo, null, null);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.GuardarConvocadosForo = function (data) {
|
||||||
|
|
||||||
|
if (data.CodigoRespuesta == "EXITOSO") {
|
||||||
|
|
||||||
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
var IdPropuestaNormativa = data.ProyectoNormativo.IdProyectoNormativo;
|
||||||
|
var ArrayParticipantes = [];
|
||||||
|
var data = tableParticipantes
|
||||||
|
.rows()
|
||||||
|
.data();
|
||||||
|
|
||||||
|
$.each(data, function (key, item) {
|
||||||
|
|
||||||
|
|
||||||
|
Convocatoria = {
|
||||||
|
UsuarioSistema: item[0],
|
||||||
|
IdProyectoNormativo: IdPropuestaNormativa,
|
||||||
|
}
|
||||||
|
ArrayParticipantes.push(Convocatoria);
|
||||||
|
});
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/GuardarConvocatoriaProyectoNormativo';
|
||||||
|
var model = {
|
||||||
|
ListaConvocatoria: ArrayParticipantes
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, model, false, true, null, null, null);
|
||||||
|
LimpiarForo();
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.LeerFormulario = function () {
|
||||||
|
|
||||||
|
var Foro
|
||||||
|
= {
|
||||||
|
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||||
|
IdTipoProyecto: Proyectos.Foro.Codigo,
|
||||||
|
DescTipoProyecto: Proyectos.Foro.Descripcion,
|
||||||
|
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
||||||
|
IdEstado: Estados.Inicial.Codigo,
|
||||||
|
Estado: Estados.Inicial.Descripcion
|
||||||
|
}
|
||||||
|
|
||||||
|
Foro.FechaInicioConsulta = $("#txtFechaInicio").DateFormatWCF();
|
||||||
|
Foro.FechaFinConsulta = $("#txtFechaFinalizacion").DateFormatWCF();
|
||||||
|
Foro.FechaMaximaConfirmarParticipacion = $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF();
|
||||||
|
|
||||||
|
model.ProyectoNormativo = Foro;
|
||||||
|
}
|
||||||
|
this.LimpiarForo = function () {
|
||||||
|
$("#txtNombreProyecto").val('');
|
||||||
|
$("#txtPromotorProyecto").val('');
|
||||||
|
$("#txtFechaInicio").val('');
|
||||||
|
$("#txtFechaFinalizacion").val('');
|
||||||
|
$("#txtFechaMaximaConfirmarParticipacion").val('');
|
||||||
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
|
tableParticipantes.clear().draw();
|
||||||
|
}
|
||||||
|
|
@ -68,6 +68,11 @@ this.getDataModel = function () {
|
||||||
GuardarPropuesta();
|
GuardarPropuesta();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#btnEnviar").unbind("click");
|
||||||
|
$('#btnEnviar').click(function () {
|
||||||
|
EnviarCorreo();
|
||||||
|
});
|
||||||
|
|
||||||
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
||||||
$("#txtFechaInicio").datepicker();
|
$("#txtFechaInicio").datepicker();
|
||||||
$("#txtFechaFinalizacion").datepicker();
|
$("#txtFechaFinalizacion").datepicker();
|
||||||
|
|
@ -338,4 +343,13 @@ this.LimpiarPropuesta = function () {
|
||||||
$("#txtFechaMaximaConfirmarParticipacion").val('');
|
$("#txtFechaMaximaConfirmarParticipacion").val('');
|
||||||
tableParticipantes = $('#tableParticipantes').DataTable();
|
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||||
tableParticipantes.clear().draw();
|
tableParticipantes.clear().draw();
|
||||||
|
}
|
||||||
|
|
||||||
|
this.EnviarCorreo = function () {
|
||||||
|
|
||||||
|
var uri = SinortWCF + '/api/EnviarCorreo';
|
||||||
|
|
||||||
|
AjaxPostData(uri, null, false, true, null, null, null);
|
||||||
|
|
||||||
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
<form id="formPropuestaNormativa" class="form-horizontal" role="form">
|
<form id="formForo" class="form-horizontal" role="form">
|
||||||
<div class="panel-body"> <h3> <i class="fa fa-file-text"></i> Foro </h3> </div>
|
<div class="panel-body"> <h3> <i class="fa fa-file-text"></i> Foro </h3> </div>
|
||||||
<div class="panel panel-success">
|
<div class="panel panel-success">
|
||||||
|
|
||||||
|
|
@ -19,24 +19,22 @@
|
||||||
<div class="form-group " id="divTema">
|
<div class="form-group " id="divTema">
|
||||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblTema">Tema del foro</label>
|
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblTema">Tema del foro</label>
|
||||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
||||||
<input name="txtTema" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtTema" required="required" type="text" placeholder="" data-original-title="">
|
<input name="txtNombreProyecto" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtNombreProyecto" required="required" type="text" placeholder="" data-original-title="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
@*---------------------Promotor del proyecto---------------------------------------------------------*@
|
||||||
|
|
||||||
|
<div class="form-group " id="divPromotorProyecto">
|
||||||
@*---------------------Fecha de inicio de consulta---------------------------------------------*@
|
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblPromotorProyecto">Promotor del proyecto</label>
|
||||||
|
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
<div class="form-group" id="divFechaInicio">
|
<input name="txtPromotorProyecto" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtPromotorProyecto" required="required" type="text" placeholder="" data-original-title="">
|
||||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaInicio">Fecha de inicio</label>
|
|
||||||
|
|
||||||
<div class=" input-group col-lg-6 col-md-6 col-xs-6">
|
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaInicio"></i></span>
|
|
||||||
<input name="txtFechaInicio" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@*---------------------Convocados---------------------------------------------*@
|
@*---------------------Convocados---------------------------------------------*@
|
||||||
<div class="form-group " id="divConvocados">
|
<div class="form-group " id="divConvocados">
|
||||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblConvocados">Convocados</label>
|
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblConvocados">Convocados</label>
|
||||||
|
|
@ -53,6 +51,18 @@
|
||||||
|
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
|
|
||||||
|
@*---------------------Fecha de inicio de consulta---------------------------------------------*@
|
||||||
|
|
||||||
|
<div class="form-group" id="divFechaInicio">
|
||||||
|
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaInicio">Fecha de inicio</label>
|
||||||
|
|
||||||
|
<div class=" input-group col-lg-6 col-md-6 col-xs-6">
|
||||||
|
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaInicio"></i></span>
|
||||||
|
<input name="txtFechaInicio" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@*---------------------Fecha de finalización de consulta---------------------------------------------*@
|
@*---------------------Fecha de finalización de consulta---------------------------------------------*@
|
||||||
|
|
||||||
|
|
@ -66,20 +76,12 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@*---------------------Promotor del proyecto---------------------------------------------------------*@
|
|
||||||
|
|
||||||
<div class="form-group " id="divPromotorProyecto">
|
|
||||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblPromotorProyecto">Promotor del proyecto</label>
|
|
||||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
|
||||||
<input name="txtPromotorProyecto" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtPromotorProyecto" required="required" type="text" placeholder="" data-original-title="">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
@*---------------------Fecha máxima para confirmar participación date---------------------------------------------*@
|
@*---------------------Fecha máxima para confirmar participación date---------------------------------------------*@
|
||||||
|
|
||||||
<div class="form-group" id="divFechaMaximaConfirmarParticipacion">
|
<div class="form-group" id="divFechaMaximaConfirmarParticipacion">
|
||||||
<label class="ccol-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaMaximaConfirmarParticipacion">Fecha máxima para confirmar participación</label>
|
<label class="ccol-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaMaximaConfirmarParticipacion">Fecha Máx. Confirmación</label>
|
||||||
|
|
||||||
<div class="input-group col-lg-6 col-md-6 col-xs-6">
|
<div class="input-group col-lg-6 col-md-6 col-xs-6">
|
||||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaximaConfirmarParticipacion"></i></span>
|
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaximaConfirmarParticipacion"></i></span>
|
||||||
|
|
@ -95,7 +97,7 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-success btn-sm" id="btnGuardarForo">
|
<button type="button" class="btn btn-success btn-medium" id="btnGuardarForo">
|
||||||
<i class="fa fa-floppy-o"></i> Guardar
|
<i class="fa fa-floppy-o"></i> Guardar
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -127,6 +127,9 @@
|
||||||
<button type="button" id="btnGuardar" class="btn btn-success btn-medium" data-dismiss="modal">
|
<button type="button" id="btnGuardar" class="btn btn-success btn-medium" data-dismiss="modal">
|
||||||
<i class="fa fa-floppy-o"></i> Guardar
|
<i class="fa fa-floppy-o"></i> Guardar
|
||||||
</button>
|
</button>
|
||||||
|
<button type="button" id="btnEnviar" class="btn btn-success btn-medium" data-dismiss="modal">
|
||||||
|
<i class="fa fa-floppy-o"></i> Enviar
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue