-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unit1.cpp
101 lines (86 loc) · 3.2 KB
/
Unit1.cpp
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
99
100
//---------------------------------------------------------------------------
#include <vcl.h>
#pragma hdrstop
#include "Unit1.h"
#include "Unit2.h"
#include "Unit3.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm1::FormCreate(TObject *Sender)
{
tblPutnik->Open();
tblKarta->Open();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::Timer1Timer(TObject *Sender)
{
Label3->Caption = DataSource1->DataSet->RecordCount;
}
//---------------------------------------------------------------------------
void __fastcall TForm1::newPutnikExecute(TObject *Sender)
{
DataSource1->DataSet->Append();
Form2->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::viewPutnikExecute(TObject *Sender)
{
DataSource1->DataSet->Edit();
Form2->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::deletePutnikExecute(TObject *Sender)
{
DataSource1->DataSet->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::newKartaExecute(TObject *Sender)
{
DataSource2->DataSet->Append();
Form3->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::viewKartaExecute(TObject *Sender)
{
DataSource2->DataSet->Edit();
Form3->ShowModal();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::deleteKartaExecute(TObject *Sender)
{
DataSource2->DataSet->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OProgramu1Click(TObject *Sender)
{
Application->MessageBox("Nije bilo interesantno praviti ga.", "O Programu", NULL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::OProgrameru1Click(TObject *Sender)
{
Application->MessageBox("Kaje se svojih odluka, biranje programiranja za maturski je jedan od njih.", "O Programeru", NULL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::ZaKOmisiju1Click(TObject *Sender)
{
Application->MessageBox("Treba mi maksimalna ocena da bih mogao da nastavim školovanje XD", "Za Komisiju", NULL);
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton1Click(TObject *Sender)
{
DataSource1->DataSet->Delete();
}
//---------------------------------------------------------------------------
void __fastcall TForm1::SpeedButton2Click(TObject *Sender)
{
DataSource2->DataSet->Delete();
}
//---------------------------------------------------------------------------