![]() |
AW: Geburtstagsabfrage
Und auch das Doppelte rauswerfen.
Delphi-Quellcode:
Im ersten IF ist etwas, was auch im 2. IF nochmal drin ist -> die Farbe.
if CalcBirthday(Patient1Qry.FieldByName('GEBURTSDATUM').AsDateTime) and (Geburtstagheute = False) then
begin //lblAlter.Font.Color := clRed; MessageDlg('Patient / Klient / Kunde hat heute Geburtstag.?', mtConfirmation, [mbOK],0); Geburtstagheute := True; end ; // else // begin if CalcBirthday(Patient1Qry.FieldByName('GEBURTSDATUM').AsDateTime) then lblAlter.Font.Color := clRed else lblAlter.Font.Color := clBlack; // end;
Delphi-Quellcode:
2 Drittel weniger Code, nichts Mehrfach und vermutlich auch übersichtlicher/verständlicher.
HatGeburtstag := CalcBirthday(Patient1Qry.FieldByName('GEBURTSDATUM').AsDateTime);
if HatGeburtstag and not GeburtstagHeute then MessageDlg('Patient / Klient / Kunde hat heute Geburtstag?', mtConfirmation, [mbOK], 0); GeburtstagHeute := True; //if HatGeburtstag then // lblAlter.Font.Color := clRed //else // lblAlter.Font.Color := clBlack; lblAlter.Font.Color := IfThen(HatGeburtstag, clRed, clBlack); wobei
Delphi-Quellcode:
HatGeburtstag := CalcBirthday(Patient1Qry.FieldByName('GEBURTSDATUM').AsDateTime);
//if HatGeburtstag and not GeburtstagHeute then GeburtstagHeute := MessageDlg('Patient / Klient / Kunde hat heute Geburtstag?', mtConfirmation, [mbClose,mbIgnore], 0) = mrIgnore; //if HatGeburtstag then GeburtstagHeute := GeburtstagHeute or (MessageDlg('Patient / Klient / Kunde hat heute Geburtstag?', mtConfirmation, [mbClose,mbIgnore], 0) = mrIgnore); GeburtstagHeute := GeburtstagHeute or (HatGeburtstag and (MessageDlg('Patient / Klient / Kunde hat heute Geburtstag?', mtConfirmation, [mbClose,mbIgnore], 0) = mrIgnore)); lblAlter.Font.Color := IfThen(HatGeburtstag, clRed, clBlack); |
AW: Geburtstagsabfrage
Zitat:
|
AW: Geburtstagsabfrage
Zitat:
|
AW: Geburtstagsabfrage
Och, kann schonmal passieren.
Und vielleicht will man nicht mehr erinnert werden? Mann hat es ja nicht so leicht, wie die Anderen, denn wie heißt es gerne mal? "Die besten 10 Jahre der Frau sind die zwischen 29 und 30." Aber ja, natürlich kommt es drauf an. Hier hatte sich auch mal wer gewünscht, dass beim Einloggen "alle" die heutigen Geburtstage sehen. Was schon ein bissl gegen den Datenschutz ist. |
AW: Geburtstagsabfrage
Bei uns in der Abteilung gibt's einen GID (Geburtags Informations Dienst).
Kann man "abonieren", man kann die Meldung seines Geburtstages aber sicher auch rausnehmen lassen... |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:59 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