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

📄 setcenterteldlg.cpp

📁 电缆故障监控系统
💻 CPP
字号:
// SetCenterTeldlg.cpp : implementation file
//

#include "stdafx.h"
#include "remotemonitor.h"
#include "SetCenterTeldlg.h"

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

/////////////////////////////////////////////////////////////////////////////
// CSetCenterTeldlg dialog


CSetCenterTeldlg::CSetCenterTeldlg(CWnd* pParent /*=NULL*/)
	: CDialog(CSetCenterTeldlg::IDD, pParent)
{
	//{{AFX_DATA_INIT(CSetCenterTeldlg)
	m_tel = _T("");
	//}}AFX_DATA_INIT
}


void CSetCenterTeldlg::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CSetCenterTeldlg)
	DDX_Text(pDX, IDC_TEL, m_tel);
	DDV_MaxChars(pDX, m_tel, 13);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CSetCenterTeldlg, CDialog)
	//{{AFX_MSG_MAP(CSetCenterTeldlg)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CSetCenterTeldlg message handlers

BOOL CSetCenterTeldlg::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
	// TODO: Add extra initialization here
	if(!table.IsOpen())
	   table.Open();
    m_tel=table.m_telephone;
	UpdateData(FALSE);
	table.Close();
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CSetCenterTeldlg::OnOK() 
{
	// TODO: Add extra validation here
	UpdateData(TRUE);
	if(m_tel=="")
	{
		MessageBox("电话号码不能为空,请重新输入!","提示信息");
		return;
	}
	if(!table.IsOpen())
	   table.Open();
	table.Edit();
    table.m_telephone=m_tel;
	table.Update();
	table.Close();
	
	CDialog::OnOK();
}


⌨️ 快捷键说明

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