//---------------------------------------------------------------------------

#ifndef TAS00701FH
#define TAS00701FH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include <DB.hpp>
#include <DBClient.hpp>
#include <Provider.hpp>
#include <ExtCtrls.hpp>
#include <Graphics.hpp>
#include <Buttons.hpp>
#include <ADODB.hpp>
#include <Menus.hpp>
//---------------------------------------------------------------------------
#include "WindowMsgF.h"
#include "DataTypesF.h"
#include "PlugInChartF.h"
#include "CDSAtrdF.h"
#include "cxButtons.hpp"
#include "cxCheckBox.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridBandedTableView.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxLabel.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxSpinEdit.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "CDSStat0070F.h"

class TTAS00701 : public TForm
{
__published:	// IDE-managed Components
    TADOQuery *ADOQry;
    TTimer *TmrShow;
    TPanel *PnlTop;
    TPanel *PnlList;
    TcxSplitter *cxSplitter1;
    TLabel *LblSearch;
    TImage *ImgDesc01;
    TLabel *LblRecords;
    TcxButton *BtnExlSave;
    TcxGrid *CxList;
    TcxGridLevel *GlList;
    TPanel *PnlChart;
    TcxGridBandedTableView *TvList;
    TcxCheckBox *ChkExpand;
    TcxGridBandedColumn *Col01;
    TcxGridBandedColumn *Col02;
    TcxGridBandedColumn *Col03;
    TcxGridBandedColumn *Col04;
    TcxGridBandedColumn *Col05;
    TcxGridBandedColumn *ColSped;
    TcxGridBandedColumn *TvListColumn7;
    TcxGridBandedColumn *TvListColumn8;
    TcxGridBandedColumn *TvListColumn9;
    TcxGridBandedColumn *TvListColumn10;
    TcxGridBandedColumn *TvListColumn11;
    TcxGridBandedColumn *TvListColumn12;
    TcxGridBandedColumn *TvListColumn13;
    TcxGridBandedColumn *TvListColumn14;
    TcxGridBandedColumn *TvListColumn15;
    TcxGridBandedColumn *TvListColumn16;
    TcxGridBandedColumn *TvListColumn17;
    TcxGridBandedColumn *TvListColumn18;
    TcxGridBandedColumn *TvListColumn19;
    TcxGridBandedColumn *TvListColumn20;
    TcxGridBandedColumn *TvListColumn21;
    TcxGridBandedColumn *TvListColumn22;
    TcxGridBandedColumn *TvListColumn23;
    TcxGridBandedColumn *TvListColumn24;
    TcxGridBandedColumn *TvListColumn25;
    TcxGridBandedColumn *TvListColumn26;
    TcxGridBandedColumn *TvListColumn27;
    TcxGridBandedColumn *TvListColumn28;
    TcxGridBandedColumn *TvListColumn29;
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall ChkExpandClick(TObject *Sender);
    void __fastcall BtnExlSaveClick(TObject *Sender);
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall FormCreate(TObject *Sender);
    void __fastcall ColSpedCustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
          TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
    void __fastcall TvListCustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
    void __fastcall Col01CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas, TcxGridTableDataCellViewInfo *AViewInfo,
          bool &ADone);
    void __fastcall CbOptionPropertiesChange(TObject *Sender);
private:	// User declarations
    TcxDataController  *m_pGDC;

public:
    TPlugInChart    *m_pFrmChart;
    HWND     FParent;

    String   FStDay, FEdDay, FStHour, FEdHour, FWeek, FDir, FAtrdNm;
    int      FTable, FQryType;
    int      FHourSt, FHourEd;

    TStat0070Manager      *FStatManager;
    TStat0070ChartManager *FChartManager;


public:		// User declarations
    __fastcall TTAS00701(TComponent* Owner, HWND hHandle,
                         String AStDay, String AEdDay, String AStHour, String AEdHour, String AWeek, String ADir, String AAtrdNm, int ATable, int AQryType);
	__fastcall ~TTAS00701(void);

    void __fastcall OnMessage(TMessage &Msg);

    void __fastcall CommClose();

    void __fastcall FormInit();
    void __fastcall SelHistory1();
    void __fastcall SelHistory2();

    void __fastcall DspHistory1();
    void __fastcall DspHistory2();
    void __fastcall DrawChart(int ADrawType);
    String __fastcall GetDayWeekCode(String ADay);

};
//---------------------------------------------------------------------------
extern PACKAGE TTAS00701 *TAS00701;
//---------------------------------------------------------------------------
#endif

