ClientRequirement.cpp 1.7 KB

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