Skip to content

Commit fe095fd

Browse files
author
César Cardoso
committed
feature/components-dbware
1 parent 8d2931a commit fe095fd

4 files changed

Lines changed: 428 additions & 64 deletions

File tree

Samples/Demo01/Src/Utils/C4D.ValidateComponents.Demo01.Utils.pas

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ interface
1111
Vcl.Dialogs,
1212
Vcl.StdCtrls,
1313
Vcl.ExtCtrls,
14-
Vcl.ComCtrls;
14+
Vcl.ComCtrls,
15+
Vcl.DBCtrls;
1516

1617
type
1718
TUtils = class
@@ -31,14 +32,23 @@ class procedure TUtils.ClearAllFieldsForm(const AForm: TForm);
3132
LComponent := AForm.Components[i];
3233
if(LComponent is TEdit)then
3334
TEdit(LComponent).Clear
35+
else if(LComponent is TMemo)then
36+
TMemo(LComponent).Lines.Clear
3437
else if(LComponent is TComboBox)then
3538
TComboBox(LComponent).ItemIndex := -1
36-
else if(LComponent is TCheckBox)then
37-
TCheckBox(LComponent).Checked := False
3839
else if(LComponent is TRadioGroup)then
3940
TRadioGroup(LComponent).ItemIndex := -1
40-
else if(LComponent is TMemo)then
41-
TMemo(LComponent).Lines.Clear
41+
else if(LComponent is TCheckBox)then
42+
TCheckBox(LComponent).Checked := False
43+
//DBWARE
44+
else if(LComponent is TDBEdit)then
45+
TDBEdit(LComponent).Field.Clear
46+
else if(LComponent is TDBMemo)then
47+
TDBMemo(LComponent).Field.Clear
48+
else if(LComponent is TDBComboBox)then
49+
TDBComboBox(LComponent).Field.Clear
50+
else if(LComponent is TDBRadioGroup)then
51+
TDBRadioGroup(LComponent).Field.Clear;
4252
end;
4353
end;
4454

0 commit comments

Comments
 (0)