コード例 #1
0
 public static IList <R01DTO> ConsultaR01Lista(R01DTO pR01)
 {
     try
     {
         IList <R01DTO> Resultado = null;
         using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
         {
             NHibernateDAL <R01DTO> DAL = new NHibernateDAL <R01DTO>(Session);
             Resultado = DAL.Select(pR01);
         }
         return(Resultado);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
コード例 #2
0
        public static R01DTO ConsultaR01(string pFiltro)
        {
            try
            {
                R01DTO Resultado = null;
                using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
                {
                    NHibernateDAL <R01DTO> DAL = new NHibernateDAL <R01DTO>(Session);

                    String ConsultaSql = "from R01DTO where " + pFiltro;
                    Resultado = DAL.SelectObjetoSql <R01DTO>(ConsultaSql);
                }
                return(Resultado);
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
            }
        }
コード例 #3
0
ファイル: Sessao.cs プロジェクト: wernekdev/PAF-ECF-CSharp
 public void PopulaObjetosPrincipais()
 {
     try
     {
         XmlDocument ArquivoXML = new XmlDocument();
         ArquivoXML.Load(Application.StartupPath + "\\ArquivoAuxiliar.xml");
         PathIntegracao = ArquivoXML.GetElementsByTagName("remoteApp").Item(0).InnerText.Trim();
         ECFsAutorizados.Add(Biblioteca.Desencripta(ArquivoXML.GetElementsByTagName("serie1").Item(0).InnerText.Trim()));
         //
         R01                = R01Controller.ConsultaR01("Id=1");
         Filtro             = "StatusMovimento=" + Biblioteca.QuotedStr("A") + " or StatusMovimento=" + Biblioteca.QuotedStr("T");
         Movimento          = EcfMovimentoController.ConsultaEcfMovimento(Filtro);
         Configuracao       = EcfConfiguracaoController.ConsultaEcfConfiguracao("Id=1");
         ListaTipoPagamento = EcfTipoPagamentoController.ConsultaEcfTipoPagamentoLista("Id>0").ToList();
         ListaImpressora    = EcfImpressoraController.ConsultaEcfImpressoraLista("Id>0").ToList();
     }
     catch (Exception eError)
     {
         Log.write(eError.ToString());
     }
 }
コード例 #4
0
 public static IList <R01DTO> ConsultaR01Pagina(int pPrimeiroResultado, int pQuantidadeResultados, R01DTO pR01)
 {
     try
     {
         IList <R01DTO> Resultado = null;
         using (ISession Session = NHibernateHelper.GetSessionFactory().OpenSession())
         {
             NHibernateDAL <R01DTO> DAL = new NHibernateDAL <R01DTO>(Session);
             Resultado = DAL.SelectPagina <R01DTO>(pPrimeiroResultado, pQuantidadeResultados, pR01);
         }
         return(Resultado);
     }
     catch (Exception ex)
     {
         throw new Exception(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }