git-tfs-id: [http://192.168.1.10:8080/tfs/AyA]$/SINORT;C123
This commit is contained in:
parent
f16c095e8b
commit
f1ca05767b
4 changed files with 12 additions and 6 deletions
|
|
@ -37,7 +37,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
registros = db.Contenido.Where(t => t.Estado == true && t.IdContenido == IdTipoContenido && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
registros = db.Contenido.Where(t => t.Estado == true && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
||||||
.Select(t => new CatalogosJSON()
|
.Select(t => new CatalogosJSON()
|
||||||
{
|
{
|
||||||
codigo = t.IdContenido.ToString(),
|
codigo = t.IdContenido.ToString(),
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
registros = db.GrupoTematico.Where(t => t.Estado == true && t.IdGrupoTematico == IdGrupoTematico && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
registros = db.GrupoTematico.Where(t => t.Estado == true && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
||||||
.Select(t => new CatalogosJSON()
|
.Select(t => new CatalogosJSON()
|
||||||
{
|
{
|
||||||
codigo = t.IdGrupoTematico.ToString(),
|
codigo = t.IdGrupoTematico.ToString(),
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,9 @@ using AYA.SlnSinortModel.Entidades;
|
||||||
using AYA.SlnSinortModel.Sinort;
|
using AYA.SlnSinortModel.Sinort;
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Data.Entity;
|
||||||
using System.Data.Entity.Validation;
|
using System.Data.Entity.Validation;
|
||||||
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
@ -27,7 +29,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
registros = db.SubCategoriaContenido.Where(t => t.Estado == true && t.IdSubCategoriaContenido == IdSubCategoriaContenido && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
registros = db.SubCategoriaContenido.Where(t => t.Estado == true && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
||||||
.Select(t => new CatalogosJSON()
|
.Select(t => new CatalogosJSON()
|
||||||
{
|
{
|
||||||
codigo = t.IdSubCategoriaContenido.ToString(),
|
codigo = t.IdSubCategoriaContenido.ToString(),
|
||||||
|
|
@ -52,7 +54,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
respuesta = db.SubCategoriaContenido.ToList();
|
respuesta = db.SubCategoriaContenido.Include(p=> p.Contenido) .ToList();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception ex)
|
catch (Exception ex)
|
||||||
|
|
@ -63,9 +65,13 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
|
|
||||||
return respuesta;
|
return respuesta;
|
||||||
}
|
}
|
||||||
#endregion
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
#region InsertarActualizar
|
#region InsertarActualizar
|
||||||
|
|
||||||
public BaseJson InsertarActualizarSubCategoriaContenido(SubCategoriaContenido model)
|
public BaseJson InsertarActualizarSubCategoriaContenido(SubCategoriaContenido model)
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ namespace AYA.SlnSinortModel.DAL.Sinort
|
||||||
{
|
{
|
||||||
using (SinortContex db = new SinortContex())
|
using (SinortContex db = new SinortContex())
|
||||||
{
|
{
|
||||||
registros = db.SubCategoriaGrupoTematico.Where(t => t.Estado == true && t.IdSubCategoriaGrupoTematico == IdSubCategoriaGrupoTematico && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
registros = db.SubCategoriaGrupoTematico.Where(t => t.Estado == true && (string.IsNullOrEmpty(filtro) || t.Descripcion.Trim().ToLower().Contains(filtro.Trim().ToLower())))
|
||||||
.Select(t => new CatalogosJSON()
|
.Select(t => new CatalogosJSON()
|
||||||
{
|
{
|
||||||
codigo = t.IdSubCategoriaGrupoTematico.ToString(),
|
codigo = t.IdSubCategoriaGrupoTematico.ToString(),
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue