Ejemplo n.º 1
0
 public bool IncluirConta(Conta conta)
 {
     try
     {
         using (var context = new IBEntitiesModel())
         {
             context.Contas.Add(conta);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
 public bool IncluirEndereco(Endereco endereco)
 {
     try
     {
         using (var context = new IBEntitiesModel())
         {
             context.Enderecos.Add(endereco);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool IncluirAgencia(Agencia agencia)
 {
     try
     {
         using (var context = new IBEntitiesModel())
         {
             context.Agencias.Add(agencia);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
 public bool IncluirPacote(Pacote pacote)
 {
     try
     {
         using (var context = new IBEntitiesModel())
         {
             context.Pacotes.Add(pacote);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }
Ejemplo n.º 5
0
 public bool IncluirLancamento(Lancamento lancamento)
 {
     try
     {
         using (var context = new IBEntitiesModel())
         {
             context.Lancamentos.Add(lancamento);
             context.SaveChanges();
             return(true);
         }
     }
     catch (Exception)
     {
         return(false);
     }
 }