Develop and Download Open Source Software

Browse Subversion Repository

Contents of /Unit6.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3 - (show annotations) (download) (as text)
Sat Dec 26 07:30:17 2015 UTC (8 years, 3 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 2100 byte(s)
ユーザー登録フォームを作成

DataSetのFilter処理を正しいものに訂正


文字化け、画像表示に問題あり
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, IWCompLabel;
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 IWButton2: TIWButton;
24 procedure IWButton1Click(Sender: TObject);
25 procedure IWButton2Click(Sender: TObject);
26 public
27 private
28 function Check: Boolean;
29 end;
30
31 implementation
32
33 {$R *.dfm}
34
35 uses Unit3;
36
37 function TUserForm.Check: Boolean;
38 begin
39 result := false;
40 if Length(IWEdit5.Text) < 5 then
41 begin
42 WebApplication.ShowMessage('�T�����������p�X���[�h���g�p������������');
43 Exit;
44 end;
45 if IWEdit5.Text <> IWEdit6.Text then
46 WebApplication.ShowMessage('�p�X���[�h���������v��������')
47 else if DM.FDTable1.Locate('EMAIL', IWEdit3.Text, []) = 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.Last;
67 DM.FDTable1.AppendRecord([IWEdit1.Text, IWEdit3.Text, IWEdit2.Text,
68 IWEdit4.Text, IWEdit5.Text, DM.FDTable1.FieldByName('NUMBER').AsInteger + 1]);
69 Release;
70 end;
71 end;
72
73 procedure TUserForm.IWButton2Click(Sender: TObject);
74 begin
75 Release;
76 end;
77
78 end.

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26