Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
3 | daniel-mar | 1 | unit Login; |
2 | |||
3 | interface |
||
4 | |||
5 | uses |
||
6 | Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, |
||
7 | Dialogs, StdCtrls, DBCtrls, DB, DBClient; |
||
8 | |||
9 | type |
||
10 | TfrmLogin = class(TForm) |
||
11 | Label1: TLabel; |
||
12 | GroupBox1: TGroupBox; |
||
13 | GroupBox2: TGroupBox; |
||
14 | Label2: TLabel; |
||
15 | Label3: TLabel; |
||
16 | Button1: TButton; |
||
17 | cbxMitarbeiter: TDBLookupComboBox; |
||
18 | cbxProjekt: TDBLookupComboBox; |
||
19 | procedure Label2Click(Sender: TObject); |
||
20 | procedure Label3Click(Sender: TObject); |
||
21 | procedure Button1Click(Sender: TObject); |
||
22 | private |
||
23 | { Private-Deklarationen } |
||
24 | public |
||
25 | { Public-Deklarationen } |
||
26 | end; |
||
27 | |||
28 | var |
||
29 | frmLogin: TfrmLogin; |
||
30 | |||
31 | implementation |
||
32 | |||
33 | uses |
||
4 | daniel-mar | 34 | BugtrackerMain, Mitarbeiter, Projekte; |
3 | daniel-mar | 35 | |
36 | {$R *.dfm} |
||
37 | |||
38 | procedure TfrmLogin.Button1Click(Sender: TObject); |
||
39 | begin |
||
40 | if VarIsNull(cbxMitarbeiter.KeyValue) then |
||
41 | begin |
||
42 | ShowMessage('Bitte Mitarbeiter auswählen.'); |
||
43 | cbxMitarbeiter.SetFocus; |
||
44 | Exit; |
||
45 | end; |
||
46 | if VarIsNull(cbxProjekt.KeyValue) then |
||
47 | begin |
||
48 | ShowMessage('Bitte Projekt auswählen.'); |
||
49 | cbxProjekt.SetFocus; |
||
50 | Exit; |
||
5 | daniel-mar | 51 | end; |
3 | daniel-mar | 52 | frmBugtracker.eingeloggtMitarbeiter := cbxMitarbeiter.KeyValue; |
5 | daniel-mar | 53 | frmBugtracker.eingeloggtMitarbeiterName := cbxMitarbeiter.Text; |
3 | daniel-mar | 54 | frmBugtracker.aktuellesProjekt := cbxProjekt.KeyValue; |
5 | daniel-mar | 55 | frmBugtracker.aktuellesProjektName := cbxProjekt.Text; |
56 | |||
57 | frmBugtracker.LblAngemeldet.Caption := Format('Eingeloggt: %s, Projekt: %s', [frmBugtracker.eingeloggtMitarbeiterName, frmBugtracker.aktuellesProjektName]); |
||
3 | daniel-mar | 58 | frmBugtracker.NeuFiltern; |
5 | daniel-mar | 59 | |
3 | daniel-mar | 60 | ModalResult := mrOk; // Das schließt den Dialog |
61 | end; |
||
62 | |||
63 | procedure TfrmLogin.Label2Click(Sender: TObject); |
||
64 | begin |
||
65 | frmMitarbeiter.ShowModal; |
||
66 | end; |
||
67 | |||
68 | procedure TfrmLogin.Label3Click(Sender: TObject); |
||
69 | begin |
||
70 | frmProjekte.ShowModal; |
||
71 | end; |
||
72 | |||
73 | end. |