git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C95
This commit is contained in:
parent
c96eb80e73
commit
5ab2bd6ca8
6 changed files with 115 additions and 5 deletions
|
|
@ -21,6 +21,8 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
ProyectoNormativoJSON GuardarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
|
||||
[OperationContract]
|
||||
ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model);
|
||||
//[OperationContract]
|
||||
//ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -63,6 +63,28 @@ namespace AYA.SlnSinort.WCF
|
|||
return model;
|
||||
}
|
||||
|
||||
public ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (model.ProyectoNormativo == null)
|
||||
{
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ADVERTENCIA;
|
||||
model.DescripcionRespuesta = "No se encontraron datos del proyecto normativo";
|
||||
return model;
|
||||
}
|
||||
|
||||
model = new ProyectoNormativoDAL().ObtenerProyectoNormativo(model);
|
||||
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
log.Error(ex);
|
||||
model.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
}
|
||||
return model;
|
||||
}
|
||||
|
||||
//public ProyectoNormativoJSON EliminarConvocatoriaProyectoNormativo(ProyectoNormativoJSON model)
|
||||
//{
|
||||
// try
|
||||
|
|
|
|||
|
|
@ -1,11 +1,20 @@
|
|||
var IDPropuesta;
|
||||
var model = {};
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
IDPropuesta = ObtenerParametros().propuesta;
|
||||
|
||||
if (IsNullOrEmpty(IDPropuesta))
|
||||
if (IsNullOrEmpty(IDPropuesta)) {
|
||||
alert("No ha seleccionado una propuesta");
|
||||
$("#formDetallePropuesta").FormReadOnly();
|
||||
return;
|
||||
}
|
||||
|
||||
$("#formDetallePropuesta").EnableValidationToolTip();
|
||||
model.ProyectoNormativo = {
|
||||
IdProyectoNormativo: IDPropuesta
|
||||
};
|
||||
|
||||
getDataModel();
|
||||
|
||||
|
|
@ -41,6 +50,43 @@ this.CargarUsuarios = function (filtro) {
|
|||
|
||||
}
|
||||
|
||||
this.ObtenerPropuesta = function () {
|
||||
var uri = SinortWCF + '/api/ObtenerProyectoNormativo';
|
||||
AjaxPostData(uri, model, false, true, CargarGridUsuarios, null, null);
|
||||
}
|
||||
|
||||
this.CargarFormulario = function () {
|
||||
|
||||
if (IsNullOrEmpty(model) || IsNullOrEmpty(model.ProyectoNormativo))
|
||||
return;
|
||||
|
||||
//INFORMACION GENERAL
|
||||
$("#txtNombreProyecto").val(model.ProyectoNormativo.NombreProyectoNormativo);
|
||||
$("#txtPromotorProyecto").val(model.ProyectoNormativo.PromotorProyecto);
|
||||
$("#txtEstado").val(model.ProyectoNormativo.Estado);
|
||||
|
||||
if (model.ProyectoNormativo.FechaInicioConsulta != null) {
|
||||
var fecha = DateFormatNoTime(model.ProyectoNormativo.FechaInicioConsulta);
|
||||
|
||||
if (fecha != "Invalid date")
|
||||
$("#txtFechaInicio").val(fecha);
|
||||
}
|
||||
|
||||
if (model.ProyectoNormativo.FechaFinConsulta != null) {
|
||||
var fecha = DateFormatNoTime(model.ProyectoNormativo.FechaFinConsulta);
|
||||
|
||||
if (fecha != "Invalid date")
|
||||
$("#txtFechaFinalizacion").val(fecha);
|
||||
}
|
||||
|
||||
if (model.ProyectoNormativo.FechaMaximaConfirmarParticipacion != null) {
|
||||
var fecha = DateFormatNoTime(model.ProyectoNormativo.FechaMaximaConfirmarParticipacion);
|
||||
|
||||
if (fecha != "Invalid date")
|
||||
$("#txtFechaMaxima").val(fecha);
|
||||
}
|
||||
}
|
||||
|
||||
this.CargarGridUsuarios = function (data) {
|
||||
|
||||
if (data != null) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<form id="formCatalogo" class="form-horizontal" role="form">
|
||||
<form id="formDetallePropuesta" class="form-horizontal" role="form">
|
||||
<div class="panel-body"> <h3> <i class="fa fa-briefcase"></i> Detalle Propuesta - [$Propuesta] </h3> </div>
|
||||
<div class="panel panel-success">
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
|
||||
return model;
|
||||
}
|
||||
|
||||
public ProyectoNormativoJSON ObtenerSitios()
|
||||
{
|
||||
|
||||
|
|
@ -78,5 +79,29 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
|
||||
return model;
|
||||
}
|
||||
|
||||
public ProyectoNormativoJSON ObtenerProyectoNormativo(ProyectoNormativoJSON model)
|
||||
{
|
||||
try
|
||||
{
|
||||
using (SinortContex Conn = new SinortContex())
|
||||
{
|
||||
model.ProyectoNormativo = Conn.ProyectoNormativo.Include(q=> q.Convocatoria).FirstOrDefault(q => q.IdProyectoNormativo == model.ProyectoNormativo.IdProyectoNormativo);
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,12 +25,24 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
|
||||
public int? IdTipoProyecto { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string DescTipoProyecto { get; set; }
|
||||
|
||||
public int? IdMatriz { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Matriz { get; set; }
|
||||
|
||||
public int? IdEmisor { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Emisor { get; set; }
|
||||
|
||||
public int? IdAplicacion { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Aplicacion { get; set; }
|
||||
|
||||
public DateTime? FechaInicioConsulta { get; set; }
|
||||
|
||||
public DateTime? FechaFinConsulta { get; set; }
|
||||
|
|
@ -40,6 +52,9 @@ namespace AYA.SlnSinortModel.Sinort
|
|||
|
||||
public int? IdEstado { get; set; }
|
||||
|
||||
[StringLength(200)]
|
||||
public string Estado { get; set; }
|
||||
|
||||
public DateTime? FechaMaximaConfirmarParticipacion { get; set; }
|
||||
|
||||
public DateTime? FechaCreacion { get; set; }
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue