本论文站仅贴出部分代码,需要全部代码的请联系站长QQ,谢谢
// DUser.cpp : implementation file
//
#include "stdafx.h"
#include "商品库存管理系统.h"
#include "DUser.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern _ConnectionPtr cnn;
extern CMyApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CDUser dialog
CDUser::CDUser(CWnd* pParent /*=NULL*/)
: CDialog(CDUser::IDD, pParent)
{
//{{AFX_DATA_INIT(CDUser)
//}}AFX_DATA_INIT
}
void CDUser::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDUser)
DDX_Control(pDX, IDC_LIST1, m_List);
DDX_Control(pDX, IDC_EDTPassward, m_EdtPassWard);
DDX_Control(pDX, IDC_EdtName2, m_EdtName);
DDX_Control(pDX, IDC_EdtID, m_EdtID);
DDX_Control(pDX, IDC_EDTAffirmPsd, m_EdtAffirmPsd);
DDX_Control(pDX, IDC_BUTUndo, m_ButUndo);
DDX_Control(pDX, IDC_BUTSave, m_ButSave);
DDX_Control(pDX, IDC_BUTExit, m_ButExit);
DDX_Control(pDX, IDC_BUTDele, m_BueDele);
DDX_Control(pDX, IDC_BUTChange, m_ButChange);
DDX_Control(pDX, IDC_BUTAdd, m_ButAdd);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDUser, CDialog)
//{{AFX_MSG_MAP(CDUser)
ON_LBN_SELCHANGE(IDC_LIST1, OnSelchangeList)
ON_BN_CLICKED(IDC_BUTAdd, OnBUTAdd)
ON_BN_CLICKED(IDC_BUTChange, OnBUTChange)
ON_BN_CLICKED(IDC_BUTDele, OnBUTDele)
ON_BN_CLICKED(IDC_BUTUndo, OnBUTUndo)
ON_BN_CLICKED(IDC_BUTSave, OnBUTSave)
ON_BN_CLICKED(IDC_BUTExit, OnBUTExit)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CDUser message handlers
void CDUser::OnOK()
{
// TODO: Add extra validation here
//CDialog::OnOK();
}
BOOL CDUser::OnInitDialog()
{
CDialog::OnInitDialog();
rst.CreateInstance((__uuidof(Recordset)));
rst=cnn->Execute(L"用户信息表",NULL,adCmdTable);
if(theApp.GetRecordCount(rst)>0)
{
m_List.SetRecordset(rst,"用户名");
}
return TRUE; // return TRUE unless you set the focus to a control
// EXCEPTION: OCX Property Pages should return FALSE
}