TXSPDlg.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. #if !defined(AFX_TXSPDlg_H__ACD9E9EA_B724_4711_9C6F_DE3ADA090E2E__INCLUDED_)
  2. #define AFX_TXSPDlg_H__ACD9E9EA_B724_4711_9C6F_DE3ADA090E2E__INCLUDED_
  3. #if _MSC_VER > 1000
  4. #pragma once
  5. #endif
  6. #ifndef __AFXEXT_H__
  7. #include <afxext.h>
  8. #endif
  9. #include "EditListCtrl.h"
  10. #include "afxwin.h"
  11. typedef struct __PRODUCTINFO__
  12. {
  13. CString strProductId; // 商品id;
  14. CString strProductName; // 商品名;
  15. CString strProductCost; // 商品成本;
  16. CString strProductSale; // 商品卖价;
  17. // and so on....
  18. __PRODUCTINFO__(){
  19. strProductId = _T("");
  20. strProductName = _T("");
  21. strProductCost = _T("");
  22. strProductSale = _T("");
  23. }
  24. }STProductInfo, *pSTProductInfo;
  25. class TXSPDlg : public MyFormView // 套系商品设置;
  26. {
  27. CRect m_rcOld;
  28. CArray<CStringArray, CStringArray>m_List1array;
  29. CArray<CStringArray, CStringArray>m_List2array;
  30. CArray<CStringArray, CStringArray>m_List3array;
  31. CArray<CStringArray, CStringArray>m_sparray;
  32. protected:
  33. TXSPDlg(); // protected constructor used by dynamic creation
  34. DECLARE_DYNCREATE(TXSPDlg)
  35. public:
  36. #if 1
  37. enum {
  38. IDD = IDD_DLGTXSP2
  39. };
  40. #else
  41. enum { IDD = IDD_DLGTXSP };
  42. #endif
  43. CEditListCtrl m_List2;
  44. CEditListCtrl m_List1;
  45. CStatic m_static1;
  46. CComboBox m_combotaoxiname;
  47. CString m_taoxiid;
  48. CString m_taoxijiage;
  49. CString m_zs;
  50. public:
  51. void SetSPName2();
  52. void SetSPName1();
  53. // 根据商品id获取商品名;
  54. CString GetSPNameFromId(CString id);
  55. // 根据商品id获取信息信息;
  56. BOOL GetProductInfoById(IN CString strProductId, OUT STProductInfo &productinfo);
  57. void FillGrid();
  58. // 套系商品成本;
  59. float m_CostPackage;
  60. // 套系商品卖价;
  61. float m_SalePackage;
  62. public:
  63. virtual void OnInitialUpdate();
  64. virtual BOOL PreTranslateMessage(MSG* pMsg);
  65. protected:
  66. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  67. protected:
  68. virtual ~TXSPDlg();
  69. #ifdef _DEBUG
  70. virtual void AssertValid() const;
  71. virtual void Dump(CDumpContext& dc) const;
  72. #endif
  73. afx_msg void OnBUTsave();
  74. afx_msg void OnBUTdel();
  75. afx_msg void OnBUTclose();
  76. afx_msg void OnSelchangeCOMBOtaoxiname();
  77. afx_msg void OnBUTspbox();
  78. afx_msg void OnTimer(UINT nIDEvent);
  79. afx_msg void OnBUTsave2();
  80. afx_msg void OnBUTdel2();
  81. afx_msg void OnBUTspbox2();
  82. afx_msg void OnBUTclose2();
  83. DECLARE_MESSAGE_MAP()
  84. public:
  85. // 套系大类
  86. CComboBox m_cbKinds;
  87. afx_msg void OnCbnSelchangeKinds();
  88. afx_msg void OnSize(UINT nType, int cx, int cy);
  89. static BOOL CALLBACK EnumChildProc1(HWND hwnd, LPARAM lParam);
  90. };
  91. #endif