c++实现的C/S模式图书借阅管理系统


自己写的一个C/S模式图书借阅管理系统,供大家学习网络编程参考。数据库使用的SQLServer2000,里面含有数据库文件,直接附加数据库就可使用。
资源截图
代码片段和文件信息
// AddUserDlg.cpp : implementation file
//

#include “stdafx.h“
#include “Client.h“
#include “AddUserDlg.h“
#include“MainFrm.h“

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CAddUserDlg dialog


CAddUserDlg::CAddUserDlg(CWnd* pParent /*=NULL*/)
: CDialog(CAddUserDlg::IDD pParent)
{
//{{AFX_DATA_INIT(CAddUserDlg)
m_Usrname = _T(““);
m_Usrpwd1 = _T(““);
m_Usrpwd2 = _T(““);
m_WorkID = _T(““);
//}}AFX_DATA_INIT
}


void CAddUserDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddUserDlg)
DDX_Text(pDX IDC_EDIT_Usrname m_Usrname);
DDX_Text(pDX IDC_EDIT_Usrpwd1 m_Usrpwd1);
DDX_Text(pDX IDC_EDIT_Usrpwd2 m_Usrpwd2);
DDX_Text(pDX IDC_EDIT_WorkID m_WorkID);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAddUserDlg CDialog)
//{{AFX_MSG_MAP(CAddUserDlg)
ON_BN_CLICKED(ID_BTN_Add OnBTNAdd)
ON_BN_CLICKED(ID_BTN_CANCEL OnBtnCancel)
// ON_COMMAND(ID_ACCOUNT_ADD OnAccountAdd)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CAddUserDlg message handlers

void CAddUserDlg::OnBTNAdd() 
{
// TODO: Add your control notification handler code here
CString str=“Usr01“;
CMainframe * pWnd = (CMainframe*)AfxGetMainWnd();
UpdateData(TRUE);
if(m_Usrname.Compare(““)==0||m_Usrpwd1.Compare(““)==0||m_Usrpwd2.Compare(““)==0||m_WorkID.Compare(““)==0)
{
MessageBox(“请填写完整数据““增加用户“);
return;
}
if(m_Usrpwd1!=m_Usrpwd2)
{
AfxMessageBox(“填入的密码不一致,请核对!“);

m_Usrpwd1.Empty();
m_Usrpwd2.Empty();

UpdateData(FALSE);
}
else
{
str+=m_Usrname+‘‘+m_Usrpwd1+‘‘+m_WorkID+‘‘;
int nSendLen=pWnd->m_sock.Send((void*)str.GetBuffer(0)str.GetLength());
if(nSendLen>0)
{
m_Usrname.Empty();
m_Usrpwd1.Empty();
m_Usrpwd2.Empty();
UpdateData(FALSE);
}
else
{
AfxMessageBox(“网络错误,请检查网络连接是否正确!“ERROR);
}
}
}

void CAddUserDlg::OnBtnCancel() 
{
// TODO: Add your control notification handler code here
CDialog::OnCancel();
}

/*void CAddUserDlg::OnAccountAdd() 
{
// TODO: Add your command handler code here

}
*/

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       2352  2012-06-18 15:34  netLibrClientAddUserDlg.cpp

     文件       1325  2012-06-09 19:52  netLibrClientAddUserDlg.h

     文件       2315  2012-06-15 18:46  netLibrClientBookInfoDlg.cpp

     文件       1528  2012-06-15 17:34  netLibrClientBookInfoDlg.h

     文件       2541  2012-06-18 15:34  netLibrClientBookLostDlg.cpp

     文件       1351  2012-06-18 15:28  netLibrClientBookLostDlg.h

     文件       3179  2012-06-18 15:34  netLibrClientBorrowDlg.cpp

     文件       1356  2012-06-18 15:28  netLibrClientBorrowDlg.h

     文件       2490  2012-06-18 15:34  netLibrClientChangePwdDlg.cpp

     文件       1338  2012-06-15 10:04  netLibrClientChangePwdDlg.h

     文件    3757344  2013-05-15 23:49  netLibrClientClient.aps

     文件      10896  2013-05-15 21:04  netLibrClientClient.clw

     文件       4977  2012-06-18 16:15  netLibrClientClient.cpp

     文件       6847  2012-06-17 22:08  netLibrClientClient.dsp

     文件        518  2012-06-07 14:18  netLibrClientClient.dsw

     文件       1407  2012-06-18 13:57  netLibrClientClient.h

     文件     271360  2013-05-15 23:49  netLibrClientClient.ncb

     文件     185856  2013-05-15 23:49  netLibrClientClient.opt

     文件        248  2013-05-14 20:31  netLibrClientClient.plg

     文件      25405  2013-05-15 23:49  netLibrClientClient.rc

     文件       1742  2012-06-07 14:17  netLibrClientClientDoc.cpp

     文件       1475  2012-06-07 14:17  netLibrClientClientDoc.h

     文件       3262  2012-06-18 15:19  netLibrClientClientView.cpp

     文件       1699  2012-06-17 19:32  netLibrClientClientView.h

     文件      72731  2004-12-14 21:45  netLibrClientcorona.smf

     文件      19608  2012-06-25 09:35  netLibrClientDebugAddUserDlg.obj

     文件      21393  2012-06-25 09:35  netLibrClientDebugBookInfoDlg.obj

     文件      27583  2012-06-25 09:35  netLibrClientDebugBookLostDlg.obj

     文件      30197  2012-06-25 09:35  netLibrClientDebugBorrowDlg.obj

     文件      20098  2012-06-25 09:35  netLibrClientDebugChangePwdDlg.obj

............此处省略143个文件信息

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件举报,一经查实,本站将立刻删除。

发表评论

评论列表(条)