Browse Subversion Repository
Contents of /Unit13.pas
Parent Directory
| Revision Log
Revision 17 -
( show annotations)
( download)
( as text)
Wed Aug 24 12:31:07 2016 UTC
(7 years, 7 months ago)
by yamat0jp
File MIME type: text/x-pascal
File size: 1900 byte(s)
ご注文内容発送フォームがしっくりいくようになりました。
| 1 |
unit Unit13; |
| 2 |
|
| 3 |
interface |
| 4 |
|
| 5 |
uses |
| 6 |
Classes, SysUtils, IWAppForm, IWApplication, IWColor, IWTypes, Vcl.Controls, |
| 7 |
IWVCLBaseControl, IWBaseControl, IWBaseHTMLControl, IWControl, IWCompButton, |
| 8 |
IWCompExtCtrls; |
| 9 |
|
| 10 |
type |
| 11 |
TIWForm13 = class(TIWAppForm) |
| 12 |
IWButton1: TIWButton; |
| 13 |
IWRadioGroup1: TIWRadioGroup; |
| 14 |
procedure IWButton1Click(Sender: TObject); |
| 15 |
procedure IWRadioGroup1Click(Sender: TObject); |
| 16 |
procedure IWAppFormCreate(Sender: TObject); |
| 17 |
public |
| 18 |
end; |
| 19 |
|
| 20 |
implementation |
| 21 |
|
| 22 |
{$R *.dfm} |
| 23 |
|
| 24 |
uses Unit3; |
| 25 |
|
| 26 |
procedure TIWForm13.IWAppFormCreate(Sender: TObject); |
| 27 |
begin |
| 28 |
IWRadioGroup1Click(Sender); |
| 29 |
end; |
| 30 |
|
| 31 |
procedure TIWForm13.IWButton1Click(Sender: TObject); |
| 32 |
var |
| 33 |
s: TList; |
| 34 |
p: PInteger; |
| 35 |
i, j: Integer; |
| 36 |
begin |
| 37 |
s := TList.Create; |
| 38 |
try |
| 39 |
DM.FDTable2.First; |
| 40 |
while (DM.FDTable2.Eof = false) and (i < 100) do |
| 41 |
begin |
| 42 |
if DM.FDTable2.FieldByName('SERIAL').AsInteger <> i then |
| 43 |
begin |
| 44 |
New(p); |
| 45 |
s.Add(p); |
| 46 |
p^ := i; |
| 47 |
end; |
| 48 |
inc(i); |
| 49 |
DM.FDTable2.Next; |
| 50 |
end; |
| 51 |
DM.FDTable2.Last; |
| 52 |
DM.FDQuery1.SQL.Clear; |
| 53 |
DM.FDQuery1.SQL.Add('select serial from cart_data where serial = :num'); |
| 54 |
while (DM.FDTable2.Bof = false) and (s.Count > 0) do |
| 55 |
begin |
| 56 |
p := s[0]; |
| 57 |
j := DM.FDTable2.FieldByName('SERIAL').AsInteger; |
| 58 |
with DM.FDQuery1 do |
| 59 |
begin |
| 60 |
ParamByName('num').AsInteger := j; |
| 61 |
Open; |
| 62 |
First; |
| 63 |
while Eof = false do |
| 64 |
begin |
| 65 |
Fields[0].AsInteger := p^; |
| 66 |
Next; |
| 67 |
end; |
| 68 |
Close; |
| 69 |
end; |
| 70 |
DM.FDTable2.FieldByName('SERIAL').AsInteger := p^; |
| 71 |
DM.FDTable1.Prior; |
| 72 |
System.Dispose(p); |
| 73 |
s.Delete(0); |
| 74 |
end; |
| 75 |
finally |
| 76 |
s.Free; |
| 77 |
end; |
| 78 |
end; |
| 79 |
|
| 80 |
procedure TIWForm13.IWRadioGroup1Click(Sender: TObject); |
| 81 |
begin |
| 82 |
IWButton1.Enabled := IWRadioGroup1.ItemIndex = 1; |
| 83 |
end; |
| 84 |
|
| 85 |
end. |
| |