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: 72: 73: 74: 75: 76: 77: 78: 79: 80: 81: 82: 83: 84: 85: 86: 87: 88: 89: 90: 91: 92: 93: 94: 95: 96: 97: 98:
| unit ggg;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, Grids, StdCtrls, Menus, Buttons, Mask;
type TForm1 = class(TForm) StringGrid1: TStringGrid; BitBtn1: TBitBtn; Edit1: TEdit; Edit2: TEdit; Edit4: TEdit; Startdatum: TLabel; Dauer: TLabel; Kundennummer: TLabel; Fahrzeugnummer: TLabel; MainMenu1: TMainMenu; Datei1: TMenuItem; Dateiffnen1: TMenuItem; DateiSpeichern1: TMenuItem; N1: TMenuItem; Schlieen1: TMenuItem; Bearbeiten1: TMenuItem; Lschen1: TMenuItem; Auftragbearbeiten1: TMenuItem; MaskEdit1: TMaskEdit; Kalenderwoche: TLabel; procedure StringGrid1Enter(Sender: TObject); procedure Schlieen1Click(Sender: TObject);
private public end;
var Form1: TForm1; Key: Char;
implementation
{$R *.dfm}
procedure TForm1.Schlieen1Click(Sender: TObject); begin Close; end;
procedure TForm1.StringGrid1Enter(Sender: TObject);
var i, z: Integer; tmpDatum: TDate; Tag: String; begin tmpDatum := StrToDate('01.01.' + FormatDateTime('2010', now));
for i:=1 to 365 do
StringGrid1.Refresh; for i:=1 to 365 do begin
for z:=1 to 365 do begin if z = i then break; tmpDatum:= tmpDatum + 1; end; StringGrid1.Cells[i, 1]:= FormatDateTime('dd.mm.yyyy', tmpDatum); StringGrid1.Cells[i, 2]:= LongDayNames[DayOfWeek(tmpDatum)]; tmpDatum := StrToDate('01.01.' + FormatDateTime('yyyy', now)); StringGrid1.ColWidths[i] := 70; StringGrid1.ColWidths[0] := 80;
end; StringGrid1.Cells[0,0] := 'Kalenderwoche'; StringGrid1.Cells[0,1] := 'Datum'; StringGrid1.Cells[0,2] := 'Wochentag'; StringGrid1.Cells[0,3] := 'LKW 1'; StringGrid1.Cells[0,4] := 'LKW 2'; StringGrid1.Cells[0,5] := 'LKW 3'; end;
end. |