public IList <PreVendaCabecalhoDTO> SelectPreVendaCabecalhoPagina(int primeiroResultado, int quantidadeResultados, PreVendaCabecalhoDTO preVendaCabecalho)
        {
            try
            {
                IList <PreVendaCabecalhoDTO> Resultado = null;
                using (ISession Session = NHibernateHelper.getSessionFactory().OpenSession())
                {
                    NHibernateDAL <PreVendaCabecalhoDTO> DAL = new NHibernateDAL <PreVendaCabecalhoDTO>(Session);
                    Resultado = DAL.SelectPagina <PreVendaCabecalhoDTO>(primeiroResultado, quantidadeResultados, preVendaCabecalho);

                    foreach (PreVendaCabecalhoDTO objP in Resultado)
                    {
                        NHibernateDAL <PreVendaDetalheDTO> DALDetalhe = new NHibernateDAL <PreVendaDetalheDTO>(Session);
                        objP.ListaPreVendaDetalhe = DAL.Select <PreVendaDetalheDTO>(new PreVendaDetalheDTO {
                            IdPreVendaCabecalho = objP.Id
                        });

                        if (objP.ListaPreVendaDetalhe == null)
                        {
                            objP.ListaPreVendaDetalhe = new List <PreVendaDetalheDTO>();
                        }
                    }
                }
                return(Resultado);
            }
            catch (Exception ex)
            {
                throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
            }
        }
 public static IList <EcfSangriaDTO> ConsultaEcfSangriaPagina(int pPrimeiroResultado, int pQuantidadeResultados, EcfSangriaDTO pEcfSangria)
 {
     try
     {
         IList <EcfSangriaDTO> Resultado = null;
         using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
         {
             NHibernateDAL <EcfSangriaDTO> DAL = new NHibernateDAL <EcfSangriaDTO>(Session);
             Resultado = DAL.SelectPagina <EcfSangriaDTO>(pPrimeiroResultado, pQuantidadeResultados, pEcfSangria);
         }
         return(Resultado);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public IList <CargoDTO> SelectCargoPagina(int primeiroResultado, int quantidadeResultados, CargoDTO cargo)
 {
     try
     {
         IList <CargoDTO> Resultado = null;
         using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
         {
             NHibernateDAL <CargoDTO> DAL = new NHibernateDAL <CargoDTO>(Session);
             Resultado = DAL.SelectPagina <CargoDTO>(primeiroResultado, quantidadeResultados, cargo);
         }
         return(Resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public IList <NfeCabecalhoDTO> SelectNfeCabecalhoPagina(int primeiroResultado, int quantidadeResultados, NfeCabecalhoDTO nfeCabecalho)
 {
     try
     {
         IList <NfeCabecalhoDTO> resultado = null;
         using (ISession Session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             NHibernateDAL <NfeCabecalhoDTO> DAL = new NHibernateDAL <NfeCabecalhoDTO>(Session);
             resultado = DAL.SelectPagina <NfeCabecalhoDTO>(primeiroResultado, quantidadeResultados, nfeCabecalho);
         }
         return(resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
Exemple #5
0
 public static IList <ViewTotalPagamentoEcfMovimentoDTO> ConsultaViewTotalPagamentoMovimentoPagina(int pPrimeiroResultado, int pQuantidadeResultados, ViewTotalPagamentoEcfMovimentoDTO pViewTotalPagamentoMovimento)
 {
     try
     {
         IList <ViewTotalPagamentoEcfMovimentoDTO> Resultado = null;
         using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
         {
             NHibernateDAL <ViewTotalPagamentoEcfMovimentoDTO> DAL = new NHibernateDAL <ViewTotalPagamentoEcfMovimentoDTO>(Session);
             Resultado = DAL.SelectPagina <ViewTotalPagamentoEcfMovimentoDTO>(pPrimeiroResultado, pQuantidadeResultados, pViewTotalPagamentoMovimento);
         }
         return(Resultado);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }