#pragma once

//
#include "resource.h"
#include "aplStepQL.h"
#include <apl_gui.h>
#include "apl_api.h"
#include "ResizableDialog.h"
#include "aplStepManager.h"
#include "afxwin.h"

#include "QueryTableItemsView.h"


// CQueryFormView form view

class CQueryFormView : public CaplFormView
{
	DECLARE_DYNCREATE(CQueryFormView)

protected:
public:
	CQueryFormView();           // protected constructor used by dynamic creation
	virtual ~CQueryFormView();

public:
#ifdef _DEBUG
	virtual void AssertValid() const;
#ifndef _WIN32_WCE
	virtual void Dump(CDumpContext& dc) const;
#endif
#endif

	CQueryTableItemsView *m_pTableView;

public:

	CaplAPI *m_api;

	//	CaplQLQuery::CaplQLBranchSelect* m_bsel_res;
	// Dialog Data
	//{{AFX_DATA(CQueryFormView)
	enum { IDD = IDD_QUERYFORMVIEW };
	CString m_PrdId;
	CString m_PrdName;
	CString m_PdfId;
	CaplButton	m_BtnFind;
	BOOL m_IsSubstring;
	//}}AFX_DATA

// 	void OnCopy();
// 	void OnCut();
// 	void OnPaste();

	void SelectClassifier();
	CaplInstance* m_Classifier;


	// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CQueryFormView)
protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

	// Implementation
public:



///////////////////////////////////
	// Generated message map functions
	//{{AFX_MSG(CQueryFormView)
	virtual void OnInitialUpdate(); // called first time after construct


	afx_msg void OnExecuteFind();
	afx_msg void OnChangeEdit();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()

public:
	BOOL m_bFindDoc;
	CString m_ClassifierName;
	afx_msg void OnEnChangeClassifier();
	afx_msg void OnBnClickedClassifierSelect();
	CaplButton m_clear_btn;
	afx_msg void OnBnClickedClearFields();
	CEdit m_name_ctrl;
	CEdit m_id_ctrl;
	CEdit m_ver_ctrl;
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.



