|
@@ -53,7 +53,6 @@ type
|
|
|
cdsBGLPos_Reason: TMemoField;
|
|
|
cdsBGLDirection: TMemoField;
|
|
|
cdsBGLDrawingCode: TWideStringField;
|
|
|
- cdsBGLLocked: TBooleanField;
|
|
|
cdsBGLApprovalCode: TWideStringField;
|
|
|
cdsBGLCreatePhaseID: TIntegerField;
|
|
|
cdsBGLExecutionRate: TFloatField;
|
|
@@ -66,7 +65,6 @@ type
|
|
|
cdsBGLViewPos_Reason: TMemoField;
|
|
|
cdsBGLViewDirection: TMemoField;
|
|
|
cdsBGLViewDrawingCode: TWideStringField;
|
|
|
- cdsBGLViewLocked: TBooleanField;
|
|
|
cdsBGLViewApprovalCode: TWideStringField;
|
|
|
cdsBGLViewCreatePhaseID: TIntegerField;
|
|
|
cdsBGLViewExecutionRate: TFloatField;
|
|
@@ -85,7 +83,6 @@ type
|
|
|
cdsBGBillsQuantity: TFloatField;
|
|
|
cdsBGBillsTotalPrice: TFloatField;
|
|
|
cdsBGBillsUsedQuantity: TFloatField;
|
|
|
- cdsBGBillsLocked: TBooleanField;
|
|
|
|
|
|
cdsBGBillsView: TClientDataSet;
|
|
|
cdsBGBillsViewID: TIntegerField;
|
|
@@ -97,7 +94,6 @@ type
|
|
|
cdsBGBillsViewQuantity: TFloatField;
|
|
|
cdsBGBillsViewTotalPrice: TFloatField;
|
|
|
cdsBGBillsViewUsedQuantity: TFloatField;
|
|
|
- cdsBGBillsViewLocked: TBooleanField;
|
|
|
cdsBGLBGLType: TWideStringField;
|
|
|
cdsBGLViewBGLType: TWideStringField;
|
|
|
procedure cdsBGBillsViewAfterInsert(DataSet: TDataSet);
|
|
@@ -130,9 +126,6 @@ type
|
|
|
|
|
|
function LocateBGL(const ACode: string): Boolean;
|
|
|
function LocateBGBills(ABGID: Integer; const AB_Code: string): Boolean;
|
|
|
-
|
|
|
- procedure LockAllBGL;
|
|
|
- procedure LockAllBGBills;
|
|
|
public
|
|
|
constructor Create(AProjectData: TObject);
|
|
|
destructor Destroy; override;
|
|
@@ -148,8 +141,6 @@ type
|
|
|
|
|
|
procedure BatchWritePos_Reason;
|
|
|
|
|
|
- procedure LockAll;
|
|
|
-
|
|
|
property ProjectData: TObject read FProjectData;
|
|
|
end;
|
|
|
|
|
@@ -412,16 +403,12 @@ begin
|
|
|
(cdsBGBillsViewUnits.Tag = 1) or
|
|
|
(cdsBGBillsViewPrice.Tag = 1) then
|
|
|
begin
|
|
|
- if cdsBGBillsViewLocked.AsBoolean then
|
|
|
- DisplayErrorMessage('变更清单已被锁定,不可修改!');
|
|
|
if cdsBGBillsViewUsedQuantity.AsFloat <> 0 then
|
|
|
DisplayErrorMessage('变更令已被应用至清单,不可修改!');
|
|
|
end;
|
|
|
|
|
|
if (cdsBGBillsViewQuantity.Tag = 1) then
|
|
|
begin
|
|
|
- if cdsBGBillsViewLocked.AsBoolean then
|
|
|
- DisplayErrorMessage('变更清单已被锁定,不可修改!');
|
|
|
if (cdsBGBillsViewUsedQuantity.AsFloat <> 0) and
|
|
|
(cdsBGBillsViewQuantity.AsFloat < cdsBGBillsViewUsedQuantity.AsFloat) then
|
|
|
DisplayErrorMessage('变更清单的清单数量应大于已变更数量!');
|
|
@@ -451,11 +438,6 @@ begin
|
|
|
begin
|
|
|
cdsBGLViewCode.Tag := 0;
|
|
|
|
|
|
- if cdsBGLViewLocked.AsBoolean then
|
|
|
- begin
|
|
|
- ErrorMessage('当前变更令已锁定,不可修改!');
|
|
|
- Abort;
|
|
|
- end;
|
|
|
if CheckBGLUsed(cdsBGLViewID.AsInteger) then
|
|
|
begin
|
|
|
ErrorMessage('当前变更令下变更清单已被应用到清单,不可修改!');
|
|
@@ -499,8 +481,6 @@ end;
|
|
|
|
|
|
procedure TBGLData.cdsBGLViewBeforeDelete(DataSet: TDataSet);
|
|
|
begin
|
|
|
- if cdsBGLViewLocked.AsBoolean then
|
|
|
- raise Exception.Create('变更令已被锁定,不可删除!');
|
|
|
if CheckBGLUsed(cdsBGLViewID.AsInteger) then
|
|
|
raise Exception.Create('变更令下变更清单已被应用到清单,不可删除!');
|
|
|
DeleteBGBills(cdsBGLViewID.AsInteger);
|
|
@@ -526,8 +506,6 @@ end;
|
|
|
|
|
|
procedure TBGLData.cdsBGBillsViewBeforeDelete(DataSet: TDataSet);
|
|
|
begin
|
|
|
- if cdsBGBillsViewLocked.AsBoolean then
|
|
|
- raise Exception.Create('变更清单已被锁定,不可删除!');
|
|
|
if cdsBGBillsViewUsedQuantity.AsFloat <> 0 then
|
|
|
raise Exception.Create('变更清单已被应用至清单,不可删除!');
|
|
|
end;
|
|
@@ -549,36 +527,6 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
-procedure TBGLData.LockAll;
|
|
|
-begin
|
|
|
- LockAllBGL;
|
|
|
- LockAllBGBills;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TBGLData.LockAllBGBills;
|
|
|
-begin
|
|
|
- cdsBGBills.First;
|
|
|
- while not cdsBGBills.Eof do
|
|
|
- begin
|
|
|
- cdsBGBills.Edit;
|
|
|
- cdsBGBillsLocked.AsBoolean := True;
|
|
|
- cdsBGBills.Post;
|
|
|
- cdsBGBills.Next;
|
|
|
- end;
|
|
|
-end;
|
|
|
-
|
|
|
-procedure TBGLData.LockAllBGL;
|
|
|
-begin
|
|
|
- cdsBGL.First;
|
|
|
- while not cdsBGL.Eof do
|
|
|
- begin
|
|
|
- cdsBGL.Edit;
|
|
|
- cdsBGLLocked.AsBoolean := True;
|
|
|
- cdsBGL.Post;
|
|
|
- cdsBGL.Next;
|
|
|
- end;
|
|
|
-end;
|
|
|
-
|
|
|
procedure TBGLData.cdsBGBillsViewAfterDelete(DataSet: TDataSet);
|
|
|
begin
|
|
|
GatherBGLTotalPrice(cdsBGLViewID.AsInteger);
|