資源簡介
基于VC6.0 的MFC框架開發(fā)的圖書管理系統(tǒng),可進行圖書借閱管理,圖書入庫出庫等功能

代碼片段和文件信息
//?DlgAddBook.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“LibrarySystem.h“
#include?“DlgAddBook.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
//?CDlgAddBook?dialog
CDlgAddBook::CDlgAddBook(CWnd*?pParent?/*=NULL*/)
:?CDialog(CDlgAddBook::IDD?pParent)
{
//UpdateData(false);
//{{AFX_DATA_INIT(CDlgAddBook)
m_strAuthor?=?_T(““);
m_strID?=?_T(““);
m_strPublishing?=?_T(““);
m_strtitle?=?_T(““);
m_nPrice?=?0.0;
m_strType?=?_T(““);
m_strStatus?=?_T(““);
//}}AFX_DATA_INIT
m_strCaption=“添加圖書“;
}
void?CDlgAddBook::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CDlgAddBook)
DDX_Control(pDX?IDC_COMBO_STATUS?m_ctrStatus);
DDX_Control(pDX?IDC_COMBO_TYPE?m_ctrType);
DDX_Text(pDX?IDC_EDIT_AUTHOR?m_strAuthor);
DDX_Text(pDX?IDC_EDIT_ID?m_strID);
DDX_Text(pDX?IDC_EDIT_PUBLISHING?m_strPublishing);
DDX_Text(pDX?IDC_EDIT_title?m_strtitle);
DDX_Text(pDX?IDC_EDIT_PRICE?m_nPrice);
DDX_CBString(pDX?IDC_COMBO_TYPE?m_strType);
DDX_CBString(pDX?IDC_COMBO_STATUS?m_strStatus);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CDlgAddBook?CDialog)
//{{AFX_MSG_MAP(CDlgAddBook)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CDlgAddBook?message?handlers
void?CDlgAddBook::OnOK()?
{
//?TODO:?Add?extra?validation?here
UpdateData(true);
int?flag=0;
int?flag1=0;
if(m_strtitle==““)
{
CString?str;
str.Format(“圖書名不能為空!“);
MessageBox(str);
}
else
flag1=1;
if(flag1==1)
{
if(m_strType==“書“)
flag=1;
else?if(m_strType==“報紙“)
flag=1;
else?if(m_strType==“期刊“)
flag=1;
else?if(m_strType==“資料“)
flag=1;
else
{
CString?str;
str.Format(“請?zhí)顚懻_的圖書種類!“);
MessageBox(str);
}
}
if(flag==1)
{
if(m_strStatus==“在庫“)
CDialog::OnOK();
else?if(m_strStatus==“維護“)
CDialog::OnOK();
else?if(m_strStatus==“出借“&&m_strCaption==“修改圖書“)
CDialog::OnOK();
else?if(m_strStatus==“出借“)
{
CString?str;
str.Format(“添加圖書時狀態(tài)不可為出借!“);
MessageBox(str);
}
else
CDialog::OnOK();
}
}
BOOL?CDlgAddBook::OnInitDialog()?
{
CDialog::OnInitDialog();
//?TODO:?Add?extra?initialization?here
SetWindowText(m_strCaption);
return?TRUE;??//?return?TRUE?unless?you?set?the?focus?to?a?control
??????????????//?EXCEPTION:?OCX?Property?Pages?should?return?FALSE
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2018-01-12?13:19??LibrarySystem\
?????目錄???????????0??2018-01-12?13:19??LibrarySystem\Debug\
?????文件???????22986??2018-01-12?10:01??LibrarySystem\Debug\DlgAddBook.obj
?????文件???????????0??2018-01-12?10:01??LibrarySystem\Debug\DlgAddBook.sbr
?????文件???????17834??2018-01-12?11:40??LibrarySystem\Debug\DlgBorrowBook.obj
?????文件???????????0??2018-01-12?11:40??LibrarySystem\Debug\DlgBorrowBook.sbr
?????文件???????16384??2018-01-12?01:22??LibrarySystem\Debug\DlgRegistered.obj
?????文件???????????0??2018-01-12?01:22??LibrarySystem\Debug\DlgRegistered.sbr
?????文件???????13822??2018-01-11?19:32??LibrarySystem\Debug\DlgSelectBook.obj
?????文件???????????0??2018-01-11?19:33??LibrarySystem\Debug\DlgSelectBook.sbr
?????文件???????19439??2018-01-12?09:39??LibrarySystem\Debug\DlgShowReader.obj
?????文件???????????0??2018-01-12?09:39??LibrarySystem\Debug\DlgShowReader.sbr
?????文件?????5514240??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystem.bsc
?????文件??????155740??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystem.exe
?????文件??????728496??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystem.ilk
?????文件???????14522??2018-01-12?01:48??LibrarySystem\Debug\LibrarySystem.obj
?????文件?????6945312??2018-01-11?10:29??LibrarySystem\Debug\LibrarySystem.pch
?????文件??????508928??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystem.pdb
?????文件????????4884??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystem.res
?????文件???????????0??2018-01-12?01:48??LibrarySystem\Debug\LibrarySystem.sbr
?????文件??????111895??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystemDlg.obj
?????文件???????????0??2018-01-12?13:19??LibrarySystem\Debug\LibrarySystemDlg.sbr
?????文件???????39727??2018-01-11?23:43??LibrarySystem\Debug\Publication.obj
?????文件???????????0??2018-01-11?23:43??LibrarySystem\Debug\Publication.sbr
?????文件???????10106??2018-01-12?09:39??LibrarySystem\Debug\Reader.obj
?????文件???????????0??2018-01-12?09:39??LibrarySystem\Debug\Reader.sbr
?????文件??????105642??2018-01-11?10:29??LibrarySystem\Debug\StdAfx.obj
?????文件?????1375193??2018-01-11?10:29??LibrarySystem\Debug\StdAfx.sbr
?????文件??????254976??2018-01-12?13:19??LibrarySystem\Debug\vc60.idb
?????文件??????397312??2018-01-12?13:19??LibrarySystem\Debug\vc60.pdb
?????文件????????2653??2018-01-12?10:01??LibrarySystem\DlgAddBook.cpp
............此處省略33個文件信息
- 上一篇:貪吃蛇VC6 MFC
- 下一篇:simuli
nk仿真模型到C語言的轉(zhuǎn)化
評論
共有 條評論