ProjectProperty.pas 22 KB

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