AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

bessere lösung für prozeduren

Ein Thema von xan553 · begonnen am 28. Okt 2011 · letzter Beitrag vom 29. Okt 2011
 
xan553

Registriert seit: 29. Jan 2007
32 Beiträge
 
#1

bessere lösung für prozeduren

  Alt 28. Okt 2011, 23:36
servus,

gibt es für solche codepassagen vielleicht bessere lösungen die nicht so massig sind?

Delphi-Quellcode:
procedure TTblLieferanten.setSearchLabels(m: Byte);
begin
  case m of
    1: begin
         combobox2.Clear;
         Label10.visible := True;Label10.Caption := '1 = Name';
         Label11.visible := True;Label11.Caption := '2 = Kunden Nr.';
         Label13.visible := True;Label13.Caption := '';
         Label14.visible := True;Label14.Caption := '';
         combobox2.Items.Add('1');
         combobox2.Items.Add('2');
         combobox2.ItemIndex := 0;
       end;
    2: begin
         combobox2.Clear;
         Label10.visible := True;Label10.Caption := '1 = Name';
         Label11.visible := True;Label11.Caption := '3 = Artikel Nr.';
         Label13.visible := True;Label13.Caption := '6 = Bezeichnung';
         Label14.visible := True;Label14.Caption := '7 = Lieferanten';
         combobox2.Items.Add('1');
         combobox2.Items.Add('3');
         combobox2.Items.Add('6');
         combobox2.Items.Add('7');
         combobox2.ItemIndex := 0;
       end;
    3: begin
         combobox2.Clear;
         Label10.visible := True;Label10.Caption := '2 = Kunden Nr.';
         Label11.visible := True; Label11.Caption := '5 = Rechnungs Nr.';
         Label13.visible := True; Label13.Caption := '';
         Label14.Caption := '';
         combobox2.Items.Add('1');
         combobox2.Items.Add('2');
         combobox2.Items.Add('5');
         combobox2.ItemIndex := 0;
       end;
    4: begin
         combobox2.Clear;
         Label10.visible := True;Label10.Caption := '1 = Name';
         Label11.visible := True;Label11.Caption := '2 = Kunden Nr.';
         Label13.visible := True;Label13.Caption := '4 = Auftrags Nr.';
         Label14.Caption := '';
         combobox2.Items.Add('1');
         combobox2.Items.Add('2');
         combobox2.Items.Add('4');
         combobox2.ItemIndex := 0;
       end;
    5: begin
         combobox2.Clear;
         Label10.visible := True;Label10.Caption := '1 = Name';
         Label11.Caption := '';
         Label13.Caption := '';
         Label14.Caption := '';
         combobox2.Items.Add('1');
         combobox2.ItemIndex := 0;
       end;
end;
  Mit Zitat antworten Zitat
 


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:01 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz