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

📄 mainframe.cpp

📁 一个VC写的药品管理系统
💻 CPP
字号:
// MainFrame.cpp : implementation file
//

#include "stdafx.h"
#include "medicine.h"
#include "MainFrame.h"
#include "UserCode.h"
//UserMag.h"
#include "MediStore.h"
#include "MediEdit.h"
#include "MediFind.h"
#include "MediSale.h"
#include "SaleInfo.h"
#include "UserMag.h"
#include "Lose.h"
#include "OutDate.h"
#include "MediEdit.h"
#include "Profit.h"

#include "User.h"

extern CUser glUser;

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

/////////////////////////////////////////////////////////////////////////////
// CMainFrame dialog


CMainFrame::CMainFrame(CWnd* pParent /*=NULL*/)
	: CDialog(CMainFrame::IDD, pParent)
{
	//{{AFX_DATA_INIT(CMainFrame)
		// NOTE: the ClassWizard will add member initialization here
	//}}AFX_DATA_INIT
}


void CMainFrame::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CMainFrame)
		// NOTE: the ClassWizard will add DDX and DDV calls here
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CMainFrame, CDialog)
	//{{AFX_MSG_MAP(CMainFrame)
	ON_COMMAND(ID_USERCODE, OnUsercode)
	ON_COMMAND(ID_MEDISTORE, OnMediStore)
	ON_COMMAND(ID_MEDIFIND, OnMediFind)
	ON_COMMAND(ID_MEDISELL, OnMediSell)
	ON_COMMAND(ID_SALEINFO, OnSaleInfo)
	ON_COMMAND(ID_USERMAG, OnUserMag)
	ON_COMMAND(ID_LOSE, OnLose)
	ON_COMMAND(ID_LASTDATEFIND, OnLastDateFind)
	ON_COMMAND(ID_MEDIEDIT, OnMediEdit)
	ON_COMMAND(ID_PROFIT, OnProfit)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CMainFrame message handlers

int CMainFrame::DoModal() 
{
	// TODO: Add your specialized code here and/or call the base class
	
	return CDialog::DoModal();
}


/*void CMainFrame::OnChangePwd() 
{
	CUserCode dlg;
	dlg.m_LoginName = user.LoginName;
	dlg.DoModal();	
}*/

void CMainFrame::OnUsercode() 
{
	// TODO: Add your command handler code here
	CUserCode dlg;
	//glUser要在前面用extern CUser curUser;来定义外围变量并给其赋值
	dlg.m_LoginId=glUser.UserId;
	dlg.DoModal();	
}


void CMainFrame::OnMediStore() 
{
	// TODO: Add your command handler code here
	CMediStore dlg;
	//glUser要在前面用extern CUser curUser;来定义外围变量并给其赋值
	dlg.glUser=glUser;
	dlg.DoModal();
}


void CMainFrame::OnMediFind() 
{
	// TODO: Add your command handler code here
    CMediFind dlg;
	dlg.DoModal();
}

void CMainFrame::OnMediSell() 
{
	// TODO: Add your command handler code here
	CMediSale dlg;
	dlg.glUser=glUser;
	dlg.DoModal();
}

void CMainFrame::OnSaleInfo() 
{
	// TODO: Add your command handler code here
	CSaleInfo dlg;
	dlg.DoModal();
}

void CMainFrame::OnUserMag() 
{
	// TODO: Add your command handler code here
	CUserMag dlg;
	dlg.DoModal();
}

void CMainFrame::OnLose() 
{
	// TODO: Add your command handler code here
	CLose dlg;
	dlg.DoModal();
	
}

void CMainFrame::OnLastDateFind() 
{
	// TODO: Add your command handler code here
	COutDate dlg;
	dlg.DoModal();
}


void CMainFrame::OnMediEdit() 
{
	// TODO: Add your command handler code here
		CMediEdit dlg;
	dlg.DoModal();
}

void CMainFrame::OnProfit() 
{
	// TODO: Add your command handler code here
	CProfit dlg;
	dlg.DoModal();
}

⌨️ 快捷键说明

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