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.
unitUnit5; //форма редактирования записи
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.
unitUnit6; //форма отображения найденной информации
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.
unitUnit7; //форма досрочного снятия сотрудника
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.
unitUnit8; //Поиск по званию (аналогично 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;