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

📄 borrbackedit.cpp

📁 图书管理系统可进行查询,添加,修改,等操作 用树行结构为图书馆进行图书分类
💻 CPP
字号:
// borrbackedit.cpp : implementation file
//

#include "stdafx.h"
#include "图书管理.h"
#include "borrbackedit.h"
#include"borrow.h"

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

/////////////////////////////////////////////////////////////////////////////
// borrbackedit dialog


borrbackedit::borrbackedit(CWnd* pParent /*=NULL*/)
	: CDialog(borrbackedit::IDD, pParent)
{
	//{{AFX_DATA_INIT(borrbackedit)
	m_bookno = _T("");
	m_readno = _T("");
	m_money = _T("");
	m_bortime = 0;
	m_backtime = 0;
	
	//}}AFX_DATA_INIT
}


void borrbackedit::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(borrbackedit)
	DDX_Text(pDX, IDC_EDIT1, m_bookno);
	DDX_Text(pDX, IDC_EDIT2, m_readno);
	DDX_Text(pDX, IDC_EDIT5, m_money);
	DDX_Text(pDX, IDC_EDIT3, m_bortime);
	DDX_Text(pDX, IDC_EDIT4, m_backtime);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(borrbackedit, CDialog)
	//{{AFX_MSG_MAP(borrbackedit)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// borrbackedit message handlers

void borrbackedit::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(true);

	Cborrow b;
	b.bookno=m_bookno;
	b.readno=m_readno;
    b.btime=m_bortime;
	if(b.Havename(m_bookno,m_readno)==1)
	b.sql_insert();
	else
	{
		MessageBox("无此信息");
		return ;
	}
	
	CDialog::OnOK();
}

void borrbackedit::OnButton3() 
{
	// TODO: Add your control notification handler code here

	CString str2;
	UpdateData(true);
	Cborrow b;
	b.btime=m_bortime;
	b.htime.Format("%d",m_backtime);
    str2.Format("%d",(m_backtime-b.btime)*2);
		b.money=(m_backtime-b.btime)*2;
		CString str;
		str="你需要交罚"+str2;
		MessageBox(str);
		b.sql_update(m_bookno,m_readno);


	    CDialog::OnOK();

}

⌨️ 快捷键说明

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