ChooseReason.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. // ChooseReason.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "ChooseReason.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // CChooseReason dialog
  13. CChooseReason::CChooseReason(CWnd* pParent /*=NULL*/)
  14. : CDialog(CChooseReason::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(CChooseReason)
  17. m_radio1 = 0;
  18. //}}AFX_DATA_INIT
  19. }
  20. void CChooseReason::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(CChooseReason)
  24. DDX_Control(pDX, IDC_COMBOwaiter1, m_combowaiter1);
  25. DDX_Radio(pDX, IDC_RADIO1, m_radio1);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(CChooseReason, CDialog)
  29. //{{AFX_MSG_MAP(CChooseReason)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // CChooseReason message handlers
  34. BOOL CChooseReason::OnInitDialog()
  35. {
  36. CDialog::OnInitDialog();
  37. // TODO: Add extra initialization here
  38. m_combowaiter1.RefDroppedWidth();
  39. return TRUE; // return TRUE unless you set the focus to a control
  40. // EXCEPTION: OCX Property Pages should return FALSE
  41. }
  42. void CChooseReason::OnOK()
  43. {
  44. // TODO: Add extra validation here
  45. UpdateData();
  46. if(m_radio1==0)
  47. sRet="¹¤³§";
  48. else
  49. {
  50. int pos=m_combowaiter1.GetCurSel ();
  51. CString m_waiter1;
  52. if(pos!=-1)
  53. {
  54. m_combowaiter1.GetLBText (pos, m_waiter1);
  55. }
  56. else
  57. return;
  58. sRet="Ô±¹¤:"+m_waiter1;
  59. }
  60. CDialog::OnOK();
  61. }