Пример #1
0
        public IList<CstCofinsDTO> selectCstCofinsPagina(int primeiroResultado, int quantidadeResultado, CstCofinsDTO cstcofins)
        {
            try
            {
                IList<CstCofinsDTO> resultado = null;
                using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
                {
                    NHibernateDAL<CstCofinsDTO> cstcofinsDAL = new NHibernateDAL<CstCofinsDTO>(session);
                    resultado = cstcofinsDAL.selectPagina(primeiroResultado, quantidadeResultado, cstcofins);
                }
                return resultado;
            }
            catch (Exception ex)
            {

                throw new FaultException(ex.Message);
            }
        }
Пример #2
0
 public int deleteCstCofins(CstCofinsDTO cstcofins)
 {
     try
     {
         int resultado = -1;
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             NHibernateDAL<CstCofinsDTO> cstcofinsDAL = new NHibernateDAL<CstCofinsDTO>(session);
             cstcofinsDAL.delete(cstcofins);
             session.Flush();
             resultado = 0;
         }
         return resultado;
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message);
     }
 }
Пример #3
0
        public IList<CstCofinsDTO> selectCstCofins(CstCofinsDTO cstcofins)
        {
            try
            {
                IList<CstCofinsDTO> resultado = null;
                using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
                {
                    NHibernateDAL<CstCofinsDTO> cstcofinsDAL = new NHibernateDAL<CstCofinsDTO>(session);
                    resultado = cstcofinsDAL.select(cstcofins);
                }
                return resultado;
            }
            catch (Exception ex)
            {

                throw new FaultException(ex.Message);
            }
        }