public void kundesokoDto2components(KundesokoDto kundesokoDtoI) throws Throwable {
    boolean bEnable = LPMain.getTheClient().getSMandantenwaehrung().equals(waehrungCNr);
    wnfRabattsatz.setEditable(bEnable);
    wnfRabattsatz.setMandatoryField(bEnable);
    wlaWaehrungGestehungspreis.setText(waehrungCNr);
    wlaWaehrungMinverkaufspreis.setText(waehrungCNr);
    wlaVkbasiswaehrung.setText(waehrungCNr);
    wlaFixpreiswaehrung.setText(waehrungCNr);

    wdfGueltigab.setDate(kundesokoDtoI.getTPreisgueltigab());
    wdfGueltigbis.setDate(kundesokoDtoI.getTPreisgueltigbis());
    wtfBemerkung.setText(kundesokoDtoI.getCBemerkung());

    if (wtfKndArtBez != null) {
      wtfKndArtBez.setText(kundesokoDtoI.getCKundeartikelbez());
    }
    if (wtfKndArtZBez != null) {
      wtfKndArtZBez.setText(kundesokoDtoI.getCKundeartikelzbez());
    }

    if (kundesokoDtoI.getBDrucken() == null) {
      wcbDrucken.setSelected(false);
    } else {
      wcbDrucken.setSelected(Helper.short2boolean(kundesokoDtoI.getBDrucken()));
    }

    if (kundesokoDtoI.getBBemerkungdrucken() == null) {
      wcbBemerkungDrucken.setSelected(false);
    } else {
      wcbBemerkungDrucken.setSelected(Helper.short2boolean(kundesokoDtoI.getBBemerkungdrucken()));
    }

    if (kundesokoDtoI.getBRabattsichtbar() == null) {
      wcbRabattsichtbar.setSelected(false);
    } else {
      wcbRabattsichtbar.setSelected(Helper.short2boolean(kundesokoDtoI.getBRabattsichtbar()));
    }

    if (kundesokoDtoI.getBWirktNichtFuerPreisfindung() == null) {
      wcbWirktNichtInVerkaufspreisfindung.setSelected(false);
    } else {
      wcbWirktNichtInVerkaufspreisfindung.setSelected(
          Helper.short2boolean(kundesokoDtoI.getBWirktNichtFuerPreisfindung()));
    }
  }
  private WrapperCheckBox getNurAngemeldeteCheckbox() {
    if (null == wcbNurAngemeldete) {
      wcbNurAngemeldete = new WrapperCheckBox(LPMain.getTextRespectUISPr("lp.nurangemeldete"));
      wcbNurAngemeldete.setSelected(false);
      wcbNurAngemeldete.setActivatable(true);
      wcbNurAngemeldete.setEnabled(true);
      Dimension d = new Dimension(150, Defaults.getInstance().getControlHeight());
      wcbNurAngemeldete.setPreferredSize(d);
      wcbNurAngemeldete.setMinimumSize(d);
      wcbNurAngemeldete.setMnemonic('A');

      wcbNurAngemeldete.addActionListener(this);
    }

    return wcbNurAngemeldete;
  }
  protected void setDefaults() throws Throwable {
    super.setDefaults();

    datGueltigkeitsanzeigeab = Helper.cutDate(new Date(System.currentTimeMillis()));

    wdfPreisgueltigkeitsanzeigeab.setDate(datGueltigkeitsanzeigeab);

    wifArtikel.setArtikelDto(new ArtikelDto());

    wnfRabattsatz.setDouble(new Double(0)); // wird mit 0 initialisiert

    ParametermandantDto parameter =
        (ParametermandantDto)
            DelegateFactory.getInstance()
                .getParameterDelegate()
                .getParametermandant(
                    ParameterFac.PARAMETER_DEFAULT_KUNDESOKO_WIRKT_NICHT_IN_PREISFINDUNG,
                    ParameterFac.KATEGORIE_KUNDEN,
                    LPMain.getTheClient().getMandant());

    wcbWirktNichtInVerkaufspreisfindung.setSelected((Boolean) parameter.getCWertAsObject());
  }
  protected void dto2Components(PartnerDto dto) throws Throwable {

    wefBemerkung.setText(getAnsprechpartnerDto().getXBemerkung());

    if (getAnsprechpartnerDto().getAnsprechpartnerfunktionIId() != null) {
      AnsprechpartnerfunktionDto ansprechpartnerfunktionDto =
          DelegateFactory.getInstance()
              .getAnsprechpartnerDelegate()
              .ansprechpartnerfunktionFindByPrimaryKey(
                  getAnsprechpartnerDto().getAnsprechpartnerfunktionIId());
      wtfAnsprechpartnerfunktion.setText(ansprechpartnerfunktionDto.getBezeichnung());
    } else {
      wtfAnsprechpartnerfunktion.setText(null);
    }

    PartnerDto partnerDto =
        DelegateFactory.getInstance()
            .getPartnerDelegate()
            .partnerFindByPrimaryKey(getAnsprechpartnerDto().getPartnerIIdAnsprechpartner());
    wtfAnsprechpartner.setText(partnerDto.getCName1nachnamefirmazeile1());

    // gotobutton: 4 Den Key des Datensatzes jedesmal zuordnen
    wbuAnsprechpartner.setOKey(partnerDto.getIId());

    wtfVorname.setText(partnerDto.getCName2vornamefirmazeile2());
    wtfTitel.setText(partnerDto.getCTitel());
    wtfNtitel.setText(partnerDto.getCNtitel());
    wcoAnrede.setKeyOfSelectedItem(partnerDto.getAnredeCNr());
    wdfGebDatum.setDate(partnerDto.getDGeburtsdatumansprechpartner());

    AnsprechpartnerDto ansprechpartnerDto = getAnsprechpartnerDto();

    wcbVersteckt.setShort(ansprechpartnerDto.getBVersteckt());
    wtfAbteilung.setText(ansprechpartnerDto.getCAbteilung());
    wdfGueltigAb.setDate(getAnsprechpartnerDto().getDGueltigab());

    // Partnerkommunikation

    wtfDirektfax.setText(getAnsprechpartnerDto().getCDirektfax());

    if (getAnsprechpartnerDto().getCEmail() != null) {
      wtfEmail.setEmail(getAnsprechpartnerDto().getCEmail(), getAnsprechpartnerDto());
    } else {
      wtfEmail.setEmail(null, null);
    }

    wtfFaxdurchwahl.setText(getAnsprechpartnerDto().getCFax());

    wtfDurchwahl.setPartnerKommunikationDto(dto, getAnsprechpartnerDto().getCTelefon());

    if (getAnsprechpartnerDto().getCHandy() != null) {
      wtfHandy.setPartnerKommunikationDto(
          getAnsprechpartnerDto().getPartnerDto(), getAnsprechpartnerDto().getCHandy());
    } else {
      wtfHandy.setPartnerKommunikationDto(null, null);
    }

    wtfSort.setInteger(ansprechpartnerDto.getISort());
    wtfFremdsystem.setText(ansprechpartnerDto.getCFremdsystemnr());

    wcbNewsletterEmpfaenger.setSelected(ansprechpartnerDto.isNewsletterEmpfaenger());

    if (getAnsprechpartnerDto().getCKennwort() != null) {
      wbuPasswort.setBackground(new Color(0, 200, 0));

    } else {
      wbuPasswort.setBackground(UIManager.getColor("Button.background"));
    }
  }
  private void jbInit() throws Throwable {
    this.setLayout(new GridBagLayout());
    getInternalFrame().addItemChangedListener(this);
    jpaWorkingOn.setLayout(new GridBagLayout());
    wrbErledigt.setText(LPMain.getInstance().getTextRespectUISPr("fert.losstatistik.erledigtvon"));
    wlaBis.setText(LPMain.getInstance().getTextRespectUISPr("lp.bis"));
    wdfVon.setMandatoryField(true);
    wdfBis.setMandatoryField(true);
    wdfStichtag.setMandatoryField(true);
    wdfStichtag.setTimestamp(new java.sql.Timestamp(System.currentTimeMillis()));
    wdrBereich = new WrapperDateRangeController(wdfVon, wdfBis);

    wrbStichtag.setText(LPMain.getInstance().getTextRespectUISPr("lp.stichtag"));

    buttonGroup.add(wrbErledigt);
    buttonGroup.add(wrbStichtag);
    wrbErledigt.setSelected(true);

    wbuStueckliste.setText(LPMain.getInstance().getTextRespectUISPr("button.stueckliste"));
    wbuAuftrag.setText(LPMain.getInstance().getTextRespectUISPr("button.auftrag"));
    wbuLos.setText(LPMain.getInstance().getTextRespectUISPr("fert.tab.unten.los.title") + "...");

    wcbArbeitsplanSortiertNachAG.setText(
        LPMain.getInstance()
            .getTextRespectUISPr("fertigung.report.losstatistik.arbeitsplansortiertnachag"));
    wcbVerdichtetNachArtikel.setText(
        LPMain.getInstance().getTextRespectUISPr("lp.verdichtetartikelnummer"));

    wcbVerdichtetNachArtikel.setSelected(true);

    wbuStueckliste.setActionCommand(ACTION_SPECIAL_STUECKLISTE_FROM_LISTE);
    wbuStueckliste.addActionListener(this);

    wbuAuftrag.setActionCommand(ACTION_SPECIAL_AUFTRAG_FROM_LISTE);
    wbuAuftrag.addActionListener(this);

    wbuLos.setActionCommand(ACTION_SPECIAL_LOS_FROM_LISTE);
    wbuLos.addActionListener(this);

    wtfStueckliste.setActivatable(false);
    wtfLos.setActivatable(false);
    wtfAuftrag.setActivatable(false);

    this.add(
        jpaWorkingOn,
        new GridBagConstraints(
            0,
            0,
            1,
            1,
            1.0,
            1.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(0, 0, 0, 0),
            0,
            0));
    int iZeile = 0;

    jpaWorkingOn.add(
        wrbErledigt,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfVon,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wlaBis,
        new GridBagConstraints(
            2,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfBis,
        new GridBagConstraints(
            3,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdrBereich,
        new GridBagConstraints(
            4,
            iZeile,
            1,
            1,
            0.0,
            0.0,
            GridBagConstraints.WEST,
            GridBagConstraints.BOTH,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wrbStichtag,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wdfStichtag,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;

    jpaWorkingOn.add(
        wbuLos,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfLos,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcbArbeitsplanSortiertNachAG,
        new GridBagConstraints(
            2,
            iZeile,
            2,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));

    iZeile++;
    jpaWorkingOn.add(
        wbuAuftrag,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfAuftrag,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wcbVerdichtetNachArtikel,
        new GridBagConstraints(
            2,
            iZeile,
            2,
            1,
            0.1,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    iZeile++;
    jpaWorkingOn.add(
        wbuStueckliste,
        new GridBagConstraints(
            0,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
    jpaWorkingOn.add(
        wtfStueckliste,
        new GridBagConstraints(
            1,
            iZeile,
            1,
            1,
            0,
            0.0,
            GridBagConstraints.CENTER,
            GridBagConstraints.HORIZONTAL,
            new Insets(2, 2, 2, 2),
            0,
            0));
  }