#pragma once
#include "afxwin.h"


// CChooseConfigDlg dialog

class CChooseConfigDlg : public CaplResizableDialog
{
	DECLARE_DYNAMIC(CChooseConfigDlg)

public:
	CChooseConfigDlg(CWnd* pParent = NULL);   // standard constructor
	virtual ~CChooseConfigDlg();

// Dialog Data
	enum { IDD = IDD_CHOOSE_CONFIG_DLG };

public:
	CaplAPI      *m_api;
	CaplInstance *m_pProductPDF;
	CaplInstance *m_pOrder;
	CaplInstance *m_pSelectedItem;
	bool m_bLoadConfigurationMgr;

private:
	void UpdateComplectationsList(bool bForceSelectComplectation=false);
	void SetAnchors();

protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support

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

	DECLARE_MESSAGE_MAP()
public:
	CComboBox m_cbSelectConfiguration;
	CButton m_btnLoadProductConfigs;
	CaplButton m_btnOk;
	CaplButton m_btnCancel;
	CEdit m_ctrlOrder;	
	CButton m_btnSelectOrder;	
	virtual BOOL OnInitDialog();	
	afx_msg void OnBnClickedOk();
	afx_msg void OnBnClickedLoadChosenProductConfigurationsButton();
	afx_msg void OnBnClickedSelectOrder();
	afx_msg void OnBnClickedClearOrder();
	afx_msg void OnCbnSelchangeSelConfiguration();
	void UpdateOrderInfo();
};
