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

📄 borbackdlog.cpp

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

#include "stdafx.h"
#include "图书管理.h"
#include "borbackdlog.h"
#include"borrbackedit.h"
#include"xitongdlg.h"
#include"selborrow9.h"
//#include"Users.h"
//#include"grobe.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// borbackdlog dialog
extern CUsers use;

borbackdlog::borbackdlog(CWnd* pParent /*=NULL*/)
	: CDialog(borbackdlog::IDD, pParent)
{
	//{{AFX_DATA_INIT(borbackdlog)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
	str="-1";
}


void borbackdlog::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(borbackdlog)
	DDX_Control(pDX, IDC_ADODC1, m_adoc);
	DDX_Control(pDX, IDC_DATAGRID1, m_grid);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(borbackdlog, CDialog)
	//{{AFX_MSG_MAP(borbackdlog)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// borbackdlog message handlers

void borbackdlog::OnButton1() 
{
	// TODO: Add your control notification handler code here
 borrbackedit dlg;
 CString str2,str3;
 
 str2=m_grid.GetItem(1);
 str3=m_grid.GetItem(2);
 dlg.m_bookno=str;
 dlg.m_readno=str2;
 dlg.m_bortime=atoi(str3);
 
 if(str=="-1")
 {
	 MessageBox("请选择要还的书");
	 return ;
 }

 dlg.DoModal();
 m_adoc.Refresh();	
}

void borbackdlog::OnOK() 
{
	// TODO: Add extra validation here
 borrbackedit dlg;
 dlg.DoModal();
 m_adoc.Refresh();
	
	
}

void borbackdlog::OnCancel() 
{
	// TODO: Add extra cleanup here
	xitongdlg dlg;
	dlg.DoModal();
    m_adoc.Refresh();
	
	
	
}

BEGIN_EVENTSINK_MAP(borbackdlog, CDialog)
    //{{AFX_EVENTSINK_MAP(borbackdlog)
	ON_EVENT(borbackdlog, IDC_DATAGRID1, -600 /* Click */, OnClickDatagrid1, VTS_NONE)
	//}}AFX_EVENTSINK_MAP
END_EVENTSINK_MAP()

void borbackdlog::OnClickDatagrid1() 
{
	// TODO: Add your control notification handler code here
	str=m_grid.GetItem(0);
}

BOOL borbackdlog::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
   if(use.User_type==2)
	{
		GetDlgItem(IDOK)->EnableWindow(false);
        GetDlgItem(IDC_BUTTON1)->EnableWindow(false); 
		
	}

	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void borbackdlog::OnButton2() 
{
	// TODO: Add your control notification handler code here
	selborrow9 dlg;
	dlg.DoModal();
   // m_adoc.Refresh();
	
}

⌨️ 快捷键说明

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