| 6 |
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls, |
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls, |
| 7 |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit, |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompEdit, |
| 8 |
IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout, |
IWVCLComponent, IWBaseLayoutComponent, IWBaseContainerLayout, |
| 9 |
IWContainerLayout, IWTemplateProcessorHTML, IWCompButton, Vcl.Forms, Unit3, |
IWContainerLayout, IWTemplateProcessorHTML, IWCompButton, Vcl.Forms, Unit2, |
| 10 |
IWCompGrids, IWCompCalendar; |
IWCompGrids, IWCompCalendar; |
| 11 |
|
|
| 12 |
type |
type |
| 18 |
IWEdit4: TIWEdit; |
IWEdit4: TIWEdit; |
| 19 |
IWEdit5: TIWEdit; |
IWEdit5: TIWEdit; |
| 20 |
IWButton1: TIWButton; |
IWButton1: TIWButton; |
|
IWFrame1: TIWFrame1; |
|
|
IWCalendar1: TIWCalendar; |
|
| 21 |
IWEdit6: TIWEdit; |
IWEdit6: TIWEdit; |
| 22 |
|
IWFrame1: TIWFrame1; |
| 23 |
procedure IWButton1Click(Sender: TObject); |
procedure IWButton1Click(Sender: TObject); |
| 24 |
procedure IWFrame1IWImageFile1Click(Sender: TObject); |
procedure IWFrame1IWImageFile1Click(Sender: TObject); |
| 25 |
public |
public |
| 31 |
|
|
| 32 |
{$R *.dfm} |
{$R *.dfm} |
| 33 |
|
|
| 34 |
uses Unit1, Unit4; |
uses Unit3; |
| 35 |
|
|
| 36 |
function TUserForm.Check: Boolean; |
function TUserForm.Check: Boolean; |
| 37 |
begin |
begin |
| 38 |
if DM.FDTable1.Locate('EMAIL', DM.FDTable1.FieldByName('EMAIL').AsString, []) |
result := false; |
| 39 |
= false then |
if Length(IWEdit5.Text) < 5 then |
|
result := (Length(IWEdit5.Text) > 5) and (IWEdit5.Text = IWEdit6.Text) and |
|
|
(IWEdit1.Text <> '') and (IWEdit2.Text <> '') and (IWEdit3.Text <> '') and |
|
|
(IWEdit4.Text <> '') |
|
|
else |
|
| 40 |
begin |
begin |
| 41 |
WebApplication.ShowMessage('e-mailが既に登録されています'); |
WebApplication.ShowMessage('5文字以上のパスワードを使用してください'); |
| 42 |
result := false; |
Exit; |
| 43 |
end; |
end; |
| 44 |
|
if IWEdit5.Text <> IWEdit6.Text then |
| 45 |
|
WebApplication.ShowMessage('パスワード入力が一致しません') |
| 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が既に登録されています'); |
| 58 |
|
IWEdit5.Text := ''; |
| 59 |
|
IWEdit6.Text := ''; |
| 60 |
end; |
end; |
| 61 |
|
|
| 62 |
procedure TUserForm.IWButton1Click(Sender: TObject); |
procedure TUserForm.IWButton1Click(Sender: TObject); |
| 66 |
DM.FDTable1.AppendRecord([IWEdit1.Text, IWEdit2.Text, IWEdit3.Text, |
DM.FDTable1.AppendRecord([IWEdit1.Text, IWEdit2.Text, IWEdit3.Text, |
| 67 |
IWEdit4.Text, IWEdit5.Text]); |
IWEdit4.Text, IWEdit5.Text]); |
| 68 |
Release; |
Release; |
| 69 |
end |
end; |
|
else |
|
|
WebApplication.ShowMessage('入力が正しくありません'); |
|
| 70 |
end; |
end; |
| 71 |
|
|
| 72 |
procedure TUserForm.IWFrame1IWImageFile1Click(Sender: TObject); |
procedure TUserForm.IWFrame1IWImageFile1Click(Sender: TObject); |