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

📄 recordsettable.cpp

📁 VC++开发的一个电话录音程序
💻 CPP
字号:
// RecordSetTable.cpp: implementation of the CRecordSetTable class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "phonerec.h"
#include "RecordSetTable.h"

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

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
extern CDatabase g_dbCust;	

CRecordSetTable::CRecordSetTable()
{
}

CRecordSetTable::~CRecordSetTable()
{
}

void CRecordSetTable::GetChannelInfoByLineID(CString &strphone, CString &strreEab, CString &strreMode, const int iLineID)
{
	CRecordset rs( &g_dbCust );

	CString strLineID;
	CString strReEab;
	CString strReMode;
	strLineID.Format("%d", iLineID );
	
	CString strSQL = "Select *  from LineSet where LineID = '"+ strLineID + "'" ;
	
	rs.Open( CRecordset::dynaset, _T( strSQL ) );

	while( !rs.IsEOF( ) )
	{
		rs.GetFieldValue( "PhoneNum", strphone );
		rs.GetFieldValue( "ReEable", strReEab );
		rs.GetFieldValue( "ReMode", strReMode );
		break;
	}
	rs.Close();	
	
	if( !strReEab.Compare("0") )
	{
		strreEab = "启动";
	}
	else
	{
		strreEab = "关闭";
	}

	if( !strReMode.Compare("0") )
	{
		strreMode = "压控";
	}
	else
	{
		strreMode = "声控";
	}	
}

void CRecordSetTable::UpdateLineSet(int iLineID, CString strPhone, int bReEab, int bReMode)
{
	CString strLineID;
	CString strReEab;
	CString strbReMode;
	strLineID.Format("%d",iLineID);
	strReEab.Format("%d", bReEab);
	strbReMode.Format("%d", bReMode);
	
	CString  strSQLUpdate = "UPDATE LineSet SET PhoneNum = '" + strPhone + "', ReEable = '"+ strReEab +"', ReMode = '"+ strbReMode +"' where  LineID = '" + strLineID+ "'"; ;
	g_dbCust.ExecuteSQL( strSQLUpdate);
}





















⌨️ 快捷键说明

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