Time5.cpp 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. // Time5.cpp : implementation file
  2. //
  3. #include "stdafx.h"
  4. #include "ylgl.h"
  5. #include "Time5.h"
  6. #ifdef _DEBUG
  7. #define new DEBUG_NEW
  8. #undef THIS_FILE
  9. static char THIS_FILE[] = __FILE__;
  10. #endif
  11. /////////////////////////////////////////////////////////////////////////////
  12. // Time5 dialog
  13. Time5::Time5(CWnd* pParent /*=NULL*/)
  14. : CDialog(Time5::IDD, pParent)
  15. {
  16. //{{AFX_DATA_INIT(Time5)
  17. m_time5 = _T("");
  18. //}}AFX_DATA_INIT
  19. }
  20. void Time5::DoDataExchange(CDataExchange* pDX)
  21. {
  22. CDialog::DoDataExchange(pDX);
  23. //{{AFX_DATA_MAP(Time5)
  24. DDX_Control(pDX, IDC_EDIT1, m_ctrldate);
  25. DDX_Text(pDX, IDC_EDIT1, m_time5);
  26. //}}AFX_DATA_MAP
  27. }
  28. BEGIN_MESSAGE_MAP(Time5, CDialog)
  29. //{{AFX_MSG_MAP(Time5)
  30. //}}AFX_MSG_MAP
  31. END_MESSAGE_MAP()
  32. /////////////////////////////////////////////////////////////////////////////
  33. // Time5 message handlers
  34. void Time5::OnOK()
  35. {
  36. // TODO: Add extra validation here
  37. {
  38. UpdateData();
  39. if (!CheckDateOK(m_time5))return;
  40. CString sql;
  41. sql = "update dindan set time5='" + m_time5 + "' where id='" + m_id + "'";
  42. g_sendhead.bsql = 1;
  43. g_pMainWnd->ProcessChatMessageRequest2(sql);
  44. if (g_bSendOK == 0)return;
  45. AfxMessageBox("±£´æ³É¹¦!", MB_ICONINFORMATION);
  46. }
  47. CDialog::OnOK();
  48. }
  49. BOOL Time5::OnInitDialog()
  50. {
  51. CDialog::OnInitDialog();
  52. // TODO: Add extra initialization here
  53. g_sendhead.bsql = 0;
  54. CString filter = "id='" + m_id + "'";
  55. g_sendhead.code[0] = 11;
  56. g_sendhead.tabcount = 1;
  57. g_pMainWnd->ProcessChatMessageRequest2(filter);
  58. if (g_bSendOK == 0)
  59. return 1;
  60. DataToArray(&g_List1array);
  61. m_time5 = g_List1array.ElementAt(0).ElementAt(22);
  62. UpdateData(false);
  63. CenterWindow();
  64. return TRUE; // return TRUE unless you set the focus to a control
  65. // EXCEPTION: OCX Property Pages should return FALSE
  66. }