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

#ifndef SMS00201FH
#define SMS00201FH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
//---------------------------------------------------------------------------
#include "DataTypesF.h"
#include <ExtCtrls.hpp>
#include "cxButtons.hpp"
#include "cxCalc.hpp"
#include "cxClasses.hpp"
#include "cxContainer.hpp"
#include "cxControls.hpp"
#include "cxCustomData.hpp"
#include "cxData.hpp"
#include "cxDataStorage.hpp"
#include "cxDropDownEdit.hpp"
#include "cxEdit.hpp"
#include "cxFilter.hpp"
#include "cxGraphics.hpp"
#include "cxGrid.hpp"
#include "cxGridCustomTableView.hpp"
#include "cxGridCustomView.hpp"
#include "cxGridLevel.hpp"
#include "cxGridTableView.hpp"
#include "cxGroupBox.hpp"
#include "cxLookAndFeelPainters.hpp"
#include "cxLookAndFeels.hpp"
#include "cxMaskEdit.hpp"
#include "cxStyles.hpp"
#include "cxTextEdit.hpp"
#include "dxSkinBlack.hpp"
#include "dxSkinBlue.hpp"
#include "dxSkinCaramel.hpp"
#include "dxSkinCoffee.hpp"
#include "dxSkinDarkRoom.hpp"
#include "dxSkinDarkSide.hpp"
#include "dxSkinFoggy.hpp"
#include "dxSkinGlassOceans.hpp"
#include "dxSkiniMaginary.hpp"
#include "dxSkinLilian.hpp"
#include "dxSkinLiquidSky.hpp"
#include "dxSkinLondonLiquidSky.hpp"
#include "dxSkinMcSkin.hpp"
#include "dxSkinMoneyTwins.hpp"
#include "dxSkinOffice2007Black.hpp"
#include "dxSkinOffice2007Blue.hpp"
#include "dxSkinOffice2007Green.hpp"
#include "dxSkinOffice2007Pink.hpp"
#include "dxSkinOffice2007Silver.hpp"
#include "dxSkinOffice2010Black.hpp"
#include "dxSkinOffice2010Blue.hpp"
#include "dxSkinOffice2010Silver.hpp"
#include "dxSkinsCore.hpp"
#include "dxSkinscxPCPainter.hpp"
#include "dxSkinSeven.hpp"
#include "dxSkinSharp.hpp"
#include "dxSkinSilver.hpp"
#include "dxSkinStardust.hpp"
#include <Menus.hpp>
#include "cxGridBandedTableView.hpp"
#include <ADODB.hpp>
#include <DB.hpp>
class TSMS00201 : public TForm
{
__published:	// IDE-managed Components
    TTimer *TmrShow;
    TcxGroupBox *GrpCode;
    TPanel *Panel1;
    TcxButton *BtnInsert1;
    TcxButton *BtnEdit1;
    TcxButton *BtnCancel1;
    TcxButton *BtnSave1;
    TcxButton *BtnDelete1;
    TcxGrid *CxList1;
    TcxGridTableView *TvList1;
    TcxGridColumn *MColumn01;
    TcxGridColumn *MColumn02;
    TcxGridColumn *MColumn03;
    TcxGridColumn *MColumn04;
    TcxGridColumn *MColumn05;
    TcxGridColumn *MColumn06;
    TcxGridColumn *MColumn07;
    TcxGridColumn *MColumn08;
    TcxGridColumn *MColumn09;
    TcxGridColumn *MColumn10;
    TcxGridColumn *MColumn11;
    TcxGridColumn *MColumn12;
    TcxGridColumn *MColumn98;
    TcxGridLevel *GlList1;
    TcxButton *BtnListDelete;
    TcxButton *BtnListAdd;
    TPanel *Panel3;
    TPanel *Panel2;
    TcxButton *BtnSave2;
    TcxButton *BtnCancel2;
    TcxButton *BtnInsert2;
    TcxButton *BtnEdit2;
    TcxButton *BtnDelete2;
    TcxGroupBox *cxGroupBox2;
    TcxGrid *CxList3;
    TcxGridLevel *GlList3;
    TcxGroupBox *GrpSubCode;
    TcxGrid *CxList2;
    TcxGridTableView *TvList2;
    TcxGridColumn *SColumn01;
    TcxGridColumn *SColumn02;
    TcxGridColumn *SColumn03;
    TcxGridColumn *SColumn04;
    TcxGridColumn *SColumn05;
    TcxGridColumn *SColumn06;
    TcxGridColumn *SColumn07;
    TcxGridColumn *SColumn08;
    TcxGridColumn *SColumn09;
    TcxGridColumn *SColumn10;
    TcxGridColumn *SColumn11;
    TcxGridColumn *SColumn12;
    TcxGridColumn *SColumn13;
    TcxGridColumn *SColumn98;
    TcxGridLevel *GlList2;
    TPanel *Panel4;
    TcxButton *BtnInsertGroup;
    TcxButton *BtnDeleteGroup;
    TcxButton *BtnEditGroup;
    TcxGridBandedTableView *TvList3;
    TcxGridBandedColumn *RColumn02;
    TcxGridBandedColumn *RColumn03;
    TcxGridBandedColumn *RColumn04;
    TcxGridBandedColumn *RColumn05;
    TcxGridBandedColumn *RColumn06;
    TcxGridBandedColumn *RColumn01;
    TcxGridBandedColumn *RColumn07;
    TcxGridBandedColumn *RColumn08;
    TcxGridBandedColumn *RColumn98;
    TADOQuery *ADOQry;
    void __fastcall FormClose(TObject *Sender, TCloseAction &Action);
    void __fastcall FormDestroy(TObject *Sender);
    void __fastcall FormShow(TObject *Sender);
    void __fastcall TmrShowTimer(TObject *Sender);
    void __fastcall BtnListAddClick(TObject *Sender);
    void __fastcall BtnListDeleteClick(TObject *Sender);
    void __fastcall BtnInsert1Click(TObject *Sender);
    void __fastcall BtnEdit1Click(TObject *Sender);
    void __fastcall BtnDelete1Click(TObject *Sender);
    void __fastcall BtnInsertGroupClick(TObject *Sender);
    void __fastcall BtnEditGroupClick(TObject *Sender);
    void __fastcall BtnDeleteGroupClick(TObject *Sender);
    void __fastcall TvList1FocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);
    void __fastcall TvList2FocusedRecordChanged(TcxCustomGridTableView *Sender, TcxCustomGridRecord *APrevFocusedRecord,
          TcxCustomGridRecord *AFocusedRecord, bool ANewItemRecordFocusingChanged);


private:	// User declarations
public:		// User declarations
    __fastcall TSMS00201(TComponent* Owner, TForm *ParentForm);

    void __fastcall CommClose();
    void __fastcall FormInit();

    String  FUserId;
    String  FGropId;
    bool    FGroupChanged;

    bool __fastcall GetUserNewId(String &ANewId);
    bool __fastcall GetGroupNewId(String &ANewId);

    void __fastcall DispData();
    void __fastcall SelSmsUserList();
    void __fastcall SelSmsGroupList();
    void __fastcall SelSmsGroupRltnList(String AGroupId);
    void __fastcall DispSmsUser();
    void __fastcall DispSmsGroup();
};
//---------------------------------------------------------------------------
extern PACKAGE TSMS00201 *SMS00201;
//---------------------------------------------------------------------------
#endif
