| 1 |
unit Unit6; |
| 2 |
|
| 3 |
interface |
| 4 |
|
| 5 |
uses |
| 6 |
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls, |
| 7 |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit, |
| 8 |
IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout, |
| 9 |
IWContainerLayout, IWTemplateProcessorHTML, IWCompButton, Vcl.Forms, Unit2, |
| 10 |
IWCompGrids, IWCompCalendar; |
| 11 |
|
| 12 |
type |
| 13 |
TUserForm = class(TIWAppForm) |
| 14 |
IWTemplateProcessorHTML1: TIWTemplateProcessorHTML; |
| 15 |
IWEdit1: TIWEdit; |
| 16 |
IWEdit2: TIWEdit; |
| 17 |
IWEdit3: TIWEdit; |
| 18 |
IWEdit4: TIWEdit; |
| 19 |
IWEdit5: TIWEdit; |
| 20 |
IWButton1: TIWButton; |
| 21 |
IWEdit6: TIWEdit; |
| 22 |
IWFrame1: TIWFrame1; |
| 23 |
procedure IWButton1Click(Sender: TObject); |
| 24 |
procedure IWFrame1IWImageFile1Click(Sender: TObject); |
| 25 |
public |
| 26 |
private |
| 27 |
function Check: Boolean; |
| 28 |
end; |
| 29 |
|
| 30 |
implementation |
| 31 |
|
| 32 |
{$R *.dfm} |
| 33 |
|
| 34 |
uses Unit3; |
| 35 |
|
| 36 |
function TUserForm.Check: Boolean; |
| 37 |
begin |
| 38 |
result := false; |
| 39 |
if Length(IWEdit5.Text) < 5 then |
| 40 |
begin |
| 41 |
WebApplication.ShowMessage('TśČăĚpX[hđgpľÄžł˘'); |
| 42 |
Exit; |
| 43 |
end; |
| 44 |
if IWEdit5.Text <> IWEdit6.Text then |
| 45 |
WebApplication.ShowMessage('pX[hüÍŞęvľÜšń') |
| 46 |
else if DM.FDTable1.Locate('EMAIL', DM.FDTable1.FieldByName('EMAIL').AsString, |
| 47 |
[]) = false then |
| 48 |
begin |
| 49 |
result := (IWEdit1.Text <> '') and (IWEdit2.Text <> '') and |
| 50 |
(IWEdit3.Text <> '') and (IWEdit4.Text <> ''); |
| 51 |
if result = true then |
| 52 |
Exit |
| 53 |
else |
| 54 |
WebApplication.ShowMessage('üÍŞłľ čÜšń'); |
| 55 |
end |
| 56 |
else if DM.FDTable1.FieldByName('EMAIL').AsString <> '' then |
| 57 |
WebApplication.ShowMessage('e-mailŞůÉo^łęĢܡ'); |
| 58 |
IWEdit5.Text := ''; |
| 59 |
IWEdit6.Text := ''; |
| 60 |
end; |
| 61 |
|
| 62 |
procedure TUserForm.IWButton1Click(Sender: TObject); |
| 63 |
begin |
| 64 |
if Check = true then |
| 65 |
begin |
| 66 |
DM.FDTable1.AppendRecord([IWEdit1.Text, IWEdit2.Text, IWEdit3.Text, |
| 67 |
IWEdit4.Text, IWEdit5.Text]); |
| 68 |
Release; |
| 69 |
end; |
| 70 |
end; |
| 71 |
|
| 72 |
procedure TUserForm.IWFrame1IWImageFile1Click(Sender: TObject); |
| 73 |
begin |
| 74 |
Release; |
| 75 |
end; |
| 76 |
|
| 77 |
end. |