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

#ifndef IAN00501FH
#define IAN00501FH
//---------------------------------------------------------------------------
#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 "FRAME_ChartF.h"
#include "cxButtons.hpp"
#include "cxCalc.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 "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxSplitter.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "cxLabel.hpp"
#include "dxSkinMcSkin.hpp"

class TIAN00501 : public TForm
{
__published:	// IDE-managed Components
    TADOQuery *ADOQry;
    TTimer *TmrShow;
    TPanel *PnlTop;
    TPanel *PnlList;
    TPanel *PnlChart;
    TcxSplitter *cxSplitter1;
    TLabel *LblSearch;
    TImage *ImgDesc01;
    TLabel *LblRecords;
    TcxButton *BtnExlSave;
    TcxCheckBox *ChkExpand;
    TcxGrid *CxList;
    TcxGridLevel *GlList;
    TFRAMEChart *FRAMEChart1;
    TcxGridBandedTableView *TvList;
    TcxGridBandedColumn *Column01;
    TcxGridBandedColumn *Column02;
    TcxGridBandedColumn *Column03;
    TcxGridBandedColumn *Column04;
    TcxGridBandedColumn *Column05;
    TcxGridBandedColumn *Column06;
    TcxGridBandedColumn *Column07;
    TcxGridBandedColumn *Column08;
    TcxGridBandedColumn *Column09;
    TcxGridBandedColumn *Column10;
    TcxGridBandedColumn *Column11;
    TcxGridBandedColumn *Column12;
    TcxGridBandedColumn *Column13;
    TcxGridBandedColumn *Column14;
    TcxGridBandedColumn *Column15;
    TcxLabel *lblText1;
    TcxLabel *cxLabel1;
    TcxLabel *cxLabel2;
    TcxLabel *cxLabel3;
    TcxLabel *cxLabel4;
    TcxLabel *cxLabel5;
    TcxLabel *cxLabel6;
    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 Column14CustomDrawCell(TcxCustomGridTableView *Sender, TcxCanvas *ACanvas,
          TcxGridTableDataCellViewInfo *AViewInfo, bool &ADone);
private:	// User declarations
    TcxDataController  *m_pGDC;

public:
    HWND    FParent;
    String   FLinkId;
	String   FBaseMon, FDiffMon;
	String   FStTime, FEdTime;
    int      FLinkLevel;
    int      FPatternType;
    String   FPatternWeek;
    String   FWeekName;

public:		// User declarations
    __fastcall TIAN00501(TComponent* Owner, HWND hHandle,
                         String ALinkId, String ABaseMon, String ADiffMon, String AStTime, String AEdTime,
                         int ALinkLevel, int APatternType, String APattrernWeek, String AWeekName);
	__fastcall ~TIAN00501(void);

    void __fastcall OnMessage(TMessage &Msg);

    void __fastcall CommClose();

    void __fastcall FormInit();
    void __fastcall SelHistory();
    void __fastcall DspHistory();
};
//---------------------------------------------------------------------------
extern PACKAGE TIAN00501 *IAN00501;
//---------------------------------------------------------------------------
#endif

