图书管理系统及数据库


c++编写的图书管理系统附源码及数据库 图书管理系统附源码及数据库
资源截图
代码片段和文件信息
// AddUserDlg.cpp : implementation file
//

#include “stdafx.h“
#include “LibDBS.h“
#include “AddUserDlg.h“
#include “UserSet.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_strUser = _T(““);
m_strPassword = _T(““);
//}}AFX_DATA_INIT
}


void CAddUserDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CAddUserDlg)
DDX_Text(pDX IDC_EDIT_USER m_strUser);
DDX_Text(pDX IDC_EDIT_Password m_strPassword);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CAddUserDlg CDialog)
//{{AFX_MSG_MAP(CAddUserDlg)
ON_EN_CHANGE(IDC_EDIT_USER onchangeEditUser)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

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

void CAddUserDlg::OnOK() 
{
// TODO: Add extra validation here

// CDialog::OnOK();
this->UpdateData(TRUE);
if(m_strUser.Compare(““)==0||m_strPassword.Compare(““)==0)
{
MessageBox(“请正确填写所需数据““增加用户“);
return;
}

if(!m_database.IsOpen())
{
if(!m_database.Open(_T(“Library“)))
{
MessageBox(“数据库打开出错!““图书信息!“);
OnOK();
return ;
}
}
CString strSQL;
long num;
CUserSet *m_pset=new CUserSet(&m_database);

strSQL.Format(“select * from Admin_Info“);
m_pset->Open(AFX_DB_USE_DEFAULT_TYPEstrSQL);
num = m_pset->GetRecordCount();

m_pset->AddNew();
m_pset->SetFieldNull(&(m_pset->m_User_Name)FALSE);
m_pset->m_User_Name=m_strUser;

m_pset->SetFieldNull(&(m_pset->m_Password)FALSE);
m_pset->m_Password=m_strPassword;

m_pset->SetFieldNull(&(m_pset->m_WorkID)FALSE);
m_pset->m_WorkID=num+2;

m_pset->Update();
m_pset->Requery();

m_pset->Close();
m_database.Close();
MessageBox(“添加帐号成功!““添加帐号“);

}

void CAddUserDlg::onchangeEditUser() 
{
// 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.

// TODO: Add your control notification handler code here

}

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

     文件       6850  2009-01-04 23:35  图书管理系统DBLibrary.sql

     文件       2440  2009-01-05 09:20  图书管理系统LibDBSAddUserDlg.cpp

     文件       1280  2009-01-05 09:23  图书管理系统LibDBSAddUserDlg.h

     文件       2408  2009-01-05 09:20  图书管理系统LibDBSBookInfoDlg.cpp

     文件       1357  2009-01-05 09:23  图书管理系统LibDBSBookInfoDlg.h

     文件       5583  2009-01-05 09:20  图书管理系统LibDBSBookLostDlg.cpp

     文件       1391  2009-01-05 09:23  图书管理系统LibDBSBookLostDlg.h

     文件       1645  2009-01-05 09:20  图书管理系统LibDBSBookSet.cpp

     文件       1395  2009-01-05 09:23  图书管理系统LibDBSBookSet.h

     文件       9889  2009-01-05 09:20  图书管理系统LibDBSBorrowDlg.cpp

     文件       1488  2009-01-05 09:23  图书管理系统LibDBSBorrowDlg.h

     文件       1404  2009-01-05 09:20  图书管理系统LibDBSBorrowSet.cpp

     文件       1328  2009-01-05 09:23  图书管理系统LibDBSBorrowSet.h

     文件       3290  2009-01-05 09:20  图书管理系统LibDBSChangePasswordDlg.cpp

     文件       1454  2009-01-05 09:23  图书管理系统LibDBSChangePasswordDlg.h

     文件       5824  2009-01-05 09:23  图书管理系统LibDBSCheckBooksDlg.cpp

     文件       1385  2009-01-05 09:26  图书管理系统LibDBSCheckBooksDlg.h

     文件       4572  2009-01-05 09:23  图书管理系统LibDBSCheckBorrowDlg.cpp

     文件       1422  2009-01-05 09:26  图书管理系统LibDBSCheckBorrowDlg.h

     文件       5832  2009-01-05 09:23  图书管理系统LibDBSCheckProofDlg.cpp

     文件       1415  2009-01-05 09:26  图书管理系统LibDBSCheckProofDlg.h

     文件      19183  2019-10-26 10:53  图书管理系统LibDBSDebugAddUserDlg.obj

     文件      20332  2019-10-26 10:53  图书管理系统LibDBSDebugBookInfoDlg.obj

     文件      33137  2019-10-26 10:53  图书管理系统LibDBSDebugBookLostDlg.obj

     文件      16564  2019-10-26 10:53  图书管理系统LibDBSDebugBookSet.obj

     文件      47715  2019-10-26 10:58  图书管理系统LibDBSDebugBorrowDlg.obj

     文件      14771  2019-10-26 10:53  图书管理系统LibDBSDebugBorrowSet.obj

     文件      22474  2019-10-26 10:53  图书管理系统LibDBSDebugChangePasswordDlg.obj

     文件      30249  2019-10-26 10:53  图书管理系统LibDBSDebugCheckBooksDlg.obj

     文件      28175  2019-10-26 10:53  图书管理系统LibDBSDebugCheckBorrowDlg.obj

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

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

发表评论

评论列表(条)