12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- unit stgResultFrm;
- interface
- uses
- stgGatherDm, sdIDTree,
- Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
- Dialogs, JimTabs, JimPages, sdGridDBA, sdGridTreeDBA, ZJGrid, ExtCtrls,
- StdCtrls, dxBar;
- type
- TstgResultForm = class(TForm)
- jpsResult: TJimPages;
- jpsResultErrorDetail: TJimPage;
- jpsResultBillsDetail: TJimPage;
- jtsGatherData: TJimTabSet;
- pnlGatherTree: TPanel;
- zgGatherTree: TZJGrid;
- saGatherTree: TsdGridTreeDBA;
- pnlDetail: TPanel;
- zgBillsDetail: TZJGrid;
- Splitter1: TSplitter;
- sdBillsDetail: TsdGridDBA;
- pnlError: TPanel;
- pnlErrorInfo: TPanel;
- zgErrorInfo: TZJGrid;
- sdErrorInfo: TsdGridDBA;
- pnlResult: TPanel;
- lblResult: TLabel;
- Splitter2: TSplitter;
- pnlErrorDetail: TPanel;
- zgErrorDetail: TZJGrid;
- sdErrorDetail: TsdGridDBA;
- dxpmError: TdxBarPopupMenu;
- dxBarPopupMenu2: TdxBarPopupMenu;
- procedure jtsGatherDataChange(Sender: TObject; NewTab: Integer;
- var AllowChange: Boolean);
- procedure zgGatherTreeCellGetColor(Sender: TObject; ACoord: TPoint;
- var AColor: TColor);
- private
- public
- procedure SetGatherData(AGatherData: TstgGatherData);
- end;
- implementation
- {$R *.dfm}
- procedure TstgResultForm.jtsGatherDataChange(Sender: TObject;
- NewTab: Integer; var AllowChange: Boolean);
- begin
- jpsResult.ActivePageIndex := NewTab;
- end;
- procedure TstgResultForm.SetGatherData(AGatherData: TstgGatherData);
- begin
- saGatherTree.DataView := AGatherData.sdvGatherTree;
- sdBillsDetail.DataView := AGatherData.sdvBillsDetail;
- sdErrorInfo.DataView := AGatherData.sdvSubTenders;
- sdErrorDetail.DataView := AGatherData.sdvErrorDetail;
- end;
- procedure TstgResultForm.zgGatherTreeCellGetColor(Sender: TObject;
- ACoord: TPoint; var AColor: TColor);
- var
- vNode: TsdIDTreeNode;
- begin
- vNode := saGatherTree.IDTree.Items[ACoord.Y - zgGatherTree.FixedRowCount];
- if Assigned(vNode) and vNode.Rec.ValueByName('IsSubTender').AsBoolean then
- AColor := $00D5D5D5;
- end;
- end.
|