-
大小: 6.61MB文件類型: .rar金幣: 2下載: 0 次發(fā)布日期: 2023-10-16
- 語(yǔ)言: 其他
- 標(biāo)簽:
資源簡(jiǎn)介
合同管理系統(tǒng),數(shù)據(jù)庫(kù)開(kāi)發(fā)實(shí)例,簡(jiǎn)單的數(shù)據(jù)庫(kù)程序,用于學(xué)習(xí)和交流

代碼片段和文件信息
//?BAK.cpp?:?implementation?file
//
#include?“stdafx.h“
#include?“htglxt.h“
#include?“BAK.h“
#include?“ExternDllHeader.h“
#include?“DMain.h“
#ifdef?_DEBUG
#define?new?DEBUG_NEW
#undef?THIS_FILE
static?char?THIS_FILE[]?=?__FILE__;
#endif
extern?CHtglxtApp?theApp;
/////////////////////////////////////////////////////////////////////////////
//?CBAK?dialog
CBAK::CBAK(CWnd*?pParent?/*=NULL*/)
:?CDialog(CBAK::IDD?pParent)
{
//{{AFX_DATA_INIT(CBAK)
//}}AFX_DATA_INIT
}
void?CBAK::DoDataExchange(CDataExchange*?pDX)
{
CDialog::DoDataExchange(pDX);
//{{AFX_DATA_MAP(CBAK)
DDX_Control(pDX?IDC_STATIP?m_StaTip);
DDX_Control(pDX?IDC_STAFRAM?m_ButFram);
DDX_Control(pDX?IDC_BUTTON2?m_Button);
DDX_Control(pDX?IDC_STATIT?m_StaTit);
DDX_Control(pDX?IDC_EDTPATH?m_EdtPach);
//}}AFX_DATA_MAP
}
BEGIN_MESSAGE_MAP(CBAK?CDialog)
//{{AFX_MSG_MAP(CBAK)
ON_BN_CLICKED(IDC_BUTTON2?OnButton2)
ON_BN_CLICKED(IDC_BUTTON1?OnButton1)
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
//?CBAK?message?handlers
void?CBAK::OnButton2()?
{
CString?sPachsSQLsName;
m_EdtPach.GetWindowText(sPach);
if(sPach.IsEmpty())
{
MessageBox(“請(qǐng)輸入備份文件的路徑和名稱!““系統(tǒng)提示“MB_OK|MB_IConstop);
m_EdtPach.SetFocus();
}
m_StaTit.ShowWindow(SW_SHOW);
this->UpdateWindow();
if(m_sCaption==“數(shù)據(jù)備份“)
{
sSQL.Format(“BACKUP?DATAbase?htglxt?TO?DISK=‘%s‘“sPach);
if(rst.Open(sSQLadCmdText)==false)
{
MessageBox(“您輸入路徑不完整或文件夾不存在!請(qǐng)輸入完整的路徑及文件名!““系統(tǒng)提示“MB_OK|MB_IConstop);
return;
}
}
else
{
ado.Close();
cnn=NULL;
if(ado.SetConnection(“Provider=SQLOLEDB.1;Integrated?Security=SSPI;Persist?Security?Info=False;Initial?Catalog=master;Data?Source=(local)“)==false)
return;
cnn=ado.GetConnection();
sSQL.Format(?“RESTORE?DATAbase?htglxt?FROM?DISK?=?‘%s‘“sPach);
if(rst.Open(sSQLadCmdText)==false)
return;
ado.Close();
cnn=NULL;
this->UpdateWindow();
if(ado.SetConnection(“Provider=SQLOLEDB.1;Integrated?Security=SSPI;Persist?Security?Info=False;Initial?Catalog=htglxt;Data?Source=(local)“)==false)
{
this->m_StaTit.SetWindowText(“恢復(fù)失敗!請(qǐng)重新運(yùn)行系統(tǒng)!“);
return?;
}
cnn=ado.GetConnection();
}
this->UpdateWindow();
this->m_StaTit.ShowWindow(SW_HIDE);
CString?sMsg;
if(m_sCaption==“數(shù)據(jù)備份“)
{
sMsg.Format(“%s成功!“m_sCaption.Right(4));
MessageBox(sMsg“系統(tǒng)提示“MB_OK|MB_ICONINFORMATION);
}
else
{
sMsg.Format(“%s成功!需要重新啟動(dòng)才可以生效!“m_sCaption.Right(4));
MessageBox(sMsg“系統(tǒng)提示“MB_OK|MB_ICONINFORMATION);
CDMain?*?Parent?=(CDMain*)this->GetParent();
this->OnCancel();
try{
Parent->Close();
theApp.m_pMainWnd->DestroyWindow();
}
catch(...)
{
}
}
}
BOOL?CBAK::OnInitDialog()?
{
CDialog::OnInitDialog();
this->SetWindowText(m_sCaption);
CString?tooltiptext;
tooltiptext=m_sCaption.Right(4);
this->m_ButFram.SetWindowText(“數(shù)據(jù)“+tooltiptext);
th
?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????文件???????3953??2004-05-24?12:48??合同管理系統(tǒng)\源程序\BAK.cpp
?????文件???????1386??2004-05-13?10:53??合同管理系統(tǒng)\源程序\BAK.h
?????文件???????2353??2004-05-17?13:22??合同管理系統(tǒng)\源程序\ba
?????文件???????1311??2004-05-07?08:38??合同管理系統(tǒng)\源程序\ba
?????文件???????1727??2004-05-17?12:44??合同管理系統(tǒng)\源程序\ba
?????文件???????1445??2004-05-09?17:24??合同管理系統(tǒng)\源程序\ba
?????文件????????939??2004-05-17?12:44??合同管理系統(tǒng)\源程序\ba
?????文件???????1285??2004-04-02?12:51??合同管理系統(tǒng)\源程序\ba
?????文件???????1090??2004-05-21?14:25??合同管理系統(tǒng)\源程序\ba
?????文件???????1135??2004-05-21?10:32??合同管理系統(tǒng)\源程序\ba
?????文件???????4128??2004-06-05?10:55??合同管理系統(tǒng)\源程序\Dba
?????文件???????1806??2004-05-19?11:23??合同管理系統(tǒng)\源程序\Dba
?????文件???????1671??2004-05-24?13:02??合同管理系統(tǒng)\源程序\DFormat.cpp
?????文件???????1253??2004-05-24?12:57??合同管理系統(tǒng)\源程序\DFormat.h
?????文件???????2572??2004-05-24?13:08??合同管理系統(tǒng)\源程序\DLogin.cpp
?????文件???????1312??2004-05-24?13:06??合同管理系統(tǒng)\源程序\DLogin.h
?????文件??????57856??2006-07-23?11:17??合同管理系統(tǒng)\源程序\htglxt.opt
?????文件???????2136??2004-05-24?13:28??合同管理系統(tǒng)\源程序\DMain.h
?????文件???????4669??2004-06-05?11:31??合同管理系統(tǒng)\源程序\DOp.cpp
?????文件???????1657??2004-05-24?13:35??合同管理系統(tǒng)\源程序\DOp.h
?????文件???????6593??2004-06-05?09:22??合同管理系統(tǒng)\源程序\DWLDW.cpp
?????文件???????1864??2004-05-19?08:34??合同管理系統(tǒng)\源程序\DWLDW.h
?????文件???????6005??2004-06-05?11:19??合同管理系統(tǒng)\源程序\Dblzfsx.cpp
?????文件???????1917??2004-05-22?15:43??合同管理系統(tǒng)\源程序\Dblzfsx.h
?????文件???????4988??2004-06-05?09:22??合同管理系統(tǒng)\源程序\Dbmxx.cpp
?????文件???????1707??2004-05-18?13:02??合同管理系統(tǒng)\源程序\Dbmxx.h
?????文件???????7789??2004-06-05?09:22??合同管理系統(tǒng)\源程序\Dhtgg.cpp
?????文件???????1977??2004-05-22?10:50??合同管理系統(tǒng)\源程序\Dhtgg.h
?????文件???????9914??2004-06-05?11:00??合同管理系統(tǒng)\源程序\Dhtqd.cpp
?????文件???????2079??2004-05-27?14:00??合同管理系統(tǒng)\源程序\Dhtqd.h
............此處省略187個(gè)文件信息
評(píng)論
共有 條評(píng)論