Автор работы: Пользователь скрыл имя, 30 Ноября 2010 в 22:19, Не определен
Курсовой проект
tab.columns.item(9).
tab.cell(1,1).range.
for i:=2 to 9 do
tab.cell(1,i).range.text:=
i:=2;
Query1.First;
while not(Query1.Eof) do
begin
tab.rows.add;
tab.cell(i,1).range.text:=
tab.cell(i,2).range.text:=
tab.cell(i,3).range.text:=
tab.cell(i,4).range.text:=
tab.cell(i,5).range.text:=
tab.cell(i,6).range.text:=
tab.cell(i,7).range.text:=
tab.cell(i,8).range.text:=
tab.cell(i,9).range.text:=
form6.Query1.Next;
i:=i+1;
end;
tab.rows.item(i).
end;
procedure TForm6.Button3Click(Sender: TObject);
begin
DataSource1.DataSet:=Query1;
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM Laborant' );
Query1.Active:=True;
end;
end.
end;
end.
Программный код формы № 6
unit Unit7;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, DBCtrls, Grids, DBGrids, DB, DBTables, StdCtrls, jpeg,
Buttons, ToolWin, ComCtrls,
ADODB, ComObj;
type
TForm7 = class(TForm)
Query1: TQuery;
RadioGroup1: TRadioGroup;
Edit1: TEdit;
Button1: TButton;
Table1: TTable;
DataSource1: TDataSource;
DBGrid1: TDBGrid;
DBNavigator1: TDBNavigator;
BitBtn1: TBitBtn;
Button2: TButton;
Image1: TImage;
procedure Button2Click(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form7: TForm7;
dm,w,tab: variant;
implementation
//uses dmBook, editBook;
{$R *.dfm}
procedure TForm7.Button2Click(Sender: TObject);
begin
//close;
DataSource1.DataSet:=
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM Grup');
Query1.Active:=True;
end;
procedure TForm7.BitBtn1Click(Sender: TObject);
var
i:integer;
begin
w:=CreateOleObject('
w.Visible:=true;
w.Documents.Add;
tab:=w.ActiveDocument.
tab.Autoformat (Format:=31);
tab.columns.item(1).
tab.columns.item(2).
tab.columns.item(3).
tab.columns.item(4).
tab.columns.item(5).
tab.cell(1,1).range.
for i:=1 to 5 do
tab.cell(1,i+1).range.text:=
i:=2;
Query1.First;
while not(Query1.Eof) do
begin
tab.rows.add;
tab.cell(i,1).range.text:=i-1;
tab.cell(i,2).range.text:=
tab.cell(i,3).range.text:=
tab.cell(i,4).range.text:=
tab.cell(i,5).range.text:=
tab.cell(i,6).range.text:=
form7.Query1.Next;
i:=i+1;
end;
tab.rows.item(i).
end;
procedure Tform7.Button1Click(Sender: TObject);
begin
DataSource1.DataSet:=
case RadioGroup1.ItemIndex of
0:begin
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM buchgal WHERE Podrasd='+#39+Edit1.Text+#39);
Query1.Active:=True;
end;
1:begin
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM buchgal WHERE Fio='+#39+Edit1.Text+#39);
Query1.Active:=True;
end;
2:begin
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT
* FROM buchgal WHERE Liz_schet='+#39+Edit1.Text+#
Query1.Active:=True;
end;
3:begin
Query1.Active:=False;
Query1.SQL.Clear;
Query1.SQL.Add('SELECT * FROM buchgal WHERE ZAVOTD='+#39+Edit1.Text+#39);
Query1.Active:=True;
end;
end;
end;
end.
Программный код формы 7:
unit Unit8;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, Menus,ShellApi, jpeg,
ExtCtrls, StdCtrls;
type
TForm8 = class(TForm)
MainMenu1: TMainMenu;
N1: TMenuItem;
N2: TMenuItem;
N3: TMenuItem;
N11: TMenuItem;
N12: TMenuItem;
N9: TMenuItem;
N10: TMenuItem;
N4: TMenuItem;
N5: TMenuItem;
N6: TMenuItem;
Image1: TImage;
N7: TMenuItem;
N8: TMenuItem;
N13: TMenuItem;
procedure N2Click(Sender: TObject);
procedure N3Click(Sender: TObject);
procedure N11Click(Sender: TObject);
procedure N12Click(Sender: TObject);
procedure N4Click(Sender: TObject);
procedure N6Click(Sender: TObject);
procedure N7Click(Sender: TObject);
procedure N8Click(Sender: TObject);
procedure N61Click(Sender:
TObject);
procedure N5Click(Sender: TObject);
procedure N13Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form8: TForm8;
implementation
uses Unit7, Unit5, Unit2, Unit3, Unit6,
Unit1;
{$R *.dfm}
procedure TForm8.N2Click(Sender: TObject);
begin
form2.Visible:=true;
end;
procedure TForm8.N3Click(Sender: TObject);
begin
form3.Visible:=true;
end;
procedure TForm8.N11Click(Sender: TObject);
Информация о работе Сущность проектируемой автоматизированной системы