Recuperar contraseña, y editar aporte por promotor
git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C458
This commit is contained in:
parent
61f1c673ad
commit
255f583fcc
8 changed files with 267 additions and 183 deletions
|
|
@ -97,7 +97,7 @@ namespace AYA.SlnSinort.WCF
|
|||
BaseJson InsertarUsuarioExterno(UsuarioExterno model);
|
||||
|
||||
[OperationContract]
|
||||
Usuario BuscarUsuarioExterno(CatalogosPostJSON model);
|
||||
UsuarioExterno BuscarUsuarioExterno(CatalogosPostJSON model);
|
||||
#endregion
|
||||
|
||||
#region RolesUsuario
|
||||
|
|
|
|||
|
|
@ -308,12 +308,12 @@ namespace AYA.SlnSinort.WCF
|
|||
#endregion
|
||||
|
||||
#region UsuarioExterno
|
||||
public Usuario BuscarUsuarioExterno(CatalogosPostJSON model)
|
||||
public UsuarioExterno BuscarUsuarioExterno(CatalogosPostJSON model)
|
||||
{
|
||||
Usuario respuesta = null;
|
||||
UsuarioExterno respuesta = null;
|
||||
try
|
||||
{
|
||||
respuesta = new UsuarioDAL().BuscarUsuario(model);
|
||||
respuesta = new UsuarioExternoDAL().BuscarUsuario(model);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ this.getDataModel = function ()
|
|||
{
|
||||
$("#linkRecuperar").unbind("click");
|
||||
$("#linkRecuperar").click(function () {
|
||||
$("#linkRecuperar").attr("href", recuperarContrasena());
|
||||
recuperarContrasena();
|
||||
});
|
||||
$("#btnRegistro").unbind("click");
|
||||
$("#btnRegistro").click(function () {
|
||||
|
|
@ -34,12 +34,12 @@ $('#txtContrasena').keyup(function (e) {
|
|||
|
||||
}
|
||||
});
|
||||
$('#linkRecuperar').keyup(function (e) {
|
||||
if (e.which == 13) {
|
||||
recuperarContrasena();
|
||||
//$('#linkRecuperar').keyup(function (e) {
|
||||
// if (e.which == 13) {
|
||||
// recuperarContrasena();
|
||||
|
||||
}
|
||||
});
|
||||
// }
|
||||
//});
|
||||
|
||||
function validarFormulario() {
|
||||
|
||||
|
|
@ -74,13 +74,13 @@ $('#txtUsuarioUnico').change(function () {
|
|||
});
|
||||
|
||||
|
||||
function recuperarContrasena() {
|
||||
this.recuperarContrasena = function () {
|
||||
|
||||
model = {
|
||||
codigo: $('#txtUsuarioUnico').val()
|
||||
}
|
||||
var uri = SinorSignupWCF + '/api/BuscarUsuarioExterno';
|
||||
AjaxPostData(uri, model, false, false, null, null, null);
|
||||
AjaxPostData(uri, model, false, false, EnviarCorreoContrasena, null, null);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -93,12 +93,15 @@ this.EnviarCorreoContrasena = function (data) {
|
|||
|
||||
correo = {}
|
||||
correo.PlantillaEmail = Plantilla;
|
||||
correo.UsuarioExterno = data.UsuarioExterno;
|
||||
correo.UsuarioExterno = data;
|
||||
var uri = SinorLoginWCF + '/api/EnviarCorreoAExterno';
|
||||
AjaxPostData(uri, correo, false, true, null, null, null);
|
||||
|
||||
ENDREQUEST();
|
||||
}
|
||||
else {
|
||||
toastr.warning('El usuario digitado no existe', Message_Warning);
|
||||
}
|
||||
}
|
||||
this.VerificarUsurarioBD = function () {
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ var EstadoExpediente = -1;
|
|||
var TipoExp;
|
||||
var titulodoc = '';
|
||||
var FechaDocumentos;
|
||||
|
||||
var IDComentarioProyecto;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
|
@ -131,8 +131,7 @@ jQuery(document).ready(function () {
|
|||
}
|
||||
|
||||
}
|
||||
} else
|
||||
{
|
||||
} else {
|
||||
if (EsPromotor == false) {
|
||||
|
||||
if (ValidarPermisos('Ingreso y actualización de área de proyecto').length <= 0 || Estado != Estados.Activo.Codigo || Estado != Estados.Inicial.Codigo) {
|
||||
|
|
@ -160,9 +159,9 @@ jQuery(document).ready(function () {
|
|||
$('#btnReenviarEvento').hide();
|
||||
Calendario(model.EventosJSON);
|
||||
|
||||
if(Estado == "11"){
|
||||
if (Estado == "11") {
|
||||
$("#tabs").tabs({
|
||||
disabled: [1,2]
|
||||
disabled: [1, 2]
|
||||
});
|
||||
$('#btnVerAdjuntosExpediente').disable();
|
||||
$('#btnAbrirListaDocAux').disable();
|
||||
|
|
@ -246,7 +245,7 @@ this.getDataModel = function () {
|
|||
$("#btnAgregarElemento").unbind("click");
|
||||
$("#btnAgregarElemento").click(function () {
|
||||
|
||||
if (EsPromotor == false && Participa == true || EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||
if (EsPromotor == false && Participa == true || EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||
$("#divRespuestaMatriz").empty();
|
||||
$("#lblAsuntoM").text("*Asunto");
|
||||
$("#lblCapitulo").text("*Capítulo");
|
||||
|
|
@ -492,20 +491,20 @@ this.CargarConvocados = function (data) {
|
|||
var participanteConfirmado = $("#ucItemsIcon").html();
|
||||
participanteConfirmado = replaceAll("[$icon]", "fa-check-circle", participanteConfirmado);
|
||||
|
||||
if (item.Participante !== true && item.Justificacion == null){
|
||||
if (item.Participante !== true && item.Justificacion == null) {
|
||||
participanteConfirmado = replaceAll("[$state_color]", "muted", participanteConfirmado);
|
||||
if (UsuarioSistema == item.UsuarioSistema)
|
||||
Participa = false;
|
||||
|
||||
|
||||
}else{
|
||||
if (item.Participante !== true && item.Justificacion !== null){
|
||||
participanteConfirmado = replaceAll("[$state_color]", "danger", participanteConfirmado);
|
||||
}else {
|
||||
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
||||
if (UsuarioSistema == item.UsuarioSistema)
|
||||
Participa = true;
|
||||
}
|
||||
} else {
|
||||
if (item.Participante !== true && item.Justificacion !== null) {
|
||||
participanteConfirmado = replaceAll("[$state_color]", "danger", participanteConfirmado);
|
||||
} else {
|
||||
participanteConfirmado = replaceAll("[$state_color]", "success", participanteConfirmado);
|
||||
if (UsuarioSistema == item.UsuarioSistema)
|
||||
Participa = true;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -681,7 +680,7 @@ this.AgregarUsuario = function () {
|
|||
|
||||
if ($("#txtUsuario").val() != "") {
|
||||
|
||||
if (!confirm("¿Desea convocar a un nuevo usuario?")) return;
|
||||
if (!confirm("¿Desea convocar a un nuevo usuario?")) return;
|
||||
|
||||
|
||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||
|
|
@ -750,20 +749,20 @@ this.GuardarTareasPendientes = function () {
|
|||
|
||||
var ArrayConvocados = [];
|
||||
|
||||
TareaPendiente
|
||||
= {
|
||||
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||
Respuesta: false,
|
||||
FechaVencimiento: $("#txtFechaMaxima").DateFormatWCF(),
|
||||
TipoTareaPendiente: 'Convocatoria',
|
||||
UsuarioAsignado: $("#hiddenUsuario").val(),
|
||||
IdProyectoNormativo: IdPropuestaNormativa,
|
||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||
}
|
||||
TareaPendiente
|
||||
= {
|
||||
Descripcion: 'Convocatoria para el proceso de consulta para el proyecto normativo :' + $("#txtNombreProyecto").val(),
|
||||
ContenidoRelacionado: 'Propuesta normativa ' + $("#txtNombreProyecto").val(),
|
||||
Respuesta: false,
|
||||
FechaVencimiento: $("#txtFechaMaxima").DateFormatWCF(),
|
||||
TipoTareaPendiente: 'Convocatoria',
|
||||
UsuarioAsignado: $("#hiddenUsuario").val(),
|
||||
IdProyectoNormativo: IdPropuestaNormativa,
|
||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||
PromotorProyectoNormativo: $("#txtPromotorProyecto").val()
|
||||
}
|
||||
|
||||
ArrayConvocados.push(TareaPendiente);
|
||||
ArrayConvocados.push(TareaPendiente);
|
||||
|
||||
|
||||
var uri = SinortWCF + '/api/InsertarActualizarTareasPendientes';
|
||||
|
|
@ -781,10 +780,10 @@ this.EnviarCorreo = function () {
|
|||
|
||||
var ArrayParticipante = [];
|
||||
|
||||
Convocatoria = {
|
||||
UsuarioSistema: $("#hiddenUsuario").val()
|
||||
}
|
||||
ArrayParticipante.push(Convocatoria);
|
||||
Convocatoria = {
|
||||
UsuarioSistema: $("#hiddenUsuario").val()
|
||||
}
|
||||
ArrayParticipante.push(Convocatoria);
|
||||
|
||||
|
||||
|
||||
|
|
@ -822,12 +821,12 @@ this.EnviarCorreoDiscusionFocalizada = function () {
|
|||
|
||||
var PropuestaNormativa = {
|
||||
NombreProyectoNormativo: $("#txtNombreProyecto").val(),
|
||||
Matriz : url
|
||||
}
|
||||
Matriz: url
|
||||
}
|
||||
|
||||
var Plantilla = {
|
||||
NombrePlatilla: 'Correo Discusion Focalizada'
|
||||
}
|
||||
NombrePlatilla: 'Correo Discusion Focalizada'
|
||||
}
|
||||
|
||||
var Asunto = {
|
||||
AsuntoDiscusionFocalizada: $("#txtAsuntoDiscusion").val()
|
||||
|
|
@ -1046,6 +1045,51 @@ this.VerDetalleAporte = function (IdComentario, IdTipoComentario) {
|
|||
|
||||
}
|
||||
|
||||
this.EditarAporte = function (IdComentario, IdTipoComentario) {
|
||||
|
||||
var comentario = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
||||
return data.IdComentarioProyecto == IdComentario;
|
||||
})[0];
|
||||
|
||||
IDComentarioProyecto = IdComentario;
|
||||
|
||||
if (IdTipoComentario == Comentarios.Foro.Codigo) {
|
||||
$("#divRespuesta").empty();
|
||||
$("#lblcomentario").text("Comentario");
|
||||
$("#txtAsunto").val(comentario.Asunto);
|
||||
$("#txtComentario").val(comentario.Comentario);
|
||||
$('#modalDiscusion-footer').css("display", "none");
|
||||
$('#modalDiscusion').modal('show');
|
||||
$("#txtAsunto").val(comentario.Asunto);
|
||||
$('#btnVerAdjuntosForo').prop("disabled", true);
|
||||
CargarDocumentosForo(comentario.IdDocumento);
|
||||
}
|
||||
|
||||
if (IdTipoComentario == Comentarios.Matriz.Codigo) {
|
||||
$("#divRespuestaMatriz").empty();
|
||||
$("#lblAsuntoM").text("Asunto");
|
||||
$("#lblCapitulo").text("Capítulo");
|
||||
$("#lblApartado").text("Apartado");
|
||||
$("#lblTextoOriginal").text("Texto Original");
|
||||
$("#lblComentarioMatriz").text("Comentario");
|
||||
$("#txtAsuntoMatriz").val(comentario.Asunto);
|
||||
$("#txtComentarioMatriz").val(comentario.Comentario);
|
||||
$("#txtCapituloMatriz").val(comentario.Capitulo);
|
||||
$("#txtApartadoMatriz").val(comentario.Apartado);
|
||||
$("#txtTextoOriginal").val(comentario.TextoOriginal);
|
||||
$("#txtTextoPropuesto").val(comentario.TextoPropuesto);
|
||||
$('#modalElemento-footer').css("display", "block");
|
||||
$('#modalElemento').modal('show');
|
||||
$('#btnVerAdjuntosMatriz').prop("disabled", false);
|
||||
$('#txtAsuntoMatriz').attr('readonly', false);
|
||||
$('#txtCapituloMatriz').attr('readonly', false);
|
||||
$('#txtApartadoMatriz').attr('readonly', false);
|
||||
$('#txtTextoOriginal').attr('readonly', false);
|
||||
$('#txtTextoPropuesto').attr('readonly', false);
|
||||
CargarDocumentosMatriz(comentario.IdDocumento);
|
||||
}
|
||||
|
||||
}
|
||||
//MATRIZ
|
||||
this.CargarMatriz = function () {
|
||||
|
||||
|
|
@ -1053,7 +1097,7 @@ this.CargarMatriz = function () {
|
|||
tableMatriz.clear().draw();
|
||||
|
||||
var listaComentarios = $.grep(model.ProyectoNormativo.ComentariosProyecto, function (data) {
|
||||
return data.IdTipoComentario == Comentarios.Matriz.Codigo && data.Respuesta == null;
|
||||
return data.IdTipoComentario == Comentarios.Matriz.Codigo && data.Respuesta == null;
|
||||
});
|
||||
|
||||
$.each(listaComentarios, function (key, item) {
|
||||
|
|
@ -1068,6 +1112,16 @@ this.CargarMatriz = function () {
|
|||
var btnResponder = $("#ucbtResponderMatriz").html();
|
||||
btnResponder = replaceAll("[$IdComentario]", item.IdComentarioProyecto, btnResponder);
|
||||
|
||||
var btnEditar = $("#ucbtEditar").html();
|
||||
|
||||
if (UsuarioSistema == Promotor) {
|
||||
btnEditar = replaceAll("[$IdComentario]", item.IdComentarioProyecto, btnEditar);
|
||||
btnEditar = replaceAll("[$IdTipoComentario]", item.IdTipoComentario, btnEditar);
|
||||
}
|
||||
else {
|
||||
btnEditar = "";
|
||||
}
|
||||
|
||||
var respuestas = $.grep(listaComentarios, function (data) {
|
||||
return data.Respuesta == item.IdComentarioProyecto;
|
||||
});
|
||||
|
|
@ -1076,7 +1130,8 @@ this.CargarMatriz = function () {
|
|||
btnComentario,
|
||||
btnRespuesta,
|
||||
item.UsuarioSistema,
|
||||
btnResponder]).draw();
|
||||
btnResponder,
|
||||
btnEditar]).draw();
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -1101,6 +1156,7 @@ this.GuardarComentarioMatriz = function () {
|
|||
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
||||
|
||||
model.Comentario = {
|
||||
IdComentarioProyecto: IDComentarioProyecto != null ? IDComentarioProyecto : null,
|
||||
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo,
|
||||
Asunto: $("#txtAsuntoMatriz").val(),
|
||||
Capitulo: $("#txtCapituloMatriz").val(),
|
||||
|
|
@ -1114,7 +1170,7 @@ this.GuardarComentarioMatriz = function () {
|
|||
IdDocumento: Iddoc
|
||||
}
|
||||
|
||||
AjaxPostData(uri, model, false, true, ComentarioMatrizGuardado, null, null);
|
||||
AjaxPostData(uri, model, false, false, ComentarioMatrizGuardado, null, null);
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -1347,7 +1403,7 @@ this.CargarTablaListaDocumentosAuxiliares = function (data) {
|
|||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.CopiarAdjunto = function (titulo,nombre) {
|
||||
this.CopiarAdjunto = function (titulo, nombre) {
|
||||
if (!confirm("¿Desea agregar el documento en el expediente?")) return;
|
||||
|
||||
var separador = "/";
|
||||
|
|
@ -1414,7 +1470,7 @@ this.CargarTablaDocumentosExpediente = function (data) {
|
|||
var option2 = $("#ucEliminarDocumento").html();
|
||||
option2 = replaceAll("[$nombre]", "'" + item.RutaDescarga + "'", option2);
|
||||
option2 = replaceAll("[$id]", item.IdDocumentoAdjunto, option2);
|
||||
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
||||
option2 = replaceAll("[$usuario]", "'" + item.UsuarioCreacion + "'", option2);
|
||||
var ext = item.TipoArchivo.toLowerCase();
|
||||
switch (ext) {
|
||||
case 'pdf':
|
||||
|
|
@ -1452,33 +1508,33 @@ this.CargarTablaDocumentosExpediente = function (data) {
|
|||
});
|
||||
ENDREQUEST();
|
||||
}
|
||||
this.AbrirDocAdjuntos = function (ruta){
|
||||
this.AbrirDocAdjuntos = function (ruta) {
|
||||
window.open(ruta);
|
||||
}
|
||||
|
||||
this.RemoverAdjunto = function (nombre,id,usuario) {
|
||||
if (Estado != "11"){
|
||||
if (!confirm("¿Desea eliminar el documento?")) return;
|
||||
this.RemoverAdjunto = function (nombre, id, usuario) {
|
||||
if (Estado != "11") {
|
||||
if (!confirm("¿Desea eliminar el documento?")) return;
|
||||
|
||||
if (UsuarioSistema == usuario){
|
||||
if (UsuarioSistema == usuario) {
|
||||
|
||||
var separador = "/";
|
||||
var arregloDeSubCadenas = nombre.split(separador);
|
||||
var nombredoc = arregloDeSubCadenas[arregloDeSubCadenas.length-1]
|
||||
var separador = "/";
|
||||
var arregloDeSubCadenas = nombre.split(separador);
|
||||
var nombredoc = arregloDeSubCadenas[arregloDeSubCadenas.length - 1]
|
||||
|
||||
|
||||
var uri = SinortWCF + '/api/RemoverAdjunto';
|
||||
IdDocumentoAdjunto = id;
|
||||
var model = {
|
||||
Nombre: nombredoc,
|
||||
Carpeta: RepositorioLocal
|
||||
var uri = SinortWCF + '/api/RemoverAdjunto';
|
||||
IdDocumentoAdjunto = id;
|
||||
var model = {
|
||||
Nombre: nombredoc,
|
||||
Carpeta: RepositorioLocal
|
||||
|
||||
};
|
||||
};
|
||||
|
||||
AjaxPostData(uri, model, false, true, EliminarbaseAdjunto, null, null);
|
||||
} else {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
}
|
||||
AjaxPostData(uri, model, false, true, EliminarbaseAdjunto, null, null);
|
||||
} else {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
}
|
||||
}
|
||||
else {
|
||||
toastr.warning("No puede eliminar documentos en estado final", Message_Warning);
|
||||
|
|
@ -1871,10 +1927,10 @@ $('#cboxDocAux').change(function () {
|
|||
|
||||
$("#drpTipoExpediente").change(function () {
|
||||
EstadoExpediente = this.value;
|
||||
if (EstadoExpediente == 0 ) {
|
||||
if (EstadoExpediente == 0) {
|
||||
TipoExp = 'Versión final'
|
||||
}
|
||||
if (EstadoExpediente == 1 ) {
|
||||
if (EstadoExpediente == 1) {
|
||||
TipoExp = 'Informe de cierre'
|
||||
}
|
||||
});
|
||||
|
|
@ -2085,7 +2141,7 @@ function ActualizarUpload() {
|
|||
this.ActualizarEstadoProyecto = function () {
|
||||
|
||||
|
||||
model.ProyectoNormativo.IdEstado = Estados.Final.Codigo;
|
||||
model.ProyectoNormativo.IdEstado = Estados.Final.Codigo;
|
||||
model.ProyectoNormativo.Estado = Estados.Final.Descripcion;
|
||||
|
||||
|
||||
|
|
@ -2196,7 +2252,7 @@ this.EventoGuardado = function (data) {
|
|||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.ModalEvento = function (inicio,fin) {
|
||||
this.ModalEvento = function (inicio, fin) {
|
||||
$('#modalEvento').modal('show');
|
||||
|
||||
LimpiarModalevento();
|
||||
|
|
@ -2269,7 +2325,7 @@ this.Calendario = function (data) {
|
|||
|
||||
selectable: true,
|
||||
eventLimit: true,
|
||||
events:data,
|
||||
events: data,
|
||||
select: function (startDate, endDate) {
|
||||
ModalEvento(startDate.format(), endDate.format());
|
||||
|
||||
|
|
@ -2334,7 +2390,7 @@ this.EliminarConvocatoriaProyectoNormativo = function (usuario) {
|
|||
IdProyectoNormativo: model.ProyectoNormativo.IdProyectoNormativo
|
||||
}
|
||||
model.Convocado = {
|
||||
UsuarioSistema : usuario
|
||||
UsuarioSistema: usuario
|
||||
}
|
||||
|
||||
AjaxPostData(uri, model, false, true, null, null, null);
|
||||
|
|
@ -2369,12 +2425,12 @@ $('#tableDiscusion').on('click', 'button', function () {
|
|||
});
|
||||
this.ExportarDocumento = function (TipoComentario, filename) {
|
||||
|
||||
if(EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0){
|
||||
if (TipoComentario == 'Matriz') {
|
||||
ExportarAExcel(TipoComentario, filename);
|
||||
} else {
|
||||
ExportarADoc(TipoComentario, filename);
|
||||
}
|
||||
if (EsPromotor == true || ValidarPermisos('Administrador Funcional').length > 0) {
|
||||
if (TipoComentario == 'Matriz') {
|
||||
ExportarAExcel(TipoComentario, filename);
|
||||
} else {
|
||||
ExportarADoc(TipoComentario, filename);
|
||||
}
|
||||
} else {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
}
|
||||
|
|
@ -2394,7 +2450,7 @@ this.ExportarADoc = function (TipoComentario, filename) {
|
|||
html = html + '<center><h1>SISTEMA DE NORMATIVA Y REGLAMENTACION TECNICA</h1></center>'
|
||||
html = html + '<br/>'
|
||||
html = html + '<h1>' + ((TipoComentario == 'Matriz') ? 'MATRIZ' : 'FORO') + '</h1>' +
|
||||
'<p>PROYECTO NORMATIVO N. ' + model.ProyectoNormativo.IdProyectoNormativo + ' NOMBRE: ' + model.ProyectoNormativo.NombreProyectoNormativo + '</p>' ;
|
||||
'<p>PROYECTO NORMATIVO N. ' + model.ProyectoNormativo.IdProyectoNormativo + ' NOMBRE: ' + model.ProyectoNormativo.NombreProyectoNormativo + '</p>';
|
||||
|
||||
html = html + '<hr/>'
|
||||
|
||||
|
|
@ -2462,7 +2518,7 @@ this.ExportarAExcel = function (TipoComentario, filename) {
|
|||
'<th> Comentario/Observación/Justificación </th>' +
|
||||
'<th> Respuestas </th>' +
|
||||
'</tr>' +
|
||||
'</thead>' +
|
||||
'</thead>' +
|
||||
'<tbody>'
|
||||
|
||||
|
||||
|
|
@ -2483,7 +2539,7 @@ this.ExportarAExcel = function (TipoComentario, filename) {
|
|||
html = html + '<td>'
|
||||
$.each(listaRespuestasComentariosMatriz, function (lstkey, lstitem) {
|
||||
html = html + lstitem.Comentario
|
||||
if(listaRespuestasComentariosMatriz.length-1 != lstkey)
|
||||
if (listaRespuestasComentariosMatriz.length - 1 != lstkey)
|
||||
html = html + ', '
|
||||
|
||||
//html = html + '<p><img src="' + RutaImagenes + 'ios7-contact-outline.png" style="margin: 0 auto;" height="30" width="30">' + lstitem.UsuarioSistema + ' - ' + lstitem.FechaCreacion + '</p>'
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
<button id="btnIniciar" type="button" class="btn btn-primary" style="margin-top: 5px; margin-left: 215px; background-color: #4673d1 !important; text-transform: none !important; font-size: 13px !important;" onclick="validarFormulario();">
|
||||
Iniciar sesión
|
||||
</button>
|
||||
<strong><a id="linkRecuperar" href="#" style="float:right; margin-top: 15px;">Recuperar contraseña</a></strong>
|
||||
<strong><a id="linkRecuperar" href="#" role="button" style="float:right; margin-top: 15px;">Recuperar contraseña</a></strong>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
|
|
|||
|
|
@ -203,6 +203,7 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
<th>Respuestas</th>
|
||||
<th class="col-sm-4">Creado Por</th>
|
||||
<th></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
|
@ -503,6 +504,12 @@ background-image:url(http://AYA-VSRV-APPTT:2525/dist/img/ajax-loader.gif);backgr
|
|||
</button>
|
||||
</div>
|
||||
|
||||
<div id="ucbtEditar" style=" display:none;">
|
||||
<button type="button" id="btnEditar" class="btn btn-default btn-xs" title="Editar" onclick="EditarAporte([$IdComentario], [$IdTipoComentario])">
|
||||
<i class="fa fa-edit"></i> Editar
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div id="ucbtResponder" style=" display:none;">
|
||||
<button type="button" id="btnResponder" class="btn btn-default btn-xs" title="Responder" onclick="ResponderComentario([$IdComentario])">
|
||||
<i class=" fa fa-share">
|
||||
|
|
|
|||
|
|
@ -17,21 +17,38 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
|
||||
public ProyectoNormativoJSON GuardarComentariosProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
ComentariosProyecto Actual = new ComentariosProyecto();
|
||||
try
|
||||
{
|
||||
using (SinortContex Conn = new SinortContex())
|
||||
{
|
||||
int? Next_id = Conn.ComentariosProyecto.Max(t => (int?)t.IdComentarioProyecto);
|
||||
model.Comentario.IdComentarioProyecto = (Next_id == null) ? 1 : Next_id.Value + 1;
|
||||
model.Comentario.UsuarioSistema = model.UserName;
|
||||
model.Comentario.UsuarioCreacion = model.UserName;
|
||||
model.Comentario.FechaCreacion = DateTime.Now;
|
||||
Conn.ComentariosProyecto.Add(model.Comentario);
|
||||
Actual = Conn.ComentariosProyecto.Where(x => x.IdComentarioProyecto == model.Comentario.IdComentarioProyecto).FirstOrDefault();
|
||||
|
||||
if (Actual == null)
|
||||
{
|
||||
int? Next_id = Conn.ComentariosProyecto.Max(t => (int?)t.IdComentarioProyecto);
|
||||
model.Comentario.IdComentarioProyecto = (Next_id == null) ? 1 : Next_id.Value + 1;
|
||||
model.Comentario.UsuarioSistema = model.UserName;
|
||||
model.Comentario.UsuarioCreacion = model.UserName;
|
||||
model.Comentario.FechaCreacion = DateTime.Now;
|
||||
Conn.ComentariosProyecto.Add(model.Comentario);
|
||||
}
|
||||
else {
|
||||
model.Comentario.FechaModificacion = DateTime.Now;
|
||||
model.Comentario.FechaCreacion = Actual.FechaCreacion;
|
||||
model.Comentario.UsuarioCreacion = Actual.UsuarioCreacion;
|
||||
model.Comentario.UsuarioSistema = Actual.UsuarioSistema;
|
||||
Conn.Entry(Actual).State = System.Data.Entity.EntityState.Detached;
|
||||
Conn.ComentariosProyecto.Attach(model.Comentario);
|
||||
Conn.Entry(model.Comentario).State = System.Data.Entity.EntityState.Modified;
|
||||
}
|
||||
|
||||
|
||||
Conn.SaveChanges();
|
||||
Conn.Commit();
|
||||
}
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
|
||||
if (model.ProyectoNormativo.ComentariosProyecto != null)
|
||||
model.ProyectoNormativo.ComentariosProyecto.Add(model.Comentario);
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
|
||||
return usuario;
|
||||
}
|
||||
|
||||
public CatalogosPostJSON InsertarUsuarioExterno(CatalogosPostJSON model)
|
||||
{
|
||||
Encriptar encriptar = new Encriptar();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue