stgResultFrm.pas 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. unit stgResultFrm;
  2. interface
  3. uses
  4. stgGatherDm, sdIDTree,
  5. Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  6. Dialogs, JimTabs, JimPages, sdGridDBA, sdGridTreeDBA, ZJGrid, ExtCtrls,
  7. StdCtrls, dxBar;
  8. type
  9. TstgResultForm = class(TForm)
  10. jpsResult: TJimPages;
  11. jpsResultErrorDetail: TJimPage;
  12. jpsResultBillsDetail: TJimPage;
  13. jtsGatherData: TJimTabSet;
  14. pnlGatherTree: TPanel;
  15. zgGatherTree: TZJGrid;
  16. saGatherTree: TsdGridTreeDBA;
  17. pnlDetail: TPanel;
  18. zgBillsDetail: TZJGrid;
  19. Splitter1: TSplitter;
  20. sdBillsDetail: TsdGridDBA;
  21. pnlError: TPanel;
  22. pnlErrorInfo: TPanel;
  23. zgErrorInfo: TZJGrid;
  24. sdErrorInfo: TsdGridDBA;
  25. pnlResult: TPanel;
  26. lblResult: TLabel;
  27. Splitter2: TSplitter;
  28. pnlErrorDetail: TPanel;
  29. zgErrorDetail: TZJGrid;
  30. sdErrorDetail: TsdGridDBA;
  31. dxpmError: TdxBarPopupMenu;
  32. dxBarPopupMenu2: TdxBarPopupMenu;
  33. procedure jtsGatherDataChange(Sender: TObject; NewTab: Integer;
  34. var AllowChange: Boolean);
  35. procedure zgGatherTreeCellGetColor(Sender: TObject; ACoord: TPoint;
  36. var AColor: TColor);
  37. private
  38. public
  39. procedure SetGatherData(AGatherData: TstgGatherData);
  40. end;
  41. implementation
  42. {$R *.dfm}
  43. procedure TstgResultForm.jtsGatherDataChange(Sender: TObject;
  44. NewTab: Integer; var AllowChange: Boolean);
  45. begin
  46. jpsResult.ActivePageIndex := NewTab;
  47. end;
  48. procedure TstgResultForm.SetGatherData(AGatherData: TstgGatherData);
  49. begin
  50. saGatherTree.DataView := AGatherData.sdvGatherTree;
  51. sdBillsDetail.DataView := AGatherData.sdvBillsDetail;
  52. sdErrorInfo.DataView := AGatherData.sdvSubTenders;
  53. sdErrorDetail.DataView := AGatherData.sdvErrorDetail;
  54. end;
  55. procedure TstgResultForm.zgGatherTreeCellGetColor(Sender: TObject;
  56. ACoord: TPoint; var AColor: TColor);
  57. var
  58. vNode: TsdIDTreeNode;
  59. begin
  60. vNode := saGatherTree.IDTree.Items[ACoord.Y - zgGatherTree.FixedRowCount];
  61. if Assigned(vNode) and vNode.Rec.ValueByName('IsSubTender').AsBoolean then
  62. AColor := $00D5D5D5;
  63. end;
  64. end.