Контрольная работа: Інформаційна система будівельної організації
select o.object, g.jobtype, b.brigade_id, g.termperformance
from tblorder as o, tblgrafics as g, tblbrigade as b
where o.nplot_id=b.nplot_id and o.order_id=g.grafics_id and g.jobtype='ремонт'
Лістинг програми
unit Unit1;
interface
uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls, DBCtrls, StdCtrls, Menus, DB, Grids, DBGrids, ADODB;
type TForm1 = class(TForm) ADOConnection1: TADOConnection; ADOConnection2: TADOConnection; ADOTable1: TADOTable; ADOQuery1: TADOQuery; DBGrid1: TDBGrid; DataSource1: TDataSource; DataSource2: TDataSource; MainMenu1: TMainMenu; ComboBox1: TComboBox; DBNavigator1: TDBNavigator; OpenDialog1: TOpenDialog; SaveDialog1: TSaveDialog; File1: TMenuItem; N1: TMenuItem; N2: TMenuItem; Button6: TButton; Button7: TButton; procedure ComboBox1Change(Sender: TObject); procedure N2Click(Sender: TObject); procedure N1Click(Sender: TObject); procedure FormShow(Sender: TObject); procedure Button6Click(Sender: TObject); procedure Button7Click(Sender: TObject); private { Private declarations } public { Public declarations } end;
var Form1: TForm1;
implementation
uses Unit2, Unit3, Unit4, Unit5;
{$R *.dfm}
procedure TForm1.FormShow(Sender: TObject);
begin
Form2.ShowModal;
end;
procedure TForm1.ComboBox1Change(Sender: TObject);
begin
if (Combobox1.Text='Номер ділянки') then
begin
form1.ADOTable1.Active:=false;
form1.ADOTable1.TableName:='tblNPlot';form1.ADOTable1.Active:=true;
end;
if (Combobox1.Text='Характеристика заказу на мости та дороги') then
begin
form1.ADOTable1.Active:=false;
form1.ADOTable1.TableName:='tblChaRoad';form1.ADOTable1.Active:=true;
end;
if (Combobox1.Text='Характеристика заказу на житловий будинок') then