ProjectProperty.pas 19 KB

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