git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C293
This commit is contained in:
parent
eb1f5df928
commit
45be6db8e9
7 changed files with 110 additions and 6 deletions
|
|
@ -48,6 +48,8 @@ namespace AYA.SlnSinort.WCF
|
|||
[OperationContract]
|
||||
FichaTecnicaJSON ObtenerFichaTecnica(FichaTecnicaJSON model);
|
||||
|
||||
[OperationContract]
|
||||
FichaTecnicaJSON ObtenerSitios(FichaTecnicaJSON model);
|
||||
#endregion
|
||||
|
||||
#region Adjuntos
|
||||
|
|
|
|||
|
|
@ -195,6 +195,22 @@ namespace AYA.SlnSinort.WCF
|
|||
//Ficha tecnica
|
||||
# region Ficha Tecnica
|
||||
|
||||
|
||||
public FichaTecnicaJSON ObtenerSitios(FichaTecnicaJSON model) {
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
try
|
||||
{
|
||||
registros = new FichaTecnicaDAL().ObtenerSitios(model);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
return registros;
|
||||
}
|
||||
|
||||
public FichaTecnicaJSON GuardarFichaTecnica(FichaTecnicaJSON model)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
|
|
@ -7314,6 +7314,7 @@
|
|||
<Content Include="Sinort-Scripts\Contenido.js" />
|
||||
<Content Include="Sinort-Scripts\DocumentoTecnico.js" />
|
||||
<Content Include="Sinort-Scripts\EmisorPN.js" />
|
||||
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica.js" />
|
||||
<Content Include="Sinort-Scripts\NormativaReglamentacionTecnica\FichaTecnica.js" />
|
||||
<Content Include="Sinort-Scripts\Global.js" />
|
||||
<Content Include="Sinort-Scripts\Login.js" />
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -0,0 +1,37 @@
|
|||
var Item = {};
|
||||
jQuery(document).ready(function () {
|
||||
$('#tableSitios').TableInit(0, false, true, true, false, null, null);
|
||||
$('#tableSitios').DataTable().column(0).visible(false);
|
||||
CargarSitios();
|
||||
});
|
||||
|
||||
this.CargarSitios = function () {
|
||||
|
||||
var uri = SinortWCF + '/api/ObtenerSitios';
|
||||
model =
|
||||
AjaxPostData(uri, Item, true, true, CargarTablaSitios, null, null);
|
||||
}
|
||||
|
||||
this.CargarTablaSitios = function (data) {
|
||||
|
||||
if (data != null && data.FichasTecnicas != null) {
|
||||
FichaTecnica = data.FichasTecnicas;
|
||||
var Seleccionar = $("#ucbtnVista").html();
|
||||
|
||||
var columnDefinition = [
|
||||
{ "data":'IdFichaTecnica', "visible": false },
|
||||
{ "data": "DocumentosAdjuntos.Nombre" },
|
||||
{ "data": "Identificacion" },
|
||||
{ "data": "NumeroPublicacionVersion" },
|
||||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||
];
|
||||
|
||||
$('#tableSitios').TableInit(1, true, true, true, true, columnDefinition, FichaTecnica);
|
||||
|
||||
if ($.fn.DataTable.isDataTable('#tableSitios')) {
|
||||
|
||||
$('#tableSitios').DataTable().search('').draw();
|
||||
ENDREQUEST();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -3,16 +3,39 @@
|
|||
Layout = "~/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
|
||||
<body>
|
||||
<div >
|
||||
<input type="hidden" id="hiddenHref" value="@string.Concat(Url.Action("View", "Controller", null), ViewBag.QueryEncripted)?propuesta=[$ID]&tipo=[$TIPO]&promotor=[$Promotor]&estado=[$Estado]">
|
||||
|
||||
@*<section class="content-header"></section>
|
||||
<form id="formSitios" class="form-horizontal" role="form">
|
||||
|
||||
<div class="panel-body"> <h3> <i class="fa fa-list-ul"></i> Fichas Técnicas </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">Título</th>
|
||||
<th class="col-sm-4">Identificación </th>
|
||||
<th class="col-sm-4">Número de publicación de la versión vigente</th>
|
||||
<th>Acción</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<section class="content container-fluid"></section>*@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="ucbtnVista" style=" display:none;">
|
||||
<button type="button" id="btnseleccionar" class="btn btn-default btn-xs">
|
||||
<i class="fa fa-search"></i> Ingresar
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</form>
|
||||
|
||||
|
||||
@Scripts.Render("~/Sinort-Scripts/NormativaReglamentacionTecnica.js")
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,31 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
|||
{
|
||||
Log log = new Log("FichaTecnicaDAL");
|
||||
|
||||
public FichaTecnicaJSON ObtenerSitios(FichaTecnicaJSON model)
|
||||
{
|
||||
|
||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||
try
|
||||
{
|
||||
using (SinortContex db = new SinortContex())
|
||||
{
|
||||
|
||||
registros.FichasTecnicas = db.FichaTecnica
|
||||
.Include(p => p.DocumentosAdjuntos)
|
||||
.Where(x => x.Estado == true)
|
||||
.ToList();
|
||||
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.ERROR;
|
||||
log.Error(ex);
|
||||
}
|
||||
|
||||
return registros;
|
||||
}
|
||||
public FichaTecnicaJSON GuardarFichaTecnica(FichaTecnicaJSON model)
|
||||
{
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue