Develop and Download Open Source Software

Browse Subversion Repository

Diff of /Unit4.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8 by yamat0jp, Thu Dec 31 08:51:02 2015 UTC revision 15 by yamat0jp, Fri Aug 5 10:33:26 2016 UTC
# Line 29  implementation Line 29  implementation
29    
30  {$R *.dfm}  {$R *.dfm}
31    
32  uses Unit3, Unit7;  uses Unit3, Unit7, Unit6, ServerController;
33    
34  procedure TCartForm.IWAppFormCreate(Sender: TObject);  procedure TCartForm.IWAppFormCreate(Sender: TObject);
35  begin  begin
36    with DM.FDQuery1 do    with DM.FDQuery1 do
37    begin    begin
38      SQL.Clear;      SQL.Clear;
39      SQL.Add('select thumbnail,name,volume,price,number,serial from cart_data join item_data');      SQL.Add('select thumbnail,name,volume,price,number,serial from cart_data,item_data');
40      SQL.Add(' on (cart_data.serial = item_data.serial)');      SQL.Add(' where cart_data.serial = item_data.serial');
41      SQL.Add(' where number = :num');      SQL.Add(' and number = :num');
42      Params.ParamByName('num').AsInteger := DM.FDTable1.FieldByName('NUMBER')      ParamByName('num').AsInteger := UserSession.user_number;
       .AsInteger;  
43    end;    end;
44  end;  end;
45    
# Line 67  begin Line 66  begin
66      try      try
67        while Eof = false do        while Eof = false do
68        begin        begin
69          if Fields.Fields[0].AsBytes <> nil then          if Fields.Fields[0].IsNull = false then
70          begin          begin
71            s := CreateBlobStream(Fields.Fields[0], bmRead);            s := CreateBlobStream(Fields.Fields[0], bmRead);
72            try            try
# Line 98  begin Line 97  begin
97  end;  end;
98    
99  procedure TCartForm.IWButton1Click(Sender: TObject);  procedure TCartForm.IWButton1Click(Sender: TObject);
100    var
101      s: TUserForm;
102  begin  begin
103    if IWGrid1.RowCount > 0 then    if (UserSession.user_number <> 0) and (IWGrid1.RowCount > 0) then
104      TPayForm.Create(WebApplication).Show;      if DM.FDTable1.FieldByName('EMAIL').AsString = '' then
105        begin
106          s := TUserForm.Create(WebApplication);
107          s.pay := IWGrid1.RowCount>0;
108          s.Show;
109        end
110        else
111          TPayForm.Create(WebApplication).Show;
112    Release;    Release;
113  end;  end;
114    
# Line 119  begin Line 127  begin
127      RecNo := ARow + 1;      RecNo := ARow + 1;
128      i := FieldByName('NUMBER').AsInteger;      i := FieldByName('NUMBER').AsInteger;
129      j := FieldByName('SERIAL').AsInteger;      j := FieldByName('SERIAL').AsInteger;
130      SQL.Clear;      Open('select * from cart_data;');
     SQL.Add('select * from cart_data');  
     Open;  
131      if Locate('NUMBER;SERIAL', VarArrayOf([i, j]), []) = true then      if Locate('NUMBER;SERIAL', VarArrayOf([i, j]), []) = true then
132        Delete;        Delete;
133    end;    end;
# Line 129  begin Line 135  begin
135  end;  end;
136    
137  end.  end.
   

Legend:
Removed from v.8  
changed lines
  Added in v.15

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