资源简介

一款功能强大的学校图书馆管理系统。集图书馆图书增删改、图书归还管理、工作人员信息增删改管理、读者信息增删改管理等功能。使用MFC 采用ADO动态链接Access数据库实现,功能强大

资源截图

代码片段和文件信息

// BookAddDlg.cpp : implementation file
//

#include “stdafx.h“
#include “SchoolLibrary.h“
#include “BookAddDlg.h“

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

/////////////////////////////////////////////////////////////////////////////
// CBookAddDlg dialog


CBookAddDlg::CBookAddDlg(CWnd* pParent /*=NULL*/)
: CDialog(CBookAddDlg::IDD pParent)
{
//{{AFX_DATA_INIT(CBookAddDlg)
m_AddBookID = _T(““);
m_AddBookInDate = _T(““);
m_AddBookName = _T(““);
m_AddBookPageNum = _T(““);
m_AddBookPressDate = _T(““);
m_AddBookPrice = _T(““);
m_AddBookPublish = _T(““);
m_AddBookSubject = _T(““);
m_AddBookWriter = _T(““);
//}}AFX_DATA_INIT
}


void CBookAddDlg::DoDataExchange(CDataExchange* pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBookAddDlg)
DDX_Control(pDX IDC_ADDBOOKINDATE m_InDateCtrl);
DDX_Control(pDX IDC_ADDBOOKPRESSDATE m_PressDateCtrl);
DDX_Control(pDX IDC_ADDBOOKSUBJECT m_BookSubjectInfo_ComboBox);
DDX_Text(pDX IDC_ADDBOOKID m_AddBookID);
DDX_Text(pDX IDC_ADDBOOKINDATE m_AddBookInDate);
DDX_Text(pDX IDC_ADDBOOKNAME m_AddBookName);
DDX_Text(pDX IDC_ADDBOOKPAGENUM m_AddBookPageNum);
DDX_Text(pDX IDC_ADDBOOKPRESSDATE m_AddBookPressDate);
DDX_Text(pDX IDC_ADDBOOKPRICE m_AddBookPrice);
DDX_Text(pDX IDC_ADDBOOKPUBLISH m_AddBookPublish);
DDX_Text(pDX IDC_ADDBOOKSUBJECT m_AddBookSubject);
DDX_Text(pDX IDC_ADDBOOKWRITER m_AddBookWriter);
//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CBookAddDlg CDialog)
//{{AFX_MSG_MAP(CBookAddDlg)
ON_BN_CLICKED(IDC_BOOKADD_BUTTON OnBookAddButton)
ON_WM_PAINT()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBookAddDlg message handlers

void CBookAddDlg::OnBookAddButton() 
{
// TODO: Add your control notification handler code here
UpdateData();
if(m_AddBookPrice.IsEmpty()||m_AddBookPageNum.IsEmpty()||m_AddBookInDate.IsEmpty()||m_AddBookPressDate.IsEmpty()||m_AddBookPublish.IsEmpty()||m_AddBookSubject.IsEmpty()||m_AddBookWriter.IsEmpty()||m_AddBookID.IsEmpty()||m_AddBookName.IsEmpty())
{
//AfxMessageBox(“请补全图书信息“);
MessageBox(“请补全图书信息!““警告“MB_ICONASTERISK);
}
else
{
if(m_Judge_AddOrModify == TRUE && m_JudgeIDModify != m_AddBookID)
{
m_pConnection.CreateInstance(“ADODB.Connection“);
_bstr_t strCon = “Provider = Microsoft.Jet.OLEDB.4.0; Data Source = Library.mdb;“;
try
{
m_pConnection->Open(strCon ““ ““ adModeUnknown);
}
catch (_com_error e)
{
CString errorMsg;
errorMsg.Format(_T(“打开数据库失败,错误信息:%s“) e.ErrorMessage());
AfxMessageBox(errorMsg);
exit(0);
}

CString conStr;
conStr.Format(_T(“select * from Book where 编号 = ‘%s‘“) m_AddBookID);
m_pRecordset.CreateInstance(__uuidof(Recordset));
try
{
m_pRecordset->Open(conStr.AllocSysString() m_pConnection.GetInterfacePtr() adO

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

     文件       5425  2012-02-29 08:20  SchoolLibrary\SchoolLibrary1\BookAddDlg.cpp

     文件       1726  2012-02-28 19:11  SchoolLibrary\SchoolLibrary1\BookAddDlg.h

     文件      17901  2012-02-29 15:43  SchoolLibrary\SchoolLibrary1\BookBorrowDlg.cpp

     文件       1677  2012-02-28 17:25  SchoolLibrary\SchoolLibrary1\BookBorrowDlg.h

     文件      23858  2012-02-29 15:40  SchoolLibrary\SchoolLibrary1\BookDlg.cpp

     文件       2013  2012-02-25 17:02  SchoolLibrary\SchoolLibrary1\BookDlg.h

     文件       5050  2012-02-26 01:16  SchoolLibrary\SchoolLibrary1\BookQueryDlg.cpp

     文件       1558  2012-02-26 00:55  SchoolLibrary\SchoolLibrary1\BookQueryDlg.h

     文件       8683  2012-02-29 15:45  SchoolLibrary\SchoolLibrary1\BookReturnDlg.cpp

     文件       1588  2012-02-25 17:06  SchoolLibrary\SchoolLibrary1\BookReturnDlg.h

     文件       2132  2012-02-23 22:29  SchoolLibrary\SchoolLibrary1\BorrowAddDlg.cpp

     文件       1261  2012-02-23 09:29  SchoolLibrary\SchoolLibrary1\BorrowAddDlg.h

     文件      73450  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookAddDlg.obj

     文件      15413  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookAddDlg.sbr

     文件     150959  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookBorrowDlg.obj

     文件      21403  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookBorrowDlg.sbr

     文件     175791  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookDlg.obj

     文件      26642  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookDlg.sbr

     文件      25047  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookQueryDlg.obj

     文件      12837  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookQueryDlg.sbr

     文件     101650  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookReturnDlg.obj

     文件      16739  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BookReturnDlg.sbr

     文件      17140  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BorrowAddDlg.obj

     文件      11177  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\BorrowAddDlg.sbr

     文件      71415  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\LibrarianAddDlg.obj

     文件      15030  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\LibrarianAddDlg.sbr

     文件     143438  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\LibrarianDlg.obj

     文件      22081  2012-03-02 08:10  SchoolLibrary\SchoolLibrary1\Debug\LibrarianDlg.sbr

     文件    4194304  2012-02-29 17:12  SchoolLibrary\SchoolLibrary1\Debug\Library.mdb

     文件       9936  2012-02-19 14:08  SchoolLibrary\SchoolLibrary1\Debug\LoginDlg.obj

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

评论

共有 条评论