| 3 |
interface |
interface |
| 4 |
|
|
| 5 |
uses |
uses |
| 6 |
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls, |
SysUtils, Classes, Controls, Forms, |
| 7 |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompButton, |
IWVCLBaseContainer, IWColor, IWContainer, IWRegion, IWHTMLContainer, |
| 8 |
IWCompLabel, IWCompEdit, IWDBStdCtrls, IWCompExtCtrls, IWDBExtCtrls, |
IWHTML40Container, IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, |
| 9 |
IWCompFile, IWCompText, FireDAC.Stan.Intf, FireDAC.Stan.Option, |
IWControl, IWCompExtCtrls; |
|
FireDAC.Stan.Param, FireDAC.Stan.Error, FireDAC.DatS, FireDAC.Phys.Intf, |
|
|
FireDAC.DApt.Intf, FireDAC.Stan.Async, FireDAC.DApt, Data.DB, |
|
|
FireDAC.Comp.DataSet, FireDAC.Comp.Client, IWCompListbox, Vcl.Dialogs, |
|
|
Graphics; |
|
| 10 |
|
|
| 11 |
type |
type |
| 12 |
TIWForm2 = class(TIWAppForm) |
TIWFrame1 = class(TFrame) |
| 13 |
IWButton1: TIWButton; |
IWFrameRegion: TIWRegion; |
| 14 |
IWDBNavigator1: TIWDBNavigator; |
IWImageFile1: TIWImageFile; |
|
IWDBEdit1: TIWDBEdit; |
|
|
IWDBEdit2: TIWDBEdit; |
|
|
IWLabel1: TIWLabel; |
|
|
IWLabel2: TIWLabel; |
|
|
IWLabel3: TIWLabel; |
|
|
IWDBEdit3: TIWDBEdit; |
|
|
IWDBEdit4: TIWDBEdit; |
|
|
IWLabel4: TIWLabel; |
|
|
IWDBText1: TIWDBText; |
|
|
IWButton2: TIWButton; |
|
|
procedure IWDBNavigator1Edit(Sender: TObject); |
|
|
procedure IWDBNavigator1Cancel(Sender: TObject); |
|
|
procedure IWDBNavigator1Post(Sender: TObject); |
|
|
public |
|
| 15 |
private |
private |
| 16 |
temp: TDate; |
{ Private declarations } |
| 17 |
|
public |
| 18 |
|
{ Public declarations } |
| 19 |
end; |
end; |
| 20 |
|
|
| 21 |
implementation |
implementation |
| 22 |
|
|
| 23 |
{$R *.dfm} |
{$R *.dfm} |
| 24 |
|
|
| 25 |
uses ServerController, Unit4; |
end. |
|
|
|
|
procedure TIWForm2.IWDBNavigator1Cancel(Sender: TObject); |
|
|
begin |
|
|
with DM.FDTable2 do |
|
|
begin |
|
|
Edit; |
|
|
FieldByName('DATE').AsDateTime:=temp; |
|
|
Post; |
|
|
end; |
|
|
IWButton2.Enabled:=false; |
|
|
end; |
|
|
|
|
|
procedure TIWForm2.IWDBNavigator1Edit(Sender: TObject); |
|
|
begin |
|
|
temp:=DM.FDTable2.FieldByName('DATE').AsDateTime; |
|
|
IWButton2.Enabled:=true; |
|
|
end; |
|
|
|
|
|
procedure TIWForm2.IWDBNavigator1Post(Sender: TObject); |
|
|
begin |
|
|
with DM.FDTable2 do |
|
|
begin |
|
|
Edit; |
|
|
FieldByName('DATE').AsDateTime:=Now; |
|
|
Post; |
|
|
end; |
|
|
end; |
|
|
|
|
|
end. |
|