///////////////////////////////////////////////////////////
// Author:			Stefan Liersch
// Contact:			stefan.liersch@googlemail.com,
//					stefan.liersch@ufz.de
//
// Date:			2008-03-25
// last modified:	2008-03-25
//
//---------------------------------------------------------
// DESCRIPTION
//---------------------------------------------------------
//
//---------------------------------------------------------
// ToDo
//---------------------------------------------------------
//	- 
///////////////////////////////////////////////////////////

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

#ifndef __PG_SOIL_SALINITY_LOAD_DATA_DLG_H_
#define __PG_SOIL_SALINITY_LOAD_DATA_DLG_H_

#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
    #pragma interface "pg_soil_salinity_load_data_dlg.h"
#endif

// Include wxWidgets' headers
#ifndef WX_PRECOMP
    #include <wx/wx.h>
#endif

#include "saga_gui/wksp_simplefeature.h"

#include "pg_soil_salinity_dlg_base.h"

#include "pgsql/pgdatabase.h"
#include "pgsql/sqltable.h"

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

enum ESG_SoilSalinityLoadData
{
	ID_SSLD_COMBO_YEAR = 11111,
	ID_SSLD_COMBO_MONTH,
	ID_SSLD_COMBO_SEASON,
	ID_SSLD_RADIOBOX_PERIOD,
	ID_SSLD_LOAD_DATA,
	ID_SSLD_TEXT,
};
//---------------------------------------------------------------------

class CSoilSalinityLoadDataDlg : public wxDialog, public CSoilSalinityDlgBase
{
public:
	CSoilSalinityLoadDataDlg	(void);
	CSoilSalinityLoadDataDlg	(CSG_SimpleFeature* pSimpleFeature, wxWindow *parent, wxWindowID id, const wxString &title,bool b);
	CSoilSalinityLoadDataDlg	(CSG_SimpleFeature* pSimpleFeature, wxWindow *parent, wxWindowID id, const wxString &title);
	~CSoilSalinityLoadDataDlg	(void);

protected:
	virtual void				_On_Button_Load(wxCommandEvent& event);

	//CWKSP_SimpleFeature*		_Get_WKSP_SimpleFeature(CSG_SimpleFeature* pSimpleFeature);

	virtual CSG_String			_Get_Query();

	void						_Modify_SFTable(Csqltable* pSQLTable, int nModify);

	void						_EmptyAttributeTable(CSG_Table* pTable, int nModify);

	virtual void				_CreateDialog(CSG_SimpleFeature* pSimpleFeature);
	
	virtual void				_Delete_Controls();

	CSG_String					_Get_SQL_Get_Years();
	wxArrayString				_Get_Years(CSG_String sql);
	//-----------------------------------------------------------------
	// EXTERNAL CLASSES
	//-----------------------------------------------------------------
	class CSG_SimpleFeature*	m_pSimpleFeature;
	class Csqltable*			m_pSQLTable;

	//-----------------------------------------------------------------
	//	DIALOG CONTROLS
	//-----------------------------------------------------------------
	wxComboBox*					m_pComboYear;
	wxComboBox*					m_pComboMonth;
	wxButton*					m_pButton_LoadData;


//---------------------------------------------------------------------
	DECLARE_EVENT_TABLE()
};

#endif /* __PG_SOIL_SALINITY_LOAD_DATA_DLG_H_ */
