/// <summary> /// Request de la información de propietarios. /// </summary> /// <param name="request"></param> /// <returns></returns> public async Task <ActionResult> Read([DataSourceRequest] DataSourceRequest request) { using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var Result = await middleTier.GetEmpresas(objFiltro); return(Json(Result.ToDataSourceResult(request), JsonRequestBehavior.AllowGet)); } }
public async Task <Ekilibrate.Model.Entity.General.CorreoElectronico> ReadSMTPConfig() { using (var scope = EkilibrateSendMail.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var CorreoElectronico = await middleTier.GetInfoCorreo(); return(CorreoElectronico.FirstOrDefault()); } }
public async Task <ActionResult> Index() { try { using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsColaboradorFiltro objFiltroColaborador = new Ekilibrate.Model.Entity.Administrador.clsColaboradorFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var Result1 = await middleTier.GetColaborador(objFiltroColaborador); ViewBag.ColaboradorFacilitador = Result1.Where(x => x.Facilitador) .Select(x => new DropDownListItem { Text = x.Nombre + " " + x.Apellido, Value = x.Id.ToString() }).OrderBy(e => e.Text).ToList(); Ekilibrate.Model.Entity.Catalogos.clsAreaFiltro areaFiltro = new Ekilibrate.Model.Entity.Catalogos.clsAreaFiltro(); middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var result6 = await middleTier.GetArea(areaFiltro); ViewBag.Areas = result6 .Select(x => new DropDownListItem { Text = x.Nombre, Value = x.Id.ToString() }).OrderBy(e => e.Text).ToList(); Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var Result = await middleTier.GetEmpresas(objFiltro); ViewBag.Empresas = Result .Select(x => new DropDownListItem { Text = x.Nombre, Value = x.Id.ToString() }).OrderBy(e => e.Text).ToList(); Ekilibrate.Model.Administrador.clsClienteRolFiltro filtroRol = new Ekilibrate.Model.Administrador.clsClienteRolFiltro(); var middleTier2 = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); ViewBag.ClienteRol = await middleTier2.GetClienteRol(filtroRol); } } catch (Exception ex) { } return(View()); }
public async Task <List <Ekilibrate.Model.Entity.General.clsMensajeCorreo> > ReadMail() { using (var scope = EkilibrateSendMail.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var ColaMensajes = await middleTier.GetCorreos(); var MensajesIndividuales = ColaMensajes.Where(c => c.EsLista == "NO").ToList(); return(MensajesIndividuales); } }
public async Task <JsonResult> GetGiro() { using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var result3 = await middleTier.GetGiroEmpresa(); return(Json(result3 .Select(x => new DropDownListItem { Text = x.Nombre, Value = x.Id.ToString() }).OrderBy(e => e.Text).ToList(), JsonRequestBehavior.AllowGet)); } }
public async Task <ActionResult> Index() { using (var scope = EkilibrateUI.Autofac.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); Ekilibrate.Model.Catalogos.clsTipoUsoSalonFiltro objFiltro2 = new Ekilibrate.Model.Catalogos.clsTipoUsoSalonFiltro(); Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro objFiltro3 = new Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro(); var middleTier = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); var Result = await middleTier.GetEmpresas(objFiltro); var middleTier3 = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); ViewBag.Empresa = await middleTier3.GetEmpresas(objFiltro3); var middleTier4 = scope.Resolve <Ekilibrate.Model.Services.Administrador.IDataRetriever>(); ViewBag.GiroEmpresa = await middleTier4.GetGiroEmpresa(); return(View(Result)); } }
public async Task <IEnumerable <Ekilibrate.Model.Entity.Administrador.clsEmpresaContacto> > GetEmpresas(Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro Filtro) { var p = new DynamicParameters(); if (Filtro.Id > 0) { p.Add("Id", Filtro.Id, System.Data.DbType.Int32); } //p.Add("Activity", Activity, System.Data.DbType.Int32); // IEnumerable<Ekilibrate.Model.Entity.Administrador.clsEmpresaContacto> list = await Get<Ekilibrate.Model.Entity.Administrador.clsEmpresaContacto>(p, QEmpresa.EmpresaContacto); return(await Get <Ekilibrate.Model.Entity.Administrador.clsEmpresaContacto>(p, QEmpresa.EmpresaContacto)); }
async Task <IEnumerable <Ekilibrate.Model.Entity.Administrador.clsEmpresaContacto> > IDataRetriever.GetEmpresas(Ekilibrate.Model.Entity.Administrador.clsEmpresaFiltro Filtro) { using (var scope = Ekilibrate.Data.Access.Common.ContainerConfig.ProxyContainer.BeginLifetimeScope()) { var objDataRetriever = new Ekilibrate.BL.DataRetriever.Administrador.clsEmpresa(scope); return(await objDataRetriever.GetEmpresas(Filtro)); } }