Пример #1
0
 private void criarListas(ViewFinLancamentoPagarDTO lancamento)
 {
     try
     {
         if (lancamento.ListaFinParcelaPagamento == null)
         {
             lancamento.ListaFinParcelaPagamento = new List <FinParcelaPagamentoDTO>();
         }
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Alerta do sistema");
     }
 }
 public IList <ViewFinLancamentoPagarDTO> selectViewFinLancamentoPagar(ViewFinLancamentoPagarDTO ViewFinLancamentoPagar)
 {
     try
     {
         IList <ViewFinLancamentoPagarDTO> resultado = null;
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             PagamentoDAL DAL = new PagamentoDAL(session);
             resultado = DAL.select(ViewFinLancamentoPagar);
         }
         return(resultado);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }
 public ViewFinLancamentoPagarDTO salvarAtualizarViewFinLancamentoPagar(ViewFinLancamentoPagarDTO ViewFinLancamentoPagar)
 {
     try
     {
         using (ISession session = NHibernateHelper.getSessionFactory().OpenSession())
         {
             PagamentoDAL DAL = new PagamentoDAL(session);
             DAL.saveOrUpdate(ViewFinLancamentoPagar);
             session.Flush();
         }
         return(ViewFinLancamentoPagar);
     }
     catch (Exception ex)
     {
         throw new FaultException(ex.Message + (ex.InnerException != null ? " " + ex.InnerException.Message : ""));
     }
 }