public async Task <JsonResult> GetCATaller() { using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Catalogos.clsTallerFiltro filtro = new Ekilibrate.Model.Entity.Catalogos.clsTallerFiltro { ProyectoId = null }; var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var result3 = await middleTier.GetCatalogoTaller(filtro); return(Json(result3 .Select(x => new DropDownListItem { Text = x.Nombre, Value = x.Id.ToString() }).OrderBy(e => e.Text).ToList(), JsonRequestBehavior.AllowGet)); } }
public async Task <IEnumerable <Ekilibrate.Model.Entity.Catalogos.clsTallerBase> > GetTallerCatalogo(Ekilibrate.Model.Entity.Catalogos.clsTallerFiltro Filtro) { var p = new DynamicParameters(); if (Filtro.ProyectoId != null) { p.Add("ProyectoId", Filtro.ProyectoId, System.Data.DbType.Int32); return(await Get(p, Ekilibrate.BL.Queries.Catalogos.QTaller.ListTalleresProyecto)); } else { return(await Get(p, Ekilibrate.BL.Queries.Catalogos.QTaller.List)); } }
async Task <IEnumerable <Ekilibrate.Model.Entity.Catalogos.clsTallerBase> > IDataRetriever.GetCatalogoTaller(Ekilibrate.Model.Entity.Catalogos.clsTallerFiltro Filtro) { using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { var objDataRetriever = new Ekilibrate.BL.DataRetriever.clsTaller(scope); return(await objDataRetriever.GetTallerCatalogo(Filtro)); } }