Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
deletebumen.cpp
Package: salarysystem.rar [view]
Upload User: xz12345
Upload Date: 2007-09-12
Package Size: 7437k
Code Size: 2k
Category:
ADO-ODBC
Development Platform:
Visual C++
- // deletebumen.cpp : implementation file
- //
- #include "stdafx.h"
- #include "工资.h"
- #include "deletebumen.h"
- #include "bumenxinxi.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // deletebumen dialog
- deletebumen::deletebumen(CWnd* pParent /*=NULL*/)
- : CDialog(deletebumen::IDD, pParent)
- {
- //{{AFX_DATA_INIT(deletebumen)
- m_bmid = _T("");
- //}}AFX_DATA_INIT
- }
- void deletebumen::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(deletebumen)
- DDX_Text(pDX, IDC_EDIT1, m_bmid);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(deletebumen, CDialog)
- //{{AFX_MSG_MAP(deletebumen)
- ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
- ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // deletebumen message handlers
- void deletebumen::OnButton1()
- {
- UpdateData(TRUE);
- bumenxinxi box;
- box.bmid=m_bmid;
- ADOConn m_AdoConn;
- _bstr_t vSQL;
- vSQL="select empid from yuangongxinxi where yuangongxinxi.depid='"+m_bmid+"'";
- m_AdoConn.OnInitADOConn();
- _RecordsetPtr m_pRecordset;
- m_pRecordset = m_AdoConn.GetRecordSet(vSQL);
- if (m_pRecordset->adoEOF)
- {box.sql_delete();
- CDialog::OnOK();}
- else
- MessageBox("sorry,you must delete the empolyee that blong to this department first!");
- //执行INSERT语句
- m_AdoConn.ExecuteSQL(vSQL);
- //断开与数据库的连接
- // m_AdoConn.ExitConnect();
- // TODO: Add your control notification handler code here
- }
- void deletebumen::OnButton2()
- {
- CDialog::OnCancel();
- // TODO: Add your control notification handler code here
- }