insertkaoqin.cpp
上传用户:xz12345
上传日期:2007-09-12
资源大小:7437k
文件大小:3k
- // insertkaoqin.cpp : implementation file
- //
- #include "stdafx.h"
- #include "工资.h"
- #include "insertkaoqin.h"
- #include "kaoqin.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // insertkaoqin dialog
- insertkaoqin::insertkaoqin(CWnd* pParent /*=NULL*/)
- : CDialog(insertkaoqin::IDD, pParent)
- {
- //{{AFX_DATA_INIT(insertkaoqin)
- m_empid = _T("");
- m_psjiaban = _T("");
- m_zmjiaban = _T("");
- m_fdjiaban = _T("");
- m_chidaon = _T("");
- m_zaotuin = _T("");
- //}}AFX_DATA_INIT
- }
- void insertkaoqin::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(insertkaoqin)
- DDX_Text(pDX, IDC_EDIT1, m_empid);
- DDX_Text(pDX, IDC_EDIT4, m_psjiaban);
- DDX_Text(pDX, IDC_EDIT5, m_zmjiaban);
- DDX_Text(pDX, IDC_EDIT6, m_fdjiaban);
- DDX_Text(pDX, IDC_EDIT2, m_chidaon);
- DDX_Text(pDX, IDC_EDIT3, m_zaotuin);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(insertkaoqin, CDialog)
- //{{AFX_MSG_MAP(insertkaoqin)
- ON_BN_CLICKED(IDC_BUTTON1, OnButton1)
- ON_BN_CLICKED(IDC_BUTTON6, OnButton6)
- ON_BN_CLICKED(IDC_BUTTON7, OnButton7)
- ON_BN_CLICKED(IDC_BUTTON2, OnButton2)
- ON_BN_CLICKED(IDC_BUTTON3, OnButton3)
- ON_BN_CLICKED(IDC_BUTTON4, OnButton4)
- ON_BN_CLICKED(IDC_BUTTON5, OnButton5)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // insertkaoqin message handlers
- void insertkaoqin::OnButton1()
- {
- UpdateData(TRUE);
- kaoqin ra;
- ra.empid=m_empid;
- ra.chidaon=m_chidaon;
- ra.sql_updatechidaon();
-
- // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton6()
- {
- ADOConn m_AdoConn;
- _bstr_t vSQL;
- m_AdoConn.OnInitADOConn();
- //执行INSERT语句
-
- //断开与数据库的连接
- vSQL="DELETE FROM yuangonggongzi";
- m_AdoConn.ExecuteSQL(vSQL);
- vSQL="EXEC base7";
- m_AdoConn.ExecuteSQL(vSQL);
- m_AdoConn.ExitConnect();
- CDialog::OnOK();
- // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton7()
- {
- CDialog::OnOK();
- // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton2()
- {
- UpdateData(TRUE);
- kaoqin ra;
- ra.empid=m_empid;
- ra.zaotuin=m_zaotuin;
- ra.sql_updatezaotui(); // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton3()
- {
- UpdateData(TRUE);
- kaoqin ra;
- ra.empid=m_empid;
- ra.psjiaban=m_psjiaban;
- ra.sql_updatepsjiaban();
- // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton4()
- {
- UpdateData(TRUE);
- kaoqin ra;
- ra.empid=m_empid;
- ra.zmjiaban=m_zmjiaban;
- ra.sql_updatezmjiaban();
- // TODO: Add your control notification handler code here
-
- }
- void insertkaoqin::OnButton5()
- {
- UpdateData(TRUE);
- kaoqin ra;
- ra.empid=m_empid;
- ra.fdjiaban=m_fdjiaban;
- ra.sql_updatefdjiaban();
- // TODO: Add your control notification handler code here
-
- }