⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lkupuser.cpp

📁 ado and access operatiion such as insert delet update
💻 CPP
字号:
// LkupUser.cpp : implementation file
//

#include "stdafx.h"
#include "jmChat_S.h"
#include "LkupUser.h"
#include "UserInfo.h"
#include "JmDB.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CLkupUser dialog


CLkupUser::CLkupUser(CWnd* pParent /*=NULL*/)
	: CDialog(CLkupUser::IDD, pParent)
{
	//{{AFX_DATA_INIT(CLkupUser)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CLkupUser::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CLkupUser)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CLkupUser, CDialog)
	//{{AFX_MSG_MAP(CLkupUser)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CLkupUser message handlers

void CLkupUser::OnOK() 
{
	CUserInfo m_info;
	GetDlgItem(IDC_EDIT_UID)->GetWindowText(m_info.uID);
	if(m_info.uID.IsEmpty())
	{
		AfxMessageBox("用户ID不能为空");
		return;
	}
		
	CJmDB m_db;
	m_db.LookupInfo(m_info);
	if(!m_info.uName.IsEmpty())
	{
		GetDlgItem(IDC_STC_UNAME)->SetWindowText(m_info.uName);
		GetDlgItem(IDC_STC_UPWD)->SetWindowText(m_info.uPwd);

	}
	else
	{
		GetDlgItem(IDC_STC_UNAME)->SetWindowText("用户不存在");
		GetDlgItem(IDC_STC_UPWD)->SetWindowText("");
	}
	

	return;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -