Develop and Download Open Source Software

Browse Subversion Repository

Annotation of /Unit7.pas

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (hide annotations) (download) (as text)
Thu Dec 31 08:51:02 2015 UTC (8 years, 2 months ago) by yamat0jp
File MIME type: text/x-pascal
File size: 1789 byte(s)
退会できるようにしました 細かいところを手直し
無駄なコードやレイアウト、挙動部分。
1 yamat0jp 1 unit Unit7;
2    
3     interface
4    
5     uses
6     Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls,
7     IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompGrids,
8     IWDBGrids, IWCompButton, IWCompExtCtrls, IWVCLComponent,
9     IWBaseLayoutComponent, IWBaseContainerLayout, IWContainerLayout,
10 yamat0jp 7 IWTemplateProcessorHTML, PngImage, Data.DB, IWCompLabel, IWDBStdCtrls,
11     FireDAC.Comp.Client;
12 yamat0jp 1
13     type
14 yamat0jp 5 TPayForm = class(TIWAppForm)
15 yamat0jp 1 IWButton1: TIWButton;
16     IWButton2: TIWButton;
17     IWTemplateProcessorHTML1: TIWTemplateProcessorHTML;
18 yamat0jp 6 IWDBLabel1: TIWDBLabel;
19     procedure IWButton2Click(Sender: TObject);
20 yamat0jp 7 procedure IWButton1Click(Sender: TObject);
21 yamat0jp 1 public
22     end;
23    
24     implementation
25    
26     {$R *.dfm}
27    
28 yamat0jp 8 uses Unit3, Unit1;
29 yamat0jp 1
30 yamat0jp 7 procedure TPayForm.IWButton1Click(Sender: TObject);
31     var
32     s: TFDQuery;
33     begin
34     with DM.FDQuery1 do
35     begin
36 yamat0jp 8 Open('select number,serial from cart_data where number = :num;',
37     [DM.FDTable1.FieldByName('NUMBER').AsInteger]);
38 yamat0jp 7 s := TFDQuery.Create(nil);
39     try
40     s.Connection := DM.FDConnection1;
41     s.Open('select * from recent_data;');
42 yamat0jp 8 while s.Eof = false do
43     if Date + 30 < s.FieldByName('DATE').AsDateTime then
44     s.Delete
45     else
46     s.Next;
47 yamat0jp 7 while Eof = false do
48     begin
49 yamat0jp 8 if s.Locate('SERIAL', s.FieldByName('SERIAL').AsInteger, []) = false
50     then
51     s.AppendRecord([Fields.Fields[0].AsInteger,
52     Fields.Fields[1].AsInteger, Date]);
53 yamat0jp 7 Delete;
54     end;
55     finally
56     s.Free;
57     end;
58     end;
59     WebApplication.ShowMessage('��������������������������������');
60     Release;
61 yamat0jp 8 IWForm1.Page := true;
62 yamat0jp 7 end;
63    
64 yamat0jp 6 procedure TPayForm.IWButton2Click(Sender: TObject);
65     begin
66     Release;
67     end;
68    
69 yamat0jp 1 end.

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