dformat.cpp

来自「固定资产管理系统」· C++ 代码 · 共 72 行

CPP
72
字号
// DFormat.cpp : implementation file
//

#include "stdafx.h"
#include "gdzc.h"
#include "DFormat.h"

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

/////////////////////////////////////////////////////////////////////////////
// CDFormat dialog


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


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


BEGIN_MESSAGE_MAP(CDFormat, CDialog)
	//{{AFX_MSG_MAP(CDFormat)
	ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CDFormat message handlers

void CDFormat::OnOK() 
{
	// TODO: Add extra validation here
	
	//CDialog::OnOK();
}

void CDFormat::OnButton3() 
{
	this->OnCancel();	
}

void CDFormat::OnButton1() 
{
	if(MessageBox("确定执行初始化操作吗?","系统提示",MB_OKCANCEL|MB_ICONQUESTION)!=1)
		return;
	RxRecordset rst;
	CString sSQL,sDateName[]={"计提表","固定资产减少表","固定资产信息表"};
	for(int i=0;i<3;i++)
	{
		sSQL.Format("DELETE FROM %s",sDateName[i]);
		rst.Open(sSQL,adCmdText);
	}
	MessageBox("初始化操作完成!","系统提示",MB_OK|MB_ICONINFORMATION);

}

⌨️ 快捷键说明

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