#pragma once
#include "afxdialogex.h"


// DLG_Corp_Transfer 对话框
class CMainFrame;

class DLG_Corp_Transfer : public CDialogEx
{
	DECLARE_DYNAMIC(DLG_Corp_Transfer)
public:
	CMainFrame* m_pMainFrame;
	ANS_Corp_Assist_GetCorpData* m_pSCorpData;
	ANS_Corp_Assist_GetCorpData* m_pSAgentData;
	ANS_Corp_Assist_GetCorpData* m_pTCorpData;
	ANS_Corp_Assist_GetCorpData* m_pTAgentData;

	ANS_Corp_Assist_GetCorpData* m_pSData;
	ANS_Corp_Assist_GetCorpData* m_pTData;

	long m_lItem;            //原始记录数据
	long m_lDefaultCorpID;   //默认企业ID
	long m_lDefaultKHType;   //默认客户类型
	long m_lDefaultSProduct;   //转出产品类型
	long m_lDefaultTProduct;    //转入产品类型

public:
	DLG_Corp_Transfer(CWnd* pParent = nullptr);   // 标准构造函数
	virtual ~DLG_Corp_Transfer();

// 对话框数据
#ifdef AFX_DESIGN_TIME
	enum { IDD = IDD_CORP_TRANSFER };
#endif

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

	DECLARE_MESSAGE_MAP()
public:
	CString m_strBZ;
	CString m_strSCorpID;
	CString m_strSCorpID2;
	CString m_strSCorpName2;
	CComboBox m_L_SKHType;
	CString m_strSKHType2;
	CString m_strSPriceOne2;
	CComboBox m_L_SProduct;
	CString m_strSProduct2;
	CString m_strSQuantity;
	CString m_strSQuantity2;
	CString m_strSYWY2;
	CString m_strTCorpID;
	CString m_strTCorpID2;
	CString m_strTCorpName2;
	CComboBox m_L_TKHType;
	CString m_strTKHType2;
	CString m_strTPriceOne2;
	CComboBox m_L_TProduct;
	CString m_strTProduct2;
	CString m_strTQuantity;
	CString m_strTQuantity2;
	CString m_strTYWY2;
	afx_msg void OnBnClickedOk();
	virtual BOOL OnInitDialog();
	virtual BOOL PreTranslateMessage(MSG* pMsg);
	CEdit m_E_SCorpID;
	CEdit m_E_TCorpID;
	int QueryCorpDetail(long lQueryType);
	afx_msg void OnChangeCorpTransferSCorpid();
	afx_msg void OnChangeCorpTransferTCorpid();
	void SetParam(CMainFrame* pFrame, long lItem,long lCorpID, long lKHType, long lSProduct,long lTProduct);
	BOOL ProcessSocket(Socket_Head_Add* pHead, BYTE* pFrame);
	void CloseData();
	afx_msg void OnSelchangeCorpTransferSKhtype();
	afx_msg void OnSelchangeCorpTransferSProduct();
	afx_msg void OnSelchangeCorpTransferTKhtype();
	afx_msg void OnSelchangeCorpTransferTProduct();
	void ReShowCorpDetail(long lType);
	BOOL ReCalculation(long lType);
	afx_msg void OnChangeCorpTransferSQuantity();
};