git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C88
This commit is contained in:
parent
f4d0295876
commit
815c736abd
12 changed files with 206 additions and 330 deletions
|
|
@ -97,7 +97,7 @@ namespace AYA.SlnSinort.WCF
|
|||
|
||||
#region PropuestaNormativa
|
||||
[OperationContract]
|
||||
List<ProyectoNormativo> ObtenerSitios();
|
||||
ProyectoNormativoJSON ObtenerSitios();
|
||||
#endregion
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -353,18 +353,19 @@ namespace AYA.SlnSinort.WCF
|
|||
#endregion
|
||||
|
||||
#region ProyectoNormativo
|
||||
public List<ProyectoNormativo> ObtenerSitios()
|
||||
public ProyectoNormativoJSON ObtenerSitios()
|
||||
{
|
||||
List<ProyectoNormativo> respuesta = null;
|
||||
ProyectoNormativoJSON model = new ProyectoNormativoJSON();
|
||||
try
|
||||
{
|
||||
respuesta = new ProyectoNormativoDAL().ObtenerSitios();
|
||||
model = new ProyectoNormativoDAL().ObtenerSitios();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
return respuesta;
|
||||
return model;
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
|
|
|||
|
|
@ -186,6 +186,8 @@ this.Datepicker = function (ControlId) {
|
|||
|
||||
$(ControlId).datepicker({ yearRange: '1945:' + ((new Date).getFullYear() + 50), defaultDate: _dateObject }).datepicker('widget').wrap('<div class="ll-skin-cangas"/>');
|
||||
|
||||
$(ControlId).attr('readonly', true);
|
||||
$(ControlId).css('cursor', 'pointer');
|
||||
|
||||
};
|
||||
|
||||
|
|
@ -769,6 +771,18 @@ $.fn.noRequired = function () {
|
|||
|
||||
};
|
||||
|
||||
$.fn.readOnly = function () {
|
||||
this.attr('readonly', true);
|
||||
this.css('cursor', 'not-allowed');
|
||||
}
|
||||
|
||||
|
||||
$.fn.noReadOnly = function () {
|
||||
this.attr('readonly', false);
|
||||
this.css('cursor', 'default');
|
||||
}
|
||||
|
||||
|
||||
$.fn.TableInit = function (columnOrder, order, bPaginate, bFilter, bInfo, columnDefinition, data) {
|
||||
|
||||
var ES = {
|
||||
|
|
@ -1650,138 +1664,4 @@ $.datepicker.regional['es'] = {
|
|||
showMonthAfterYear: false,
|
||||
yearSuffix: ''
|
||||
};
|
||||
$.datepicker.setDefaults($.datepicker.regional['es']);
|
||||
|
||||
function getDateFromFormat(val, format) {
|
||||
val = val + "";
|
||||
format = format + "";
|
||||
var i_val = 0;
|
||||
var i_format = 0;
|
||||
var c = "";
|
||||
var token = "";
|
||||
var token2 = "";
|
||||
var x, y;
|
||||
var now = new Date();
|
||||
var year = now.getYear();
|
||||
var month = now.getMonth() + 1;
|
||||
var date = 1;
|
||||
var hh = now.getHours();
|
||||
var mm = now.getMinutes();
|
||||
var ss = now.getSeconds();
|
||||
var ampm = "";
|
||||
|
||||
while (i_format < format.length) {
|
||||
// Get next token from format string
|
||||
c = format.charAt(i_format);
|
||||
token = "";
|
||||
while ((format.charAt(i_format) == c) && (i_format < format.length)) {
|
||||
token += format.charAt(i_format++);
|
||||
}
|
||||
// Extract contents of value based on format token
|
||||
if (token == "yyyy" || token == "yy" || token == "y") {
|
||||
if (token == "yyyy") { x = 4; y = 4; }
|
||||
if (token == "yy") { x = 2; y = 2; }
|
||||
if (token == "y") { x = 2; y = 4; }
|
||||
year = _getInt(val, i_val, x, y);
|
||||
if (year == null) { return 0; }
|
||||
i_val += year.length;
|
||||
if (year.length == 2) {
|
||||
if (year > 70) { year = 1900 + (year - 0); }
|
||||
else { year = 2000 + (year - 0); }
|
||||
}
|
||||
}
|
||||
else if (token == "MMM" || token == "NNN") {
|
||||
month = 0;
|
||||
for (var i = 0; i < MONTH_NAMES.length; i++) {
|
||||
var month_name = MONTH_NAMES[i];
|
||||
if (val.substring(i_val, i_val + month_name.length).toLowerCase() == month_name.toLowerCase()) {
|
||||
if (token == "MMM" || (token == "NNN" && i > 11)) {
|
||||
month = i + 1;
|
||||
if (month > 12) { month -= 12; }
|
||||
i_val += month_name.length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if ((month < 1) || (month > 12)) { return 0; }
|
||||
}
|
||||
else if (token == "EE" || token == "E") {
|
||||
for (var i = 0; i < DAY_NAMES.length; i++) {
|
||||
var day_name = DAY_NAMES[i];
|
||||
if (val.substring(i_val, i_val + day_name.length).toLowerCase() == day_name.toLowerCase()) {
|
||||
i_val += day_name.length;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (token == "MM" || token == "M") {
|
||||
month = _getInt(val, i_val, token.length, 2);
|
||||
if (month == null || (month < 1) || (month > 12)) { return 0; }
|
||||
i_val += month.length;
|
||||
}
|
||||
else if (token == "dd" || token == "d") {
|
||||
date = _getInt(val, i_val, token.length, 2);
|
||||
if (date == null || (date < 1) || (date > 31)) { return 0; }
|
||||
i_val += date.length;
|
||||
}
|
||||
else if (token == "hh" || token == "h") {
|
||||
hh = _getInt(val, i_val, token.length, 2);
|
||||
if (hh == null || (hh < 1) || (hh > 12)) { return 0; }
|
||||
i_val += hh.length;
|
||||
}
|
||||
else if (token == "HH" || token == "H") {
|
||||
hh = _getInt(val, i_val, token.length, 2);
|
||||
if (hh == null || (hh < 0) || (hh > 23)) { return 0; }
|
||||
i_val += hh.length;
|
||||
}
|
||||
else if (token == "KK" || token == "K") {
|
||||
hh = _getInt(val, i_val, token.length, 2);
|
||||
if (hh == null || (hh < 0) || (hh > 11)) { return 0; }
|
||||
i_val += hh.length;
|
||||
}
|
||||
else if (token == "kk" || token == "k") {
|
||||
hh = _getInt(val, i_val, token.length, 2);
|
||||
if (hh == null || (hh < 1) || (hh > 24)) { return 0; }
|
||||
i_val += hh.length; hh--;
|
||||
}
|
||||
else if (token == "mm" || token == "m") {
|
||||
mm = _getInt(val, i_val, token.length, 2);
|
||||
if (mm == null || (mm < 0) || (mm > 59)) { return 0; }
|
||||
i_val += mm.length;
|
||||
}
|
||||
else if (token == "ss" || token == "s") {
|
||||
ss = _getInt(val, i_val, token.length, 2);
|
||||
if (ss == null || (ss < 0) || (ss > 59)) { return 0; }
|
||||
i_val += ss.length;
|
||||
}
|
||||
else if (token == "a") {
|
||||
if (val.substring(i_val, i_val + 2).toLowerCase() == "am") { ampm = "AM"; }
|
||||
else if (val.substring(i_val, i_val + 2).toLowerCase() == "pm") { ampm = "PM"; }
|
||||
else { return 0; }
|
||||
i_val += 2;
|
||||
}
|
||||
else {
|
||||
if (val.substring(i_val, i_val + token.length) != token) { return 0; }
|
||||
else { i_val += token.length; }
|
||||
}
|
||||
}
|
||||
// If there are any trailing characters left in the value, it doesn't match
|
||||
if (i_val != val.length) { return 0; }
|
||||
// Is date valid for month?
|
||||
if (month == 2) {
|
||||
// Check for leap year
|
||||
if (((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0)) { // leap year
|
||||
if (date > 29) { return 0; }
|
||||
}
|
||||
else { if (date > 28) { return 0; } }
|
||||
}
|
||||
if ((month == 4) || (month == 6) || (month == 9) || (month == 11)) {
|
||||
if (date > 30) { return 0; }
|
||||
}
|
||||
// Correct hours value
|
||||
if (hh < 12 && ampm == "PM") { hh = hh - 0 + 12; }
|
||||
else if (hh > 11 && ampm == "AM") { hh -= 12; }
|
||||
var newdate = new Date(year, month - 1, date, hh, mm, ss);
|
||||
return newdate.getTime();
|
||||
}
|
||||
|
||||
$.datepicker.setDefaults($.datepicker.regional['es']);
|
||||
|
|
@ -91,7 +91,6 @@ this.AgregarUsuario = function () {
|
|||
[participanteConfirmado,
|
||||
$("#hiddenUsuario").val(),
|
||||
$("#txtUsuario").val(),
|
||||
null,
|
||||
moment().format('DD-MM-YYYY'),
|
||||
option])
|
||||
.draw();
|
||||
|
|
|
|||
|
|
@ -1,17 +1,17 @@
|
|||
var SelectedCatalog = '';
|
||||
var model = {};
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
|
||||
getDataModel();
|
||||
|
||||
|
||||
});
|
||||
|
||||
this.getDataModel = function () {
|
||||
CargarEmisor();
|
||||
CargarAplicacion();
|
||||
CargarUsuarios();
|
||||
|
||||
$("#btnBuscarUsuario").unbind("click");
|
||||
$("#btnBuscarUsuario").click(function () {
|
||||
BuscarUsuario();
|
||||
|
|
@ -21,38 +21,67 @@ this.getDataModel = function () {
|
|||
$("#btnAgregarUsuario").click(function () {
|
||||
AgregarUsuario();
|
||||
});
|
||||
$('#btnGuardarPropuesta').click(function () {
|
||||
|
||||
$("#btnBuscarEmisor").unbind("click");
|
||||
$("#btnBuscarEmisor").click(function () {
|
||||
|
||||
SelectedCatalog = 'Emisor';
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableEmisor')) {
|
||||
|
||||
LoadMessage();
|
||||
|
||||
$('#tableEmisor').DataTable().search('').draw();
|
||||
|
||||
$('#modalEmisor').modal('show');
|
||||
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnBuscarAplicacion").unbind("click");
|
||||
$("#btnBuscarAplicacion").click(function () {
|
||||
|
||||
SelectedCatalog = 'Aplicacion';
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableAplicacion')) {
|
||||
|
||||
LoadMessage();
|
||||
|
||||
$('#tableAplicacion').DataTable().search('').draw();
|
||||
|
||||
$('#modalAplicacion').modal('show');
|
||||
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
$("#btnGuardar").unbind("click");
|
||||
$('#btnGuardar').click(function () {
|
||||
GuardarPropuesta();
|
||||
});
|
||||
|
||||
$('#GridConvocados').TableInit(0, false, true, true, false, null, null);
|
||||
|
||||
$(function () {
|
||||
$("#txtFechaInicio").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
});
|
||||
$(function () {
|
||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||
});
|
||||
|
||||
$('#tableParticipantes').TableInit(0, false, true, true, false, null, null);
|
||||
$("#txtFechaInicio").datepicker();
|
||||
$("#txtFechaFinalizacion").datepicker();
|
||||
$("#txtFechaMaximaConfirmarParticipacion").datepicker();
|
||||
}
|
||||
|
||||
|
||||
this.CargarEmisor = function (filtro) {
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerEmisorPopUp';
|
||||
var model= {
|
||||
var model = {
|
||||
IdTipo: 1,
|
||||
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||
filtro: filtro == null ? '' : '&filtro=' + filtro
|
||||
}
|
||||
|
||||
AjaxPostData(uri, model, false, false, CargarGridEmisores, null, null);
|
||||
|
||||
AjaxPostData(uri, model, false, false, CargarGridEmisores, null, null);
|
||||
|
||||
}
|
||||
|
||||
this.CargarGridEmisores = function (data) {
|
||||
this.CargarGridEmisores = function (data) {
|
||||
|
||||
if (data != null) {
|
||||
|
||||
|
|
@ -75,39 +104,6 @@ this.CargarGridEmisores = function (data) {
|
|||
}
|
||||
}
|
||||
|
||||
$('#tableEmisor').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableEmisor').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (SelectedCatalog == "ObtenerEmisor") {
|
||||
|
||||
$('#hiddenEmisor').val(data.codigo);
|
||||
$('#txtEmisor').val(data.descripcion);
|
||||
}
|
||||
$('#modalEmisor').modal('hide');
|
||||
|
||||
});
|
||||
|
||||
$("#btnBuscarEmisor").click(function () {
|
||||
|
||||
|
||||
SelectedCatalog = 'ObtenerEmisor';
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableEmisor')) {
|
||||
|
||||
LoadMessage();
|
||||
|
||||
$('#tableEmisor').DataTable().search('').draw();
|
||||
|
||||
$('#modalEmisor').modal('show');
|
||||
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.CargarAplicacion = function (filtro) {
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerAplicacionPopUp';
|
||||
|
|
@ -143,48 +139,6 @@ this.CargarGridAplicacion = function (data) {
|
|||
}
|
||||
}
|
||||
|
||||
$('#tableAplicacion').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableAplicacion').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (SelectedCatalog == "ObtenerAplicacion") {
|
||||
|
||||
$('#hiddenAplicacion').val(data.codigo);
|
||||
$('#txtAplicacion').val(data.descripcion);
|
||||
}
|
||||
$('#modalAplicacion').modal('hide');
|
||||
|
||||
});
|
||||
|
||||
$("#btnBuscarAplicacion").click(function () {
|
||||
|
||||
|
||||
SelectedCatalog = 'ObtenerAplicacion';
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableAplicacion')) {
|
||||
|
||||
LoadMessage();
|
||||
|
||||
$('#tableAplicacion').DataTable().search('').draw();
|
||||
|
||||
$('#modalAplicacion').modal('show');
|
||||
|
||||
ENDREQUEST();
|
||||
|
||||
}
|
||||
});
|
||||
this.AbrirConvocados = function () {
|
||||
|
||||
$("#modalConvocados").modal('show');
|
||||
|
||||
}
|
||||
|
||||
$('#tableParticipantes').on('click', 'button', function () {
|
||||
|
||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||
tableParticipantes.row($(this).parents('tr')).remove().draw();
|
||||
});
|
||||
|
||||
this.CargarUsuarios = function (filtro) {
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerUsuario';
|
||||
|
|
@ -214,6 +168,12 @@ this.CargarGridUsuarios = function (data) {
|
|||
ENDREQUEST();
|
||||
}
|
||||
|
||||
this.AbrirConvocados = function () {
|
||||
|
||||
$("#modalConvocados").modal('show');
|
||||
|
||||
}
|
||||
|
||||
this.BuscarUsuario = function () {
|
||||
SelectedCatalog = 'Usuarios';
|
||||
|
||||
|
|
@ -245,6 +205,45 @@ this.AgregarUsuario = function () {
|
|||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
|
||||
this.LimpiarUsuario = function () {
|
||||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
|
||||
//TABLES
|
||||
$('#tableAplicacion').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableAplicacion').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (SelectedCatalog == "Aplicacion") {
|
||||
|
||||
$('#hiddenAplicacion').val(data.codigo);
|
||||
$('#txtAplicacion').val(data.descripcion);
|
||||
}
|
||||
$('#modalAplicacion').modal('hide');
|
||||
|
||||
});
|
||||
|
||||
$('#tableParticipantes').on('click', 'button', function () {
|
||||
|
||||
var tableParticipantes = $('#tableParticipantes').DataTable();
|
||||
tableParticipantes.row($(this).parents('tr')).remove().draw();
|
||||
});
|
||||
|
||||
$('#tableEmisor').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableEmisor').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
if (SelectedCatalog == "Emisor") {
|
||||
|
||||
$('#hiddenEmisor').val(data.codigo);
|
||||
$('#txtEmisor').val(data.descripcion);
|
||||
}
|
||||
$('#modalEmisor').modal('hide');
|
||||
|
||||
});
|
||||
|
||||
$('#tableUsuarios').on('click', 'button', function () {
|
||||
|
||||
var data = $('#tableUsuarios').DataTable().row($(this).parents('tr')).data();
|
||||
|
|
@ -257,10 +256,6 @@ $('#tableUsuarios').on('click', 'button', function () {
|
|||
$('#modalUsuario').modal('hide');
|
||||
|
||||
});
|
||||
this.LimpiarUsuario = function () {
|
||||
$('#hiddenUsuario').val('');
|
||||
$('#txtUsuario').val('');
|
||||
}
|
||||
|
||||
this.GuardarPropuesta = function () {
|
||||
|
||||
|
|
@ -272,25 +267,8 @@ this.GuardarPropuesta = function () {
|
|||
if (!confirm("Va a ingresar una nueva propuesta normativa .\n ¿Desea continuar?"))
|
||||
{ return; }
|
||||
|
||||
|
||||
TableItems = $('#TableItems').DataTable();
|
||||
PropuestaNormativa
|
||||
= {
|
||||
NombreProyectoNormativo: $("#txtProyectoNormativo").val(),
|
||||
IdTipoProyecto: 1,
|
||||
IdEmisor: $('#hiddenEmisor').val(),
|
||||
IdAplicacion: $('#hiddenAplicacion').val(),
|
||||
|
||||
FechaInicioConsulta: $("#txtFechaInicio").val(),
|
||||
FechaFinConsulta: $("#txtFechaFinalizacion").val(),
|
||||
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
||||
IdEstado : 1,
|
||||
FechaMaximaConfirmarParticipacion: $("#txtFechaMaximaConfirmarParticipacion").val()
|
||||
}
|
||||
model = {
|
||||
ProyectoNormativo: PropuestaNormativa
|
||||
}
|
||||
var uri = SinortWCF + '/api/GuardarProyectoNormativo';
|
||||
LeerFormulario();
|
||||
AjaxPostData(uri, model, true, true, null, null, true);
|
||||
|
||||
ENDREQUEST();
|
||||
|
|
@ -336,4 +314,28 @@ this.GuardarConvocadosPropuestaNormativa = function () {
|
|||
|
||||
}
|
||||
|
||||
this.LeerFormulario = function () {
|
||||
|
||||
var PropuestaNormativa
|
||||
= {
|
||||
NombreProyectoNormativo: $("#txtProyectoNormativo").val(),
|
||||
IdTipoProyecto: 1,
|
||||
IdEmisor: $('#hiddenEmisor').val(),
|
||||
IdAplicacion: $('#hiddenAplicacion').val(),
|
||||
FechaInicioConsulta: $("#txtFechaInicio").val(),
|
||||
FechaFinConsulta: $("#txtFechaFinalizacion").val(),
|
||||
PromotorProyecto: $("#txtPromotorProyecto").val(),
|
||||
IdEstado: 1
|
||||
}
|
||||
|
||||
var momentFechaInicio = moment($("#txtFechaInicio").val(), "DD-MMMM-YYYY");
|
||||
PropuestaNormativa.FechaInicioConsulta = momentFechaInicio.format("MM-DD-YYYY");
|
||||
|
||||
var momentFechaFin = moment($("#txtFechaFinalizacion").val(), "DD-MMMM-YYYY");
|
||||
PropuestaNormativa.FechaFinConsulta = momentFechaFin.format("MM-DD-YYYY");
|
||||
|
||||
var momentFechaMaxima = moment($("#txtFechaMaximaConfirmarParticipacion").val(), "DD-MMMM-YYYY");
|
||||
PropuestaNormativa.FechaMaximaConfirmarParticipacion = momentFechaMaxima.format("MM-DD-YYYY");
|
||||
|
||||
model.ProyectoNormativo = PropuestaNormativa;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,17 +9,15 @@ jQuery(document).ready(function () {
|
|||
this.CargarSitios = function () {
|
||||
|
||||
var uri = CatalogosWCF + '/api/ObtenerSitios';
|
||||
AjaxPostData(uri, Item, true, false, CargarTablaSitios, null, null);
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarTablaSitios = function (data) {
|
||||
|
||||
if (data != null) {
|
||||
lista = data;
|
||||
if (data != null && data.ProyectosNormativos != null) {
|
||||
ProyectosNormativos = data.ProyectosNormativos;
|
||||
var Seleccionar = $("#ucbtnVista").html();
|
||||
|
||||
|
||||
|
||||
var columnDefinition = [
|
||||
{ "data": "IdProyectoNormativo","visible":false },
|
||||
{ "data": "NombreProyectoNormativo" },
|
||||
|
|
@ -27,7 +25,7 @@ this.CargarTablaSitios = function (data) {
|
|||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||
];
|
||||
|
||||
$('#tableSitios').TableInit(1, true, true, true, true, columnDefinition, lista);
|
||||
$('#tableSitios').TableInit(1, true, true, true, true, columnDefinition, ProyectosNormativos);
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableSitios')) {
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
@*---------------------Nombre Proyecto ---------------------------------------------------------*@
|
||||
<div class="form-group " id="divNombreProyecto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblNombreProyecto">Proyecto</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtNombreProyecto" class="form-control imput-xs" id="txtNombreProyecto" readonly type="text" style="cursor:not-allowed" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -35,7 +35,7 @@
|
|||
@*---------------------Promotor Proyecto---------------------------------------------------------*@
|
||||
<div class="form-group " id="divPromotorProyecto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblPromotorProyecto">Promotor</label>
|
||||
<div class="col-sm-8">
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtPromotorProyecto" class="form-control imput-xs" id="txtPromotorProyecto" readonly type="text" style="cursor:not-allowed" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -43,7 +43,7 @@
|
|||
@*---------------------Estado Proyecto---------------------------------------------------------*@
|
||||
<div class="form-group" id="divEstadoProyecto">
|
||||
<label class="col-sm-4 control-label ControlsForms">Estado </label>
|
||||
<div class="col-sm-6">
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input id="txtEstado" name="txtEstado" class="form-control imput-xs" readonly type="text" style="cursor:not-allowed" />
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -54,7 +54,7 @@
|
|||
<div class="form-group" id="divFechaInicio">
|
||||
<label class="col-md-5 control-label ControlsForms" id="lblFechaInicio">Fecha de Inicio</label>
|
||||
|
||||
<div class=" input-group col-md-6">
|
||||
<div class=" input-group input-group-sm 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" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
|
@ -64,12 +64,24 @@
|
|||
<div class="form-group" id="divFechaFinalizacion">
|
||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaFinalizacion">Fecha de Cierre</label>
|
||||
|
||||
<div class=" input-group col-md-6">
|
||||
<div class=" input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaFinalizacion"></i></span>
|
||||
<input name="txtFechaFinalizacion" disabled="disabled" class="form-control imput-xs" id="txtFechaFinalizacion" type="text" readonly dateformat="DD-MMMM-YYYY" style="cursor:not-allowed">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@*---------------------Fecha de finalización de consulta---------------------------------------------*@
|
||||
<div class="form-group" id="divFechaMaxima">
|
||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaMaxima">Fecha Máx. Confirmación</label>
|
||||
|
||||
<div class=" input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaxima"></i></span>
|
||||
<input name="txtFechaMaxima" disabled="disabled" class="form-control imput-xs" id="txtFechaMaxima" type="text" readonly dateformat="DD-MMMM-YYYY" style="cursor:not-allowed">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
|
@ -86,7 +98,6 @@
|
|||
<th>Participante</th>
|
||||
<th></th>
|
||||
<th class="col-sm-4">Nombre</th>
|
||||
<th class="col-sm-4">Fecha Máxima Confirmación</th>
|
||||
<th class="col-sm-4">Fecha Creación</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,4 @@
|
|||
@*@section ButtonOption {
|
||||
|
||||
}*@
|
||||
|
||||
@{
|
||||
@{
|
||||
ViewBag.Title = "Propuesta Normativa";
|
||||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
|
||||
|
|
@ -14,28 +10,30 @@
|
|||
<div class="panel panel-success">
|
||||
|
||||
<div class="panel-body">
|
||||
@*<div class="well well-sm">*@
|
||||
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
|
||||
@*---------------------Proyecto normativo---------------------------------------------------------*@
|
||||
|
||||
<div class="form-group " id="divProyectoNormativo">
|
||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblProyectoNormativo">Proyecto normativo</label>
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtProyectoNormativo" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtProyectoNormativo" required="required" type="text" placeholder="" data-original-title="">
|
||||
@*---------------------Nombre Proyecto ---------------------------------------------------------*@
|
||||
<div class="form-group " id="divNombreProyecto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblNombreProyecto">Proyecto</label>
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
||||
<input name="txtNombreProyecto" class="form-control imput-xs" id="txtNombreProyecto" required type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*---------------------Promotor Proyecto---------------------------------------------------------*@
|
||||
<div class="form-group " id="divPromotorProyecto">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblPromotorProyecto">Promotor</label>
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input name="txtPromotorProyecto" class="form-control imput-xs" id="txtPromotorProyecto" required type="text" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@*---------------------Emisor---------------------------------------------------------*@
|
||||
|
||||
<div class="form-group" id="divEmisor">
|
||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblEmisor" for="txtTramite">Emisor</label>
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblEmisor">Emisor</label>
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input id="hiddenEmisor" type="hidden">
|
||||
<input name="txtEmisor" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtEmisor" required="required" type="text" readonly="readonly" data-original-title="">
|
||||
|
|
@ -44,46 +42,44 @@
|
|||
<button class="btn btn-default btn-medium" id="btn_eliminarEmisor" type="button">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnBuscarEmisor" type="button" usehttppost="0" webapplication="">
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnBuscarEmisor" type="button">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*---------------------Aplicación---------------------------------------------------------*@
|
||||
|
||||
<div class="form-group" id="divAplicacion">
|
||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblAplicacion" for="txtTramite">Aplicación</label>
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblaplicacion">Aplicación</label>
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<input id="hiddenAplicacion" type="hidden">
|
||||
<input name="txtAplicacion" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtAplicacion" required="required" type="text" readonly="readonly" data-original-title="">
|
||||
<input name="txtAplicacion" title="" class="form-control TextBoxCatalogo inputWarning error" id="txtAplicacion" required="required" type="text" readonly="readonly">
|
||||
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default btn-medium" id="btn_eliminarAplicacion" type="button">
|
||||
<i class="fa fa-close"></i>
|
||||
</button>
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnBuscarAplicacion" type="button" usehttppost="0" webapplication="">
|
||||
<button class="btn btn-success btn-medium btn-margin-catalogo" id="btnBuscarAplicacion" type="button">
|
||||
<i class="fa fa-search"></i>
|
||||
</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
@*---------------------Convocados---------------------------------------------------------*@
|
||||
|
||||
<div class="form-group " id="divConvocados">
|
||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblConvocados">Convocados</label>
|
||||
<div class="input-group col-lg-5 col-md-5 col-sm-5 col-xs-4">
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblConvocados">Convocados</label>
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<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
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
|
|
@ -91,58 +87,46 @@
|
|||
@*---------------------Fecha de inicio de consulta---------------------------------------------*@
|
||||
|
||||
<div class="form-group" id="divFechaInicio">
|
||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaInicio">Fecha de inicio de consulta</label>
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblFechaInicio">Fecha de Inicio</label>
|
||||
|
||||
<div class="input-group 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">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaInicio"></i></span>
|
||||
<input name="txtFechaInicio" class="form-control imput-xs" id="txtFechaInicio" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@*---------------------Fecha de finalización de consulta---------------------------------------------*@
|
||||
|
||||
<div class="form-group" id="divFechaFinalizacionConsulta">
|
||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaFinalizacionConsulta">Fecha de finalización de consulta</label>
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblFechaFinalizacionConsulta">Fecha de Cierre</label>
|
||||
|
||||
<div class="input-group col-lg-6 col-md-6 col-xs-6">
|
||||
<div class="input-group input-group-sm col-lg-6 col-md-6 col-sm-6 col-xs-6">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaFinalizacionConsulta"></i></span>
|
||||
<input name="txtFechaFinalizacion" class="form-control imput-xs" id="txtFechaFinalizacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
<input name="txtFechaFinalizacion" class="form-control imput-xs" id="txtFechaFinalizacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
@*---------------------Promotor del proyecto---------------------------------------------------------*@
|
||||
|
||||
<div class="form-group " id="divPromotorProyecto">
|
||||
<label class="col-lg-5 col-md-5 col-sm-5 col-xs-5 control-label ControlsForms" id="lblPromotorProyecto">Promotor del proyecto</label>
|
||||
<div class="input-group col-lg-6 col-md-6 col-sm-6 col-xs-6 ">
|
||||
<input name="txtPromotorProyecto" title="" class="form-control imput-xs TextBoxFramework inputWarning error" id="txtPromotorProyecto" required="required" type="text" placeholder="" data-original-title="">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@*---------------------Fecha máxima para confirmar participación date---------------------------------------------*@
|
||||
|
||||
<div class="form-group" id="divFechaMaximaConfirmarParticipacion">
|
||||
<label class="col-lg-5 col-md-5 col-xs-5 control-label ControlsForms" id="lblFechaMaximaConfirmarParticipacion">Fecha máxima para confirmar participación</label>
|
||||
<label class="col-sm-4 control-label ControlsForms" id="lblFechaMaximaConfirmarParticipacion">Fecha Máx. Confirmación</label>
|
||||
|
||||
<div class="input-group 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">
|
||||
<span class="input-group-addon"><i class="fa fa-calendar" id="iconFechaMaximaConfirmarParticipacion"></i></span>
|
||||
<input name="txtFechaMaximaConfirmarParticipacion" class="form-control imput-xs" id="txtFechaMaximaConfirmarParticipacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY" >
|
||||
<input name="txtFechaMaximaConfirmarParticipacion" class="form-control imput-xs" id="txtFechaMaximaConfirmarParticipacion" type="text" readonly="readonly" dateformat="DD-MMMM-YYYY">
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-success btn-sm" id="btnGuardarPropuesta">
|
||||
<button type="button" id="btnGuardar" class="btn btn-success btn-medium" data-dismiss="modal">
|
||||
<i class="fa fa-floppy-o"></i> Guardar
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -42,43 +42,41 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
Conn.SaveChanges();
|
||||
Conn.Commit();
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
model.IdProyectoNormativo = model.ProyectoNormativo.IdProyectoNormativo;
|
||||
}
|
||||
}
|
||||
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()
|
||||
public ProyectoNormativoJSON ObtenerSitios()
|
||||
{
|
||||
List<ProyectoNormativo> registros = null;
|
||||
|
||||
|
||||
ProyectoNormativoJSON model = new ProyectoNormativoJSON();
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
|
||||
registros = db.ProyectoNormativo.Include(p=> p.TipoProyecto).AsNoTracking().ToList();
|
||||
|
||||
|
||||
model.ProyectosNormativos = db.ProyectoNormativo.Include(p=> p.TipoProyecto).AsNoTracking().ToList();
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
//log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
return registros;
|
||||
return model;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
registros = db.Usuario.Where(t => t.Estado == true).OrderBy(q => q.NombreUsuario).ToList();
|
||||
registros = db.Usuario.Where(t => t.Estado == true).OrderByDescending(q => q.NombreUsuario).ToList();
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,6 @@ namespace AYA.SlnSinortModel.Entidades
|
|||
{
|
||||
public ProyectoNormativo ProyectoNormativo { get; set; }
|
||||
public Convocatoria Convocado { get; set; }
|
||||
public int? IdProyectoNormativo { get; set; }
|
||||
public List<ProyectoNormativo> ProyectosNormativos { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,8 @@ namespace Atesa.Utilitarios
|
|||
var sr = new StreamReader(ms);
|
||||
var serializer = new Newtonsoft.Json.JsonSerializer();
|
||||
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false });
|
||||
serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" });
|
||||
|
||||
if (parameters.Length == 1)
|
||||
{
|
||||
// single parameter, assuming bare
|
||||
|
|
@ -112,6 +114,7 @@ namespace Atesa.Utilitarios
|
|||
serializer.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
|
||||
|
||||
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false });
|
||||
serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" });
|
||||
Message replyMessage = null;
|
||||
try
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue