ProjectProperty.pas 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702
  1. unit ProjectProperty;
  2. interface
  3. uses
  4. Classes, SysUtils, Variants, DB, ADODB, ZhAPI, CalcDecimal;
  5. type
  6. TPropertyInquiry = class
  7. private
  8. FInquriyQuery: TADOQuery;
  9. FConnection: TADOConnection;
  10. FTableName: string;
  11. FSql: string;
  12. function GetValue(const AName: string): Variant;
  13. procedure SetValue(const AName: string; const Value: Variant);
  14. function GetNewID: Integer;
  15. procedure ExecuteSql(AIsSelect: Boolean = True);
  16. function CheckPropertyExist(const AName: string): Boolean;
  17. public
  18. constructor Create(AConnection: TADOConnection);
  19. destructor Destroy; override;
  20. property TableName: string read FTableName write FTableName;
  21. property Value[const AName: string]: Variant read GetValue write SetValue; default;
  22. end;
  23. TProjProperties = class
  24. private
  25. FProjectData: TObject;
  26. FPropertyInqurity: TPropertyInquiry;
  27. FShowPriceChange: Boolean;
  28. FPhaseCount: Integer;
  29. FLockedLedgerData: Boolean;
  30. FStartedSubsist: Double;
  31. FContractPrice: Double;
  32. FMaterialSubsist: Double;
  33. FBLegal: string;
  34. FDealName: string;
  35. FDealIndex: string;
  36. FCLegal: string;
  37. FCDate: string;
  38. FBName: string;
  39. FProjectName: string;
  40. FBDate: string;
  41. FCName: string;
  42. FSDate: string;
  43. FSName: string;
  44. FSLegal: string;
  45. FLoadLength: Double;
  46. FLaneCount: Integer;
  47. FLoadLevel: Integer;
  48. FEndPeg: string;
  49. FStartPeg: string;
  50. FShowBGLCode: Boolean;
  51. FZJJLPreText: string;
  52. FUnlockInfoPassword: string;
  53. FPhaseIndex: Integer;
  54. FShowDesignQuantity: Boolean;
  55. FDealType: string;
  56. FShowAlias: Boolean;
  57. FDecimalManager: TDecimalManager;
  58. FTotalPriceDigit: Integer;
  59. FTotalPriceFormat: string;
  60. FQuantityDigit: Integer;
  61. FQuantityFormat: string;
  62. FPriceDigit: Integer;
  63. FPriceFormat: string;
  64. FUpdateFlag: Integer;
  65. FPriceMarginStartPhaseID: Integer;
  66. FShowReportShading: Boolean;
  67. FReportShading: string;
  68. FBaseline: string;
  69. FDeadline: string;
  70. function GetBoolPropertyDef(const AName: string; ADef: Boolean): Boolean;
  71. function GetIntPropertyDef(const AName: string; ADef: Integer): Integer;
  72. function GetStrPropertyDef(const AName, ADef: string): string;
  73. function GetFloatPropertyDef(const AName: string; ADef: Double): Double;
  74. function GetDisplayFormat(ADigit: Integer): string;
  75. procedure LoadBaseProperties;
  76. procedure LoadViewProperties;
  77. procedure LoadDealInfo;
  78. procedure LoadTechParameters;
  79. procedure LoadCalcParameters;
  80. procedure LoadDateTime;
  81. procedure SaveDealInfo;
  82. procedure SaveTechParameters;
  83. procedure SaveCalcParameters;
  84. procedure SetShowPriceChange(const Value: Boolean);
  85. procedure SetPhaseCount(const Value: Integer);
  86. procedure SetLockedLedgerData(const Value: Boolean);
  87. function GetFinalAuditCount: Integer;
  88. procedure SetFinalAuditCount(const Value: Integer);
  89. function GetAuditStatus: Integer;
  90. procedure SetAuditStatus(const Value: Integer);
  91. function GetAuditStatusStr: string;
  92. procedure SetContractPrice(const Value: Double);
  93. procedure SetMaterialSubsist(const Value: Double);
  94. procedure SetStartedSubsist(const Value: Double);
  95. function GetAuditCompany: string;
  96. procedure SetAuditCompany(const Value: string);
  97. procedure SetShowBGLCode(const Value: Boolean);
  98. procedure SetZJJLPreText(const Value: string);
  99. procedure SetUnlockInfoPassword(const Value: string);
  100. procedure SetPhaseIndex(const Value: Integer);
  101. procedure SetShowDesignQuantity(const Value: Boolean);
  102. procedure SetShowAlias(const Value: Boolean);
  103. procedure SetQuantityDigit(const Value: Integer);
  104. procedure SetTotalPriceDigit(const Value: Integer);
  105. procedure SetUpdateFlag(const Value: Integer);
  106. procedure SetReportShading(const Value: string);
  107. procedure SetShowReportShading(const Value: Boolean);
  108. procedure SetBaseline(const Value: string);
  109. procedure SetDeadline(const Value: string);
  110. public
  111. constructor Create(AProjectData: TObject);
  112. destructor Destroy; override;
  113. procedure Open(AConnection: TADOConnection);
  114. procedure Save;
  115. procedure Reload;
  116. {Submit-Audit-Reply}
  117. // 共计终审计量期数
  118. property FinalAuditCount: Integer read GetFinalAuditCount write SetFinalAuditCount;
  119. // 当前审核状态
  120. property AuditStatus: Integer read GetAuditStatus write SetAuditStatus;
  121. property AuditStatusStr: string read GetAuditStatusStr;
  122. property AuditCompany: string read GetAuditCompany write SetAuditCompany;
  123. {合同信息}
  124. // 建设项目名称
  125. property ProjectName: string read FProjectName write FProjectName;
  126. // 合同名称
  127. property DealName: string read FDealName write FDealName;
  128. // 合同编号
  129. property DealIndex: string read FDealIndex write FDealIndex;
  130. // 合同类别
  131. property DealType: string read FDealType write FDealType;
  132. // 建设单位
  133. // 名称
  134. property BName: string read FBName write FBName;
  135. // 法人代表
  136. property BLegal: string read FBLegal write FBLegal;
  137. // 签订日期
  138. property BDate: string read FBDate write FBDate;
  139. // 施工单位
  140. // 名称
  141. property CName: string read FCName write FCName;
  142. // 法人代表
  143. property CLegal: string read FCLegal write FCLegal;
  144. // 签订日期
  145. property CDate: string read FCDate write FCDate;
  146. // 监理单位
  147. // 名称
  148. property SName: string read FSName write FSName;
  149. // 法人代表
  150. property SLegal: string read FSLegal write FSLegal;
  151. // 签订日期
  152. property SDate: string read FSDate write FSDate;
  153. {技术参数}
  154. // 公路等级
  155. property LoadLevel: Integer read FLoadLevel write FLoadLevel;
  156. // 起点桩号
  157. property StartPeg: string read FStartPeg write FStartPeg;
  158. // 终点桩号
  159. property EndPeg: string read FEndPeg write FEndPeg;
  160. // 长度
  161. property LoadLength: Double read FLoadLength write FLoadLength;
  162. // 车道数
  163. property LaneCount: Integer read FLaneCount write FLaneCount;
  164. {合同支付}
  165. property ContractPrice: Double read FContractPrice write SetContractPrice;
  166. property MaterialSubsist: Double read FMaterialSubsist write SetMaterialSubsist;
  167. property StartedSubsisit: Double read FStartedSubsist write SetStartedSubsist;
  168. {密码}
  169. // 解锁台账编辑节点密码
  170. property UnlockInfoPassword: string read FUnlockInfoPassword write SetUnlockInfoPassword;
  171. {小数位数}
  172. property DecimalManager: TDecimalManager read FDecimalManager;
  173. // 数量
  174. property QuantityDigit: Integer read FQuantityDigit write SetQuantityDigit;
  175. property QuantityFormat: string read FQuantityFormat;
  176. // 金额
  177. property TotalPriceDigit: Integer read FTotalPriceDigit write SetTotalPriceDigit;
  178. property TotalPriceFormat: string read FTotalPriceFormat;
  179. // 单价
  180. property PriceDigit: Integer read FPriceDigit;
  181. property PriceFormat: string read FPriceFormat;
  182. {时间}
  183. // 起始时间
  184. property Baseline: string read FBaseline write SetBaseline;
  185. // 结束时间
  186. property Deadline: string read FDeadline write SetDeadline;
  187. {升级标记}
  188. property UpdateFlag: Integer read FUpdateFlag write SetUpdateFlag;
  189. {Base}
  190. // 计量期数
  191. property PhaseIndex: Integer read FPhaseIndex write SetPhaseIndex;
  192. property PhaseCount: Integer read FPhaseCount write SetPhaseCount;
  193. property ZJJLPreText: string read FZJJLPreText write SetZJJLPreText;
  194. {View}
  195. // Can Modify In ProjectPropertiesFrm
  196. property ShowPriceChange: Boolean read FShowPriceChange write SetShowPriceChange;
  197. property ShowBGLCode: Boolean read FShowBGLCode write SetShowBGLCode;
  198. property ShowDesignQuantity: Boolean read FShowDesignQuantity write SetShowDesignQuantity;
  199. property ShowAlias: Boolean read FShowAlias write SetShowAlias;
  200. property ShowReportShading: Boolean read FShowReportShading write SetShowReportShading;
  201. property ReportShading: string read FReportShading write SetReportShading;
  202. end;
  203. implementation
  204. { TPropertyInquiry }
  205. function TPropertyInquiry.CheckPropertyExist(const AName: string): Boolean;
  206. begin
  207. Result := False;
  208. FSql := Format('Select * From %s Where Name = ''%s''', [TableName, UpperCase(AName)]);
  209. ExecuteSql;
  210. Result := FInquriyQuery.RecordCount > 0;
  211. FInquriyQuery.Close;
  212. end;
  213. constructor TPropertyInquiry.Create(AConnection: TADOConnection);
  214. begin
  215. FConnection := AConnection;
  216. FInquriyQuery := TADOQuery.Create(nil);
  217. FInquriyQuery.Connection := FConnection;
  218. end;
  219. destructor TPropertyInquiry.Destroy;
  220. begin
  221. FInquriyQuery.Free;
  222. inherited;
  223. end;
  224. procedure TPropertyInquiry.ExecuteSql(AIsSelect: Boolean);
  225. begin
  226. FInquriyQuery.Close;
  227. FInquriyQuery.SQL.Clear;
  228. FInquriyQuery.SQL.Add(FSql);
  229. if AIsSelect then
  230. FInquriyQuery.Open
  231. else
  232. FInquriyQuery.ExecSQL;
  233. end;
  234. function TPropertyInquiry.GetNewID: Integer;
  235. begin
  236. FSql := Format('Select Max(ID) As MaxID From %s', [TableName]);
  237. ExecuteSql;
  238. if FInquriyQuery.RecordCount > 0 then
  239. Result := FInquriyQuery.FieldByName('MaxID').AsInteger + 1
  240. else
  241. Result := 0;
  242. FInquriyQuery.Close;
  243. end;
  244. function TPropertyInquiry.GetValue(const AName: string): Variant;
  245. begin
  246. FSql := Format('Select * From %s Where Name = ''%s''', [TableName, UpperCase(AName)]);
  247. ExecuteSql;
  248. if FInquriyQuery.RecordCount > 0 then
  249. Result := FInquriyQuery.FieldByName('PropValue').AsVariant
  250. else
  251. Result := Null;
  252. FInquriyQuery.Close;
  253. end;
  254. procedure TPropertyInquiry.SetValue(const AName: string;
  255. const Value: Variant);
  256. function GetUpdateSql: string;
  257. begin
  258. if VarIsNull(Value) then
  259. Result := Format('Delete From %s Where Name = ''%s''', [TableName, UpperCase(AName)])
  260. else
  261. begin
  262. if CheckPropertyExist(AName) then
  263. Result := Format('Update %s Set PropValue = ''%s'' Where Name = ''%s''',
  264. [TableName, VarToStr(Value), UpperCase(AName)])
  265. else
  266. Result := Format('Insert Into %s (ID, Name, PropValue) Values (%d, ''%s'', ''%s'')',
  267. [TableName, GetNewID, UpperCase(AName), VarToStr(Value)]);
  268. end;
  269. end;
  270. begin
  271. FSql := GetUpdateSql;
  272. ExecuteSql(False);
  273. FInquriyQuery.Close;
  274. end;
  275. { TProjProperties }
  276. constructor TProjProperties.Create(AProjectData: TObject);
  277. begin
  278. FProjectData := AProjectData;
  279. FDecimalManager := TDecimalManager.Create(AProjectData);
  280. end;
  281. destructor TProjProperties.Destroy;
  282. begin
  283. FPropertyInqurity.Free;
  284. FDecimalManager.Free;
  285. inherited;
  286. end;
  287. function TProjProperties.GetAuditCompany: string;
  288. begin
  289. Result := GetStrPropertyDef('AuditCompany', '');
  290. end;
  291. function TProjProperties.GetAuditStatus: Integer;
  292. begin
  293. Result := GetIntPropertyDef('AuditStatus', -1);
  294. end;
  295. function TProjProperties.GetAuditStatusStr: string;
  296. begin
  297. case AuditStatus of
  298. -1:
  299. if PhaseCount = 0 then
  300. Result := '原报'
  301. else
  302. Result := '批复';
  303. 0:
  304. Result := '原报';
  305. else
  306. Result := Format('%d 审', [AuditStatus]);
  307. end;
  308. end;
  309. function TProjProperties.GetBoolPropertyDef(const AName: string;
  310. ADef: Boolean): Boolean;
  311. var
  312. vProperty: Variant;
  313. begin
  314. vProperty := FPropertyInqurity.Value[AName];
  315. if VarIsNull(vProperty) then
  316. Result := ADef
  317. else
  318. Result := Boolean(vProperty);
  319. end;
  320. function TProjProperties.GetDisplayFormat(ADigit: Integer): string;
  321. begin
  322. case ADigit of
  323. 0: Result := '0';
  324. 1: Result := '0.#';
  325. 2: Result := '0.##';
  326. 3: Result := '0.###';
  327. 4: Result := '0.####';
  328. 5: Result := '0.#####';
  329. 6: Result := '0.######';
  330. 7: Result := '0.#######';
  331. 8: Result := '0.########';
  332. 9: Result := '0.#########';
  333. else
  334. Result := '0.##########';
  335. end;
  336. end;
  337. function TProjProperties.GetFinalAuditCount: Integer;
  338. begin
  339. Result := GetIntPropertyDef('FinalAuditCount', 0);
  340. end;
  341. function TProjProperties.GetFloatPropertyDef(const AName: string;
  342. ADef: Double): Double;
  343. var
  344. sValue: Variant;
  345. begin
  346. sValue := GetStrPropertyDef(AName, FloatToStr(ADef));
  347. Result := StrToFloatDef(sValue, ADef);
  348. end;
  349. function TProjProperties.GetIntPropertyDef(const AName: string;
  350. ADef: Integer): Integer;
  351. var
  352. sValue: Variant;
  353. begin
  354. sValue := GetStrPropertyDef(AName, IntToStr(ADef));
  355. Result := StrToIntDef(sValue, ADef);
  356. end;
  357. function TProjProperties.GetStrPropertyDef(const AName,
  358. ADef: string): string;
  359. var
  360. vProperty: Variant;
  361. begin
  362. vProperty := FPropertyInqurity.Value[AName];
  363. Result := VarToStrDef(vProperty, ADef);
  364. end;
  365. procedure TProjProperties.LoadBaseProperties;
  366. begin
  367. FPhaseCount := GetIntPropertyDef('PhaseCount', 0);
  368. FLockedLedgerData := GetBoolPropertyDef('LockedLedgerData', False);
  369. FContractPrice := GetFloatPropertyDef('ContractPrice', 0);
  370. FStartedSubsist := GetFloatPropertyDef('StartedSubsist', 0);
  371. FMaterialSubsist := GetFloatPropertyDef('MaterialSubsist', 0);
  372. FZJJLPreText := GetStrPropertyDef('ZJJLPreText', '');
  373. end;
  374. procedure TProjProperties.LoadCalcParameters;
  375. begin
  376. FQuantityDigit := GetIntPropertyDef('QuantityDigit', 3);
  377. FQuantityFormat := GetDisplayFormat(FQuantityDigit);
  378. FTotalPriceDigit := GetIntPropertyDef('TotalPriceDigit', 0);
  379. FTotalPriceFormat := GetDisplayFormat(FTotalPriceDigit);
  380. FPriceDigit := 2;
  381. FPriceFormat := GetDisplayFormat(FPriceDigit);
  382. with FDecimalManager.Common do
  383. begin
  384. Quantity.Digit := GetIntPropertyDef('QuantityDigit', 3);
  385. TotalPrice.Digit := GetIntPropertyDef('TotalPriceDigit', 0);
  386. Price.Digit := 2;
  387. end;
  388. with FDecimalManager do
  389. begin
  390. Compile.Quantity.Digit := GetIntPropertyDef('QuantityDigit1', Common.Quantity.Digit);
  391. Compile.TotalPrice.Digit := GetIntPropertyDef('TotalPriceDigit1', Common.TotalPrice.Digit);
  392. Compile.Price.Digit := 2;
  393. end;
  394. with FDecimalManager do
  395. begin
  396. PriceMargin.Quantity.Digit := Common.Quantity.Digit;
  397. PriceMargin.TotalPrice.Digit := Common.TotalPrice.Digit;
  398. PriceMargin.Price.Digit := 3;//GetIntPropertyDef('PM_PriceDigit', Common.Price.Digit);
  399. end;
  400. end;
  401. procedure TProjProperties.LoadDateTime;
  402. begin
  403. FBaseline := GetStrPropertyDef('Baseline', '');
  404. FDeadline := GetStrPropertyDef('Deadline', '');
  405. end;
  406. procedure TProjProperties.LoadDealInfo;
  407. begin
  408. FProjectName := GetStrPropertyDef('ProjectName', '');
  409. FDealName := GetStrPropertyDef('DealName', '');
  410. FDealIndex := GetStrPropertyDef('DealIndex', '');
  411. FDealType := GetStrPropertyDef('DealType', '');
  412. FBName := GetStrPropertyDef('BName', '');
  413. FBLegal := GetStrPropertyDef('BLegal', '');
  414. FBDate := GetStrPropertyDef('BDate', '');
  415. FCName := GetStrPropertyDef('CName', '');
  416. FCLegal := GetStrPropertyDef('CLegal', '');
  417. FCDate := GetStrPropertyDef('CDate', '');
  418. FSName := GetStrPropertyDef('SName', '');
  419. FSLegal := GetStrPropertyDef('SLegal', '');
  420. FSDate := GetStrPropertyDef('SDate', '');
  421. end;
  422. procedure TProjProperties.LoadTechParameters;
  423. begin
  424. FLoadLevel := GetIntPropertyDef('LoadLevel', 0);
  425. FStartPeg := GetStrPropertyDef('StartPeg', '');
  426. FEndPeg := GetStrPropertyDef('EndPeg', '');
  427. FLoadLength := GetFloatPropertyDef('LoadLength', 0);
  428. FLaneCount := GetIntPropertyDef('LaneCount', 0);
  429. end;
  430. procedure TProjProperties.LoadViewProperties;
  431. begin
  432. FShowPriceChange := GetBoolPropertyDef('ShowPriceChange', False);
  433. FShowBGLCode := GetBoolPropertyDef('ShowBGLCode', True);
  434. FShowDesignQuantity := GetBoolPropertyDef('ShowDesignQuantity', False);
  435. FShowAlias := GetBoolPropertyDef('ShowAlias', False);
  436. FShowReportShading := GetBoolPropertyDef('ShowReportShading', False);
  437. FReportShading := GetStrPropertyDef('ReportShading', '');
  438. end;
  439. procedure TProjProperties.Open(AConnection: TADOConnection);
  440. begin
  441. FPropertyInqurity := TPropertyInquiry.Create(AConnection);
  442. FPropertyInqurity.TableName := 'ProjProperties';
  443. LoadBaseProperties;
  444. LoadViewProperties;
  445. LoadDealInfo;
  446. LoadTechParameters;
  447. LoadCalcParameters;
  448. FUnlockInfoPassword := GetStrPropertyDef('UnlockInfoPassword', '');
  449. FUpdateFlag := GetIntPropertyDef('UpdateFlag', 0);
  450. end;
  451. procedure TProjProperties.Reload;
  452. begin
  453. LoadBaseProperties;
  454. LoadViewProperties;
  455. LoadDealInfo;
  456. LoadTechParameters;
  457. LoadCalcParameters;
  458. FUnlockInfoPassword := GetStrPropertyDef('UnlockInfoPassword', '');
  459. end;
  460. procedure TProjProperties.Save;
  461. begin
  462. SaveDealInfo;
  463. SaveTechParameters;
  464. SaveCalcParameters;
  465. end;
  466. procedure TProjProperties.SaveCalcParameters;
  467. begin
  468. with FDecimalManager do
  469. begin
  470. {FPropertyInqurity.Value['QuantityDigit'] := Common.Quantity.Digit;
  471. FPropertyInqurity.Value['TotalPriceDigit'] := Common.TotalPrice.Digit;
  472. FPropertyInqurity.Value['QuantityDigit1'] := Compile.Quantity.Digit;
  473. FPropertyInqurity.Value['TotalPriceDigit1'] := Compile.TotalPrice.Digit;}
  474. //FPropertyInqurity.Value['PM_PriceDigit'] := PriceMargin.Price.Digit;
  475. end;
  476. end;
  477. procedure TProjProperties.SaveDealInfo;
  478. begin
  479. FPropertyInqurity.Value['ProjectName'] := FProjectName;
  480. FPropertyInqurity.Value['DealName'] := FDealName;
  481. FPropertyInqurity.Value['DealIndex'] := FDealIndex;
  482. FPropertyInqurity.Value['DealType'] := FDealType;
  483. FPropertyInqurity.Value['BName'] := FBName;
  484. FPropertyInqurity.Value['BLegal'] := FBLegal;
  485. FPropertyInqurity.Value['BDate'] := FBDate;
  486. FPropertyInqurity.Value['CName'] := FCName;
  487. FPropertyInqurity.Value['CLegal'] := FCLegal;
  488. FPropertyInqurity.Value['CDate'] := FCDate;
  489. FPropertyInqurity.Value['SName'] := FSName;
  490. FPropertyInqurity.Value['SLegal'] := FSLegal;
  491. FPropertyInqurity.Value['SDate'] := FSDate;
  492. end;
  493. procedure TProjProperties.SaveTechParameters;
  494. begin
  495. FPropertyInqurity.Value['LoadLevel'] := FLoadLevel;
  496. FPropertyInqurity.Value['StartPeg'] := FStartPeg;
  497. FPropertyInqurity.Value['EndPeg'] := FEndPeg;
  498. FPropertyInqurity.Value['LoadLength'] := FLoadLength;
  499. FPropertyInqurity.Value['LaneCount'] := FLaneCount;
  500. end;
  501. procedure TProjProperties.SetAuditCompany(const Value: string);
  502. begin
  503. FPropertyInqurity.Value['AuditCompany'] := Value;
  504. end;
  505. procedure TProjProperties.SetAuditStatus(const Value: Integer);
  506. begin
  507. FPropertyInqurity.Value['AuditStatus'] := Value;
  508. end;
  509. procedure TProjProperties.SetBaseline(const Value: string);
  510. begin
  511. FBaseline := Value;
  512. FPropertyInqurity.Value['Baseline'] := Value;
  513. end;
  514. procedure TProjProperties.SetContractPrice(const Value: Double);
  515. begin
  516. FContractPrice := Value;
  517. FPropertyInqurity.Value['ContractPrice'] := Value;
  518. end;
  519. procedure TProjProperties.SetDeadline(const Value: string);
  520. begin
  521. FDeadline := Value;
  522. FPropertyInqurity.Value['Deadline'] := Value;
  523. end;
  524. procedure TProjProperties.SetFinalAuditCount(const Value: Integer);
  525. begin
  526. FPropertyInqurity.Value['FinalAuditCount'] := Value;
  527. end;
  528. procedure TProjProperties.SetLockedLedgerData(const Value: Boolean);
  529. begin
  530. FLockedLedgerData := Value;
  531. FPropertyInqurity.Value['LockedLedgerData'] := Value;
  532. end;
  533. procedure TProjProperties.SetMaterialSubsist(const Value: Double);
  534. begin
  535. FMaterialSubsist := Value;
  536. FPropertyInqurity.Value['MaterialSubsist'] := Value;
  537. end;
  538. procedure TProjProperties.SetPhaseCount(const Value: Integer);
  539. begin
  540. FPhaseCount := Value;
  541. FPropertyInqurity.Value['PhaseCount'] := Value;
  542. end;
  543. procedure TProjProperties.SetPhaseIndex(const Value: Integer);
  544. begin
  545. FPhaseIndex := Value;
  546. FPropertyInqurity.Value['PhaseIndex'] := Value;
  547. end;
  548. procedure TProjProperties.SetQuantityDigit(const Value: Integer);
  549. begin
  550. FQuantityDigit := Value;
  551. FPropertyInqurity.Value['QuantityDigit'] := Value;
  552. FQuantityFormat := GetDisplayFormat(FQuantityDigit);
  553. end;
  554. procedure TProjProperties.SetReportShading(const Value: string);
  555. begin
  556. FReportShading := Value;
  557. FPropertyInqurity.Value['ReportShading'] := Value;
  558. end;
  559. procedure TProjProperties.SetShowAlias(const Value: Boolean);
  560. begin
  561. FShowAlias := Value;
  562. FPropertyInqurity.Value['ShowAlias'] := Value;
  563. end;
  564. procedure TProjProperties.SetShowBGLCode(const Value: Boolean);
  565. begin
  566. FShowBGLCode := Value;
  567. FPropertyInqurity.Value['ShowBGLCode'] := Value;
  568. end;
  569. procedure TProjProperties.SetShowDesignQuantity(const Value: Boolean);
  570. begin
  571. FShowDesignQuantity := Value;
  572. FPropertyInqurity.Value['ShowDesignQuantity'] := Value;
  573. end;
  574. procedure TProjProperties.SetShowPriceChange(const Value: Boolean);
  575. begin
  576. FShowPriceChange := Value;
  577. FPropertyInqurity.Value['ShowPriceChange'] := Value;
  578. end;
  579. procedure TProjProperties.SetShowReportShading(const Value: Boolean);
  580. begin
  581. FShowReportShading := Value;
  582. FPropertyInqurity.Value['ShowReportShading'] := Value;
  583. end;
  584. procedure TProjProperties.SetStartedSubsist(const Value: Double);
  585. begin
  586. FStartedSubsist := Value;
  587. FPropertyInqurity.Value['StartedSubsist'] := Value;
  588. end;
  589. procedure TProjProperties.SetTotalPriceDigit(const Value: Integer);
  590. begin
  591. FTotalPriceDigit := Value;
  592. FPropertyInqurity.Value['TotalPriceDigit'] := Value;
  593. FTotalPriceFormat := GetDisplayFormat(FTotalPriceDigit);
  594. end;
  595. procedure TProjProperties.SetUnlockInfoPassword(const Value: string);
  596. begin
  597. FUnlockInfoPassword := Value;
  598. FPropertyInqurity.Value['UnlockInfoPassword'] := Value;
  599. end;
  600. procedure TProjProperties.SetUpdateFlag(const Value: Integer);
  601. begin
  602. FUpdateFlag := Value;
  603. FPropertyInqurity.Value['UpdateFlag'] := Value;
  604. end;
  605. procedure TProjProperties.SetZJJLPreText(const Value: string);
  606. begin
  607. FZJJLPreText := Value;
  608. FPropertyInqurity.Value['ZJJLPreText'] := Value;
  609. end;
  610. end.