Rev 4 | Go to most recent revision | Details | 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 |
||
34 | WuLiMain, Mitarbeiter, Projekte; |
||
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; |
||
51 | end; |
||
52 | frmBugtracker.eingeloggtMitarbeiter := cbxMitarbeiter.KeyValue; |
||
53 | frmBugtracker.aktuellesProjekt := cbxProjekt.KeyValue; |
||
54 | frmBugtracker.NeuFiltern; |
||
55 | ModalResult := mrOk; // Das schließt den Dialog |
||
56 | end; |
||
57 | |||
58 | procedure TfrmLogin.Label2Click(Sender: TObject); |
||
59 | begin |
||
60 | frmMitarbeiter.ShowModal; |
||
61 | end; |
||
62 | |||
63 | procedure TfrmLogin.Label3Click(Sender: TObject); |
||
64 | begin |
||
65 | frmProjekte.ShowModal; |
||
66 | end; |
||
67 | |||
68 | end. |