git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C152
This commit is contained in:
parent
f15280d746
commit
1dee17733b
11 changed files with 448 additions and 95 deletions
|
|
@ -292,6 +292,7 @@ namespace AYA.SlnSinort.WCF
|
||||||
List<DocumentosAdjuntos> respuesta = null;
|
List<DocumentosAdjuntos> respuesta = null;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
respuesta = new DocumentosAdjuntosDAL().ObtenerAdjuntos(model);
|
respuesta = new DocumentosAdjuntosDAL().ObtenerAdjuntos(model);
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,12 @@ jQuery(document).ready(function () {
|
||||||
$('#tableDocAuxiliares').DataTable().column(3).visible(false);
|
$('#tableDocAuxiliares').DataTable().column(3).visible(false);
|
||||||
$('#tableDocExpediente').TableInit(0, false, false, false, false, null, null);
|
$('#tableDocExpediente').TableInit(0, false, false, false, false, null, null);
|
||||||
$('#tableDocExpediente').DataTable().column(3).visible(false);
|
$('#tableDocExpediente').DataTable().column(3).visible(false);
|
||||||
|
$('#tableDocForo').TableInit(0, false, false, false, false, null, null);
|
||||||
|
$('#tableDocForo').DataTable().column(0).visible(false);
|
||||||
|
$('#tableDocForo').DataTable().column(4).visible(false);
|
||||||
|
$('#tableDocMatriz').TableInit(0, false, false, false, false, null, null);
|
||||||
|
$('#tableDocMatriz').DataTable().column(0).visible(false);
|
||||||
|
$('#tableDocMatriz').DataTable().column(4).visible(false);
|
||||||
|
|
||||||
$("#tabs").tabs();
|
$("#tabs").tabs();
|
||||||
|
|
||||||
|
|
@ -70,6 +76,7 @@ this.getDataModel = function () {
|
||||||
$("#lblcomentario").text("Comentario");
|
$("#lblcomentario").text("Comentario");
|
||||||
$("#txtAsunto").val('');
|
$("#txtAsunto").val('');
|
||||||
$("#txtComentario").val('');
|
$("#txtComentario").val('');
|
||||||
|
$('#btnVerAdjuntosForo').prop("disabled", false);
|
||||||
EsRespuesta = false;
|
EsRespuesta = false;
|
||||||
|
|
||||||
$('#modalDiscusion-footer').css("display", "block");
|
$('#modalDiscusion-footer').css("display", "block");
|
||||||
|
|
@ -91,8 +98,8 @@ this.getDataModel = function () {
|
||||||
$("#txtApartadoMatriz").val('');
|
$("#txtApartadoMatriz").val('');
|
||||||
$("#txtTextoOriginal").val('');
|
$("#txtTextoOriginal").val('');
|
||||||
$("#txtTextoPropuesto").val('');
|
$("#txtTextoPropuesto").val('');
|
||||||
|
$('#btnVerAdjuntosMatriz').prop("disabled", false);
|
||||||
EsRespuesta = false;
|
EsRespuesta = false;
|
||||||
|
|
||||||
$('#modalDiscusion-footer').css("display", "block");
|
$('#modalDiscusion-footer').css("display", "block");
|
||||||
$('#modalElemento').modal('show');
|
$('#modalElemento').modal('show');
|
||||||
});
|
});
|
||||||
|
|
@ -173,6 +180,7 @@ this.CargarFormulario = function (data) {
|
||||||
$("#divMatriz").css("display", "none");
|
$("#divMatriz").css("display", "none");
|
||||||
$("#divMatrizCambios").css("display", "none");
|
$("#divMatrizCambios").css("display", "none");
|
||||||
$("#divComentarios").css("height", "450px");
|
$("#divComentarios").css("height", "450px");
|
||||||
|
$("#tab3").val("Área de foro");
|
||||||
} else {
|
} else {
|
||||||
CargarMatriz();
|
CargarMatriz();
|
||||||
}
|
}
|
||||||
|
|
@ -200,7 +208,7 @@ this.CargarGridUsuarios = function (data) {
|
||||||
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||||
}
|
}
|
||||||
|
|
||||||
ENDREQUEST();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.CargarConvocados = function () {
|
this.CargarConvocados = function () {
|
||||||
|
|
@ -313,8 +321,15 @@ this.GuardarComentario = function () {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm("Va a ingresar una nueva discusión. ¿Desea continuar?"))
|
tableDocForo = $('#tableDocForo').DataTable();
|
||||||
{ return; }
|
var Iddoc;
|
||||||
|
var data = tableDocForo
|
||||||
|
.rows()
|
||||||
|
.data();
|
||||||
|
|
||||||
|
$.each(data, function (key, item) {
|
||||||
|
Iddoc = item[0]
|
||||||
|
});
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
||||||
|
|
||||||
|
|
@ -324,7 +339,8 @@ this.GuardarComentario = function () {
|
||||||
Comentario: $("#txtComentario").val(),
|
Comentario: $("#txtComentario").val(),
|
||||||
Respuesta: EsRespuesta ? IDComentario : null,
|
Respuesta: EsRespuesta ? IDComentario : null,
|
||||||
IdTipoComentario: Comentarios.Foro.Codigo,
|
IdTipoComentario: Comentarios.Foro.Codigo,
|
||||||
DescTipoComentario: Comentarios.Foro.Descripcion
|
DescTipoComentario: Comentarios.Foro.Descripcion,
|
||||||
|
IdDocumento : Iddoc
|
||||||
}
|
}
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, ComentarioGuardado, null, null);
|
AjaxPostData(uri, model, false, true, ComentarioGuardado, null, null);
|
||||||
|
|
@ -340,6 +356,8 @@ this.ComentarioGuardado = function (data) {
|
||||||
$("#txtAsunto").val('');
|
$("#txtAsunto").val('');
|
||||||
$("#txtComentario").val('');
|
$("#txtComentario").val('');
|
||||||
$('#modalDiscusion').modal('hide');
|
$('#modalDiscusion').modal('hide');
|
||||||
|
var tableDocForo = $('#tableDocForo').DataTable();
|
||||||
|
tableDocForo.clear().draw();
|
||||||
|
|
||||||
CargarForo();
|
CargarForo();
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
|
|
@ -411,9 +429,11 @@ this.VerDetalleAporte = function (IdComentario,IdTipoComentario) {
|
||||||
$("#lblcomentario").text("Comentario");
|
$("#lblcomentario").text("Comentario");
|
||||||
$("#txtAsunto").val(comentario.Asunto);
|
$("#txtAsunto").val(comentario.Asunto);
|
||||||
$("#txtComentario").val(comentario.Comentario);
|
$("#txtComentario").val(comentario.Comentario);
|
||||||
|
|
||||||
$('#modalDiscusion-footer').css("display", "none");
|
$('#modalDiscusion-footer').css("display", "none");
|
||||||
$('#modalDiscusion').modal('show');
|
$('#modalDiscusion').modal('show');
|
||||||
|
$("#txtAsunto").val(comentario.Asunto);
|
||||||
|
$('#btnVerAdjuntosForo').prop("disabled", true);
|
||||||
|
CargarDocumentosForo(comentario.IdDocumento);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IdTipoComentario == Comentarios.Matriz.Codigo) {
|
if (IdTipoComentario == Comentarios.Matriz.Codigo) {
|
||||||
|
|
@ -427,6 +447,8 @@ this.VerDetalleAporte = function (IdComentario,IdTipoComentario) {
|
||||||
$("#txtTextoPropuesto").val(comentario.TextoPropuesto);
|
$("#txtTextoPropuesto").val(comentario.TextoPropuesto);
|
||||||
$('#modalElemento-footer').css("display", "none");
|
$('#modalElemento-footer').css("display", "none");
|
||||||
$('#modalElemento').modal('show');
|
$('#modalElemento').modal('show');
|
||||||
|
$('#btnVerAdjuntosMatriz').prop("disabled", true);
|
||||||
|
CargarDocumentosMatriz(comentario.IdDocumento);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -470,7 +492,16 @@ this.GuardarComentarioMatriz = function () {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!confirm("Va a ingresar un nuevo elemento. ¿Desea continuar?")) return;
|
tableDocMatriz = $('#tableDocMatriz').DataTable();
|
||||||
|
var Iddoc;
|
||||||
|
var data = tableDocMatriz
|
||||||
|
.rows()
|
||||||
|
.data();
|
||||||
|
|
||||||
|
$.each(data, function (key, item) {
|
||||||
|
Iddoc = item[0]
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
var uri = SinortWCF + '/api/GuardarComentarioProyectoNormativo';
|
||||||
|
|
||||||
|
|
@ -484,7 +515,8 @@ this.GuardarComentarioMatriz = function () {
|
||||||
Comentario: $("#txtComentarioMatriz").val(),
|
Comentario: $("#txtComentarioMatriz").val(),
|
||||||
Respuesta: EsRespuesta ? IDComentario : null,
|
Respuesta: EsRespuesta ? IDComentario : null,
|
||||||
IdTipoComentario: Comentarios.Matriz.Codigo,
|
IdTipoComentario: Comentarios.Matriz.Codigo,
|
||||||
DescTipoComentario: Comentarios.Matriz.Descripcion
|
DescTipoComentario: Comentarios.Matriz.Descripcion,
|
||||||
|
IdDocumento : Iddoc
|
||||||
}
|
}
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, ComentarioMatrizGuardado, null, null);
|
AjaxPostData(uri, model, false, true, ComentarioMatrizGuardado, null, null);
|
||||||
|
|
@ -505,7 +537,8 @@ this.ComentarioMatrizGuardado = function (data) {
|
||||||
$("#txtTextoPropuesto").val('');
|
$("#txtTextoPropuesto").val('');
|
||||||
|
|
||||||
$('#modalElemento').modal('hide');
|
$('#modalElemento').modal('hide');
|
||||||
|
var tableDocMatriz = $('#tableDocMatriz').DataTable();
|
||||||
|
tableDocMatriz.clear().draw();
|
||||||
CargarMatriz();
|
CargarMatriz();
|
||||||
ENDREQUEST();
|
ENDREQUEST();
|
||||||
}
|
}
|
||||||
|
|
@ -558,14 +591,19 @@ $('#tableUsuarios').on('click', 'button', function () {
|
||||||
//Documentos Auxiliares
|
//Documentos Auxiliares
|
||||||
|
|
||||||
this.CargarDocumentosAuxiliares = function () {
|
this.CargarDocumentosAuxiliares = function () {
|
||||||
|
var AdjuntosAux = {
|
||||||
|
IdTipoDocumento: 1,
|
||||||
|
IdSubTipoDocumento: 3,
|
||||||
|
NumeroTipoDocumento: model.ProyectoNormativo.IdProyectoNormativo
|
||||||
|
}
|
||||||
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||||
var model = {
|
|
||||||
IdTipoDocumento: 1,
|
var modeldoc = {
|
||||||
IdSubTipoDocumento: 3
|
Adjuntos: AdjuntosAux
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, false, CargarTablaDocumentosAuxiliares, null, null);
|
AjaxPostData(uri, modeldoc, false, false, CargarTablaDocumentosAuxiliares, null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -623,17 +661,23 @@ $('#tableDocAuxiliares').on('click', 'button', function () {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
//Expediente
|
|
||||||
|
// Documentos Expediente
|
||||||
|
|
||||||
this.CargarDocumentosExpediente = function () {
|
this.CargarDocumentosExpediente = function () {
|
||||||
|
var AdjuntosExp = {
|
||||||
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
|
||||||
var model = {
|
|
||||||
IdTipoDocumento: 1,
|
IdTipoDocumento: 1,
|
||||||
IdSubTipoDocumento: 4
|
IdSubTipoDocumento: 4,
|
||||||
|
NumeroTipoDocumento: model.ProyectoNormativo.IdProyectoNormativo
|
||||||
|
}
|
||||||
|
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||||
|
|
||||||
|
var modeldoc = {
|
||||||
|
Adjuntos: AdjuntosExp
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, false, CargarTablaDocumentosExpediente, null, null);
|
AjaxPostData(uri, modeldoc, false, false, CargarTablaDocumentosExpediente, null, null);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -691,23 +735,174 @@ $('#tableDocExpediente').on('click', 'button', function () {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//Documentos Foro
|
||||||
|
|
||||||
|
this.CargarDocumentosForo = function (id) {
|
||||||
|
|
||||||
|
var tableDocForo = $('#tableDocForo').DataTable();
|
||||||
|
tableDocForo.clear().draw();
|
||||||
|
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||||
|
|
||||||
|
var modeldoc = {
|
||||||
|
IdDocumentoAdjunto: id
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, modeldoc, false, false, CargarTablaDocumentosForo, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarTablaDocumentosForo = function (data) {
|
||||||
|
|
||||||
|
var tableDocForo = $('#tableDocForo').DataTable();
|
||||||
|
tableDocForo.clear().draw();
|
||||||
|
var lista = data;
|
||||||
|
|
||||||
|
$.each(lista, function (key, item) {
|
||||||
|
|
||||||
|
|
||||||
|
var option = $("#ucAbrirDocumento").html();
|
||||||
|
var ext = item.TipoArchivo.toLowerCase();
|
||||||
|
switch (ext) {
|
||||||
|
case 'pdf':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-pdf-o", option);
|
||||||
|
break;
|
||||||
|
case 'doc':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'docx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'png':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'jpg':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'xls':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
case 'xlsx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
option = replaceAll("[$icon]", "fa-file-text", option);
|
||||||
|
}
|
||||||
|
|
||||||
|
tableDocForo.row.add([item.IdDocumentoAdjunto,
|
||||||
|
option,
|
||||||
|
item.Nombre,
|
||||||
|
item.UsuarioCreacion,
|
||||||
|
item.RutaDescarga]).draw();
|
||||||
|
|
||||||
|
});
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#tableDocForo').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableDocForo').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
window.open(data[4]);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
//Documentos Matriz
|
||||||
|
|
||||||
|
this.CargarDocumentosMatriz = function (id) {
|
||||||
|
|
||||||
|
var tableDocMatriz = $('#tableDocMatriz').DataTable();
|
||||||
|
tableDocMatriz.clear().draw();
|
||||||
|
var uri = SinortWCF + '/api/ObtenerAdjuntos';
|
||||||
|
|
||||||
|
var modeldoc = {
|
||||||
|
IdDocumentoAdjunto: id
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
AjaxPostData(uri, modeldoc, false, false, CargarTablaDocumentosMatriz, null, null);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
this.CargarTablaDocumentosMatriz = function (data) {
|
||||||
|
|
||||||
|
var tableDocMatriz = $('#tableDocMatriz').DataTable();
|
||||||
|
tableDocMatriz.clear().draw();
|
||||||
|
var lista = data;
|
||||||
|
|
||||||
|
$.each(lista, function (key, item) {
|
||||||
|
|
||||||
|
|
||||||
|
var option = $("#ucAbrirDocumento").html();
|
||||||
|
var ext = item.TipoArchivo.toLowerCase();
|
||||||
|
switch (ext) {
|
||||||
|
case 'pdf':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-pdf-o", option);
|
||||||
|
break;
|
||||||
|
case 'doc':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'docx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'png':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'jpg':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'xls':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
case 'xlsx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
option = replaceAll("[$icon]", "fa-file-text", option);
|
||||||
|
}
|
||||||
|
|
||||||
|
tableDocMatriz.row.add([item.IdDocumentoAdjunto,
|
||||||
|
option,
|
||||||
|
item.Nombre,
|
||||||
|
item.UsuarioCreacion,
|
||||||
|
item.RutaDescarga]).draw();
|
||||||
|
|
||||||
|
});
|
||||||
|
ENDREQUEST();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('#tableDocMatriz').on('click', 'button', function () {
|
||||||
|
|
||||||
|
var data = $('#tableDocMatriz').DataTable().row($(this).parents('tr')).data();
|
||||||
|
|
||||||
|
window.open(data[4]);
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
this.AbrirAdjuntos = function (id) {
|
this.AbrirAdjuntos = function (id) {
|
||||||
$('#hiddenSubTipoDocumento').val(id);
|
$('#hiddenSubTipoDocumento').val(id);
|
||||||
|
|
||||||
|
|
||||||
switch (id) {
|
switch (id) {
|
||||||
case 1:
|
case 1:
|
||||||
SubTipoproyecto = SubDocumento.Matriz.Descripcion;
|
SubTipoproyecto = SubDocumento.Matriz.Descripcion;
|
||||||
|
$('#divEnviarDocAux').show();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
SubTipoproyecto = SubDocumento.Foro.Descripcion;
|
SubTipoproyecto = SubDocumento.Foro.Descripcion;
|
||||||
|
$('#divEnviarDocAux').show();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
SubTipoproyecto = SubDocumento.DocumentoAuxiliar.Descripcion;
|
SubTipoproyecto = SubDocumento.DocumentoAuxiliar.Descripcion;
|
||||||
|
$('#divEnviarDocAux').hide();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
SubTipoproyecto = SubDocumento.Expediente.Descripcion;
|
SubTipoproyecto = SubDocumento.Expediente.Descripcion;
|
||||||
|
$('#divEnviarDocAux').hide();
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
SubTipoproyecto = SubDocumento.Calendario.Descripcion;
|
SubTipoproyecto = SubDocumento.Calendario.Descripcion;
|
||||||
|
$('#divEnviarDocAux').hide();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (EsForo) {
|
if (EsForo) {
|
||||||
|
|
@ -718,16 +913,30 @@ this.AbrirAdjuntos = function (id) {
|
||||||
ActulalizarUpload();
|
ActulalizarUpload();
|
||||||
$('#modalDocumentosAuxiliares').modal('show');
|
$('#modalDocumentosAuxiliares').modal('show');
|
||||||
}
|
}
|
||||||
|
$('#cboxDocAux').change(function () {
|
||||||
|
|
||||||
|
var cheched = $("#cboxDocAux").prop("checked") ? true : false
|
||||||
|
if ($('#hiddenSubTipoDocumento').val() == 1) {
|
||||||
|
SubTipoproyecto = cheched == true ? SubDocumento.DocumentoAuxiliar.Descripcion : SubDocumento.Matriz.Descripcion
|
||||||
|
}
|
||||||
|
if ($('#hiddenSubTipoDocumento').val() == 2) {
|
||||||
|
SubTipoproyecto = cheched == true ? SubDocumento.DocumentoAuxiliar.Descripcion : SubDocumento.Foro.Descripcion
|
||||||
|
}
|
||||||
|
|
||||||
|
ActulalizarUpload();
|
||||||
|
});
|
||||||
this.GuardarAdjuntos= function (nombre) {
|
this.GuardarAdjuntos= function (nombre) {
|
||||||
|
|
||||||
if (!confirm("Va a ingresar un documento auxiliar .\n ¿Desea continuar?"))
|
|
||||||
{ return; }
|
|
||||||
|
|
||||||
var uri = SinortWCF + '/api/GuardarAdjuntos';
|
var uri = SinortWCF + '/api/GuardarAdjuntos';
|
||||||
var ruta;
|
var ruta;
|
||||||
var Idetipoproyecto;
|
var Idetipoproyecto;
|
||||||
var DesTipoProyecto;
|
var DesTipoProyecto;
|
||||||
|
var cheched = $("#cboxDocAux").prop("checked") ? true : false
|
||||||
|
var IdSubTipoDocumento = $('#hiddenSubTipoDocumento').val();
|
||||||
|
if (IdSubTipoDocumento == 1 || IdSubTipoDocumento == 2) {
|
||||||
|
SubTipoproyecto = cheched == true ? SubDocumento.DocumentoAuxiliar.Descripcion : SubTipoproyecto;
|
||||||
|
IdSubTipoDocumento = cheched == true ? 3 : IdSubTipoDocumento;
|
||||||
|
}
|
||||||
if (EsForo) {
|
if (EsForo) {
|
||||||
Idetipoproyecto = Proyectos.Foro.Codigo;
|
Idetipoproyecto = Proyectos.Foro.Codigo;
|
||||||
DesTipoProyecto = Proyectos.Foro.Descripcion;
|
DesTipoProyecto = Proyectos.Foro.Descripcion;
|
||||||
|
|
@ -757,10 +966,74 @@ this.GuardarAdjuntos= function (nombre) {
|
||||||
|
|
||||||
model.Adjuntos = AdjuntosDocumentosAuxiliar;
|
model.Adjuntos = AdjuntosDocumentosAuxiliar;
|
||||||
|
|
||||||
AjaxPostData(uri, model, false, true, null, null, null);
|
AjaxPostData(uri, model, true, false, CargarGridComentario, null, null);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
this.CargarGridComentario = function (data) {
|
||||||
|
|
||||||
|
var tipo = $('#hiddenSubTipoDocumento').val();
|
||||||
|
var lista = data.Adjuntos;
|
||||||
|
|
||||||
|
var option = $("#ucAbrirDocumento").html();
|
||||||
|
var ext = lista.TipoArchivo.toLowerCase();
|
||||||
|
switch (ext) {
|
||||||
|
case 'pdf':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-pdf-o", option);
|
||||||
|
break;
|
||||||
|
case 'doc':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'docx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-word-o", option);
|
||||||
|
break;
|
||||||
|
case 'png':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'jpg':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-image-o", option);
|
||||||
|
break;
|
||||||
|
case 'xls':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
case 'xlsx':
|
||||||
|
option = replaceAll("[$icon]", "fa-file-excel-o", option);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
option = replaceAll("[$icon]", "fa-file-text", option);
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (tipo) {
|
||||||
|
case "1":
|
||||||
|
var tableDocMatriz = $('#tableDocMatriz').DataTable();
|
||||||
|
tableDocMatriz.clear().draw();
|
||||||
|
tableDocMatriz.row.add([lista.IdDocumentoAdjunto,
|
||||||
|
option,
|
||||||
|
lista.Nombre,
|
||||||
|
lista.UsuarioCreacion,
|
||||||
|
lista.RutaDescarga]).draw();
|
||||||
|
|
||||||
|
$('#btnVerAdjuntosMatriz').prop("disabled", true);
|
||||||
|
break;
|
||||||
|
case "2":
|
||||||
|
var tableDocForo = $('#tableDocForo').DataTable();
|
||||||
|
tableDocForo.clear().draw();
|
||||||
|
tableDocForo.row.add([lista.IdDocumentoAdjunto,
|
||||||
|
option,
|
||||||
|
lista.Nombre,
|
||||||
|
lista.UsuarioCreacion,
|
||||||
|
lista.RutaDescarga]).draw();
|
||||||
|
|
||||||
|
$('#btnVerAdjuntosForo').prop("disabled", true);
|
||||||
|
break;
|
||||||
|
default :
|
||||||
|
CargarDocumentosAuxiliares();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
function ActulalizarUpload() {
|
function ActulalizarUpload() {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ jQuery(document).ready(function () {
|
||||||
getDataModel();
|
getDataModel();
|
||||||
|
|
||||||
|
|
||||||
|
Adjuntos
|
||||||
});
|
});
|
||||||
|
|
||||||
//#endregion
|
//#endregion
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<form id="formSitios" class="form-horizontal" role="form">
|
<form id="formSitios" class="form-horizontal" role="form">
|
||||||
|
|
||||||
<div class="panel-body"> <h3> <i class="fa fa-list-ul"></i> Sitios </h3> </div>
|
<div class="panel-body"> <h3> <i class="fa fa-list-ul"></i> Proyectos y foros </h3> </div>
|
||||||
<div class="panel panel-success">
|
<div class="panel panel-success">
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<br />
|
<br />
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
<div id="ucbtnVista" style=" display:none;">
|
<div id="ucbtnVista" style=" display:none;">
|
||||||
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
|
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
|
||||||
<i class="fa fa-search"></i> Mostrar Detalle
|
<i class="fa fa-search"></i> Ingresar
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
<ul>
|
<ul>
|
||||||
<li><a href="#tabs-1">Información General</a></li>
|
<li><a href="#tabs-1">Información General</a></li>
|
||||||
<li><a href="#tabs-2">Usuarios</a></li>
|
<li><a href="#tabs-2">Usuarios</a></li>
|
||||||
<li><a href="#tabs-3">Área de proyecto</a></li>
|
<li><a href="#tabs-3" id="tab3">Área de proyecto</a></li>
|
||||||
<li><a href="#tabs-4">Expediente</a></li>
|
<li><a href="#tabs-4">Expediente</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<div id="tabs-1">
|
<div id="tabs-1">
|
||||||
|
|
@ -209,18 +209,20 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-sm-12">
|
||||||
<table id="tableDocAuxiliares" class="display">
|
<table id="tableDocAuxiliares" class="display">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th class="col-sm-1"></th>
|
<th class="col-sm-1"></th>
|
||||||
<th class="col-sm-4">Nombre</th>
|
<th class="col-sm-4">Nombre</th>
|
||||||
<th class="col-sm-4">Creado por</th>
|
<th class="col-sm-4">Creado por</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -411,7 +413,7 @@
|
||||||
@section Modals{
|
@section Modals{
|
||||||
|
|
||||||
@*---------------------Adjuntar documentos ---------------------------------------------------------*@
|
@*---------------------Adjuntar documentos ---------------------------------------------------------*@
|
||||||
<div class="modal fade" id="modalDocumentosAuxiliares" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
<div class="modal fade" id="modalDocumentosAuxiliares" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;z-index:1600;">
|
||||||
<div class="modal-dialog modal-lg" style="width:40%;">
|
<div class="modal-dialog modal-lg" style="width:40%;">
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
<div class="modal-header">
|
<div class="modal-header">
|
||||||
|
|
@ -436,6 +438,13 @@
|
||||||
<textarea name="txtComentarioDocAux" rows="5" cols="45" id="txtComentarioDocAux" style="resize: none"></textarea>
|
<textarea name="txtComentarioDocAux" rows="5" cols="45" id="txtComentarioDocAux" style="resize: none"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@*---------------------Doc Auxiliar ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divEnviarDocAux">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblEnviarDocAux">Documento Auxiliar</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
|
<input type="checkbox" id="cboxDocAux">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
@*---------------------Adjuntar ---------------------------------------------------------*@
|
@*---------------------Adjuntar ---------------------------------------------------------*@
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label class="col-sm-4 control-label ControlsForms">Buscar</label>
|
<label class="col-sm-4 control-label ControlsForms">Buscar</label>
|
||||||
|
|
@ -454,12 +463,13 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer" id="modalDiscusion-footer">
|
<div class="modal-footer" id="modalAfjuntos-footer">
|
||||||
|
|
||||||
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -528,6 +538,29 @@
|
||||||
<textarea name="txtComentario" rows="8" cols="45" id="txtComentario" style="resize: none"></textarea>
|
<textarea name="txtComentario" rows="8" cols="45" id="txtComentario" style="resize: none"></textarea>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@*--------------------- Adjuntar ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divAbrirDocForo">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Adjuntar</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
|
<button type="button" id="btnVerAdjuntosForo" class="btn btn-success btn-medium btn-margin-catalogo" onclick="javascript: AbrirAdjuntos(2)">
|
||||||
|
<i class=" fa fa-paperclip"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<table id="tableDocForo" class="display">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th class="col-sm-1"></th>
|
||||||
|
<th class="col-sm-4">Nombre</th>
|
||||||
|
<th class="col-sm-4">Creado por</th>
|
||||||
|
<th></th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
@ -578,66 +611,100 @@
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
<h4 class="modal-title"> <i class="fa fa-comment-o"></i> Agregar Elemento </h4>
|
<h4 class="modal-title"> <i class="fa fa-comment-o"></i> Agregar Elemento </h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="col-md-12" style="overflow-y: scroll; height:450px;" id="divMatrizForm">
|
||||||
<form id="formElemento">
|
<div class="modal-body">
|
||||||
@*---------------------Asunto ---------------------------------------------------------*@
|
|
||||||
<div class="form-group " id="divAsuntoMatriz">
|
<form id="formElemento">
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Asunto</label>
|
|
||||||
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
|
||||||
<input name="txtAsuntoMatriz" class="form-control imput-xs" id="txtAsuntoMatriz" type="text" />
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@*---------------------Asunto ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divAsuntoMatriz">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Asunto</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
|
<input name="txtAsuntoMatriz" class="form-control imput-xs" id="txtAsuntoMatriz" type="text" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@*---------------------Capitulo ---------------------------------------------------------*@
|
@*---------------------Capitulo ---------------------------------------------------------*@
|
||||||
<div class="form-group " id="divCapituloMatriz">
|
<div class="form-group " id="divCapituloMatriz">
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Capítulo</label>
|
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Capítulo</label>
|
||||||
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
<input name="txtCapituloMatriz" class="form-control imput-xs" id="txtCapituloMatriz" type="text" />
|
<input name="txtCapituloMatriz" class="form-control imput-xs" id="txtCapituloMatriz" type="text" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@*---------------------Apartado ---------------------------------------------------------*@
|
@*---------------------Apartado ---------------------------------------------------------*@
|
||||||
<div class="form-group " id="divApartadoMatriz">
|
<div class="form-group " id="divApartadoMatriz">
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Apartado</label>
|
<label class="col-sm-4 control-label ControlsForms" id="lblAsunto">Apartado</label>
|
||||||
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
<input name="txtApartadoMatriz" class="form-control imput-xs" id="txtApartadoMatriz" type="text" />
|
<input name="txtApartadoMatriz" class="form-control imput-xs" id="txtApartadoMatriz" type="text" />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="form-group " id="divRespuestaMatriz">
|
<div class="form-group " id="divRespuestaMatriz">
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
@*--------------------- Original ---------------------------------------------------------*@
|
|
||||||
<div class="form-group " id="divTextoOriginal">
|
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblcomentario">Texto Original</label>
|
|
||||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
|
||||||
<textarea name="txtTextoOriginal" rows="5" cols="45" id="txtTextoOriginal" style="resize: none"></textarea>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@*--------------------- Propuesto ---------------------------------------------------------*@
|
@*--------------------- Original ---------------------------------------------------------*@
|
||||||
<div class="form-group " id="divTextoPropuesto">
|
<div class="form-group " id="divTextoOriginal">
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblcomentario">Texto Propuesto</label>
|
<label class="col-sm-4 control-label ControlsForms" id="lblcomentario">Texto Original</label>
|
||||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
<textarea name="txtTextoPropuesto" rows="5" cols="45" id="txtTextoPropuesto" style="resize: none"></textarea>
|
<textarea name="txtTextoOriginal" rows="5" cols="45" id="txtTextoOriginal" style="resize: none"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
|
|
||||||
@*--------------------- Comentario ---------------------------------------------------------*@
|
@*--------------------- Propuesto ---------------------------------------------------------*@
|
||||||
<div class="form-group " id="divComentarioMatriz">
|
<div class="form-group " id="divTextoPropuesto">
|
||||||
<label class="col-sm-4 control-label ControlsForms" id="lblComentarioMatriz">Comentario</label>
|
<label class="col-sm-4 control-label ControlsForms" id="lblcomentario">Texto Propuesto</label>
|
||||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
<textarea name="txtComentarioMatriz" rows="5" cols="45" id="txtComentarioMatriz" style="resize: none"></textarea>
|
<textarea name="txtTextoPropuesto" rows="5" cols="45" id="txtTextoPropuesto" style="resize: none"></textarea>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</form>
|
@*--------------------- Comentario ---------------------------------------------------------*@
|
||||||
|
<div class="form-group " id="divComentarioMatriz">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms" id="lblComentarioMatriz">Comentario</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||||
|
<textarea name="txtComentarioMatriz" rows="5" cols="45" id="txtComentarioMatriz" style="resize: none"></textarea>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="form-group " id="divAbrirDocMatriz">
|
||||||
|
<label class="col-sm-4 control-label ControlsForms">Adjuntar</label>
|
||||||
|
<div class="input-group input-group-sm col-lg-8 col-md-8 col-sm-8 col-xs-8">
|
||||||
|
<button type="button" id="btnVerAdjuntosMatriz" class="btn btn-success btn-medium btn-margin-catalogo" onclick="javascript: AbrirAdjuntos(1)">
|
||||||
|
<i class=" fa fa-paperclip"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<table id="tableDocMatriz" class="display">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th></th>
|
||||||
|
<th class="col-sm-1"></th>
|
||||||
|
<th class="col-sm-4">Nombre</th>
|
||||||
|
<th class="col-sm-4">Creado por</th>
|
||||||
|
<th></th>
|
||||||
|
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="modal-footer" id="modalElemento-footer">
|
<div class="modal-footer" id="modalElemento-footer">
|
||||||
<button type="button" id="btnGuardarComentarioMatriz" class="btn btn-success btn-sm" data-dismiss="modal">Aceptar</button>
|
<button type="button" id="btnGuardarComentarioMatriz" class="btn btn-success btn-sm" data-dismiss="modal">Aceptar</button>
|
||||||
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
<button type="button" class="btn btn-danger btn-sm" data-dismiss="modal">Cerrar</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -50,15 +50,24 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
public List<DocumentosAdjuntos> ObtenerAdjuntos(AdjuntosJSON model)
|
public List<DocumentosAdjuntos> ObtenerAdjuntos(AdjuntosJSON model)
|
||||||
{
|
{
|
||||||
List<DocumentosAdjuntos> registros = null;
|
List<DocumentosAdjuntos> registros = null;
|
||||||
|
DocumentosAdjuntos Actual = new DocumentosAdjuntos();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
|
|
||||||
|
Actual = db.DocumentosAdjuntos.Where(x => x.IdDocumentoAdjunto == model.IdDocumentoAdjunto).FirstOrDefault();
|
||||||
|
|
||||||
registros = db.DocumentosAdjuntos.Where(r => r.IdTipoDocumento == model.IdTipoDocumento && r.IdSubTipoDocumento == model.IdSubTipoDocumento ).OrderBy(r => r.IdDocumentoAdjunto).ToList();
|
if (Actual == null)
|
||||||
|
{
|
||||||
|
registros = db.DocumentosAdjuntos.Where(r => r.IdTipoDocumento == model.Adjuntos.IdTipoDocumento && r.IdSubTipoDocumento == model.Adjuntos.IdSubTipoDocumento && r.NumeroTipoDocumento == model.Adjuntos.NumeroTipoDocumento).OrderBy(r => r.IdDocumentoAdjunto).ToList();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
registros = db.DocumentosAdjuntos.Where(r => r.IdDocumentoAdjunto == model.IdDocumentoAdjunto).OrderBy(r => r.IdDocumentoAdjunto).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,9 +31,7 @@ namespace AYA.SlnSinortModel.Entidades
|
||||||
public string Tipo { get; set; }
|
public string Tipo { get; set; }
|
||||||
public string Id { get; set; }
|
public string Id { get; set; }
|
||||||
public string Carpeta { get; set; }
|
public string Carpeta { get; set; }
|
||||||
public int IdTipoDocumento { get; set; }
|
public int? IdDocumentoAdjunto { get; set; }
|
||||||
public int IdSubTipoDocumento { get; set; }
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
[StringLength(200)]
|
[StringLength(200)]
|
||||||
public string UsuarioModificacion { get; set; }
|
public string UsuarioModificacion { get; set; }
|
||||||
|
|
||||||
public virtual Documentos Documentos { get; set; }
|
public virtual DocumentosAdjuntos DocumentosAdjuntos { get; set; }
|
||||||
|
|
||||||
public virtual ProyectoNormativo ProyectoNormativo { get; set; }
|
public virtual ProyectoNormativo ProyectoNormativo { get; set; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
public Documentos()
|
public Documentos()
|
||||||
{
|
{
|
||||||
BitacoraDocumentos = new HashSet<BitacoraDocumentos>();
|
BitacoraDocumentos = new HashSet<BitacoraDocumentos>();
|
||||||
ComentariosProyecto = new HashSet<ComentariosProyecto>();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[Key]
|
[Key]
|
||||||
|
|
@ -39,8 +38,5 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
public virtual ICollection<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
public virtual ICollection<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
|
||||||
public virtual ICollection<ComentariosProyecto> ComentariosProyecto { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
public DocumentosAdjuntos()
|
public DocumentosAdjuntos()
|
||||||
{
|
{
|
||||||
BitacoraDocumentos = new HashSet<BitacoraDocumentos>();
|
BitacoraDocumentos = new HashSet<BitacoraDocumentos>();
|
||||||
|
ComentariosProyecto = new HashSet<ComentariosProyecto>();
|
||||||
}
|
}
|
||||||
|
|
||||||
[Key]
|
[Key]
|
||||||
|
|
@ -62,5 +63,8 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
|
|
||||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
public virtual ICollection<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
public virtual ICollection<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
||||||
|
|
||||||
|
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||||
|
public virtual ICollection<ComentariosProyecto> ComentariosProyecto { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
|
|
||||||
public partial class SinortContex : Contex
|
public partial class SinortContex : Contex
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
||||||
public virtual DbSet<Aplicacion> Aplicacion { get; set; }
|
public virtual DbSet<Aplicacion> Aplicacion { get; set; }
|
||||||
public virtual DbSet<Categoria> Categoria { get; set; }
|
public virtual DbSet<Categoria> Categoria { get; set; }
|
||||||
|
|
@ -430,6 +430,11 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
.Property(e => e.UsuarioModificacion)
|
.Property(e => e.UsuarioModificacion)
|
||||||
.IsUnicode(false);
|
.IsUnicode(false);
|
||||||
|
|
||||||
|
modelBuilder.Entity<DocumentosAdjuntos>()
|
||||||
|
.HasMany(e => e.ComentariosProyecto)
|
||||||
|
.WithOptional(e => e.DocumentosAdjuntos)
|
||||||
|
.HasForeignKey(e => e.IdDocumento);
|
||||||
|
|
||||||
modelBuilder.Entity<Calendario>()
|
modelBuilder.Entity<Calendario>()
|
||||||
.Property(e => e.Titulo)
|
.Property(e => e.Titulo)
|
||||||
.IsUnicode(false);
|
.IsUnicode(false);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue