ProjectProperty.pas 23 KB

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