Révision 4 LicensesMercure/UFAnnual.pas

Voir les différences:

UFAnnual.pas
86 86
        FieldByName('FinalDate').AsDateTime := NewDate;
87 87
        FieldByName('SoftwareEnableKey').AsString := FMenu.CompleteKey(FieldByName('LicenseNumber').AsInteger, FieldByName('Version').AsString, FieldByName('FirstName').AsString, FieldByName('LastName').AsString, FieldByName('Company').AsString, FieldByName('VolumeSerialNumber').AsString, DateToStr(FMenu.DateLimite));
88 88
        try
89
          f := TIniFile.Create(SHARED_DRIVE + SHARED_FOLDER + 'Fichiers\InraPorc.lic');
89
          f := TIniFile.Create(TempFolder + '\InraPorc.lic');
90 90
          f.WriteInteger ('License', 'LicenseType', 2);
91 91
          f.WriteInteger ('License', 'LicenseNumber', FieldByName('LicenseNumber').AsInteger) ;
92 92
          f.WriteString ('License', 'Version', FieldByName('Version').AsString);
......
134 134
              Body.AddStrings(StrMessage);
135 135
            end;
136 136
            StrMessage.Free;
137
            if FileExists(SHARED_DRIVE + SHARED_FOLDER + 'Fichiers\InraPorc.lic')
137
            if FileExists(TempFolder + '\InraPorc.lic')
138 138
            then
139
              TIdAttachmentFile.Create(MessageParts, SHARED_DRIVE + SHARED_FOLDER + '\Fichiers\InraPorc.lic')
139
              TIdAttachmentFile.Create(MessageParts, TempFolder + '\InraPorc.lic')
140 140
            else
141
              FMenu.MLog.Lines.Add('File Fichiers\InraPorc.lic not found!');
141
              FMenu.MLog.Lines.Add('File InraPorc.lic not found!');
142 142
          end;
143 143
          FMenu.MLog.Lines.Add('SMTP...');
144 144
          try
......
167 167
            // Annulation des modifications
168 168
            Cancel;
169 169
          end;
170
          if not DeleteFile(SHARED_DRIVE + SHARED_FOLDER + 'Fichiers\InraPorc.lic')
170
          if not DeleteFile(TempFolder + '\InraPorc.lic')
171 171
          then
172
            FMenu.MLog.Lines.Add('File Fichiers\InraPorc.lic could not be deleted!');
172
            FMenu.MLog.Lines.Add('File InraPorc.lic could not be deleted!');
173 173
        except
174
          FMenu.MLog.Lines.Add('File Fichiers\InraPorc.lic could not be created!');
174
          FMenu.MLog.Lines.Add('File InraPorc.lic could not be created!');
175 175
        end;
176 176
      end;
177 177
      Next;

Formats disponibles : Unified diff