📄 voteselectclass.cpp
字号:
// VoteselectClass.cpp: implementation of the CVoteselectClass class.
//
//////////////////////////////////////////////////////////////////////
#include "stdafx.h"
#include "Office.h"
#include "VoteselectClass.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
CVoteselectClass::CVoteselectClass()
{
}
CVoteselectClass::~CVoteselectClass()
{
}
CString CVoteselectClass::GetVoteContent()
{
return voteContent;
}
CString CVoteselectClass::GetSelection()
{
return selection;
}
CString CVoteselectClass::GetStaff()
{
return staff;
}
COleDateTime CVoteselectClass::GetSelectDate()
{
return selectDate;
}
void CVoteselectClass::SetVoteContent(CString vVoteContent)
{
voteContent=vVoteContent;
}
void CVoteselectClass::SetSelection(CString vSelection)
{
selection=vSelection;
}
void CVoteselectClass::SetStaff(CString vStaff)
{
staff=vStaff;
}
void CVoteselectClass::SetSelectDate(COleDateTime vSelectDate)
{
selectDate=vSelectDate;
}
void CVoteselectClass::sqlInsert()
{
CString strSQL;
strSQL="select * from voteSelectRecord";
_RecordsetPtr m_pRecordset;
HRESULT hTRes;
hTRes = m_pRecordset.CreateInstance(_T("ADODB.Recordset"));
hTRes = m_pRecordset->Open((LPTSTR)strSQL.GetBuffer(130),
((COfficeApp*)AfxGetApp())->m_pConn.GetInterfacePtr(),
adOpenDynamic,adLockPessimistic,adCmdText);
if(SUCCEEDED(hTRes))
{
m_pRecordset->AddNew();
CString str;
m_pRecordset->PutCollect("staff",_variant_t(staff));
m_pRecordset->PutCollect("selectDate",_variant_t(selectDate));
m_pRecordset->PutCollect("voteContent",_variant_t(voteContent));
m_pRecordset->PutCollect("selection",_variant_t(selection));
m_pRecordset->Update();
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -