Example #1
0
        public IList <EntityEmpresaPaginacion> SelectPagging(ref EntityEmpresaPaginacion oEntityEmpresaPaginacion)
        {
            DataProcedure run = new DataProcedure();

            run.CollectionParams.AddInputParameter("CodigoEmpresa", oEntityEmpresaPaginacion.CodigoEmpresa);
            run.CollectionParams.AddInputParameter("Estado", oEntityEmpresaPaginacion.Estado);

            run.CollectionParams.AddInputParameter("PageIndex", oEntityEmpresaPaginacion.EntityPaginacion.PageIndex);
            run.CollectionParams.AddInputParameter("PageSize", oEntityEmpresaPaginacion.EntityPaginacion.RowsPerPage);

            run.CollectionParams.AddOutputParameter("TotalRows");


            IList <EntityEmpresaPaginacion> oListEmpresa = new List <EntityEmpresaPaginacion>();

            using (IDataReader reader = run.ExecuteReader(CTransaction.Empty, Procedimientos.Empresa_Select_Paginado))
            {
                while (reader.Read())
                {
                    oListEmpresa.Add(EntityEmpresaPaginacion.CreatePag(reader));
                }
            }
            run.AssignReturnParameters();

            oEntityEmpresaPaginacion.EntityPaginacion.RowCount = DataCreator.CreateInt32(run.CollectionParams.GetParameter("TotalRows").Value);

            return(oListEmpresa);
        }
Example #2
0
 public IList <EntityEmpresaPaginacion> SelectPagging(ref EntityEmpresaPaginacion oEntityEmpresaPaginacion)
 {
     try
     {
         return(EmpresaApp.SelectPagging(ref oEntityEmpresaPaginacion));
     }
     catch (Exception)
     {
         throw new FaultException("Error al seleccionar Empresas");
     }
 }
Example #3
0
 public IList <EntityEmpresaPaginacion> SelectPagging(ref EntityEmpresaPaginacion oEntityEmpresaPaginacion)
 {
     try
     {
         return(Repo.SelectPagging(ref oEntityEmpresaPaginacion));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
 public IList <EntityEmpresaPaginacion> SelectPagging(ref EntityEmpresaPaginacion oEntityEmpresaPaginacion)
 {
     try
     {
         DataEmpresaRepository data = new DataEmpresaRepository(EntityEmpresaPaginacion.EmptyPag, "empresa");
         return(data.SelectPagging(ref oEntityEmpresaPaginacion));
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #5
0
 public IList <EntityEmpresaPaginacion> SelectPagging(ref EntityEmpresaPaginacion oEntityEmpresaPaginacion)
 {
     try
     {
         using (EmpresaServicesClient oEmpresaServices = new EmpresaServicesClient())
         {
             return(oEmpresaServices.SelectPagging(ref oEntityEmpresaPaginacion));
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }
Example #6
0
        public ActionResult EmpresaGridPV(EmpresaViewModel oEmpresaViewModel, Int32 pageIndex)
        {
            EmpresaServicesController oServices = new EmpresaServicesController();

            if (null == oEmpresaViewModel.EntityEmpresaPaginacion.EntityPaginacion)
            {
                oEmpresaViewModel.EntityEmpresaPaginacion.EntityPaginacion             = new SGI.Proxy.Services.EmpresaServices.EntityPaginacion();
                oEmpresaViewModel.EntityEmpresaPaginacion.EntityPaginacion.PageIndex   = (pageIndex != Constantes.Cero) ? pageIndex : Constantes.PageIndex;
                oEmpresaViewModel.EntityEmpresaPaginacion.EntityPaginacion.RowsPerPage = Constantes.RowsPerPage;
            }

            EntityEmpresaPaginacion oEntityEmpresaPaginacion = oEmpresaViewModel.EntityEmpresaPaginacion;

            IList <EntityEmpresaPaginacion> oListEmpresa = oServices.SelectPagging(ref oEntityEmpresaPaginacion);

            oEmpresaViewModel.ListEmpresaPaginado     = oListEmpresa;
            oEmpresaViewModel.EntityEmpresaPaginacion = oEntityEmpresaPaginacion;

            return(PartialView(Constantes.EmpresaGridPV, oEmpresaViewModel));
        }