# -*- coding: utf-8 -*-
class Taet < Entry
#  @@initialized = false
  def initialize(row, gk_table)
    super(row,gk_table)

  end

  def write_out()
    $db_target.execute("INSERT INTO taetigkeiten (
      id,
      betriebe_id,
      jahr,
      haupttaetigkeit,
      prtr_schluessel,
      prtr_beschreibung,
      ivu_schluessel,
      ivu_beschreibung,
      branchengruppe
      ) VALUES (
      #{sqlize('id')},
      #{sqlize('p_betrieb_id')},
      #{sqlize('jahr')},
      #{sqlize('htprtr')},
      #{sqlize('prtr_schl')},
      #{sqlize('prtr_text')},
      #{sqlize('ivu_schl')},
      #{sqlize('ivu_text')},
      #{sqlize('name')}
      )")
    @geheimk.each do |gk|
      $db_target.execute("INSERT INTO taetigkeiten_gg (taetigkeiten_id, grund) VALUES (#{@data['id']},'#{gk[1]}')")
    end

  end


end
