123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- // ReCharge.cpp : implementation file
- //
- #include "stdafx.h"
- #include "LYFZIPManage.h"
- #include "ReCharge.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // ReCharge dialog
- ReCharge::ReCharge(CWnd* pParent /*=NULL*/)
- : CDialog(ReCharge::IDD, pParent)
- {
- //{{AFX_DATA_INIT(ReCharge)
- m_account = _T("");
- m_name = _T("");
- m_money = _T("");
- m_count = _T("");
- m_price = _T("");
- //}}AFX_DATA_INIT
- }
- void ReCharge::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(ReCharge)
- DDX_Control(pDX, IDC_EDITcount, m_editnum2);
- DDX_Control(pDX, IDC_EDITmoney, m_editnum1);
- DDX_Text(pDX, IDC_EDITaccount, m_account);
- DDX_Text(pDX, IDC_EDITname, m_name);
- DDX_Text(pDX, IDC_EDITmoney, m_money);
- DDX_Text(pDX, IDC_EDITcount, m_count);
- DDX_Text(pDX, IDC_EDITprice, m_price);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(ReCharge, CDialog)
- //{{AFX_MSG_MAP(ReCharge)
- ON_EN_CHANGE(IDC_EDITmoney, OnChangeEDITmoney)
- ON_EN_CHANGE(IDC_EDITcount, OnChangeEDITcount)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // ReCharge message handlers
- BOOL ReCharge::OnInitDialog()
- {
- CDialog::OnInitDialog();
-
- // TODO: Add extra initialization here
- /* CRecordset myset(&g_db);
- CString sql="select ReCharge from ReCharge";
- myset.Open (CRecordset::forwardOnly, sql);
- myset.GetFieldValue ("ReCharge", m_oldReCharge);
- myset.Close();
- this->CenterWindow (g_pMainWnd);*/
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void ReCharge::OnChangeEDITmoney()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the CDialog::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- UpdateData();
- if(atof(m_count))
- {
- m_price.Format ("%0.4f", atof(m_money)/atof(m_count));
- }
- else
- m_price="0";
- UpdateData(false);
- // TODO: Add your control notification handler code here
-
- }
- void ReCharge::OnChangeEDITcount()
- {
- // TODO: If this is a RICHEDIT control, the control will not
- // send this notification unless you override the CDialog::OnInitDialog()
- // function and call CRichEditCtrl().SetEventMask()
- // with the ENM_CHANGE flag ORed into the mask.
- OnChangeEDITmoney();
- // TODO: Add your control notification handler code here
-
- }
- void ReCalAccount(CString account)
- {
-
- }
- void ReCharge::OnOK()
- {
- // TODO: Add extra validation here
-
- }
|