www.pudn.com > shangdianguanlixitong.rar > shopmanage.cpp, change:2005-06-24,size:5165b


// shopmanage.cpp : implementation file 
// 
 
#include "stdafx.h" 
#include "shop.h" 
#include "shopmanage.h" 
#include "shopDlg.h" 
#include "deptment.h" 
#include "deptmentquery.h" 
#include "goodinformation.h" 
#include "good.h" 
#include "offer.h" 
#include "provide.h" 
#include "consumer.h" 
#include "list.h" 
#include "listinformation.h" 
#include <fstream.h> 
#include <time.h> 
#include <stdlib.h> 
 
#ifdef _DEBUG 
#define new DEBUG_NEW 
#undef THIS_FILE 
static char THIS_FILE[] = __FILE__; 
#endif 
 
struct tm *studentptr; 
 
///////////////////////////////////////////////////////////////////////////// 
// Cshopmanage dialog 
 
 
Cshopmanage::Cshopmanage(CWnd* pParent /*=NULL*/) 
	: CDialog(Cshopmanage::IDD, pParent) 
{ 
	//{{AFX_DATA_INIT(Cshopmanage) 
		// NOTE: the ClassWizard will add member initialization here 
	//}}AFX_DATA_INIT 
} 
 
 
void Cshopmanage::DoDataExchange(CDataExchange* pDX) 
{ 
	CDialog::DoDataExchange(pDX); 
	//{{AFX_DATA_MAP(Cshopmanage) 
	DDX_Control(pDX, IDC_ANIMATE1, m_avi); 
	//}}AFX_DATA_MAP 
} 
 
 
BEGIN_MESSAGE_MAP(Cshopmanage, CDialog) 
	//{{AFX_MSG_MAP(Cshopmanage) 
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1) 
	ON_BN_CLICKED(IDC_BUTTON2, OnButton2) 
	ON_BN_CLICKED(IDC_BUTTON6, OnButton6) 
	ON_COMMAND(ID_MENUITEM32776, OnMenuitem32776) 
	ON_COMMAND(ID_MENUITEM32777, OnMenuitem32777) 
	ON_COMMAND(ID_MENUITEM32774, OnMenuitem32774) 
	ON_COMMAND(ID_MENUITEM32775, OnMenuitem32775) 
	ON_COMMAND(ID_MENUITEM32778, OnMenuitem32778) 
	ON_COMMAND(ID_MENUITEM32779, OnMenuitem32779) 
	ON_COMMAND(ID_MENUITEM32784, OnMenuitem32784) 
	ON_COMMAND(ID_jintuihuo, Onjintuihuo) 
	ON_COMMAND(ID_MENUITEM32786, OnMenuitem32786) 
	ON_COMMAND(ID_MENUITEM32787, OnMenuitem32787) 
	ON_COMMAND(ID_MENUITEM32780, OnMenuitem32780) 
	ON_COMMAND(ID_MENUITEM32781, OnMenuitem32781) 
	ON_COMMAND(ID_MENUITEM32782, OnMenuitem32782) 
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3) 
	ON_BN_CLICKED(IDC_BUTTON4, OnButton4) 
	ON_BN_CLICKED(IDC_BUTTON5, OnButton5) 
	ON_BN_CLICKED(IDC_BUTTON7, OnButton7) 
	//}}AFX_MSG_MAP 
END_MESSAGE_MAP() 
 
///////////////////////////////////////////////////////////////////////////// 
// Cshopmanage message handlers 
 
BOOL Cshopmanage::OnInitDialog()  
{ 
	CDialog::OnInitDialog(); 
	m_avi.Open("Jon.avi"); 
	m_avi.Play(0,-1,-1); 
 
	 time_t lt; 
	 lt = time(NULL); 
	 studentptr = localtime(<); 
	 
	// TODO: Add extra initialization here 
	 
	return TRUE;  // return TRUE unless you set the focus to a control 
	              // EXCEPTION: OCX Property Pages should return FALSE 
} 
 
void Cshopmanage::OnButton1()  
{ 
	CShopDlg dlg; 
	dlg.DoModal(); 
	// TODO: Add your control notification handler code here 
	 
} 
 
void Cshopmanage::OnButton2()  
{ 
	Cdeptment dlg; 
	dlg.DoModal(); 
	// TODO: Add your control notification handler code here 
	 
} 
 
void Cshopmanage::OnButton6()  
{ 
	CDialog::OnOK(); 
	// TODO: Add your control notification handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32776()  
{ 
	Cdeptmentquery dlg; 
	dlg.DoModal(); 
 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32777()  
{ 
	CShopDlg dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32774()  
{ 
	Cdeptment dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32775()  
{ 
	CShopDlg dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32778()  
{ 
	CShopDlg dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32779()  
{ 
	Cgoodinformation dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32783()  
{ 
	Cgood dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32784()  
{ 
	Coffer dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::Onjintuihuo()  
{ 
	Cprovide dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32786()  
{ 
	Cconsumer dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32787()  
{ 
	Clist dlg; 
	dlg.DoModal(); 
	// TODO: Add your command handler code here 
	 
} 
 
void Cshopmanage::OnMenuitem32780()  
{ 
    Clistinformation dlg; 
	dlg.DoModal(); 
} 
 
void Cshopmanage::OnMenuitem32781()  
{ 
    Cconsumer dlg; 
	dlg.DoModal(); 
} 
 
void Cshopmanage::OnMenuitem32782()  
{ 
    Coffer dlg; 
	dlg.DoModal(); 
} 
 
void Cshopmanage::OnButton3()  
{ 
	 Coffer dlg; 
	 dlg.DoModal(); 
	 
} 
 
void Cshopmanage::OnButton4()  
{ 
    Cconsumer dlg; 
	dlg.DoModal(); 
} 
 
void Cshopmanage::OnButton5()  
{ 
    Cgoodinformation dlg; 
	dlg.DoModal(); 
} 
 
void Cshopmanage::OnButton7()  
{ 
	system( "cd f:" ); 
	system( "cd shop"); 
	system( "copy shop.mdb databf\\shopcopy.mdb"); 
 
	/////////////////////////////////////////////////////// 
  	     ofstream out("databf\\diary.txt",ios::trunc); 
	     out<<"备份开始时间:"<<asctime(studentptr)<<endl; 
	     out.close(); 
	 
}