|
@@ -16,6 +16,8 @@ type
|
|
AValue: TsdValue; AColumn: TsdViewColumn; var Allow: Boolean);
|
|
AValue: TsdValue; AColumn: TsdViewColumn; var Allow: Boolean);
|
|
procedure sdvOnceGetText(var Text: String; ARecord: TsdDataRecord;
|
|
procedure sdvOnceGetText(var Text: String; ARecord: TsdDataRecord;
|
|
AValue: TsdValue; AColumn: TsdViewColumn; DisplayText: Boolean);
|
|
AValue: TsdValue; AColumn: TsdViewColumn; DisplayText: Boolean);
|
|
|
|
+ procedure sddOnceBeforeDeleteRecord(ARecord: TsdDataRecord;
|
|
|
|
+ var Allow: Boolean);
|
|
private
|
|
private
|
|
FProjectData: TObject;
|
|
FProjectData: TObject;
|
|
|
|
|
|
@@ -163,4 +165,12 @@ begin
|
|
Result := TProjectData(FProjectData).ProjProperties.DecimalManager.Common;
|
|
Result := TProjectData(FProjectData).ProjProperties.DecimalManager.Common;
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
+procedure TOtherMeasureOnceData.sddOnceBeforeDeleteRecord(
|
|
|
|
+ ARecord: TsdDataRecord; var Allow: Boolean);
|
|
|
|
+begin
|
|
|
|
+ if (ARecord.ValueByName('TotalPrice').AsFloat <> 0) and
|
|
|
|
+ (ARecord.ValueByName('CreatePhaseID').AsInteger < TProjectData(FProjectData).ProjProperties.PhaseCount) then
|
|
|
|
+ DataSetErrorMessage(Allow, '往期已计量,不允许删除');
|
|
|
|
+end;
|
|
|
|
+
|
|
end.
|
|
end.
|