Code: the program Project1;
USES the
Forms,
SysUtils,
Unit1 in 'Unit1. Pas' {Welcome},
Unit2 in 'Unit2. Pas' {Login},
Unit3 in 'Unit3. Pas' {st_Query},
Unit4 in 'Unit4. Pas' {Main},
Unit5 in 'Unit5. Pas' {Input},//mistake here wire harness for blue
Unit7 in 'Unit7. Pas' {Revise};
{$R *. Res}
The begin
Application. The Initialize;
Welcome:=TWelcome. Create (Application);//start screen to create
Welcome. The Show;
Welcome. The Update;
Application CreateForm (TMain, Main);
Application CreateForm (TLogin, Login);
Application CreateForm (Tst_Query st_Query);
Application CreateForm (TInput, Input);
Application CreateForm (TRevise, Revise);
Welcome. ProgressBar1. Position:=10;
Sleep (100);
Welcome. ProgressBar1. Position:=20;
Sleep (100);
Welcome. ProgressBar1. Position:=30;
Sleep (100);
Welcome. ProgressBar1. Position:=40;
Sleep (100);
Welcome. ProgressBar1. Position:=50;
Sleep (100);
Welcome. ProgressBar1. Position:=60;
Sleep (100);
Welcome. ProgressBar1. Position:=70;
Sleep (100);
Welcome. ProgressBar1. Position:=80;
Sleep (100);
Welcome. ProgressBar1. Position:=90;
Sleep (100);
Welcome. ProgressBar1. Position:=100;
Sleep (100);
Welcome. The Close;//close the startup screen form
Welcome. Free;//release the startup screen form of memory
Application. The Run;
End.
The unit Unit5;//can be here without borr_num
Interface
USES the
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls, DB, ADODB, Grids, DBGrids, jpeg, ExtCtrls, DBCtrls;
Type
TMyNavgator=class (TDBNavigator);
TInput=class (TForm)
GroupBox1: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
DBGrid1: TDBGrid;
ADOQuery1: TADOQuery;
DataSource1: TDataSource;
For: TButton;
Button2: TButton;
Edit4: TEdit;
CheckBox1: TCheckBox;
CheckBox2: TCheckBox;
CheckBox3: TCheckBox;
CheckBox4: TCheckBox;
CheckBox5: TCheckBox;
DBNavigator1: TDBNavigator;
Button3: TButton;
Procedure Button1Click (Sender: TObject);
Procedure FormCreate (Sender: TObject);
Procedure Button3Click (Sender: TObject);
Private
{Private declarations}
Public
{Public declarations}
end;
Var
Input: TInput;
S: a string;
Implementation
USES unit4.
{$R *. DFM}
Procedure TInput. Button1Click (Sender: TObject);
The begin
ADOQuery1. Close;
ADOQuery1. SQL. The Clear;
If CheckBox5. Checked then
The begin
CheckBox1. Checked:=true;
CheckBox2. Checked:=true;
CheckBox3. Checked:=true;
CheckBox4. Checked:=true;
end;
S:=';
If CheckBox1. Checked then: s=s + 'st_ID,';
If CheckBox2. Checked then: s=s + 'book_ID,';
If CheckBox3. Checked then: s=s + 'borr_date,';
If CheckBox4. Checked then: s=s + 'ret_date,';
S:=copy (s, 1, length (s) - 1);
ADOQuery1. SQL. The Add (' Select '+ s + "' + 'From borrow the where 1=1 ");
If CheckBox1. Checked then
The begin
ADOQuery1. SQL. The Add (' and st_ID like: sst_ID ');
ADOQuery1. The Parameters. ParamByName (' sst_ID). Value:='%' + Edit1. Text + '%';
end;
If CheckBox2. Checked then
The begin
ADOQuery1. SQL. The Add (' and book_ID like: sbook_ID ');
ADOQuery1. The Parameters. ParamByName (' sbook_ID). Value:='%' + Edit2. Text + '%';
end;
If CheckBox3. Checked then
The begin
If Edit3. Text<> "' then
The begin
ADOQuery1. SQL. The Add (' and borr_date like: sborr_date ');
ADOQuery1. The Parameters. ParamByName (' sborr_date). Value:='%' + Edit3. Text + '%';
end;
end;
If CheckBox4. Checked then
The begin
If Edit4. Text<> "' then
The begin
ADOQuery1. SQL. The Add (' and ret_date like: sret_date ');
ADOQuery1. The Parameters. ParamByName (' sret_date). Value:='%' + Edit4) Text + '%';
end;
end;
ADOQuery1. Open;
If ADOQuery1. RecordCount=0 then
The begin
MessageBox (Handle, 'the record does not exist,' prompt ', MB_OK + MB_ICONWARNING);
exit;
end;
end;
Procedure TInput. FormCreate (Sender: TObject);
The begin
TMyNavgator (DBNavigator1). [nbFirst] Buttons. Caption:='first';
TMyNavgator (DBNavigator1). [nbPrior] Buttons. Caption:='on a';
TMyNavgator (DBNavigator1). [nbNext] Buttons. Caption:='next';
TMyNavgator (DBNavigator1). [nbLast] Buttons. Caption:='article at the end of the';
TMyNavgator (DBNavigator1). [nbInsert] Buttons. Caption:='add';
TMyNavgator (DBNavigator1). [nbDelete] Buttons. Caption:='delete';
TMyNavgator (DBNavigator1). [nbEdit] Buttons. Caption:='modify';
TMyNavgator (DBNavigator1). [nbPost] Buttons. Caption:='submitted';
TMyNavgator (DBNavigator1). [nbCancel] Buttons. Caption:='undo';
TMyNavgator (DBNavigator1). [nbRefresh] Buttons. Caption:='refresh';
end;
Procedure TInput. Button3Click (Sender: TObject);
nullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnullnull