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

📄 server.cpp

📁 应用vc+sqlserver做的一个保卫处数据管理系统
💻 CPP
字号:
// Server.cpp : implementation file
//

#include "stdafx.h"
#include "横店集团保卫人员管理系统.h"
#include "Server.h"
#include "ss.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
extern CString Server;
/////////////////////////////////////////////////////////////////////////////
// CServer dialog


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


void CServer::DoDataExchange(CDataExchange* pDX)
{
	CDialog::DoDataExchange(pDX);
	//{{AFX_DATA_MAP(CServer)
	DDX_Text(pDX, IDC_EDIT1, m_server);
	//}}AFX_DATA_MAP
}


BEGIN_MESSAGE_MAP(CServer, CDialog)
	//{{AFX_MSG_MAP(CServer)
	ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
	//}}AFX_MSG_MAP
END_MESSAGE_MAP()

/////////////////////////////////////////////////////////////////////////////
// CServer message handlers

BOOL CServer::OnInitDialog() 
{
	CDialog::OnInitDialog();
	
    CSs s;
	s.Open();
	m_server=s.m_Server;
	s.Close();
	UpdateData(false);
	
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}

void CServer::OnButton1() 
{
	UpdateData(true);
    if(!m_server.IsEmpty())
	{
     CSs s;
	 s.Open();
	 s.Edit();
	 s.m_Server=m_server;
	 s.Update();
	 s.Close();
	 Server=m_server;
	 this->OnOK();
	}
	else
		MessageBox("请选择服务器");
}

⌨️ 快捷键说明

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