Shaklda jadvalni ko'rsatish uchun unga komponentlarni joylashtirish kerak:
· Jadval (BDE yorlig'ida) - Ob'ekt inspektorida "Parametrlar" yorlig'ida Tablename xususiyatida kerakli jadvalni tanlang.
23-rasm
· DBGrid (DataControls yorlig'ida) - jadvalni formada ko'rsatish uchun talab qilinadi, Ob'ekt inspektorida, DataSource xususiyatida kerakli ma'lumotlar manbasini ko'rsating.
24-rasm
· DBNavigator (DataControls yorlig'ida) - jadval yozuvlari bo'ylab harakatlanish uchun zarur. Ob'ekt inspektorida DataSource xususiyati DBGriddagi kabi bir xil ma'lumotlar manbasini belgilaydi. Navigator funksiyalari ilova ishlayotgan vaqtda uning tugmalarini bosish orqali mavjud.Kompanentda 10 ta tugma mavjud.
25-rasm
· DataSource (Ma'lumotlarga kirish yorlig'i) - ma'lumotlarga kirish uchun o'rta darajadagi komponent. DBMS jadvallari va ekrandagi boshqaruv elementlari (DBGrid, DBNavigator) o'rtasida vositachi bo'lib xizmat qiladi.
26-rasm
14. Ma'lumot (Memo) va tugmalar bilan maydon yaratish
Memo komponenti Standart yorlig'ida joylashgan shaklga joylashtirilgan.
27-rasm
"Parametrlar" yorlig'idagi ob'ekt inspektori, Lines xususiyatiga ko'rsatish uchun kerakli matnni kiriting.
28-rasm
Tugmalar yaratish.
Shaklni to'g'ri yopish uchun uning ustiga "Standart" yorlig'ida joylashgan "Buton" komponenti joylashtirilgan.
29-rasm
Tugma ishlashi uchun OnClick hodisasi ishlov beruvchisida quyidagilarni ko'rsatishingiz kerak:
protsedurasi TForm1.N5Click (Sender: TObject);
boshlash
Form2.Show;
Form1.Close;
oxiri;
15. Jadvallar uchun imzolar yaratish
Kurs ishida jadvalga imzo chekish uchun Standart yorlig'ida joylashgan Lable komponentidan foydalanilgan. Ob'ekt inspektorida, Caption xususiyatida siz faqat matnni yozishingiz kerak.
30-rasm
16. Ochiladigan ro'yxat tuzing
Mavjud ro'yxatdan buyruqni tanlash uchun ComboBox komponentidan (ochiladigan ro'yxat) foydalaning. Uni shu tarzda to'ldirish mumkin
Ob'ekt inspektorida, Items xususiyatida siz quyidagilarni yozishingiz kerak:
31-rasm
16. Hisobotlarni yaratish
Hisobot QReports vositasi yordamida yaratiladi, u boshidan ulangan bo'lishi kerak: Komponent-> paketlarni o'rnatish-> qo'shish bin papkasini oching dclqrt70.bpl faylini tanlang OK tugmasini bosing va keyin QReport komponentlari bilan yorliq paydo bo'ladi. Men foydalanadigan komponentlar:
jadval 2
17. Dastur ro'yxati
Loyihaning tavsifi
Loyiha 1 dasturi;
foydalanadi
Shakllar,
"Unit1.pas" dagi 1-birlik (Form1),
"Unit2.pas" da (Form2) 2-birlik),
"Unit3.pas" da (Form3) 3-birlik),
"Unit4.pas" da (Form4) 4-birlik),
"Unit5.pas" dagi 5 birlik (Form5),
"Unit6.pas" da (Form6) 6-birlik),
"Unit7.pas" dagi 7 birlik (Form7),
"Unit8.pas" da (Form8) 8-birlik),
"Unit9.pas" (Form9) da 9-birlik),
"Unit10.pas" da 10 birlik (Form10),
"Unit11.pas" da (Form11) 11-birlik),
"Unit12.pas" da 12 birlik (Form12),
"Unit13.pas" dagi 13-birlik (Form13),
"Unit14.pas" da (Form14) birlik14;
($ R * .res)
boshlash
Application.Initialize;
Application.CreateForm (TForm1, Form1);
Application.CreateForm (TForm2, Form2);
Application.CreateForm (TForm3, Form3);
Application.CreateForm (TForm4, Form4);
Application.CreateForm (TForm5, Form5);
Application.CreateForm (TForm6, Form6);
Application.CreateForm (TForm7, Form7);
Application.CreateForm (TForm8, Form8);
Application.CreateForm (TForm9, Form9);
Application.CreateForm (TForm10, Form10);
Application.CreateForm (TForm11, Form11);
Application.CreateForm (TForm12, Form12);
Application.CreateForm (TForm13, Form13);
Application.CreateForm (TForm14, Form14);
Application.Run;
oxiri.
Unit1 modulining tavsifi
birlik 1;
interfeys
foydalanadi
Dialoglar, StdCtrls;
turi
TForm1 = sinf (TForm)
Memo1: TMemo;
1-tugma: TB tugmasi;
2-tugma: TB tugmasi;
3-tugma: TB tugmasi;
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form1: TForm1;
amalga oshirish
Unit2, Unit4, Unit6, Unit7, Unit5, Unit8, Unit9, Unit10 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm1.Button3Click (Sender: TObject);
boshlash
Form2.show;
oxiri;
protsedurasi TForm1.Button2Click (Sender: TObject);
boshlash
Form1.Close;
oxiri;
protsedurasi TForm1.Button1Click (Sender: TObject);
boshlash
Form4.show;
oxiri;
oxiri.
Unit2 modulining tavsifi
birlik 2;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, StdCtrls;
turi
TForm2 = sinf (TForm)
Memo1: TMemo;
GroupBox1: TGroupBox;
1-tugma: TB tugmasi;
2-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Shakl2: TForm2;
amalga oshirish
Unit3 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm2.Button1Click (Sender: TObject);
boshlash
Form3.show;
Form2.Close;
oxiri;
protsedurasi TForm2.Button2Click (Sender: TObject);
boshlash
Form2.Close;
oxiri;
Unit3 modulining tavsifi
birlik 3;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, ComCtrls, ExtCtrls, DBCtrls, Grids, DBGrids, DB, DBTables,
StdCtrls, QuickRpt, QRCtrls;
turi
TForm3 = sinf (TForm)
PageControl1: TPageControl;
TabSheet1: TTabSheet;
TabSheet2: TTabSheet;
TabSheet3: TTabSheet;
TabSheet4: TTabSheet;
TabSheet5: TTabSheet;
TabSheet6: TTabSheet;
DataSource1: TDataSource;
DataSource2: TDataSource;
DataSource3: TDataSource;
DataSource4: TDataSource;
1-jadval: TTjadval;
2-jadval: TTjadval;
3-jadval: TTjadval;
4-jadval: TTjadval;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
DBGrid2: TDBGrid;
DBNavigator2: TDBNavigator;
DBGrid3: TDBGrid;
DBNavigator3: TDBNavigator;
DBGrid4: TDBGrid;
DBNavigator4: TDBNavigator;
DBGrid5: TDBGrid;
DBNavigator5: TDBNavigator;
DBGrid6: TDBGrid;
DBNavigator6: TDBNavigator;
1-tugma: TB tugmasi;
DataSource5: TDataSource;
DataSource6: TDataSource;
5-jadval: TTjadval;
6-jadval: TTjadval;
1-so'rov: TQuery;
2-tugma: TB tugmasi;
Label1: TLabel;
Memo1: TMemo;
Label3: TLabel;
3-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
protsedura Button3Click (Yuborish: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form3: TForm3;
amalga oshirish
Unit5, Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm3.Button1Click (Sender: TObject);
boshlash
Form11.show;
Form3.close;
oxiri;
protsedurasi TForm3.Button2Click (Sender: TObject);
boshlash
Query1.ExecSQL;
Form3.Refresh;
oxiri;
protsedurasi TForm3.Button3Click (Sender: TObject);
boshlash
Form3.close;
oxiri;
Unit4 modulining tavsifi
birlik 4;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, StdCtrls;
turi
TForm4 = sinf (TForm)
Memo1: TMemo;
1-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form4: TForm4;
amalga oshirish
Unit1 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm4.Button1Click (Sender: TObject);
boshlash
Form1.show;
oxiri;
5-birlik modulining tavsifi
birlik 5;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, DB, DBTables, Gridlar, DBGrids, StdCtrls, Mask, DBCtrls, ExtCtrls;
turi
TForm5 = sinf (TForm)
DataSource1: TDataSource;
DBGrid1: TDBGrid;
1-so'rov: TQuery;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
DBEdit3: TDBEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
DBNavigator1: TDBNavigator;
1-tugma: TB tugmasi;
ComboBox1Change protsedurasi (Sender: TObject);
Edit1Change protsedurasi (Sender: TObject);
protsedura Button1Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form5: TForm5;
amalga oshirish
Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm5.ComboBox1Change (Sender: TObject);
boshlash
Query1.Active: = true;
oxiri;
protsedurasi TForm5.Edit1Change (Sender: TObject);
boshlash
So'rov1.Ochish;
oxiri;
protsedurasi TForm5.Button1Click (Sender: TObject);
boshlash
Form11.show;
Form5.Close;
oxiri;
6-qism tavsifi
birlik 6;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, DB, DBTables, Grids, DBGrids, StdCtrls, ExtCtrls, DBCtrls;
turi
TForm6 = sinf (TForm)
1-tugma: TB tugmasi;
Edit1: TEdit;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
1-so'rov: TQuery;
Label1: TLabel;
DBNavigator1: TDBNavigator;
Label2: TLabel;
Memo1: TMemo;
2-tugma: TB tugmasi;
Label3: TLabel;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form6: TForm6;
amalga oshirish
Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm6.Button1Click (Sender: TObject);
boshlash
Query1.Close;
agar bo'lmasa Query1.Prepared keyin
So'rov1.Tayyorlash;
agar uzunlik (edit1.text)<>keyin 0
boshqa
boshlash
Query1.Params.Value: = 0;
oxiri;
So'rov1.Ochish;
oxiri;
protsedurasi TForm6.Button2Click (Sender: TObject);
boshlash
Form11.show;
Form6.Close;
oxiri;
7-birlik modulining tavsifi
birlik 7;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, StdCtrls, Grids, DBGrids, DBTables, DB, Mask, DBCtrls, ExtCtrls,
QRCtrls, QuickRpt;
turi
TForm7 = sinf (TForm)
Label1: TLabel;
Label2: TLabel;
DataSource1: TDataSource;
1-so'rov: TQuery;
Edit2: TEdit;
1-tugma: TB tugmasi;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
Label3: TLabel;
DBGrid1: TDBGrid;
Label4: TLabel;
Label5: TLabel;
DBNavigator1: TDBNavigator;
2-tugma: TB tugmasi;
Label6: TLabel;
Label7: TLabel;
Memo1: TMemo;
ComboBox1: TComboBox;
Label8: TLabel;
3-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
protsedura Button3Click (Yuborish: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form7: TForm7;
amalga oshirish
Unit5, Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm7.Button1Click (Sender: TObject);
boshlash
Query1.Close;
agar bo'lmasa Query1.Prepared keyin
So'rov1.Tayyorlash;
agar uzunlik (edit2.text)<>keyin 0
Query1.Params.Value: = edit2.Text
boshqa
boshlash
Query1.Params.Value: = 0;
edit2.Text: = "Iltimos, sarlavha kiriting!";
oxiri;
So'rov1.Ochish;
oxiri;
protsedurasi TForm7.Button2Click (Sender: TObject);
boshlash
Form5.show;
Form7.close;
oxiri;
protsedurasi TForm7.Button3Click (Sender: TObject);
boshlash
Form11.show;
Form7.close;
oxiri;
8-birlik modulining tavsifi
birlik 8;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
turi
TForm8 = sinf (TForm)
Label4: TLabel;
DataSource1: TDataSource;
1-so'rov: TQuery;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
1-tugma: TB tugmasi;
Memo1: TMemo;
protsedura Button1Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form8: TForm8;
amalga oshirish
Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm8.Button1Click (Sender: TObject);
boshlash
Form11.show;
Form8.close;
oxiri;
9-birlik modulining tavsifi
birlik 9;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, Gridlar, DBGrids, DB, DBTables, StdCtrls, Mask, DBCtrls, ExtCtrls;
turi
TForm9 = sinf (TForm)
Edit1: TEdit;
1-so'rov: TQuery;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
1-tugma: TB tugmasi;
2-so'rov: TQuery;
DataSource2: TDataSource;
2-tugma: TB tugmasi;
DBEdit1: TDBEdit;
DBNavigator1: TDBNavigator;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Nomi: TComboBox;
3-tugma: TB tugmasi;
Memo1: TMemo;
Label4: TLabel;
4-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
protsedura Button3Click (Yuborish: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form9: TForm9;
amalga oshirish
Unit11, Unit13 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm9.Button1Click (Sender: TObject);
boshlash
Query1.Close;
agar bo'lmasa Query1.Prepared keyin
So'rov1.Tayyorlash;
agar uzunlik (edit1.text)<>keyin 0
Query1.Params.Value: = edit1.Text
boshqa
boshlash
Query1.Params.Value: = 0;
edit1.Text: = "Iltimos, bitiruvchining ismini kiriting!";
oxiri;
So'rov1.Ochish;
oxiri;
protsedurasi TForm9.Button2Click (Sender: TObject);
boshlash
Query2.Close;
bo'lmasa Query2.Prepared keyin
So'rov 2. Tayyorlash;
agar uzunlik (edit1.text)<>keyin 0
Query2.Params.Value: = edit1.Text
boshqa
boshlash
Query2.Params.Value: = 0;
edit1.Text: = "Iltimos, semestr raqamini kiriting!";
oxiri;
So'rov2.Ochish;
oxiri;
protsedurasi TForm9.Button3Click (Sender: TObject);
boshlash
Form11.show;
Form9.close;
oxiri;
protsedurasi TForm9.Button4Click (Sender: TObject);
boshlash
Form13.QuickRep1.Preview;
oxiri;
10-qismning tavsifi
birlik 10;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, ExtCtrls, QuickRpt, StdCtrls, DB, DBTables, Mask, DBCtrls,
Gridlar, DBGrids;
turi
TForm10 = sinf (TForm)
1-tugma: TB tugmasi;
1-so'rov: TQuery;
DataSource1: TDataSource;
DBEdit1: TDBEdit;
DBEdit2: TDBEdit;
Label1: TLabel;
Label2: TLabel;
Edit1: TEdit;
2-tugma: TB tugmasi;
Label3: TLabel;
ComboBox1: TComboBox;
Label4: TLabel;
Label5: TLabel;
Memo1: TMemo;
Label6: TLabel;
Label7: TLabel;
3-tugma: TB tugmasi;
protsedura Button1Click (Sender: TObject);
Protsedura Button2Click (Sender: TObject);
protsedura Button3Click (Yuborish: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form10: TForm10;
amalga oshirish
Unit3, Unit7, Unit12, Unit11 dan foydalanadi;
($ R * .dfm)
protsedurasi TForm10.Button1Click (Sender: TObject);
boshlash
Form12.QuickRep1.Preview;
oxiri;
protsedurasi TForm10.Button2Click (Sender: TObject);
boshlash
Query1.Close;
agar bo'lmasa Query1.Prepared keyin
So'rov1.Tayyorlash;
agar uzunlik (edit1.text)<>keyin 0
Query1.Params.Value: = edit1.Text
boshqa
boshlash
Query1.Params.Value: = 0;
edit1.Text: = "Iltimos, sarlavha kiriting!";
oxiri;
So'rov1.Ochish;
oxiri;
protsedurasi TForm10.Button3Click (Sender: TObject);
boshlash
Form11.show;
oxiri;
11-qism tavsifi
birlik 11;
interfeys
foydalanadi
Windows, Xabarlar, SysUtils, Variantlar, Sinflar, Grafika, Boshqaruv elementlari, Shakllar,
Dialoglar, StdCtrls;
turi
TForm11 = sinf (TForm)
1-tugma: TB tugmasi;
2-tugma: TB tugmasi;
3-tugma: TB tugmasi;
4-tugma: TB tugmasi;
5-tugma: TB tugmasi;
6-tugma: TB tugmasi;
Memo1: TMemo;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
7-tugma: TB tugmasi;
Label4: TLabel;
Label5: TLabel;
Protsedura Button2Click (Sender: TObject);
protsedura Button1Click (Sender: TObject);
Protsedura Button4Click (Sender: TObject);
protsedura Button3Click (Yuborish: TObject);
protsedura Button5Click (Yuborish: TObject);
protsedura Button6Click (Sender: TObject);
protsedura Button7Click (Sender: TObject);
xususiy
(Shaxsiy deklaratsiyalar)
ommaviy
(Ommaviy deklaratsiyalar)
oxiri;
var
Form11: TForm11;
amalga oshirish
Do'stlaringiz bilan baham: |