Автоматтанған жұмыс орындарын құру теориясы


Қолданушы мен орнатушыға нұсқау



бет14/14
Дата11.06.2023
өлшемі1,98 Mb.
#100577
1   ...   6   7   8   9   10   11   12   13   14
Байланысты:
Диплом

Қолданушы мен орнатушыға нұсқау

Программалық бөлім мен аппаратураға қойылатын талаптар:



  • Seleron2, Pentium2,3 процессорлы дербес компьютер;

  • ОЕҚ 64-Мбайт;

  • Windows 2000, ХР.

Программалық өнімнің дистрибютивті қосымшасы жасалынған. Берілген комплекс ашық түрдегі программалық өнім болып табылады, яғни программаға өзгертулерді енгізуге және пайда болған сұрақтарға байланысты адаптациялауға мүмкіндік береді


Қолданылған әдебиеттер:



  1. Баженова И.Ю. Delphi 6. Самоучитель программиста – М.: Кудиц – Образ, 2002. –432с.

  2. Кандзюба С.П. Delphi 6. Базы данных приложения: Лекции и упражнения /Кандзюба С.П., Громов В.Н. -М: Диа-Софт. 2001-576с.

  3. Кенту Марко. Delphi 5 для профессианалов. СПб.: Питер, 2001-944с

  4. П.В. Шумаков, В.В. Фаронов, «Delphi 5 руководство разработчика базы

  5. Фaрoнoв В. «Delphi yчeбный кyрc»,Издaтeльcкий дoм «Питeр» 2002 г.

  6. А.Хомоненко, В.Гофман, Е.Мещеряков, В.Никифоров «DELPHI7», Санкт-Петербург, «БХВ-Петербург», 2006.

  7. М.В.Козлов «Раработка локальных баз данных в DELPHI», Уральск – 2006.

  8. М.М.Ерекешова, Т.А.Әмірғалиева «DELPHI ортасында программалау негіздері» (оқу құралы), Қ.Жұбанов атындағы Ақтөбе мемлекеттік университетінің ИЕТ кафедрасы, 2004ж.

  9. Архангельский А.Я. Язык SQL в Delphi 5. –М: Бином, 2000 –208с. ил-(Все о Delphi)

  10. Бобровский С. Delphi 57 Учебный курс. – СПб.: Питер,и 2002-640с.

  11. Н.Культин. Delphi задачах и примерах. – СПб.: БХВ-Петербург, 2004



Қосымша



unit Unit1;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, Menus, DB, DBTables, Grids, DBGrids, ToolWin, ComCtrls, StdCtrls,
jpeg, ExtCtrls;

type
TForm1 = class(TForm)


MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N5: TMenuItem;
N8: TMenuItem;
Image1: TImage;
Label2: TLabel;
Label1: TLabel;
procedure N2Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N5Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form1: TForm1;


implementation


uses Unit2, Unit10, Unit13, Unit14, Unit3, Unit17;


{$R *.dfm}


procedure TForm1.N2Click(Sender: TObject);


begin
Close;
PasswordDlg.Close;
end;

procedure TForm1.N6Click(Sender: TObject);


var i:integer;
begin
Form2.Show;
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order By id');
Open;
end;
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau');
Open;
end;
Form3.ComboBox3.Clear;
Form3.ComboBox3.Text:='';
for i:=1 to Form2.Query3.RecordCount do begin

Form3.ComboBox3.Items.Add(Form2.Query3.FieldByName('Familia').AsString+' '+Form2.Query3.FieldByName('Ati').AsString+' '+Form2.Query3.FieldByName('Otchestvo').AsString);


Form2.Query3.Next; end;
Form2.GroupBox1.Visible:=True;
Form2.N9.Visible:=True;
Form2.DBGrid3.Visible:=false;
Form2.DBGrid1.Visible:=True;
Form2.N16.Visible:=False;
Form2.N10.Visible:=True;
Form2.N19.Visible:=True;
//Form2.DBGrid1.Columns.Items[1].Visible:=false;
//Form2.DBGrid2.Columns.Items[1].Visible:=false;
with form2.DBGrid1 do begin
Columns.Items[0].Title.Caption:='Фамилия';
Columns.Items[1].Title.Caption:='Аты';
Columns.Items[2].Title.Caption:='Әкесінің аты';
Columns.Items[3].Title.Caption:='Туған жылы';
Columns.Items[4].Title.Caption:='Мекен-жайы';
Columns.Items[5].Title.Caption:='Жұмыс орны';
Columns.Items[6].Title.Caption:='Стаж';
Columns.Items[7].Title.Caption:='Айелінің стажы';
Columns.Items[8].Title.Caption:='Жеңілдік';
Columns.Items[9].Title.Caption:='Жалақысы';
Columns.Items[10].Title.Caption:='Айелінің жалақысы';
Columns.Items[11].Title.Caption:='Семья құрамы';
Columns.Items[12].Title.Caption:='Бала саны';
Columns.Items[13].Title.Caption:='Пәтерге сұраныс(бөлме)'; end;

with Form2.Query2 do begin


Close;
SQL.Clear;
SQL.Add('select *from Ball_engizu Order By id_Ariz_Beru');
Open;
end;
with Form2.DBGrid2 do begin
Columns.Items[0].Title.Caption:='Нөмір';
Columns.Items[1].Title.Caption:='Аты-жөні';
Columns.Items[2].Title.Caption:='Баллы';end;
Form2.Caption:='Арыз беруши';
//Form2.DBGrid1.Columns.Items[0].Visible:=false;
Form1.Hide;
end;

procedure TForm1.N7Click(Sender: TObject);


begin
Form2.Show;
Form2.N9.Visible:=False;
Form2.N19.Visible:=False;
//Form2.DBGrid1.Columns.Items[1].Visible:=false;
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select *from Ariz_kabildau a, doljn d where (a.id_kizmeti=d.id)order By id');
Open;
end;
with form2.DBGrid3 do begin
//Columns.Items[0].Title.Caption:='Нөмір';
Columns.Items[0].Title.Caption:='Фамилия';
Columns.Items[1].Title.Caption:='Аты';
Columns.Items[2].Title.Caption:='Әкесінің аты';
Columns.Items[3].Title.Caption:='Мекен-жайы';
Columns.Items[4].Title.Caption:='Қызметі'; end;
Form2.Caption:='Арыз кабылдаушы';
//Form2.DBGrid3.Columns.Items[0].Visible:=false;
Form2.GroupBox1.Visible:=false;
Form2.DBGrid1.Visible:=false;
Form2.DBGrid3.Visible:=True;
Form2.N16.Visible:=True;
Form2.N10.Visible:=False;
Form1.Hide;
end;

procedure TForm1.N4Click(Sender: TObject);


begin
Form10.Show;
Form1.Hide;
with Form10.Query1 do begin
Close;
SQL.Clear;
SQL.Add('select *from Jenildik');
Open;
end;
end;

procedure TForm1.N8Click(Sender: TObject);


begin
Form13.Show;
end;

procedure TForm1.N5Click(Sender: TObject);


begin
Form1.Hide;
Form14.Show;
with Form14 do begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Text:='select * from Nesie_beru';
Query1.Open;
end;
end;

end.
unit Unit2;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, Grids, DBGrids, DB, DBTables, Menus, StdCtrls;

type
TForm2 = class(TForm)


Query1: TQuery;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
DBGrid2: TDBGrid;
Query2: TQuery;
DataSource2: TDataSource;
GroupBox1: TGroupBox;
DBGrid3: TDBGrid;
Query3: TQuery;
DataSource3: TDataSource;
N8: TMenuItem;
N11: TMenuItem;
N12: TMenuItem;
N13: TMenuItem;
N14: TMenuItem;
N15: TMenuItem;
N16: TMenuItem;
N17: TMenuItem;
N18: TMenuItem;
N19: TMenuItem;
N20: TMenuItem;
N21: TMenuItem;
N22: TMenuItem;
N23: TMenuItem;
procedure N2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure N5Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N9Click(Sender: TObject);
procedure DBGrid1CellClick(Column: TColumn);
procedure N13Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N14Click(Sender: TObject);
procedure N16Click(Sender: TObject);
procedure N15Click(Sender: TObject);
procedure N17Click(Sender: TObject);
procedure N18Click(Sender: TObject);
procedure N21Click(Sender: TObject);
procedure N23Click(Sender: TObject);
procedure N20Click(Sender: TObject);
procedure N22Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form2: TForm2; sd,st,i,id_d:Integer;


implementation


uses Unit1, Unit3, Unit4, Unit5, Unit6, Unit7, Unit9, Unit10, Unit8;


{$R *.dfm}


procedure TForm2.N2Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши'
then begin
Form3.Show;
Form3.Tag:=1;
Form3.Caption:='Енгізу';
with Form3 do begin
Edit1.Text:='';
Edit2.Text:='';
Edit3.Text:='';
Edit4.Text:='';
Edit5.Text:='';
Edit6.Text:='';
Edit7.Text:='';
Edit8.Text:='';
Edit9.Text:='';
Edit10.Text:='';
Edit11.Text:='';
ComboBox1.Text:='';
ComboBox2.Text:='';
ComboBox3.Text:='';
end;
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Jenildik');
Open;

for i:=1 to Query3.RecordCount do begin


Form3.ComboBox1.Items.Add(Query3.FieldByName('Name').AsString);
Query3.Next;end; end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form4 do begin
Form4.Show;
Form4.Tag:=1;
Form4.Caption:='Енгізу';
with Form4.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Doljn');
Open;

for i:=1 to Query1.RecordCount do begin


ComboBox1.Items.Add(Query1.FieldByName('Name').AsString);
ComboBox2.Items.Add(Query1.FieldByName('id').AsString);
Query1.Next;end; end;
end; end;

procedure TForm2.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form1.Show;
Form2.Hide;
end;

procedure TForm2.N5Click(Sender: TObject);


begin
Form1.Show;
Form2.Hide;
end;

procedure TForm2.N3Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши'
then begin
with form3 do begin
show;
Tag:=2;
Caption:='Өзгерту';
Edit1.Text:=Query1.FieldByName('Familia').AsString;
Edit2.Text:=Query1.FieldByName('Ati').AsString;
Edit3.Text:=Query1.FieldByName('Otchestvo').AsString;
DateTimePicker1.Date:=Query1.FieldByName('Tugan_jili').AsDateTime;
Edit4.Text:=Query1.FieldByName('Adress').AsString;
Edit5.Text:=Query1.FieldByName('Jumis_orni').AsString;
Edit6.Text:=Query1.FieldByName('Jumis_staji').AsString;
ComboBox1.Text:=Query1.FieldByName('Jenildik').AsString;
Edit7.Text:=Query1.FieldByName('Jalakisi').AsString;
Edit8.Text:=Query1.FieldByName('Semia_kurami').AsString;
ComboBox2.Text:=Query1.FieldByName('Paterge_suranis').AsString;
ComboBox3.Text:=Query1.FieldByName('Ariz_Kabil_FIO').AsString;
Edit9.Text:=IntToStr(Query1.FieldByName('Aiel_staj').AsInteger);
Edit10.Text:=IntToStr(Query1.FieldByName('AIel_Jalaki').AsInteger);
Edit11.Text:=IntToStr(Query1.FieldByName('Bala_sani').AsInteger);
end;
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Jenildik');
Open;
end;
Form3.ComboBox1.Items.Add(Query3.FieldByName('Name').AsString);
end else
if Form2.Caption='Арыз кабылдаушы' then
with form4 do begin
show;
Tag:=2;
Caption:='Өзгерту';
Edit1.Text:=Query3.FieldByName('Familia').AsString;
Edit2.Text:=Query3.FieldByName('Ati').AsString;
Edit3.Text:=Query3.FieldByName('Otchestvo').AsString;
Edit4.Text:=Query3.FieldByName('Adress').AsString;
Form4.Show;
Form4.Caption:='Енгізу';
id_d:=Query3.FieldByName('id').AsInteger;
with Form4.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Doljn');
Open;
for i:=1 to Query1.RecordCount do begin
ComboBox1.Items.Add(Query1.FieldByName('Name').AsString);
ComboBox2.Items.Add(Query1.FieldByName('id').AsString);
if Query1.FieldByName('id').AsInteger=id_d then
ComboBox1.ItemIndex:=i-1;
Query1.Next;end; end;
end;end;

procedure TForm2.N7Click(Sender: TObject);


begin
Form5.Edit1.Clear;
Form5.ComboBox1.Text:='';
if Form2.Caption='Арыз беруши' then begin
with Form5 do begin
Show;
ComboBox1.Clear;
ComboBox1.Items.Add('Фамилиясы');
ComboBox1.Items.Add('Аты');
ComboBox1.Items.Add('Әкесінің аты');
ComboBox1.Items.Add('Туған жылы');
ComboBox1.Items.Add('Мекен-жайы');
ComboBox1.Items.Add('Жұмыс орны');
ComboBox1.Items.Add('Жұмыс стажы');
ComboBox1.Items.Add('Жеңілдік');
ComboBox1.Items.Add('Жалақысы');
ComboBox1.Items.Add('Семья құрамы');
ComboBox1.Items.Add('Пәтерге сұраныс(Болме)');
end;end else
with Form5 do begin
Show;
ComboBox1.Clear;
ComboBox1.Items.Add('Фамилиясы');
ComboBox1.Items.Add('Аты');
ComboBox1.Items.Add('Әкесінің аты');
ComboBox1.Items.Add('Мекен-жайы');
ComboBox1.Items.Add('Қызметі');
end; end;

procedure TForm2.N9Click(Sender: TObject);


begin
Form6.Show;
Form6.Edit1.Clear;
Form6.Edit2.Clear;
end;

procedure TForm2.DBGrid1CellClick(Column: TColumn);


begin
with Form2.Query2 do begin
Close;
SQL.Clear;
SQL.Add('select *from Ball_engizu where id_Ariz_Beru="'+IntToStr(form2.query1.fieldByName('id').AsInteger)+'"');
Open;
end;

end;

procedure TForm2.N13Click(Sender: TObject);
begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu');
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau');
Open;
end; end;
procedure TForm2.N4Click(Sender: TObject);
begin
if MessageDlg('өшіресіз бе?',mtConfirmation, [mbYes, mbNo], 0) = mrNo then exit;
if Form2.Caption='Арыз беруши' then begin
sd:=Query1.FieldByName('id').AsInteger;
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('delete FROM Ariz_Beru where id="'+IntToStr(sd)+'"');
ExecSQL;
Close;
SQL.Text:='select *from Ariz_Beru';
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('delete FROM Ball_engizu where id_Ariz_Beru="'+IntToStr(sd)+'"');
ExecSQL;
Close;
SQL.Text:='select *from Ball_engizu';
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
st:=Query3.FieldByName('id').AsInteger;
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('Delete FROM Ariz_Kabildau where id="'+IntToStr(st)+'"');
ExecSQL;
Close;
SQL.Text:='select *from Ariz_Kabildau';
Open;
end;
end;

procedure TForm2.N14Click(Sender: TObject);


begin
Form7.QuickRep1.Preview;
end;

procedure TForm2.N16Click(Sender: TObject);


begin
Form9.QuickRep1.Preview;
end;

procedure TForm2.N15Click(Sender: TObject);


begin
Form8.QuickRep1.Preview;

end;

procedure TForm2.N17Click(Sender: TObject);
begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by id');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by id_Ariz_Beru');
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau order by id');
Open;
end;

end;

procedure TForm2.N18Click(Sender: TObject);
begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by id desc');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by id_Ariz_Beru desc');
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau order by id desc');
Open;
end;
end;

procedure TForm2.N21Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by Familia desc');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by Ati_joni desc');
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau order by Familia desc');
Open;
end;
end;

procedure TForm2.N23Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by Tugan_jili desc');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by id_Ariz_Beru desc');
Open;
end;
end
end;

procedure TForm2.N20Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by Familia ');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by Ati_joni');
Open;
end;
end else
if Form2.Caption='Арыз кабылдаушы' then
with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Kabildau order by Familia');
Open;
end;

end;

procedure TForm2.N22Click(Sender: TObject);
begin
if Form2.Caption='Арыз беруши' then begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru order by Tugan_jili');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu order by id_Ariz_Beru');
Open;
end;
end;

end;

end.
unit Unit3;

interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, ExtCtrls, ComCtrls, Buttons;

type
TForm3 = class(TForm)


Panel1: TPanel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
Edit5: TEdit;
Edit6: TEdit;
Edit7: TEdit;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Label6: TLabel;
Label7: TLabel;
ComboBox1: TComboBox;
DateTimePicker1: TDateTimePicker;
Label8: TLabel;
Label9: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
Edit8: TEdit;
Label10: TLabel;
Label11: TLabel;
ComboBox2: TComboBox;
Label12: TLabel;
ComboBox3: TComboBox;
Label13: TLabel;
Edit9: TEdit;
Label14: TLabel;
Edit10: TEdit;
Label15: TLabel;
Edit11: TEdit;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form3: TForm3; vv:Integer;id_ariz:Integer;


implementation


uses Unit2, Unit1, DB;


{$R *.dfm}


procedure TForm3.BitBtn1Click(Sender: TObject);


begin
if Form3.Tag=1 then begin
with form2 do begin
Query1.Close;
Query1.SQL.Text:='select * from ariz_beru';
Query1.Open;
Query1.Insert;
Query1.FieldByName('Familia').AsString:=Edit1.Text;
Query1.FieldByName('Ati').AsString:=Edit2.Text;
Query1.FieldByName('Otchestvo').AsString:=Edit3.Text;
Query1.FieldByName('Tugan_jili').AsDateTime:=DateTimePicker1.Date;
Query1.FieldByName('Adress').AsString:=Edit4.Text;
Query1.FieldByName('Jumis_orni').AsString:=Edit5.Text;
Query1.FieldByName('Jumis_staji').AsInteger:=StrToInt(Edit6.Text);
Query1.FieldByName('Jenildik').AsString:=ComboBox1.Text;
Query1.FieldByName('Jalakisi').AsInteger:=StrToInt(Edit7.Text);
Query1.FieldByName('Aiel_staj').AsInteger:=StrToInt(Edit9.Text);
Query1.FieldByName('AIel_Jalaki').AsInteger:=StrToInt(Edit10.Text);
Query1.FieldByName('Bala_sani').AsInteger:=StrToInt(Edit11.Text);
Query1.FieldByName('Semia_kurami').AsInteger:=StrToInt(Edit8.Text);
Query1.FieldByName('Paterge_suranis').AsInteger:=StrToInt(ComboBox2.Text);
Query1.FieldByName('Nesie').AsString:='NO';
Query1.FieldByName('Ariz_Kabil_FIO').AsString:=ComboBox3.Text;
Query1.Post;
with Query1 do begin
Close;
SQL.Clear;
sql.Text:='select max(id) id from ariz_beru';
Open;
id_ariz:=Query1.FieldByName('id').AsInteger;
Close;
SQL.Clear;
sql.Text:='select *from ariz_beru where id='''+IntToStr(id_ariz)+'''';
Open;
end;
Query2.Close;
Query2.SQL.Text:='select * from Ball_engizu';
Query2.Open;
Query2.Insert;
Query2.FieldByName('Id_Ariz_beru').AsInteger:=Query1.FieldByName('id').AsInteger;
Query2.FieldByName('Ati_joni').AsString:=Query1.FieldByName('Familia').AsString+' '+Query1.FieldByName('Ati').AsString+' '+Query1.FieldByName('Otchestvo').AsString;
Query2.FieldByName('Ball').AsInteger:=(5*(Query1.FieldByName('Jumis_staji').AsInteger))+(5*(Query1.FieldByName('Aiel_staj').AsInteger)+(5*Query1.FieldByName('Bala_sani').AsInteger));
Query2.Post;
end;

end else
if Form3.Tag=2 then begin


with form2 do begin
vv:=Query1.FieldByName('id').AsInteger;
Query1.Close;
Query1.SQL.Text:='select * from ariz_beru where id="'+IntToStr(vv)+'"';
Query1.Open;
Query1.Edit;
Query1.FieldByName('Familia').AsString:=Edit1.Text;
Query1.FieldByName('Ati').AsString:=Edit2.Text;
Query1.FieldByName('Otchestvo').AsString:=Edit3.Text;
Query1.FieldByName('Tugan_jili').AsDateTime:=DateTimePicker1.Date;
Query1.FieldByName('Adress').AsString:=Edit4.Text;
Query1.FieldByName('Jumis_orni').AsString:=Edit5.Text;
Query1.FieldByName('Jumis_staji').AsInteger:=StrToInt(Edit6.Text);
Query1.FieldByName('Jenildik').AsString:=ComboBox1.Text;
Query1.FieldByName('Jalakisi').AsInteger:=StrToInt(Edit7.Text);
Query1.FieldByName('Aiel_staj').AsInteger:=StrToInt(Edit9.Text);
Query1.FieldByName('AIel_Jalaki').AsInteger:=StrToInt(Edit10.Text);
Query1.FieldByName('Bala_sani').AsInteger:=StrToInt(Edit11.Text);
Query1.FieldByName('Semia_kurami').AsInteger:=StrToInt(Edit8.Text);
Query1.FieldByName('Paterge_suranis').AsInteger:=StrToInt(ComboBox2.Text);
Query1.FieldByName('Nesie').AsString:='NO';
Query1.FieldByName('Ariz_Kabil_FIO').AsString:=ComboBox3.Text;
Query1.Post;
Query1.Close;
Query1.SQL.Text:='select * from ariz_beru';
Query1.Open;
vv:=Query2.FieldByName('Id_Ariz_beru').AsInteger;
Query2.Close;
Query2.SQL.Text:='select * from Ball_engizu where Id_Ariz_beru="'+IntToStr(vv)+'"';
Query2.Open;
Query2.Edit;
Query2.FieldByName('Id_Ariz_beru').AsInteger:=Query1.FieldByName('id').AsInteger;
Query2.FieldByName('Ati_joni').AsString:=Query1.FieldByName('Familia').AsString+' '+Query1.FieldByName('Ati').AsString+' '+Query1.FieldByName('Otchestvo').AsString;
Query2.FieldByName('Ball').AsInteger:=(5*(Query1.FieldByName('Jumis_staji').AsInteger))+(5*(Query1.FieldByName('Aiel_staj').AsInteger)+(5*Query1.FieldByName('Bala_sani').AsInteger));
Query2.Post;
Query2.Close;
Query2.SQL.Text:='select * from Ball_engizu';
Query2.Open;

end;
end;


with Form2.Query1 do begin
Close;
SQL.Clear;
SQL.Add('select *from Ariz_Beru');
Open;
end;
Form3.Hide;
end;

procedure TForm3.BitBtn2Click(Sender: TObject);


begin
Form3.Hide;
end;

procedure TForm3.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form3.Hide;
end;

end.
unit Unit4;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, Buttons, ComCtrls, ExtCtrls, DB, DBTables;

type
TForm4 = class(TForm)


Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
Label5: TLabel;
Edit1: TEdit;
Edit2: TEdit;
Edit3: TEdit;
Edit4: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
BitBtn3: TBitBtn;
Query1: TQuery;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var vv:Integer;


Form4: TForm4;

implementation


uses Unit1, Unit2, Unit3, Unit18;


{$R *.dfm}


procedure TForm4.BitBtn1Click(Sender: TObject);


begin
if Form4.Tag=1 then begin
with form2 do begin
Query3.Close;
Query3.SQL.Text:='select * from ariz_kabildau';
Query3.Open;
Query3.Insert;
Query3.FieldByName('Familia').AsString:=Edit1.Text;
Query3.FieldByName('Ati').AsString:=edit2.text;
Query3.FieldByName('Otchestvo').AsString:=edit3.text;
Query3.FieldByName('Adress').AsString:=edit4.text;
Query3.FieldByName('id_Kizmeti').AsInteger:=StrToInt(ComboBox2.Items[ComboBox1.ItemIndex]);
Query3.Post;
end; end else
if Form4.Tag=2 then begin
with form2 do begin
vv:=Query3.FieldByName('Id').AsInteger;
Query3.Close;
Query3.SQL.Text:='select * from ariz_kabildau where id="'+IntToStr(vv)+'"';
Query3.Open;
Query3.Edit;
Query3.FieldByName('Familia').AsString:=Edit1.Text;
Query3.FieldByName('Ati').AsString:=edit2.text;
Query3.FieldByName('Otchestvo').AsString:=edit3.text;
Query3.FieldByName('Adress').AsString:=edit4.text;
Query3.FieldByName('id_Kizmeti').AsInteger:=StrToInt(ComboBox2.Items[ComboBox1.ItemIndex]);
Query3.Post;
Query3.Close;
Query3.SQL.Text:='select * from ariz_kabildau order by id';
Query3.Open;
end;
end;
with Form2.Query3 do begin
Close;
SQL.Clear;
SQL.Add('select *from Ariz_Kabildau');
Open;
end;
Form4.Hide;
end;

procedure TForm4.BitBtn2Click(Sender: TObject);


begin
Form4.Hide;
end;

procedure TForm4.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form4.Hide;
end;

procedure TForm4.BitBtn3Click(Sender: TObject);


begin
Form18.Show;
Form18.Query1.Open;
end;

end.
unit Unit5;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, Buttons;

type
TForm5 = class(TForm)


GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
ComboBox1: TComboBox;
Edit1: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form5: TForm5;


implementation


uses Unit2, Unit1;


{$R *.dfm}


procedure TForm5.BitBtn1Click(Sender: TObject);


begin
if Form2.Caption='Арыз беруши' then begin

case ComboBox1.ItemIndex of


0:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Familia like"'+Edit1.Text+'%"');
Open;
end;
1:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Ati like"'+Edit1.Text+'%"');
Open;end;
2:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Otchestvo like"'+Edit1.Text+'%"');
Open;
end;
3:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Tugan_jili like"'+Edit1.Text+'%"');
Open;end;
4:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Adress like"'+Edit1.Text+'%"');
Open;
end;
5:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Jumis_orni like"'+Edit1.Text+'%"');
Open;end;
6:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Jumis_staji like"'+Edit1.Text+'%"');
Open;
end;
7:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Jenildik like"'+Edit1.Text+'%"');
Open;end;
8:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Jalakisi like"'+Edit1.Text+'%"');
Open;end;
9:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Semia_kurami like"'+Edit1.Text+'%"');
Open;
end;
10:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where Paterge_suranis like"'+Edit1.Text+'%"');
Open;end;

end;
end else


if Form2.Caption='Арыз кабылдаушы' then begin
case ComboBox1.ItemIndex of
0:with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_Kabildau');
SQL.Add(' where Familia like"'+Edit1.Text+'%"');
Open;
end;
1:with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_Kabildau');
SQL.Add(' where Ati like"'+Edit1.Text+'%"');
Open;end;
2:with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_Kabildau');
SQL.Add(' where Otchestvo like"'+Edit1.Text+'%"');
Open;
end;
3:with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_Kabildau');
SQL.Add(' where Adress like"'+Edit1.Text+'%"');
Open;end;
4:with Form2.Query3 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_Kabildau');
SQL.Add(' where Kizmeti like"'+Edit1.Text+'%"');
Open;
end; end;

end;
Form5.Hide;


end;
procedure TForm5.BitBtn2Click(Sender: TObject);
begin
Form5.Hide;
end;

end.
unit Unit6;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, Buttons;

type
TForm6 = class(TForm)


GroupBox1: TGroupBox;
GroupBox2: TGroupBox;
ComboBox1: TComboBox;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
Label2: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form6: TForm6;


implementation


uses Unit2;


{$R *.dfm}


procedure TForm6.BitBtn1Click(Sender: TObject);


begin
case ComboBox1.ItemIndex of
0:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where (Jumis_staji>="'+Edit1.Text+'")and (Jumis_staji<="'+Edit2.Text+'")');
Open;
end;
1:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where (Jalakisi>="'+Edit1.Text+'") and (Jalakisi<="'+Edit2.Text+'")');
Open;end;
2:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where (Semia_kurami>="'+Edit1.Text+'") and (Semia_kurami<="'+Edit2.Text+'")');
Open;
end;
3:with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Ariz_beru');
SQL.Add(' where (Paterge_suranis>="'+Edit1.Text+'") and (Paterge_suranis<="'+Edit2.Text+'")');
Open;end;
end;
Form6.Hide;
end;

procedure TForm6.BitBtn2Click(Sender: TObject);


begin
Form6.Hide;
end;

end.
unit Unit7;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, QRCtrls, QuickRpt, ExtCtrls;

type
TForm7 = class(TForm)


QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRBand2: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRShape1: TQRShape;
QRLabel4: TQRLabel;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRShape9: TQRShape;
QRShape10: TQRShape;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRLabel11: TQRLabel;
QRLabel12: TQRLabel;
QRLabel13: TQRLabel;
QRShape11: TQRShape;
QRShape12: TQRShape;
QRShape13: TQRShape;
QRShape14: TQRShape;
QRShape15: TQRShape;
QRShape16: TQRShape;
QRShape17: TQRShape;
QRShape18: TQRShape;
QRShape19: TQRShape;
QRShape20: TQRShape;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
QRDBText7: TQRDBText;
QRDBText8: TQRDBText;
QRDBText9: TQRDBText;
QRDBText10: TQRDBText;
QRDBText11: TQRDBText;
QRDBText12: TQRDBText;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form7: TForm7;


implementation


uses Unit2;


{$R *.dfm}


end.
unit Unit8;

interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, QRCtrls, QuickRpt, ExtCtrls;

type
TForm8 = class(TForm)


QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRBand2: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRShape4: TQRShape;
QRShape5: TQRShape;
QRShape6: TQRShape;
QRDBText1: TQRDBText;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRShape1: TQRShape;
QRLabel4: TQRLabel;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form8: TForm8;


implementation


uses Unit2;


{$R *.dfm}


procedure TForm8.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form8.Hide;
end;

end.
unit Unit9;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, QuickRpt, QRCtrls, ExtCtrls;

type
TForm9 = class(TForm)


QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRBand2: TQRBand;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRShape1: TQRShape;
QRShape2: TQRShape;
QRShape3: TQRShape;
QRShape4: TQRShape;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRShape6: TQRShape;
QRShape7: TQRShape;
QRShape8: TQRShape;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
QRShape5: TQRShape;
QRDBText1: TQRDBText;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form9: TForm9;


implementation


uses Unit2;


{$R *.dfm}


procedure TForm9.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form9.Hide;
end;

end.
unit Unit10;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, Menus, DB, DBTables, Grids, DBGrids;

type
TForm10 = class(TForm)


DBGrid1: TDBGrid;
DataSource1: TDataSource;
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
N7: TMenuItem;
N8: TMenuItem;
Query1: TQuery;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N5Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure N8Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form10: TForm10; sr:integer;


implementation


uses Unit11, Unit2, Unit1, Unit12;


{$R *.dfm}


procedure TForm10.N2Click(Sender: TObject);


begin
Form11.Show;
Form11.Caption:='Енгізу';
Form11.Edit1.Text:='';
end;

procedure TForm10.N3Click(Sender: TObject);


begin
Form11.Show;
Form11.Caption:='Өзгерту';
Form11.Edit1.Text:=Query1.FieldByName('Name').AsString;
end;

procedure TForm10.N5Click(Sender: TObject);


begin
with Query1 do begin
Close;
SQL.Clear;
SQL.Add('select *from Jenildik');
Open;
end;
end;

procedure TForm10.N4Click(Sender: TObject);


begin
if MessageDlg('"'+Query1.FieldByName('Name').AsString+'"өшіресіз бе?',mtConfirmation, [mbYes, mbNo], 0) = mrNo then exit;
sr:=Query1.FieldByName('id').AsInteger;
with Query1 do
begin
Close;
SQL.Clear;
SQL.Add('delete FROM Jenildik where id="'+IntToStr(sr)+'"');
ExecSQL;
Close;
SQL.Text:='select *from Jenildik';
Open;
end;

end;

procedure TForm10.N6Click(Sender: TObject);
begin
Form10.Hide;
Form1.Show;
end;

procedure TForm10.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form10.Hide;
Form1.Show;
end;

procedure TForm10.N8Click(Sender: TObject);


begin
Form12.Show;
Form12.Edit1.Text:='';
end;

end.
unit Unit11;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, Buttons;

type
TForm11 = class(TForm)


GroupBox1: TGroupBox;
Edit1: TEdit;
GroupBox2: TGroupBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form11: TForm11;


implementation


uses Unit10, Unit3;


{$R *.dfm}


procedure TForm11.BitBtn1Click(Sender: TObject);


begin
if Form11.Caption='Енгізу' then begin
with form10 do begin
vv:=Query1.FieldByName('id').AsInteger;
Query1.Close;
Query1.SQL.Text:='select * from Jenildik where id="'+IntToStr(vv)+'"';
Query1.Open;
Query1.Insert;
Query1.FieldByName('Name').AsString:=Edit1.Text;
Query1.Post;
Query1.Close;
Query1.SQL.Text:='select * from Jenildik ';
Query1.Open;
end; end else
if Form11.Caption='Өзгерту' then begin
with form10 do begin
vv:=Query1.FieldByName('id').AsInteger;
Query1.Close;
Query1.SQL.Text:='select * from Jenildik where id="'+IntToStr(vv)+'"';
Query1.Open;
Query1.Edit;
Query1.FieldByName('Name').AsString:=Edit1.Text;
Query1.Post;
Query1.Close;
Query1.SQL.Text:='select * from Jenildik ';
Query1.Open;

end; end;


with Form10.Query1 do begin
Close;
SQL.Clear;
SQL.Add('select *from Jenildik');
Open;
end;
Form11.Hide;
end;

procedure TForm11.BitBtn2Click(Sender: TObject);


begin
Form11.Hide;
end;

procedure TForm11.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form11.Hide;
end;

end.
unit Unit12;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, StdCtrls, Buttons;

type
TForm12 = class(TForm)


GroupBox1: TGroupBox;
Edit1: TEdit;
GroupBox2: TGroupBox;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form12: TForm12;


implementation


uses Unit10;


{$R *.dfm}


procedure TForm12.BitBtn1Click(Sender: TObject);


begin
with Form10.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('select * from Jenildik');
SQL.Add(' where Name like"'+Edit1.Text+'%"');
Open;
end;
Form12.Hide;

end;

procedure TForm12.BitBtn2Click(Sender: TObject);
begin
Form12.Hide;
end;

end.
unit Unit13;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, ExtCtrls, StdCtrls, jpeg, Buttons;

type
TForm13 = class(TForm)


Panel1: TPanel;
Label1: TLabel;
Label3: TLabel;
Label5: TLabel;
BitBtn1: TBitBtn;
Label7: TLabel;
Label8: TLabel;
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form13: TForm13;


implementation


uses Unit1;


{$R *.dfm}


procedure TForm13.BitBtn1Click(Sender: TObject);


begin
Form13.Hide;
Form1.Show;
end;

end.
unit Unit14;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, DB, DBTables, Grids, DBGrids, StdCtrls, ExtCtrls, Buttons;

type
TForm14 = class(TForm)


DBGrid1: TDBGrid;
DataSource1: TDataSource;
Query1: TQuery;
Panel1: TPanel;
Label1: TLabel;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
BitBtn3: TBitBtn;
procedure BitBtn1Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn2Click(Sender: TObject);
procedure BitBtn3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form14: TForm14;


implementation


uses Unit15, Unit1, Unit2, Unit16;


{$R *.dfm}


procedure TForm14.BitBtn1Click(Sender: TObject);


var i:Integer;
begin
with Form15 do begin
Show;
Edit1.Clear;Edit3.Clear;ComboBox1.Text:='';
Edit2.Clear;Edit5.Clear;ComboBox3.Text:='';
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu');
Open;
end;
ComboBox1.Clear;
ComboBox2.Clear;
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru where Nesie="NO"');
Open; end;

for i:=1 to Form2.Query1.RecordCount do begin


ComboBox1.Items.Add(Form2.Query1.FieldByName('Familia').AsString+' '+Form2.Query1.FieldByName('Ati').AsString+' '+Form2.Query1.FieldByName('Otchestvo').AsString);
ComboBox2.Items.Add(Form2.Query1.FieldByName('id').AsString);
Form2.Query1.Next;end;

end;
end;


procedure TForm14.FormClose(Sender: TObject; var Action: TCloseAction);
begin
Form1.Show;
end;

procedure TForm14.BitBtn2Click(Sender: TObject);


begin
with Form2.Query1 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ariz_Beru');
Open;
end;
with Form2.Query2 do
begin
Close;
SQL.Clear;
SQL.Add('SELECT *FROM Ball_engizu');
Open;
end;
with Form16 do begin
QuickRep1.Preview;
QRDBText1.DataField:=form14.Query1.FieldByName('Ati_Joni').AsString;
QRDBText2.DataField:=form2.Query1.FieldByName('Jalakisi').AsString;
QRDBText3.DataField:=form2.Query2.FieldByName('Ball').AsString;
QRDBText4.DataField:=Form2.Query1.FieldByName('Paterge_suranis').AsString;
QRDBText5.DataField:=form14.Query1.FieldByName('Ati_joni').AsString;
QRDBText6.DataField:=Form14.Query1.FieldByName('Nesie_paizi').AsString;
QRDBText7.DataField:=Form14.Query1.FieldByName('Bastapki_Tolem').AsString;
QRDBText8.DataField:=form14.Query1.FieldByName('Ustine_Toleu').AsString;
QRDBText9.DataField:=Form14.Query1.FieldByName('Barlik_tolem').AsString;
QRDBText10.DataField:=Form14.Query1.FieldByName('Aidik_tolem').AsString;
end;end;

procedure TForm14.BitBtn3Click(Sender: TObject);


begin
Form14.Hide;
Form1.Show;
end;

end.
unit Unit15;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, ExtCtrls, StdCtrls, Buttons;

type
TForm15 = class(TForm)


Panel1: TPanel;
Edit1: TEdit;
CheckBox1: TCheckBox;
Label2: TLabel;
Edit2: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
ComboBox1: TComboBox;
Label1: TLabel;
Label3: TLabel;
Label4: TLabel;
Edit3: TEdit;
ComboBox2: TComboBox;
Edit5: TEdit;
Label5: TLabel;
ComboBox3: TComboBox;
procedure ComboBox1Click(Sender: TObject);
procedure CheckBox1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure BitBtn1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form15: TForm15; k:Longint; s:real;


implementation


uses Unit2, DB, Unit14;


{$R *.dfm}


procedure TForm15.ComboBox1Click(Sender: TObject);


begin
with form2 do begin
Query2.Close;
Query2.SQL.Text:='Select * from Ball_engizu where id_Ariz_beru="'+ComboBox2.Items[ComboBox1.itemindex]+'"';
Query2.Open;
Query1.Close;
Query1.SQL.Text:='Select * from ariz_beru where id="'+ComboBox2.Items[ComboBox1.itemindex]+'"';
Query1.Open;
Edit1.Text:=Query1.FieldByName('Jalakisi').AsString;
Edit2.Text:=Query2.FieldByName('ball').AsString;
Edit5.Text:=Query1.FieldByName('Paterge_suranis').AsString;
end;
end;

procedure TForm15.CheckBox1Click(Sender: TObject);


begin
if CheckBox1.Checked then Edit3.Enabled:=True else begin Edit3.Enabled:=False;
Edit3.Text:='';end;
end;

procedure TForm15.BitBtn2Click(Sender: TObject);


begin
Form15.Hide;
end;

procedure TForm15.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form15.Hide;
end;

procedure TForm15.BitBtn1Click(Sender: TObject);


begin
if Edit5.Text='1' then k:=2160000 else if Edit5.Text='2' then k:=4428000 else
if Edit5.Text='3' then k:=5940000;
if CheckBox1.Checked then k:=k-StrToInt(Edit3.Text);
s:=(k*4/100)*StrToInt(ComboBox3.Text);
with Form14 do begin
Query1.Close;
Query1.SQL.Clear;
Query1.SQL.Text:='select * from Nesie_beru';
Query1.Open;
Query1.Insert;
Query1.FieldByName('Ati_joni').AsString:=ComboBox1.Text;
Query1.FieldByName('Bastapki_Tolem').AsString:=Edit3.Text;
Query1.FieldByName('Nesie_merzimi').AsString:=ComboBox3.Text;
Query1.FieldByName('Nesie_paizi').AsString:='4%';
Query1.FieldByName('Ustine_Toleu').AsString:=FloatToStr(s);
Query1.FieldByName('Barlik_tolem').AsString:=FloatToStr(s+k);
Query1.FieldByName('Aidik_tolem').AsString:=FloatToStr((s+k)/(10*StrToFloat(ComboBox3.Text)));
Query1.Post;
with form2 do begin
Query1.Close;
Query1.SQL.Text:='Select * from ariz_beru where id="'+ComboBox2.Items[ComboBox1.itemindex]+'"';
Query1.Open;
Query1.Edit;
Query1.FieldByName('Nesie').AsString:='Yes';
Query1.Post;
end;end;
Form15.Hide;
end;

end.
unit Unit16;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, ExtCtrls, QuickRpt, QRCtrls;

type
TForm16 = class(TForm)


QuickRep1: TQuickRep;
QRBand1: TQRBand;
QRShape1: TQRShape;
QRLabel1: TQRLabel;
QRLabel2: TQRLabel;
QRLabel3: TQRLabel;
QRLabel4: TQRLabel;
QRLabel5: TQRLabel;
QRLabel6: TQRLabel;
QRLabel7: TQRLabel;
QRLabel8: TQRLabel;
QRLabel9: TQRLabel;
QRLabel10: TQRLabel;
QRDBText2: TQRDBText;
QRDBText3: TQRDBText;
QRDBText4: TQRDBText;
QRDBText5: TQRDBText;
QRDBText6: TQRDBText;
QRDBText7: TQRDBText;
QRDBText8: TQRDBText;
QRDBText9: TQRDBText;
QRDBText10: TQRDBText;
QRBand2: TQRBand;
QRLabel11: TQRLabel;
QRDBText1: TQRDBText;
procedure FormClose(Sender: TObject; var Action: TCloseAction);
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form16: TForm16;


implementation


uses Unit2, Unit14;


{$R *.dfm}


procedure TForm16.FormClose(Sender: TObject; var Action: TCloseAction);


begin
Form16.Hide;
end;

end.
unit Unit17;


interface


uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,


Buttons;

type
TPasswordDlg = class(TForm)


Password: TEdit;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure CancelBtnClick(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure PasswordKeyPress(Sender: TObject; var Key: Char);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;

var
PasswordDlg: TPasswordDlg;


implementation


uses Unit1;


{$R *.dfm}


procedure TPasswordDlg.CancelBtnClick(Sender: TObject);


begin
Close;
end;

procedure TPasswordDlg.BitBtn1Click(Sender: TObject);


begin
if Password.Text='123' then begin Form1.Show; PasswordDlg.Hide; end else Password.Text:='';
end;

procedure TPasswordDlg.PasswordKeyPress(Sender: TObject; var Key: Char);


begin
if Key=#13 then BitBtn1.Click;
end;

procedure TPasswordDlg.BitBtn2Click(Sender: TObject);


begin
Close;
end;

end.
unit Unit18;


interface


uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,


Dialogs, DB, Grids, DBGrids, DBTables, ExtCtrls, DBCtrls;

type
TForm18 = class(TForm)


Query1: TQuery;
DBGrid1: TDBGrid;
DataSource1: TDataSource;
DBNavigator1: TDBNavigator;
private
{ Private declarations }
public
{ Public declarations }
end;

var
Form18: TForm18;


implementation


{$R *.dfm}


end.




Достарыңызбен бөлісу:
1   ...   6   7   8   9   10   11   12   13   14




©emirsaba.org 2024
әкімшілігінің қараңыз

    Басты бет