бесплатные рефераты

Автоматизированный учет дисциплинарной практики в УВД

form6.Caption:='Поиск по подразделению';

form11.show;

end;

procedure TForm2.N32Click(Sender: TObject);

begin

form6.Caption:='Поиск по должности';

form12.show;

end;

procedure TForm2.N27Click(Sender: TObject);

begin

form6.Caption:='Поиск по месту приказа';

form13.show;

end;

procedure TForm2.N17Click(Sender: TObject);

begin

if pagecontrol1.ActivePage=tabsheet1 then begin

form7.DataSource1.DataSet:=datamodule4.ADOQuery1;

form7.Show;

end;

if pagecontrol1.ActivePage=tabsheet2 then begin

form7.DataSource1.DataSet:=datamodule4.ADOQuery2;

form7.Show;

end;

if pagecontrol1.ActivePage=tabsheet3 then begin

form7.DataSource1.DataSet:=datamodule4.ADOTable2;

form7.Show;

end;

end;

procedure TForm2.N31Click(Sender: TObject);

begin

form15.show;

end;

procedure TForm2.N18Click(Sender: TObject);

begin

if pagecontrol1.ActivePage=tabsheet1 then datamodule4.RvProject1.Execute;

if pagecontrol1.ActivePage=tabsheet2 then datamodule4.RvProject2.Execute;

end;

procedure TForm2.N29Click(Sender: TObject);

begin

shellExeCute(handle,nil,'Справка.chm',nil,nil,sw_restore);

end;

end.

unit Unit3; //форма добавления записи

interface

uses

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

Dialogs, Menus, StdCtrls, Buttons, ComCtrls, bsSkinCtrls, bsSkinData,

BusinessSkinForm, bsdbctrls, Mask, bsSkinBoxCtrls;

type

TForm3 = class(TForm)

Label2: TLabel;

Label3: TLabel;

Label7: TLabel;

Label8: TLabel;

Label9: TLabel;

Label10: TLabel;

Label11: TLabel;

Edit11: TEdit;

Edit13: TEdit;

Edit4: TEdit;

PopupMenu1: TPopupMenu;

N1,N2, N3, N4, N5, N6, N7, N8, N9, N10, N11, N12, N13, N14, N15, N16, N17, N18, N19,N20: TMenuItem;

ComboBox1: TComboBox;

ComboBox2: TComboBox;

PopupMenu2: TPopupMenu;

N21,N22,N23,N24,N25, N26, N27, N28, N29, N30,N31,N32,N33,N34,N35,N36,N37,N38,N39,N40,N41,N42,N43,N44,N45,N46,N47,N48, N49,N50,N51,N52,N53,N54,N55,N56,N57,N58,N59,N60,N61: TMenuItem;

DateTimePicker1: TDateTimePicker;

ComboBox3: TComboBox;

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

bsSkinButton1: TbsSkinButton;

Label1: TLabel;

Edit1: TEdit;

Edit2: TEdit;

Edit3: TEdit;

Label4: TLabel;

Edit6: TEdit;

Label5: TLabel;

Edit7: TEdit;

Label6: TLabel;

Edit8: TEdit;

bsSkinButton2: TbsSkinButton;

Label12: TLabel;

Label13: TLabel;

Label14: TLabel;

procedure N2Click(Sender: TObject);

procedure N3Click(Sender: TObject);

procedure N4Click(Sender: TObject);

procedure N5Click(Sender: TObject);

procedure N6Click(Sender: TObject);

procedure N7Click(Sender: TObject);

procedure N8Click(Sender: TObject);

procedure N10Click(Sender: TObject);

procedure BitBtn1Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure FormActivate(Sender: TObject);

procedure bsSkinButton1Click(Sender: TObject);

procedure bsSkinButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form3: TForm3;

implementation

uses Unit4;

{$R *.dfm}

procedure TForm3.N2Click(Sender: TObject);

begin

edit4.Text:='рядовой милиции';

end;

procedure TForm3.N3Click(Sender: TObject);

begin

edit4.Text:='младший сержант милиции';

end;

procedure TForm3.N4Click(Sender: TObject);

begin

edit4.Text:='сержант ';

end;

procedure TForm3.N5Click(Sender: TObject);

begin

edit4.Text:='старший сержат';

end;

procedure TForm3.N6Click(Sender: TObject);

begin

edit4.Text:='старшина милиции';

end;

procedure TForm3.N7Click(Sender: TObject);

begin

edit4.Text:='прапорщик';

end;

procedure TForm3.N8Click(Sender: TObject);

begin

edit4.Text:='старший прапорщик';

end;

procedure TForm3.N10Click(Sender: TObject);

begin

edit4.Text:='младший лейтенант милиции';

end;

……….

procedure TForm3.BitBtn1Click(Sender: TObject);

begin

form3.Hide;

end;

procedure TForm3.Button1Click(Sender: TObject);

var s,b:string;

a:integer;

begin

s:=datetostr(datetimepicker1.Date);

a:=strtoint(copy(s,7,4));

a:=a+1;

b:=copy(s,1,6);

s:=b+inttostr(a);

datamodule4.ADOQuery1.Insert;

datamodule4.ADOQuery1['Fam']:=edit1.Text;

datamodule4.ADOQuery1['Imia']:=edit2.Text;

datamodule4.ADOQuery1['Otc']:=edit3.Text;

datamodule4.ADOQuery1['Zvanie']:=edit4.Text;

datamodule4.ADOQuery1['Rugo']:=combobox2.Text;

datamodule4.ADOQuery1['Sl']:=edit6.Text;

datamodule4.ADOQuery1['Podr']:=edit7.Text;

datamodule4.ADOQuery1['Dolj']:=edit8.Text;

datamodule4.ADOQuery1['Vzisk']:=combobox1.Text;

datamodule4.ADOQuery1['Chpr']:=combobox3.Text;

datamodule4.ADOQuery1['Nompr']:=edit11.Text;

datamodule4.ADOQuery1['Datapr']:=datetimepicker1.Date;

datamodule4.ADOQuery1['Opis']:=edit13.Text;

datamodule4.ADOQuery1['Dataspr']:=strtodate(s);

datamodule4.ADOQuery1.Post;

form3.Hide;

end;

procedure TForm3.FormActivate(Sender: TObject);

begin

edit1.Text:='';

edit2.Text:='';

edit3.Text:='';

edit4.Text:='';

combobox1.Text:='';

edit6.Text:='';

combobox2.Text:='';

edit7.Text:='';

edit8.Text:='';

combobox3.Text:='';

edit11.Text:='';

datetimepicker1.Date:=date();

edit13.Text:='';

end;

procedure TForm3.bsSkinButton1Click(Sender: TObject);

var s,b:string;

a:integer;

begin

if (edit1.Text='') or (edit2.Text='') or (edit3.Text='') or (combobox2.Text='') or (combobox3.Text='') then

begin

ShowMessage('Введите все обязательные' +#13 + 'поля');

exit;

end

else begin

s:=datetostr(datetimepicker1.Date);

a:=strtoint(copy(s,7,4));

a:=a+1;

b:=copy(s,1,6);

s:=b+inttostr(a);

datamodule4.ADOQuery1.Insert;

datamodule4.ADOQuery1['Fam']:=edit1.Text;

datamodule4.ADOQuery1['Imia']:=edit2.Text;

datamodule4.ADOQuery1['Otc']:=edit3.Text;

datamodule4.ADOQuery1['Zvanie']:=edit4.Text;

datamodule4.ADOQuery1['Rugo']:=combobox2.Text;

datamodule4.ADOQuery1['Sl']:=edit6.Text;

datamodule4.ADOQuery1['Podr']:=edit7.Text;

datamodule4.ADOQuery1['Dolj']:=edit8.Text;

datamodule4.ADOQuery1['Vzisk']:=combobox1.Text;

datamodule4.ADOQuery1['Chpr']:=combobox3.Text;

datamodule4.ADOQuery1['Nompr']:=edit11.Text;

datamodule4.ADOQuery1['Datapr']:=datetimepicker1.Date;

datamodule4.ADOQuery1['Opis']:=edit13.Text;

datamodule4.ADOQuery1['Dataspr']:=strtodate(s);

datamodule4.ADOQuery1.Post;

form3.Hide;

end;

end;

procedure TForm3.bsSkinButton2Click(Sender: TObject);

begin

form3.Hide;

end;

end.

unit Unit4; //модуль компонент

interface

uses

SysUtils, Classes, DB, ADODB, RpBase, RpSystem, RpRave, RpDefine, RpCon,

RpConDS;

type

TDataModule4 = class(TDataModule)

ADOQuery1: TADOQuery;

ADOQuery2: TADOQuery;

DataSource1: TDataSource;

DataSource2: TDataSource;

ADOConnection1: TADOConnection;

ADOTable1: TADOTable;

DataSource3: TDataSource;

ADOQuery1Fam: TWideStringField;

ADOQuery1Imia: TWideStringField;

ADOQuery1Otc: TWideStringField;

ADOQuery1Zvanie: TWideStringField;

ADOQuery1Rugo: TWideStringField;

ADOQuery1Sl: TWideStringField;

ADOQuery1Podr: TWideStringField;

ADOQuery1Dolj: TWideStringField;

ADOQuery1Vzisk: TWideStringField;

ADOQuery1Chpr: TWideStringField;

ADOQuery1Nompr: TWideStringField;

ADOQuery1Datapr: TDateTimeField;

ADOQuery1Opis: TWideStringField;

ADOQuery1Nomspr: TWideStringField;

ADOQuery1Dataspr: TDateTimeField;

ADOQuery2Fam: TWideStringField;

ADOQuery2Imia: TWideStringField;

ADOQuery2Otc: TWideStringField;

ADOQuery2Zvanie: TWideStringField;

ADOQuery2Rugo: TWideStringField;

ADOQuery2Sl: TWideStringField;

ADOQuery2Podr: TWideStringField;

ADOQuery2Dolj: TWideStringField;

ADOQuery2Vzisk: TWideStringField;

ADOQuery2Chpr: TWideStringField;

ADOQuery2Nompr: TWideStringField;

ADOQuery2Datapr: TDateTimeField;

ADOQuery2Opis: TWideStringField;

ADOQuery2Nomspr: TWideStringField;

ADOQuery2Dataspr: TDateTimeField;

ADOTable1Fam: TWideStringField;

ADOTable1Imia: TWideStringField;

ADOTable1Otc: TWideStringField;

ADOTable1Zvanie: TWideStringField;

ADOTable1Rugo: TWideStringField;

ADOTable1Sl: TWideStringField;

ADOTable1Podr: TWideStringField;

ADOTable1Dolj: TWideStringField;

ADOTable1Vzisk: TWideStringField;

ADOTable1Chpr: TWideStringField;

ADOTable1Nompr: TWideStringField;

ADOTable1Datapr: TDateTimeField;

ADOTable1Opis: TWideStringField;

ADOTable1Nomspr: TWideStringField;

ADOTable1Dataspr: TDateTimeField;

ADOQuery3: TADOQuery;

DataSource4: TDataSource;

ADOTable2: TADOTable;

ADOTable2Fam: TWideStringField;

ADOTable2Imia: TWideStringField;

ADOTable2Otc: TWideStringField;

ADOTable2Zvanie: TWideStringField;

ADOTable2Rugo: TWideStringField;

ADOTable2Sl: TWideStringField;

ADOTable2Podr: TWideStringField;

ADOTable2Dolj: TWideStringField;

ADOTable2Vzisk: TWideStringField;

ADOTable2Chpr: TWideStringField;

ADOTable2Nompr: TWideStringField;

ADOTable2Datapr: TDateTimeField;

ADOTable2Opis: TWideStringField;

ADOTable2Nomspr: TWideStringField;

ADOTable2Dataspr: TDateTimeField;

RvDataSetConnection1: TRvDataSetConnection;

RvProject1: TRvProject;

RvSystem1: TRvSystem;

RvDataSetConnection2: TRvDataSetConnection;

RvProject2: TRvProject;

RvProject3: TRvProject;

RvDataSetConnection3: TRvDataSetConnection;

ADOQuery4: TADOQuery;

private

{ Private declarations }

public

{ Public declarations }

end;

var

DataModule4: TDataModule4;

implementation

{$R *.dfm}

end.

unit Unit5; //форма редактирования записи

interface

uses

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

Dialogs, DB, StdCtrls, DBCtrls, ComCtrls, Mask, Buttons, Menus,

bsSkinData, BusinessSkinForm, bsSkinCtrls;

type

TForm5 = class(TForm)

Label2: TLabel;

Label3: TLabel;

Label7: TLabel;

Label8: TLabel;

Label9: TLabel;

Label10: TLabel;

Label11: TLabel;

DateTimePicker1: TDateTimePicker;

DBEdit4: TDBEdit;

DBComboBox1: TDBComboBox;

DBComboBox2: TDBComboBox;

DBEdit9: TDBEdit;

DBEdit10: TDBEdit;

DataSource1: TDataSource;

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

Label1: TLabel;

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit3: TDBEdit;

Label4: TLabel;

DBEdit5: TDBEdit;

Label5: TLabel;

DBEdit6: TDBEdit;

Label6: TLabel;

DBEdit7: TDBEdit;

bsSkinButton1: TbsSkinButton;

bsSkinButton2: TbsSkinButton;

DBComboBox3: TDBComboBox;

procedure Button1Click(Sender: TObject);

procedure BitBtn1Click(Sender: TObject);

procedure bsSkinButton1Click(Sender: TObject);

procedure bsSkinButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form5: TForm5;

implementation

uses Unit4;

{$R *.dfm}

procedure TForm5.Button1Click(Sender: TObject);

begin

DataSource1.DataSet.Edit;

DataSource1.DataSet.FieldValues['Datapr']:=DateTimePicker1.Date;

DataSource1.DataSet.Post;

form5.Hide;

end;

procedure TForm5.BitBtn1Click(Sender: TObject);

begin

form5.Hide;

end;

procedure TForm5.bsSkinButton1Click(Sender: TObject);

var s,b:string;

a:integer;

begin

s:=datetostr(datetimepicker1.Date);

a:=strtoint(copy(s,7,4));

a:=a+1;

b:=copy(s,1,6);

s:=b+inttostr(a);

DataSource1.DataSet.Edit;

DataSource1.DataSet.FieldValues['Datapr']:=DateTimePicker1.Date;

DataSource1.DataSet.FieldValues['Dataspr']:=strtodate(s);

DataSource1.DataSet.Post;

form5.Hide;

end;

procedure TForm5.bsSkinButton2Click(Sender: TObject);

begin

form5.Hide;

end;

end.

unit Unit6; //форма отображения найденной информации

interface

uses

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

Dialogs, StdCtrls, Buttons, Grids, DBGrids, bsSkinCtrls, bsSkinData,

BusinessSkinForm;

type

TForm6 = class(TForm)

DBGrid1: TDBGrid;

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

bsSkinButton1: TbsSkinButton;

bsSkinButton2: TbsSkinButton;

bsSkinButton3: TbsSkinButton;

procedure BitBtn1Click(Sender: TObject);

procedure BitBtn2Click(Sender: TObject);

procedure bsSkinButton1Click(Sender: TObject);

procedure bsSkinButton2Click(Sender: TObject);

procedure bsSkinButton3Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form6: TForm6;

implementation

uses Unit4, Unit2, Unit1, Unit3, Unit5, Unit7;

{$R *.dfm}

procedure TForm6.BitBtn1Click(Sender: TObject);

begin

dbgrid1.Columns[0].Visible:=true;

dbgrid1.Columns[1].Visible:=true;

dbgrid1.Columns[2].Visible:=true;

dbgrid1.Columns[3].Visible:=true;

dbgrid1.Columns[4].Visible:=true;

dbgrid1.Columns[5].Visible:=true;

dbgrid1.Columns[6].Visible:=true;

dbgrid1.Columns[7].Visible:=true;

dbgrid1.Columns[8].Visible:=true;

dbgrid1.Columns[9].Visible:=true;

dbgrid1.Columns[10].Visible:=true;

dbgrid1.Columns[11].Visible:=true;

dbgrid1.Columns[12].Visible:=true;

form2.show;

form6.Hide;

form6.bsSkinButton2.Visible:=false;

end;

procedure TForm6.BitBtn2Click(Sender: TObject);

begin

form7.DataSource1.DataSet:=datamodule4.ADOQuery3;

form7.Show;

end;

procedure TForm6.bsSkinButton1Click(Sender: TObject);

begin

dbgrid1.Columns[0].Visible:=true;

dbgrid1.Columns[1].Visible:=true;

dbgrid1.Columns[2].Visible:=true;

dbgrid1.Columns[3].Visible:=true;

dbgrid1.Columns[4].Visible:=true;

dbgrid1.Columns[5].Visible:=true;

dbgrid1.Columns[6].Visible:=true;

dbgrid1.Columns[7].Visible:=true;

dbgrid1.Columns[8].Visible:=true;

dbgrid1.Columns[9].Visible:=true;

dbgrid1.Columns[10].Visible:=true;

dbgrid1.Columns[11].Visible:=true;

dbgrid1.Columns[12].Visible:=true;

form2.show;

form6.Hide;

form6.bsSkinButton2.Visible:=false;

end;

procedure TForm6.bsSkinButton2Click(Sender: TObject);

begin

form7.DataSource1.DataSet:=datamodule4.ADOQuery3;

form7.Show;

end;

procedure TForm6.bsSkinButton3Click(Sender: TObject);

begin

datamodule4.RvProject3.Execute;

end;

end.

unit Unit7; //форма досрочного снятия сотрудника

interface

uses

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

Dialogs, StdCtrls, Mask, DBCtrls, DB, ComCtrls, bsSkinCtrls, bsSkinData,

BusinessSkinForm;

type

TForm7 = class(TForm)

DBEdit1: TDBEdit;

DBEdit2: TDBEdit;

DBEdit3: TDBEdit;

DataSource1: TDataSource;

Edit1: TEdit;

DateTimePicker1: TDateTimePicker;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

Label5: TLabel;

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

bsBusinessSkinForm2: TbsBusinessSkinForm;

bsSkinData2: TbsSkinData;

bsCompressedStoredSkin2: TbsCompressedStoredSkin;

bsBusinessSkinForm3: TbsBusinessSkinForm;

bsSkinData3: TbsSkinData;

bsCompressedStoredSkin3: TbsCompressedStoredSkin;

bsBusinessSkinForm4: TbsBusinessSkinForm;

bsSkinData4: TbsSkinData;

bsCompressedStoredSkin4: TbsCompressedStoredSkin;

bsSkinButton1: TbsSkinButton;

bsSkinButton2: TbsSkinButton;

procedure Button2Click(Sender: TObject);

procedure Button1Click(Sender: TObject);

procedure bsSkinButton1Click(Sender: TObject);

procedure bsSkinButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form7: TForm7;

implementation

uses Unit4, Unit6, Unit5;

{$R *.dfm}

procedure TForm7.Button2Click(Sender: TObject);

begin

form6.show;

form7.Hide;

end;

procedure TForm7.Button1Click(Sender: TObject);

begin

DataSource1.DataSet.Edit;

DataSource1.DataSet.FieldValues['Nomspr']:=edit1.Text;

DataSource1.DataSet.FieldValues['Dataspr']:=DateTimePicker1.Date;

DataSource1.DataSet.Post;

form7.Hide;

end;

procedure TForm7.bsSkinButton1Click(Sender: TObject);

begin

DataSource1.DataSet.Edit;

DataSource1.DataSet.FieldValues['Nomspr']:=edit1.Text;

DataSource1.DataSet.FieldValues['Dataspr']:=DateTimePicker1.Date;

DataSource1.DataSet.Post;

form7.Hide;

end;

procedure TForm7.bsSkinButton2Click(Sender: TObject);

begin

form7.Hide;

end;

end.

unit Unit8; //Поиск по званию (аналогично Unit9-по области; Unit10-по службе; Unit11-по подразделению; Unit12-по должности; Unit13-по месту приказа; Unit14-по фамилии)

interface

uses

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

Dialogs, StdCtrls, bsSkinCtrls, bsSkinData, BusinessSkinForm;

type

TForm8 = class(TForm)

ComboBox1: TComboBox;

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

bsSkinButton1: TbsSkinButton;

bsSkinButton2: TbsSkinButton;

procedure Button1Click(Sender: TObject);

procedure FormActivate(Sender: TObject);

procedure bsSkinButton1Click(Sender: TObject);

procedure bsSkinButton2Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form8: TForm8;

implementation

uses Unit6, Unit4, Unit2, Unit3;

{$R *.dfm}

procedure TForm8.Button1Click(Sender: TObject);

var zv: string[30];

begin

form8.Hide;

form6.Caption:='Поиск по званию';

zv:=form8.ComboBox1.Text;

if Form2.PageControl1.ActivePage=form2.tabsheet1 then begin

if zv<> '' then

begin

with datamodule4.ADOQuery3 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from Pract'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (Zvanie like "'+zv+ '%") and (Rugo="Аппарат УВД")'); //выбор данных из таблицы, где

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery3;

end

else

begin

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

if form2.PageControl1.ActivePage=form2.tabsheet2 then begin

if zv<> '' then

begin

with datamodule4.ADOQuery3 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from Pract'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (Zvanie like "'+zv+ '%") and (Rugo<>"Аппарат УВД")'); //выбор данных

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery3;

end

else

begin

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

if form2.pagecontrol1.ActivePage=form2.tabsheet3 then begin

if zv<> '' then

begin

with datamodule4.ADOQuery3 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from SnVzisk'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (zvanie like "'+zv+ '%")'); //выбор данных из таблицы, где

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery3;

end

else

begin

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

form6.Show;

end;

procedure TForm8.FormActivate(Sender: TObject);

begin

combobox1.Text:='';

end;

procedure TForm8.bsSkinButton1Click(Sender: TObject);

var zv: string[30];

begin

form8.Hide;

form6.Caption:='Поиск по званию';

zv:=form8.ComboBox1.Text;

if Form2.PageControl1.ActivePage=form2.tabsheet1 then begin

if zv<> '' then

begin

form6.Show;

form6.bsSkinButton3.Visible:=true;

with datamodule4.ADOQuery4 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from Pract'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (Zvanie like "'+zv+ '%") and (Rugo="Аппарат УВД")'); //выбор данных

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery4;

end

else

begin

form6.hide;

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

if form2.PageControl1.ActivePage=form2.tabsheet2 then begin

if zv<> '' then

begin

form6.Show;

form6.bsSkinButton3.Visible:=true;

with datamodule4.ADOQuery4 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from Pract'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (Zvanie like "'+zv+ '%") and (Rugo<>"Аппарат УВД")'); //выбор данных

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery4;

end

else

begin

form6.hide;

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

if form2.pagecontrol1.ActivePage=form2.tabsheet3 then begin

if zv<> '' then

begin

form6.Show;

form6.bsSkinButton3.Visible:=false;

with datamodule4.ADOQuery3 do begin

Close;

SQL.Clear; //очищение предыдущего запроса

SQL.Add('select * from SnVzisk'); //выбирает все данные из таблицы Sotr1

SQL.Add('where (zvanie like "'+zv+ '%")'); //выбор данных

Open;

if RecordCount <> 0 then //чтение записей пока не дойдет до последней

begin

datamodule4.DataSource4.DataSet:=datamodule4.adoquery3;

end

else

begin

form6.hide;

ShowMessage('В БД сотрудников нет записей, удовлетворяющих' +

#13 + 'критерию запроса.'); exit;

end;

end;

end;

end;

end;

procedure TForm8.bsSkinButton2Click(Sender: TObject);

begin

form8.Hide;

end;

end.

unit Unit15; //форма информации о программе

interface

uses

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

Dialogs, StdCtrls, bsSkinCtrls, bsSkinData, BusinessSkinForm;

type

TForm15 = class(TForm)

bsBusinessSkinForm1: TbsBusinessSkinForm;

bsSkinData1: TbsSkinData;

bsCompressedStoredSkin1: TbsCompressedStoredSkin;

bsSkinButton1: TbsSkinButton;

Label1: TLabel;

Label2: TLabel;

Label3: TLabel;

Label4: TLabel;

procedure bsSkinButton1Click(Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

Form15: TForm15;

implementation

{$R *.dfm}

procedure TForm15.bsSkinButton1Click(Sender: TObject);

begin

form15.Hide;

end;

end.

Страницы: 1, 2, 3


© 2010 РЕФЕРАТЫ