1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71:
| procedure TForm1.heuteGeburtstag1Click(Sender: TObject); var mo, tg : integer; begin QSchueler.close; QSchueler.DatabaseName := listbox8.Items[listbox8.itemindex]; if QSchueler.DatabaseName = '' then begin QSchueler.sql.text := format('select Name, Vorname, Klasse, Gebdat, Telefon from "%s" ' + ' where GEBDAT LIKE :DATUM order by Klasse', [TbSchueler.tablename]); QSchueler.ParamByName('DATUM').asstring := maskedit1.editText+'%'; end else begin Mo := strtoint(copy(maskedit1.editText,4,2)); Tg := strtoint(copy(maskedit1.editText,1,2)); QSchueler.sql.text := format('select Name, Vorname, Klasse, Telefon, Gebdat from "%s" ' + 'where MONTH(gebdat) = :MONAT and DAY(gebdat) = :TAG ' + 'order by Klasse', [TbSchueler.tablename]); QSchueler.ParamByName('Monat').asinteger := Mo; QSchueler.ParamByName('Tag').asinteger := Tg; end; QSchueler.open; TeilMengenausgabeSG(QSchueler); if form1.tntstringgrid1.cells[1,1] <> '' then begin checkbox11.Checked := true; checkbox11click(self); fname := concat(label30.caption, 'OUTXLS\Geburtstag_S_' +inttostr(t)+inttostr(m)+ '.xls'); application.MessageBox(#13+ '--Congratulation!--', 'Geburtstagsliste'); checkbox11.Checked := false; checkbox11click(self); end else application.MessageBox('-Heute hat keine Person (S) Geburtstag!-', 'Geburtstagsliste'); MaskEdit1.Text := format('%2d', [t]) + '.' + format('%2d', [m]) + '.'; QSchuelersort(self); end;
procedure TForm1.heuteGeburtstagLKClick(Sender: TObject); var mo, tg : integer; begin QLk.close; QLk.DatabaseName := listbox8.Items[listbox8.itemindex]; if QLk.DatabaseName = '' then begin QLk.sql.text := format('select Name, Vorname, Gebdat, Telefon from "%s" ' + ' where GEBDAT LIKE :DATUM order by Name', [TbLk.tablename]); QLk.ParamByName('DATUM').asstring := maskedit1.editText+'%'; end else begin Mo := strtoint(copy(maskedit1.editText,4,2)); Tg := strtoint(copy(maskedit1.editText,1,2)); QLk.sql.text := format('select Name, Vorname, Telefon, Gebdat from "%s" ' + 'where MONTH(gebdat) = :MONAT and DAY(gebdat) = :TAG ' + 'order by Name', [TbLk.tablename]); QLk.ParamByName('Monat').asinteger := Mo; QLk.ParamByName('Tag').asinteger := Tg; end; QLk.open; TeilMengenausgabeSG(QLk); if form1.tntstringgrid1.cells[1,1] <> '' then begin checkbox11.Checked := true; checkbox11click(self); fname := concat(label30.caption, 'OUTXLS\Geburtstag_L_' +inttostr(t)+inttostr(m)+ '.xls'); application.MessageBox(#13+ '--Congratulation!--', 'Geburtstagsliste'); checkbox11.Checked := false; checkbox11click(self); end else application.MessageBox('-Heute hat keine Person (L) Geburtstag!-', 'Geburtstagsliste'); MaskEdit1.Text := format('%2d', [t]) + '.' + format('%2d', [m]) + '.'; name1click(self); end; |