Курсовые работы / ПРИС КП_9
.pdfbegin |
); |
|
|
|
|
if key = VK_ESCAPE then |
begin |
|
|
|
|
PropertyForm.Close; |
|
|
|
|
|
end; |
lFio.Caption := 'ФИО клиента:'+zvezdochka; |
|
|
||
end. |
lFio.Font.Color := color; |
|
|
|
|
unit fRM; |
|
|
|
|
|
interface |
lNumber.Caption := 'Номер:'+zvezdochka; |
|
|
|
|
uses |
lNumber.Font.Color := color; |
|
|
|
|
SysUtils, |
|
|
|
|
|
Classes, |
lSeria.Caption := 'Серия:'+zvezdochka; |
|
|
|
|
frxClass, |
lSeria.Font.Color := color; |
|
|
|
|
fs_ipascal, |
|
|
|
|
|
fs_iinterpreter, |
lObezPole.Font.Color := color; |
|
|
|
|
frxDBSet, |
lObezPole.Visible := obezpole; |
|
|
|
|
frxExportPDF, |
|
|
|
|
|
frxExportRTF, |
end; |
|
|
|
|
frxExportXLS, frxDACComponents, frxSDACComponents, |
|
|
|
|
|
frxFunction, frxDesgn; |
procedure TfClientsEdt.FormShow(Sender: TObject); |
|
|
||
type |
begin |
|
|
|
|
TRM=class(TDataModule) |
Case fClientsEdt.Tag of |
|
|
|
|
FrReport3: TfrxReport; |
1: begin |
|
|
|
|
frxSDACComponents1: TfrxSDACComponents; |
insert;//Добавление заказа |
|
|
|
|
private |
end; |
|
|
|
|
{ Private declarations } |
2: begin |
|
|
|
|
public |
edit; |
|
|
|
|
{ Public declarations } |
getField;//Редактирование заказа |
|
|
|
|
end; |
if ceKvartiri.Text <> '' then |
|
|
|
|
var |
lKvartiri.Caption := 'Квартира привязана'; |
|
|
||
RM: TRM; |
end; |
|
|
|
|
implementation |
end; |
|
|
|
|
{$R *.dfm} |
end; |
|
|
|
|
end. |
|
|
|
|
|
unit frmKvartiriLst; |
procedure TfClientsEdt.btnOkClick(Sender: TObject); |
|
|
||
interface |
var |
|
|
|
|
uses |
IdClient:Integer; |
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, |
begin |
|
|
|
|
Controls, Forms, |
if (fClientsEdt.Tag = 2) then |
|
|
|
|
Dialogs, DBGridEhGrouping, ToolCtrlsEh, DBGridEhToolCtrls, |
begin |
|
|
|
|
DynVarsEh, DB, |
With spClientsUpdate do |
|
|
|
|
DBAccess, MSAccess, MemDS, StdCtrls, Buttons, ExtCtrls, |
begin |
|
|
|
|
GridsEh, |
ParamByName('@idClient').AsInteger:= |
|
|
|
|
DBAxisGridsEh, DBGridEh; |
fClientsLst.spClientsSeek.FieldByName('idClient').AsInteger; |
|
|
||
type |
ParamByName('@Fio').AsString:= eFio.Text; |
|
|
||
TfKvartiriLst = class(TForm) |
ParamByName('@Pasport').AsString := meSeria.Text + meNumber.Text; |
||||
Grid: TDBGridEh; |
ParamByName('@idKvartiri').AsInteger := ceKvartiri.Tag; |
|
|
||
Panel1: TPanel; |
ExecProc; |
|
|
|
|
btnInsert: TBitBtn; |
IdClient := fClientsLst.spClientsSeek.FieldByName('idClient').AsInteger; |
||||
btnEdit: TBitBtn; |
end; |
|
|
|
|
btnDel: TBitBtn; |
end; |
|
|
|
|
btnSelect: TBitBtn; |
if fClientsEdt.Tag = 1 then |
|
|
|
|
spKvartiriSeek: TMSStoredProc; |
begin |
|
|
|
|
dsKvartiri: TMSDataSource; |
With spClientsInsert do |
|
|
|
|
spKvartiriDelete: TMSStoredProc; |
begin |
|
|
|
|
procedure btnInsertClick(Sender: TObject); |
ParamByName('@Fio').AsString:= eFio.Text; |
|
|
||
procedure btnDelClick(Sender: TObject); |
ParamByName('@Pasport').AsString := meSeria.Text + meNumber.Text; |
||||
procedure FormShow(Sender: TObject); |
ParamByName('@idKvartiri').AsInteger := ceKvartiri.Tag; |
|
|
||
private |
ExecProc; |
|
|
|
|
{ Private declarations } |
IdClient := ParamByName('idClient').AsInteger; |
|
|
||
public |
end; |
|
|
|
|
{ Public declarations } |
end; |
|
|
|
|
IdKvartiri: Integer; |
fClientsLst.spClientsSeek.Close; |
|
|
|
|
end; |
fClientsLst.spClientsSeek.Open; |
|
|
|
|
var |
fClientsLst.spClientsSeek.Locate('IdClient', IdClient , []); |
|
|
||
fKvartiriLst: TfKvartiriLst; |
fClientsEdt.Close; |
|
|
|
|
implementation |
end; |
|
|
|
|
uses fDM, frmKvartiriEdt; |
|
|
|
|
|
{$R *.dfm} |
procedure TfClientsEdt.ceKvartiriButtonClick(Sender: TObject); |
|
|||
procedure TfKvartiriLst.btnInsertClick(Sender: TObject); |
begin |
|
|
|
|
begin |
Application.CreateForm(TfKvartiriLst, fKvartiriLst); |
|
|
||
Application.CreateForm(TfkvartiriEdt, fkvartiriEdt); |
fKvartiriLst.IdKvartiri := ceKvartiri.Tag; |
|
|
|
|
if Sender = btnInsert then |
if fKvartiriLst.ShowModal = mrok then |
|
|
|
|
begin |
begin |
|
|
|
|
fkvartiriEdt.Tag := 1; //Добавление |
ceKvartiri.Text |
:= |
'Ул. |
' |
+ |
end; |
fKvartiriLst.spKvartiriSeek.FieldByName('NameStreet').AsString + ', д.' + |
||||
if Sender = btnEdit then |
fKvartiriLst.spKvartiriSeek.FieldByName('Dom').AsString + ', кв. ' + |
||||
begin |
fKvartiriLst.spKvartiriSeek.FieldByName('Number').AsString; |
|
|
||
fkvartiriEdt.Tag := 2; //Редактирование |
ceKvartiri.Tag |
|
|
|
:= |
43
end; |
|
fKvartiriLst.spKvartiriSeek.FieldByName('IdKvartiri').AsInteger; |
fkvartiriEdt.ShowModal; |
|
end; |
fkvartiriEdt.Free; |
|
fKvartiriLst.Free; |
end; |
|
end; |
procedure TfKvartiriLst.btnDelClick(Sender: TObject); |
|
|
begin |
|
procedure TfClientsEdt.btnCancelClick(Sender: TObject); |
if MessageDlg('Вы дейстивтельно хотите удалить квартиру ' |
+ |
begin |
spKvartiriSeek.FieldByName('idKvartiri').AsString, mtWarning, |
Close; |
|
mbOKCancel, 0) = mrOk then |
|
end; |
begin |
|
|
spKvartiriDelete.ParamByName('idKvartiri').AsInteger |
:= |
end. |
spKvartiriSeek.FieldByName('idKvartiri').AsInteger; |
|
nit frmMainForm; |
spKvartiriDelete.ExecProc; |
|
|
spKvartiriSeek.Close; |
|
interface |
spKvartiriSeek.Open; |
|
|
end; |
|
uses |
end; |
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, |
procedure TfKvartiriLst.FormShow(Sender: TObject); |
|
Forms, |
begin |
|
Dialogs, XPStyleActnCtrls, ActnList, ActnMan, StdCtrls, Buttons, |
spKvartiriSeek.Open; |
|
ToolWin, |
spKvartiriSeek.Locate('idKvartiri', idKvartiri, []); |
|
ActnCtrls, ActnMenus, ExtCtrls; |
end; |
|
|
end. |
|
type |
unit frmPrintKvitanci; |
|
TfMainForm = class(TForm) |
interface |
|
ActionManager: TActionManager; |
uses |
|
ActionMainMenuBar: TActionMainMenuBar; |
Windows, Messages, SysUtils, Variants, Classes, Graphics, |
aExit: TAction; |
|
Controls, Forms, |
|
aService: TAction; |
Dialogs, ExtCtrls, StdCtrls, Buttons,RxStrUtils; |
|
aBackUp: TAction; |
type |
|
aAbout: TAction; |
TfPrintKvitanci = class(TForm) |
|
aVKGOInsert: TAction; |
Panel1: TPanel; |
|
BitBtn1: TBitBtn; |
Panel2: TPanel; |
|
BitBtn2: TBitBtn; |
Label1: TLabel; |
|
Panel1: TPanel; |
GroupBox1: TGroupBox; |
|
aPrintKvitanci: TAction; |
cbYears: TComboBox; |
|
procedure aExitExecute(Sender: TObject); |
Label2: TLabel; |
|
procedure aServiceExecute(Sender: TObject); |
cbMonths: TComboBox; |
|
procedure aAboutExecute(Sender: TObject); |
btnPrint: TBitBtn; |
|
procedure aVKGOInsertExecute(Sender: TObject); |
btnCancel: TBitBtn; |
|
procedure BitBtn1Click(Sender: TObject); |
procedure btnCancelClick(Sender: TObject); |
|
procedure aBackUpExecute(Sender: TObject); |
procedure FormShow(Sender: TObject); |
|
procedure BitBtn2Click(Sender: TObject); |
procedure btnPrintClick(Sender: TObject); |
|
private |
private |
|
{ Private declarations } |
{ Private declarations } |
|
public |
public |
|
{ Public declarations } |
{ Public declarations } |
|
end; |
end; |
|
|
var |
|
var |
fPrintKvitanci: TfPrintKvitanci; |
|
fMainForm: TfMainForm; |
implementation |
|
|
uses fRM, frmClients; |
|
implementation |
{$R *.dfm} |
|
uses fProperty, frmAbout, frmVkgoLst, frmClients, uBackUp; |
procedure TfPrintKvitanci.btnCancelClick(Sender: TObject); |
|
|
begin |
|
{$R *.dfm} |
Close; |
|
|
end; |
|
procedure TfMainForm.aExitExecute(Sender: TObject); |
procedure TfPrintKvitanci.FormShow(Sender: TObject); |
|
begin |
var |
|
fMainForm.Close; |
i:Integer; |
|
end; |
begin |
|
|
for i := 3 downto 1 do |
|
procedure TfMainForm.aServiceExecute(Sender: TObject); |
begin |
|
begin |
cbYears.Items.Add(inttostr(StrToInt(FormatDateTime('yyyy',Now)) |
Application.CreateForm(TPropertyForm,PropertyForm); |
|
-i)); |
|
PropertyForm.ShowModal; |
end; |
|
PropertyForm.Free; |
cbYears.Items.Add(FormatDateTime('yyyy',Now)); |
|
end; |
for i := 1 to 3 do |
|
|
begin |
|
procedure TfMainForm.aAboutExecute(Sender: TObject); |
cbYears.Items.Add(inttostr(StrToInt(FormatDateTime('yyyy',Now)) |
begin |
|
+i)); |
|
Application.CreateForm(TfAbout, fAbout); |
end; |
|
fAbout.ShowModal; |
cbYears.Text := FormatDateTime('yyyy',Now); |
|
fAbout.Free; |
cbMonths.Text := FormatDateTime('mmmm',Now); |
|
end; |
end; |
|
|
procedure TfPrintKvitanci.btnPrintClick(Sender: TObject); |
|
procedure TfMainForm.aVKGOInsertExecute(Sender: TObject); |
|
|
44 |
begin |
|
|
|
|
begin |
Application.CreateForm(TRM, RM); |
|
|
|
Application.CreateForm(TfVkgoLst,fVkgoLst); |
|
try |
|
|
|
|
fVkgoLst.ShowModal; |
RM.FrReport3.LoadFromFile(ExtractFilePath(Application.ExeNam |
fVkgoLst.Free; |
||||
e) + 'REPORT\Kvitanci.fr3'); |
|
|
|
end; |
|
RM.FrReport3.Variables['idClient'] |
:= |
'''' |
+ |
|
|
fClientsLst.spClientsSeek.FieldByName('idClient').AsString + ''''; |
|
procedure TfMainForm.BitBtn1Click(Sender: TObject); |
|||
RM.FrReport3.Variables['Year'] := '''' + ReplaceStr(cbYears.Text, |
begin |
||||
'''', '''''') + ''''; |
|
|
|
|
Application.CreateForm(TfClientsLST, fClientsLst); |
RM.FrReport3.Variables['Month'] := cbMonths.Text ; |
|
|
fClientsLst.Showmodal; |
||
RM.FrReport3.ShowReport; |
|
|
|
fClientsLst.Free; |
|
finally |
|
|
|
|
end; |
RM.Free; |
|
|
|
|
|
end; |
|
|
|
|
procedure TfMainForm.aBackUpExecute(Sender: TObject); |
end; |
|
|
|
|
begin |
end. |
|
|
|
|
Application.CreateForm(TfBackUp,fBackUp); |
unit frmStreetSPR; |
|
|
|
|
fBackUp.showmodal; |
interface |
|
|
|
|
fBackUp.free; |
uses |
|
|
|
|
end; |
Windows, Messages, SysUtils, Variants, Classes, Graphics, |
|
||||
Controls, Forms, |
|
|
|
|
procedure TfMainForm.BitBtn2Click(Sender: TObject); |
Dialogs, DBGridEhGrouping, ToolCtrlsEh, |
DBGridEhToolCtrls, |
begin |
|||
DynVarsEh, |
|
|
|
|
aVKGOInsert.Execute; |
GridsEh, DBAxisGridsEh, DBGridEh, DB, DBAccess, MSAccess, |
end; |
||||
MemDS, |
|
|
|
|
|
StdCtrls, Buttons, ExtCtrls; |
|
|
|
end. |
|
type |
|
|
|
|
unit frmStreetSPREdt; |
TfStreetSPR = class(TForm) |
|
|
|
|
|
Grid: TDBGridEh; |
|
|
|
|
interface |
Panel1: TPanel; |
|
|
|
|
|
btnInsert: TBitBtn; |
|
|
|
|
uses |
btnEdit: TBitBtn; |
|
|
|
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, |
btnDel: TBitBtn; |
|
|
|
|
Forms, |
btnSelect: TBitBtn; |
|
|
|
|
Dialogs, StdCtrls, Buttons, ExtCtrls, DB, MemDS, DBAccess, MSAccess; |
spStreetSPRSeek: TMSStoredProc; |
|
|
|
|
|
dsStreet: TMSDataSource; |
|
|
|
type |
|
spStreetSPRDelete: TMSStoredProc; |
|
|
|
TfStreetSPREdt = class(TForm) |
|
procedure btnDelClick(Sender: TObject); |
|
|
|
Panel1: TPanel; |
|
procedure btnInsertClick(Sender: TObject); |
|
|
|
Panel2: TPanel; |
|
procedure btnSelectClick(Sender: TObject); |
|
|
|
btnOk: TBitBtn; |
|
procedure FormShow(Sender: TObject); |
|
|
|
btnCancel: TBitBtn; |
|
private |
|
|
|
|
lNameStreet: TLabel; |
{ Private declarations } |
|
|
|
|
eNameStreet: TEdit; |
public |
|
|
|
|
spStreetSPRUpdate: TMSStoredProc; |
{ Public declarations } |
|
|
|
|
spStreetSPRInsert: TMSStoredProc; |
end; |
|
|
|
|
lObezPole: TLabel; |
var |
|
|
|
|
procedure FormShow(Sender: TObject); |
fStreetSPR: TfStreetSPR; |
|
|
|
|
procedure btnOkClick(Sender: TObject); |
implementation |
|
|
|
|
procedure insert; |
uses fDM, frmClientsEdt, frmStreetSPREdt, frmKvartiriEdt |
|
procedure edit; |
|||
{$R *.dfm} |
|
|
|
|
procedure |
procedure TfStreetSPR.btnDelClick(Sender: TObject); |
|
|
prosmotrFont(zvezdochka:string;color:Tcolor;obezpole:boolean); |
||
begin |
|
|
|
|
procedure getField; |
if MessageDlg('Вы дейстивтельно хотите удалить' + #13+#10 + |
private |
||||
'улицу: №' + |
|
|
|
|
{ Private declarations } |
spStreetSPRSeek.FieldByName('NameStreet').AsString, |
|
public |
|||
mtWarning, mbOKCancel, 0) = mrOk then |
|
|
|
{ Public declarations } |
|
begin |
|
|
|
|
end; |
spStreetSPRDelete.ParamByName('idStreet').AsInteger |
:= |
|
|||
spStreetSPRSeek.FieldByName('idStreet').AsInteger; |
|
|
var |
||
spStreetSPRDelete.ExecProc; |
|
|
|
fStreetSPREdt: TfStreetSPREdt; |
|
spStreetSPRSeek.Close; |
|
|
|
|
|
spStreetSPRSeek.Open; |
|
|
|
|
implementation |
end; |
|
|
|
|
|
end; |
|
|
|
|
uses fDM, frmStreetSPR; |
procedure TfStreetSPR.btnInsertClick(Sender: TObject); |
|
|
|
||
begin |
|
|
|
|
{$R *.dfm} |
Application.CreateForm(TfStreetSPREdt, fStreetSPREdt); |
|
|
|||
if Sender = btnInsert then |
|
|
|
|
procedure TfStreetSPREdt.insert; |
begin |
|
|
|
|
begin |
fStreetSPREdt.Tag := 1; |
//Добавление |
|
|
|
fStreetSPREdt.Caption := 'Добавление новой улицы'; |
end; |
|
|
|
|
btnOk.Visible := True; |
if Sender = btnEdit then |
|
|
|
|
btnCancel.Visible := True; |
begin |
|
|
|
|
prosmotrFont('*',clBlue,true); |
fStreetSPREdt.Tag := 2; |
//Редактирование |
|
|
|
end; |
end; |
|
|
|
|
|
fStreetSPREdt.ShowModal; |
|
|
|
procedure TfStreetSPREdt.edit; |
|
|
|
|
|
|
45 |
fStreetSPREdt.Free; |
|
begin |
|
end; |
|
fStreetSPREdt.Caption := 'Изменение название улицы'; |
|
procedure TfStreetSPR.btnSelectClick(Sender: TObject); |
btnOk.Visible := True; |
|
|
begin |
|
btnCancel.Visible := True; |
|
fkvartiriEdt.ceStreet.Text |
:= |
getField; |
|
spStreetSPRSeek.FieldByName('NameStreet').AsString; |
prosmotrFont('*',clBlue,true); |
|
|
fkvartiriEdt.ceStreet.Tag |
:= |
end; |
|
spStreetSPRSeek.FieldByName('IdStreet').AsInteger; |
|
|
|
fStreetSPR.Close; |
|
procedure TfStreetSPREdt.getField; |
|
end; |
|
begin |
|
procedure TfStreetSPR.FormShow(Sender: TObject); |
{ With spAutoDomSelect do |
|
|
begin |
|
begin |
|
spStreetSPRSeek.Open; |
|
ParamByName('idOrder').AsInteger |
:= |
end; |
|
fAutoDom.spSeek.FieldByName('idOrder').AsInteger; |
|
end. |
|
ExecProc; |
|
unit frmVidVKGOLst; |
|
deDateOrder.Date := ParamByName('@DateOrder').AsDate; |
|
interface |
|
if ParamByName('@OrderOff').AsInteger = -1 then |
|
uses |
|
begin |
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, |
deDateOrderOff.Date := ParamByName('@DateOrderOff').AsDate; |
|
|
Controls, Forms, |
|
cbOrderOff.Checked := True; |
|
Dialogs, DBGridEhGrouping, ToolCtrlsEh, |
DBGridEhToolCtrls, |
end; |
|
DynVarsEh, DB, |
|
ceNameClient.Text := ParamByName('@NameClient').AsString; |
|
DBAccess, MSAccess, MemDS, StdCtrls, Buttons, ExtCtrls, |
edPhone.Text := ParamByName('Phone').AsString; |
|
|
GridsEh, |
|
ceCenaOrder.Value := ParamByName('CenaOrder').Value; |
|
DBAxisGridsEh, DBGridEh; |
|
cePribil.Value := ParamByName('Pribil').Value; |
|
type |
|
ceAvans.Value := ParamByName('Avans').Value; |
|
TfVidVKGOLst = class(TForm) |
|
ceCenaOstatok.Value := ParamByName('Ostatok').Value; |
|
Grid: TDBGridEh; |
|
ceProcPosrednik.Value := ParamByName('ProcPosrednik').Value; |
|
Panel1: TPanel; |
|
ceCenaPosrednik.Value := ParamByName('CenaPosrednik').Value; |
|
btnInsert: TBitBtn; |
|
lcehPosredniki.Value := ParamByName('idPosrednik').Value; |
|
btnEdit: TBitBtn; |
|
cbZapPosrednik.Checked := ParamByName('ZapPosrednik').AsBoolean; |
|
btnDel: TBitBtn; |
|
end; } |
|
btnSelect: TBitBtn; |
|
end; |
|
spVidVKGOSeek: TMSStoredProc; |
|
|
|
dsVidVKGO: TMSDataSource; |
|
procedure |
|
procedure btnSelectClick(Sender: TObject); |
|
TfStreetSPREdt.prosmotrFont(zvezdochka:string;color:Tcolor;obezpole:bool |
|
procedure FormShow(Sender: TObject); |
|
ean); |
|
private |
|
begin |
|
{ Private declarations } |
|
|
|
public |
|
lNameStreet.Caption := 'Название улицы: '+zvezdochka; |
|
{ Public declarations } |
|
lNameStreet.Font.Color := color; |
|
end; |
|
|
|
var |
|
lObezPole.Font.Color := color; |
|
fVidVKGOLst: TfVidVKGOLst; |
|
lObezPole.Visible := obezpole; |
|
implementation |
|
|
|
|
|
end; |
|
uses fDM, frmVKGOEdt; |
|
|
|
|
|
procedure TfStreetSPREdt.FormShow(Sender: TObject); |
|
{$R *.dfm} |
|
begin |
|
procedure TfVidVKGOLst.btnSelectClick(Sender: TObject); |
Case fStreetSPREdt.Tag of |
|
|
begin |
|
1: begin |
|
fVKGOEdt.ceVidVKGO.Text |
:= |
insert;//Добавление поставщика |
|
spVidVKGOSeek.FieldByName('NameVidVKGO').AsString; |
end; |
|
|
fVKGOEdt.ceVidVKGO.Tag |
:= |
2: begin |
|
spVidVKGOSeek.FieldByName('idVidVKGO').AsInteger; |
edit;//Редактирование поставщика |
|
|
fVidVKGOLst.Close; |
|
end; |
|
end; |
|
end; |
|
procedure TfVidVKGOLst.FormShow(Sender: TObject); |
end; |
|
|
begin |
|
|
|
spVidVKGOSeek.Open; |
|
procedure TfStreetSPREdt.btnOkClick(Sender: TObject); |
|
end; |
|
begin |
|
end. |
|
if (fStreetSPREdt.Tag = 2) then |
|
unit frmVKGOEdt; |
|
begin |
|
interface |
|
With spStreetSPRUpdate do |
|
uses |
|
begin |
|
Windows, Messages, SysUtils, Variants, Classes, Graphics, |
ParamByName('@idStreet').AsInteger:= |
|
|
Controls, Forms, |
|
fStreetSPR.spStreetSPRSeek.FieldByName('idStreet').Value; |
|
Dialogs, ExtCtrls, StdCtrls, ToolEdit, Mask, Buttons; |
ParamByName('@NameStreet').AsString := eNameStreet.Text; |
|
|
type |
|
execProc; |
|
TfVKGOEdt = class(TForm) |
|
end; |
|
Panel1: TPanel; |
|
end; |
|
Label1: TLabel; |
|
if fStreetSPREdt.Tag = 1 then |
|
eNameVKGO: TEdit; |
|
begin |
|
Panel2: TPanel; |
|
With spStreetSPRInsert do |
|
lObezPole: TLabel; |
|
begin |
|
btnOk: TBitBtn; |
|
ParamByName('@NameStreet').AsString := eNameStreet.Text; |
|
btnCancel: TBitBtn; |
|
ExecProc; |
|
|
|
46 |
|
ceVidVKGO: TComboEdit; |
|
end; |
Label2: TLabel; |
|
fStreetSPR.spStreetSPRSeek.Close; |
dateVKGO: TDateEdit; |
|
fStreetSPR.spStreetSPRSeek.Open; |
Label3: TLabel; |
|
fStreetSPREdt.Close; |
deDateProv: TDateEdit; |
|
end; |
Proverka: TCheckBox; |
|
|
procedure btnOkClick(Sender: TObject); |
|
end; |
procedure ceVidVKGOButtonClick(Sender: TObject); |
|
|
procedure FormShow(Sender: TObject); |
|
end. |
private |
|
|
{ Private declarations } |
|
|
public |
|
|
{ Public declarations } |
|
|
end; |
|
|
var |
|
|
fVKGOEdt: TfVKGOEdt; |
|
|
implementation |
|
|
uses frmKvartiriEdt, frmVidVKGOLst; |
|
|
{$R *.dfm} |
|
|
procedure TfVKGOEdt.btnOkClick(Sender: TObject); |
|
|
begin |
|
|
if (fVKGOEdt.Tag = 2) then |
|
|
begin |
|
|
{With spKvartiriUpdate do |
|
|
begin |
|
|
ParamByName('@idStreet').AsInteger:= |
|
|
fStreetSPR.spStreetSPRSeek.FieldByName('idStreet').Value; |
|
|
ParamByName('@NameStreet').AsString := eNameStreet.Text; |
|
|
execProc; |
|
|
end;} |
|
|
end; |
|
|
if fVKGOEdt.Tag = 1 then |
|
|
begin |
|
|
fkvartiriEdt.vtVKGO.Append; |
|
|
fkvartiriEdt.vtVKGO.FieldByName('NameVKGO').AsString |
:= |
|
eNameVKGO.Text ; |
|
|
fkvartiriEdt.vtVKGO.FieldByName('IdVidVKGO').AsInteger |
:= |
|
ceVidVKGO.Tag; |
|
|
fkvartiriEdt.vtVKGO.FieldByName('DateIzgot').AsVariant |
:= |
|
dateVKGO.Date ; |
|
|
fkvartiriEdt.vtVKGO.FieldByName('DateProv').AsVariant |
:= |
|
deDateProv.Date ; |
|
|
fkvartiriEdt.vtVKGO.FieldByName('Prov').AsBoolean |
:= |
|
Proverka.Checked; |
|
|
fkvartiriEdt.vtVKGO.Post; |
|
|
fkvartiriEdt.vtVKGO.Close; |
|
|
fkvartiriEdt.vtVKGO.Open; |
|
|
end; |
|
|
fVKGOEdt.Close; |
|
|
end; |
|
|
procedure TfVKGOEdt.ceVidVKGOButtonClick(Sender: TObject); |
|
|
begin |
|
|
Application.CreateForm(TfVidVKGOLst,fVidVKGOLst); |
|
|
fVidVKGOLst.ShowModal; |
|
|
fVidVKGOLst.Free; |
|
|
end; |
|
|
procedure TfVKGOEdt.FormShow(Sender: TObject); |
|
|
begin |
|
|
fkvartiriEdt.vtVKGO.Open; |
|
|
end; |
|
|
end. |
|
|
47