git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C405
This commit is contained in:
parent
c8d49bdcdf
commit
372bff2132
12 changed files with 210 additions and 43 deletions
|
|
@ -52,6 +52,12 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
FichaTecnicaJSON ObtenerSitios(FichaTecnicaJSON model);
|
||||
|
||||
[OperationContract]
|
||||
FichaTecnicaJSON ObtenerEliminadas(FichaTecnicaJSON model);
|
||||
|
||||
[OperationContract]
|
||||
FichaTecnicaJSON ObtenerInactivas(FichaTecnicaJSON model);
|
||||
|
||||
[OperationContract]
|
||||
FichaTecnicaJSON EnviarCorreoFichaTecnica(FichaTecnicaJSON model);
|
||||
#endregion
|
||||
|
|
|
|||
|
|
@ -194,8 +194,6 @@ namespace AYA.SlnSinort.WCF
|
|||
|
||||
//Ficha tecnica
|
||||
# region Ficha Tecnica
|
||||
|
||||
|
||||
public FichaTecnicaJSON ObtenerSitios(FichaTecnicaJSON model) {
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
|
|
@ -211,6 +209,38 @@ namespace AYA.SlnSinort.WCF
|
|||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON ObtenerEliminadas(FichaTecnicaJSON model)
|
||||
{
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
try
|
||||
{
|
||||
registros = new FichaTecnicaDAL().ObtenerEliminadas(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON ObtenerInactivas(FichaTecnicaJSON model)
|
||||
{
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
try
|
||||
{
|
||||
registros = new FichaTecnicaDAL().ObtenerInactivas(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON GuardarFichaTecnica(FichaTecnicaJSON model)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -7529,7 +7529,6 @@
|
|||
<Content Include="Views\NormativaReglamentacionTecnica\ResponderEncuesta.cshtml" />
|
||||
<Content Include="Views\NormativaReglamentacionTecnica\VerEncuestas.cshtml" />
|
||||
<Content Include="Views\NormativaReglamentacionTecnica\ResponderMisEncuestas.cshtml" />
|
||||
<Content Include="Views\NormativaReglamentacionTecnica\FichasInactivas.cshtml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="App_Data\" />
|
||||
|
|
|
|||
|
|
@ -14,11 +14,11 @@ namespace AYA.SlnSinort.Controllers.NormativaReglamentacionTecnica
|
|||
InitControllers();
|
||||
return View();
|
||||
}
|
||||
public ActionResult FichasInactivas()
|
||||
{
|
||||
InitControllers();
|
||||
return View();
|
||||
}
|
||||
//public ActionResult FichasInactivas()
|
||||
//{
|
||||
// InitControllers();
|
||||
// return View();
|
||||
//}
|
||||
|
||||
public ActionResult Solicitud()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2024,6 +2024,14 @@ this.EntrarVerSolicitud = function (codigo) {
|
|||
document.location.href = url;
|
||||
}
|
||||
|
||||
this.EntrarVerEstadoFicha = function (codigo) {
|
||||
url = $("#hiddenHrefS").val();
|
||||
url = url.replace("View", "Normativa_Reglamentacion_Tecnica");
|
||||
url = url.replace("Controller", "Home");
|
||||
url = url.replace("[$ID]", ROT47(codigo));
|
||||
document.location.href = url;
|
||||
}
|
||||
|
||||
this.AddSelectOption = function (_selectId, _optionId, _text) {
|
||||
|
||||
$(_selectId)
|
||||
|
|
|
|||
|
|
@ -1,10 +1,13 @@
|
|||
var Item = {};
|
||||
var IdEstado;
|
||||
var DescEstado;
|
||||
|
||||
jQuery(document).ready(function () {
|
||||
|
||||
$('#tableSitios').TableInit(0, false, true, true, false, null, null);
|
||||
$('#tableSitios').DataTable().column(0).visible(false);
|
||||
getDataModel();
|
||||
CargarSitios();
|
||||
|
||||
});
|
||||
|
||||
this.getDataModel = function () {
|
||||
|
|
@ -12,7 +15,51 @@ this.getDataModel = function () {
|
|||
$('#btnBusquedaAvanzada').click(function () {
|
||||
RedireccionarBusquedaAvanzada();
|
||||
});
|
||||
CargarTipoSolicitud();
|
||||
}
|
||||
|
||||
this.CargarTipoSolicitud = function () {
|
||||
IdEstado = ObtenerParametros().solicitud;
|
||||
IdEstado = ROT47(IdEstado.toString());
|
||||
switch (IdEstado) {
|
||||
case '1':
|
||||
DescEstado = Estados.Activa.Descripcion;
|
||||
break;
|
||||
case '2':
|
||||
DescEstado = Estados.Inactiva.Descripcion;
|
||||
break;
|
||||
case '3':
|
||||
DescEstado = Estados.Eliminada.Descripcion;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
if (DescEstado == "Activo") {
|
||||
var estado;
|
||||
estado = $("#ucTitulo").html();
|
||||
estado = replaceAll('[$titulo]', DescEstado, estado);
|
||||
$('#estado').empty();
|
||||
$('#estado').append('Ficha Técnica: búsqueda rápida');
|
||||
$('#panelBoton').show();
|
||||
CargarSitios();
|
||||
} else if (DescEstado == "Inactivo") {
|
||||
var estado;
|
||||
estado = $("#ucTitulo").html();
|
||||
estado = replaceAll('[$titulo]', DescEstado, estado);
|
||||
$('#estado').empty();
|
||||
$('#estado').append('Ver fichas técnicas inactivas');
|
||||
CargarInactivas();
|
||||
} else if (DescEstado == "Eliminado") {
|
||||
var estado;
|
||||
estado = $("#ucTitulo").html();
|
||||
estado = replaceAll('[$titulo]', DescEstado, estado);
|
||||
$('#estado').empty();
|
||||
$('#estado').append('Ver fichas técnicas eliminadas');
|
||||
CargarEliminadas();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
this.RedireccionarBusquedaAvanzada = function () {
|
||||
url = $("#hiddenHref2").val();
|
||||
url = url.replace("View", "BusquedaFichaTecnica");
|
||||
|
|
@ -21,13 +68,25 @@ this.RedireccionarBusquedaAvanzada = function () {
|
|||
|
||||
document.location.href = url;
|
||||
}
|
||||
this.CargarSitios = function () {
|
||||
|
||||
this.CargarSitios = function () {
|
||||
var uri = SinortWCF + '/api/ObtenerSitios';
|
||||
model =
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarEliminadas = function () {
|
||||
var uri = SinortWCF + '/api/ObtenerEliminadas';
|
||||
model =
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarInactivas = function () {
|
||||
var uri = SinortWCF + '/api/ObtenerInactivas';
|
||||
model =
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarTablaSitios = function (data) {
|
||||
|
||||
if (data != null && data.FichasTecnicas != null) {
|
||||
|
|
@ -58,12 +117,12 @@ $('#tableSitios').on('click', 'button', function () {
|
|||
var data = $('#tableSitios').DataTable().row($(this).parents('tr')).data();
|
||||
|
||||
|
||||
if (ValidarPermisos('Búsqueda rápida').length <= 0) {
|
||||
if (ValidarPermisos('Super Usuario').length <= 0) {
|
||||
toastr.warning(Message_NoGrants, Message_Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
//if (ValidarPermisos('Búsqueda rápida').length <= 0) {
|
||||
// if (ValidarPermisos('Super Usuario').length <= 0) {
|
||||
// toastr.warning(Message_NoGrants, Message_Warning);
|
||||
// return;
|
||||
// }
|
||||
//}
|
||||
|
||||
url = $("#hiddenHref").val();
|
||||
url = url.replace("View", "FichaTecnica");
|
||||
|
|
|
|||
|
|
@ -22,21 +22,27 @@ jQuery(document).ready(function () {
|
|||
|
||||
IDFicha = ObtenerParametros().fichatecnicaid;
|
||||
|
||||
if (IsNullOrEmpty(IDFicha)) {
|
||||
alert("No ha seleccionado una ficha técnica.");
|
||||
$("#formDetallePropuesta").FormReadOnly();
|
||||
return;
|
||||
//if (IsNullOrEmpty(IDFicha)) {
|
||||
// alert("No ha seleccionado una ficha técnica.");
|
||||
// $("#formDetallePropuesta").FormReadOnly();
|
||||
// return;
|
||||
//}
|
||||
|
||||
//$("#formFichaTecnica").EnableValidationToolTip();
|
||||
|
||||
if (IDFicha != null) {
|
||||
model.FichaTecnica = {
|
||||
IdFichaTecnica: ROT47(IDFicha.toString())
|
||||
};
|
||||
idFicha = ROT47(IDFicha.toString());
|
||||
getDataModel();
|
||||
ObtenerFicha();
|
||||
|
||||
}
|
||||
|
||||
$("#formFichaTecnica").EnableValidationToolTip();
|
||||
|
||||
model.FichaTecnica = {
|
||||
IdFichaTecnica: ROT47(IDFicha.toString())
|
||||
};
|
||||
idFicha = ROT47(IDFicha.toString());
|
||||
|
||||
getDataModel();
|
||||
ObtenerFicha();
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -335,6 +341,7 @@ this.GuardarFichaTecnica = function () {
|
|||
AjaxPostData(uri, model, true, true, null, null, null);
|
||||
|
||||
LimpiarControles();
|
||||
location.reload();
|
||||
//}
|
||||
//else {
|
||||
// toastr.warning(Message_NoGrants, Message_Warning);
|
||||
|
|
@ -361,8 +368,6 @@ this.CompletarAccion = function () {
|
|||
|
||||
this.LimpiarControles = function () {
|
||||
$("#txtAreaIdentificacion").val('');
|
||||
$('#hiddenEstado').val('');
|
||||
$('#txtEstado').val('');
|
||||
$("#txtDocumentoIngreso").val('');
|
||||
$("#txtDocumentoEgreso").val('');
|
||||
$("#hiddenDocumentoTecnico").val('');
|
||||
|
|
@ -384,7 +389,7 @@ this.LimpiarControles = function () {
|
|||
|
||||
$('#txtDescripcionDocAux').val('');
|
||||
$('#txtComentarioDocAux').val('');
|
||||
var tableDtableDocFichaTecnicaocGota = $('#tableDocFichaTecnica').DataTable();
|
||||
var tableDocFichaTecnica = $('#tableDocFichaTecnica').DataTable();
|
||||
tableDocFichaTecnica.clear().draw();
|
||||
|
||||
var tablePalabraClave = $('#tablePalabraClave').DataTable();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@
|
|||
<img class="img-responsive" src="~/dist/img/SinortBanner1.png">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4"><a href="@Url.Action("Normativa_Reglamentacion_Tecnica", "Home")"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>
|
||||
<div class="col-sm-4"><a href="javascript: EntrarVerEstadoFicha('1');"> <img class="img-responsive" src="~/dist/img/imgNormReg1.png"></div>
|
||||
<div class="col-sm-4"><a href="javascript: ValidarAcceder('proyecto_normativo','Home','Ver proyectos y foros');"> <img class="img-responsive" src="~/dist/img/imgProyeNorm1.png"></div>
|
||||
<div class="col-sm-4"><a href="#"> <img class="img-responsive" src="~/dist/img/imgEst1.png"></div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -8,11 +8,11 @@
|
|||
|
||||
<form id="formSitios" class="form-horizontal" role="form">
|
||||
|
||||
<div class="panel-body"> <h3> <i class="fa fa-file-text"></i> Ficha Técnica: búsqueda rápida </h3> </div>
|
||||
<div class="panel-body"> <h3 id="estado"> <i class="fa fa-file-text"></i> [$titulo] </h3> </div>
|
||||
<div style="background-color: #fff">
|
||||
<div class="panel-body">
|
||||
<br />
|
||||
<div>
|
||||
<div id="panelBoton" style="display:none; ">
|
||||
<button type="button" id="btnBusquedaAvanzada" class="btn btn-instagram btn-medium" data-dismiss="modal">
|
||||
<i class="fa fa-search"></i> Búsqueda Predeterminada
|
||||
</button>
|
||||
|
|
@ -45,6 +45,12 @@
|
|||
|
||||
</form>
|
||||
|
||||
<div id="ucTitulo" style="display:none;">
|
||||
<span>
|
||||
[$titulo]
|
||||
</span>
|
||||
</div>
|
||||
|
||||
|
||||
@Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica.js")
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
|
||||
@{
|
||||
ViewBag.Title = "FichasInactivas";
|
||||
}
|
||||
|
||||
<h2>FichasInactivas</h2>
|
||||
|
||||
|
|
@ -27,10 +27,9 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
{
|
||||
|
||||
registros.FichasTecnicas = db.FichaTecnica
|
||||
.Where(x => x.IdEstado == 8)
|
||||
.Include("FichaTecnicaPalabraClave")
|
||||
.Include("FichaTecnicaPalabraClave.PalabraClave")
|
||||
//.Where(x => x.Estado == true ).AsNoTracking()
|
||||
.Where(x => x.Estado == true && x.IdEstado == EnumTipoEstado.ACTIVA).AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
|
||||
|
|
@ -46,6 +45,65 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON ObtenerEliminadas(FichaTecnicaJSON model)
|
||||
{
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
|
||||
registros.FichasTecnicas = db.FichaTecnica
|
||||
.Include("FichaTecnicaPalabraClave")
|
||||
.Include("FichaTecnicaPalabraClave.PalabraClave")
|
||||
.Where(x => x.Estado == true && x.IdEstado == EnumTipoEstado.ELIMINADA).AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON ObtenerInactivas(FichaTecnicaJSON model)
|
||||
{
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
|
||||
registros.FichasTecnicas = db.FichaTecnica
|
||||
.Include("FichaTecnicaPalabraClave")
|
||||
.Include("FichaTecnicaPalabraClave.PalabraClave")
|
||||
.Where(x => x.Estado == true && x.IdEstado == EnumTipoEstado.INACTIVA).AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
return registros;
|
||||
}
|
||||
|
||||
|
||||
public FichaTecnicaJSON GuardarFichaTecnica(FichaTecnicaJSON model)
|
||||
{
|
||||
try
|
||||
|
|
@ -80,7 +138,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
foreach (var palabras in model.ListaPalabraClave)
|
||||
{
|
||||
LstPalabras = LstPalabras + separador + palabras.Descripcion;
|
||||
separador = ",";
|
||||
separador = ", ";
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ namespace AYA.SlnSinortModel.Constantes
|
|||
public const int INICIAL = 2;
|
||||
public const int CONSTRUCCION = 3;
|
||||
public const int HISTORICO = 4;
|
||||
public const int ACTIVA = 8;
|
||||
public const int INACTIVA = 9;
|
||||
public const int ELIMINADA = 10;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue