Автоматизация работы фирмы по продаже квартир
Курсовой проект - Компьютеры, программирование
Другие курсовые по предмету Компьютеры, программирование
el;
DBEdit4: TDBEdit;
Label5: TLabel;
DBEdit5: TDBEdit;
Label6: TLabel;
DBEdit6: TDBEdit;
Label7: TLabel;
DBEdit7: TDBEdit;
Label8: TLabel;
DBEdit8: TDBEdit;
Label9: TLabel;
DBEdit9: TDBEdit;
Label10: TLabel;
DBEdit10: TDBEdit;
Label11: TLabel;
DBEdit11: TDBEdit;
Label12: TLabel;
DBEdit12: TDBEdit;
Label13: TLabel;
DBEdit13: TDBEdit;
Label1: TLabel;
Button2: TButton;
Label15: TLabel;
RadioGroup1: TRadioGroup;
Edit1: TEdit;
Label14: TLabel;
Button1: TButton;
BitBtn1: TBitBtn;
BitBtn2: TBitBtn;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Edit1Change(Sender: TObject);
procedure BitBtn1Click(Sender: TObject);
procedure BitBtn2Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form3: TForm3;
implementation
uses Unit1, Unit2;
{$R *.DFM}
procedure TForm3.Button1Click(Sender: TObject);
begin
form1.table1.Edit;
if messagedlg(Удалить, mtconfirmation, [mbyes, mbno],0)=mryes
then form1.table1.delete;
end;
procedure TForm3.Button2Click(Sender: TObject);
begin
Form1.Table1.Last;
Form1.Table1.Insert;
end;
procedure TForm3.Button3Click(Sender: TObject);
begin
form3.hide;
form2.show;
end;
procedure TForm3.Edit1Change(Sender: TObject);
begin
then">if Edit1.Text<> then
begin
case RadioGroup1.ItemIndex of
0: begin
form1.Table1.Locate(secondname,Edit1.Text,[]);
end;
1: begin
form1.table1.locate(dolgnost,edit1.text,[]);
end;
2: begin
form1.table1.locate(npassporta,edit1.text,[]);
end;
end;
end;
end;
procedure TForm3.BitBtn1Click(Sender: TObject);
begin
form1.Table1.FlushBuffers;
end;
procedure TForm3.BitBtn2Click(Sender: TObject);
begin
form3.Hide;
form2.show;
end;
end.
Unit4
unit Unit4;
interface
uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
StdCtrls, Mask, DBCtrls, ExtCtrls, DBCGrids, Db, DBTables, TeEngine,
Series, TeeProcs, Chart, DBChart, mxstore, mxDB, Grids, mxgrid, mxtables,
mxgraph, DBGrids, Spin, DBLookup, ColorGrd, ComCtrls, Tabnotbk;
type
TForm4 = class(TForm)
GroupBox1: TGroupBox;
DataSource1: TDataSource;
rayon: TCheckBox;
tipplan: TCheckBox;
DBGrid1: TDBGrid;
Button5: TButton;
Button2: TButton;
RadioGroup1: TRadioGroup;
Label1: TLabel;
DBLookupCombo1: TDBLookupCombo;
Query1: TQuery;
DataSource2: TDataSource;
Query2: TQuery;
ComboBox1: TComboBox;
ComboBox2: TComboBox;
Button3: TButton;
Label2: TLabel;
DBLookupCombo2: TDBLookupCombo;
Label3: TLabel;
Button1: TButton;
GroupBox2: TGroupBox;
Edit1: TEdit;
Edit2: TEdit;
Label4: TLabel;
Label5: TLabel;
RadioButton1: TRadioButton;
RadioButton2: TRadioButton;
RadioButton3: TRadioButton;
Button4: TButton;
DataSource3: TDataSource;
Query3: TQuery;
Query3BDEDesigner: TStringField;
Query3BDEDesigner2: TStringField;
Query3_: TFloatField;
Query3BDEDesigner3: TStringField;
Query3_2: TStringField;
Query3BDEDesigner4: TStringField;
Query3BDEDesigner5: TStringField;
Query3_3: TFloatField;
Query3_4: TFloatField;
Query3_5: TStringField;
Query3_6: TFloatField;
Query3BDEDesigner6: TStringField;
Query3BDEDesigner7: TFloatField;
Query3_7: TStringField;
Query3_1: TStringField;
DataSource4: TDataSource;
Query4: TQuery;
DataSource5: TDataSource;
Query5: TQuery;
DBGrid2: TDBGrid;
Label6: TLabel;
DataSource6: TDataSource;
Table1: TTable;
DBNavigator1: TDBNavigator;
Button6: TButton;
Query1BDEDesigner: TStringField;
Query1BDEDesigner2: TStringField;
Query1_: TFloatField;
Query1BDEDesigner3: TStringField;
Query1_2: TStringField;
Query1BDEDesigner4: TStringField;
Query1BDEDesigner5: TStringField;
Query1_3: TFloatField;
Query1_4: TFloatField;
Query1_5: TStringField;
Query1_6: TFloatField;
Query1BDEDesigner6: TStringField;
Query1BDEDesigner7: TFloatField;
Query1_7: TStringField;
Table1Inomer: TFloatField;
Table1Oper: TStringField;
Table1Tipplan: TStringField;
Table1Rayon: TStringField;
Table1Adress: TStringField;
Table1Obpl: TFloatField;
Table1Plkux: TFloatField;
Table1Sostkv: TStringField;
Table1Kolroom: TFloatField;
Table1Sityname: TStringField;
Table1Adress_prod: TStringField;
Table1Dopsv: TStringField;
Table1Vlad: TStringField;
Table1Zena: TFloatField;
procedure Button1Click(Sender: TObject);
procedure Button5Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure DBLookupCombo1Change(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure DBLookupCombo2Change(Sender: TObject);
procedure Button4Click(Sender: TObject);
procedure RadioButton1Click(Sender: TObject);
procedure RadioButton2Click(Sender: TObject);
procedure RadioButton3Click(Sender: TObject);
procedure Button6Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form4: TForm4;
implementation
uses Unit1, Unit5, Unit6, Unit7;
{$R *.DFM}
procedure TForm4.Button1Click(Sender: TObject);
begin
form4.hide;
form7.show;
end;
procedure TForm4.Button5Click(Sender: TObject);
begin
form4.hide;
form1.show;
end;
procedure TForm4.Button2Click(Sender: TObject);
begin
dbgrid1.DataSource:=DataSource1;
with Query1 do
begin
close;
with radioGroup1 do begin
case ItemIndex of
0:ParamByName(op).AsString:=продажа;
1:ParamByName(op).AsString:=обмен;
2:ParamByName(op).AsString:=%;
end;
end;{with}
if rayon.Checked then begin
then">if Combobox1.Text<>then
ParamByName(ra).AsString:=Combobox1.Text
end
else ParamByName(ra).AsString:=%;
if tipPlan.Checked then begin
then">if Combobox2.Text<>then
paramByName(tp).AsString:=Combobox2.Text
end
else ParamByName(tp).AsString:=%;
Open;
end;
end;
procedure TForm4.DBLookupCombo1Change(Sender: TObject);
begin
dbgrid1.DataSource:=DataSource2;
with query2 do begin
close;
parambyname(vl).asString:=DBLookupCombo1.text;
open;
end;
end;
procedure TForm4.Button3Click(Sender: TObject);
begin
then">if DBLookupCombo2.value<> then
begin
form4.hide;
form5.show;
form5.table1.edit;
form5.table1.fieldbyname(ras_schet).value:=form1.label2.caption;
form5.table1.fieldbyname(date_pol).value:=form5.DateTimePicker1.date;
form5.table1.fieldbyname(adress_kv).value:=form4.table1.Fieldbyname(adress).value;
form5.table1.fieldbyname(adress_prod).value:=form4.table1.Fieldbyname(adress_prod).value;
form5.table1.fieldbyname(stoimost_kv).value:=form4.table1.Fieldbyname(zena).value;
end
else dblookupcombo2.setfocus;
end;
procedure TForm4.DBLookupCombo2Change(Sender: TObject);
begin
with form1.table4 do begin
form1.table4.locate(name,string(form4.DBLookupCombo2),[]);
form4.Combobox1.text:=form1.table4.fieldbyname(rayonkv).asstring;
form4.Combobox2.text:=form1.table4.fieldbyname(tipplan).asstring;
end;
end;
procedure TForm4.Button4Click(Sender: TObject);
begin
dbgrid1.DataSource:=DataSource3;
if RadioButton1.checked then
begin
with query3 do
begin
close;
parambyname(par1).asinteger:=strtoint(edit1.text);
open;
end
end
else
if RadioButton2.checked then begin
dbgrid1.DataSource:=DataSource4;
with query4 do begin
close;
parambyname(par1).asinteger:=strtoint(edit2.text);
open;
end
end
else
if RadioButton3.checked then begin
dbgrid1.DataSource:=DataSource5;<