git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C83
This commit is contained in:
parent
94241c3d1e
commit
3da96c2007
32 changed files with 603 additions and 710 deletions
|
|
@ -24,7 +24,7 @@ Global
|
|||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
||||
SccNumberOfProjects = 7
|
||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
||||
SccTeamFoundationServer = http://192.168.1.10:8080/tfs/aya
|
||||
SccTeamFoundationServer = http://190.113.104.190:8080/tfs/aya
|
||||
SccLocalPath0 = .
|
||||
SccProjectUniqueName1 = AYA.SlnSynorModel\\AYA.SlnSinortModel.csproj
|
||||
SccProjectName1 = AYA.SlnSynorModel
|
||||
|
|
|
|||
|
|
@ -18,10 +18,10 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
ProyectoNormativoJSON GuardarProyectoNormativo(ProyectoNormativoJSON model);
|
||||
|
||||
[OperationContract]
|
||||
ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
//[OperationContract]
|
||||
//ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
|
||||
[OperationContract]
|
||||
ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
//[OperationContract]
|
||||
//ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -86,13 +86,19 @@ namespace AYA.SlnSinort.WCF
|
|||
|
||||
|
||||
#endregion
|
||||
#region RolesUsuario
|
||||
|
||||
#region WCFAYA
|
||||
[OperationContract]
|
||||
List<Usuario> ObtenerUsuariosAyA();
|
||||
|
||||
[OperationContract]
|
||||
Task<UsuariosAyAJSON> ActualizarUsuarios(UsuariosAyAJSON model);
|
||||
#endregion
|
||||
|
||||
#region PropuestaNormativa
|
||||
[OperationContract]
|
||||
List<ProyectoNormativo> ObtenerSitios();
|
||||
#endregion
|
||||
}
|
||||
|
||||
[DataContract]
|
||||
|
|
|
|||
|
|
@ -43,61 +43,61 @@ namespace AYA.SlnSinort.WCF
|
|||
return model;
|
||||
}
|
||||
|
||||
public ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (model.ProyectoNormativo == null)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
model.DescripcionRespuesta = "No se encontraron datos del proyecto normativo";
|
||||
return model;
|
||||
}
|
||||
//public ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// if (model.ProyectoNormativo == null)
|
||||
// {
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
// model.DescripcionRespuesta = "No se encontraron datos del proyecto normativo";
|
||||
// return model;
|
||||
// }
|
||||
|
||||
if (model.ProyectoNormativo.ConvocatoriaProyectoNormativo == null || model.ProyectoNormativo.ConvocatoriaProyectoNormativo == null || model.ProyectoNormativo.ConvocatoriaProyectoNormativo.Count == 0)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
model.DescripcionRespuesta = "No se encontraron datos asociados a la convocatoria del proyecto normativo";
|
||||
return model;
|
||||
}
|
||||
// if (model.ProyectoNormativo.ConvocatoriaProyectoNormativo == null || model.ProyectoNormativo.ConvocatoriaProyectoNormativo == null || model.ProyectoNormativo.ConvocatoriaProyectoNormativo.Count == 0)
|
||||
// {
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
// model.DescripcionRespuesta = "No se encontraron datos asociados a la convocatoria del proyecto normativo";
|
||||
// return model;
|
||||
// }
|
||||
|
||||
model = new ConvocatoriaDAL().GuardarConvocatoriaProyectoNormativo(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
// model = new ConvocatoriaDAL().GuardarConvocatoriaProyectoNormativo(model);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
// return model;
|
||||
//}
|
||||
|
||||
public ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (model.ProyectoNormativo == null)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
model.DescripcionRespuesta = "No se encontraron datos del proyecto normativo";
|
||||
return model;
|
||||
}
|
||||
//public ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// if (model.ProyectoNormativo == null)
|
||||
// {
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
// model.DescripcionRespuesta = "No se encontraron datos del proyecto normativo";
|
||||
// return model;
|
||||
// }
|
||||
|
||||
if (model.Convocado == null)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
model.DescripcionRespuesta = "No se encontraron datos del usuario";
|
||||
return model;
|
||||
}
|
||||
// if (model.Convocado == null)
|
||||
// {
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
// model.DescripcionRespuesta = "No se encontraron datos del usuario";
|
||||
// return model;
|
||||
// }
|
||||
|
||||
model = new ConvocatoriaDAL().EliminarConvocatoriaProyectoNormativo(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
// model = new ConvocatoriaDAL().EliminarConvocatoriaProyectoNormativo(model);
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
// return model;
|
||||
//}
|
||||
#endregion
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -316,13 +316,27 @@ namespace AYA.SlnSinort.WCF
|
|||
{
|
||||
|
||||
var usuarioDAL = new UsuarioDAL();
|
||||
DataSet ds = new DataSet();
|
||||
string dominio = "@aya.go.cr";
|
||||
List<Usuario> usuarios_base = null;
|
||||
List<Usuario> usuarios_aya = null;
|
||||
List<Usuario> nuevo = new List<Usuario>();
|
||||
try
|
||||
{
|
||||
string dominio = "@aya.go.cr";
|
||||
DataSet ds = new DataSet();
|
||||
ServiciosUsuariosWCF.ServicioUsuariosClient respuestaAyA = new ServiciosUsuariosWCF.ServicioUsuariosClient();
|
||||
ds = respuestaAyA.obtenerUsuariosActiveDirectory();
|
||||
model.ListaUsuariosAyA = ds.Tables[0].AsEnumerable().Select(dataRow => new Usuario { UsuarioSistema = dataRow.Field<string>("Login"), NombreUsuario = dataRow.Field<string>("Nombre"), EmailUsuario = dataRow.Field<string>("Login") + dominio, Estado = true, FechaCreacion = System.DateTime.Now }).ToList();
|
||||
|
||||
usuarios_base = new UsuarioDAL().ObtenerUsuario();
|
||||
var lista_base = usuarios_base.Select(p => p.UsuarioSistema).ToList();
|
||||
ds = respuestaAyA.obtenerUsuariosActiveDirectory();
|
||||
usuarios_aya = ds.Tables[0].AsEnumerable().Select(dataRow => new Usuario { UsuarioSistema = dataRow.Field<string>("Login"), NombreUsuario = dataRow.Field<string>("Nombre"), EmailUsuario = dataRow.Field<string>("Login") + dominio, Estado = true, FechaCreacion = System.DateTime.Now }).ToList();
|
||||
var lista_aya = usuarios_aya.Select(p => p.UsuarioSistema).ToList();
|
||||
var compara = lista_aya.Except(lista_base).ToList();
|
||||
foreach (var lista in compara)
|
||||
{
|
||||
nuevo.Add(usuarios_aya.Where(p => p.UsuarioSistema.ToString() == lista).FirstOrDefault());
|
||||
|
||||
}
|
||||
model.ListaUsuariosAyA = nuevo;
|
||||
await usuarioDAL.ActualizarUsuarios(model);
|
||||
|
||||
}
|
||||
|
|
@ -338,5 +352,20 @@ namespace AYA.SlnSinort.WCF
|
|||
|
||||
#endregion
|
||||
|
||||
#region ProyectoNormativo
|
||||
public List<ProyectoNormativo> ObtenerSitios()
|
||||
{
|
||||
List<ProyectoNormativo> respuesta = null;
|
||||
try
|
||||
{
|
||||
respuesta = new ProyectoNormativoDAL().ObtenerSitios();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
}
|
||||
return respuesta;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -102,6 +102,7 @@
|
|||
</system.webServer>
|
||||
|
||||
<connectionStrings>
|
||||
<add name="Contex" connectionString="data source=192.168.1.37;initial catalog=SinortAyA;persist security info=True;user id=sinort;password=sinort2018;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
<!--<add name="Contex" connectionString="data source=192.168.1.37;initial catalog=SinortAyA;persist security info=True;user id=sinort;password=sinort2018;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />-->
|
||||
<add name="Contex" connectionString="data source=10.50.1.98;initial catalog=SINORT;persist security info=True;user id=usersinort;password=usersinort;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
</connectionStrings>
|
||||
</configuration>
|
||||
|
|
|
|||
|
|
@ -16,10 +16,12 @@ namespace AYA.SlnSinort.Controllers
|
|||
|
||||
public ActionResult Normativa_Reglamentacion_Tecnica()
|
||||
{
|
||||
InitControllers();
|
||||
return View();
|
||||
}
|
||||
public ActionResult Proyecto_Normativo()
|
||||
{
|
||||
InitControllers();
|
||||
return View();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -108,14 +108,14 @@ this.EditarItem = function (id) {
|
|||
|
||||
this.toggleEnabledItem = function (id, value) {
|
||||
|
||||
var msg = '¿Está seguro que desea habilitar el Emisor PN?';
|
||||
var msg = '¿Está seguro que desea habilitar el Emisor?';
|
||||
|
||||
if (value == 0) {
|
||||
msg = '¿Está seguro que desea deshabilitar el Emisor PN?';
|
||||
msg = '¿Está seguro que desea deshabilitar el Emisor?';
|
||||
}
|
||||
|
||||
if (id == null || value == null) {
|
||||
toastr.warning("No se pudo obtener el ID del Emisor PN seleccionado.");
|
||||
toastr.warning("No se pudo obtener el ID del Emisor seleccionado.");
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -163,12 +163,13 @@ this.InsertarItem = function () {
|
|||
return false;
|
||||
}
|
||||
|
||||
if (!confirm("Va a ingresar un nuevo Emisor PN.\n ¿Desea continuar?"))
|
||||
if (!confirm("Va a ingresar un nuevo Emisor .\n ¿Desea continuar?"))
|
||||
{ return; }
|
||||
|
||||
|
||||
TableItems = $('#TableItems').DataTable();
|
||||
EmisorPN = {
|
||||
IdTipoEmisor : 1,
|
||||
Descripcion: $("#txtDescripcion").val(),
|
||||
}
|
||||
|
||||
|
|
@ -193,7 +194,7 @@ this.LimpiarControles = function () {
|
|||
$("#formCatalogo").validateElement("#txtDescripcion");
|
||||
|
||||
$('#lbTituloAccion').empty();
|
||||
$('#lbTituloAccion').append('Ingresar Nuevo Emisor PN');
|
||||
$('#lbTituloAccion').append('Ingresar Nuevo Emisor');
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1625,3 +1625,21 @@ CrearMenu = function (data) {
|
|||
$("#hiddenMenuCreado").val(1);
|
||||
ENDREQUEST();
|
||||
}
|
||||
$.datepicker.regional['es'] = {
|
||||
closeText: 'Cerrar',
|
||||
prevText: '< Ant',
|
||||
nextText: 'Sig >',
|
||||
currentText: 'Hoy',
|
||||
monthNames: ['Enero', 'Febrero', 'Marzo', 'Abril', 'Mayo', 'Junio', 'Julio', 'Agosto', 'Septiembre', 'Octubre', 'Noviembre', 'Diciembre'],
|
||||
monthNamesShort: ['Ene', 'Feb', 'Mar', 'Abr', 'May', 'Jun', 'Jul', 'Ago', 'Sep', 'Oct', 'Nov', 'Dic'],
|
||||
dayNames: ['Domingo', 'Lunes', 'Martes', 'Miércoles', 'Jueves', 'Viernes', 'Sábado'],
|
||||
dayNamesShort: ['Dom', 'Lun', 'Mar', 'Mié', 'Juv', 'Vie', 'Sáb'],
|
||||
dayNamesMin: ['Do', 'Lu', 'Ma', 'Mi', 'Ju', 'Vi', 'Sá'],
|
||||
weekHeader: 'Sm',
|
||||
dateFormat: 'dd/mm/yy',
|
||||
firstDay: 1,
|
||||
isRTL: false,
|
||||
showMonthAfterYear: false,
|
||||
yearSuffix: ''
|
||||
};
|
||||
$.datepicker.setDefaults($.datepicker.regional['es']);
|
||||
|
|
@ -23,6 +23,15 @@ this.getDataModel = function () {
|
|||
CargarUsuarios();
|
||||
$('#GridConvocados').TableInit(0, false, true, true, false, null, null);
|
||||
|
||||
$(function () {
|
||||
$("#txtFechaInicio").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -31,7 +40,7 @@ this.CargarEmisor = function (filtro) {
|
|||
|
||||
var uri = CatalogosWCF + '/api/ObtenerEmisorPopUp';
|
||||
var model= {
|
||||
IdTipo: 1,
|
||||
IdTipoEmisor: 1,
|
||||
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||
}
|
||||
|
||||
|
|
@ -99,7 +108,7 @@ this.CargarAplicacion = function (filtro) {
|
|||
|
||||
var uri = CatalogosWCF + '/api/ObtenerAplicacionPopUp';
|
||||
var model = {
|
||||
IdTipo: 1,
|
||||
IdTipoAplicacion: 1,
|
||||
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||
}
|
||||
|
||||
|
|
@ -249,4 +258,10 @@ this.LimpiarUsuario = function () {
|
|||
$('#txtUsuario').val('');
|
||||
}
|
||||
|
||||
this.Guardar
|
||||
this.GuardarPropuesta = function () {
|
||||
$('#hiddenUsuario').val('');
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,12 +17,16 @@ this.CargarTablaSitios = function (data) {
|
|||
if (data != null) {
|
||||
lista = data;
|
||||
var Seleccionar = $("#ucbtnVista").html();
|
||||
|
||||
|
||||
|
||||
var columnDefinition = [
|
||||
{ "data": "Nombre" },
|
||||
{ "data": "Tipo" },
|
||||
{ "data": "IdProyectoNormativo","visible":false },
|
||||
{ "data": "NombreProyectoNormativo" },
|
||||
{ "data": "TipoProyecto.Descripcion" },
|
||||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||
];
|
||||
|
||||
|
||||
$('#tableSitios').TableInit(1, true, true, true, true, columnDefinition, lista);
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableSitios')) {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ jQuery(document).ready(function () {
|
|||
|
||||
|
||||
getDataModel();
|
||||
|
||||
|
||||
|
||||
});
|
||||
|
|
@ -39,11 +40,23 @@ this.getDataModel = function () {
|
|||
InsertarItem();
|
||||
});
|
||||
|
||||
$("#btnBuscarUsuario").unbind("click");
|
||||
$("#btnBuscarUsuario").click(function () {
|
||||
BuscarUsuario();
|
||||
});
|
||||
|
||||
$("#btnAgregarUsuario").unbind("click");
|
||||
$("#btnAgregarUsuario").click(function () {
|
||||
AgregarUsuario();
|
||||
});
|
||||
|
||||
$('#TableItems').TableInit(0, false, true, true, false, null, null);
|
||||
$('#GridRolesPantallas').TableInit(0, false, true, true, false, null, null);
|
||||
$('#GridRolesUsuarios').TableInit(0, false, true, true, false, null, null);
|
||||
ObtenerRoles();
|
||||
CargarUsuariosSistema();
|
||||
|
||||
|
||||
|
||||
}
|
||||
this.CargarGridRoles = function (data) {
|
||||
|
|
@ -310,55 +323,55 @@ this.AbrirRolesUsuario = function (id) {
|
|||
CargarUsuarios(id);
|
||||
}
|
||||
|
||||
this.BuscarUsuario = function (data) {
|
||||
//this.BuscarUsuario = function (data) {
|
||||
|
||||
var model = {
|
||||
codigo :$('#txtUsuario').val()
|
||||
}
|
||||
var uri = CatalogosWCF + '/api/BuscarUsuario';
|
||||
AjaxPostData(uri, model, true, false, MostarUsuario, null, null);
|
||||
// var model = {
|
||||
// codigo :$('#txtUsuario').val()
|
||||
// }
|
||||
// var uri = CatalogosWCF + '/api/BuscarUsuario';
|
||||
// AjaxPostData(uri, model, true, false, MostarUsuario, null, null);
|
||||
|
||||
}
|
||||
this.MostarUsuario = function (data) {
|
||||
GridRolesUsuarios = $('#GridRolesUsuarios').DataTable();
|
||||
var repetido = false;
|
||||
//}
|
||||
//this.MostarUsuario = function (data) {
|
||||
// GridRolesUsuarios = $('#GridRolesUsuarios').DataTable();
|
||||
// var repetido = false;
|
||||
|
||||
var stateIcon = $("#ucItemsIcon").html();
|
||||
// var stateIcon = $("#ucItemsIcon").html();
|
||||
|
||||
|
||||
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||
stateIcon = replaceAll("[$state_color]", "muted", stateIcon);
|
||||
// stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||
// stateIcon = replaceAll("[$state_color]", "muted", stateIcon);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
var data1 = GridRolesUsuarios
|
||||
.rows()
|
||||
.data();
|
||||
// var data1 = GridRolesUsuarios
|
||||
// .rows()
|
||||
// .data();
|
||||
|
||||
$.each(data1, function (key, item) {
|
||||
// $.each(data1, function (key, item) {
|
||||
|
||||
|
||||
if (item[3] == data.UsuarioSistema) {
|
||||
repetido = true;
|
||||
}
|
||||
// if (item[3] == data.UsuarioSistema) {
|
||||
// repetido = true;
|
||||
// }
|
||||
|
||||
});
|
||||
// });
|
||||
|
||||
if (repetido == false) {
|
||||
// if (repetido == false) {
|
||||
|
||||
GridRolesUsuarios.row.add([stateIcon,
|
||||
0,
|
||||
data.IdUsuario,
|
||||
data.UsuarioSistema,
|
||||
data.NombreUsuario,
|
||||
""]).draw();
|
||||
// GridRolesUsuarios.row.add([stateIcon,
|
||||
// 0,
|
||||
// data.IdUsuario,
|
||||
// data.UsuarioSistema,
|
||||
// data.NombreUsuario,
|
||||
// ""]).draw();
|
||||
|
||||
}
|
||||
ENDREQUEST();
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
// }
|
||||
// ENDREQUEST();
|
||||
// $('#txtUsuario').val('');
|
||||
//}
|
||||
this.CargarUsuarios = function (id) {
|
||||
|
||||
$('#hiddenIdRol').val(id)
|
||||
|
|
@ -402,10 +415,8 @@ this.CargarTablaUsuarios = function (data) {
|
|||
|
||||
|
||||
GridRolesUsuarios.column(1).visible(false);
|
||||
GridRolesUsuarios.column(2).visible(false);
|
||||
GridRolesUsuarios.row.add([stateIcon,
|
||||
item.IdRolesUsuario,
|
||||
item.IdUsuario,
|
||||
item.Usuario.UsuarioSistema,
|
||||
item.Usuario.NombreUsuario,
|
||||
option]).draw();
|
||||
|
|
@ -434,7 +445,7 @@ this.GuardarRolesUsuarios = function () {
|
|||
|
||||
IdRolesUsuario: item[1],
|
||||
IdRol: IdRoles,
|
||||
IdUsuario: item[2],
|
||||
UsuarioSistema: item[2],
|
||||
Estado: true
|
||||
|
||||
}
|
||||
|
|
@ -456,23 +467,17 @@ this.LimpiarUsuario = function(){
|
|||
$('#txtUsuario').val('');
|
||||
}
|
||||
this.HabilitarUsuario = function (id, value) {
|
||||
GridRolesUsuarios = $('#GridRolesUsuarios').DataTable();
|
||||
|
||||
var msg = '¿Está seguro que desea habilitar el usuario?';
|
||||
var msg = '¿Está seguro que desea habilitar el rol?';
|
||||
|
||||
if (value == 0) {
|
||||
msg = '¿Está seguro que desea deshabilitar el usuario?';
|
||||
msg = '¿Está seguro que desea deshabilitar el rol?';
|
||||
}
|
||||
|
||||
if (id == null || value == null) {
|
||||
toastr.warning("No se pudo obtener el ID del usuario seleccionado.");
|
||||
return;
|
||||
}
|
||||
if (!confirm(msg)) return;
|
||||
|
||||
if (!confirm(msg))
|
||||
{ return; }
|
||||
var ArrayRolesUsuarios = [];
|
||||
|
||||
|
||||
|
||||
RolesUsuarios = {
|
||||
IdRolesUsuario: id,
|
||||
|
|
@ -494,3 +499,92 @@ this.HabilitarUsuario = function (id, value) {
|
|||
|
||||
}
|
||||
|
||||
this.CargarUsuariosSistema = function (filtro) {
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerUsuario';
|
||||
AjaxPostData(uri, null, false, false, CargarGridUsuarios, null, null);
|
||||
|
||||
}
|
||||
|
||||
this.CargarGridUsuarios = function (data) {
|
||||
|
||||
if (data != null) {
|
||||
|
||||
var Seleccionar = $("#ucBtnSeleccionarCatalogo").html();
|
||||
var columnDefinition = [
|
||||
{ "data": "UsuarioSistema", className: "center" },
|
||||
{ "data": "NombreUsuario", className: "center" },
|
||||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||
];
|
||||
|
||||
$('#tableUsuarios').TableInit(0, false, true, true, false, columnDefinition, data, false);
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
|
||||
}
|
||||
|
||||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.BuscarUsuario = function () {
|
||||
SelectedCatalog = 'Usuarios';
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableUsuarios')) {
|
||||
|
||||
LoadMessage();
|
||||
$('#tableUsuarios').DataTable().search('').draw();
|
||||
$('#modalUsuario').modal('show');
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
this.AgregarUsuario = function () {
|
||||
|
||||
if (!confirm("¿Desea agregar un nuevo usuario?")) return;
|
||||
|
||||
var GridRolesUsuarios = $('#GridRolesUsuarios').DataTable();
|
||||
var option = $("#ucbtnRemoverParticipante").html();
|
||||
var stateIcon = $("#ucItemsIcon").html();
|
||||
stateIcon = replaceAll("[$icon]", "fa-check-circle", stateIcon);
|
||||
stateIcon = replaceAll("[$state_color]", "muted", stateIcon);
|
||||
|
||||
GridRolesUsuarios.row.add(
|
||||
[stateIcon,
|
||||
0,
|
||||
$("#hiddenUsuario").val(),
|
||||
$("#txtUsuario").val(),
|
||||
option])
|
||||
.draw();
|
||||
|
||||
toastr.success(Message_Default, Message_Success);
|
||||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
$('#tableUsuarios').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableUsuarios').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (SelectedCatalog == "Usuarios") {
|
||||
|
||||
$('#hiddenUsuario').val(data.UsuarioSistema);
|
||||
$('#txtUsuario').val(data.NombreUsuario);
|
||||
}
|
||||
$('#modalUsuario').modal('hide');
|
||||
|
||||
});
|
||||
this.LimpiarUsuario = function () {
|
||||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
|
||||
$('#GridRolesUsuarios').on('click', 'button', function () {
|
||||
var data = $('#GridRolesUsuarios').DataTable().row($(this).parents('tr')).data();
|
||||
if (data[1] == 0) {
|
||||
var GridRolesUsuarios = $('#GridRolesUsuarios').DataTable();
|
||||
GridRolesUsuarios.row($(this).parents('tr')).remove().draw();
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -49,7 +49,7 @@
|
|||
<div class="panel panel-success">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<i class="fa fa-bars"></i> <label id="lbTituloAccion">Ingresar Nuevo Emisor PN</label>
|
||||
<i class="fa fa-bars"></i> <label id="lbTituloAccion">Ingresar Nuevo Emisor</label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
|
|
|
|||
|
|
@ -105,6 +105,11 @@
|
|||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div id="ucBtnSeleccionarCatalogo" style="display:none;">
|
||||
<button type="button" id="btnSeleccionarCatalogo" class="btn btn-default btn-xs">
|
||||
<i id="ibtnSeleccionarCatalogo" class="fa fa-check"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="modalRolesPantallas" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog modal-lg" style="width:50%;">
|
||||
|
|
@ -148,17 +153,21 @@
|
|||
|
||||
</div>
|
||||
<div class="form-group" id="divUsuario">
|
||||
|
||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label ControlsForms" id="lblUsuario" for="txtBuscar">Buscar</label>
|
||||
<div class="input-group input-group-sm col-md-4">
|
||||
<div class="input-group input-group-sm col-md-6">
|
||||
<input id="hiddenUsuario" type="hidden">
|
||||
<input name="txtUsuario" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtUsuario" required="required" type="text" data-original-title="">
|
||||
<input name="txtUsuario" title="" class="form-control TextBoxCatalogo" id="txtUsuario" type="text" readonly>
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-medium" id="btn_eliminarUsuario" type="button" onclick="javascript: LimpiarUsuario()">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnUsuario" type="button" usehttppost="0" webapplication="" onclick="javascript: BuscarUsuario()">
|
||||
<i class="fa fa-plus"></i>
|
||||
<button class="btn btn-info btn-medium btn-margin-catalogo" id="btnBuscarUsuario" type="button">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnAgregarUsuario" type="button">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
|
|
@ -167,10 +176,9 @@
|
|||
<div class="modal-body">
|
||||
<table id="GridRolesUsuarios" class="table table-condensed dataTable no-footer">
|
||||
<thead>
|
||||
<tr>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th class="col-sm-1"></th>
|
||||
<th class="col-sm-1"></th>
|
||||
<th class="col-sm-4">Usuario</th>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th></th>
|
||||
|
|
@ -198,8 +206,41 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
@*---------------------Usuarios---------------------------------------------------------*@
|
||||
<div class="modal fade" id="modalUsuario" tabindex="-1" role="dialog" aria-hidden="true" data-backdrop="static" style="display: none;">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||
<h4 class="modal-title">Catálogo Usuarios</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-12">
|
||||
|
||||
<table id="tableUsuarios" class="table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-2">Usuario</th>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="ucbtnRemoverParticipante" style=" display:none;">
|
||||
<button type="button" id="btnRemover" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-remove"></i> Remover
|
||||
</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -6,32 +6,34 @@
|
|||
|
||||
<input type="hidden" id="hiddenHref" value="@string.Concat(Url.Action("View", "Controller", null), ViewBag.QueryEncripted)">
|
||||
<form id="formSitios" class="form-horizontal" role="form">
|
||||
<div class="panel-body">
|
||||
<h3> <i class="fa fa-list-ul"></i> Sitios </h3>
|
||||
<br />
|
||||
<br />
|
||||
<div>
|
||||
<table id="tableSitios" class="table table-condensed dataTable no-footer">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th class="col-sm-4">Tipo</th>
|
||||
<th>Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<div class="panel-body"> <h3> <i class="fa fa-list-ul"></i> Sitios </h3> </div>
|
||||
<div class="panel panel-success">
|
||||
<div class="panel-body">
|
||||
<br />
|
||||
<div>
|
||||
<table id="tableSitios" class="table table-condensed dataTable no-footer">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm-1">ID</th>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th class="col-sm-4">Tipo</th>
|
||||
<th>Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ucbtnVista" style=" display:none;">
|
||||
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-check"></i> Seleccionar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="ucbtnVista" style=" display:none;">
|
||||
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-check"></i> Seleccionar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,7 @@
|
|||
|
||||
<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>
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<div class="input-group col-lg-5 col-md-5 col-sm-5 col-xs-4">
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnConvocados" type="button" usehttppost="0" webapplication="" onclick="AbrirConvocados()">
|
||||
<i class=" fa fa-plus">
|
||||
</i> Agregar
|
||||
|
|
@ -95,7 +95,7 @@
|
|||
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaInicio"></i></span>
|
||||
<input name="txtFechaInicio" disabled="disabled" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
<input name="txtFechaInicio" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -108,7 +108,7 @@
|
|||
|
||||
<div class="input-group col-lg-6 col-md-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaFinalizacionConsulta"></i></span>
|
||||
<input name="txtFechaFinalizacionConsulta" disabled="disabled" class="form-control imput-xs" id="txtFechaFinalizacionConsulta" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
<input name="txtFechaFinalizacion" class="form-control imput-xs" id="txtFechaFinalizacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -130,7 +130,7 @@
|
|||
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaximaConfirmarParticipacion"></i></span>
|
||||
<input name="txtFechaMaximaConfirmarParticipacion" disabled="disabled" class="form-control imput-xs" id="txtFechaMaximaConfirmarParticipacion" type="text" dateformat="DD-MMMM-YYYY">
|
||||
<input name="txtFechaMaximaConfirmarParticipacion" class="form-control imput-xs" id="txtFechaMaximaConfirmarParticipacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY" >
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -140,8 +140,11 @@
|
|||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success btn-sm" data-dismiss="modal">Guardar</button>
|
||||
<button type="button" class="btn btn-success btn-sm " data-dismiss="modal">
|
||||
<i class="fa fa-floppy-o"></i> Guardar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -269,22 +272,7 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
@*<div class="form-group" id="divUsuario">
|
||||
<label class="col-lg-2 col-md-2 col-sm-2 col-xs-2 control-label ControlsForms" id="lblUsuario" for="txtBuscar">Buscar</label>
|
||||
<div class="input-group input-group-sm col-md-4">
|
||||
<input id="hiddenUsuario" type="hidden">
|
||||
<input name="txtUsuario" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtUsuario" required="required" type="text" data-original-title="">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-medium" id="btn_eliminarUsuario" type="button" onclick="javascript: LimpiarUsuario()">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnUsuario" type="button" usehttppost="0" webapplication="" onclick="javascript: BuscarUsuario()">
|
||||
<i class="fa fa-plus"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>*@
|
||||
|
||||
<br />
|
||||
<div class="modal-body">
|
||||
<table id="tableParticipantes" class="table table-condensed dataTable no-footer">
|
||||
|
|
|
|||
|
|
@ -15,76 +15,76 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
{
|
||||
Log log = new Log("ConvocatoriaDAL");
|
||||
|
||||
public ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SinortContex Conn = new SinortContex())
|
||||
{
|
||||
foreach (var Convocado in model.ProyectoNormativo.ConvocatoriaProyectoNormativo)
|
||||
{
|
||||
if (!Conn.ConvocatoriaProyectoNormativo.Any(x => x.IdProyectoNormativo == model.ProyectoNormativo.IdProyectoNormativo && x.UsuarioSistema == Convocado.UsuarioSistema))
|
||||
{
|
||||
Convocado.FechaCreacion = DateTime.Now;
|
||||
Convocado.Estado = false;
|
||||
Conn.ConvocatoriaProyectoNormativo.Add(Convocado);
|
||||
}
|
||||
else
|
||||
{
|
||||
Convocado.FechaModificacion = DateTime.Now;
|
||||
Conn.Entry(Convocado).State = System.Data.Entity.EntityState.Detached;
|
||||
Conn.ConvocatoriaProyectoNormativo.Attach(Convocado);
|
||||
Conn.Entry(Convocado).State = System.Data.Entity.EntityState.Modified;
|
||||
}
|
||||
}
|
||||
//public ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// using (SinortContex Conn = new SinortContex())
|
||||
// {
|
||||
// foreach (var Convocado in model.ProyectoNormativo.ConvocatoriaProyectoNormativo)
|
||||
// {
|
||||
// if (!Conn.Convocatoria.Any(x => x.IdProyectoNormativo == model.ProyectoNormativo.IdProyectoNormativo && x.UsuarioSistema == Convocado.UsuarioSistema))
|
||||
// {
|
||||
// Convocado.FechaCreacion = DateTime.Now;
|
||||
// Convocado.Estado = false;
|
||||
// Conn.Convocatoria.Add(Convocado);
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// Convocado.FechaModificacion = DateTime.Now;
|
||||
// Conn.Entry(Convocado).State = System.Data.Entity.EntityState.Detached;
|
||||
// Conn.Convocatoria.Attach(Convocado);
|
||||
// Conn.Entry(Convocado).State = System.Data.Entity.EntityState.Modified;
|
||||
// }
|
||||
// }
|
||||
|
||||
Conn.SaveChanges();
|
||||
Conn.Commit();
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (DbEntityValidationException ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
// Conn.SaveChanges();
|
||||
// Conn.Commit();
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
// }
|
||||
// }
|
||||
// catch (DbEntityValidationException ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
|
||||
return model;
|
||||
}
|
||||
// return model;
|
||||
//}
|
||||
|
||||
public ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SinortContex Conn = new SinortContex())
|
||||
{
|
||||
var ConvocadoEliminar = Conn.ConvocatoriaProyectoNormativo.FirstOrDefault(x => x.IdProyectoNormativo == model.ProyectoNormativo.IdProyectoNormativo && x.UsuarioSistema == model.Convocado.UsuarioSistema);
|
||||
//public ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
//{
|
||||
// try
|
||||
// {
|
||||
// using (SinortContex Conn = new SinortContex())
|
||||
// {
|
||||
// var ConvocadoEliminar = Conn.ConvocatoriaProyectoNormativo.FirstOrDefault(x => x.IdProyectoNormativo == model.ProyectoNormativo.IdProyectoNormativo && x.UsuarioSistema == model.Convocado.UsuarioSistema);
|
||||
|
||||
if(ConvocadoEliminar != null)
|
||||
Conn.Entry(ConvocadoEliminar).State = System.Data.Entity.EntityState.Deleted;
|
||||
// if(ConvocadoEliminar != null)
|
||||
// Conn.Entry(ConvocadoEliminar).State = System.Data.Entity.EntityState.Deleted;
|
||||
|
||||
Conn.SaveChanges();
|
||||
Conn.Commit();
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (DbEntityValidationException ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
// Conn.SaveChanges();
|
||||
// Conn.Commit();
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
// }
|
||||
// }
|
||||
// catch (DbEntityValidationException ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
// catch (Exception ex)
|
||||
// {
|
||||
// log.Error(ex);
|
||||
// model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
// }
|
||||
|
||||
return model;
|
||||
}
|
||||
// return model;
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,19 +1,20 @@
|
|||
using Atesa.Utilitarios;
|
||||
using AYA.SlnSinortModel.Constantes;
|
||||
using AYA.SlnSinortModel.Entidades;
|
||||
using AYA.SlnSinortModel.Sinort;
|
||||
using AYA.SlnSinortModel.Sinort;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data.Entity.Validation;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Data.Entity;
|
||||
using System.Data.Entity.Validation;
|
||||
using AYA.SlnSinortModel.Entidades;
|
||||
using Atesa.Utilitarios;
|
||||
using AYA.SlnSinortModel.Constantes;
|
||||
|
||||
namespace AYA.SlnSinortModel.DAL.Sinort
|
||||
{
|
||||
public class ProyectoNormativoDAL
|
||||
{
|
||||
Log log = new Log("ProyectoNormativoDAL");
|
||||
//Log log = new Log("ProyectoNormativoDAL");
|
||||
|
||||
public ProyectoNormativoJSON GuardarProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
|
|
@ -45,16 +46,38 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
}
|
||||
catch (DbEntityValidationException ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
//log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
//log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
|
||||
return model;
|
||||
}
|
||||
public List<ProyectoNormativo> ObtenerSitios()
|
||||
{
|
||||
List<ProyectoNormativo> registros = null;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
|
||||
registros = db.ProyectoNormativo.Include(p=> p.TipoProyecto).AsNoTracking().ToList();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//log.Error(ex);
|
||||
}
|
||||
|
||||
return registros;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
<Compile Include="Sinort\Categoria.cs" />
|
||||
<Compile Include="Sinort\ComentariosForo.cs" />
|
||||
<Compile Include="Sinort\ComentariosMatriz.cs" />
|
||||
<Compile Include="Sinort\ComentariosProyecto.cs" />
|
||||
<Compile Include="Sinort\Convocatoria.cs" />
|
||||
<Compile Include="Sinort\ConvocatoriaProyectoNormativo.cs" />
|
||||
<Compile Include="Sinort\Documentos.cs" />
|
||||
|
|
@ -88,12 +89,14 @@
|
|||
<Compile Include="Sinort\RolesPantallas.cs" />
|
||||
<Compile Include="Sinort\RolesUsuario.cs" />
|
||||
<Compile Include="Sinort\SinortContex.cs" />
|
||||
<Compile Include="Sinort\sysdiagrams.cs" />
|
||||
<Compile Include="Sinort\TipoAplicacion.cs" />
|
||||
<Compile Include="Sinort\TipoDocumento.cs" />
|
||||
<Compile Include="Sinort\TipoEmisor.cs" />
|
||||
<Compile Include="Sinort\TipoEstado.cs" />
|
||||
<Compile Include="Sinort\TipoForo.cs" />
|
||||
<Compile Include="Sinort\TipoMatriz.cs" />
|
||||
<Compile Include="Sinort\TipoProyecto.cs" />
|
||||
<Compile Include="Sinort\Usuario.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
|
|
|||
|
|
@ -19,6 +19,6 @@
|
|||
</connectionStrings>-->
|
||||
<connectionStrings>
|
||||
<add name="SinortContex" connectionString="data source=192.168.1.37;initial catalog=SinortAyA;persist security info=True;user id=sinort;password=sinort2018;multipleactiveresultsets=True;application name=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
<add name="SinortContex1" connectionString="data source=192.168.1.37;initial catalog=SinortAyA;persist security info=True;user id=sinort;password=sinort2018;multipleactiveresultsets=True;application name=EntityFramework" providerName="System.Data.SqlClient" />
|
||||
|
||||
</connectionStrings>
|
||||
</configuration>
|
||||
|
|
@ -9,12 +9,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[Table("Catalogos.Aplicacion")]
|
||||
public partial class Aplicacion
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public Aplicacion()
|
||||
{
|
||||
ProyectoNormativo = new HashSet<ProyectoNormativo>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdAplicacion { get; set; }
|
||||
|
|
@ -36,9 +30,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ProyectoNormativo> ProyectoNormativo { get; set; }
|
||||
|
||||
public virtual TipoAplicacion TipoAplicacion { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,5 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
public virtual Documentos Documentos { get; set; }
|
||||
|
||||
public virtual Foro Foro { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
42
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/ComentariosProyecto.cs
Normal file
42
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/ComentariosProyecto.cs
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
namespace AYA.SlnSinortModel.Sinort
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.Spatial;
|
||||
|
||||
[Table("Global.ComentariosProyecto")]
|
||||
public partial class ComentariosProyecto
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdComentarioProyecto { get; set; }
|
||||
|
||||
public int? IdProyectoNormativo { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Asunto { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string UsuarioSistema { get; set; }
|
||||
|
||||
public string Respuesta { get; set; }
|
||||
|
||||
public int? IdDocumento { get; set; }
|
||||
|
||||
public DateTime? FechaCreacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string UsuarioCreacion { get; set; }
|
||||
|
||||
public DateTime? FechaModificacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
public virtual Documentos Documentos { get; set; }
|
||||
|
||||
public virtual ProyectoNormativo ProyectoNormativo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -11,13 +11,18 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
{
|
||||
[Key]
|
||||
[Column(Order = 0)]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdUsuario { get; set; }
|
||||
[StringLength(200)]
|
||||
public string UsuarioSistema { get; set; }
|
||||
|
||||
[Key]
|
||||
[Column(Order = 1)]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdForo { get; set; }
|
||||
public int IdProyectoNormativo { get; set; }
|
||||
|
||||
public bool? Participante { get; set; }
|
||||
|
||||
[StringLength(500)]
|
||||
public string Justificacion { get; set; }
|
||||
|
||||
public DateTime? FechaCreacion { get; set; }
|
||||
|
||||
|
|
@ -29,6 +34,8 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
public virtual Foro Foro { get; set; }
|
||||
public virtual Usuario Usuario { get; set; }
|
||||
|
||||
public virtual ProyectoNormativo ProyectoNormativo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public Documentos()
|
||||
{
|
||||
BitacoraDocumentos = new HashSet<BitacoraDocumentos>();
|
||||
ComentariosForo = new HashSet<ComentariosForo>();
|
||||
ComentariosMatriz = new HashSet<ComentariosMatriz>();
|
||||
ComentariosProyecto = new HashSet<ComentariosProyecto>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
|
|
@ -42,9 +42,9 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public virtual ICollection<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ComentariosForo> ComentariosForo { get; set; }
|
||||
public virtual ICollection<ComentariosMatriz> ComentariosMatriz { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ComentariosMatriz> ComentariosMatriz { get; set; }
|
||||
public virtual ICollection<ComentariosProyecto> ComentariosProyecto { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,12 +9,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[Table("Catalogos.Emisor")]
|
||||
public partial class Emisor
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public Emisor()
|
||||
{
|
||||
ProyectoNormativo = new HashSet<ProyectoNormativo>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdEmisor { get; set; }
|
||||
|
|
@ -36,9 +30,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ProyectoNormativo> ProyectoNormativo { get; set; }
|
||||
|
||||
public virtual TipoEmisor TipoEmisor { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public Matriz()
|
||||
{
|
||||
ComentariosMatriz = new HashSet<ComentariosMatriz>();
|
||||
ProyectoNormativo = new HashSet<ProyectoNormativo>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
|
|
@ -36,8 +35,5 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ComentariosMatriz> ComentariosMatriz { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ProyectoNormativo> ProyectoNormativo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,13 +6,14 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.Spatial;
|
||||
|
||||
[Table("Normativo.ProyectoNormativo")]
|
||||
[Table("Global.ProyectoNormativo")]
|
||||
public partial class ProyectoNormativo
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public ProyectoNormativo()
|
||||
{
|
||||
ConvocatoriaProyectoNormativo = new HashSet<ConvocatoriaProyectoNormativo>();
|
||||
ComentariosProyecto = new HashSet<ComentariosProyecto>();
|
||||
Convocatoria = new HashSet<Convocatoria>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
|
|
@ -22,7 +23,7 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(200)]
|
||||
public string NombreProyectoNormativo { get; set; }
|
||||
|
||||
public int? IdForo { get; set; }
|
||||
public int? IdTipoProyecto { get; set; }
|
||||
|
||||
public int? IdMatriz { get; set; }
|
||||
|
||||
|
|
@ -34,7 +35,10 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
|
||||
public DateTime? FechaFinConsulta { get; set; }
|
||||
|
||||
public int? PromotorProyecto { get; set; }
|
||||
[StringLength(200)]
|
||||
public string PromotorProyecto { get; set; }
|
||||
|
||||
public int? IdEstado { get; set; }
|
||||
|
||||
public DateTime? FechaMaximaConfirmarParticipacion { get; set; }
|
||||
|
||||
|
|
@ -48,15 +52,12 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
public virtual Aplicacion Aplicacion { get; set; }
|
||||
|
||||
public virtual Emisor Emisor { get; set; }
|
||||
|
||||
public virtual Foro Foro { get; set; }
|
||||
|
||||
public virtual Matriz Matriz { get; set; }
|
||||
public virtual TipoProyecto TipoProyecto { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ConvocatoriaProyectoNormativo> ConvocatoriaProyectoNormativo { get; set; }
|
||||
public virtual ICollection<ComentariosProyecto> ComentariosProyecto { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<Convocatoria> Convocatoria { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,422 +0,0 @@
|
|||
namespace AYA.SlnSinortModel.Sinort
|
||||
{
|
||||
using System;
|
||||
using System.Data.Entity;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using AYA.SlnSinortModel.Sinort.Partial;
|
||||
|
||||
public partial class SinortContex : Contex
|
||||
{
|
||||
public virtual DbSet<Aplicacion> Aplicacion { get; set; }
|
||||
public virtual DbSet<Categoria> Categoria { get; set; }
|
||||
public virtual DbSet<Emisor> Emisor { get; set; }
|
||||
public virtual DbSet<Estado> Estado { get; set; }
|
||||
public virtual DbSet<Mantenimiento> Mantenimiento { get; set; }
|
||||
public virtual DbSet<Pantallas> Pantallas { get; set; }
|
||||
public virtual DbSet<PlantillaEmail> PlantillaEmail { get; set; }
|
||||
public virtual DbSet<Roles> Roles { get; set; }
|
||||
public virtual DbSet<RolesPantallas> RolesPantallas { get; set; }
|
||||
public virtual DbSet<RolesUsuario> RolesUsuario { get; set; }
|
||||
public virtual DbSet<TipoAplicacion> TipoAplicacion { get; set; }
|
||||
public virtual DbSet<TipoDocumento> TipoDocumento { get; set; }
|
||||
public virtual DbSet<TipoEmisor> TipoEmisor { get; set; }
|
||||
public virtual DbSet<TipoEstado> TipoEstado { get; set; }
|
||||
public virtual DbSet<TipoForo> TipoForo { get; set; }
|
||||
public virtual DbSet<TipoMatriz> TipoMatriz { get; set; }
|
||||
public virtual DbSet<Usuario> Usuario { get; set; }
|
||||
public virtual DbSet<BitacoraDocumentos> BitacoraDocumentos { get; set; }
|
||||
public virtual DbSet<Documentos> Documentos { get; set; }
|
||||
public virtual DbSet<DocumentosAdjuntos> DocumentosAdjuntos { get; set; }
|
||||
public virtual DbSet<ComentariosForo> ComentariosForo { get; set; }
|
||||
public virtual DbSet<ComentariosMatriz> ComentariosMatriz { get; set; }
|
||||
public virtual DbSet<Convocatoria> Convocatoria { get; set; }
|
||||
public virtual DbSet<Foro> Foro { get; set; }
|
||||
public virtual DbSet<Matriz> Matriz { get; set; }
|
||||
public virtual DbSet<ConvocatoriaProyectoNormativo> ConvocatoriaProyectoNormativo { get; set; }
|
||||
public virtual DbSet<ProyectoNormativo> ProyectoNormativo { get; set; }
|
||||
|
||||
protected override void OnModelCreating(DbModelBuilder modelBuilder)
|
||||
{
|
||||
modelBuilder.Entity<Aplicacion>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Aplicacion>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Aplicacion>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Categoria>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Categoria>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Categoria>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Emisor>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Emisor>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Emisor>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Estado>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Estado>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Estado>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Mantenimiento>()
|
||||
.Property(e => e.Catalogo)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Mantenimiento>()
|
||||
.Property(e => e.Vista)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Mantenimiento>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Mantenimiento>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Pantallas>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Pantallas>()
|
||||
.Property(e => e.Vista)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Pantallas>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Pantallas>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<PlantillaEmail>()
|
||||
.Property(e => e.NombrePlatilla)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<PlantillaEmail>()
|
||||
.Property(e => e.Body)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<PlantillaEmail>()
|
||||
.Property(e => e.Subject)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<PlantillaEmail>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<PlantillaEmail>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Roles>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Roles>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Roles>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<RolesPantallas>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<RolesPantallas>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<RolesUsuario>()
|
||||
.Property(e => e.UsuarioSistema)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<RolesUsuario>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<RolesUsuario>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoAplicacion>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoAplicacion>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoAplicacion>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoDocumento>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoDocumento>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoDocumento>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEmisor>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEmisor>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEmisor>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEstado>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEstado>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoEstado>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoForo>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoForo>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoForo>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoMatriz>()
|
||||
.Property(e => e.Descripcion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoMatriz>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<TipoMatriz>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.Property(e => e.UsuarioSistema)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.Property(e => e.NombreUsuario)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.Property(e => e.EmailUsuario)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Usuario>()
|
||||
.HasMany(e => e.ConvocatoriaProyectoNormativo)
|
||||
.WithRequired(e => e.Usuario)
|
||||
.WillCascadeOnDelete(false);
|
||||
|
||||
modelBuilder.Entity<BitacoraDocumentos>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<BitacoraDocumentos>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Documentos>()
|
||||
.Property(e => e.NombreDocumento)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Documentos>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Documentos>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Documentos>()
|
||||
.HasMany(e => e.BitacoraDocumentos)
|
||||
.WithRequired(e => e.Documentos)
|
||||
.WillCascadeOnDelete(false);
|
||||
|
||||
modelBuilder.Entity<DocumentosAdjuntos>()
|
||||
.Property(e => e.Nombre)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<DocumentosAdjuntos>()
|
||||
.Property(e => e.TipoArchivo)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<DocumentosAdjuntos>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<DocumentosAdjuntos>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosForo>()
|
||||
.Property(e => e.Asunto)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosForo>()
|
||||
.Property(e => e.Respuesta)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosForo>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosForo>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.Asunto)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.Capitulo)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.ApartadoSeccionParrafo)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.TextoOriginal)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.TextoPropuesto)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.ComentarioObservacionJustificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ComentariosMatriz>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Convocatoria>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Convocatoria>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Foro>()
|
||||
.Property(e => e.Tema)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Foro>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Foro>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Foro>()
|
||||
.HasMany(e => e.Convocatoria)
|
||||
.WithRequired(e => e.Foro)
|
||||
.WillCascadeOnDelete(false);
|
||||
|
||||
modelBuilder.Entity<Matriz>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<Matriz>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ConvocatoriaProyectoNormativo>()
|
||||
.Property(e => e.UsuarioSistema)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ConvocatoriaProyectoNormativo>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ConvocatoriaProyectoNormativo>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ProyectoNormativo>()
|
||||
.Property(e => e.NombreProyectoNormativo)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ProyectoNormativo>()
|
||||
.Property(e => e.UsuarioCreacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ProyectoNormativo>()
|
||||
.Property(e => e.UsuarioModificacion)
|
||||
.IsUnicode(false);
|
||||
|
||||
modelBuilder.Entity<ProyectoNormativo>()
|
||||
.HasMany(e => e.ConvocatoriaProyectoNormativo)
|
||||
.WithRequired(e => e.ProyectoNormativo)
|
||||
.WillCascadeOnDelete(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
38
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/TipoProyecto.cs
Normal file
38
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/TipoProyecto.cs
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
namespace AYA.SlnSinortModel.Sinort
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.Spatial;
|
||||
|
||||
[Table("Catalogos.TipoProyecto")]
|
||||
public partial class TipoProyecto
|
||||
{
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2214:DoNotCallOverridableMethodsInConstructors")]
|
||||
public TipoProyecto()
|
||||
{
|
||||
ProyectoNormativo = new HashSet<ProyectoNormativo>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||
public int IdTipoProyecto { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Descripcion { get; set; }
|
||||
|
||||
public DateTime? FechaCreacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string UsuarioCreacion { get; set; }
|
||||
|
||||
public DateTime? FechaModificacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string UsuarioModificacion { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ProyectoNormativo> ProyectoNormativo { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public Usuario()
|
||||
{
|
||||
RolesUsuario = new HashSet<RolesUsuario>();
|
||||
ConvocatoriaProyectoNormativo = new HashSet<ConvocatoriaProyectoNormativo>();
|
||||
Convocatoria = new HashSet<Convocatoria>();
|
||||
}
|
||||
|
||||
[Key]
|
||||
|
|
@ -42,6 +42,6 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
public virtual ICollection<RolesUsuario> RolesUsuario { get; set; }
|
||||
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]
|
||||
public virtual ICollection<ConvocatoriaProyectoNormativo> ConvocatoriaProyectoNormativo { get; set; }
|
||||
public virtual ICollection<Convocatoria> Convocatoria { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
24
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/sysdiagrams.cs
Normal file
24
AYA.SlnSynor/AYA.SlnSynorModel/Sinort/sysdiagrams.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
namespace AYA.SlnSinortModel.Sinort
|
||||
{
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Data.Entity.Spatial;
|
||||
|
||||
public partial class sysdiagrams
|
||||
{
|
||||
[Required]
|
||||
[StringLength(128)]
|
||||
public string name { get; set; }
|
||||
|
||||
public int principal_id { get; set; }
|
||||
|
||||
[Key]
|
||||
public int diagram_id { get; set; }
|
||||
|
||||
public int? version { get; set; }
|
||||
|
||||
public byte[] definition { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue