예제 #1
0
 public void Alterar(EntEmail objEmail, Int32 IdUsuario)
 {
     using (DbConnection connection = db.CreateConnection())
     {
         connection.Open();
         DbTransaction transaction = connection.BeginTransaction();
         try
         {
             dalEmail.Alterar(objEmail, transaction, db);
             SaveLog(IdUsuario, EntLog.LOG_EDITAR, "E-mail", objEmail.IdEmail, objEmail, transaction, db);
             transaction.Commit();
         }
         catch (Exception ex)
         {
             transaction.Rollback();
             SaveLog(IdUsuario, EntLog.LOG_ERRO, "E-mail", objEmail.IdEmail, objEmail, ex.Message, db, connection);
             throw;
         }
         finally
         {
             connection.Close();
         }
     }
 }
예제 #2
0
        public void Alterar(ModeloEmail modelo)
        {
            DalEmail dal = new DalEmail(conexao);

            dal.Alterar(modelo);
        }