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

📄 cgzdiaoli.cpp

📁 用数据库ACCESS和VISUAL C++编程
💻 CPP
字号:
// Cgzdiaoli.cpp : implementation file
//

#include "stdafx.h"
#include "new3.h"
#include "Cgzdiaoli.h"
#include "Cgongziset.h"
#include "Czgtable.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CCgzdiaoli dialog


CCgzdiaoli::CCgzdiaoli(CWnd* pParent /*=NULL*/)
	: CDialog(CCgzdiaoli::IDD, pParent)
{
	//{{AFX_DATA_INIT(CCgzdiaoli)
	m_dlgzid = _T("");
	m_zztftimem = 0;
	m_zztftimey = 0;
	//}}AFX_DATA_INIT
}


void CCgzdiaoli::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CCgzdiaoli)
	DDX_Control(pDX, IDCANCEL, m_cancel2);
	DDX_Control(pDX, IDC_QUEDING2, m_queding2);
	DDX_Text(pDX, IDC_DLGZID, m_dlgzid);
	DDX_Text(pDX, IDC_ZZFTIMEM, m_zztftimem);
	DDX_Text(pDX, IDC_ZZFTIMEY, m_zztftimey);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CCgzdiaoli, CDialog)
	//{{AFX_MSG_MAP(CCgzdiaoli)
	ON_BN_CLICKED(IDC_QUEDING2, OnQueding2)
	ON_EN_CHANGE(IDC_DLGZID, OnChangeDlgzid)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CCgzdiaoli message handlers

void CCgzdiaoli::OnQueding2() 
{
	// TODO: Add your control notification handler code here
	UpdateData(true);
	CCgongziset gz2;
	CCzgtable tb2;
	tb2.Open();
	tb2.MoveFirst();
	if(m_dlgzid.IsEmpty())
	{
		MessageBox("请正确填写 !!!");
		return;
	}
	if((m_zztftimem>12)||(m_zztftimem<1))
	{
		MessageBox("月份输入有错!!!");
		return;
	}
	while(!tb2.IsEOF())
	{
		if(tb2.m_zhigongID==m_dlgzid)
		{
			tb2.Edit();
			tb2.m_tifatimey=m_zztftimem;
			tb2.m_tifatimey=m_zztftimem;//////////////////////////////////////////
			tb2.Update(); 
		}
			//tb2.Delete(); 
		tb2.MoveNext(); 
		
	}
	MessageBox("已经成功更改!!!!");
	return;
}

BOOL CCgzdiaoli::OnInitDialog() 
{
	CDialog::OnInitDialog();
	dl_bitmap1.LoadBitmap(IDB_BITMAP1);
	m_queding2.SetBitmap((HBITMAP)dl_bitmap1.m_hObject); 

	dl_bitmap2.LoadBitmap(IDB_BITMAP10);
	m_cancel2.SetBitmap((HBITMAP)dl_bitmap2.m_hObject); 
	// TODO: Add extra initialization here
	//GetDlgItem(IDC_QUEDING2)->EnableWindow(false);
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CCgzdiaoli::OnChangeDlgzid() 
{
	// TODO: If this is a RICHEDIT control, the control will not
	// send this notification unless you override the CDialog::OnInitDialog()
	// function and call CRichEditCtrl().SetEventMask()
	// with the ENM_CHANGE flag ORed into the mask.
	GetDlgItem(IDC_QUEDING2)->EnableWindow(true);
	// TODO: Add your control notification handler code here
	
}

BOOL CCgzdiaoli::DestroyWindow() 
{
	// TODO: Add your specialized code here and/or call the base class
	dl_bitmap1.DeleteObject();
	dl_bitmap2.DeleteObject(); 
	return CDialog::DestroyWindow();
}

⌨️ 快捷键说明

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