#if !defined(AFX_FILTERDLG_H__C99E5468_E450_4154_8BEF_92790E33ECB8__INCLUDED_)
#define AFX_FILTERDLG_H__C99E5468_E450_4154_8BEF_92790E33ECB8__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// FilterDlg.h : header file
#include "resource.h"
#include "apl_api.h"
#include "aplProjectMgr.h"
#include <apl_gui.h>
#include "FilterStruct.h"
#include "afxwin.h"

/////////////////////////////////////////////////////////////////////////////
// CFilterDlg dialog

class CFilterDlg : public CaplResizableDialog
{
// Construction
public:
	CFilterDlg(CWnd* pParent = NULL);   // standard constructor
	CFilterStruct *m_filter;
	CaplAPI *m_api;
	CaplProjectManager *m_project_mgr;
	bool bMonitorMode;
	CaplInstance *m_customer;
	CaplInstance *m_kurator;
	CaplInstance *m_executor;
	long m_filter_type;
	void SetFilters();
	void SetFiltersValues();
// Dialog Data
	//{{AFX_DATA(CFilterDlg)
	enum { IDD = IDD_FILTERDLG_DIALOG };
	CDateTimeCtrl	m_date_planned_end_ctrl;
	CDateTimeCtrl	m_date_planned_begin_ctrl;
	CDateTimeCtrl	m_date_actual_end_ctrl;
	CDateTimeCtrl	m_date_actual_begin_ctrl;
	CButton	m_check_date_planned_end_ctrl;
	CButton	m_check_date_planned_begin_ctrl;
	CButton	m_check_date_actual_end_ctrl;
	CButton	m_check_date_actual_begin_ctrl;
	CButton	m_customer_btn;
	CEdit	m_customer_ctrl;
	CButton	m_kurator_btn;
	CEdit	m_kurator_ctrl;
	CButton	m_executor_btn;
	CEdit	m_executor_ctrl;
	CButton	m_check_customer_ctrl;
	CButton	m_check_kurator_ctrl;
	CButton	m_check_executor_ctrl;
	CButton m_check_out_of_time_ctrl;
	CButton	m_all_types_ctrl;
	CStatic	m_type_border_ctrl;
	CButton	m_all_states_ctrl;
	CStatic	m_border_ctrl;
	CaplButton	m_ok_btn;
	CaplButton	m_cancel_btn;
	
	//}}AFX_DATA


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

// Implementation
protected:
	// предотвращаем потерю модальности после диалога с бочками из aplSocketTransport
	CaplParentWndProcesser m_pwp;

	CSortListCtrl m_states_ctrl;
	CSortListCtrl m_types_ctrl;
	// Generated message map functions
	//{{AFX_MSG(CFilterDlg)
	virtual BOOL OnInitDialog();
	virtual void OnOK();
	afx_msg void OnAllStates();
	afx_msg void OnAllTypes();
	afx_msg void OnCustomerBtn();
	afx_msg void OnKuratorBtn();
	afx_msg void OnExecutorBtn();
	afx_msg void OnCheckCustomer();
	afx_msg void OnCheckKurator();
	afx_msg void OnCheckExecutor();
	afx_msg void OnCheckDatePlannedBegin();
	afx_msg void OnCheckDatePlannedEnd();
	afx_msg void OnCheckDateActualBegin();
	afx_msg void OnCheckDateActualEnd();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
public:
	CEdit m_number_ctrl;
	CEdit m_prj_id_ctrl;
	CEdit m_prj_name_ctrl;
	CComboBox m_filter_type_ctrl;
};

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

#endif // !defined(AFX_FILTERDLG_H__C99E5468_E450_4154_8BEF_92790E33ECB8__INCLUDED_)
