public PlanoNaturezaFinanceiraDTO salvarAtualizarPlanoNaturezaFinanceira(PlanoNaturezaFinanceiraDTO planoNaturezaFinanceira)
 {
     try
     {
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             NHibernateDAL <PlanoNaturezaFinanceiraDTO> DAL = new NHibernateDAL <PlanoNaturezaFinanceiraDTO>(session);
             DAL.saveOrUpdate(planoNaturezaFinanceira);
             session.Flush();
         }
         return(planoNaturezaFinanceira);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public IList <PlanoNaturezaFinanceiraDTO> selectPlanoNaturezaFinanceira(PlanoNaturezaFinanceiraDTO planoNaturezaFinanceira)
 {
     try
     {
         IList <PlanoNaturezaFinanceiraDTO> resultado = null;
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             NHibernateDAL <PlanoNaturezaFinanceiraDTO> DAL = new NHibernateDAL <PlanoNaturezaFinanceiraDTO>(session);
             resultado = DAL.select(planoNaturezaFinanceira);
         }
         return(resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public int deletePlanoNaturezaFinanceira(PlanoNaturezaFinanceiraDTO planoNaturezaFinanceira)
 {
     try
     {
         int resultado = -1;
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             NHibernateDAL <PlanoNaturezaFinanceiraDTO> DAL = new NHibernateDAL <PlanoNaturezaFinanceiraDTO>(session);
             DAL.delete(planoNaturezaFinanceira);
             session.Flush();
             resultado = 0;
         }
         return(resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public new List <PlanoNaturezaFinanceiraDTO> selectPlanoNaturezaFinanceira(PlanoNaturezaFinanceiraDTO PlanoNaturezaFinanceira)
 {
     return(base.selectPlanoNaturezaFinanceira(PlanoNaturezaFinanceira));
 }