IsGrowthTx.cpp 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. // IsGrowthTx.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "IsGrowthTx.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. IsGrowthTx::IsGrowthTx(CWnd* pParent /*=NULL*/): CDialog(IsGrowthTx::IDD, pParent)
  13. {
  14. m_bGrowthTx = 0;
  15. m_mode = 0;
  16. }
  17. void IsGrowthTx::DoDataExchange(CDataExchange* pDX)
  18. {
  19. CDialog::DoDataExchange(pDX);
  20. DDX_Control(pDX, IDC_COMBO1, m_combo1);
  21. }
  22. BEGIN_MESSAGE_MAP(IsGrowthTx, CDialog)
  23. END_MESSAGE_MAP()
  24. /////////////////////////////////////////////////////////////////////////////
  25. BOOL IsGrowthTx::OnInitDialog()
  26. {
  27. CDialog::OnInitDialog();
  28. g_sendhead.bsql = 0;
  29. CString filter = "id='" + m_strOrderNumber + "';id='" + m_strOrderNumber + "'";
  30. g_sendhead.code[0] = 11; // dindan;
  31. g_sendhead.code[1] = 150; // dindanjd;
  32. g_sendhead.tabcount = 2;
  33. // g_bNoConnDlg=1;
  34. g_pMainWnd->ProcessChatMessageRequest2(filter);
  35. //g_bNoConnDlg=0;
  36. if (g_bSendOK == 0)
  37. {
  38. m_bReturnOK = 0;
  39. CDialog::OnCancel();
  40. return 0;
  41. }
  42. CArray<CStringArray, CStringArray>jdarray;
  43. DataToArray(&g_List1array, &jdarray);
  44. m_bReturnOK = 1;
  45. BOOL bN8SampleChoose = AfxGetApp()->GetProfileInt (LYFZVERSION, "N8SampleChoose", 0);
  46. #if !USE_SHARE_FLORD
  47. // 不管是否是成长套系,都获取dindanjd中的name(景点或套系)名称;
  48. if( m_pAryOfScenery )
  49. {
  50. for ( int i = 0; i < jdarray.GetSize(); i++)
  51. {
  52. m_pAryOfScenery->Add(jdarray.ElementAt(i).ElementAt(1));
  53. }
  54. }
  55. if ( _T("成长套系") == g_List1array.ElementAt(0).ElementAt(52) )
  56. {
  57. m_bGrowthTx = TRUE;
  58. if ( m_mode == 1 ) m_combo1.AddString(_T("全部"));
  59. if ( m_pAryOfScenery )
  60. {
  61. for ( int n = 0; n < m_pAryOfScenery->GetSize(); n++)
  62. {
  63. m_combo1.AddString(m_pAryOfScenery->ElementAt(n));
  64. }
  65. }
  66. else
  67. {
  68. for ( int n = 0; n < jdarray.GetSize(); n++)
  69. {
  70. m_combo1.AddString(jdarray.ElementAt(n).ElementAt(1));
  71. }
  72. }
  73. m_combo1.SetCurSel(0);
  74. }
  75. else
  76. {
  77. CDialog::OnCancel();
  78. return FALSE;
  79. }
  80. #else
  81. if ("成长套系" == g_List1array.ElementAt(0).ElementAt(52))
  82. {
  83. m_bGrowthTx = 1;
  84. if (m_mode == 1 && !bN8SampleChoose)
  85. m_combo1.AddString(_T("全部"));
  86. for (int i = 0; i < jdarray.GetSize(); i++)
  87. m_combo1.AddString(jdarray.ElementAt(i).ElementAt(1));
  88. m_combo1.SetCurSel(0);
  89. }
  90. else
  91. {
  92. CDialog::OnCancel();
  93. return 0;
  94. }
  95. #endif
  96. CenterWindow();
  97. return TRUE;
  98. }
  99. void IsGrowthTx::OnOK()
  100. {
  101. int pos = m_combo1.GetCurSel();
  102. if (pos == -1)
  103. {
  104. AfxMessageBox("请选择此次拍摄名称!", MB_ICONINFORMATION);
  105. return;
  106. }
  107. m_combo1.GetLBText(pos, m_seltxname);
  108. CDialog::OnOK();
  109. }