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

📄 borrowmanage.cpp

📁 java 大作业 《处方跟踪系统》源代码 gui界面
💻 CPP
字号:
// BorrowManage.cpp : implementation file
//

#include "stdafx.h"
#include "libraryMS.h"
#include "BorrowManage.h"
#include "BorrowBook.h"
#include "Borrow.h"
#include "ReturnBook.h"


/////////////////////////////////////////////
#include "column.h"
#include "columns.h"
////////////////////////////////////////////


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

/////////////////////////////////////////////////////////////////////////////
// CBorrowManage dialog


CBorrowManage::CBorrowManage(CWnd* pParent /*=NULL*/)
	: CDialog(CBorrowManage::IDD, pParent)
{
	//{{AFX_DATA_INIT(CBorrowManage)
	m_qborrow = _T("");
	//}}AFX_DATA_INIT
}


void CBorrowManage::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CBorrowManage)
	DDX_Control(pDX, IDC_Condition, m_condition);
	DDX_Control(pDX, IDC_QueryAll, m_QueryAll);
	DDX_Text(pDX, IDC_QBorrow_EDIT, m_qborrow);
	DDX_Control(pDX, IDC_DATAGRID, m_datagrid);
	DDX_Control(pDX, IDC_ADODC1, m_adodc);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CBorrowManage, CDialog)
	//{{AFX_MSG_MAP(CBorrowManage)
	ON_COMMAND(ID_MENUITEM32808, OnMenuitem32808)
	ON_COMMAND(ID_MENUITEM32809, OnMenuitem32809)
	ON_BN_CLICKED(IDC_Query, OnQuery)
	ON_BN_CLICKED(IDC_QueryAll, OnQueryAll)
	ON_COMMAND(ID_MENUITEM32810, OnMenuitem32810)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CBorrowManage message handlers

void CBorrowManage::OnMenuitem32808() 
{
	// TODO: Add your command handler code here
	OnOK();
	
}

void CBorrowManage::OnMenuitem32809() 
{
	// TODO: Add your command handler code here
	CBorrowBook BorrowBook_dlg;
	BorrowBook_dlg.DoModal();
	
}

BOOL CBorrowManage::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	m_condition.SetCurSel(0);
	UpdateData(false);
    m_adodc.Refresh();
	
/////////////////////////////////////////////////////////调节列表宽度
	variant_t vIndex;
	vIndex = long(0);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(60);
	vIndex = long(1);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(42);
	vIndex = long(2);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(200);
	vIndex = long(3);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(70);
	vIndex = long(4);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(120);
	vIndex = long(5);
	m_datagrid.GetColumns().GetItem(vIndex).SetWidth(120);
//////////////////////////////////////////////////////////////
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CBorrowManage::OnQuery() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	m_adodc.SetRecordSource("SELECT IDReader as 借书证号, NameReader as 姓名 , Title as 书名, ISBN, DateB as 借书日期, KeepTime as  持书期限 FROM t_Borrow where IDReader = '"+m_qborrow+"'");
	m_adodc.Refresh();
	
}

void CBorrowManage::OnQueryAll() 
{
	// TODO: Add your control notification handler code here
	m_adodc.SetRecordSource("SELECT IDReader as 借书证号, NameReader as 姓名 , Title as 书名, ISBN, DateB as 借书日期, KeepTime as  持书期限 FROM t_Borrow ");
	m_adodc.Refresh();
}

void CBorrowManage::OnMenuitem32810() 
{
	// TODO: Add your command handler code here
	CReturnBook ReturnBook_dlg;
	ReturnBook_dlg.DoModal();
	
}

⌨️ 快捷键说明

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