git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C317
This commit is contained in:
parent
99025af4e6
commit
1e2b2da9dd
6 changed files with 38 additions and 11 deletions
|
|
@ -35,7 +35,7 @@ this.CargarTablaSitios = function (data) {
|
||||||
var Seleccionar = $("#ucbtnVista").html();
|
var Seleccionar = $("#ucbtnVista").html();
|
||||||
|
|
||||||
var columnDefinition = [
|
var columnDefinition = [
|
||||||
{ "data":'IdFichaTecnica', "visible": false },
|
{ "data": "IdFichaTecnica", "visible": false },
|
||||||
{ "data": "DescripcionDocumento" },
|
{ "data": "DescripcionDocumento" },
|
||||||
{ "data": "Identificacion" },
|
{ "data": "Identificacion" },
|
||||||
{ "data": "NumeroPublicacionVersion" },
|
{ "data": "NumeroPublicacionVersion" },
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ this.CargarTablaFichas = function (data) {
|
||||||
{ "data": "DescripcionEmisor" },
|
{ "data": "DescripcionEmisor" },
|
||||||
{ "data": "DescripcionDocumentoTecnico" },
|
{ "data": "DescripcionDocumentoTecnico" },
|
||||||
{ "data": "DescripcionAplicacion" },
|
{ "data": "DescripcionAplicacion" },
|
||||||
|
{ "data": "ListaPalabrasClaves" },
|
||||||
//{ "data": "FechaPublicacionDocumentoTecnico", "render": function (value) { return DateFormatNoTime(value); } },
|
//{ "data": "FechaPublicacionDocumentoTecnico", "render": function (value) { return DateFormatNoTime(value); } },
|
||||||
{ "data": null, className: "center", defaultContent: Seleccionar }
|
{ "data": null, className: "center", defaultContent: Seleccionar }
|
||||||
];
|
];
|
||||||
|
|
@ -55,8 +56,15 @@ this.CargarTablaFichas = function (data) {
|
||||||
if (j == 0)
|
if (j == 0)
|
||||||
contador = contador + 1;
|
contador = contador + 1;
|
||||||
|
|
||||||
if (contador != 5)
|
if (contador != 6) {
|
||||||
select.append('<option value="' + d + '">' + d + '</option>')
|
if (contador != 5) {
|
||||||
|
select.append('<option value="' + d + '">' + d + '</option>')
|
||||||
|
} else
|
||||||
|
{
|
||||||
|
select.append('<option value="' + d + '">' + d + '</option>')
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
<th class="col-sm-2" id="ColumEmisor">Emisor</th>
|
<th class="col-sm-2" id="ColumEmisor">Emisor</th>
|
||||||
<th class="col-sm-3">Documento Técnico</th>
|
<th class="col-sm-3">Documento Técnico</th>
|
||||||
<th class="col-sm-5">Aplicación</th>
|
<th class="col-sm-5">Aplicación</th>
|
||||||
@*<th class="col-sm-4">Palabra Clave</th>*@
|
<th class="col-sm-4">Palabra Clave</th>
|
||||||
<th class="col-sm-2">Acción</th>
|
<th class="col-sm-2">Acción</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
|
@ -28,7 +28,7 @@
|
||||||
<th class="col-sm-2" id="ColumEmisor">Emisor</th>
|
<th class="col-sm-2" id="ColumEmisor">Emisor</th>
|
||||||
<th class="col-sm-3">Documento Técnico</th>
|
<th class="col-sm-3">Documento Técnico</th>
|
||||||
<th class="col-sm-5">Aplicación</th>
|
<th class="col-sm-5">Aplicación</th>
|
||||||
@*<th class="col-sm-4">Palabra Clave</th>*@
|
<th class="col-sm-4">Palabra Clave</th>
|
||||||
<th class="col-sm-2" ></th>
|
<th class="col-sm-2" ></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,19 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
|
|
||||||
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
FichaTecnicaJSON registros = new FichaTecnicaJSON();
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
|
|
||||||
registros.FichasTecnicas = db.FichaTecnica
|
registros.FichasTecnicas = db.FichaTecnica
|
||||||
.Where(x => x.Estado == true)
|
.Include("FichaTecnicaPalabraClave")
|
||||||
|
.Include("FichaTecnicaPalabraClave.PalabraClave")
|
||||||
|
.Where(x => x.Estado == true).AsNoTracking()
|
||||||
.ToList();
|
.ToList();
|
||||||
|
|
||||||
|
|
||||||
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
registros.CodigoRespuesta = EnumTipoCodigoRespuesta.EXITOSO;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -77,10 +81,21 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
Conn.Entry(PalabraClave).State = EntityState.Deleted;
|
Conn.Entry(PalabraClave).State = EntityState.Deleted;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Inseert Palbras claves
|
//Insert Palbras claves
|
||||||
model.ListaPalabraClave.ToList().ForEach(c => c.IdFichaTecnica = model.FichaTecnica.IdFichaTecnica);
|
model.ListaPalabraClave.ToList().ForEach(c => c.IdFichaTecnica = model.FichaTecnica.IdFichaTecnica);
|
||||||
|
var separador = "";
|
||||||
|
string LstPalabras = "" ;
|
||||||
|
foreach (var palabras in model.ListaPalabraClave)
|
||||||
|
{
|
||||||
|
LstPalabras = separador + LstPalabras + palabras.Descripcion;
|
||||||
|
separador = ",";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
model.FichaTecnica.ListaPalabrasClaves = LstPalabras;
|
||||||
Conn.FichaTecnicaPalabraClave.AddRange(model.ListaPalabraClave);
|
Conn.FichaTecnicaPalabraClave.AddRange(model.ListaPalabraClave);
|
||||||
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
Conn.SaveChanges();
|
Conn.SaveChanges();
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ namespace AYA.SlnSinortModel.Entidades
|
||||||
public List<TareasPendientes> ListaTareasPendientes { get; set; }
|
public List<TareasPendientes> ListaTareasPendientes { get; set; }
|
||||||
public int? IdPalabra { get; set; }
|
public int? IdPalabra { get; set; }
|
||||||
public int? IdFichaTecnica { get; set; }
|
public int? IdFichaTecnica { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
public class AdjuntosJSON : BaseJson
|
public class AdjuntosJSON : BaseJson
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,9 @@ namespace AYA.SlnSinortModel.Sinort
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
[DatabaseGenerated(DatabaseGeneratedOption.None)]
|
||||||
public int IdFichaTecnica { get; set; }
|
public int IdFichaTecnica { get; set; }
|
||||||
|
|
||||||
|
[StringLength(500)]
|
||||||
|
public string ListaPalabrasClaves { get; set; }
|
||||||
|
|
||||||
public int? IdDocumento { get; set; }
|
public int? IdDocumento { get; set; }
|
||||||
|
|
||||||
[StringLength(500)]
|
[StringLength(500)]
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue