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]
|
||||
ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model);
|
||||
|
||||
[OperationContract]
|
||||
int EnviarCorreo();
|
||||
//[OperationContract]
|
||||
//ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
|
||||
var model = {};
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
|
@ -19,22 +19,18 @@ this.getDataModel = function () {
|
|||
$("#btnAgregarUsuario").click(function () {
|
||||
AgregarUsuario();
|
||||
});
|
||||
$('#btnGuardarForo').click(function () {
|
||||
GuardarPropuesta();
|
||||
});
|
||||
|
||||
|
||||
$('#GridConvocados').TableInit(0, false, true, true, false, null, null);
|
||||
|
||||
$(function () {
|
||||
$("#txtFechaInicio").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||
$("#btnGuardarForo").unbind("click");
|
||||
$('#btnGuardarForo').click(function () {
|
||||
GuardarForo();
|
||||
});
|
||||
|
||||
$("#txtFechaInicio").datepicker();
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||
|
||||
}
|
||||
|
||||
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) {
|
||||
|
||||
|
|
@ -109,6 +100,7 @@ this.AgregarUsuario = function () {
|
|||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
//TABLES
|
||||
$('#tableUsuarios').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableUsuarios').DataTable().row($(this).parents('tr')).data();
|
||||
|
|
@ -121,7 +113,96 @@ $('#tableUsuarios').on('click', 'button', function () {
|
|||
$('#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 () {
|
||||
$('#hiddenUsuario').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();
|
||||
});
|
||||
|
||||
$("#btnEnviar").unbind("click");
|
||||
$('#btnEnviar').click(function () {
|
||||
EnviarCorreo();
|
||||
});
|
||||
|
||||
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
||||
$("#txtFechaInicio").datepicker();
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
|
|
@ -338,4 +343,13 @@ this.LimpiarPropuesta = function () {
|
|||
$("#txtFechaMaximaConfirmarParticipacion").val('');
|
||||
tableParticipantes = $('#tableParticipantes').DataTable();
|
||||
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 panel-success">
|
||||
|
||||
|
|
@ -19,24 +19,22 @@
|
|||
<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>
|
||||
<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>
|
||||
|
||||
|
||||
@*---------------------Promotor del proyecto---------------------------------------------------------*@
|
||||
|
||||
|
||||
@*---------------------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 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>
|
||||
|
||||
|
||||
|
||||
@*---------------------Convocados---------------------------------------------*@
|
||||
<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>
|
||||
|
|
@ -53,6 +51,18 @@
|
|||
|
||||
<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---------------------------------------------*@
|
||||
|
||||
|
|
@ -66,20 +76,12 @@
|
|||
|
||||
</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---------------------------------------------*@
|
||||
|
||||
<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">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaximaConfirmarParticipacion"></i></span>
|
||||
|
|
@ -95,7 +97,7 @@
|
|||
|
||||
</div>
|
||||
<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
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -127,6 +127,9 @@
|
|||
<button type="button" id="btnGuardar" class="btn btn-success btn-medium" data-dismiss="modal">
|
||||
<i class="fa fa-floppy-o"></i> Guardar
|
||||
</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>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue