|
@@ -1183,12 +1183,12 @@ procedure TProjectData.ImportCloudTenderFile(const AFileName: string);
|
|
|
const
|
|
|
sBillsSql = 'Insert Into Bills (ID, ParentID, NextSiblingID,' +
|
|
|
' Code, B_Code, Name, Units, Alias, Price, NewPrice,' +
|
|
|
- ' OrgQuantity, OrgTotalPrice,' +
|
|
|
+ ' OrgQuantity, OrgTotalPrice, MisQuantity, MisTotalPrice, OthQuantity, OthTotalPrice,' +
|
|
|
' DgnQuantity1, DgnQuantity2,'+
|
|
|
' Peg, DrawingCode, MemoStr, HasBookMark, MarkMemo)'+
|
|
|
' Select ID, ParentID, NextSiblingID,'+
|
|
|
' Code, B_Code, Name, Units, Alias, Price, NewPrice,' +
|
|
|
- ' OrgQuantity, OrgTotalPrice,' +
|
|
|
+ ' OrgQuantity, OrgTotalPrice, MisQuantity, MisTotalPrice, OthQuantity, OthTotalPrice,' +
|
|
|
' DgnQuantity1, DgnQuantity2,'+
|
|
|
' Peg, DrawingCode, MemoStr, HasBookMark, MarkMemo'+
|
|
|
' From Bills In ''%s''';
|
|
@@ -1272,10 +1272,28 @@ procedure TProjectData.ImportCloudTenderFile(const AFileName: string);
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+ procedure UpdateSourceFile(const AFileName: string);
|
|
|
+ var
|
|
|
+ vCon: TADOConnection;
|
|
|
+ vUpdate: TUpdateProjectDB;
|
|
|
+ begin
|
|
|
+ vCon := TADOConnection.Create(nil);
|
|
|
+ vCon.LoginPrompt := False;
|
|
|
+ try
|
|
|
+ vCon.ConnectionString := Format(SAdoConnectStr, [AFileName]);
|
|
|
+ vUpdate := TUpdateProjectDB.Create;
|
|
|
+ vUpdate.ForceUpdate(vCon);
|
|
|
+ finally
|
|
|
+ vUpdate.Free;
|
|
|
+ vCon.Free;
|
|
|
+ end;
|
|
|
+ end;
|
|
|
+
|
|
|
var
|
|
|
sTemMainFile: string;
|
|
|
begin
|
|
|
sTemMainFile := CreateTempSourceFile;
|
|
|
+ UpdateSourceFile(sTemMainFile);
|
|
|
BeforeCopyData;
|
|
|
try
|
|
|
ClearAllData;
|