ProjectProperty.pas 23 KB

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