Разработка приложения, представляющего собой базу данных о сотрудниках

adoquery1. Parameters. ParamByName('p5'). Value: ='%'+edit5. text+'%';

adoquery1. Parameters. ParamByName('p6'). Value: ='%'+edit6. text+'%';

adoquery1. Parameters. ParamByName('p7'). Value: ='%'+edit7. text+'%';

adoquery1. Parameters. ParamByName('p8'). Value: ='%'+edit8. text+'%';

adoquery1. Parameters. ParamByName('p9'). Value: ='%'+edit9. text+'%';

adoquery1. Parameters.

ParamByName('p10'). Value: ='%'+edit10. text+'%';

adoquery1. Parameters. ParamByName('p11'). Value: ='%'+edit11. text+'%';

adoquery1. Parameters. ParamByName('p12'). Value: ='%'+edit12. text+'%';

ADOQuery1. Active: = True;

end; end;

procedure TForm7. Button2Click(Sender: TObject);

begin

Form9. QuickRep1. Preview;

end;

procedure TForm7. Button4Click(Sender: TObject);

begin

Edit1. Text: = ''; Edit2. Text: = ''; Edit3. Text: = ''; Edit4. Text: = '';

Edit5. Text: = ''; Edit6. Text: = ''; Edit7. Text: = ''; Edit8. Text: = '';

Edit9. Text: = ''; Edit10. Text: = ''; Edit11. Text: = ''; Edit12. Text: = '';

ADOQuery1. Active: = False;

end;

procedure TForm7. Button5Click(Sender: TObject);

begin

close;

end;

procedure TForm7. Edit1KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit2KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit3KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit11KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm7. Button3Click(Sender: TObject);

begin

Form10. QuickRep1. Preview;

end;

procedure TForm7. Edit4KeyPress(Sender: TObject; var Key: Char);

begin

case Key of '0'. '9':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit5KeyPress(Sender: TObject; var Key: Char);

begin

case Key of '0'. '9':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit7KeyPress(Sender: TObject; var Key: Char);

begin

case Key of '0'. '9':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit8KeyPress(Sender: TObject; var Key: Char);

begin

case Key of '0'. '9':; #8:

else Key: = #0;

end; end;

procedure TForm7. Edit10KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:; #32:

else Key: = #0;

end; end; end.

unit Unit8;

interface

uses

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

Dialogs, DB, ADODB, StdCtrls, ExtCtrls, DBCtrls, Grids, DBGrids;

type

TForm8 = class(TForm)

Label1: TLabel; Label2: TLabel; Label3: TLabel; Label4: TLabel;

Label5: TLabel; Label6: TLabel; Label7: TLabel; Label8: TLabel;

Label9: TLabel; Label10: TLabel; Label11: TLabel; Label12: TLabel;

DBGrid1: TDBGrid; DBNavigator1: TDBNavigator; Edit1: TEdit;

Edit2: TEdit; Edit3: TEdit; Edit4: TEdit; Edit5: TEdit; Edit6: TEdit;

Edit7: TEdit; Edit8: TEdit; Edit9: TEdit; Edit10: TEdit; Edit11: TEdit;

Edit12: TEdit; Panel1: TPanel; Button1: TButton; Button4: TButton;

ADOQuery1: TADOQuery; DataSource1: TDataSource; Button2: TButton;

Button3: TButton; procedure Button1Click(Sender: TObject);

procedure Button4Click(Sender: TObject);

procedure Button2Click(Sender: TObject);

procedure Button3Click(Sender: TObject);

procedure Edit1KeyPress(Sender: TObject; var Key: Char);

procedure Edit2KeyPress(Sender: TObject; var Key: Char);

procedure Edit3KeyPress(Sender: TObject; var Key: Char);

procedure Edit11KeyPress(Sender: TObject; var Key: Char);

procedure Edit4KeyPress(Sender: TObject; var Key: Char);

procedure Edit5KeyPress(Sender: TObject; var Key: Char);

procedure Edit7KeyPress(Sender: TObject; var Key: Char);

procedure Edit8KeyPress(Sender: TObject; var Key: Char);

procedure Edit10KeyPress(Sender: TObject; var Key: Char); private

{ Private declarations }

public

{ Public declarations }

end;

var

Form8: TForm8;

implementation

{$R *. dfm}

procedure TForm8. Button1Click(Sender: TObject);

begin

if (edit1. text='') and (edit2. text='') and (edit3. text='') and (edit4. text='') and (edit5. text='') and (edit6. text='') and (edit7. text='') and (edit8. text='') and (edit9. text='') and (edit10. text='') and (edit11. text='') and (edit12. text='') then Showmessage('Вы не внесли критерии поиска')

else

Begin

adoquery1. Parameters. ParamByName('p1'). Value: ='%'+edit1. text+'%';

adoquery1. Parameters. ParamByName('p2'). Value: ='%'+edit2. text+'%';

adoquery1. Parameters. ParamByName('p3'). Value: ='%'+edit3. text+'%';

adoquery1. Parameters. ParamByName('p4'). Value: ='%'+edit4. text+'%';

adoquery1. Parameters. ParamByName('p5'). Value: ='%'+edit5. text+'%';

adoquery1. Parameters. ParamByName('p6'). Value: ='%'+edit6. text+'%';

adoquery1. Parameters. ParamByName('p7'). Value: ='%'+edit7. text+'%';

adoquery1. Parameters. ParamByName('p8'). Value: ='%'+edit8. text+'%';

adoquery1. Parameters. ParamByName('p9'). Value: ='%'+edit9. text+'%';

adoquery1. Parameters. ParamByName('p10'). Value: ='%'+edit10. text+'%';

adoquery1. Parameters. ParamByName('p11'). Value: ='%'+edit11. text+'%';

adoquery1. Parameters. ParamByName('p12'). Value: ='%'+edit12. text+'%';

ADOQuery1. Active: = True;

end;

end;

procedure TForm8. Button4Click(Sender: TObject);

begin

Edit1. Text: = ''; Edit2. Text: = ''; Edit3. Text: = ''; Edit4. Text: = '';

Edit5. Text: = ''; Edit6. Text: = ''; Edit7. Text: = ''; Edit8. Text: = '';

Edit9. Text: = ''; Edit10. Text: = ''; Edit11. Text: = ''; Edit12. Text: = '';

ADOQuery1. Active: = false;

end;

procedure TForm8. Button2Click(Sender: TObject);

begin

ADOQuery1. Post; end

procedure TForm8. Button3Click(Sender: TObject);

begin close; end;

procedure TForm8. Edit1KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm8. Edit2KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm8. Edit3KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm8. Edit11KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm8. Edit4KeyPress(Sender: TObject; var Key: Char);

begin

case Key of 'а'. 'я':; 'А'. 'Я':; #8:

else Key: = #0;

end; end;

procedure TForm8. Edit5KeyPress(Sender: TObject; var Key: Char);

Страница:  1  2  3  4  5  6  7  8  9  10  11  12  13  14  15 
 16  17 


Другие рефераты на тему «Программирование, компьютеры и кибернетика»:

Поиск рефератов

Последние рефераты раздела

Copyright © 2010-2024 - www.refsru.com - рефераты, курсовые и дипломные работы