ProjectProperty.pas 20 KB

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