This commit is contained in:
mumana 2018-06-21 18:24:33 +00:00
parent 5782e9f8d5
commit ea98aaac6f
3 changed files with 26 additions and 19 deletions

View file

@ -1074,6 +1074,19 @@ $.fn.dotNetFormat = function () {
return ''; return '';
}; };
$.fn.DateFormatWCF = function () {
if (this.val() != null && this.val() != '') {
var momentDate = moment(this.val(), "DD-MMMM-YYYY");
var dotNetFormatDate = momentDate.format("YYYY-MM-DD");
return dotNetFormatDate;
}
else
return '';
};
$.fn.CalculateLaboralAge = function (controlYear, controlMonth, controlEndDate) { $.fn.CalculateLaboralAge = function (controlYear, controlMonth, controlEndDate) {
if ($.trim(this.val()) == "") { if ($.trim(this.val()) == "") {

View file

@ -39,7 +39,7 @@ this.getDataModel = function () {
} }
}); });
$("#btnBuscarAplicacion").unbind("click"); $("#btnBuscarAplicacion").unbind("click");
$("#btnBuscarAplicacion").click(function () { $("#btnBuscarAplicacion").click(function () {
@ -74,14 +74,14 @@ this.CargarEmisor = function (filtro) {
var uri = CatalogosWCF + '/api/ObtenerEmisorPopUp'; var uri = CatalogosWCF + '/api/ObtenerEmisorPopUp';
var model = { var model = {
IdTipo: 1, 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) { if (data != null) {
@ -102,7 +102,7 @@ this.CargarGridEmisores = function (data) {
toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error); toastr.error("Ha ocurrido un error inesperado. Vuelva a intentarlo mas tarde", Message_Error);
} }
} }
this.CargarAplicacion = function (filtro) { this.CargarAplicacion = function (filtro) {
@ -315,20 +315,14 @@ this.LeerFormulario = function () {
IdTipoProyecto: 1, IdTipoProyecto: 1,
IdEmisor: $('#hiddenEmisor').val(), IdEmisor: $('#hiddenEmisor').val(),
IdAplicacion: $('#hiddenAplicacion').val(), IdAplicacion: $('#hiddenAplicacion').val(),
FechaInicioConsulta: $("#txtFechaInicio").val(),
FechaFinConsulta: $("#txtFechaFinalizacion").val(),
PromotorProyecto: $("#txtPromotorProyecto").val(), PromotorProyecto: $("#txtPromotorProyecto").val(),
IdEstado: 1 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");
PropuestaNormativa.FechaInicioConsulta = $("#txtFechaInicio").DateFormatWCF();
PropuestaNormativa.FechaFinConsulta = $("#txtFechaFinalizacion").DateFormatWCF();
PropuestaNormativa.FechaMaximaConfirmarParticipacion = $("#txtFechaMaximaConfirmarParticipacion").DateFormatWCF();
model.ProyectoNormativo = PropuestaNormativa; model.ProyectoNormativo = PropuestaNormativa;
} }

View file

@ -59,7 +59,7 @@ namespace Atesa.Utilitarios
var sr = new StreamReader(ms); var sr = new StreamReader(ms);
var serializer = new Newtonsoft.Json.JsonSerializer(); var serializer = new Newtonsoft.Json.JsonSerializer();
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false }); serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false });
serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" }); //serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" });
if (parameters.Length == 1) if (parameters.Length == 1)
{ {
@ -114,7 +114,7 @@ namespace Atesa.Utilitarios
serializer.PreserveReferencesHandling = PreserveReferencesHandling.Objects; serializer.PreserveReferencesHandling = PreserveReferencesHandling.Objects;
serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false }); serializer.Converters.Add(new StringEnumConverter { AllowIntegerValues = false, CamelCaseText = false });
serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" }); //serializer.Converters.Add(new IsoDateTimeConverter() { DateTimeFormat = "dd-MM-YYYY HH:mm:ss" });
Message replyMessage = null; Message replyMessage = null;
try try
{ {