更新sqlite3,更改参数数据库初始化机制,更改main函数。
@@ -13,6 +13,7 @@ Parameters::Parameters(void)
 | 
			
		||||
Parameters::Parameters(const string & strFilePath)
 | 
			
		||||
{
 | 
			
		||||
	sqlite3 * pdbParameter;
 | 
			
		||||
	string path;
 | 
			
		||||
 | 
			
		||||
	int returnCode;
 | 
			
		||||
	int nRowCount;
 | 
			
		||||
@@ -21,13 +22,14 @@ Parameters::Parameters(const string & strFilePath)
 | 
			
		||||
	char ** result;
 | 
			
		||||
	char * pszMessage;
 | 
			
		||||
	char szSQL[] = 
 | 
			
		||||
		"select name, value from sys_parameter ";
 | 
			
		||||
		"select name, value from sys_parameters ";
 | 
			
		||||
 | 
			
		||||
	returnCode = sqlite3_open( strFilePath.c_str(), &pdbParameter );
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg(pdbParameter) );
 | 
			
		||||
		const char * pszMessage = sqlite3_errmsg(pdbParameter);
 | 
			
		||||
		throw runtime_error( pszMessage );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//查询
 | 
			
		||||
@@ -35,7 +37,8 @@ Parameters::Parameters(const string & strFilePath)
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg( pdbParameter ));
 | 
			
		||||
		const char * pszMessage = sqlite3_errmsg(pdbParameter);
 | 
			
		||||
		throw runtime_error(pszMessage);
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for ( int nRowIndex = nColCount; nRowIndex < nColCount*(nRowCount+1); nRowIndex += nColCount )
 | 
			
		||||
@@ -77,7 +80,7 @@ void Parameters::setParameter(const string & strParaName, const string & strPara
 | 
			
		||||
	int iReturnCode;
 | 
			
		||||
	char * szMsg;
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"update sys_parameter set value = '";
 | 
			
		||||
		"update sys_parameters set value = '";
 | 
			
		||||
 | 
			
		||||
	strSQL.append( strParaValue );
 | 
			
		||||
	strSQL.append( "' where name = '" );
 | 
			
		||||
 
 | 
			
		||||
@@ -41,7 +41,7 @@ void QConfigurationWidget::initSignal()
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( parameters.getParameter("默认车商代码").c_str() ));
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( pParameters->getParameter("默认车商代码").c_str() ));
 | 
			
		||||
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
}
 | 
			
		||||
@@ -75,7 +75,7 @@ void QConfigurationWidget::onSave()
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	parameters.setParameter( "默认车商代码", pEditAutoTraderCode->text().toLocal8Bit().data() );
 | 
			
		||||
	pParameters->setParameter( "默认车商代码", pEditAutoTraderCode->text().toLocal8Bit().data() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onReset()
 | 
			
		||||
 
 | 
			
		||||
@@ -59,7 +59,7 @@ void QTelSalePolicyInfoInputWidget::initSignal()
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
	//默认的车商代码
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( parameters.getParameter( "默认车商代码" ).c_str() ) );
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( pParameters->getParameter( "默认车商代码" ).c_str() ) );
 | 
			
		||||
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,17 +1,19 @@
 | 
			
		||||
 | 
			
		||||
#include <QtCore/QtCore>
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
//hash_map<string, string> parameters; //存放参数的hashmap
 | 
			
		||||
 | 
			
		||||
//版本号
 | 
			
		||||
const string cstrVersion = "0.99";
 | 
			
		||||
const string cstrVersion  = "0.99";
 | 
			
		||||
const string DB_FILE_NAME = "config.db";
 | 
			
		||||
 | 
			
		||||
string strUserCode;
 | 
			
		||||
string strUserName;
 | 
			
		||||
string strUserPassword;
 | 
			
		||||
 | 
			
		||||
//参数
 | 
			
		||||
Parameters parameters( "config.db" );
 | 
			
		||||
//Parameters parameters( "config.db" );
 | 
			
		||||
Parameters* pParameters;
 | 
			
		||||
 | 
			
		||||
//bool checkVersion()
 | 
			
		||||
//{
 | 
			
		||||
@@ -26,6 +28,16 @@ Parameters parameters( "config.db" );
 | 
			
		||||
//	return result;
 | 
			
		||||
//}
 | 
			
		||||
 | 
			
		||||
void init_parameters()
 | 
			
		||||
{
 | 
			
		||||
	QString dbFilePath = QCoreApplication::applicationDirPath();
 | 
			
		||||
 | 
			
		||||
	dbFilePath.append( QString::fromLocal8Bit( "/" ) );
 | 
			
		||||
	dbFilePath.append( QString::fromLocal8Bit( DB_FILE_NAME.c_str() ) );
 | 
			
		||||
 | 
			
		||||
	pParameters = new Parameters( dbFilePath.toStdString() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getUserCode()
 | 
			
		||||
{
 | 
			
		||||
	return strUserCode;
 | 
			
		||||
@@ -36,17 +48,17 @@ string getUserName()
 | 
			
		||||
	return strUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserCode(const string & cstrUserCode)
 | 
			
		||||
void setUserCode( const string& cstrUserCode )
 | 
			
		||||
{
 | 
			
		||||
	strUserCode = cstrUserCode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserName(const string & cstrUserName)
 | 
			
		||||
void setUserName( const string& cstrUserName )
 | 
			
		||||
{
 | 
			
		||||
	strUserName = cstrUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getVersion()
 | 
			
		||||
{
 | 
			
		||||
	return parameters.getParameter("版本号");
 | 
			
		||||
}
 | 
			
		||||
	return pParameters->getParameter( "version" );
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -22,10 +22,12 @@
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
//extern hash_map<string, string> parameters;
 | 
			
		||||
extern Parameters parameters;
 | 
			
		||||
extern Parameters * pParameters;
 | 
			
		||||
 | 
			
		||||
//bool checkVersion();
 | 
			
		||||
 | 
			
		||||
void init_parameters();
 | 
			
		||||
 | 
			
		||||
string getUserCode();
 | 
			
		||||
string getUserName();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -5,61 +5,71 @@
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include "QMainFrame.h"
 | 
			
		||||
#include "QLoginWidget.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
int main( int argc, char * argv[] )
 | 
			
		||||
{
 | 
			
		||||
	//用于编码转换
 | 
			
		||||
	//QTextCodec * pCodecLocal = QTextCodec::codecForLocale();
 | 
			
		||||
 | 
			
		||||
	QApplication a( argc, argv );
 | 
			
		||||
	QLoginWidget login;
 | 
			
		||||
	QApplication * pApp       = NULL;
 | 
			
		||||
	QLoginWidget * pLogin     = NULL;
 | 
			
		||||
	QMainFrame *   pMainFrame = NULL;
 | 
			
		||||
 | 
			
		||||
	//返回值
 | 
			
		||||
	int iReturnCode = 0;
 | 
			
		||||
 | 
			
		||||
	/*try
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		initConnectionPool();
 | 
			
		||||
		queryParameters();
 | 
			
		||||
 | 
			
		||||
		if ( checkVersion() == false )
 | 
			
		||||
		{
 | 
			
		||||
			QMessageBox::warning( NULL,
 | 
			
		||||
			                      pCodecLocal->toUnicode( "版本错误" ),
 | 
			
		||||
			                      pCodecLocal->toUnicode( "程序版本过低!\n请联系信息技术部更新程序!" ) );
 | 
			
		||||
 | 
			
		||||
			return 0;
 | 
			
		||||
		}
 | 
			
		||||
		//初始化参数数据库
 | 
			
		||||
		init_parameters();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( std::runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		releaseConnectionPool();
 | 
			
		||||
		QMessageBox::critical( NULL,
 | 
			
		||||
		                       "错误",
 | 
			
		||||
		                       pCodecLocal->toUnicode( error.what() ) );
 | 
			
		||||
		                       QString::fromLocal8Bit( "参数读取错误" ),
 | 
			
		||||
		                       QString::fromLocal8Bit( error.what() ) );
 | 
			
		||||
 | 
			
		||||
		return iReturnCode;
 | 
			
		||||
	}
 | 
			
		||||
	catch ( std::exception & error )
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		pLogin = new QLoginWidget();
 | 
			
		||||
		pApp   = new QApplication( argc, argv );
 | 
			
		||||
 | 
			
		||||
		pLogin->exec();
 | 
			
		||||
 | 
			
		||||
		if ( pLogin->isLogin() == true )
 | 
			
		||||
		{
 | 
			
		||||
			pMainFrame = new QMainFrame();
 | 
			
		||||
			pMainFrame->showMaximized();
 | 
			
		||||
 | 
			
		||||
			iReturnCode = pApp->exec();
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		releaseConnectionPool();
 | 
			
		||||
		QMessageBox::critical( NULL,
 | 
			
		||||
		                       "未知错误",
 | 
			
		||||
		                       pCodecLocal->toUnicode( error.what() ) );
 | 
			
		||||
 | 
			
		||||
		return iReturnCode;
 | 
			
		||||
	}*/
 | 
			
		||||
 | 
			
		||||
	login.exec();
 | 
			
		||||
 | 
			
		||||
	if ( login.isLogin() == true )
 | 
			
		||||
	{
 | 
			
		||||
		QMainFrame w;
 | 
			
		||||
		w.showMaximized();
 | 
			
		||||
 | 
			
		||||
		iReturnCode = a.exec();
 | 
			
		||||
		                       QString::fromLocal8Bit( "错误" ),
 | 
			
		||||
		                       QString::fromLocal8Bit( error.what() ) );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//releaseConnectionPool();
 | 
			
		||||
	//清理
 | 
			
		||||
	if ( pLogin != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		delete pLogin;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pApp != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		delete pApp;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pMainFrame != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		delete pMainFrame;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return iReturnCode;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
			
		||||
# Visual Studio 15
 | 
			
		||||
VisualStudioVersion = 15.0.27004.2010
 | 
			
		||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TelSalePolicyInfoManager", "TelSalePolicyInfoManager\TelSalePolicyInfoManager.vcxproj", "{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|x86 = Debug|x86
 | 
			
		||||
		Release|x86 = Release|x86
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}.Debug|x86.ActiveCfg = Debug|Win32
 | 
			
		||||
		{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}.Debug|x86.Build.0 = Debug|Win32
 | 
			
		||||
		{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}.Release|x86.ActiveCfg = Release|Win32
 | 
			
		||||
		{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}.Release|x86.Build.0 = Release|Win32
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ExtensibilityGlobals) = postSolution
 | 
			
		||||
		Qt5Version = winrt_x86_msvc2017
 | 
			
		||||
		SolutionGuid = {3983EF0A-DBC9-4B43-B9E7-1BC46B0FDE0B}
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
@@ -1,602 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include <SQLAPI.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <libxl.h>
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "StringCodeConverter.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#pragma comment( lib, "user32.lib")
 | 
			
		||||
#pragma comment( lib, "version.lib")
 | 
			
		||||
#pragma comment( lib, "oleaut32.lib")
 | 
			
		||||
#pragma comment( lib, "ole32.lib")
 | 
			
		||||
#pragma comment( lib, "libxl.lib")
 | 
			
		||||
 | 
			
		||||
#ifdef _DEBUG
 | 
			
		||||
#pragma comment( lib, "sqlapisd.lib")
 | 
			
		||||
#else
 | 
			
		||||
#pragma comment( lib, "sqlapis.lib")
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
const char g_cszConnectStringIDS6[] = 
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16191;"
 | 
			
		||||
	"SERVER=xmcx1;"
 | 
			
		||||
	"HOST=10.39.0.91;"
 | 
			
		||||
	"DATABASE=ids6;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_szUserNameIDS6[] = "ccx99";
 | 
			
		||||
const static char g_szPasswordIDS6[] = "c91IT09";
 | 
			
		||||
 | 
			
		||||
const static char g_cszConnstringYwgl[] =
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16192;"
 | 
			
		||||
	"SERVER=xmcx2;"
 | 
			
		||||
	"HOST=10.39.0.92;"
 | 
			
		||||
	"DATABASE=ywgl_xm;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_cszUserNameYwgl[] = "ccx99";
 | 
			
		||||
const static char g_cszPasswordYwgl[] = "c92IT09";
 | 
			
		||||
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	string strSQL = "select id, trim(name), default_price from w_dx_gifts";
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &connection );
 | 
			
		||||
	command.setCommandText( strSQL.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		connection.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	while ( command.FetchNext() )
 | 
			
		||||
	{
 | 
			
		||||
		TelSalePolicyGift gift;
 | 
			
		||||
 | 
			
		||||
		gift.Id( command.Field(1).asLong() );
 | 
			
		||||
		gift.GiftName( (const char *)(command.Field(2).asString()) );
 | 
			
		||||
		gift.GiftDefaultPrice( (const char *)(command.Field(3).asString()) );
 | 
			
		||||
 | 
			
		||||
		giftList.push_back( gift );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	connection.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void SaveTelSalePolicyInfo(const SPolicyRecord & policy, const vector<TelSalePolicyGift> & giftList)
 | 
			
		||||
{
 | 
			
		||||
	if ( policy.strPolicySerial.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>!" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strSalerCode.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostringstream ostrCommand;
 | 
			
		||||
	string strAutotraderCall;
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	if ( policy.bIsAutotraderCall == true )
 | 
			
		||||
	{
 | 
			
		||||
		strAutotraderCall = "1";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		strAutotraderCall = "0";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostrCommand << "insert into w_dxbd_i ( jjbj, khjl, khjllx, bdh, zhjywy, zhjywymc, zhjywybm, zhjywybmm, kshdm, kshmc, czydm, czrq , chdlh, chshdm, chshmc, khmc, chph, chjh, fdjh ) "
 | 
			
		||||
		"values( 1, 0, 0, "
 | 
			
		||||
		<< "trim('" << policy.strPolicySerial << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerDeptCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerDeptName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerOfficeCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerOfficeName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strOperatorCode << "'), "
 | 
			
		||||
		<< "today, "
 | 
			
		||||
		<< "'" << strAutotraderCall << "'";
 | 
			
		||||
 | 
			
		||||
	if ( policy.strAutoTraderCode.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strAutoTraderCode << "'";
 | 
			
		||||
		ostrCommand << ", '" << policy.strAutoTraderName << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL, NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strCustomerName.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strCustomerName << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strPlateSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strPlateSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strFrameSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strFrameSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strEngineSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strEngineSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostrCommand << " )";
 | 
			
		||||
 | 
			
		||||
	string strCommand = ostrCommand.str();
 | 
			
		||||
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		conn.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
		//conn.setAutoCommit( SA_AutoCommitOff ); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>汣<EFBFBD><E6B1A3>
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD>,<2C><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		command.setCommandText( "delete w_dxbd_gift_i where bdh = :1 " );
 | 
			
		||||
		command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		command.setCommandText( "insert into w_dxbd_gift_i ( bdh, gift_name, gift_price ) values ( :1, :2, :3 )" );
 | 
			
		||||
 | 
			
		||||
		for ( vector<TelSalePolicyGift>::const_iterator iter = giftList.begin(); iter != giftList.end(); ++iter )
 | 
			
		||||
		{
 | 
			
		||||
			command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
			command.Param( 2 ).setAsString() = iter->GiftName().c_str();
 | 
			
		||||
			command.Param( 3 ).setAsString() = iter->GiftDefaultPrice().c_str();
 | 
			
		||||
 | 
			
		||||
			command.Execute();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		conn.Commit();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		conn.Rollback();
 | 
			
		||||
		conn.Disconnect();
 | 
			
		||||
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QueryTelSalePolicyInfo( const string & strPolicyNo, 
 | 
			
		||||
	                         const string & strOperatorCode, 
 | 
			
		||||
							 const string & strStartDate, 
 | 
			
		||||
							 const string & strEndDate, 
 | 
			
		||||
							 vector<SPolicyQuery> & vPolicyInfo )
 | 
			
		||||
{
 | 
			
		||||
	SACommand command;
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SPolicyQuery policy;
 | 
			
		||||
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"select trim(bdh) bdh, trim(zhjywy) zhjywy, to_char(czrq, '%Y<><59>%m<><6D>%d<><64>') czrq, trim(czydm) czydm, chdlh, zhjywybmm, kshmc, chshdm, chshmc "
 | 
			
		||||
		"  from w_dxbd_i "
 | 
			
		||||
		" where 1=1 ";
 | 
			
		||||
 | 
			
		||||
	if ( !strPolicyNo.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and bdh = '" );
 | 
			
		||||
		strSQL.append( strPolicyNo );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strOperatorCode.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czydm = '" );
 | 
			
		||||
		strSQL.append( strOperatorCode );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strStartDate.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czrq >= '" );
 | 
			
		||||
		strSQL.append( strStartDate );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strEndDate.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czrq <= '" );
 | 
			
		||||
		strSQL.append( strEndDate );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		command.setCommandText( strSQL.c_str() );
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
 | 
			
		||||
		connection.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		while ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strPolicySerial = command.Field("bdh").asString();
 | 
			
		||||
			policy.strSalerCode = command.Field("zhjywy").asString();
 | 
			
		||||
			policy.strDeptName = command.Field("zhjywybmm").asString();
 | 
			
		||||
			policy.strOfficeName = command.Field("kshmc").asString();
 | 
			
		||||
			policy.strAutoTraderCode = command.Field("chshdm").asString();
 | 
			
		||||
			policy.strAutoTraderName = command.Field("chshmc").asString();
 | 
			
		||||
			policy.strInputDate = command.Field("czrq").asString();
 | 
			
		||||
			policy.strCDLH = command.Field("chdlh").asString();
 | 
			
		||||
 | 
			
		||||
			QueryPolicyGifts( policy.strPolicySerial, policy.strGifts, policy.dGiftPriceSum );
 | 
			
		||||
 | 
			
		||||
			vPolicyInfo.push_back( policy );
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QueryPolicyGifts(const string & strPolicyNo, string & strGifts, double dGiftPriceSum )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand    command;
 | 
			
		||||
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"select gift_name, gift_price "
 | 
			
		||||
		"  from w_dxbd_gift_i "
 | 
			
		||||
		" where bdh = '" + strPolicyNo + "'";
 | 
			
		||||
 | 
			
		||||
	string strSQLSum = 
 | 
			
		||||
		"select sum( gift_price ) "
 | 
			
		||||
		"  from w_dxbd_gift_i "
 | 
			
		||||
		" where bdh = '" + strPolicyNo + "'";
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
		command.setCommandText( strSQL.c_str() );
 | 
			
		||||
 | 
			
		||||
		connection.Connect( g_cszConnstringYwgl,
 | 
			
		||||
			                g_cszUserNameYwgl,
 | 
			
		||||
							g_cszPasswordYwgl,
 | 
			
		||||
							SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		strGifts.clear();
 | 
			
		||||
		dGiftPriceSum = 0.0;
 | 
			
		||||
 | 
			
		||||
		while ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
			if ( !strGifts.empty() )
 | 
			
		||||
			{
 | 
			
		||||
				strGifts.append( "; " );
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			strGifts.append( command.Field("gift_name").asString() );
 | 
			
		||||
			strGifts.append( " " );
 | 
			
		||||
			strGifts.append( command.Field("gift_price").asString() );
 | 
			
		||||
			strGifts.append( "Ԫ" );
 | 
			
		||||
 | 
			
		||||
			dGiftPriceSum += command.Field("gift_price").asDouble();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/*command.setCommandText( strSQLSum.c_str() );
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		if ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
		strGiftPriceSum = command.Field( 0 ).asString();
 | 
			
		||||
		}*/
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML )
 | 
			
		||||
{
 | 
			
		||||
	IBookT<char> * pBook = NULL;
 | 
			
		||||
	ISheetT<char> * pSheet = NULL;
 | 
			
		||||
 | 
			
		||||
	int iRowCount = 0;
 | 
			
		||||
	int iRowIndex = 0;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	if ( isXML == true )
 | 
			
		||||
	{
 | 
			
		||||
		pBook = xlCreateXMLBook();
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		pBook = xlCreateBook();
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	if ( pBook == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pBook->load(strFilePath.c_str()) == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		string strMessage = pBook->errorMessage();
 | 
			
		||||
		throw string( strMessage );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pSheet = pBook->getSheet( 0 );
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD>ȡsheetʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iRowCount = pSheet->lastRow();
 | 
			
		||||
 | 
			
		||||
	if ( hasTitle == true )
 | 
			
		||||
	{
 | 
			
		||||
		iRowIndex = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
 | 
			
		||||
	while ( iRowIndex < iRowCount )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policy;
 | 
			
		||||
 | 
			
		||||
		CellType type = pSheet->cellType( iRowIndex, 4 );
 | 
			
		||||
 | 
			
		||||
		policy.strSignDate     = readXlsCell( pSheet, iRowIndex, 0 );
 | 
			
		||||
		policy.strPolicySerial = readXlsCell( pSheet, iRowIndex, 1 );
 | 
			
		||||
		policy.strPlateSerial  = readXlsCell( pSheet, iRowIndex, 2 );
 | 
			
		||||
		policy.strCustomerName = readXlsCell( pSheet, iRowIndex, 3 );
 | 
			
		||||
		policy.strSalerCode    = readXlsCell( pSheet, iRowIndex, 4 );
 | 
			
		||||
		//policy.strAutoTraderName = readXlsCell( pSheet, iRowIndex, 5 );
 | 
			
		||||
		policy.strAutoTraderCode = readXlsCell( pSheet, iRowIndex, 6 );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>빤<EFBFBD><EBB9A4>
 | 
			
		||||
		if ( policy.strSalerCode.length() == 1 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("00") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( policy.strSalerCode.length() == 2 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("0") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		policy.strOperatorCode = getUserCode();
 | 
			
		||||
 | 
			
		||||
		queryAutoTraderInfo( policy.strAutoTraderCode, policy.strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
		queryStaffInfo( policy.strSalerCode, 
 | 
			
		||||
			            policy.strSalerName, 
 | 
			
		||||
						policy.strSalerDeptCode,
 | 
			
		||||
						policy.strSalerDeptName,
 | 
			
		||||
						policy.strSalerOfficeCode,
 | 
			
		||||
						policy.strSalerOfficeName );
 | 
			
		||||
 | 
			
		||||
		listPolicy.push_back( policy );
 | 
			
		||||
 | 
			
		||||
		iRowIndex++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pBook->release();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string readXlsCell(ISheetT<char> * pSheet, int iRowIndex, int iColIndex)
 | 
			
		||||
{
 | 
			
		||||
	string strCell;
 | 
			
		||||
	char szNum[40];
 | 
			
		||||
	int iCell;
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	CellType cellType = pSheet->cellType( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
	switch( cellType )
 | 
			
		||||
	{
 | 
			
		||||
	case libxl::CELLTYPE_STRING:
 | 
			
		||||
		strCell = pSheet->readStr( iRowIndex, iColIndex );
 | 
			
		||||
		break;
 | 
			
		||||
	case libxl::CELLTYPE_NUMBER:
 | 
			
		||||
		memset( szNum, NULL, 40 );
 | 
			
		||||
 | 
			
		||||
		iCell = pSheet->readNum( iRowIndex, iColIndex );
 | 
			
		||||
		sprintf( szNum, "%d", iCell );
 | 
			
		||||
		strCell = szNum;
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		strCell = "";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return strCell;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string readXlsxCell(ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex)
 | 
			
		||||
{
 | 
			
		||||
	wstring strCell;
 | 
			
		||||
	string strReturn;
 | 
			
		||||
 | 
			
		||||
	char szNum[40];
 | 
			
		||||
	int iCell;
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	CellType cellType = pSheet->cellType( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
	switch( cellType )
 | 
			
		||||
	{
 | 
			
		||||
	case libxl::CELLTYPE_STRING:
 | 
			
		||||
		strCell = pSheet->readStr( iRowIndex, iColIndex );
 | 
			
		||||
		break;
 | 
			
		||||
	case libxl::CELLTYPE_NUMBER:
 | 
			
		||||
		memset( szNum, NULL, 40 );
 | 
			
		||||
 | 
			
		||||
		iCell = pSheet->readNum( iRowIndex, iColIndex );
 | 
			
		||||
		sprintf( szNum, "%d", iCell );
 | 
			
		||||
		strReturn = szNum;
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		strReturn = "";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	StringCodeConverter::unicode2mbs( strCell, strReturn );
 | 
			
		||||
 | 
			
		||||
	return strReturn;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsxFile(wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle)
 | 
			
		||||
{
 | 
			
		||||
	IBookT<wchar_t> * pBook = NULL;
 | 
			
		||||
	ISheetT<wchar_t> * pSheet = NULL;
 | 
			
		||||
 | 
			
		||||
	int iRowCount = 0;
 | 
			
		||||
	int iRowIndex = 0;
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	pBook = xlCreateXMLBookW();
 | 
			
		||||
 | 
			
		||||
	if ( pBook == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pBook->load(L"D:/1111.xlsx") == false )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pSheet = pBook->getSheet( 0 );
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD>ȡsheetʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iRowCount = pSheet->lastRow();
 | 
			
		||||
 | 
			
		||||
	if ( hasTitle == true )
 | 
			
		||||
	{
 | 
			
		||||
		iRowIndex = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
 | 
			
		||||
	while ( iRowIndex < iRowCount )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policy;
 | 
			
		||||
 | 
			
		||||
		CellType type = pSheet->cellType( iRowIndex, 4 );
 | 
			
		||||
 | 
			
		||||
		policy.strSignDate     = readXlsxCell( pSheet, iRowIndex, 0 );
 | 
			
		||||
		policy.strPolicySerial = readXlsxCell( pSheet, iRowIndex, 1 );
 | 
			
		||||
		policy.strPlateSerial  = readXlsxCell( pSheet, iRowIndex, 2 );
 | 
			
		||||
		policy.strCustomerName = readXlsxCell( pSheet, iRowIndex, 3 );
 | 
			
		||||
		policy.strSalerCode    = readXlsxCell( pSheet, iRowIndex, 4 );
 | 
			
		||||
		policy.strAutoTraderName = readXlsxCell( pSheet, iRowIndex, 6 );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>빤<EFBFBD><EBB9A4>
 | 
			
		||||
		if ( policy.strSalerCode.length() == 1 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("00") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( policy.strSalerCode.length() == 2 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("0") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		policy.strOperatorCode = getUserCode();
 | 
			
		||||
 | 
			
		||||
		queryStaffInfo( 
 | 
			
		||||
			policy.strSalerCode, 
 | 
			
		||||
			policy.strSalerName, 
 | 
			
		||||
			policy.strSalerDeptCode,
 | 
			
		||||
			policy.strSalerDeptName,
 | 
			
		||||
			policy.strSalerOfficeCode,
 | 
			
		||||
			policy.strSalerOfficeName );
 | 
			
		||||
 | 
			
		||||
		listPolicy.push_back( policy );
 | 
			
		||||
 | 
			
		||||
		iRowIndex++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pBook->release();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1,143 +0,0 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * \file DataManipulation.h
 | 
			
		||||
 * \date 2014/08/18 15:43
 | 
			
		||||
 *
 | 
			
		||||
 * \author Kane
 | 
			
		||||
 * Contact: user@company.com
 | 
			
		||||
 *
 | 
			
		||||
 * \brief ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
 | 
			
		||||
 *
 | 
			
		||||
 * TODO: long description
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DataManipulation_h__
 | 
			
		||||
#define DataManipulation_h__
 | 
			
		||||
 | 
			
		||||
#include <libxl.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace libxl;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	string strPolicySerial;
 | 
			
		||||
	string strSignDate;
 | 
			
		||||
	string strSalerCode;
 | 
			
		||||
	string strSalerName;
 | 
			
		||||
	string strSalerDeptCode;
 | 
			
		||||
	string strSalerDeptName;
 | 
			
		||||
	string strSalerOfficeCode;
 | 
			
		||||
	string strSalerOfficeName;
 | 
			
		||||
	string strAutoTraderCode;
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
	string strCustomerName;
 | 
			
		||||
	string strPlateSerial;
 | 
			
		||||
	string strFrameSerial;
 | 
			
		||||
	string strEngineSerial;
 | 
			
		||||
	string strOperatorDate;
 | 
			
		||||
	string strOperatorCode;
 | 
			
		||||
	bool bIsAutotraderCall;
 | 
			
		||||
} SPolicyRecord;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	string strPolicySerial;
 | 
			
		||||
	string strSalerCode;
 | 
			
		||||
	string strDeptName;
 | 
			
		||||
	string strOfficeName;
 | 
			
		||||
	string strCDLH;
 | 
			
		||||
	string strAutoTraderCode;
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
	double dGiftPriceSum;
 | 
			
		||||
	string strGifts;
 | 
			
		||||
	string strInputDate;
 | 
			
		||||
} SPolicyQuery;
 | 
			
		||||
 | 
			
		||||
class TelSalePolicyGift
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	TelSalePolicyGift() {};
 | 
			
		||||
	TelSalePolicyGift( int id, string & name, string & defaultPrice ) : m_id( id ), m_giftName( name ), m_giftDefaultPrice( defaultPrice ) {}
 | 
			
		||||
 | 
			
		||||
	inline int Id() const { return m_id; }
 | 
			
		||||
	void Id(int val) { m_id = val; }
 | 
			
		||||
 | 
			
		||||
	string GiftName() const { return m_giftName; }
 | 
			
		||||
	void GiftName(string val) { m_giftName = val; }
 | 
			
		||||
 | 
			
		||||
	string GiftDefaultPrice() const { return m_giftDefaultPrice; }
 | 
			
		||||
	void GiftDefaultPrice(string val) { m_giftDefaultPrice = val; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	int m_id;
 | 
			
		||||
	string m_giftName;
 | 
			
		||||
	string m_giftDefaultPrice;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    queryTelsalePolicyGifts
 | 
			
		||||
// FullName:  queryTelsalePolicyGifts
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF>Ʒ<EFBFBD><C6B7>Ϣ
 | 
			
		||||
// Parameter: vector<TelSalePolicyGift> & giftList <20><>Ʒ<EFBFBD>б<EFBFBD>
 | 
			
		||||
//************************************
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    SaveTelSalePolicyInfo
 | 
			
		||||
// FullName:  SaveTelSalePolicyInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier:
 | 
			
		||||
// Parameter: const SPolicyRecord & policy
 | 
			
		||||
// Parameter: const vector<TelSalePolicyGift> & giftList
 | 
			
		||||
//************************************
 | 
			
		||||
void SaveTelSalePolicyInfo( const SPolicyRecord & policy, const vector<TelSalePolicyGift> & giftList );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    QueryTelSalePolicyInfo
 | 
			
		||||
// FullName:  QueryTelSalePolicyInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier:
 | 
			
		||||
// Parameter: const string & strPolicyNo
 | 
			
		||||
// Parameter: const string & strOperatorCode
 | 
			
		||||
// Parameter: const string & strStartDate
 | 
			
		||||
// Parameter: const string & strEndDate
 | 
			
		||||
// Parameter: vector<SPolicyQuery> & vPolicyInfo
 | 
			
		||||
//************************************
 | 
			
		||||
void QueryTelSalePolicyInfo( const string & strPolicyNo,
 | 
			
		||||
	                         const string & strOperatorCode,
 | 
			
		||||
							 const string & strStartDate,
 | 
			
		||||
							 const string & strEndDate,
 | 
			
		||||
							 vector<SPolicyQuery> & vPolicyInfo );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    QueryPolicyGifts
 | 
			
		||||
// FullName:  QueryPolicyGifts
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF>Ʒ<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
 | 
			
		||||
// Parameter: const string & strPolicyNo
 | 
			
		||||
// Parameter: string & strGifts
 | 
			
		||||
//************************************
 | 
			
		||||
void QueryPolicyGifts( const string & strPolicyNo,
 | 
			
		||||
	                         string & strGifts,
 | 
			
		||||
							 double dGiftPriceSum );
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsFile( const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML );
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsxFile( wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle );
 | 
			
		||||
 | 
			
		||||
string readXlsCell( ISheetT<char> * pSheet, int iRowIndex, int iColIndex );
 | 
			
		||||
string readXlsxCell( ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex);
 | 
			
		||||
 | 
			
		||||
#endif // DataManipulation_h__
 | 
			
		||||
@@ -1,102 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include "Parameters.h"
 | 
			
		||||
#include "sqlite/sqlite3.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
Parameters::Parameters(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Parameters::Parameters(const string & strFilePath)
 | 
			
		||||
{
 | 
			
		||||
	sqlite3 * pdbParameter;
 | 
			
		||||
 | 
			
		||||
	int returnCode;
 | 
			
		||||
	int nRowCount;
 | 
			
		||||
	int nColCount;
 | 
			
		||||
 | 
			
		||||
	char ** result;
 | 
			
		||||
	char * pszMessage;
 | 
			
		||||
	char szSQL[] = 
 | 
			
		||||
		"select name, value from sys_parameter ";
 | 
			
		||||
 | 
			
		||||
	returnCode = sqlite3_open( strFilePath.c_str(), &pdbParameter );
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg(pdbParameter) );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ѯ
 | 
			
		||||
	returnCode = sqlite3_get_table( pdbParameter, szSQL, &result, &nRowCount, &nColCount, &pszMessage );
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg( pdbParameter ));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for ( int nRowIndex = nColCount; nRowIndex < nColCount*(nRowCount+1); nRowIndex += nColCount )
 | 
			
		||||
	{
 | 
			
		||||
		string strName = result[nRowIndex];
 | 
			
		||||
		string strValue = result[nRowIndex+1];
 | 
			
		||||
 | 
			
		||||
		m_parameters[strName] = strValue;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
	sqlite3_free_table( result );
 | 
			
		||||
	sqlite3_close( pdbParameter );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
 | 
			
		||||
	m_strDbFilePath = strFilePath;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Parameters::~Parameters(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string Parameters::getParameter(const string & strParaName)
 | 
			
		||||
{
 | 
			
		||||
	return m_parameters[strParaName];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Parameters::setParameter(const string & strParaName, const string & strParaValue)
 | 
			
		||||
{
 | 
			
		||||
	if ( m_parameters.find( strParaName) == m_parameters.end() )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m_parameters[strParaName] = strParaValue;
 | 
			
		||||
 | 
			
		||||
	sqlite3 * pDb = NULL;
 | 
			
		||||
	int iReturnCode;
 | 
			
		||||
	char * szMsg;
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"update sys_parameter set value = '";
 | 
			
		||||
 | 
			
		||||
	strSQL.append( strParaValue );
 | 
			
		||||
	strSQL.append( "' where name = '" );
 | 
			
		||||
	strSQL.append( strParaName );
 | 
			
		||||
	strSQL.append( "' " );
 | 
			
		||||
 | 
			
		||||
	iReturnCode = sqlite3_open( m_strDbFilePath.c_str(), &pDb );
 | 
			
		||||
 | 
			
		||||
	if ( iReturnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg( pDb ));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iReturnCode = sqlite3_exec( pDb, strSQL.c_str(), NULL, NULL, &szMsg );
 | 
			
		||||
 | 
			
		||||
	if ( iReturnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( szMsg );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	sqlite3_close( pDb );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1,42 +0,0 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * \file Parameters.h
 | 
			
		||||
 * \date 2014/08/25 11:44
 | 
			
		||||
 *
 | 
			
		||||
 * \author Kane
 | 
			
		||||
 * Contact: user@company.com
 | 
			
		||||
 *
 | 
			
		||||
 * \brief 
 | 
			
		||||
 *
 | 
			
		||||
 * TODO: long description
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef Parameters_h__
 | 
			
		||||
#define Parameters_h__
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <hash_map>
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
using std::hash_map;
 | 
			
		||||
 | 
			
		||||
class Parameters
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	Parameters( const string & strFilePath );
 | 
			
		||||
	virtual ~Parameters(void);
 | 
			
		||||
 | 
			
		||||
	string getParameter( const string & strParaName );
 | 
			
		||||
	void   setParameter( const string & strParaName, const string & strParaValue );
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Parameters();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	string m_strDbFilePath;
 | 
			
		||||
	hash_map<string, string> m_parameters;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // Parameters_h__
 | 
			
		||||
 | 
			
		||||
@@ -1,84 +0,0 @@
 | 
			
		||||
#include <Qtwidgets/QtWidgets>
 | 
			
		||||
#include "QConfigurationWidget.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
QConfigurationWidget::QConfigurationWidget(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QConfigurationWidget::~QConfigurationWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::init()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( pLayoutMain );
 | 
			
		||||
 | 
			
		||||
	setMaximumWidth( 800 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(editingFinished()), this, SLOT(onAutoTraderCodeEdited()));
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(textChanged(const QString &)), this, SLOT(onAutoTraderCodeChanged()) );
 | 
			
		||||
	connect( pButtonSave, SIGNAL(clicked()), this, SLOT(onSave()) );
 | 
			
		||||
	connect( pButtonReset, SIGNAL(clicked()), this, SLOT(onReset()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( parameters.getParameter("Ĭ<EFBFBD>ϳ<EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>").c_str() ));
 | 
			
		||||
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onAutoTraderCodeEdited()
 | 
			
		||||
{
 | 
			
		||||
	string strAutoTraderCode = pEditAutoTraderCode->text().trimmed().toUpper().toLocal8Bit().data();
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
 | 
			
		||||
	queryAutoTraderInfo( strAutoTraderCode, strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
	pEditAutoTraderName->setText( QString::fromLocal8Bit( strAutoTraderName.c_str() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onAutoTraderCodeChanged()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderName->clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onSave()
 | 
			
		||||
{
 | 
			
		||||
	if ( pEditAutoTraderName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	if ( pEditAutoTraderName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	parameters.setParameter( "Ĭ<EFBFBD>ϳ<EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>", pEditAutoTraderCode->text().toLocal8Bit().data() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onReset()
 | 
			
		||||
{
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
#ifndef QCONFIGURATIONWIDGET_H
 | 
			
		||||
#define QCONFIGURATIONWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "ui_QConfigurationWidget.h"
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
 | 
			
		||||
class QConfigurationWidget : public QWidget, public Ui::QConfigurationWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QConfigurationWidget(QWidget *parent = 0);
 | 
			
		||||
	~QConfigurationWidget();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void onAutoTraderCodeEdited();
 | 
			
		||||
	void onAutoTraderCodeChanged();
 | 
			
		||||
	void onSave();
 | 
			
		||||
	void onReset();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
	void initData();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QCONFIGURATIONWIDGET_H
 | 
			
		||||
@@ -1,224 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QConfigurationWidget</class>
 | 
			
		||||
 <widget class="QWidget" name="QConfigurationWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>843</width>
 | 
			
		||||
    <height>527</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>QConfigurationWidget</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>55</x>
 | 
			
		||||
     <y>95</y>
 | 
			
		||||
     <width>571</width>
 | 
			
		||||
     <height>208</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QVBoxLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>默认车商代码:</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_20">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderCode">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>90</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>90</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>false</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_21">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string/>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox_4">
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>操作</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_6">
 | 
			
		||||
       <item row="0" column="3">
 | 
			
		||||
        <spacer name="horizontalSpacer_2">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <spacer name="horizontalSpacer_3">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonSave">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>保存信息</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>保存</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/save2.png</normaloff>:/QMainFrame/Resources/save2.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="2">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonReset">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>重置所有</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>重置</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/clean.png</normaloff>:/QMainFrame/Resources/clean.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <spacer name="verticalSpacer">
 | 
			
		||||
      <property name="orientation">
 | 
			
		||||
       <enum>Qt::Vertical</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="sizeHint" stdset="0">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>20</width>
 | 
			
		||||
        <height>40</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
     </spacer>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,86 +0,0 @@
 | 
			
		||||
 | 
			
		||||
//#include <occi.h>
 | 
			
		||||
#include <QTextCodec>
 | 
			
		||||
#include <QtWidgets/QMessageBox>
 | 
			
		||||
#include "QLoginWidget.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
 | 
			
		||||
QLoginWidget::QLoginWidget(QWidget *parent)
 | 
			
		||||
	: QDialog(parent)
 | 
			
		||||
{
 | 
			
		||||
	ui.setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QLoginWidget::~QLoginWidget()
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::init()
 | 
			
		||||
{
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
 | 
			
		||||
	pCodecLocal = QTextCodec::codecForLocale();
 | 
			
		||||
	pCodecUTF8 = QTextCodec::codecForName( "UTF-8" );
 | 
			
		||||
 | 
			
		||||
	m_isLoginSuccess = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( ui.pLayoutMain );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( ui.pButtonLogin, SIGNAL(clicked()), this, SLOT(login()) );
 | 
			
		||||
	connect( ui.pButtonCancel, SIGNAL(clicked()), this, SLOT(cancel()) );
 | 
			
		||||
	connect( ui.pEditUserCode, SIGNAL(editingFinished()), this, SLOT(getUserName()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::login()
 | 
			
		||||
{
 | 
			
		||||
	string strPassword( (char *)ui.pEditPassword->text().toLocal8Bit().data() );
 | 
			
		||||
	
 | 
			
		||||
	if ( strPassword == m_userPassword )
 | 
			
		||||
	{
 | 
			
		||||
		m_isLoginSuccess = true;
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		setUserCode( m_userCode );
 | 
			
		||||
		setUserName( m_userName );
 | 
			
		||||
 | 
			
		||||
		close();
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::warning( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::cancel()
 | 
			
		||||
{
 | 
			
		||||
	m_isLoginSuccess = false;
 | 
			
		||||
 | 
			
		||||
	close();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::getUserName()
 | 
			
		||||
{
 | 
			
		||||
	m_userCode = ui.pEditUserCode->text().toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		QueryUserInfo( m_userCode, m_userName, m_userPassword );
 | 
			
		||||
 | 
			
		||||
		ui.pEditUserName->setText( QString::fromLocal8Bit(m_userName.c_str()));
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & exp )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", QString::fromUtf8( exp.what() ));
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,46 +0,0 @@
 | 
			
		||||
#ifndef QLOGINWIDGET_H
 | 
			
		||||
#define QLOGINWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <QDialog>
 | 
			
		||||
#include <QTextCodec>
 | 
			
		||||
#include "ui_QLoginWidget.h"
 | 
			
		||||
//#include "DataManipulate.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
class QLoginWidget : public QDialog
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QLoginWidget(QWidget *parent = 0);
 | 
			
		||||
	~QLoginWidget();
 | 
			
		||||
 | 
			
		||||
	bool isLogin() const { return m_isLoginSuccess; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void login();
 | 
			
		||||
	void cancel();
 | 
			
		||||
 | 
			
		||||
	void getUserName();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QLoginWidget ui;
 | 
			
		||||
	QTextCodec * pCodecLocal;
 | 
			
		||||
	QTextCodec * pCodecUTF8;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	string m_userCode;
 | 
			
		||||
	string m_userName;
 | 
			
		||||
	string m_userPassword;
 | 
			
		||||
 | 
			
		||||
	bool m_isLoginSuccess;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QLOGINWIDGET_H
 | 
			
		||||
@@ -1,290 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QLoginWidget</class>
 | 
			
		||||
 <widget class="QDialog" name="QLoginWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>764</width>
 | 
			
		||||
    <height>480</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>登录</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowIcon">
 | 
			
		||||
   <iconset resource="resource.qrc">
 | 
			
		||||
    <normaloff>:/QMainFrame/Resources/CPIC.png</normaloff>:/QMainFrame/Resources/CPIC.png</iconset>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="gridLayoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>40</x>
 | 
			
		||||
     <y>40</y>
 | 
			
		||||
     <width>369</width>
 | 
			
		||||
     <height>164</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QGridLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="sizeConstraint">
 | 
			
		||||
     <enum>QLayout::SetFixedSize</enum>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item row="0" column="0">
 | 
			
		||||
     <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
      <property name="leftMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="topMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="rightMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="bottomMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <item>
 | 
			
		||||
       <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QLabel" name="label_4">
 | 
			
		||||
          <property name="sizePolicy">
 | 
			
		||||
           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
			
		||||
            <horstretch>0</horstretch>
 | 
			
		||||
            <verstretch>0</verstretch>
 | 
			
		||||
           </sizepolicy>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="minimumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>104</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="maximumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>104</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string/>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="pixmap">
 | 
			
		||||
           <pixmap resource="resource.qrc">:/QMainFrame/Resources/login.png</pixmap>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="scaledContents">
 | 
			
		||||
           <bool>true</bool>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="alignment">
 | 
			
		||||
           <set>Qt::AlignCenter</set>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
          <property name="sizePolicy">
 | 
			
		||||
           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
			
		||||
            <horstretch>0</horstretch>
 | 
			
		||||
            <verstretch>0</verstretch>
 | 
			
		||||
           </sizepolicy>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="minimumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>245</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="maximumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>245</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="title">
 | 
			
		||||
           <string>登录信息:</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
           <property name="sizeConstraint">
 | 
			
		||||
            <enum>QLayout::SetFixedSize</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <item row="0" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>    工号:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="0" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditUserCode">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>6</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="1" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label_2">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>名称:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="1" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditUserName">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>20</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="readOnly">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="2" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label_3">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>密码:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="2" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditPassword">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>999</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="echoMode">
 | 
			
		||||
              <enum>QLineEdit::Password</enum>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
          </layout>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer_2">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>40</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QToolButton" name="pButtonLogin">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>登录</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/ok.png</normaloff>:/QMainFrame/Resources/ok.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="iconSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>32</width>
 | 
			
		||||
            <height>32</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="toolButtonStyle">
 | 
			
		||||
           <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeType">
 | 
			
		||||
           <enum>QSizePolicy::Fixed</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>5</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QToolButton" name="pButtonCancel">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>放弃</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/x.png</normaloff>:/QMainFrame/Resources/x.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="iconSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>32</width>
 | 
			
		||||
            <height>32</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="toolButtonStyle">
 | 
			
		||||
           <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer_3">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeType">
 | 
			
		||||
           <enum>QSizePolicy::Fixed</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>5</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
  <include location="resources.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,109 +0,0 @@
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include <QStatusBar>
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include "QMainFrame.h"
 | 
			
		||||
 | 
			
		||||
QMainFrame::QMainFrame(QWidget *parent)
 | 
			
		||||
	: QMainWindow(parent)
 | 
			
		||||
{
 | 
			
		||||
	setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QMainFrame::~QMainFrame()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::init()
 | 
			
		||||
{
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
	initStatusBar();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	setWindowTitle( windowTitle() + QString::fromLocal8Bit(" - <20>汾<EFBFBD>ţ<EFBFBD>v") + QString::fromLocal8Bit( getVersion().c_str()) );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	//ui.pActionDataManage->setEnabled( false );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	m_pWidgetStack = new QMyStackedWidget( this );
 | 
			
		||||
 | 
			
		||||
	setCentralWidget( m_pWidgetStack );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ¼<CFA2>봰<EFBFBD><EBB4B0>
 | 
			
		||||
	m_pWidgetInfoInput = new QTelSalePolicyInfoInputWidget();
 | 
			
		||||
 | 
			
		||||
	m_pWidgetStack->addWidget( m_pWidgetInfoInput, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ¼<EFBFBD>봰<EFBFBD><EFBFBD>") );
 | 
			
		||||
	m_pWidgetStack->showWidget( QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ¼<EFBFBD>봰<EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD>
 | 
			
		||||
	m_pWidgetQuery = new QTelSalePolicyInfoQuery();
 | 
			
		||||
 | 
			
		||||
	m_pWidgetStack->addWidget( m_pWidgetQuery, QString::fromLocal8Bit("<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><C3B4><EFBFBD>
 | 
			
		||||
	QScrollArea * pScrollArea = new QScrollArea();
 | 
			
		||||
 | 
			
		||||
	m_pWidgetConfiguration = new QConfigurationWidget();
 | 
			
		||||
 | 
			
		||||
	pScrollArea->setWidget( m_pWidgetConfiguration );
 | 
			
		||||
	pScrollArea->setAlignment( Qt::AlignLeft | Qt::AlignTop );
 | 
			
		||||
	pScrollArea->setObjectName( QString::fromLocal8Bit("pScrollAreaInput") );
 | 
			
		||||
	pScrollArea->setStyleSheet( QString::fromLocal8Bit( "#pScrollAreaInput\n{\n	border: none;\n}" ));
 | 
			
		||||
 | 
			
		||||
	m_pWidgetStack->addWidget( pScrollArea, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( pActionInput, SIGNAL(triggered()), this, SLOT(onShowInputWidget()) );
 | 
			
		||||
	connect( pActionQuery, SIGNAL(triggered()), this, SLOT(onShowQueryWidget()) );
 | 
			
		||||
	connect( pActionSetParameter, SIGNAL(triggered()), this, SLOT(onShowSetParameterWidget()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::resizeEvent( QResizeEvent * pEvent )
 | 
			
		||||
{
 | 
			
		||||
	QMainWindow::resizeEvent( pEvent );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::initStatusBar()
 | 
			
		||||
{
 | 
			
		||||
	//<2F><>֤
 | 
			
		||||
	QStatusBar * pStatusBar = this->statusBar();
 | 
			
		||||
 | 
			
		||||
	if ( pStatusBar == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	QString strDate = QDate::currentDate().toString( QString::fromLocal8Bit("<EFBFBD><EFBFBD>ǰ<EFBFBD><EFBFBD><EFBFBD>ڣ<EFBFBD>yyyy<EFBFBD><EFBFBD>MM<EFBFBD><EFBFBD>dd<EFBFBD><EFBFBD> ") );
 | 
			
		||||
	QString strUserName = QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD>") + QString::fromLocal8Bit( getUserName().c_str() ) + QString(" ");
 | 
			
		||||
	QString strUserCode = QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>") + QString::fromLocal8Bit( getUserCode().c_str() ) + QString(" ");
 | 
			
		||||
 | 
			
		||||
	//strUser.
 | 
			
		||||
 | 
			
		||||
	pStatusBar->addPermanentWidget( new QLabel(strDate) );
 | 
			
		||||
	pStatusBar->addPermanentWidget( new QLabel(strUserName) );
 | 
			
		||||
	pStatusBar->addPermanentWidget( new QLabel(strUserCode) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::onShowInputWidget()
 | 
			
		||||
{
 | 
			
		||||
	m_pWidgetStack->showWidget( QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ת<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ¼<EFBFBD>봰<EFBFBD><EFBFBD>") );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::onShowQueryWidget()
 | 
			
		||||
{
 | 
			
		||||
	m_pWidgetStack->showWidget( QString::fromLocal8Bit("<EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMainFrame::onShowSetParameterWidget()
 | 
			
		||||
{
 | 
			
		||||
	m_pWidgetStack->showWidget( QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ô<EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
}
 | 
			
		||||
@@ -1,43 +0,0 @@
 | 
			
		||||
#ifndef QMAINFRAME_H
 | 
			
		||||
#define QMAINFRAME_H
 | 
			
		||||
 | 
			
		||||
#include <QMainWindow>
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
#include "QMyStackedWidget.h"
 | 
			
		||||
#include "QTelSalePolicyInfoInputWidget.h"
 | 
			
		||||
#include "QTelSalePolicyInfoQuery.h"
 | 
			
		||||
#include "QConfigurationWidget.h"
 | 
			
		||||
#include "ui_QMainFrame.h"
 | 
			
		||||
 | 
			
		||||
class QMainFrame : public QMainWindow, public Ui::QMainFrame
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QMainFrame(QWidget *parent = 0);
 | 
			
		||||
	~QMainFrame();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void onShowInputWidget();
 | 
			
		||||
	void onShowQueryWidget();
 | 
			
		||||
	void onShowSetParameterWidget();
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
	void resizeEvent(QResizeEvent * pEvent);
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
 | 
			
		||||
	void initStatusBar();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	QMyStackedWidget * m_pWidgetStack;
 | 
			
		||||
 | 
			
		||||
	QTelSalePolicyInfoInputWidget * m_pWidgetInfoInput;
 | 
			
		||||
	QTelSalePolicyInfoQuery * m_pWidgetQuery;
 | 
			
		||||
	QConfigurationWidget * m_pWidgetConfiguration;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QMAINFRAME_H
 | 
			
		||||
@@ -1,129 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QMainFrame</class>
 | 
			
		||||
 <widget class="QMainWindow" name="QMainFrame">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>768</width>
 | 
			
		||||
    <height>534</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>电销转介绍信息管理系统</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowIcon">
 | 
			
		||||
   <iconset resource="resource.qrc">
 | 
			
		||||
    <normaloff>:/QMainFrame/Resources/telephone.png</normaloff>:/QMainFrame/Resources/telephone.png</iconset>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="centralWidget"/>
 | 
			
		||||
  <widget class="QMenuBar" name="menuBar">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>0</x>
 | 
			
		||||
     <y>0</y>
 | 
			
		||||
     <width>768</width>
 | 
			
		||||
     <height>23</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <widget class="QMenu" name="menu">
 | 
			
		||||
    <property name="title">
 | 
			
		||||
     <string>系统</string>
 | 
			
		||||
    </property>
 | 
			
		||||
    <addaction name="pActionExit"/>
 | 
			
		||||
   </widget>
 | 
			
		||||
   <widget class="QMenu" name="menu_2">
 | 
			
		||||
    <property name="title">
 | 
			
		||||
     <string>帮助</string>
 | 
			
		||||
    </property>
 | 
			
		||||
    <addaction name="pActionAbout"/>
 | 
			
		||||
   </widget>
 | 
			
		||||
   <addaction name="menu"/>
 | 
			
		||||
   <addaction name="menu_2"/>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QToolBar" name="mainToolBar">
 | 
			
		||||
   <property name="iconSize">
 | 
			
		||||
    <size>
 | 
			
		||||
     <width>40</width>
 | 
			
		||||
     <height>40</height>
 | 
			
		||||
    </size>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="toolButtonStyle">
 | 
			
		||||
    <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
   </property>
 | 
			
		||||
   <attribute name="toolBarArea">
 | 
			
		||||
    <enum>TopToolBarArea</enum>
 | 
			
		||||
   </attribute>
 | 
			
		||||
   <attribute name="toolBarBreak">
 | 
			
		||||
    <bool>false</bool>
 | 
			
		||||
   </attribute>
 | 
			
		||||
   <addaction name="pActionInput"/>
 | 
			
		||||
   <addaction name="pActionQuery"/>
 | 
			
		||||
   <addaction name="pActionSetParameter"/>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QStatusBar" name="pStatusBar"/>
 | 
			
		||||
  <action name="pActionExit">
 | 
			
		||||
   <property name="icon">
 | 
			
		||||
    <iconset resource="resource.qrc">
 | 
			
		||||
     <normaloff>:/QMainFrame/Resources/x.png</normaloff>:/QMainFrame/Resources/x.png</iconset>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>退出</string>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="toolTip">
 | 
			
		||||
    <string>退出程序</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="pActionAbout">
 | 
			
		||||
   <property name="icon">
 | 
			
		||||
    <iconset resource="resource.qrc">
 | 
			
		||||
     <normaloff>:/QMainFrame/Resources/CPIC.png</normaloff>:/QMainFrame/Resources/CPIC.png</iconset>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>关于</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="pActionInput">
 | 
			
		||||
   <property name="icon">
 | 
			
		||||
    <iconset resource="resource.qrc">
 | 
			
		||||
     <normaloff>:/QMainFrame/Resources/edit.png</normaloff>:/QMainFrame/Resources/edit.png</iconset>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>录入</string>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="toolTip">
 | 
			
		||||
    <string>转介绍信息录入</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="pActionQuery">
 | 
			
		||||
   <property name="icon">
 | 
			
		||||
    <iconset resource="resource.qrc">
 | 
			
		||||
     <normaloff>:/QMainFrame/Resources/find.png</normaloff>:/QMainFrame/Resources/find.png</iconset>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>查询</string>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="toolTip">
 | 
			
		||||
    <string>转介绍信息查询</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
  <action name="pActionSetParameter">
 | 
			
		||||
   <property name="icon">
 | 
			
		||||
    <iconset resource="resource.qrc">
 | 
			
		||||
     <normaloff>:/QMainFrame/Resources/gear.png</normaloff>:/QMainFrame/Resources/gear.png</iconset>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="text">
 | 
			
		||||
    <string>参数设置</string>
 | 
			
		||||
   </property>
 | 
			
		||||
   <property name="toolTip">
 | 
			
		||||
    <string>参数设置</string>
 | 
			
		||||
   </property>
 | 
			
		||||
  </action>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,12 +0,0 @@
 | 
			
		||||
#include "QMainWidget.h"
 | 
			
		||||
 | 
			
		||||
QMainWidget::QMainWidget(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	ui.setupUi(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QMainWidget::~QMainWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,19 +0,0 @@
 | 
			
		||||
#ifndef QMAINWIDGET_H
 | 
			
		||||
#define QMAINWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <QtWidgets/QWidget>
 | 
			
		||||
#include "ui_QMainWidget.h"
 | 
			
		||||
 | 
			
		||||
class QMainWidget : public QWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QMainWidget(QWidget *parent = 0);
 | 
			
		||||
	~QMainWidget();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QMainWidgetClass ui;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QMAINWIDGET_H
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
<UI version="4.0" >
 | 
			
		||||
 <class>QMainWidgetClass</class>
 | 
			
		||||
 <widget class="QWidget" name="QMainWidgetClass" >
 | 
			
		||||
  <property name="objectName" >
 | 
			
		||||
   <string notr="true">QMainWidgetClass</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="geometry" >
 | 
			
		||||
   <rect>
 | 
			
		||||
	<x>0</x>
 | 
			
		||||
	<y>0</y>
 | 
			
		||||
	<width>600</width>
 | 
			
		||||
	<height>400</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle" >
 | 
			
		||||
   <string>QMainWidget</string>
 | 
			
		||||
  </property>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutDefault spacing="6" margin="11" />
 | 
			
		||||
 <pixmapfunction></pixmapfunction>
 | 
			
		||||
 <resources>
 | 
			
		||||
   <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</UI>
 | 
			
		||||
@@ -1,60 +0,0 @@
 | 
			
		||||
#include "QMyStackedWidget.h"
 | 
			
		||||
 | 
			
		||||
QMyStackedWidget::QMyStackedWidget(QWidget *parent)
 | 
			
		||||
	: QStackedWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	//ui.setupUi(this);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QMyStackedWidget::~QMyStackedWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMyStackedWidget::addWidget(QWidget * pWidget, const QString & strWidgetName)
 | 
			
		||||
{
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>֤
 | 
			
		||||
	if ( pWidget == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m_subWidgetTable[strWidgetName] = pWidget;
 | 
			
		||||
 | 
			
		||||
	QStackedWidget::addWidget( pWidget );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMyStackedWidget::removeWidget(QWidget * pWidget)
 | 
			
		||||
{
 | 
			
		||||
	const QString & strWidgetName = m_subWidgetTable.key( pWidget );
 | 
			
		||||
 | 
			
		||||
	//<2F>ж<EFBFBD>һ<EFBFBD><D2BB><EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD>Ƿ<EFBFBD><C7B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>widget
 | 
			
		||||
	if ( strWidgetName.length() != 0 )
 | 
			
		||||
	{
 | 
			
		||||
		QStackedWidget::removeWidget( pWidget );
 | 
			
		||||
		m_subWidgetTable.remove( strWidgetName );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMyStackedWidget::removeWidget(const QString & strWidgetName)
 | 
			
		||||
{
 | 
			
		||||
	if ( m_subWidgetTable.contains(strWidgetName) == true )
 | 
			
		||||
	{
 | 
			
		||||
		QStackedWidget::removeWidget( m_subWidgetTable[strWidgetName] );
 | 
			
		||||
 | 
			
		||||
		m_subWidgetTable.remove( strWidgetName );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMyStackedWidget::showWidget(const QString & strWidgetName)
 | 
			
		||||
{
 | 
			
		||||
	if ( m_subWidgetTable.contains(strWidgetName) == true )
 | 
			
		||||
	{
 | 
			
		||||
		setCurrentWidget( m_subWidgetTable[strWidgetName] );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QMyStackedWidget::showWidget(int index)
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
@@ -1,33 +0,0 @@
 | 
			
		||||
#ifndef QMYSTACKEDWIDGET_H
 | 
			
		||||
#define QMYSTACKEDWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <QHash>
 | 
			
		||||
#include <QtWidgets/QStackedWidget>
 | 
			
		||||
 | 
			
		||||
class QMyStackedWidget : public QStackedWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QMyStackedWidget(QWidget *parent = 0);
 | 
			
		||||
	~QMyStackedWidget();
 | 
			
		||||
 | 
			
		||||
	void addWidget( QWidget * pWidget, const QString & strWidgetName );
 | 
			
		||||
	void removeWidget( QWidget * pWidget );
 | 
			
		||||
	void removeWidget( const QString & strWidgetName );
 | 
			
		||||
 | 
			
		||||
	void showWidget( const QString & strWidgetName );
 | 
			
		||||
	void showWidget( int index );
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	//Ui::QMyStackedWidget ui;
 | 
			
		||||
 | 
			
		||||
	QHash<QString, QWidget *> m_subWidgetTable; //<2F>Ӵ<EFBFBD><D3B4><EFBFBD>hash<73><68>
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QMYSTACKEDWIDGET_H
 | 
			
		||||
@@ -1,248 +0,0 @@
 | 
			
		||||
#include "QRapidInputWidget.h"
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
 | 
			
		||||
QRapidInputWidget::QRapidInputWidget(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	ui.setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QRapidInputWidget::~QRapidInputWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::init()
 | 
			
		||||
{
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( ui.pLayoutMain );
 | 
			
		||||
 | 
			
		||||
	setAcceptDrops( true );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( ui.pButtonSave,SIGNAL(clicked()), this, SLOT(onSaveTelSalePolicy()) );
 | 
			
		||||
	connect( ui.pButtonClean,SIGNAL(clicked()), this, SLOT(onCleanTable()) );
 | 
			
		||||
	connect( ui.pButtonOpenFile,SIGNAL(clicked()), this, SLOT(onOpenFile()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::dragEnterEvent(QDragEnterEvent * pEvent)
 | 
			
		||||
{
 | 
			
		||||
	if ( pEvent->mimeData()->hasUrls() )
 | 
			
		||||
	{
 | 
			
		||||
		pEvent->acceptProposedAction();
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::dropEvent(QDropEvent * pEvent)
 | 
			
		||||
{
 | 
			
		||||
	QList<QUrl> listURL = pEvent->mimeData()->urls();
 | 
			
		||||
	QString strFilePath;
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ж<EFBFBD><D0B6>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	QRegularExpression regXlsx( QString::fromLocal8Bit(".xlsx$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
 | 
			
		||||
	QRegularExpression regXls( QString::fromLocal8Bit(".xls$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
 | 
			
		||||
	QRegularExpressionMatch match;
 | 
			
		||||
 | 
			
		||||
	if ( listURL.size() == 0 )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	strFilePath = listURL[0].toLocalFile();
 | 
			
		||||
 | 
			
		||||
	//<2F><>xlsx<73>ļ<EFBFBD>
 | 
			
		||||
	match = regXlsx.match( strFilePath );
 | 
			
		||||
 | 
			
		||||
	if ( match.hasMatch() )
 | 
			
		||||
	{
 | 
			
		||||
		readTelsaleXlsFile( strFilePath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), true );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>xls<6C>ļ<EFBFBD>
 | 
			
		||||
	match = regXls.match( strFilePath );
 | 
			
		||||
	
 | 
			
		||||
	if ( match.hasMatch() )
 | 
			
		||||
	{
 | 
			
		||||
		readTelsaleXlsFile( strFilePath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false );
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	showPolicy();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::showPolicy()
 | 
			
		||||
{
 | 
			
		||||
	int iRowCount = m_vPolicy.size();
 | 
			
		||||
	QTableWidgetItem * pItem = NULL;
 | 
			
		||||
 | 
			
		||||
	ui.pTableWidgetPolicy->setRowCount( iRowCount );
 | 
			
		||||
 | 
			
		||||
	for ( int iRowIndex = 0; iRowIndex < iRowCount; iRowIndex++ )
 | 
			
		||||
	{
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strPolicySerial.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 0, pItem );
 | 
			
		||||
 | 
			
		||||
		//ǩ<><C7A9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSignDate.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 1, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>ƺ<EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strPlateSerial.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 2, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strCustomerName.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 3, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strAutoTraderCode.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 4, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerCode.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled | Qt::ItemIsEditable );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 5, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerName.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 6, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerDeptName.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 7, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( m_vPolicy[iRowIndex].strSalerOfficeName.c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEnabled );
 | 
			
		||||
 | 
			
		||||
		ui.pTableWidgetPolicy->setItem( iRowIndex, 8, pItem );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ui.pTableWidgetPolicy->resizeColumnsToContents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::onSaveTelSalePolicy()
 | 
			
		||||
{
 | 
			
		||||
	vector<TelSalePolicyGift> vGifts;
 | 
			
		||||
 | 
			
		||||
	m_vErrorPolicy.clear();
 | 
			
		||||
 | 
			
		||||
	for ( vector<SPolicyRecord>::iterator iter = m_vPolicy.begin(); iter != m_vPolicy.end(); ++iter )
 | 
			
		||||
	{
 | 
			
		||||
		try
 | 
			
		||||
		{
 | 
			
		||||
			SaveTelSalePolicyInfo( *iter, vGifts );
 | 
			
		||||
		}
 | 
			
		||||
		catch( runtime_error &excpt )
 | 
			
		||||
		{
 | 
			
		||||
			m_vErrorPolicy.push_back( *iter );
 | 
			
		||||
 | 
			
		||||
			QString strInfo = QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") + QString::fromLocal8Bit( (*iter).strPolicySerial.c_str() ) + QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>\n") + 
 | 
			
		||||
				              QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><EFBFBD>") + QString::fromLocal8Bit( excpt.what() );
 | 
			
		||||
 | 
			
		||||
			QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), strInfo );	                   
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m_vPolicy = m_vErrorPolicy;
 | 
			
		||||
 | 
			
		||||
	showPolicy();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::onCleanTable()
 | 
			
		||||
{
 | 
			
		||||
	m_vErrorPolicy.clear();
 | 
			
		||||
	m_vPolicy.clear();
 | 
			
		||||
 | 
			
		||||
	ui.pTableWidgetPolicy->setRowCount(0);
 | 
			
		||||
	ui.pTableWidgetPolicy->clearContents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QRapidInputWidget::onOpenFile()
 | 
			
		||||
{
 | 
			
		||||
	QSettings reg( "HKEY_CURRENT_USER\\Software\\TelsalePolicyInfoManager", QSettings::NativeFormat);
 | 
			
		||||
	QString strPath = reg.value( QString::fromLocal8Bit("<EFBFBD><EFBFBD>ַ") ).toString();
 | 
			
		||||
 | 
			
		||||
	QStringList listFileNames = QFileDialog::getOpenFileNames( this, 
 | 
			
		||||
		QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Excel<EFBFBD>ļ<EFBFBD>"), 
 | 
			
		||||
		strPath, 
 | 
			
		||||
		QString::fromLocal8Bit("Excel<EFBFBD>ļ<EFBFBD> (*.xls *.xlsx)") );
 | 
			
		||||
 | 
			
		||||
	//<2F><>¼һ<C2BC>´<C2B4>·<EFBFBD><C2B7>
 | 
			
		||||
	if ( listFileNames.size() > 0 )
 | 
			
		||||
	{
 | 
			
		||||
		strPath = listFileNames[0].left( listFileNames[0].lastIndexOf( QString::fromLocal8Bit("/") ) + 1 );
 | 
			
		||||
 | 
			
		||||
		reg.setValue( QString::fromLocal8Bit("<EFBFBD><EFBFBD>ַ"), strPath );
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʽ<EFBFBD>ж<EFBFBD><D0B6>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	QRegularExpression regXlsx( QString::fromLocal8Bit(".xlsx$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
 | 
			
		||||
	QRegularExpression regXls( QString::fromLocal8Bit(".xls$"), QRegularExpression::PatternOption::CaseInsensitiveOption );
 | 
			
		||||
	QRegularExpressionMatch match;
 | 
			
		||||
 | 
			
		||||
	strPath = listFileNames[0];
 | 
			
		||||
 | 
			
		||||
	//<2F><>xlsx<73>ļ<EFBFBD>
 | 
			
		||||
	match = regXlsx.match( strPath );
 | 
			
		||||
 | 
			
		||||
	if ( match.hasMatch() )
 | 
			
		||||
	{
 | 
			
		||||
		readTelsaleXlsFile( strPath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), true );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>xls<6C>ļ<EFBFBD>
 | 
			
		||||
	match = regXls.match( strPath );
 | 
			
		||||
 | 
			
		||||
	if ( match.hasMatch() )
 | 
			
		||||
	{
 | 
			
		||||
		readTelsaleXlsFile( strPath.toLocal8Bit().data(), m_vPolicy, ui.pCheckBoxHasTitle->isChecked(), false );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	showPolicy();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,41 +0,0 @@
 | 
			
		||||
#ifndef QRAPIDINPUTWIDGET_H
 | 
			
		||||
#define QRAPIDINPUTWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include "ui_QRapidInputWidget.h"
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
 | 
			
		||||
class QRapidInputWidget : public QWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QRapidInputWidget(QWidget *parent = 0);
 | 
			
		||||
	~QRapidInputWidget();
 | 
			
		||||
 | 
			
		||||
protected:
 | 
			
		||||
	virtual void dragEnterEvent( QDragEnterEvent * pEvent );
 | 
			
		||||
	virtual void dropEvent( QDropEvent * pEvent );
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void onSaveTelSalePolicy();
 | 
			
		||||
	void onCleanTable();
 | 
			
		||||
	void onOpenFile();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
	void initData();
 | 
			
		||||
 | 
			
		||||
	void showPolicy();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QRapidInputWidget ui;
 | 
			
		||||
	std::vector<SPolicyRecord> m_vPolicy;
 | 
			
		||||
	std::vector<SPolicyRecord> m_vErrorPolicy;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QRAPIDINPUTWIDGET_H
 | 
			
		||||
@@ -1,203 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QRapidInputWidget</class>
 | 
			
		||||
 <widget class="QWidget" name="QRapidInputWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>917</width>
 | 
			
		||||
    <height>529</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>QRapidInputWidget</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="layoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>120</x>
 | 
			
		||||
     <y>90</y>
 | 
			
		||||
     <width>541</width>
 | 
			
		||||
     <height>318</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QVBoxLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>0</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QGroupBox" name="groupBox_2">
 | 
			
		||||
        <property name="title">
 | 
			
		||||
         <string>操作:</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout_2">
 | 
			
		||||
         <item row="0" column="2">
 | 
			
		||||
          <widget class="QToolButton" name="pButtonSave">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>保存数据</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="icon">
 | 
			
		||||
            <iconset resource="resource.qrc">
 | 
			
		||||
             <normaloff>:/QMainFrame/Resources/save2.png</normaloff>:/QMainFrame/Resources/save2.png</iconset>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="iconSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>32</width>
 | 
			
		||||
             <height>32</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="toolButtonStyle">
 | 
			
		||||
            <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QToolButton" name="pButtonOpenFile">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>打开文件</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="icon">
 | 
			
		||||
            <iconset resource="resource.qrc">
 | 
			
		||||
             <normaloff>:/QMainFrame/Resources/excel.png</normaloff>:/QMainFrame/Resources/excel.png</iconset>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="iconSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>32</width>
 | 
			
		||||
             <height>32</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="toolButtonStyle">
 | 
			
		||||
            <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <widget class="QToolButton" name="pButtonClean">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>清空列表</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="icon">
 | 
			
		||||
            <iconset resource="resource.qrc">
 | 
			
		||||
             <normaloff>:/QMainFrame/Resources/clean.png</normaloff>:/QMainFrame/Resources/clean.png</iconset>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="iconSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>32</width>
 | 
			
		||||
             <height>32</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="toolButtonStyle">
 | 
			
		||||
            <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
        <property name="title">
 | 
			
		||||
         <string>导入参数:</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QCheckBox" name="pCheckBoxHasTitle">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>包含标题</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="checked">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <spacer name="horizontalSpacer">
 | 
			
		||||
           <property name="orientation">
 | 
			
		||||
            <enum>Qt::Horizontal</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="sizeHint" stdset="0">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>191</width>
 | 
			
		||||
             <height>20</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
          </spacer>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QTableWidget" name="pTableWidgetPolicy">
 | 
			
		||||
      <property name="styleSheet">
 | 
			
		||||
       <string notr="true"/>
 | 
			
		||||
      </property>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>保单号</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>签单日期</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>车牌号</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>被保险人</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>车商代码</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>经办人代码</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>经办人名称</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>部门</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>科室</string>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,410 +0,0 @@
 | 
			
		||||
#include <QtWidgets/QtWidgets>
 | 
			
		||||
#include "QTelSalePolicyInfoInputWidget.h"
 | 
			
		||||
#include "QRapidInputWidget.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
QTelSalePolicyInfoInputWidget::QTelSalePolicyInfoInputWidget(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QTelSalePolicyInfoInputWidget::~QTelSalePolicyInfoInputWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::init()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( pLayoutMain );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD>¼<EFBFBD>봰<EFBFBD><EBB4B0>
 | 
			
		||||
	pTabWidget->widget( 0 )->setLayout( pLayoutInputMain );
 | 
			
		||||
 | 
			
		||||
	pScrollAreaInput->setWidget( pWidgetInput );
 | 
			
		||||
 | 
			
		||||
	pWidgetInput->setLayout( pLayoutInfoDetail );
 | 
			
		||||
	pWidgetInput->setMaximumWidth( 820 );
 | 
			
		||||
	pWidgetInput->setMinimumWidth( 820 );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD>¼<EFBFBD><C2BC>
 | 
			
		||||
	QRapidInputWidget * pWidgetRapid = new QRapidInputWidget;
 | 
			
		||||
 | 
			
		||||
	pScrollAreaRapid->setWidget( pWidgetRapid );
 | 
			
		||||
 | 
			
		||||
	pTabWidget->widget( 1 )->setLayout( pLayoutRapid );
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( pEditSalerCode, SIGNAL(editingFinished()), this, SLOT(onQuerySalerName()));
 | 
			
		||||
	connect( pEditSalerCode, SIGNAL(textChanged(const QString &)), this, SLOT(onSalerCodeChanged()) );
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(editingFinished()), this, SLOT(onQueryAutoTraderName()));
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(textChanged(const QString &)), this, SLOT(onAutoTraderCodeChanged()) );
 | 
			
		||||
	connect( pButtonSave, SIGNAL(clicked()), this, SLOT(onSavePolicy()) );
 | 
			
		||||
	connect( pButtonResetGift, SIGNAL(clicked()), this, SLOT(onResetGiftsTable()) );
 | 
			
		||||
	connect( pButtonReset, SIGNAL(clicked()), this, SLOT(onReset()) );
 | 
			
		||||
	connect( pTableGifts, SIGNAL(cellChanged(int,int)), this, SLOT(onGiftTableItemChanged(int, int)) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
	//Ĭ<>ϵij<CFB5><C4B3>̴<EFBFBD><CCB4><EFBFBD>
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit(parameters.getParameter("Ĭ<EFBFBD>ϳ<EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>").c_str() ));
 | 
			
		||||
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
 | 
			
		||||
	//<2F><>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD>
 | 
			
		||||
	InitGiftTable();
 | 
			
		||||
 | 
			
		||||
	pEditQjxPolicySerial->clear();
 | 
			
		||||
	pEditBizPolicySerial->clear();
 | 
			
		||||
	pEditSalerCode->clear();
 | 
			
		||||
	pEditSalerName->clear();
 | 
			
		||||
	pEditDeptCode->clear();
 | 
			
		||||
	pEditDeptName->clear();
 | 
			
		||||
	pEditOfficeCode->clear();
 | 
			
		||||
	pEditOfficeName->clear();
 | 
			
		||||
	pComboBoxAutotraderCall->setCurrentIndex( 0 );
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::InitGiftTable()
 | 
			
		||||
{
 | 
			
		||||
	//<2F><><EFBFBD>ñ<EFBFBD>־λ
 | 
			
		||||
	m_initing = true;
 | 
			
		||||
 | 
			
		||||
	m_giftsList.clear();
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		queryTelsalePolicyGifts( m_giftsList );
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error &error )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, "<EFBFBD><EFBFBD>ȡ<EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>", error.what() );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pTableGifts->clearContents();
 | 
			
		||||
	pTableGifts->setColumnWidth( 0, 200 );
 | 
			
		||||
	pTableGifts->setRowCount( m_giftsList.size() + 2 );
 | 
			
		||||
 | 
			
		||||
	vector<TelSalePolicyGift>::iterator iter = m_giftsList.begin();
 | 
			
		||||
 | 
			
		||||
	for ( unsigned int rowIndex = 0; iter != m_giftsList.end(); rowIndex++ )
 | 
			
		||||
	{
 | 
			
		||||
		QTableWidgetItem *pItem = new QTableWidgetItem();
 | 
			
		||||
 | 
			
		||||
		pItem->setCheckState( Qt::Unchecked );
 | 
			
		||||
		pItem->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled );
 | 
			
		||||
		pItem->setText( QString::fromLocal8Bit(iter->GiftName().c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignLeft | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableGifts->setItem( rowIndex, 0, pItem );
 | 
			
		||||
 | 
			
		||||
		pItem = new QTableWidgetItem();
 | 
			
		||||
 | 
			
		||||
		pItem->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable );
 | 
			
		||||
		pItem->setText( QString::fromLocal8Bit(iter->GiftDefaultPrice().c_str()) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableGifts->setItem( rowIndex, 1, pItem );
 | 
			
		||||
 | 
			
		||||
		++iter;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
	QTableWidgetItem * pItemOther = new QTableWidgetItem();
 | 
			
		||||
	QTableWidgetItem * pItemOtherPrice = new QTableWidgetItem();
 | 
			
		||||
 | 
			
		||||
	pItemOther->setText( QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
	pItemOther->setCheckState( Qt::Unchecked );
 | 
			
		||||
	pItemOther->setFlags(Qt::ItemIsUserCheckable | Qt::ItemIsEnabled );
 | 
			
		||||
	pItemOther->setTextAlignment( Qt::AlignLeft | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
	pItemOtherPrice->setText( "0" );
 | 
			
		||||
	pItemOtherPrice->setFlags( Qt::ItemIsEnabled | Qt::ItemIsEditable );
 | 
			
		||||
	pItemOtherPrice->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
	pTableGifts->setItem( m_giftsList.size(), 0, pItemOther );
 | 
			
		||||
	pTableGifts->setItem( m_giftsList.size(), 1, pItemOtherPrice );
 | 
			
		||||
 | 
			
		||||
	//<2F><>Ʒ<EFBFBD>ܼ<EFBFBD>ֵ
 | 
			
		||||
	QTableWidgetItem * pItemTotalPrice = new QTableWidgetItem();
 | 
			
		||||
	QTableWidgetItem * pItemTotalPriceAmount = new QTableWidgetItem();
 | 
			
		||||
 | 
			
		||||
	pItemTotalPrice->setText( QString::fromLocal8Bit("<EFBFBD><EFBFBD>Ʒ<EFBFBD>ܼ<EFBFBD>ֵ") );
 | 
			
		||||
	pItemTotalPrice->setTextColor( Qt::red );
 | 
			
		||||
	pItemTotalPrice->setFlags( Qt::ItemIsEnabled );
 | 
			
		||||
	pItemTotalPrice->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
	pItemTotalPriceAmount->setText( QString::fromLocal8Bit("0 Ԫ") );
 | 
			
		||||
	pItemTotalPriceAmount->setTextColor( Qt::red );
 | 
			
		||||
	pItemTotalPriceAmount->setFlags( Qt::ItemIsEnabled );
 | 
			
		||||
	pItemTotalPriceAmount->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
	pTableGifts->setItem( m_giftsList.size() + 1, 0, pItemTotalPrice );
 | 
			
		||||
	pTableGifts->setItem( m_giftsList.size() + 1, 1, pItemTotalPriceAmount );
 | 
			
		||||
 | 
			
		||||
	pTableGifts->resizeColumnsToContents();
 | 
			
		||||
 | 
			
		||||
	m_initing = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::readGiftTable(vector<TelSalePolicyGift> & giftList)
 | 
			
		||||
{
 | 
			
		||||
	int rowCount = pTableGifts->rowCount();
 | 
			
		||||
 | 
			
		||||
	for ( int rowIndex = 0; rowIndex < rowCount; rowIndex++ )
 | 
			
		||||
	{
 | 
			
		||||
		QTableWidgetItem * pItemName = pTableGifts->item( rowIndex, 0 );
 | 
			
		||||
		QTableWidgetItem * pItemPrice = pTableGifts->item( rowIndex, 1 );
 | 
			
		||||
 | 
			
		||||
		if ( pItemName->checkState() == Qt::Unchecked )
 | 
			
		||||
		{
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		TelSalePolicyGift gift( rowIndex, string(pItemName->text().toLocal8Bit().data()), string( pItemPrice->text().toLocal8Bit().data() ));
 | 
			
		||||
 | 
			
		||||
		giftList.push_back( gift );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onSalerCodeChanged()
 | 
			
		||||
{
 | 
			
		||||
	pEditSalerName->clear();
 | 
			
		||||
	pEditDeptName->clear();
 | 
			
		||||
	pEditDeptCode->clear();
 | 
			
		||||
	pEditOfficeName->clear();
 | 
			
		||||
	pEditOfficeCode->clear();
 | 
			
		||||
 | 
			
		||||
	m_strSalerCode.clear();
 | 
			
		||||
	m_strSalerName.clear();
 | 
			
		||||
	m_strSalerDeptCode.clear();
 | 
			
		||||
	m_strSalerDeptName.clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onQuerySalerName()
 | 
			
		||||
{
 | 
			
		||||
	m_strSalerCode = pEditSalerCode->text().trimmed().toUpper().toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
	queryStaffInfo( m_strSalerCode, m_strSalerName, m_strSalerDeptCode, m_strSalerDeptName, m_strSalerOfficeCode, m_strSalerOfficeName );
 | 
			
		||||
 | 
			
		||||
	pEditSalerName->setText( QString::fromLocal8Bit( m_strSalerName.c_str() ));
 | 
			
		||||
	pEditOfficeCode->setText( QString::fromLocal8Bit( m_strSalerOfficeCode.c_str() ));
 | 
			
		||||
	pEditOfficeName->setText( QString::fromLocal8Bit( m_strSalerOfficeName.c_str() ));
 | 
			
		||||
	pEditDeptCode->setText( QString::fromLocal8Bit( m_strSalerDeptCode.c_str() ));
 | 
			
		||||
	pEditDeptName->setText( QString::fromLocal8Bit( m_strSalerDeptName.c_str() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onSavePolicy()
 | 
			
		||||
{
 | 
			
		||||
	string strJqxPolicySerial = pEditQjxPolicySerial->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
	string strBizPolicySerial = pEditBizPolicySerial->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
    int iAutotraderCallIndex = pComboBoxAutotraderCall->currentIndex();
 | 
			
		||||
 | 
			
		||||
    vector<TelSalePolicyGift> giftsList; //<2F>û<EFBFBD>ѡ<EFBFBD><D1A1><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD>嵥
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD>ź<EFBFBD>
 | 
			
		||||
	emit pEditSalerCode->editingFinished();
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
 | 
			
		||||
	if ( strJqxPolicySerial.empty() && strBizPolicySerial.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뱣<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD>ǿ<EFBFBD>ա<EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ž<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>\n<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>һ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ţ<EFBFBD>"), QMessageBox::Yes );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( m_strSalerName.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>뾭<EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><EFBFBD>벻<EFBFBD><EFBFBD>ȷ<EFBFBD><EFBFBD>"), QMessageBox::Yes );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    if ( iAutotraderCallIndex == 0 )
 | 
			
		||||
    {
 | 
			
		||||
        QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("δѡ<EFBFBD><EFBFBD><EFBFBD>Ƿ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QMessageBox::Yes );
 | 
			
		||||
 | 
			
		||||
        return;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	if ( pEditAutoTraderName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QMessageBox::Yes );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
    if ( pGroupBoxGift->isChecked() == true )
 | 
			
		||||
    {
 | 
			
		||||
        readGiftTable( giftsList );
 | 
			
		||||
 | 
			
		||||
        if ( giftsList.size() == 0 )
 | 
			
		||||
        {
 | 
			
		||||
            QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("δѡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD><EFBFBD>"), QMessageBox::Yes );
 | 
			
		||||
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	SPolicyRecord policy;//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
 | 
			
		||||
 | 
			
		||||
	policy.strSalerCode = m_strSalerCode;
 | 
			
		||||
    policy.strSalerName = m_strSalerName;
 | 
			
		||||
    policy.strSalerDeptCode = m_strSalerDeptCode;
 | 
			
		||||
    policy.strSalerDeptName = m_strSalerDeptName;
 | 
			
		||||
	policy.strSalerOfficeCode = m_strSalerOfficeCode;
 | 
			
		||||
	policy.strSalerOfficeName = m_strSalerOfficeName;
 | 
			
		||||
	policy.strOperatorCode = getUserCode();
 | 
			
		||||
	policy.strCustomerName = pEditCustomerName->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
	policy.strPlateSerial = pEditPlateSerial->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
	policy.strFrameSerial = pEditFrameSerial->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
	policy.strEngineSerial = pEditEngineSerial->text().trimmed().toLocal8Bit().data();
 | 
			
		||||
	policy.strOperatorDate = QDate::currentDate().toString( QString::fromLocal8Bit("MM/dd/yyyy")).toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
    if ( iAutotraderCallIndex == 2 )
 | 
			
		||||
    {
 | 
			
		||||
        policy.bIsAutotraderCall = true;
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        policy.bIsAutotraderCall = false;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
 | 
			
		||||
	if ( m_strAutoTraderName.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		policy.strAutoTraderCode = m_strAutoTraderCode;
 | 
			
		||||
		policy.strAutoTraderName = m_strAutoTraderName;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( strJqxPolicySerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>
 | 
			
		||||
		policy.strPolicySerial = strJqxPolicySerial;
 | 
			
		||||
 | 
			
		||||
		try
 | 
			
		||||
		{
 | 
			
		||||
			SaveTelSalePolicyInfo( policy, giftsList );
 | 
			
		||||
 | 
			
		||||
			QMessageBox::information( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!"), QString::fromLocal8Bit("<EFBFBD><EFBFBD>ǿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!"), QMessageBox::Yes );
 | 
			
		||||
		}
 | 
			
		||||
		catch ( runtime_error & error )
 | 
			
		||||
		{
 | 
			
		||||
            QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD>潻ǿ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"), QString::fromLocal8Bit(error.what()), QMessageBox::Yes );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( strBizPolicySerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ǿ<EFBFBD>ձ<EFBFBD><D5B1><EFBFBD>
 | 
			
		||||
		policy.strPolicySerial = strBizPolicySerial;
 | 
			
		||||
 | 
			
		||||
		try
 | 
			
		||||
		{
 | 
			
		||||
			SaveTelSalePolicyInfo( policy, giftsList );
 | 
			
		||||
 | 
			
		||||
			QMessageBox::information( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!"), QString::fromLocal8Bit("<EFBFBD><EFBFBD>ҵ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ɹ<EFBFBD>!"), QMessageBox::Yes );
 | 
			
		||||
		}
 | 
			
		||||
		catch ( runtime_error & error )
 | 
			
		||||
		{
 | 
			
		||||
            QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ҵ<EFBFBD>ձ<EFBFBD><EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>"), QString::fromLocal8Bit(error.what()), QMessageBox::Yes );
 | 
			
		||||
		}	
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onResetGiftsTable()
 | 
			
		||||
{
 | 
			
		||||
	InitGiftTable();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onGiftTableItemChanged(int row, int column)
 | 
			
		||||
{
 | 
			
		||||
	if ( m_initing == true )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	int rowCount = pTableGifts->rowCount() - 1;
 | 
			
		||||
	QTableWidgetItem * pItem = NULL;
 | 
			
		||||
	QTableWidgetItem * pItemPrice = NULL;
 | 
			
		||||
	bool isSuccess = false;
 | 
			
		||||
	double giftPrice = 0.0l;
 | 
			
		||||
 | 
			
		||||
	if ( column == 1 && row != rowCount )
 | 
			
		||||
	{
 | 
			
		||||
		pItem = pTableGifts->item( row, 0 );
 | 
			
		||||
		pItemPrice = pTableGifts->item( row, column );
 | 
			
		||||
 | 
			
		||||
		pItemPrice->text().toDouble( &isSuccess );
 | 
			
		||||
 | 
			
		||||
		if ( isSuccess == false )
 | 
			
		||||
		{
 | 
			
		||||
			QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), pItem->text() + QString::fromLocal8Bit("<EFBFBD>۸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
			pItemPrice->setText( "0" );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for ( int rowIndex = 0; rowIndex < rowCount; rowIndex++ )
 | 
			
		||||
	{
 | 
			
		||||
		pItem = pTableGifts->item( rowIndex,  0 );
 | 
			
		||||
		pItemPrice = pTableGifts->item( rowIndex, 1 );
 | 
			
		||||
 | 
			
		||||
		if ( pItem->checkState() == Qt::Unchecked )
 | 
			
		||||
		{
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		giftPrice += pItemPrice->text().toDouble( &isSuccess );
 | 
			
		||||
 | 
			
		||||
		if ( isSuccess == false )
 | 
			
		||||
		{
 | 
			
		||||
			QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), pItem->text() + QString::fromLocal8Bit("<EFBFBD>۸<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
			pItemPrice->setText( "0" );
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pTableGifts->item( pTableGifts->rowCount() - 1, 1 )->setText( QString::fromLocal8Bit("%1 Ԫ").arg(giftPrice) );
 | 
			
		||||
	pTableGifts->resizeColumnsToContents();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onAutoTraderCodeChanged()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderName->clear();
 | 
			
		||||
 | 
			
		||||
	m_strAutoTraderName.clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onQueryAutoTraderName()
 | 
			
		||||
{
 | 
			
		||||
	m_strAutoTraderCode = pEditAutoTraderCode->text().trimmed().toUpper().toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
	queryAutoTraderInfo( m_strAutoTraderCode, m_strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
	pEditAutoTraderName->setText( QString::fromLocal8Bit( m_strAutoTraderName.c_str() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoInputWidget::onReset()
 | 
			
		||||
{
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,50 +0,0 @@
 | 
			
		||||
#ifndef QTELSALEPOLICYINFOINPUTWIDGET_H
 | 
			
		||||
#define QTELSALEPOLICYINFOINPUTWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
#include "ui_QTelSalePolicyInfoInputWidget.h"
 | 
			
		||||
 | 
			
		||||
class QTelSalePolicyInfoInputWidget : public QWidget, public Ui::QTelSalePolicyInfoInputWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QTelSalePolicyInfoInputWidget(QWidget *parent = 0);
 | 
			
		||||
	~QTelSalePolicyInfoInputWidget();
 | 
			
		||||
 | 
			
		||||
public Q_SLOTS:
 | 
			
		||||
	void onSalerCodeChanged();
 | 
			
		||||
	void onQuerySalerName();
 | 
			
		||||
	void onAutoTraderCodeChanged();
 | 
			
		||||
	void onQueryAutoTraderName();
 | 
			
		||||
	void onSavePolicy();
 | 
			
		||||
	void onResetGiftsTable();
 | 
			
		||||
	void onGiftTableItemChanged( int row, int column );
 | 
			
		||||
	void onReset();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
	void initData();
 | 
			
		||||
	void InitGiftTable();
 | 
			
		||||
	void readGiftTable( vector<TelSalePolicyGift> & giftList );
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	string m_strSalerCode;
 | 
			
		||||
	string m_strSalerName;
 | 
			
		||||
	string m_strSalerDeptCode;
 | 
			
		||||
	string m_strSalerDeptName;
 | 
			
		||||
	string m_strSalerOfficeCode;
 | 
			
		||||
	string m_strSalerOfficeName;
 | 
			
		||||
	string m_strAutoTraderCode;
 | 
			
		||||
	string m_strAutoTraderName;
 | 
			
		||||
 | 
			
		||||
	vector<TelSalePolicyGift> m_giftsList;
 | 
			
		||||
 | 
			
		||||
	bool m_initing;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QTELSALEPOLICYINFOINPUTWIDGET_H
 | 
			
		||||
@@ -1,890 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QTelSalePolicyInfoInputWidget</class>
 | 
			
		||||
 <widget class="QWidget" name="QTelSalePolicyInfoInputWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>1007</width>
 | 
			
		||||
    <height>872</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>QTelSalePolicyInfoInputWidget</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="gridLayoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>60</x>
 | 
			
		||||
     <y>30</y>
 | 
			
		||||
     <width>271</width>
 | 
			
		||||
     <height>181</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QGridLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>0</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item row="0" column="0">
 | 
			
		||||
     <widget class="QTabWidget" name="pTabWidget">
 | 
			
		||||
      <property name="currentIndex">
 | 
			
		||||
       <number>1</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="iconSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>32</width>
 | 
			
		||||
        <height>32</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="documentMode">
 | 
			
		||||
       <bool>false</bool>
 | 
			
		||||
      </property>
 | 
			
		||||
      <widget class="QWidget" name="tab">
 | 
			
		||||
       <attribute name="icon">
 | 
			
		||||
        <iconset resource="resource.qrc">
 | 
			
		||||
         <normaloff>:/QMainFrame/Resources/edit.png</normaloff>:/QMainFrame/Resources/edit.png</iconset>
 | 
			
		||||
       </attribute>
 | 
			
		||||
       <attribute name="title">
 | 
			
		||||
        <string>转介绍信息录入</string>
 | 
			
		||||
       </attribute>
 | 
			
		||||
       <widget class="QWidget" name="gridLayoutWidget_2">
 | 
			
		||||
        <property name="geometry">
 | 
			
		||||
         <rect>
 | 
			
		||||
          <x>20</x>
 | 
			
		||||
          <y>20</y>
 | 
			
		||||
          <width>160</width>
 | 
			
		||||
          <height>80</height>
 | 
			
		||||
         </rect>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="pLayoutInputMain">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QScrollArea" name="pScrollAreaInput">
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">#pScrollAreaInput
 | 
			
		||||
{
 | 
			
		||||
	border: none;
 | 
			
		||||
}</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="widgetResizable">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
           <widget class="QWidget" name="scrollAreaWidgetContents">
 | 
			
		||||
            <property name="geometry">
 | 
			
		||||
             <rect>
 | 
			
		||||
              <x>0</x>
 | 
			
		||||
              <y>0</y>
 | 
			
		||||
              <width>100</width>
 | 
			
		||||
              <height>30</height>
 | 
			
		||||
             </rect>
 | 
			
		||||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </widget>
 | 
			
		||||
      <widget class="QWidget" name="tab_2">
 | 
			
		||||
       <attribute name="icon">
 | 
			
		||||
        <iconset resource="resource.qrc">
 | 
			
		||||
         <normaloff>:/QMainFrame/Resources/excel.png</normaloff>:/QMainFrame/Resources/excel.png</iconset>
 | 
			
		||||
       </attribute>
 | 
			
		||||
       <attribute name="title">
 | 
			
		||||
        <string>批量录入</string>
 | 
			
		||||
       </attribute>
 | 
			
		||||
       <widget class="QWidget" name="gridLayoutWidget_3">
 | 
			
		||||
        <property name="geometry">
 | 
			
		||||
         <rect>
 | 
			
		||||
          <x>50</x>
 | 
			
		||||
          <y>20</y>
 | 
			
		||||
          <width>160</width>
 | 
			
		||||
          <height>80</height>
 | 
			
		||||
         </rect>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="pLayoutRapid">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QScrollArea" name="pScrollAreaRapid">
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">#pScrollAreaRapid
 | 
			
		||||
{
 | 
			
		||||
	border: none;
 | 
			
		||||
}</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="widgetResizable">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
           <widget class="QWidget" name="scrollAreaWidgetContents_2">
 | 
			
		||||
            <property name="geometry">
 | 
			
		||||
             <rect>
 | 
			
		||||
              <x>0</x>
 | 
			
		||||
              <y>0</y>
 | 
			
		||||
              <width>158</width>
 | 
			
		||||
              <height>78</height>
 | 
			
		||||
             </rect>
 | 
			
		||||
            </property>
 | 
			
		||||
           </widget>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </widget>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QWidget" name="pWidgetInput" native="true">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>390</x>
 | 
			
		||||
     <y>70</y>
 | 
			
		||||
     <width>71</width>
 | 
			
		||||
     <height>51</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
  </widget>
 | 
			
		||||
  <widget class="QWidget" name="layoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>45</x>
 | 
			
		||||
     <y>225</y>
 | 
			
		||||
     <width>861</width>
 | 
			
		||||
     <height>580</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QGridLayout" name="pLayoutInfoDetail">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item row="0" column="0">
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>保单信息</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_2">
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_8">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">font:rgb(255, 0, 0)</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>交强险保单号:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1" colspan="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditQjxPolicySerial">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maxLength">
 | 
			
		||||
          <number>20</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="frame">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_9">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>商业险保单号:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="1" colspan="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditBizPolicySerial">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maxLength">
 | 
			
		||||
          <number>20</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="frame">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_20">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderCode">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>false</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_21">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string/>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_13">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车店联呼:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="1" colspan="3">
 | 
			
		||||
        <widget class="QComboBox" name="pComboBoxAutotraderCall">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">text-align: center;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeAdjustPolicy">
 | 
			
		||||
          <enum>QComboBox::AdjustToContents</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <item>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string/>
 | 
			
		||||
          </property>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>否</string>
 | 
			
		||||
          </property>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>是</string>
 | 
			
		||||
          </property>
 | 
			
		||||
         </item>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item row="0" column="1">
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox_2">
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>经办人信息</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_10">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>经办人代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1" colspan="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditSalerCode">
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>16777215</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maxLength">
 | 
			
		||||
          <number>6</number>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_11">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>经办人名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="1" colspan="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditSalerName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_12">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>72</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>部门代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditDeptCode">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_23">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>0</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>部门名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditDeptName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_19">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>72</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>科室代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditOfficeCode">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>70</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string/>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_22">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>0</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>科室名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="3" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditOfficeName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string/>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item row="1" column="0" colspan="2">
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox_3">
 | 
			
		||||
      <property name="enabled">
 | 
			
		||||
       <bool>false</bool>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>车辆信息</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_4">
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_14">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>84</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>客户名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1" colspan="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditCustomerName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_15">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>84</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车牌号:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditPlateSerial">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_16">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车架号:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="1" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditFrameSerial">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_17">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>84</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>发动机号:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditEngineSerial">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="2" column="2" colspan="2">
 | 
			
		||||
        <widget class="QLabel" name="label_18">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>* 此部分内容可以不填</string>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item row="2" column="0" colspan="2">
 | 
			
		||||
     <widget class="QGroupBox" name="pGroupBoxGift">
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>礼品清单:</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="checkable">
 | 
			
		||||
       <bool>true</bool>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="checked">
 | 
			
		||||
       <bool>false</bool>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_8">
 | 
			
		||||
       <item row="0" column="0" colspan="2">
 | 
			
		||||
        <widget class="QTableWidget" name="pTableGifts">
 | 
			
		||||
         <property name="alternatingRowColors">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
         <attribute name="verticalHeaderVisible">
 | 
			
		||||
          <bool>false</bool>
 | 
			
		||||
         </attribute>
 | 
			
		||||
         <row>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>新建行</string>
 | 
			
		||||
          </property>
 | 
			
		||||
         </row>
 | 
			
		||||
         <column>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>礼品名称</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="textAlignment">
 | 
			
		||||
           <set>AlignCenter</set>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/8218_box1.png</normaloff>:/QMainFrame/Resources/8218_box1.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
         </column>
 | 
			
		||||
         <column>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>礼品价值</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="textAlignment">
 | 
			
		||||
           <set>AlignCenter</set>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/CNY_Red.png</normaloff>:/QMainFrame/Resources/CNY_Red.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
         </column>
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string/>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="checkState">
 | 
			
		||||
           <enum>Unchecked</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
         </item>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item row="3" column="0" colspan="2">
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox_4">
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>操作</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_6">
 | 
			
		||||
       <item row="0" column="2">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonReset">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>重置所有</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>重置</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/clean.png</normaloff>:/QMainFrame/Resources/clean.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="4">
 | 
			
		||||
        <spacer name="horizontalSpacer_2">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <spacer name="horizontalSpacer">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonSave">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>保存信息</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>保存</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/save2.png</normaloff>:/QMainFrame/Resources/save2.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="3">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonResetGift">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>重置礼品列表</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>重置</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/8218_box1.png</normaloff>:/QMainFrame/Resources/8218_box1.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,198 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <Qtwidgets/QtWidgets>
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
#include "QTelSalePolicyInfoQuery.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
QTelSalePolicyInfoQuery::QTelSalePolicyInfoQuery(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QTelSalePolicyInfoQuery::~QTelSalePolicyInfoQuery()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::init()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( pLayoutMain );
 | 
			
		||||
 | 
			
		||||
	//¼<><C2BC>ʱ<EFBFBD><CAB1>
 | 
			
		||||
	pDateEditStart->setDate( QDate::currentDate().addDays(-1) );
 | 
			
		||||
	pDateEditEnd->setDate( QDate::currentDate() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( pEditOperatorCode, SIGNAL(editingFinished()), this, SLOT(onOperatorCodeEdited()) );
 | 
			
		||||
	connect( pEditOperatorCode, SIGNAL(textChanged(const QString &)), this, SLOT(onOperatorCodeEditing(const QString &)) );
 | 
			
		||||
	connect( pButtonQuery, SIGNAL(clicked()), this, SLOT(onQuery()) );
 | 
			
		||||
	connect( pButtonReset, SIGNAL(clicked()), this, SLOT(onReset()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::onOperatorCodeEditing(const QString & text)
 | 
			
		||||
{
 | 
			
		||||
	pEditOperatorName->clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::onOperatorCodeEdited()
 | 
			
		||||
{
 | 
			
		||||
	string strStaffCode = pEditOperatorCode->text().toLocal8Bit().data();
 | 
			
		||||
	string strStaffName;
 | 
			
		||||
 | 
			
		||||
	queryStaffInfo( strStaffCode, strStaffName );
 | 
			
		||||
 | 
			
		||||
	pEditOperatorName->setText( QString::fromLocal8Bit( strStaffName.c_str() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::onQuery()
 | 
			
		||||
{
 | 
			
		||||
	string strPolicyNo = pEditPolicyNo->text().toLocal8Bit().data();
 | 
			
		||||
	string strOperatorCode;
 | 
			
		||||
	string strStartDate;
 | 
			
		||||
	string strEndDate;
 | 
			
		||||
 | 
			
		||||
	vector<SPolicyQuery> vPolicyInfo;
 | 
			
		||||
 | 
			
		||||
	if ( !pEditOperatorName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		strOperatorCode = pEditOperatorCode->text().toLocal8Bit().data();
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		//<2F>Զ<EFBFBD>ʹ<EFBFBD>ò<EFBFBD><C3B2><EFBFBD>Ա<EFBFBD>Ĺ<EFBFBD><C4B9><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
 | 
			
		||||
		strOperatorCode = getUserCode();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pGroupBoxDate->isChecked() )
 | 
			
		||||
	{
 | 
			
		||||
		strStartDate = pDateEditStart->date().toString( QString::fromLocal8Bit("MM/dd/yyyy") ).toLocal8Bit().data();
 | 
			
		||||
		strEndDate = pDateEditEnd->date().toString( QString::fromLocal8Bit("MM/dd/yyyy") ).toLocal8Bit().data();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		QueryTelSalePolicyInfo( strPolicyNo,
 | 
			
		||||
			                    strOperatorCode,
 | 
			
		||||
			                    strStartDate,
 | 
			
		||||
			                    strEndDate,
 | 
			
		||||
								vPolicyInfo );
 | 
			
		||||
 | 
			
		||||
		showData( vPolicyInfo );
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD>ѯ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit(error.what()) );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::onReset()
 | 
			
		||||
{
 | 
			
		||||
	//¼<><C2BC>ʱ<EFBFBD><CAB1>
 | 
			
		||||
	pDateEditStart->setDate( QDate::currentDate().addDays(-1) );
 | 
			
		||||
	pDateEditEnd->setDate( QDate::currentDate() );
 | 
			
		||||
 | 
			
		||||
	pEditPolicyNo->clear();
 | 
			
		||||
	pEditOperatorCode->clear();
 | 
			
		||||
	pEditOperatorName->clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QTelSalePolicyInfoQuery::showData(std::vector<SPolicyQuery> & vPolicy)
 | 
			
		||||
{
 | 
			
		||||
	QTableWidgetItem * pItem = NULL;
 | 
			
		||||
	QLabel * pLabel = NULL;
 | 
			
		||||
	unsigned int nRowIndex = 0;
 | 
			
		||||
 | 
			
		||||
	pTableWidgetInfo->setRowCount( vPolicy.size() );
 | 
			
		||||
 | 
			
		||||
	for ( vector<SPolicyQuery>::iterator iter = vPolicy.begin(); iter != vPolicy.end(); ++iter )
 | 
			
		||||
	{
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strPolicySerial.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 0, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strSalerCode.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 1, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strDeptName.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 2, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strOfficeName.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 3, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		if ( iter->strCDLH == "1" )
 | 
			
		||||
		{
 | 
			
		||||
			pItem = new QTableWidgetItem( QString::fromLocal8Bit( "<EFBFBD><EFBFBD>" ));
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			pItem = new QTableWidgetItem( QString::fromLocal8Bit( "<EFBFBD><EFBFBD>" ));
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 4, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>̴<EFBFBD><CCB4><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strAutoTraderCode.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 5, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strAutoTraderName.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 6, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><>Ʒ<EFBFBD>ܼ<EFBFBD>ֵ
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::number(iter->dGiftPriceSum, 'f', 2) );
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 7, pItem );
 | 
			
		||||
 | 
			
		||||
		//<2F><>Ʒ
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strGifts.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignLeft | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 8, pItem );
 | 
			
		||||
 | 
			
		||||
		//¼<><C2BC><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		pItem = new QTableWidgetItem( QString::fromLocal8Bit( iter->strInputDate.c_str() ));
 | 
			
		||||
		pItem->setTextAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
 | 
			
		||||
 | 
			
		||||
		pTableWidgetInfo->setItem( nRowIndex, 9, pItem );
 | 
			
		||||
 | 
			
		||||
		++nRowIndex;
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pTableWidgetInfo->resizeColumnsToContents();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
#ifndef QTELSALEPOLICYINFOQUERY_H
 | 
			
		||||
#define QTELSALEPOLICYINFOQUERY_H
 | 
			
		||||
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
#include "ui_QTelSalePolicyInfoQuery.h"
 | 
			
		||||
 | 
			
		||||
class QTelSalePolicyInfoQuery : public QWidget, public Ui::QTelSalePolicyInfoQuery
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QTelSalePolicyInfoQuery(QWidget *parent = 0);
 | 
			
		||||
	~QTelSalePolicyInfoQuery();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void onOperatorCodeEditing(const QString & text);
 | 
			
		||||
	void onOperatorCodeEdited();
 | 
			
		||||
 | 
			
		||||
	void onQuery();
 | 
			
		||||
	void onReset();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
 | 
			
		||||
	void showData( std::vector<SPolicyQuery> & vPolicy );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QTELSALEPOLICYINFOQUERY_H
 | 
			
		||||
@@ -1,392 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QTelSalePolicyInfoQuery</class>
 | 
			
		||||
 <widget class="QWidget" name="QTelSalePolicyInfoQuery">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>917</width>
 | 
			
		||||
    <height>624</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>QTelSalePolicyInfoQuery</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="layoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>20</x>
 | 
			
		||||
     <y>50</y>
 | 
			
		||||
     <width>756</width>
 | 
			
		||||
     <height>280</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QVBoxLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>0</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QGroupBox" name="groupBox_2">
 | 
			
		||||
        <property name="minimumSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>0</width>
 | 
			
		||||
          <height>0</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="maximumSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>16777215</width>
 | 
			
		||||
          <height>16777215</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="title">
 | 
			
		||||
         <string>保单信息:</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout_2">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_9">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>保单号:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1" colspan="3">
 | 
			
		||||
          <widget class="QLineEdit" name="pEditPolicyNo">
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maxLength">
 | 
			
		||||
            <number>20</number>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="frame">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_20">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>操作员代码:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="1">
 | 
			
		||||
          <widget class="QLineEdit" name="pEditOperatorCode">
 | 
			
		||||
           <property name="minimumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>90</width>
 | 
			
		||||
             <height>0</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="maximumSize">
 | 
			
		||||
            <size>
 | 
			
		||||
             <width>90</width>
 | 
			
		||||
             <height>16777215</height>
 | 
			
		||||
            </size>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="readOnly">
 | 
			
		||||
            <bool>false</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="2">
 | 
			
		||||
          <widget class="QLabel" name="label_21">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>操作员名称:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="3">
 | 
			
		||||
          <widget class="QLineEdit" name="pEditOperatorName">
 | 
			
		||||
           <property name="styleSheet">
 | 
			
		||||
            <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string/>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="readOnly">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QGroupBox" name="pGroupBoxDate">
 | 
			
		||||
        <property name="minimumSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>0</width>
 | 
			
		||||
          <height>0</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="maximumSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>16777215</width>
 | 
			
		||||
          <height>16777215</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="title">
 | 
			
		||||
         <string>录入日期:</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="checkable">
 | 
			
		||||
         <bool>true</bool>
 | 
			
		||||
        </property>
 | 
			
		||||
        <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
         <item row="0" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_22">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>起始日期:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="0" column="1">
 | 
			
		||||
          <widget class="QDateEdit" name="pDateEditStart">
 | 
			
		||||
           <property name="displayFormat">
 | 
			
		||||
            <string>yyyy年MM月dd日</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="calendarPopup">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="0">
 | 
			
		||||
          <widget class="QLabel" name="label_23">
 | 
			
		||||
           <property name="text">
 | 
			
		||||
            <string>终止日期:</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="alignment">
 | 
			
		||||
            <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
         <item row="1" column="1">
 | 
			
		||||
          <widget class="QDateEdit" name="pDateEditEnd">
 | 
			
		||||
           <property name="displayFormat">
 | 
			
		||||
            <string>yyyy年MM月dd日</string>
 | 
			
		||||
           </property>
 | 
			
		||||
           <property name="calendarPopup">
 | 
			
		||||
            <bool>true</bool>
 | 
			
		||||
           </property>
 | 
			
		||||
          </widget>
 | 
			
		||||
         </item>
 | 
			
		||||
        </layout>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QToolButton" name="pButtonQuery">
 | 
			
		||||
        <property name="toolTip">
 | 
			
		||||
         <string>查询</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="text">
 | 
			
		||||
         <string>...</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="icon">
 | 
			
		||||
         <iconset resource="resource.qrc">
 | 
			
		||||
          <normaloff>:/QMainFrame/Resources/find.png</normaloff>:/QMainFrame/Resources/find.png</iconset>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="iconSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>48</width>
 | 
			
		||||
          <height>48</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <widget class="QToolButton" name="pButtonReset">
 | 
			
		||||
        <property name="toolTip">
 | 
			
		||||
         <string>重置</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="text">
 | 
			
		||||
         <string>...</string>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="icon">
 | 
			
		||||
         <iconset resource="resource.qrc">
 | 
			
		||||
          <normaloff>:/QMainFrame/Resources/clean.png</normaloff>:/QMainFrame/Resources/clean.png</iconset>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="iconSize">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>48</width>
 | 
			
		||||
          <height>48</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
       </widget>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <spacer name="horizontalSpacer">
 | 
			
		||||
        <property name="orientation">
 | 
			
		||||
         <enum>Qt::Horizontal</enum>
 | 
			
		||||
        </property>
 | 
			
		||||
        <property name="sizeHint" stdset="0">
 | 
			
		||||
         <size>
 | 
			
		||||
          <width>40</width>
 | 
			
		||||
          <height>20</height>
 | 
			
		||||
         </size>
 | 
			
		||||
        </property>
 | 
			
		||||
       </spacer>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QTableWidget" name="pTableWidgetInfo">
 | 
			
		||||
      <property name="editTriggers">
 | 
			
		||||
       <set>QAbstractItemView::NoEditTriggers</set>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="alternatingRowColors">
 | 
			
		||||
       <bool>true</bool>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="selectionMode">
 | 
			
		||||
       <enum>QAbstractItemView::SingleSelection</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="selectionBehavior">
 | 
			
		||||
       <enum>QAbstractItemView::SelectRows</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="gridStyle">
 | 
			
		||||
       <enum>Qt::SolidLine</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <attribute name="horizontalHeaderVisible">
 | 
			
		||||
       <bool>true</bool>
 | 
			
		||||
      </attribute>
 | 
			
		||||
      <attribute name="verticalHeaderVisible">
 | 
			
		||||
       <bool>false</bool>
 | 
			
		||||
      </attribute>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>保单号</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="icon">
 | 
			
		||||
        <iconset resource="resource.qrc">
 | 
			
		||||
         <normaloff>:/QMainFrame/Resources/CPIC.png</normaloff>:/QMainFrame/Resources/CPIC.png</iconset>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>经办人代码</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>部门</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>科室</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>车店联呼</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>车商代码</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>车商名称</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>礼品总价值</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="icon">
 | 
			
		||||
        <iconset resource="resource.qrc">
 | 
			
		||||
         <normaloff>:/QMainFrame/Resources/CNY_Red.png</normaloff>:/QMainFrame/Resources/CNY_Red.png</iconset>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>礼品</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="icon">
 | 
			
		||||
        <iconset resource="resource.qrc">
 | 
			
		||||
         <normaloff>:/QMainFrame/Resources/8218_box1.png</normaloff>:/QMainFrame/Resources/8218_box1.png</iconset>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
      <column>
 | 
			
		||||
       <property name="text">
 | 
			
		||||
        <string>录入日期</string>
 | 
			
		||||
       </property>
 | 
			
		||||
       <property name="textAlignment">
 | 
			
		||||
        <set>AlignHCenter|AlignVCenter|AlignCenter</set>
 | 
			
		||||
       </property>
 | 
			
		||||
      </column>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 21 KiB  | 
| 
		 Before Width: | Height: | Size: 27 KiB  | 
| 
		 Before Width: | Height: | Size: 21 KiB  | 
| 
		 Before Width: | Height: | Size: 37 KiB  | 
| 
		 Before Width: | Height: | Size: 66 KiB  | 
| 
		 Before Width: | Height: | Size: 14 KiB  | 
| 
		 Before Width: | Height: | Size: 34 KiB  | 
| 
		 Before Width: | Height: | Size: 8.4 KiB  | 
| 
		 Before Width: | Height: | Size: 12 KiB  | 
| 
		 Before Width: | Height: | Size: 542 B  | 
| 
		 Before Width: | Height: | Size: 28 KiB  | 
| 
		 Before Width: | Height: | Size: 6.2 KiB  | 
| 
		 Before Width: | Height: | Size: 24 KiB  | 
| 
		 Before Width: | Height: | Size: 15 KiB  | 
| 
		 Before Width: | Height: | Size: 5.2 KiB  | 
| 
		 Before Width: | Height: | Size: 21 KiB  | 
| 
		 Before Width: | Height: | Size: 28 KiB  | 
| 
		 Before Width: | Height: | Size: 25 KiB  | 
| 
		 Before Width: | Height: | Size: 28 KiB  | 
| 
		 Before Width: | Height: | Size: 16 KiB  | 
| 
		 Before Width: | Height: | Size: 21 KiB  | 
| 
		 Before Width: | Height: | Size: 952 B  | 
| 
		 Before Width: | Height: | Size: 22 KiB  | 
| 
		 Before Width: | Height: | Size: 24 KiB  | 
| 
		 Before Width: | Height: | Size: 14 KiB  | 
| 
		 Before Width: | Height: | Size: 7.5 KiB  | 
| 
		 Before Width: | Height: | Size: 6.6 KiB  | 
| 
		 Before Width: | Height: | Size: 29 KiB  | 
| 
		 Before Width: | Height: | Size: 24 KiB  | 
@@ -1,366 +0,0 @@
 | 
			
		||||
//#include "stdafx.h"
 | 
			
		||||
#include "StringCodeConverter.h"
 | 
			
		||||
#include <locale.h>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
//#include <stdio.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <cstring>
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
size_t StringCodeConverter::mbslen( const char *pcszSource )
 | 
			
		||||
{
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" );
 | 
			
		||||
 | 
			
		||||
    int mbl = 0;
 | 
			
		||||
    size_t cnt = 0;
 | 
			
		||||
 | 
			
		||||
    for (cnt = 0; *pcszSource; ++cnt)
 | 
			
		||||
	{
 | 
			
		||||
		mbl = mblen( pcszSource, MB_CUR_MAX );
 | 
			
		||||
		pcszSource += mbl;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
 | 
			
		||||
	return cnt;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
wstring StringCodeConverter::mbs2unicode( const string &cstrSource )
 | 
			
		||||
{
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	const char *pcszSource = cstrSource.c_str();
 | 
			
		||||
 | 
			
		||||
	size_t iCount = cstrSource.size() + 1;
 | 
			
		||||
	wchar_t *pwszBuffer = new wchar_t[ iCount ];
 | 
			
		||||
 | 
			
		||||
	wmemset( pwszBuffer, 0, iCount );
 | 
			
		||||
	size_t iConvertedCount = mbstowcs( pwszBuffer, pcszSource, iCount );
 | 
			
		||||
 | 
			
		||||
	if ( iConvertedCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		delete [] pwszBuffer;
 | 
			
		||||
		throw string( "mbs2unicode<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wstring wstrDest( pwszBuffer );
 | 
			
		||||
	delete [] pwszBuffer;
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
 | 
			
		||||
	return wstrDest;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::mbs2unicode(const string &strSource, wstring &wstrDest)
 | 
			
		||||
{
 | 
			
		||||
	const char *pcszSource = strSource.c_str();
 | 
			
		||||
	string strCurLocale( setlocale(LC_ALL, NULL) );//<2F>ȱ<EFBFBD><C8B1>浱ǰ<E6B5B1><C7B0>locale<6C><65><EFBFBD><EFBFBD>
 | 
			
		||||
	
 | 
			
		||||
	setlocale( LC_ALL, "chs" );//<2F><><EFBFBD><EFBFBD>Ϊ<EFBFBD><CEAA><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	size_t iCharCount = strSource.size() + 1;//unicode<64>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫ<EFBFBD><D2AA><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
 | 
			
		||||
	wchar_t *pwszBuffer = new wchar_t[ iCharCount ];
 | 
			
		||||
 | 
			
		||||
	wmemset( pwszBuffer, 0, iCharCount );
 | 
			
		||||
	mbstowcs( pwszBuffer, pcszSource, iCharCount );
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );//<2F>Ļ<EFBFBD>ԭ<EFBFBD><D4AD><EFBFBD><EFBFBD>locale<6C><65><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	wstrDest = pwszBuffer;
 | 
			
		||||
	delete [] pwszBuffer;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::mbs2unicode( const char *pcszSource, wchar_t *pwszDest ) throw (string)
 | 
			
		||||
{
 | 
			
		||||
	if ( pcszSource == NULL || pwszDest == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ָ<EFBFBD><EFBFBD>ΪNULL" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	size_t iCharCount = mbslen( pcszSource ) + 1;
 | 
			
		||||
 | 
			
		||||
	if ( iCharCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wmemset( pwszDest, 0, iCharCount );
 | 
			
		||||
	size_t iConvertedCount = mbstowcs( pwszDest, pcszSource, iCharCount );
 | 
			
		||||
 | 
			
		||||
	if ( iConvertedCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "Դ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	*( pwszDest + iConvertedCount ) = NULL;
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::mbs2utf8( const string &cstrSource, char *pszDest )
 | 
			
		||||
{
 | 
			
		||||
	const char *pcszSource = cstrSource.c_str();
 | 
			
		||||
 | 
			
		||||
	string strCurLocale( setlocale( LC_ALL, NULL ) );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	while ( *pcszSource != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		if ( *pcszSource > 0 )
 | 
			
		||||
		{
 | 
			
		||||
			//Ӣ<><D3A2><EFBFBD>ַ<EFBFBD>,<2C><><EFBFBD><EFBFBD>ֱ<EFBFBD>Ӹ<EFBFBD><D3B8><EFBFBD>
 | 
			
		||||
			*pszDest = *pcszSource;
 | 
			
		||||
			
 | 
			
		||||
			pcszSource++;
 | 
			
		||||
			pszDest++;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			//<2F><>asciiӢ<69><D3A2><EFBFBD>ַ<EFBFBD>,<2C><>ת<EFBFBD><D7AA><EFBFBD><EFBFBD>unicode<64><65><EFBFBD><EFBFBD>ת<EFBFBD><D7AA>utf8
 | 
			
		||||
			int iLen = 0;
 | 
			
		||||
			wchar_t wUnicode = 0;
 | 
			
		||||
			char *pcUnicode = (char *)&wUnicode;
 | 
			
		||||
 | 
			
		||||
			//ת<><D7AA><EFBFBD><EFBFBD>unicode<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD>mb<6D>ַ<EFBFBD><D6B7>ij<EFBFBD><C4B3><EFBFBD>
 | 
			
		||||
			iLen = mbtowc( &wUnicode, pcszSource, MB_CUR_MAX );
 | 
			
		||||
 | 
			
		||||
			pszDest[0] = (0xE0 | ((pcUnicode[1] & 0xF0) >> 4));
 | 
			
		||||
			pszDest[1] = (0x80 | ((pcUnicode[1] & 0x0F) << 2)) + ((pcUnicode[0] & 0xC0) >> 6);
 | 
			
		||||
			pszDest[2] = (0x80 | (pcUnicode[0] & 0x3F));
 | 
			
		||||
 | 
			
		||||
			pszDest += 3;
 | 
			
		||||
			pcszSource += iLen;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
 | 
			
		||||
	*pszDest = NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string StringCodeConverter::unicode2mbs( const wstring &wstrSource )
 | 
			
		||||
{
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	const wchar_t *pcwszSource = wstrSource.c_str();
 | 
			
		||||
 | 
			
		||||
	size_t iCount = wstrSource.size() * 2 + 1;
 | 
			
		||||
	char *pszBuffer = new char[ iCount ];
 | 
			
		||||
	memset( pszBuffer, 0, iCount );
 | 
			
		||||
 | 
			
		||||
	size_t iConvertedCount = wcstombs( pszBuffer, pcwszSource, iCount );
 | 
			
		||||
 | 
			
		||||
	if ( iConvertedCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "unicode2mbsԴ<EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ı<EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
 | 
			
		||||
	string strDest( pszBuffer );
 | 
			
		||||
	delete [] pszBuffer;
 | 
			
		||||
 | 
			
		||||
	return strDest;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::unicode2mbs( const wstring &wstrSource, string &strDest )
 | 
			
		||||
{
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chs" );
 | 
			
		||||
 | 
			
		||||
	size_t iCount = wstrSource.size() + 1;
 | 
			
		||||
	char *pszBuffer = new char[ iCount ];
 | 
			
		||||
	const wchar_t *pcwszSource = wstrSource.c_str();
 | 
			
		||||
 | 
			
		||||
	memset( pszBuffer, 0, iCount );
 | 
			
		||||
	size_t iConvertedCount = wcstombs( pszBuffer, pcwszSource , iCount );
 | 
			
		||||
 | 
			
		||||
	if ( iConvertedCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		delete [] pszBuffer;
 | 
			
		||||
		throw string( "unicode2mbsת<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	strDest = pszBuffer;
 | 
			
		||||
	delete [] pszBuffer;
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::unicode2mbs( const wchar_t *pcwszSource, char *pszDest )
 | 
			
		||||
{
 | 
			
		||||
	if ( pcwszSource == NULL || pszDest == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "unicode2mbs<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ֵΪNULL" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	size_t iCount = wcslen( pcwszSource )*2 + 1;
 | 
			
		||||
	memset( pszDest, 0, iCount );
 | 
			
		||||
 | 
			
		||||
	size_t iConvertedCount = wcstombs( pszDest, pcwszSource, iCount );
 | 
			
		||||
 | 
			
		||||
	if ( iConvertedCount == -1 )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "unicode2mbsת<EFBFBD><EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>з<EFBFBD><EFBFBD><EFBFBD>Ӣ<EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><EFBFBD><EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void StringCodeConverter::unicode2utf8( const wstring &cwstrSource, char *pszDest )
 | 
			
		||||
{
 | 
			
		||||
	if ( pszDest == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪNULL" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	const wchar_t *pcwszSource = cwstrSource.c_str();
 | 
			
		||||
 | 
			
		||||
	while ( *pcwszSource != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		unsigned short int iUnicode = *pcwszSource;
 | 
			
		||||
 | 
			
		||||
		if ( iUnicode < 128 )
 | 
			
		||||
		{
 | 
			
		||||
			//С<><D0A1>128<32><38>Ӣ<EFBFBD><D3A2><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ҫת<D2AA><D7AA>
 | 
			
		||||
			*pszDest = (char)iUnicode;
 | 
			
		||||
			pszDest++;
 | 
			
		||||
			pcwszSource++;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			//<2F><><EFBFBD><EFBFBD>128<32><38>mbs<62>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD>Ҫת<D2AA><D7AA>
 | 
			
		||||
			const char *pcszUnicode = (const char *)pcwszSource;
 | 
			
		||||
 | 
			
		||||
			pszDest[0] = (0xE0 | ((pcszUnicode[1] & 0xF0) >> 4 ));
 | 
			
		||||
			pszDest[1] = (0x80 | ((pcszUnicode[1] & 0x0F) << 2)) + ((pcszUnicode[0] & 0xC0) >> 6);
 | 
			
		||||
			pszDest[2] = (0x80 | (pcszUnicode[0] & 0x3F));
 | 
			
		||||
 | 
			
		||||
			pszDest = pszDest + 3;
 | 
			
		||||
			pcwszSource++;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	*pszDest = NULL;//ĩβ<C4A9><CEB2>NULL<4C>ַ<EFBFBD>
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string StringCodeConverter::utf8tombs( const char *pcszSource )
 | 
			
		||||
{
 | 
			
		||||
	if ( pcszSource == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪNULL" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCurLocale( setlocale( LC_ALL, NULL ) );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	char *pszDest = new char[ strlen( pcszSource ) ];
 | 
			
		||||
	char *pszBuffer = pszDest;
 | 
			
		||||
 | 
			
		||||
	while ( *pcszSource != 0 )
 | 
			
		||||
	{
 | 
			
		||||
		if ( *pcszSource > 0 )
 | 
			
		||||
		{
 | 
			
		||||
			//<2F><>ASCII<49>ַ<EFBFBD>
 | 
			
		||||
			*pszDest = *pcszSource;
 | 
			
		||||
 | 
			
		||||
			pszDest++;
 | 
			
		||||
			pcszSource++;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			wchar_t wUnicode = 0;
 | 
			
		||||
			char *pcUnicode = (char *)&wUnicode;
 | 
			
		||||
 | 
			
		||||
			pcUnicode[1] = ((pcszSource[0] & 0x0F) << 4) + ((pcszSource[1] >> 2) & 0x0F);
 | 
			
		||||
			pcUnicode[0] = ((pcszSource[1] & 0x03) << 6) + (pcszSource[2] & 0x3F);
 | 
			
		||||
 | 
			
		||||
			wchar_t wMcb;
 | 
			
		||||
			char *pcMbs = (char *)&wMcb;
 | 
			
		||||
			int iLen = 0;
 | 
			
		||||
 | 
			
		||||
			iLen = wctomb( pcMbs, wUnicode );
 | 
			
		||||
 | 
			
		||||
			if ( iLen == 1 )
 | 
			
		||||
			{
 | 
			
		||||
				*pszDest = *pcMbs;
 | 
			
		||||
			}
 | 
			
		||||
			else
 | 
			
		||||
			{
 | 
			
		||||
				pszDest[0] = pcMbs[0];
 | 
			
		||||
				pszDest[1] = pcMbs[1];
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			pszDest += iLen;
 | 
			
		||||
			pcszSource += 3;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	*pszDest = NULL;
 | 
			
		||||
	
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
	strCurLocale = pszBuffer; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	return strCurLocale;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
wstring StringCodeConverter::utf8tounicode( const char *pcszSource )
 | 
			
		||||
{
 | 
			
		||||
	if ( pcszSource == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>ΪNULL" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCurLocale = setlocale( LC_ALL, NULL );
 | 
			
		||||
	setlocale( LC_ALL, "chinese-simplified" ); //<2F>ij<EFBFBD><C4B3><EFBFBD><EFBFBD>Ļ<EFBFBD><C4BB><EFBFBD>,<2C><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ܵIJ<DCB5><C4B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ע<EFBFBD><D7A2><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
	wchar_t *pwszBuffer = new wchar_t[ strlen( pcszSource ) ];
 | 
			
		||||
	wchar_t *pwszDest = pwszBuffer;
 | 
			
		||||
 | 
			
		||||
	while ( *pcszSource != NULL )
 | 
			
		||||
	{
 | 
			
		||||
		if ( *pcszSource > 0 )
 | 
			
		||||
		{
 | 
			
		||||
			//<2F><>ASCII<49>ַ<EFBFBD>
 | 
			
		||||
			wchar_t wUnicode;
 | 
			
		||||
 | 
			
		||||
			mbtowc( &wUnicode, pcszSource, 1 );
 | 
			
		||||
 | 
			
		||||
			*pwszDest = wUnicode;
 | 
			
		||||
 | 
			
		||||
			pwszDest++;
 | 
			
		||||
			pcszSource++;
 | 
			
		||||
		}
 | 
			
		||||
		else
 | 
			
		||||
		{
 | 
			
		||||
			//<2F><><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>3<EFBFBD><33><EFBFBD>ֽ<EFBFBD>
 | 
			
		||||
			wchar_t wUnicode;
 | 
			
		||||
			char *pcUnicode = (char *)&wUnicode;
 | 
			
		||||
 | 
			
		||||
			pcUnicode[1] = ((pcszSource[0] & 0x0F) << 4) + ((pcszSource[1] >> 2) & 0x0F);
 | 
			
		||||
			pcUnicode[0] = ((pcszSource[1] & 0x03) << 6) + (pcszSource[2] & 0x3F);
 | 
			
		||||
 | 
			
		||||
			*pwszDest = wUnicode;
 | 
			
		||||
 | 
			
		||||
			pwszDest++;
 | 
			
		||||
			pcszSource += 3;
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	setlocale( LC_ALL, strCurLocale.c_str() );
 | 
			
		||||
 | 
			
		||||
	*pwszDest = NULL;//ĩβ<C4A9><CEB2><EFBFBD>ַ<EFBFBD>
 | 
			
		||||
	wstring wstrDest( pwszBuffer );
 | 
			
		||||
 | 
			
		||||
	return wstrDest;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,26 +0,0 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
namespace StringCodeConverter
 | 
			
		||||
{
 | 
			
		||||
	using std::string;
 | 
			
		||||
	using std::wstring;
 | 
			
		||||
 | 
			
		||||
	size_t mbslen( const char *pcszSource );
 | 
			
		||||
 | 
			
		||||
	wstring mbs2unicode( const string &strSource );
 | 
			
		||||
	void mbs2unicode(const string &strSource, wstring &wstrDest);
 | 
			
		||||
	void mbs2unicode(const char *pcszSource, wchar_t *pwszDest) throw ( string );
 | 
			
		||||
 | 
			
		||||
	void mbs2utf8( const string &cstrSource, char *pszDest );
 | 
			
		||||
 | 
			
		||||
	string unicode2mbs( const wstring &wstrSource );
 | 
			
		||||
	void unicode2mbs( const wstring &wstrSource, string &strDest );
 | 
			
		||||
	void unicode2mbs( const wchar_t *pwszSource, char *pszDest );
 | 
			
		||||
	void unicode2utf8( const wstring &wstrSource, char *pszDest );
 | 
			
		||||
 | 
			
		||||
	string utf8tombs( const char *pcszSource );
 | 
			
		||||
	wstring utf8tounicode( const char *pcszSource );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
@@ -1,52 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
//hash_map<string, string> parameters; //<2F><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD><EFBFBD><EFBFBD>hashmap
 | 
			
		||||
 | 
			
		||||
//<2F>汾<EFBFBD><E6B1BE>
 | 
			
		||||
const string cstrVersion = "0.99";
 | 
			
		||||
 | 
			
		||||
string strUserCode;
 | 
			
		||||
string strUserName;
 | 
			
		||||
string strUserPassword;
 | 
			
		||||
 | 
			
		||||
//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
Parameters parameters( "config.db" );
 | 
			
		||||
 | 
			
		||||
//bool checkVersion()
 | 
			
		||||
//{
 | 
			
		||||
//	bool result = false;
 | 
			
		||||
//	hash_map<string,string>::iterator iter = parameters.find( string("<22>汾<EFBFBD><E6B1BE>") );
 | 
			
		||||
//
 | 
			
		||||
//	if ( iter != parameters.end() && iter->second == cstrVersion )
 | 
			
		||||
//	{
 | 
			
		||||
//		result = true;
 | 
			
		||||
//	}
 | 
			
		||||
//
 | 
			
		||||
//	return result;
 | 
			
		||||
//}
 | 
			
		||||
 | 
			
		||||
string getUserCode()
 | 
			
		||||
{
 | 
			
		||||
	return strUserCode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getUserName()
 | 
			
		||||
{
 | 
			
		||||
	return strUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserCode(const string & cstrUserCode)
 | 
			
		||||
{
 | 
			
		||||
	strUserCode = cstrUserCode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserName(const string & cstrUserName)
 | 
			
		||||
{
 | 
			
		||||
	strUserName = cstrUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getVersion()
 | 
			
		||||
{
 | 
			
		||||
	return parameters.getParameter("<EFBFBD>汾<EFBFBD><EFBFBD>");
 | 
			
		||||
}
 | 
			
		||||
@@ -1,38 +0,0 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * \file SystemData.h
 | 
			
		||||
 * \date 2014/08/18 13:23
 | 
			
		||||
 *
 | 
			
		||||
 * \author Kane
 | 
			
		||||
 * Contact: user@company.com
 | 
			
		||||
 *
 | 
			
		||||
 * \brief 
 | 
			
		||||
 *
 | 
			
		||||
 * TODO: long description
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef SystemData_h__
 | 
			
		||||
#define SystemData_h__
 | 
			
		||||
 | 
			
		||||
#include <hash_map>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "Parameters.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
//extern hash_map<string, string> parameters;
 | 
			
		||||
extern Parameters parameters;
 | 
			
		||||
 | 
			
		||||
//bool checkVersion();
 | 
			
		||||
 | 
			
		||||
string getUserCode();
 | 
			
		||||
string getUserName();
 | 
			
		||||
 | 
			
		||||
void   setUserCode( const string & cstrUserCode );
 | 
			
		||||
void   setUserName( const string & cstrUserName );
 | 
			
		||||
 | 
			
		||||
string getVersion();
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#endif // SystemData_h__
 | 
			
		||||
@@ -1,205 +0,0 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <SQLAPI.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <vector>
 | 
			
		||||
//#include <libxl.h>
 | 
			
		||||
//#include "StringCodeConverter.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
 | 
			
		||||
//using namespace libxl;
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
#pragma comment( lib, "user32.lib")
 | 
			
		||||
#pragma comment( lib, "version.lib")
 | 
			
		||||
#pragma comment( lib, "oleaut32.lib")
 | 
			
		||||
#pragma comment( lib, "ole32.lib")
 | 
			
		||||
#pragma comment( lib, "libxl.lib")
 | 
			
		||||
 | 
			
		||||
#ifdef _DEBUG
 | 
			
		||||
#pragma comment( lib, "sqlapisd.lib")
 | 
			
		||||
#else
 | 
			
		||||
#pragma comment( lib, "sqlapis.lib")
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
const char g_cszConnectStringIDS6[] = 
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16191;"
 | 
			
		||||
	"SERVER=xmcx1;"
 | 
			
		||||
	"HOST=10.39.0.91;"
 | 
			
		||||
	"DATABASE=ids6;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_szUserNameIDS6[] = "ccx99";
 | 
			
		||||
const static char g_szPasswordIDS6[] = "c91IT09";
 | 
			
		||||
 | 
			
		||||
const static char g_cszConnectStringIDSt0[] =
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16193;"
 | 
			
		||||
	"SERVER=xmcx3;"
 | 
			
		||||
	"HOST=10.39.0.93;"
 | 
			
		||||
	"DATABASE=idst0;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_szUserNameIDSt0[] = "ccx99";
 | 
			
		||||
const static char g_szPasswordIDSt0[] = "c93IT09";
 | 
			
		||||
 | 
			
		||||
const static char g_cszConnstringYwgl[] =
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16192;"
 | 
			
		||||
	"SERVER=xmcx2;"
 | 
			
		||||
	"HOST=10.39.0.92;"
 | 
			
		||||
	"DATABASE=ywgl_xm;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_cszUserNameYwgl[] = "ccx99";
 | 
			
		||||
const static char g_cszPasswordYwgl[] = "c92IT09";
 | 
			
		||||
 | 
			
		||||
void QueryUserInfo(const string & strCode, string & strName, string & strPassword)
 | 
			
		||||
{
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	string strCommand( "select rymc, rymm from rydm where rydm='" );
 | 
			
		||||
 | 
			
		||||
	strCommand += strCode;
 | 
			
		||||
	strCommand += "'";
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		conn.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		//SAString strError = error.ErrText();
 | 
			
		||||
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( command.FetchNext() == true )
 | 
			
		||||
	{
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		SAString sastrResult = command.Field("rymc").asString();
 | 
			
		||||
		sastrResult.TrimRight();
 | 
			
		||||
 | 
			
		||||
		strName = (const char *)sastrResult;
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		sastrResult = command.Field("rymm").asString();
 | 
			
		||||
		sastrResult.TrimRight();
 | 
			
		||||
 | 
			
		||||
		strPassword = (const char *)sastrResult;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void queryStaffInfo(const string & strOperatorCode, string & strOperatorName, string & strDeptCode, string & strDeptName, string & strOfficeCode, string & strOfficeName)
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand    command;
 | 
			
		||||
 | 
			
		||||
	if ( strOperatorCode.size() == 0 )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCommand = 
 | 
			
		||||
		"select a.staff_name, "
 | 
			
		||||
		"       b.department_code, "
 | 
			
		||||
		"       b.department_name, "
 | 
			
		||||
		"       c.section_office_c01, "
 | 
			
		||||
		"       c.section_office_n01 "
 | 
			
		||||
		"from rydm_t a, bm_t b, ks_t c  "
 | 
			
		||||
		"where a.department_code = b.department_code "
 | 
			
		||||
		"  and a.section_office_c01 = c.section_office_c01 "
 | 
			
		||||
		"  and a.staff_code = '";
 | 
			
		||||
 | 
			
		||||
	strCommand.append( strOperatorCode );
 | 
			
		||||
	strCommand.append( "'" );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		connection.Connect( 
 | 
			
		||||
			g_cszConnectStringIDSt0,
 | 
			
		||||
			g_szUserNameIDSt0,
 | 
			
		||||
			g_szPasswordIDSt0,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
		command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		if ( command.FetchNext() == true )
 | 
			
		||||
		{
 | 
			
		||||
			strOperatorName = (const char *)( command.Field( "staff_name").asString() );
 | 
			
		||||
			strDeptCode = (const char *)( command.Field( "department_code").asString() );
 | 
			
		||||
			strDeptName = (const char *)( command.Field( "department_name").asString() );
 | 
			
		||||
			strOfficeCode = (const char *)( command.Field( "section_office_c01").asString() );
 | 
			
		||||
			strOfficeName = (const char *)( command.Field( "section_office_n01").asString() );
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & sqlError )
 | 
			
		||||
	{
 | 
			
		||||
		runtime_error error( sqlError.ErrText() );
 | 
			
		||||
 | 
			
		||||
		throw error;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void queryAutoTraderInfo(const string & strAutoTraderCode, string & strAutoTraderName)
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand    command;
 | 
			
		||||
 | 
			
		||||
	string strCommand = 
 | 
			
		||||
		"select name "
 | 
			
		||||
		"  from shop_code_t "
 | 
			
		||||
		" where code = '";
 | 
			
		||||
 | 
			
		||||
	strCommand.append( strAutoTraderCode );
 | 
			
		||||
	strCommand.append( "'" );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		connection.Connect( 
 | 
			
		||||
			g_cszConnectStringIDSt0,
 | 
			
		||||
			g_szUserNameIDSt0,
 | 
			
		||||
			g_szPasswordIDSt0,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
		command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		if ( command.FetchNext() == true )
 | 
			
		||||
		{
 | 
			
		||||
			strAutoTraderName = (const char *)( command.Field( "name").asString() );
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & sqlError )
 | 
			
		||||
	{
 | 
			
		||||
		runtime_error error( sqlError.ErrText() );
 | 
			
		||||
 | 
			
		||||
		throw error;
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,56 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#ifndef DataQuery_h__
 | 
			
		||||
#define DataQuery_h__
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    QueryOperatorInfo
 | 
			
		||||
// FullName:  QueryOperatorInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯϵͳ<CFB5>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD>Ϣ
 | 
			
		||||
// Parameter: const string & strCode <20><><EFBFBD><EFBFBD>
 | 
			
		||||
// Parameter: string & strName       <20><><EFBFBD><EFBFBD>
 | 
			
		||||
// Parameter: string & strPassword   <20><><EFBFBD><EFBFBD>
 | 
			
		||||
//************************************
 | 
			
		||||
void QueryUserInfo( const string & strCode,
 | 
			
		||||
	                      string & strName,
 | 
			
		||||
			              string & strPassword );
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    queryOperatorInfo
 | 
			
		||||
// FullName:  queryOperatorInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><CBB5><EFBFBD>Ϣ
 | 
			
		||||
// Parameter: const string & strOperatorCode <20><><EFBFBD><EFBFBD><EFBFBD>˴<EFBFBD><CBB4><EFBFBD>
 | 
			
		||||
// Parameter: string & strOperatorName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
// Parameter: string & strDeptCode <20><><EFBFBD>Ŵ<EFBFBD><C5B4><EFBFBD>
 | 
			
		||||
// Parameter: string & strDeptName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
// Parameter: string & strOfficeCode <20><><EFBFBD>Ҵ<EFBFBD><D2B4><EFBFBD>
 | 
			
		||||
// Parameter: string & strOfficeName <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
//************************************
 | 
			
		||||
void queryStaffInfo( const string & strOperatorCode,
 | 
			
		||||
	                       string & strOperatorName,
 | 
			
		||||
						   string & strDeptCode = string(),
 | 
			
		||||
						   string & strDeptName = string(),
 | 
			
		||||
						   string & strOfficeCode = string(),
 | 
			
		||||
						   string & strOfficeName = string());
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    queryAutoTraderInfo
 | 
			
		||||
// FullName:  queryAutoTraderInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϣ
 | 
			
		||||
// Parameter: const string & strAutoTraderCode
 | 
			
		||||
// Parameter: string & strAutoTraderName
 | 
			
		||||
//************************************
 | 
			
		||||
void queryAutoTraderInfo( const string & strAutoTraderCode,
 | 
			
		||||
	                            string & strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
#endif // DataQuery_h__
 | 
			
		||||
| 
		 Before Width: | Height: | Size: 66 KiB  | 
@@ -1,2 +0,0 @@
 | 
			
		||||
IDI_ICON1		ICON		DISCARDABLE	"TelSalePolicyInfoManager.ico"
 | 
			
		||||
 | 
			
		||||
@@ -1,337 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <ItemGroup Label="ProjectConfigurations">
 | 
			
		||||
    <ProjectConfiguration Include="Debug|Win32">
 | 
			
		||||
      <Configuration>Debug</Configuration>
 | 
			
		||||
      <Platform>Win32</Platform>
 | 
			
		||||
    </ProjectConfiguration>
 | 
			
		||||
    <ProjectConfiguration Include="Release|Win32">
 | 
			
		||||
      <Configuration>Release</Configuration>
 | 
			
		||||
      <Platform>Win32</Platform>
 | 
			
		||||
    </ProjectConfiguration>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <PropertyGroup Label="Globals">
 | 
			
		||||
    <ProjectGuid>{D8C5BD12-F9A9-48B7-B02E-F3ACF2431DBD}</ProjectGuid>
 | 
			
		||||
    <Keyword>Qt4VSv1.0</Keyword>
 | 
			
		||||
    <WindowsTargetPlatformVersion>10.0.14393.0</WindowsTargetPlatformVersion>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
 | 
			
		||||
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
 | 
			
		||||
    <ConfigurationType>Application</ConfigurationType>
 | 
			
		||||
    <PlatformToolset>v100</PlatformToolset>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
 | 
			
		||||
    <ConfigurationType>Application</ConfigurationType>
 | 
			
		||||
    <PlatformToolset>v141</PlatformToolset>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
 | 
			
		||||
  <ImportGroup Label="ExtensionSettings">
 | 
			
		||||
  </ImportGroup>
 | 
			
		||||
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
 | 
			
		||||
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 | 
			
		||||
    <Import Project="libxl.props" />
 | 
			
		||||
    <Import Project="sql_api.props" />
 | 
			
		||||
  </ImportGroup>
 | 
			
		||||
  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
 | 
			
		||||
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
 | 
			
		||||
    <Import Project="sql_api.props" />
 | 
			
		||||
    <Import Project="libxl.props" />
 | 
			
		||||
  </ImportGroup>
 | 
			
		||||
  <PropertyGroup Label="UserMacros" />
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <_ProjectFileVersion>10.0.40219.1</_ProjectFileVersion>
 | 
			
		||||
    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
 | 
			
		||||
    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
 | 
			
		||||
    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
 | 
			
		||||
    <CodeAnalysisRuleSet Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">AllRules.ruleset</CodeAnalysisRuleSet>
 | 
			
		||||
    <CodeAnalysisRules Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
 | 
			
		||||
    <CodeAnalysisRuleAssemblies Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
 | 
			
		||||
    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
 | 
			
		||||
    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <Optimization>Disabled</Optimization>
 | 
			
		||||
      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
 | 
			
		||||
      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
 | 
			
		||||
      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <SubSystem>Windows</SubSystem>
 | 
			
		||||
      <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
 | 
			
		||||
      <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
 | 
			
		||||
      <GenerateDebugInformation>true</GenerateDebugInformation>
 | 
			
		||||
      <AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
 | 
			
		||||
    </Link>
 | 
			
		||||
  </ItemDefinitionGroup>
 | 
			
		||||
  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 | 
			
		||||
    <ClCompile>
 | 
			
		||||
      <PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
 | 
			
		||||
      <AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
 | 
			
		||||
      <DebugInformationFormat>
 | 
			
		||||
      </DebugInformationFormat>
 | 
			
		||||
      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
 | 
			
		||||
      <TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <Link>
 | 
			
		||||
      <SubSystem>Windows</SubSystem>
 | 
			
		||||
      <OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
 | 
			
		||||
      <AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
 | 
			
		||||
      <GenerateDebugInformation>false</GenerateDebugInformation>
 | 
			
		||||
      <AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
 | 
			
		||||
    </Link>
 | 
			
		||||
  </ItemDefinitionGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClCompile Include="DataManipulation.cpp" />
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QConfigurationWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QMainFrame.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QMyStackedWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QRapidInputWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QTelSalePolicyInfoInputWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QTelSalePolicyInfoQuery.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QConfigurationWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QMainFrame.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QMyStackedWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QRapidInputWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QTelSalePolicyInfoInputWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QTelSalePolicyInfoQuery.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="Parameters.cpp" />
 | 
			
		||||
    <ClCompile Include="QConfigurationWidget.cpp" />
 | 
			
		||||
    <ClCompile Include="QMainFrame.cpp" />
 | 
			
		||||
    <ClCompile Include="QMyStackedWidget.cpp" />
 | 
			
		||||
    <ClCompile Include="QRapidInputWidget.cpp" />
 | 
			
		||||
    <ClCompile Include="QTelSalePolicyInfoInputWidget.cpp" />
 | 
			
		||||
    <ClCompile Include="QTelSalePolicyInfoQuery.cpp" />
 | 
			
		||||
    <ClCompile Include="sqlite\sqlite3.c" />
 | 
			
		||||
    <ClCompile Include="SystemData.cpp" />
 | 
			
		||||
    <ClCompile Include="SystemDataQuery.cpp" />
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QLoginWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\qrc_resource.cpp">
 | 
			
		||||
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
			
		||||
      </PrecompiledHeader>
 | 
			
		||||
      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 | 
			
		||||
      </PrecompiledHeader>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QLoginWidget.cpp">
 | 
			
		||||
      <ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="main.cpp" />
 | 
			
		||||
    <ClCompile Include="QLoginWidget.cpp" />
 | 
			
		||||
    <ClCompile Include="StringCodeConverter.cpp" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QMainFrame.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QMainFrame.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QMainFrame.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <ClInclude Include="DataManipulation.h" />
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QConfigurationWidget.h" />
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QMainFrame.h" />
 | 
			
		||||
    <CustomBuild Include="QMyStackedWidget.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QMyStackedWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QMyStackedWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoInputWidget.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QTelSalePolicyInfoInputWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QTelSalePolicyInfoInputWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QRapidInputWidget.h" />
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QTelSalePolicyInfoInputWidget.h" />
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoQuery.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QTelSalePolicyInfoQuery.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QTelSalePolicyInfoQuery.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QTelSalePolicyInfoQuery.h" />
 | 
			
		||||
    <CustomBuild Include="QConfigurationWidget.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QConfigurationWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QConfigurationWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <ClInclude Include="Parameters.h" />
 | 
			
		||||
    <CustomBuild Include="QRapidInputWidget.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QRapidInputWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QRapidInputWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <ClInclude Include="sqlite\sqlite3.h" />
 | 
			
		||||
    <ClInclude Include="sqlite\sqlite3ext.h" />
 | 
			
		||||
    <ClInclude Include="SystemData.h" />
 | 
			
		||||
    <ClInclude Include="SystemDataQuery.h" />
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QLoginWidget.h" />
 | 
			
		||||
    <ClInclude Include="StringCodeConverter.h" />
 | 
			
		||||
    <CustomBuild Include="QLoginWidget.h">
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing QLoginWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing QLoginWidget.h...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe"  "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp"  -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB  "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="resource.qrc">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rcc%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ResourceCompile Include="TelSalePolicyInfoManager.rc" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QLoginWidget.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QMainFrame.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoInputWidget.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoQuery.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QConfigurationWidget.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="QRapidInputWidget.ui">
 | 
			
		||||
      <FileType>Document</FileType>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
 | 
			
		||||
      <Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
 | 
			
		||||
      <Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
 | 
			
		||||
      <Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
 | 
			
		||||
  <ImportGroup Label="ExtensionTargets">
 | 
			
		||||
  </ImportGroup>
 | 
			
		||||
  <ProjectExtensions>
 | 
			
		||||
    <VisualStudio>
 | 
			
		||||
      <UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="winrt_x86_msvc2017" Qt5Version_x0020_x64="$(DefaultQtVersion)" MocOptions="" />
 | 
			
		||||
    </VisualStudio>
 | 
			
		||||
  </ProjectExtensions>
 | 
			
		||||
</Project>
 | 
			
		||||
@@ -1,259 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <Filter Include="Source Files">
 | 
			
		||||
      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>cpp;cxx;c;def</Extensions>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Header Files">
 | 
			
		||||
      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>h</Extensions>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Form Files">
 | 
			
		||||
      <UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>ui</Extensions>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Resource Files">
 | 
			
		||||
      <UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>qrc;*</Extensions>
 | 
			
		||||
      <ParseFiles>false</ParseFiles>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Generated Files">
 | 
			
		||||
      <UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>moc;h;cpp</Extensions>
 | 
			
		||||
      <SourceControlFiles>False</SourceControlFiles>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Generated Files\Debug">
 | 
			
		||||
      <UniqueIdentifier>{2f05627f-c9a4-41eb-8269-986c611a4a70}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>cpp;moc</Extensions>
 | 
			
		||||
      <SourceControlFiles>False</SourceControlFiles>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="Generated Files\Release">
 | 
			
		||||
      <UniqueIdentifier>{23ebc876-b36b-4b8a-aca1-c20ddcd759df}</UniqueIdentifier>
 | 
			
		||||
      <Extensions>cpp;moc</Extensions>
 | 
			
		||||
      <SourceControlFiles>False</SourceControlFiles>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口">
 | 
			
		||||
      <UniqueIdentifier>{4b5d1eb3-d75c-45ce-849e-d975d9176d47}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\登录">
 | 
			
		||||
      <UniqueIdentifier>{14282a62-a912-4020-9aa1-5f8a6ba3d84e}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="数据">
 | 
			
		||||
      <UniqueIdentifier>{84685d90-5aa0-480b-86f0-475cc2f3a0ba}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="数据\参数">
 | 
			
		||||
      <UniqueIdentifier>{fbb675bb-b6bd-4f58-8f9a-1a5e63fa0a2d}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="数据\查询">
 | 
			
		||||
      <UniqueIdentifier>{08b69d0e-8e0d-4249-8507-6be7a059c7e2}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\主窗口">
 | 
			
		||||
      <UniqueIdentifier>{733f4377-a6f4-4496-bfdf-24b35b0dded7}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\层叠窗口">
 | 
			
		||||
      <UniqueIdentifier>{65cbf2bf-63a8-4a1b-b041-e9175dfd6e42}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\转介绍信息录入窗口">
 | 
			
		||||
      <UniqueIdentifier>{3de6178c-206c-4ef5-ab72-ceb40d8dc62b}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\转介绍信息录入窗口\批量录入">
 | 
			
		||||
      <UniqueIdentifier>{ec5c49a9-dfc7-432d-9185-f24cc4b7d78c}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\转介绍信息录入窗口\录入明细">
 | 
			
		||||
      <UniqueIdentifier>{545fa5ee-5e2d-4063-9985-49a4851a0dcf}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="数据\电销转介绍数据处理">
 | 
			
		||||
      <UniqueIdentifier>{52e0cfaa-1ffc-4dc4-95c1-3b87c4f8d4bc}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\转介绍信息查询窗口">
 | 
			
		||||
      <UniqueIdentifier>{be3e6d91-bc4f-4512-b3ba-7d10d1933856}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="窗口\参数设置窗口">
 | 
			
		||||
      <UniqueIdentifier>{3d67d9b7-1ea3-42dd-ab1c-271850dd8916}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="sqlite">
 | 
			
		||||
      <UniqueIdentifier>{cd9a9d44-84fe-4891-b349-fb8d5181094b}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
    <Filter Include="数据\系统参数类">
 | 
			
		||||
      <UniqueIdentifier>{d5cc7801-9099-4b65-ad33-1f3af434922e}</UniqueIdentifier>
 | 
			
		||||
    </Filter>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClCompile Include="main.cpp">
 | 
			
		||||
      <Filter>Source Files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\qrc_resource.cpp">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QLoginWidget.cpp">
 | 
			
		||||
      <Filter>窗口\登录</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QLoginWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QLoginWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="StringCodeConverter.cpp">
 | 
			
		||||
      <Filter>数据\查询</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="SystemDataQuery.cpp">
 | 
			
		||||
      <Filter>数据\查询</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="SystemData.cpp">
 | 
			
		||||
      <Filter>数据\参数</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QMainFrame.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QMainFrame.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QMainFrame.cpp">
 | 
			
		||||
      <Filter>窗口\主窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QMyStackedWidget.cpp">
 | 
			
		||||
      <Filter>窗口\层叠窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QMyStackedWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QMyStackedWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QTelSalePolicyInfoInputWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QTelSalePolicyInfoInputWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QTelSalePolicyInfoInputWidget.cpp">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="DataManipulation.cpp">
 | 
			
		||||
      <Filter>数据\电销转介绍数据处理</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QTelSalePolicyInfoQuery.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QTelSalePolicyInfoQuery.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QTelSalePolicyInfoQuery.cpp">
 | 
			
		||||
      <Filter>窗口\转介绍信息查询窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QConfigurationWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QConfigurationWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QConfigurationWidget.cpp">
 | 
			
		||||
      <Filter>窗口\参数设置窗口</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="sqlite\sqlite3.c">
 | 
			
		||||
      <Filter>sqlite</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="Parameters.cpp">
 | 
			
		||||
      <Filter>数据\系统参数类</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Debug\moc_QRapidInputWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Debug</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="GeneratedFiles\Release\moc_QRapidInputWidget.cpp">
 | 
			
		||||
      <Filter>Generated Files\Release</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
    <ClCompile Include="QRapidInputWidget.cpp">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口\批量录入</Filter>
 | 
			
		||||
    </ClCompile>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <CustomBuild Include="resource.qrc">
 | 
			
		||||
      <Filter>Resource Files</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QLoginWidget.h">
 | 
			
		||||
      <Filter>窗口\登录</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QLoginWidget.ui">
 | 
			
		||||
      <Filter>窗口\登录</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QMainFrame.ui">
 | 
			
		||||
      <Filter>窗口\主窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QMainFrame.h">
 | 
			
		||||
      <Filter>窗口\主窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QMyStackedWidget.h">
 | 
			
		||||
      <Filter>窗口\层叠窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoInputWidget.ui">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoInputWidget.h">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoQuery.ui">
 | 
			
		||||
      <Filter>窗口\转介绍信息查询窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QTelSalePolicyInfoQuery.h">
 | 
			
		||||
      <Filter>窗口\转介绍信息查询窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QConfigurationWidget.ui">
 | 
			
		||||
      <Filter>窗口\参数设置窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QConfigurationWidget.h">
 | 
			
		||||
      <Filter>窗口\参数设置窗口</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QRapidInputWidget.ui">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口\批量录入</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
    <CustomBuild Include="QRapidInputWidget.h">
 | 
			
		||||
      <Filter>窗口\转介绍信息录入窗口\批量录入</Filter>
 | 
			
		||||
    </CustomBuild>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QLoginWidget.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="StringCodeConverter.h">
 | 
			
		||||
      <Filter>数据\查询</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="SystemDataQuery.h">
 | 
			
		||||
      <Filter>数据\查询</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="SystemData.h">
 | 
			
		||||
      <Filter>数据\参数</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QMainFrame.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QTelSalePolicyInfoInputWidget.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="DataManipulation.h">
 | 
			
		||||
      <Filter>数据\电销转介绍数据处理</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QTelSalePolicyInfoQuery.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QConfigurationWidget.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="sqlite\sqlite3.h">
 | 
			
		||||
      <Filter>sqlite</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="sqlite\sqlite3ext.h">
 | 
			
		||||
      <Filter>sqlite</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="Parameters.h">
 | 
			
		||||
      <Filter>数据\系统参数类</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
    <ClInclude Include="GeneratedFiles\ui_QRapidInputWidget.h">
 | 
			
		||||
      <Filter>Generated Files</Filter>
 | 
			
		||||
    </ClInclude>
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
  <ItemGroup>
 | 
			
		||||
    <ResourceCompile Include="TelSalePolicyInfoManager.rc" />
 | 
			
		||||
  </ItemGroup>
 | 
			
		||||
</Project>
 | 
			
		||||
@@ -1,11 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
 | 
			
		||||
    <QTDIR>D:\develop\sdk\c\qt\qt_5.9.2\5.9.2\winrt_x86_msvc2017</QTDIR>
 | 
			
		||||
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
 | 
			
		||||
    <QTDIR>D:\develop\sdk\c\qt\qt_5.9.2\5.9.2\winrt_x86_msvc2017</QTDIR>
 | 
			
		||||
    <LocalDebuggerEnvironment>PATH=$(QTDIR)\bin%3b$(PATH)</LocalDebuggerEnvironment>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
</Project>
 | 
			
		||||
@@ -1,537 +0,0 @@
 | 
			
		||||
#include "TelSalePolicyManager.h"
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace StringCodeConverter;
 | 
			
		||||
 | 
			
		||||
#ifndef _UNICODE
 | 
			
		||||
#define _UNICODE
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
const char g_cszConnectStringIDS6[] = 
 | 
			
		||||
    "DRIVER={};"
 | 
			
		||||
    "PROTOCOL=onsoctcp;"
 | 
			
		||||
    "SERVICE=16191;"
 | 
			
		||||
    "SERVER=xmcx1;"
 | 
			
		||||
    "HOST=10.39.0.91;"
 | 
			
		||||
    "DATABASE=ids6;"
 | 
			
		||||
    "DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_szUserNameIDS6[] = "ccx99";
 | 
			
		||||
const static char g_szPasswordIDS6[] = "c91IT09";
 | 
			
		||||
 | 
			
		||||
const static char g_cszConnstringYwgl[] =
 | 
			
		||||
    "DRIVER={};"
 | 
			
		||||
    "PROTOCOL=onsoctcp;"
 | 
			
		||||
    "SERVICE=16192;"
 | 
			
		||||
    "SERVER=xmcx2;"
 | 
			
		||||
    "HOST=10.39.0.92;"
 | 
			
		||||
    "DATABASE=ywgl_xm;"
 | 
			
		||||
    "DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_cszUserNameYwgl[] = "ccx99";
 | 
			
		||||
const static char g_cszPasswordYwgl[] = "c92IT09";
 | 
			
		||||
 | 
			
		||||
CTelSalePolicyManager::CTelSalePolicyManager(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
CTelSalePolicyManager::~CTelSalePolicyManager(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CTelSalePolicyManager::Query( SPolicyQuery &policy, std::vector<SPolicyRecord> &vPolicy )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD>ɲ<EFBFBD>ѯ<EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
 | 
			
		||||
	string strCommand;
 | 
			
		||||
 | 
			
		||||
	strCommand.reserve( 1024 );
 | 
			
		||||
	strCommand.append( "select bdh, zhjywy, to_char(czrq, '%Y<><59>%m<><6D>%d<><64>') from w_dxbd_i where 1=1 and czrq >='" );
 | 
			
		||||
 | 
			
		||||
	strCommand += policy.strStartDate;
 | 
			
		||||
	strCommand += "' and czrq <= '";
 | 
			
		||||
	strCommand += policy.strEndDate;
 | 
			
		||||
	strCommand += "'";
 | 
			
		||||
 | 
			
		||||
	if ( policy.strPolicySerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		strCommand += " and bdh = '";
 | 
			
		||||
		strCommand += policy.strPolicySerial;
 | 
			
		||||
		strCommand += "'";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strSalerCode.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		strCommand += " and zhjywy = '";
 | 
			
		||||
		strCommand += policy.strSalerCode;
 | 
			
		||||
		strCommand += "'";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strPlateSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		strCommand += " and chph = '";
 | 
			
		||||
		strCommand += policy.strPlateSerial;
 | 
			
		||||
		strCommand += "'";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strFrameSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		strCommand += " and chjh = '";
 | 
			
		||||
		strCommand += policy.strFrameSerial;
 | 
			
		||||
		strCommand += "'";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strEngineSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		strCommand += " and fdjh = '";
 | 
			
		||||
		strCommand += policy.strEngineSerial;
 | 
			
		||||
		strCommand += "'";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		conn.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		string strError = error.ErrText();
 | 
			
		||||
 | 
			
		||||
		throw strError;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	while ( command.FetchNext() == true )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policyQuery;
 | 
			
		||||
 | 
			
		||||
		SAString strCol = command.Field( 1 ).asString();
 | 
			
		||||
		strCol.TrimRight();
 | 
			
		||||
 | 
			
		||||
		policyQuery.strPolicySerial = strCol;
 | 
			
		||||
 | 
			
		||||
		strCol = command.Field( 2 ).asString();
 | 
			
		||||
		strCol.TrimRight();
 | 
			
		||||
		policyQuery.strSalerCode = strCol;
 | 
			
		||||
		
 | 
			
		||||
		strCol = (SAString)command.Field( 3 ).asString();
 | 
			
		||||
		strCol.TrimRight();
 | 
			
		||||
		policyQuery.strOperatorDate = strCol;
 | 
			
		||||
 | 
			
		||||
		vPolicy.push_back( policyQuery );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string QueryOperatorName( string strOperatorCode )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	string strCommand( "select rymc from rydm where rydm='" );
 | 
			
		||||
	string strResult;
 | 
			
		||||
 | 
			
		||||
	strCommand += strOperatorCode;
 | 
			
		||||
	strCommand += "'";
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		conn.Connect(
 | 
			
		||||
			"DRIVER={};"
 | 
			
		||||
			"PROTOCOL=onsoctcp;"	// protocol in lower case
 | 
			
		||||
			"SERVICE=7777;"
 | 
			
		||||
			"SERVER=xmtb1;"
 | 
			
		||||
			"HOST=10.39.0.80;"
 | 
			
		||||
			"DATABASE=datacenter;",
 | 
			
		||||
			"ccxuser",
 | 
			
		||||
			"ccx99",
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		SAString strError = error.ErrText();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( command.FetchNext() == true )
 | 
			
		||||
	{
 | 
			
		||||
		SAString sastrResult = command.Field("rymc").asString();
 | 
			
		||||
		sastrResult.TrimRight();
 | 
			
		||||
 | 
			
		||||
		strResult = (const char *)sastrResult;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
 | 
			
		||||
	return strResult;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QueryOperatorInfo( const string & cstrOperatorCode,
 | 
			
		||||
                        string & strOperatorName,
 | 
			
		||||
                        string & strDeptCode,
 | 
			
		||||
                        string & strDeptName )
 | 
			
		||||
{
 | 
			
		||||
    SAConnection connection;
 | 
			
		||||
    SACommand    command;
 | 
			
		||||
 | 
			
		||||
    string strCommand = "select a.staff_name, "
 | 
			
		||||
                        "       a.department_code,"
 | 
			
		||||
                        "       b.department_name "
 | 
			
		||||
                        "from rydm_t a, bm_t b  "
 | 
			
		||||
                        "where a.department_code = b.department_code "
 | 
			
		||||
                        "and   a.staff_code = '";
 | 
			
		||||
 | 
			
		||||
    strCommand.append( cstrOperatorCode );
 | 
			
		||||
    strCommand.append( "'" );
 | 
			
		||||
 | 
			
		||||
    try
 | 
			
		||||
    {
 | 
			
		||||
        connection.Connect( g_cszConnectStringIDS6,
 | 
			
		||||
                            g_szUserNameIDS6,
 | 
			
		||||
                            g_szPasswordIDS6,
 | 
			
		||||
                            SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
        command.setConnection( &connection );
 | 
			
		||||
        command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
        command.Execute();
 | 
			
		||||
 | 
			
		||||
        if ( command.FetchNext() == true )
 | 
			
		||||
        {
 | 
			
		||||
            strOperatorName = (const char *)( command.Field( "staff_name").asString() );
 | 
			
		||||
            strDeptCode = (const char *)( command.Field( "department_code").asString() );
 | 
			
		||||
            strDeptName = (const char *)( command.Field( "department_name").asString() );
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        connection.Disconnect();
 | 
			
		||||
    }
 | 
			
		||||
    catch ( SAException & sqlError )
 | 
			
		||||
    {
 | 
			
		||||
        runtime_error error( sqlError.ErrText() );
 | 
			
		||||
 | 
			
		||||
        throw error;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CTelSalePolicyManager::SavePolicy( const SPolicyRecord & policy,
 | 
			
		||||
                                        const vector<TelSalePolicyGift> giftList )
 | 
			
		||||
{
 | 
			
		||||
	if ( policy.strPolicySerial.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>!" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strSalerCode.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostringstream ostrCommand;
 | 
			
		||||
    string strAutotraderCall;
 | 
			
		||||
 | 
			
		||||
    //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
    if ( policy.bIsAutotraderCall == true )
 | 
			
		||||
    {
 | 
			
		||||
        strAutotraderCall = "1";
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
        strAutotraderCall = "0";
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
	ostrCommand << "insert into w_dxbd_i ( khjl, khjllx, bdh, zhjywy, zhjywymc, zhjywybm, zhjywybmm, czydm, czrq , chdlh, khmc, chph, chjh, fdjh ) "
 | 
			
		||||
				   "values(  0, 0, "
 | 
			
		||||
				<< "'" << policy.strPolicySerial << "', "
 | 
			
		||||
				<< "'" << policy.strSalerCode << "', "
 | 
			
		||||
                << "'" << policy.strSalerName << "', "
 | 
			
		||||
                << "'" << policy.strSalerDeptCode << "', "
 | 
			
		||||
                << "'" << policy.strSalerDeptName << "', "
 | 
			
		||||
				<< "'" << policy.strOperatorCode << "', "
 | 
			
		||||
				<< "'" << policy.strOperatorDate << "', "
 | 
			
		||||
                << "'" << strAutotraderCall << "'";
 | 
			
		||||
 | 
			
		||||
	if ( policy.strCustomerName.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strCustomerName << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strPlateSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strPlateSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strFrameSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strFrameSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strEngineSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strEngineSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostrCommand << " )";
 | 
			
		||||
 | 
			
		||||
	string strCommand = ostrCommand.str();
 | 
			
		||||
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
        conn.Connect(
 | 
			
		||||
            g_cszConnstringYwgl,
 | 
			
		||||
            g_cszUserNameYwgl,
 | 
			
		||||
            g_cszPasswordYwgl,
 | 
			
		||||
            SA_Informix_Client );
 | 
			
		||||
        //conn.setAutoCommit( SA_AutoCommitOff ); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
        //<2F><><EFBFBD>汣<EFBFBD><E6B1A3>
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
        //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD>,<2C><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
        command.setCommandText( "delete w_dxbd_gift_i where bdh = :1 " );
 | 
			
		||||
        command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
        command.Execute();
 | 
			
		||||
 | 
			
		||||
        command.setCommandText( "insert into w_dxbd_gift_i ( bdh, gift_name, gift_price ) values ( :1, :2, :3 )" );
 | 
			
		||||
 | 
			
		||||
        for ( vector<TelSalePolicyGift>::const_iterator iter = giftList.begin(); iter != giftList.end(); ++iter )
 | 
			
		||||
        {
 | 
			
		||||
            command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
            command.Param( 2 ).setAsString() = iter->GiftName().c_str();
 | 
			
		||||
            command.Param( 3 ).setAsString() = iter->GiftDefaultPrice().c_str();
 | 
			
		||||
 | 
			
		||||
            command.Execute();
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        conn.Commit();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		conn.Rollback();
 | 
			
		||||
        conn.Disconnect();
 | 
			
		||||
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CTelSalePolicyManager::LoadFromExcelFile( const char *pcszFilePath, vector< SPolicyRecord > *pvPolicy )
 | 
			
		||||
{
 | 
			
		||||
	if ( pvPolicy == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	wchar_t pwszFilePath[1024];
 | 
			
		||||
 | 
			
		||||
	mbs2unicode( pcszFilePath, pwszFilePath );
 | 
			
		||||
	
 | 
			
		||||
	IBookT<wchar_t> *pBookPolicy = xlCreateXMLBookW();
 | 
			
		||||
 | 
			
		||||
	if ( pBookPolicy == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !(pBookPolicy->load( pwszFilePath )) )
 | 
			
		||||
	{
 | 
			
		||||
		const char *pcszError = pBookPolicy->errorMessage();
 | 
			
		||||
 | 
			
		||||
		pBookPolicy->release();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ISheetT<wchar_t> *pSheet = pBookPolicy->getSheet( 0 );
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		pBookPolicy->release();
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	int iStartRow = pSheet->firstRow();
 | 
			
		||||
	int iEndROw = pSheet->lastRow();
 | 
			
		||||
 | 
			
		||||
	for ( iStartRow++; iStartRow <= iEndROw; iStartRow++ )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policy;
 | 
			
		||||
 | 
			
		||||
		policy.strPolicySerial = getCellString( pSheet, iStartRow, 0 );
 | 
			
		||||
 | 
			
		||||
		if ( policy.strPolicySerial.empty() == true )
 | 
			
		||||
		{
 | 
			
		||||
			iStartRow++;
 | 
			
		||||
			continue;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		policy.strSalerCode = getCellString( pSheet, iStartRow, 1 );
 | 
			
		||||
		policy.strCustomerName = getCellString( pSheet, iStartRow, 2 );
 | 
			
		||||
		policy.strPlateSerial = getCellString( pSheet, iStartRow, 3 );
 | 
			
		||||
		policy.strFrameSerial = getCellString( pSheet, iStartRow, 4 );
 | 
			
		||||
		policy.strEngineSerial = getCellString( pSheet, iStartRow, 5 );
 | 
			
		||||
 | 
			
		||||
		pvPolicy->push_back( policy );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pBookPolicy->release();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CTelSalePolicyManager::SavePolicyGift( const string & strPolicyNo, const vector<TelSalePolicyGift> & giftsList )
 | 
			
		||||
{
 | 
			
		||||
    if ( strPolicyNo.empty() )
 | 
			
		||||
    {
 | 
			
		||||
        throw invalid_argument( "strPolicyNo" );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    if ( giftsList.empty() )
 | 
			
		||||
    {
 | 
			
		||||
        throw invalid_argument( "<EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>" );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    SAConnection conn;
 | 
			
		||||
    SACommand command;
 | 
			
		||||
 | 
			
		||||
    command.setConnection( &conn );
 | 
			
		||||
    command.setCommandText( "insert into w_dxbd_gift_i ( bdh, gift_name, gift_price ) values ( :1, :2, :3 )" );
 | 
			
		||||
 | 
			
		||||
    try
 | 
			
		||||
    {
 | 
			
		||||
        conn.Connect( g_cszConnstringYwgl,
 | 
			
		||||
                      g_cszUserNameYwgl,
 | 
			
		||||
                      g_cszPasswordYwgl,
 | 
			
		||||
                      SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
        for ( vector<TelSalePolicyGift>::const_iterator iter = giftsList.begin(); iter != giftsList.end(); ++iter )
 | 
			
		||||
        {
 | 
			
		||||
            command.Param( 1 ).setAsString() = strPolicyNo.c_str();
 | 
			
		||||
            command.Param( 2 ).setAsString() = iter->GiftName().c_str();
 | 
			
		||||
            command.Param( 3 ).setAsString() = iter->GiftDefaultPrice().c_str();
 | 
			
		||||
 | 
			
		||||
            command.Execute();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    catch ( SAException &error )
 | 
			
		||||
    {
 | 
			
		||||
        throw runtime_error( error.ErrText() );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
string getCellString( ISheetT<wchar_t> *pSheet, int iRowIndex, int iColIndex )
 | 
			
		||||
{
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		return NULL;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	string strCell;
 | 
			
		||||
	int iCellValue;
 | 
			
		||||
	const char *pcszBuffer = NULL;
 | 
			
		||||
	char pszNumber[100];
 | 
			
		||||
 | 
			
		||||
	CellType celltype = pSheet->cellType( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
	switch ( celltype )
 | 
			
		||||
	{
 | 
			
		||||
	case CELLTYPE_STRING:
 | 
			
		||||
		//<2F>ַ<EFBFBD><D6B7><EFBFBD>
 | 
			
		||||
		strCell = unicode2mbs( pSheet->readStr( iRowIndex, iColIndex ) );
 | 
			
		||||
		break;
 | 
			
		||||
 | 
			
		||||
	case CELLTYPE_NUMBER:
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
		iCellValue = pSheet->readNum( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
		sprintf( pszNumber,"%d", iCellValue );
 | 
			
		||||
		strCell = pszNumber;
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	return strCell;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList )
 | 
			
		||||
{
 | 
			
		||||
    SAConnection connection;
 | 
			
		||||
    SACommand command;
 | 
			
		||||
 | 
			
		||||
    string strSQL = "select id, trim(name), default_price from w_dx_gifts";
 | 
			
		||||
 | 
			
		||||
    command.setConnection( &connection );
 | 
			
		||||
    command.setCommandText( strSQL.c_str() );
 | 
			
		||||
 | 
			
		||||
    try
 | 
			
		||||
    {
 | 
			
		||||
        connection.Connect(
 | 
			
		||||
            g_cszConnstringYwgl,
 | 
			
		||||
            g_cszUserNameYwgl,
 | 
			
		||||
            g_cszPasswordYwgl,
 | 
			
		||||
            SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
        command.Execute();
 | 
			
		||||
    }
 | 
			
		||||
    catch ( SAException &error )
 | 
			
		||||
    {
 | 
			
		||||
        throw runtime_error( error.ErrText() );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    while ( command.FetchNext() )
 | 
			
		||||
    {
 | 
			
		||||
        TelSalePolicyGift gift;
 | 
			
		||||
 | 
			
		||||
        gift.Id( command.Field(1).asLong() );
 | 
			
		||||
        gift.GiftName( (const char *)(command.Field(2).asString()) );
 | 
			
		||||
        gift.GiftDefaultPrice( (const char *)(command.Field(3).asString()) );
 | 
			
		||||
 | 
			
		||||
        giftList.push_back( gift );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    connection.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,96 +0,0 @@
 | 
			
		||||
#pragma once
 | 
			
		||||
 | 
			
		||||
#include <SQLAPI.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include <libxl.h>
 | 
			
		||||
#include "StringCodeConverter.h"
 | 
			
		||||
 | 
			
		||||
using namespace libxl;
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
#pragma comment( lib, "user32.lib")
 | 
			
		||||
#pragma comment( lib, "version.lib")
 | 
			
		||||
#pragma comment( lib, "oleaut32.lib")
 | 
			
		||||
#pragma comment( lib, "ole32.lib")
 | 
			
		||||
#pragma comment( lib, "libxl.lib")
 | 
			
		||||
 | 
			
		||||
#ifdef _DEBUG
 | 
			
		||||
#pragma comment( lib, "sqlapisd.lib")
 | 
			
		||||
#else
 | 
			
		||||
#pragma comment( lib, "sqlapis.lib")
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	std::string strPolicySerial;
 | 
			
		||||
	std::string strSalerCode;
 | 
			
		||||
    std::string strSalerName;
 | 
			
		||||
    std::string strSalerDeptCode;
 | 
			
		||||
    std::string strSalerDeptName;
 | 
			
		||||
	std::string strCustomerName;
 | 
			
		||||
	std::string strPlateSerial;
 | 
			
		||||
	std::string strFrameSerial;
 | 
			
		||||
	std::string strEngineSerial;
 | 
			
		||||
	std::string strOperatorDate;
 | 
			
		||||
	std::string strOperatorCode;
 | 
			
		||||
    bool bIsAutotraderCall;
 | 
			
		||||
} SPolicyRecord;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	std::string strPolicySerial;
 | 
			
		||||
	std::string strSalerCode;
 | 
			
		||||
	std::string strPlateSerial;
 | 
			
		||||
	std::string strFrameSerial;
 | 
			
		||||
	std::string strEngineSerial;
 | 
			
		||||
	std::string strStartDate;
 | 
			
		||||
	std::string strEndDate;
 | 
			
		||||
} SPolicyQuery;
 | 
			
		||||
 | 
			
		||||
class TelSalePolicyGift
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
    TelSalePolicyGift() {};
 | 
			
		||||
    TelSalePolicyGift( int id, string & name, string & defaultPrice ) : m_id( id ), m_giftName( name ), m_giftDefaultPrice( defaultPrice ) {}
 | 
			
		||||
 | 
			
		||||
    int Id() const { return m_id; }
 | 
			
		||||
    void Id(int val) { m_id = val; }
 | 
			
		||||
 | 
			
		||||
    string GiftName() const { return m_giftName; }
 | 
			
		||||
    void GiftName(string val) { m_giftName = val; }
 | 
			
		||||
 | 
			
		||||
    string GiftDefaultPrice() const { return m_giftDefaultPrice; }
 | 
			
		||||
    void GiftDefaultPrice(string val) { m_giftDefaultPrice = val; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
    int m_id;
 | 
			
		||||
    string m_giftName;
 | 
			
		||||
    string m_giftDefaultPrice;
 | 
			
		||||
    
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
class CTelSalePolicyManager
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	CTelSalePolicyManager(void);
 | 
			
		||||
	virtual ~CTelSalePolicyManager(void);
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	static void Query( SPolicyQuery &policy, std::vector<SPolicyRecord> &vPolicy );
 | 
			
		||||
	static void SavePolicy( const SPolicyRecord & policy, const vector<TelSalePolicyGift> giftList );
 | 
			
		||||
    static void SavePolicyGift( const string & strPolicyNo, const vector<TelSalePolicyGift> & giftsList );
 | 
			
		||||
	static void LoadFromExcelFile( const char *pcszFilePath, std::vector<SPolicyRecord> *pvPolicy );
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
std::string QueryOperatorName( std::string strOperatorCode );
 | 
			
		||||
void QueryOperatorInfo( const string & cstrOperatorCode,
 | 
			
		||||
                        string & strOperatorName,
 | 
			
		||||
                        string & strDeptCode,
 | 
			
		||||
                        string & strDeptName );
 | 
			
		||||
 | 
			
		||||
std::string getCellString( ISheetT<wchar_t> *pSheet, int iRowIndex, int iColIndex );
 | 
			
		||||
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList );
 | 
			
		||||
@@ -1,49 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include "check.h"
 | 
			
		||||
 | 
			
		||||
hash_map<string, string> parameters; //<2F><><EFBFBD>Ų<EFBFBD><C5B2><EFBFBD><EFBFBD><EFBFBD>hashmap
 | 
			
		||||
 | 
			
		||||
//<2F>汾<EFBFBD><E6B1BE>
 | 
			
		||||
const string cstrVersion = "0.99";
 | 
			
		||||
 | 
			
		||||
string strUserCode;
 | 
			
		||||
string strUserName;
 | 
			
		||||
string strUserPassword;
 | 
			
		||||
 | 
			
		||||
bool checkVersion()
 | 
			
		||||
{
 | 
			
		||||
	bool result = false;
 | 
			
		||||
	hash_map<string,string>::iterator iter = parameters.find( string("<EFBFBD>汾<EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
	if ( iter != parameters.end() && iter->second == cstrVersion )
 | 
			
		||||
	{
 | 
			
		||||
		result = true;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return result;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getUserCode()
 | 
			
		||||
{
 | 
			
		||||
	return strUserCode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getUserName()
 | 
			
		||||
{
 | 
			
		||||
	return strUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserCode(const string & cstrUserCode)
 | 
			
		||||
{
 | 
			
		||||
	strUserCode = cstrUserCode;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void setUserName(const string & cstrUserName)
 | 
			
		||||
{
 | 
			
		||||
	strUserName = cstrUserName;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string getVersion()
 | 
			
		||||
{
 | 
			
		||||
	return cstrVersion;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,22 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#ifndef check_h__
 | 
			
		||||
#define check_h__
 | 
			
		||||
 | 
			
		||||
#include <hash_map>
 | 
			
		||||
#include <string>
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
extern hash_map<string, string> parameters;
 | 
			
		||||
 | 
			
		||||
bool checkVersion();
 | 
			
		||||
 | 
			
		||||
string getUserCode();
 | 
			
		||||
string getUserName();
 | 
			
		||||
 | 
			
		||||
void   setUserCode( const string & cstrUserCode );
 | 
			
		||||
void   setUserName( const string & cstrUserName );
 | 
			
		||||
 | 
			
		||||
string getVersion();
 | 
			
		||||
 | 
			
		||||
#endif // check_h__
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <ImportGroup Label="PropertySheets" />
 | 
			
		||||
  <PropertyGroup Label="UserMacros" />
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <ExecutablePath>D:\SDK\libxl\libxl_3.1.0\bin;$(ExecutablePath)</ExecutablePath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <IncludePath>D:\SDK\libxl\libxl_3.1.0\include_cpp;$(IncludePath)</IncludePath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <LibraryPath>D:\SDK\libxl\libxl_3.1.0\lib;$(LibraryPath)</LibraryPath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemDefinitionGroup />
 | 
			
		||||
  <ItemGroup />
 | 
			
		||||
</Project>
 | 
			
		||||
@@ -1,67 +0,0 @@
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#include <QTextCodec>
 | 
			
		||||
#include <QString>
 | 
			
		||||
#include <QtWidgets/QMessageBox.h>
 | 
			
		||||
#include <QtWidgets/QApplication>
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include "QMainFrame.h"
 | 
			
		||||
#include "QLoginWidget.h"
 | 
			
		||||
 | 
			
		||||
int main(int argc, char *argv[])
 | 
			
		||||
{
 | 
			
		||||
	//<2F><><EFBFBD>ڱ<EFBFBD><DAB1><EFBFBD>ת<EFBFBD><D7AA>
 | 
			
		||||
	QTextCodec * pCodecLocal = QTextCodec::codecForLocale();
 | 
			
		||||
 | 
			
		||||
	QApplication a(argc, argv);
 | 
			
		||||
	QLoginWidget login;
 | 
			
		||||
 | 
			
		||||
	int iReturnCode = 0;
 | 
			
		||||
 | 
			
		||||
	/*try
 | 
			
		||||
	{
 | 
			
		||||
	initConnectionPool();
 | 
			
		||||
	queryParameters();
 | 
			
		||||
 | 
			
		||||
	if ( checkVersion() == false )
 | 
			
		||||
	{
 | 
			
		||||
	QMessageBox::warning( NULL, 
 | 
			
		||||
	pCodecLocal->toUnicode( "<22>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>" ), 
 | 
			
		||||
	pCodecLocal->toUnicode( "<22><><EFBFBD><EFBFBD><EFBFBD>汾<EFBFBD><E6B1BE><EFBFBD><EFBFBD>!\n<><6E><EFBFBD><EFBFBD>ϵ<EFBFBD><CFB5>Ϣ<EFBFBD><CFA2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>³<EFBFBD><C2B3><EFBFBD><EFBFBD><EFBFBD>" ));
 | 
			
		||||
 | 
			
		||||
	return 0;
 | 
			
		||||
	}
 | 
			
		||||
	}
 | 
			
		||||
	catch ( std::runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
	releaseConnectionPool();
 | 
			
		||||
	QMessageBox::critical( NULL, 
 | 
			
		||||
	"<22><><EFBFBD><EFBFBD>", 
 | 
			
		||||
	pCodecLocal->toUnicode(error.what()) );
 | 
			
		||||
 | 
			
		||||
	return iReturnCode;
 | 
			
		||||
	}
 | 
			
		||||
	catch ( std::exception &error )
 | 
			
		||||
	{
 | 
			
		||||
	releaseConnectionPool();
 | 
			
		||||
	QMessageBox::critical( NULL, 
 | 
			
		||||
	"δ֪<CEB4><D6AA><EFBFBD><EFBFBD>", 
 | 
			
		||||
	pCodecLocal->toUnicode( error.what() ));
 | 
			
		||||
 | 
			
		||||
	return iReturnCode;
 | 
			
		||||
	}*/
 | 
			
		||||
 | 
			
		||||
	login.exec();
 | 
			
		||||
 | 
			
		||||
	if ( login.isLogin() == true )
 | 
			
		||||
	{
 | 
			
		||||
		QMainFrame w;
 | 
			
		||||
		w.showMaximized();
 | 
			
		||||
 | 
			
		||||
		iReturnCode = a.exec();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//releaseConnectionPool();
 | 
			
		||||
 | 
			
		||||
	return iReturnCode;
 | 
			
		||||
}
 | 
			
		||||
@@ -1,25 +0,0 @@
 | 
			
		||||
<RCC>
 | 
			
		||||
    <qresource prefix="/QMainFrame">
 | 
			
		||||
        <file>Resources/car.png</file>
 | 
			
		||||
        <file>Resources/car2.png</file>
 | 
			
		||||
        <file>Resources/clean.png</file>
 | 
			
		||||
        <file>Resources/CPIC.png</file>
 | 
			
		||||
        <file>Resources/dec.png</file>
 | 
			
		||||
        <file>Resources/edit.png</file>
 | 
			
		||||
        <file>Resources/excel.png</file>
 | 
			
		||||
        <file>Resources/find.png</file>
 | 
			
		||||
        <file>Resources/gear.png</file>
 | 
			
		||||
        <file>Resources/login.png</file>
 | 
			
		||||
        <file>Resources/manager.png</file>
 | 
			
		||||
        <file>Resources/new.png</file>
 | 
			
		||||
        <file>Resources/ok.png</file>
 | 
			
		||||
        <file>Resources/plus.png</file>
 | 
			
		||||
        <file>Resources/save.png</file>
 | 
			
		||||
        <file>Resources/save2.png</file>
 | 
			
		||||
        <file>Resources/tongji.png</file>
 | 
			
		||||
        <file>Resources/x.png</file>
 | 
			
		||||
        <file>Resources/telephone.png</file>
 | 
			
		||||
        <file>Resources/8218_box1.png</file>
 | 
			
		||||
        <file>Resources/CNY_Red.png</file>
 | 
			
		||||
    </qresource>
 | 
			
		||||
</RCC>
 | 
			
		||||
@@ -1,16 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="utf-8"?>
 | 
			
		||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
 | 
			
		||||
  <ImportGroup Label="PropertySheets" />
 | 
			
		||||
  <PropertyGroup Label="UserMacros" />
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <ExecutablePath>D:\SDK\sqlapi\sqlapi_msvc2010_3.8.1\bin;$(ExecutablePath)</ExecutablePath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <IncludePath>D:\SDK\sqlapi\sqlapi_msvc2010_3.8.1\include;$(IncludePath)</IncludePath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <PropertyGroup>
 | 
			
		||||
    <LibraryPath>D:\SDK\sqlapi\sqlapi_msvc2010_3.8.1\lib;$(LibraryPath)</LibraryPath>
 | 
			
		||||
  </PropertyGroup>
 | 
			
		||||
  <ItemDefinitionGroup />
 | 
			
		||||
  <ItemGroup />
 | 
			
		||||
</Project>
 | 
			
		||||
@@ -1,487 +0,0 @@
 | 
			
		||||
/*
 | 
			
		||||
** 2006 June 7
 | 
			
		||||
**
 | 
			
		||||
** The author disclaims copyright to this source code.  In place of
 | 
			
		||||
** a legal notice, here is a blessing:
 | 
			
		||||
**
 | 
			
		||||
**    May you do good and not evil.
 | 
			
		||||
**    May you find forgiveness for yourself and forgive others.
 | 
			
		||||
**    May you share freely, never taking more than you give.
 | 
			
		||||
**
 | 
			
		||||
*************************************************************************
 | 
			
		||||
** This header file defines the SQLite interface for use by
 | 
			
		||||
** shared libraries that want to be imported as extensions into
 | 
			
		||||
** an SQLite instance.  Shared libraries that intend to be loaded
 | 
			
		||||
** as extensions by SQLite should #include this file instead of 
 | 
			
		||||
** sqlite3.h.
 | 
			
		||||
*/
 | 
			
		||||
#ifndef _SQLITE3EXT_H_
 | 
			
		||||
#define _SQLITE3EXT_H_
 | 
			
		||||
#include "sqlite3.h"
 | 
			
		||||
 | 
			
		||||
typedef struct sqlite3_api_routines sqlite3_api_routines;
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The following structure holds pointers to all of the SQLite API
 | 
			
		||||
** routines.
 | 
			
		||||
**
 | 
			
		||||
** WARNING:  In order to maintain backwards compatibility, add new
 | 
			
		||||
** interfaces to the end of this structure only.  If you insert new
 | 
			
		||||
** interfaces in the middle of this structure, then older different
 | 
			
		||||
** versions of SQLite will not be able to load each others' shared
 | 
			
		||||
** libraries!
 | 
			
		||||
*/
 | 
			
		||||
struct sqlite3_api_routines {
 | 
			
		||||
  void * (*aggregate_context)(sqlite3_context*,int nBytes);
 | 
			
		||||
  int  (*aggregate_count)(sqlite3_context*);
 | 
			
		||||
  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
 | 
			
		||||
  int  (*bind_double)(sqlite3_stmt*,int,double);
 | 
			
		||||
  int  (*bind_int)(sqlite3_stmt*,int,int);
 | 
			
		||||
  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
 | 
			
		||||
  int  (*bind_null)(sqlite3_stmt*,int);
 | 
			
		||||
  int  (*bind_parameter_count)(sqlite3_stmt*);
 | 
			
		||||
  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
 | 
			
		||||
  const char * (*bind_parameter_name)(sqlite3_stmt*,int);
 | 
			
		||||
  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
 | 
			
		||||
  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
 | 
			
		||||
  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
 | 
			
		||||
  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
 | 
			
		||||
  int  (*busy_timeout)(sqlite3*,int ms);
 | 
			
		||||
  int  (*changes)(sqlite3*);
 | 
			
		||||
  int  (*close)(sqlite3*);
 | 
			
		||||
  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,
 | 
			
		||||
                           int eTextRep,const char*));
 | 
			
		||||
  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,
 | 
			
		||||
                             int eTextRep,const void*));
 | 
			
		||||
  const void * (*column_blob)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  int  (*column_bytes)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  int  (*column_bytes16)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  int  (*column_count)(sqlite3_stmt*pStmt);
 | 
			
		||||
  const char * (*column_database_name)(sqlite3_stmt*,int);
 | 
			
		||||
  const void * (*column_database_name16)(sqlite3_stmt*,int);
 | 
			
		||||
  const char * (*column_decltype)(sqlite3_stmt*,int i);
 | 
			
		||||
  const void * (*column_decltype16)(sqlite3_stmt*,int);
 | 
			
		||||
  double  (*column_double)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  int  (*column_int)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  const char * (*column_name)(sqlite3_stmt*,int);
 | 
			
		||||
  const void * (*column_name16)(sqlite3_stmt*,int);
 | 
			
		||||
  const char * (*column_origin_name)(sqlite3_stmt*,int);
 | 
			
		||||
  const void * (*column_origin_name16)(sqlite3_stmt*,int);
 | 
			
		||||
  const char * (*column_table_name)(sqlite3_stmt*,int);
 | 
			
		||||
  const void * (*column_table_name16)(sqlite3_stmt*,int);
 | 
			
		||||
  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  const void * (*column_text16)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  int  (*column_type)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
 | 
			
		||||
  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
 | 
			
		||||
  int  (*complete)(const char*sql);
 | 
			
		||||
  int  (*complete16)(const void*sql);
 | 
			
		||||
  int  (*create_collation)(sqlite3*,const char*,int,void*,
 | 
			
		||||
                           int(*)(void*,int,const void*,int,const void*));
 | 
			
		||||
  int  (*create_collation16)(sqlite3*,const void*,int,void*,
 | 
			
		||||
                             int(*)(void*,int,const void*,int,const void*));
 | 
			
		||||
  int  (*create_function)(sqlite3*,const char*,int,int,void*,
 | 
			
		||||
                          void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                          void (*xStep)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                          void (*xFinal)(sqlite3_context*));
 | 
			
		||||
  int  (*create_function16)(sqlite3*,const void*,int,int,void*,
 | 
			
		||||
                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                            void (*xFinal)(sqlite3_context*));
 | 
			
		||||
  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
 | 
			
		||||
  int  (*data_count)(sqlite3_stmt*pStmt);
 | 
			
		||||
  sqlite3 * (*db_handle)(sqlite3_stmt*);
 | 
			
		||||
  int (*declare_vtab)(sqlite3*,const char*);
 | 
			
		||||
  int  (*enable_shared_cache)(int);
 | 
			
		||||
  int  (*errcode)(sqlite3*db);
 | 
			
		||||
  const char * (*errmsg)(sqlite3*);
 | 
			
		||||
  const void * (*errmsg16)(sqlite3*);
 | 
			
		||||
  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
 | 
			
		||||
  int  (*expired)(sqlite3_stmt*);
 | 
			
		||||
  int  (*finalize)(sqlite3_stmt*pStmt);
 | 
			
		||||
  void  (*free)(void*);
 | 
			
		||||
  void  (*free_table)(char**result);
 | 
			
		||||
  int  (*get_autocommit)(sqlite3*);
 | 
			
		||||
  void * (*get_auxdata)(sqlite3_context*,int);
 | 
			
		||||
  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
 | 
			
		||||
  int  (*global_recover)(void);
 | 
			
		||||
  void  (*interruptx)(sqlite3*);
 | 
			
		||||
  sqlite_int64  (*last_insert_rowid)(sqlite3*);
 | 
			
		||||
  const char * (*libversion)(void);
 | 
			
		||||
  int  (*libversion_number)(void);
 | 
			
		||||
  void *(*malloc)(int);
 | 
			
		||||
  char * (*mprintf)(const char*,...);
 | 
			
		||||
  int  (*open)(const char*,sqlite3**);
 | 
			
		||||
  int  (*open16)(const void*,sqlite3**);
 | 
			
		||||
  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
 | 
			
		||||
  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
 | 
			
		||||
  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
 | 
			
		||||
  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
 | 
			
		||||
  void *(*realloc)(void*,int);
 | 
			
		||||
  int  (*reset)(sqlite3_stmt*pStmt);
 | 
			
		||||
  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
 | 
			
		||||
  void  (*result_double)(sqlite3_context*,double);
 | 
			
		||||
  void  (*result_error)(sqlite3_context*,const char*,int);
 | 
			
		||||
  void  (*result_error16)(sqlite3_context*,const void*,int);
 | 
			
		||||
  void  (*result_int)(sqlite3_context*,int);
 | 
			
		||||
  void  (*result_int64)(sqlite3_context*,sqlite_int64);
 | 
			
		||||
  void  (*result_null)(sqlite3_context*);
 | 
			
		||||
  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
 | 
			
		||||
  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
 | 
			
		||||
  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
 | 
			
		||||
  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
 | 
			
		||||
  void  (*result_value)(sqlite3_context*,sqlite3_value*);
 | 
			
		||||
  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
 | 
			
		||||
  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,
 | 
			
		||||
                         const char*,const char*),void*);
 | 
			
		||||
  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
 | 
			
		||||
  char * (*snprintf)(int,char*,const char*,...);
 | 
			
		||||
  int  (*step)(sqlite3_stmt*);
 | 
			
		||||
  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,
 | 
			
		||||
                                char const**,char const**,int*,int*,int*);
 | 
			
		||||
  void  (*thread_cleanup)(void);
 | 
			
		||||
  int  (*total_changes)(sqlite3*);
 | 
			
		||||
  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
 | 
			
		||||
  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
 | 
			
		||||
  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,
 | 
			
		||||
                                         sqlite_int64),void*);
 | 
			
		||||
  void * (*user_data)(sqlite3_context*);
 | 
			
		||||
  const void * (*value_blob)(sqlite3_value*);
 | 
			
		||||
  int  (*value_bytes)(sqlite3_value*);
 | 
			
		||||
  int  (*value_bytes16)(sqlite3_value*);
 | 
			
		||||
  double  (*value_double)(sqlite3_value*);
 | 
			
		||||
  int  (*value_int)(sqlite3_value*);
 | 
			
		||||
  sqlite_int64  (*value_int64)(sqlite3_value*);
 | 
			
		||||
  int  (*value_numeric_type)(sqlite3_value*);
 | 
			
		||||
  const unsigned char * (*value_text)(sqlite3_value*);
 | 
			
		||||
  const void * (*value_text16)(sqlite3_value*);
 | 
			
		||||
  const void * (*value_text16be)(sqlite3_value*);
 | 
			
		||||
  const void * (*value_text16le)(sqlite3_value*);
 | 
			
		||||
  int  (*value_type)(sqlite3_value*);
 | 
			
		||||
  char *(*vmprintf)(const char*,va_list);
 | 
			
		||||
  /* Added ??? */
 | 
			
		||||
  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
 | 
			
		||||
  /* Added by 3.3.13 */
 | 
			
		||||
  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
 | 
			
		||||
  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
 | 
			
		||||
  int (*clear_bindings)(sqlite3_stmt*);
 | 
			
		||||
  /* Added by 3.4.1 */
 | 
			
		||||
  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,
 | 
			
		||||
                          void (*xDestroy)(void *));
 | 
			
		||||
  /* Added by 3.5.0 */
 | 
			
		||||
  int (*bind_zeroblob)(sqlite3_stmt*,int,int);
 | 
			
		||||
  int (*blob_bytes)(sqlite3_blob*);
 | 
			
		||||
  int (*blob_close)(sqlite3_blob*);
 | 
			
		||||
  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,
 | 
			
		||||
                   int,sqlite3_blob**);
 | 
			
		||||
  int (*blob_read)(sqlite3_blob*,void*,int,int);
 | 
			
		||||
  int (*blob_write)(sqlite3_blob*,const void*,int,int);
 | 
			
		||||
  int (*create_collation_v2)(sqlite3*,const char*,int,void*,
 | 
			
		||||
                             int(*)(void*,int,const void*,int,const void*),
 | 
			
		||||
                             void(*)(void*));
 | 
			
		||||
  int (*file_control)(sqlite3*,const char*,int,void*);
 | 
			
		||||
  sqlite3_int64 (*memory_highwater)(int);
 | 
			
		||||
  sqlite3_int64 (*memory_used)(void);
 | 
			
		||||
  sqlite3_mutex *(*mutex_alloc)(int);
 | 
			
		||||
  void (*mutex_enter)(sqlite3_mutex*);
 | 
			
		||||
  void (*mutex_free)(sqlite3_mutex*);
 | 
			
		||||
  void (*mutex_leave)(sqlite3_mutex*);
 | 
			
		||||
  int (*mutex_try)(sqlite3_mutex*);
 | 
			
		||||
  int (*open_v2)(const char*,sqlite3**,int,const char*);
 | 
			
		||||
  int (*release_memory)(int);
 | 
			
		||||
  void (*result_error_nomem)(sqlite3_context*);
 | 
			
		||||
  void (*result_error_toobig)(sqlite3_context*);
 | 
			
		||||
  int (*sleep)(int);
 | 
			
		||||
  void (*soft_heap_limit)(int);
 | 
			
		||||
  sqlite3_vfs *(*vfs_find)(const char*);
 | 
			
		||||
  int (*vfs_register)(sqlite3_vfs*,int);
 | 
			
		||||
  int (*vfs_unregister)(sqlite3_vfs*);
 | 
			
		||||
  int (*xthreadsafe)(void);
 | 
			
		||||
  void (*result_zeroblob)(sqlite3_context*,int);
 | 
			
		||||
  void (*result_error_code)(sqlite3_context*,int);
 | 
			
		||||
  int (*test_control)(int, ...);
 | 
			
		||||
  void (*randomness)(int,void*);
 | 
			
		||||
  sqlite3 *(*context_db_handle)(sqlite3_context*);
 | 
			
		||||
  int (*extended_result_codes)(sqlite3*,int);
 | 
			
		||||
  int (*limit)(sqlite3*,int,int);
 | 
			
		||||
  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
 | 
			
		||||
  const char *(*sql)(sqlite3_stmt*);
 | 
			
		||||
  int (*status)(int,int*,int*,int);
 | 
			
		||||
  int (*backup_finish)(sqlite3_backup*);
 | 
			
		||||
  sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
 | 
			
		||||
  int (*backup_pagecount)(sqlite3_backup*);
 | 
			
		||||
  int (*backup_remaining)(sqlite3_backup*);
 | 
			
		||||
  int (*backup_step)(sqlite3_backup*,int);
 | 
			
		||||
  const char *(*compileoption_get)(int);
 | 
			
		||||
  int (*compileoption_used)(const char*);
 | 
			
		||||
  int (*create_function_v2)(sqlite3*,const char*,int,int,void*,
 | 
			
		||||
                            void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                            void (*xStep)(sqlite3_context*,int,sqlite3_value**),
 | 
			
		||||
                            void (*xFinal)(sqlite3_context*),
 | 
			
		||||
                            void(*xDestroy)(void*));
 | 
			
		||||
  int (*db_config)(sqlite3*,int,...);
 | 
			
		||||
  sqlite3_mutex *(*db_mutex)(sqlite3*);
 | 
			
		||||
  int (*db_status)(sqlite3*,int,int*,int*,int);
 | 
			
		||||
  int (*extended_errcode)(sqlite3*);
 | 
			
		||||
  void (*log)(int,const char*,...);
 | 
			
		||||
  sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
 | 
			
		||||
  const char *(*sourceid)(void);
 | 
			
		||||
  int (*stmt_status)(sqlite3_stmt*,int,int);
 | 
			
		||||
  int (*strnicmp)(const char*,const char*,int);
 | 
			
		||||
  int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
 | 
			
		||||
  int (*wal_autocheckpoint)(sqlite3*,int);
 | 
			
		||||
  int (*wal_checkpoint)(sqlite3*,const char*);
 | 
			
		||||
  void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
 | 
			
		||||
  int (*blob_reopen)(sqlite3_blob*,sqlite3_int64);
 | 
			
		||||
  int (*vtab_config)(sqlite3*,int op,...);
 | 
			
		||||
  int (*vtab_on_conflict)(sqlite3*);
 | 
			
		||||
  /* Version 3.7.16 and later */
 | 
			
		||||
  int (*close_v2)(sqlite3*);
 | 
			
		||||
  const char *(*db_filename)(sqlite3*,const char*);
 | 
			
		||||
  int (*db_readonly)(sqlite3*,const char*);
 | 
			
		||||
  int (*db_release_memory)(sqlite3*);
 | 
			
		||||
  const char *(*errstr)(int);
 | 
			
		||||
  int (*stmt_busy)(sqlite3_stmt*);
 | 
			
		||||
  int (*stmt_readonly)(sqlite3_stmt*);
 | 
			
		||||
  int (*stricmp)(const char*,const char*);
 | 
			
		||||
  int (*uri_boolean)(const char*,const char*,int);
 | 
			
		||||
  sqlite3_int64 (*uri_int64)(const char*,const char*,sqlite3_int64);
 | 
			
		||||
  const char *(*uri_parameter)(const char*,const char*);
 | 
			
		||||
  char *(*vsnprintf)(int,char*,const char*,va_list);
 | 
			
		||||
  int (*wal_checkpoint_v2)(sqlite3*,const char*,int,int*,int*);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
/*
 | 
			
		||||
** The following macros redefine the API routines so that they are
 | 
			
		||||
** redirected throught the global sqlite3_api structure.
 | 
			
		||||
**
 | 
			
		||||
** This header file is also used by the loadext.c source file
 | 
			
		||||
** (part of the main SQLite library - not an extension) so that
 | 
			
		||||
** it can get access to the sqlite3_api_routines structure
 | 
			
		||||
** definition.  But the main library does not want to redefine
 | 
			
		||||
** the API.  So the redefinition macros are only valid if the
 | 
			
		||||
** SQLITE_CORE macros is undefined.
 | 
			
		||||
*/
 | 
			
		||||
#ifndef SQLITE_CORE
 | 
			
		||||
#define sqlite3_aggregate_context      sqlite3_api->aggregate_context
 | 
			
		||||
#ifndef SQLITE_OMIT_DEPRECATED
 | 
			
		||||
#define sqlite3_aggregate_count        sqlite3_api->aggregate_count
 | 
			
		||||
#endif
 | 
			
		||||
#define sqlite3_bind_blob              sqlite3_api->bind_blob
 | 
			
		||||
#define sqlite3_bind_double            sqlite3_api->bind_double
 | 
			
		||||
#define sqlite3_bind_int               sqlite3_api->bind_int
 | 
			
		||||
#define sqlite3_bind_int64             sqlite3_api->bind_int64
 | 
			
		||||
#define sqlite3_bind_null              sqlite3_api->bind_null
 | 
			
		||||
#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
 | 
			
		||||
#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
 | 
			
		||||
#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
 | 
			
		||||
#define sqlite3_bind_text              sqlite3_api->bind_text
 | 
			
		||||
#define sqlite3_bind_text16            sqlite3_api->bind_text16
 | 
			
		||||
#define sqlite3_bind_value             sqlite3_api->bind_value
 | 
			
		||||
#define sqlite3_busy_handler           sqlite3_api->busy_handler
 | 
			
		||||
#define sqlite3_busy_timeout           sqlite3_api->busy_timeout
 | 
			
		||||
#define sqlite3_changes                sqlite3_api->changes
 | 
			
		||||
#define sqlite3_close                  sqlite3_api->close
 | 
			
		||||
#define sqlite3_collation_needed       sqlite3_api->collation_needed
 | 
			
		||||
#define sqlite3_collation_needed16     sqlite3_api->collation_needed16
 | 
			
		||||
#define sqlite3_column_blob            sqlite3_api->column_blob
 | 
			
		||||
#define sqlite3_column_bytes           sqlite3_api->column_bytes
 | 
			
		||||
#define sqlite3_column_bytes16         sqlite3_api->column_bytes16
 | 
			
		||||
#define sqlite3_column_count           sqlite3_api->column_count
 | 
			
		||||
#define sqlite3_column_database_name   sqlite3_api->column_database_name
 | 
			
		||||
#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
 | 
			
		||||
#define sqlite3_column_decltype        sqlite3_api->column_decltype
 | 
			
		||||
#define sqlite3_column_decltype16      sqlite3_api->column_decltype16
 | 
			
		||||
#define sqlite3_column_double          sqlite3_api->column_double
 | 
			
		||||
#define sqlite3_column_int             sqlite3_api->column_int
 | 
			
		||||
#define sqlite3_column_int64           sqlite3_api->column_int64
 | 
			
		||||
#define sqlite3_column_name            sqlite3_api->column_name
 | 
			
		||||
#define sqlite3_column_name16          sqlite3_api->column_name16
 | 
			
		||||
#define sqlite3_column_origin_name     sqlite3_api->column_origin_name
 | 
			
		||||
#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16
 | 
			
		||||
#define sqlite3_column_table_name      sqlite3_api->column_table_name
 | 
			
		||||
#define sqlite3_column_table_name16    sqlite3_api->column_table_name16
 | 
			
		||||
#define sqlite3_column_text            sqlite3_api->column_text
 | 
			
		||||
#define sqlite3_column_text16          sqlite3_api->column_text16
 | 
			
		||||
#define sqlite3_column_type            sqlite3_api->column_type
 | 
			
		||||
#define sqlite3_column_value           sqlite3_api->column_value
 | 
			
		||||
#define sqlite3_commit_hook            sqlite3_api->commit_hook
 | 
			
		||||
#define sqlite3_complete               sqlite3_api->complete
 | 
			
		||||
#define sqlite3_complete16             sqlite3_api->complete16
 | 
			
		||||
#define sqlite3_create_collation       sqlite3_api->create_collation
 | 
			
		||||
#define sqlite3_create_collation16     sqlite3_api->create_collation16
 | 
			
		||||
#define sqlite3_create_function        sqlite3_api->create_function
 | 
			
		||||
#define sqlite3_create_function16      sqlite3_api->create_function16
 | 
			
		||||
#define sqlite3_create_module          sqlite3_api->create_module
 | 
			
		||||
#define sqlite3_create_module_v2       sqlite3_api->create_module_v2
 | 
			
		||||
#define sqlite3_data_count             sqlite3_api->data_count
 | 
			
		||||
#define sqlite3_db_handle              sqlite3_api->db_handle
 | 
			
		||||
#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
 | 
			
		||||
#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
 | 
			
		||||
#define sqlite3_errcode                sqlite3_api->errcode
 | 
			
		||||
#define sqlite3_errmsg                 sqlite3_api->errmsg
 | 
			
		||||
#define sqlite3_errmsg16               sqlite3_api->errmsg16
 | 
			
		||||
#define sqlite3_exec                   sqlite3_api->exec
 | 
			
		||||
#ifndef SQLITE_OMIT_DEPRECATED
 | 
			
		||||
#define sqlite3_expired                sqlite3_api->expired
 | 
			
		||||
#endif
 | 
			
		||||
#define sqlite3_finalize               sqlite3_api->finalize
 | 
			
		||||
#define sqlite3_free                   sqlite3_api->free
 | 
			
		||||
#define sqlite3_free_table             sqlite3_api->free_table
 | 
			
		||||
#define sqlite3_get_autocommit         sqlite3_api->get_autocommit
 | 
			
		||||
#define sqlite3_get_auxdata            sqlite3_api->get_auxdata
 | 
			
		||||
#define sqlite3_get_table              sqlite3_api->get_table
 | 
			
		||||
#ifndef SQLITE_OMIT_DEPRECATED
 | 
			
		||||
#define sqlite3_global_recover         sqlite3_api->global_recover
 | 
			
		||||
#endif
 | 
			
		||||
#define sqlite3_interrupt              sqlite3_api->interruptx
 | 
			
		||||
#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid
 | 
			
		||||
#define sqlite3_libversion             sqlite3_api->libversion
 | 
			
		||||
#define sqlite3_libversion_number      sqlite3_api->libversion_number
 | 
			
		||||
#define sqlite3_malloc                 sqlite3_api->malloc
 | 
			
		||||
#define sqlite3_mprintf                sqlite3_api->mprintf
 | 
			
		||||
#define sqlite3_open                   sqlite3_api->open
 | 
			
		||||
#define sqlite3_open16                 sqlite3_api->open16
 | 
			
		||||
#define sqlite3_prepare                sqlite3_api->prepare
 | 
			
		||||
#define sqlite3_prepare16              sqlite3_api->prepare16
 | 
			
		||||
#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
 | 
			
		||||
#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
 | 
			
		||||
#define sqlite3_profile                sqlite3_api->profile
 | 
			
		||||
#define sqlite3_progress_handler       sqlite3_api->progress_handler
 | 
			
		||||
#define sqlite3_realloc                sqlite3_api->realloc
 | 
			
		||||
#define sqlite3_reset                  sqlite3_api->reset
 | 
			
		||||
#define sqlite3_result_blob            sqlite3_api->result_blob
 | 
			
		||||
#define sqlite3_result_double          sqlite3_api->result_double
 | 
			
		||||
#define sqlite3_result_error           sqlite3_api->result_error
 | 
			
		||||
#define sqlite3_result_error16         sqlite3_api->result_error16
 | 
			
		||||
#define sqlite3_result_int             sqlite3_api->result_int
 | 
			
		||||
#define sqlite3_result_int64           sqlite3_api->result_int64
 | 
			
		||||
#define sqlite3_result_null            sqlite3_api->result_null
 | 
			
		||||
#define sqlite3_result_text            sqlite3_api->result_text
 | 
			
		||||
#define sqlite3_result_text16          sqlite3_api->result_text16
 | 
			
		||||
#define sqlite3_result_text16be        sqlite3_api->result_text16be
 | 
			
		||||
#define sqlite3_result_text16le        sqlite3_api->result_text16le
 | 
			
		||||
#define sqlite3_result_value           sqlite3_api->result_value
 | 
			
		||||
#define sqlite3_rollback_hook          sqlite3_api->rollback_hook
 | 
			
		||||
#define sqlite3_set_authorizer         sqlite3_api->set_authorizer
 | 
			
		||||
#define sqlite3_set_auxdata            sqlite3_api->set_auxdata
 | 
			
		||||
#define sqlite3_snprintf               sqlite3_api->snprintf
 | 
			
		||||
#define sqlite3_step                   sqlite3_api->step
 | 
			
		||||
#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata
 | 
			
		||||
#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup
 | 
			
		||||
#define sqlite3_total_changes          sqlite3_api->total_changes
 | 
			
		||||
#define sqlite3_trace                  sqlite3_api->trace
 | 
			
		||||
#ifndef SQLITE_OMIT_DEPRECATED
 | 
			
		||||
#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings
 | 
			
		||||
#endif
 | 
			
		||||
#define sqlite3_update_hook            sqlite3_api->update_hook
 | 
			
		||||
#define sqlite3_user_data              sqlite3_api->user_data
 | 
			
		||||
#define sqlite3_value_blob             sqlite3_api->value_blob
 | 
			
		||||
#define sqlite3_value_bytes            sqlite3_api->value_bytes
 | 
			
		||||
#define sqlite3_value_bytes16          sqlite3_api->value_bytes16
 | 
			
		||||
#define sqlite3_value_double           sqlite3_api->value_double
 | 
			
		||||
#define sqlite3_value_int              sqlite3_api->value_int
 | 
			
		||||
#define sqlite3_value_int64            sqlite3_api->value_int64
 | 
			
		||||
#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type
 | 
			
		||||
#define sqlite3_value_text             sqlite3_api->value_text
 | 
			
		||||
#define sqlite3_value_text16           sqlite3_api->value_text16
 | 
			
		||||
#define sqlite3_value_text16be         sqlite3_api->value_text16be
 | 
			
		||||
#define sqlite3_value_text16le         sqlite3_api->value_text16le
 | 
			
		||||
#define sqlite3_value_type             sqlite3_api->value_type
 | 
			
		||||
#define sqlite3_vmprintf               sqlite3_api->vmprintf
 | 
			
		||||
#define sqlite3_overload_function      sqlite3_api->overload_function
 | 
			
		||||
#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
 | 
			
		||||
#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
 | 
			
		||||
#define sqlite3_clear_bindings         sqlite3_api->clear_bindings
 | 
			
		||||
#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob
 | 
			
		||||
#define sqlite3_blob_bytes             sqlite3_api->blob_bytes
 | 
			
		||||
#define sqlite3_blob_close             sqlite3_api->blob_close
 | 
			
		||||
#define sqlite3_blob_open              sqlite3_api->blob_open
 | 
			
		||||
#define sqlite3_blob_read              sqlite3_api->blob_read
 | 
			
		||||
#define sqlite3_blob_write             sqlite3_api->blob_write
 | 
			
		||||
#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2
 | 
			
		||||
#define sqlite3_file_control           sqlite3_api->file_control
 | 
			
		||||
#define sqlite3_memory_highwater       sqlite3_api->memory_highwater
 | 
			
		||||
#define sqlite3_memory_used            sqlite3_api->memory_used
 | 
			
		||||
#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc
 | 
			
		||||
#define sqlite3_mutex_enter            sqlite3_api->mutex_enter
 | 
			
		||||
#define sqlite3_mutex_free             sqlite3_api->mutex_free
 | 
			
		||||
#define sqlite3_mutex_leave            sqlite3_api->mutex_leave
 | 
			
		||||
#define sqlite3_mutex_try              sqlite3_api->mutex_try
 | 
			
		||||
#define sqlite3_open_v2                sqlite3_api->open_v2
 | 
			
		||||
#define sqlite3_release_memory         sqlite3_api->release_memory
 | 
			
		||||
#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
 | 
			
		||||
#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
 | 
			
		||||
#define sqlite3_sleep                  sqlite3_api->sleep
 | 
			
		||||
#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
 | 
			
		||||
#define sqlite3_vfs_find               sqlite3_api->vfs_find
 | 
			
		||||
#define sqlite3_vfs_register           sqlite3_api->vfs_register
 | 
			
		||||
#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
 | 
			
		||||
#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
 | 
			
		||||
#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
 | 
			
		||||
#define sqlite3_result_error_code      sqlite3_api->result_error_code
 | 
			
		||||
#define sqlite3_test_control           sqlite3_api->test_control
 | 
			
		||||
#define sqlite3_randomness             sqlite3_api->randomness
 | 
			
		||||
#define sqlite3_context_db_handle      sqlite3_api->context_db_handle
 | 
			
		||||
#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes
 | 
			
		||||
#define sqlite3_limit                  sqlite3_api->limit
 | 
			
		||||
#define sqlite3_next_stmt              sqlite3_api->next_stmt
 | 
			
		||||
#define sqlite3_sql                    sqlite3_api->sql
 | 
			
		||||
#define sqlite3_status                 sqlite3_api->status
 | 
			
		||||
#define sqlite3_backup_finish          sqlite3_api->backup_finish
 | 
			
		||||
#define sqlite3_backup_init            sqlite3_api->backup_init
 | 
			
		||||
#define sqlite3_backup_pagecount       sqlite3_api->backup_pagecount
 | 
			
		||||
#define sqlite3_backup_remaining       sqlite3_api->backup_remaining
 | 
			
		||||
#define sqlite3_backup_step            sqlite3_api->backup_step
 | 
			
		||||
#define sqlite3_compileoption_get      sqlite3_api->compileoption_get
 | 
			
		||||
#define sqlite3_compileoption_used     sqlite3_api->compileoption_used
 | 
			
		||||
#define sqlite3_create_function_v2     sqlite3_api->create_function_v2
 | 
			
		||||
#define sqlite3_db_config              sqlite3_api->db_config
 | 
			
		||||
#define sqlite3_db_mutex               sqlite3_api->db_mutex
 | 
			
		||||
#define sqlite3_db_status              sqlite3_api->db_status
 | 
			
		||||
#define sqlite3_extended_errcode       sqlite3_api->extended_errcode
 | 
			
		||||
#define sqlite3_log                    sqlite3_api->log
 | 
			
		||||
#define sqlite3_soft_heap_limit64      sqlite3_api->soft_heap_limit64
 | 
			
		||||
#define sqlite3_sourceid               sqlite3_api->sourceid
 | 
			
		||||
#define sqlite3_stmt_status            sqlite3_api->stmt_status
 | 
			
		||||
#define sqlite3_strnicmp               sqlite3_api->strnicmp
 | 
			
		||||
#define sqlite3_unlock_notify          sqlite3_api->unlock_notify
 | 
			
		||||
#define sqlite3_wal_autocheckpoint     sqlite3_api->wal_autocheckpoint
 | 
			
		||||
#define sqlite3_wal_checkpoint         sqlite3_api->wal_checkpoint
 | 
			
		||||
#define sqlite3_wal_hook               sqlite3_api->wal_hook
 | 
			
		||||
#define sqlite3_blob_reopen            sqlite3_api->blob_reopen
 | 
			
		||||
#define sqlite3_vtab_config            sqlite3_api->vtab_config
 | 
			
		||||
#define sqlite3_vtab_on_conflict       sqlite3_api->vtab_on_conflict
 | 
			
		||||
/* Version 3.7.16 and later */
 | 
			
		||||
#define sqlite3_close_v2               sqlite3_api->close_v2
 | 
			
		||||
#define sqlite3_db_filename            sqlite3_api->db_filename
 | 
			
		||||
#define sqlite3_db_readonly            sqlite3_api->db_readonly
 | 
			
		||||
#define sqlite3_db_release_memory      sqlite3_api->db_release_memory
 | 
			
		||||
#define sqlite3_errstr                 sqlite3_api->errstr
 | 
			
		||||
#define sqlite3_stmt_busy              sqlite3_api->stmt_busy
 | 
			
		||||
#define sqlite3_stmt_readonly          sqlite3_api->stmt_readonly
 | 
			
		||||
#define sqlite3_stricmp                sqlite3_api->stricmp
 | 
			
		||||
#define sqlite3_uri_boolean            sqlite3_api->uri_boolean
 | 
			
		||||
#define sqlite3_uri_int64              sqlite3_api->uri_int64
 | 
			
		||||
#define sqlite3_uri_parameter          sqlite3_api->uri_parameter
 | 
			
		||||
#define sqlite3_uri_vsnprintf          sqlite3_api->vsnprintf
 | 
			
		||||
#define sqlite3_wal_checkpoint_v2      sqlite3_api->wal_checkpoint_v2
 | 
			
		||||
#endif /* SQLITE_CORE */
 | 
			
		||||
 | 
			
		||||
#ifndef SQLITE_CORE
 | 
			
		||||
  /* This case when the file really is being compiled as a loadable 
 | 
			
		||||
  ** extension */
 | 
			
		||||
# define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api=0;
 | 
			
		||||
# define SQLITE_EXTENSION_INIT2(v)  sqlite3_api=v;
 | 
			
		||||
# define SQLITE_EXTENSION_INIT3     \
 | 
			
		||||
    extern const sqlite3_api_routines *sqlite3_api;
 | 
			
		||||
#else
 | 
			
		||||
  /* This case when the file is being statically linked into the 
 | 
			
		||||
  ** application */
 | 
			
		||||
# define SQLITE_EXTENSION_INIT1     /*no-op*/
 | 
			
		||||
# define SQLITE_EXTENSION_INIT2(v)  (void)v; /* unused parameter */
 | 
			
		||||
# define SQLITE_EXTENSION_INIT3     /*no-op*/
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
#endif /* _SQLITE3EXT_H_ */
 | 
			
		||||
@@ -1,32 +0,0 @@
 | 
			
		||||
 | 
			
		||||
Microsoft Visual Studio Solution File, Format Version 12.00
 | 
			
		||||
# Visual Studio 15
 | 
			
		||||
VisualStudioVersion = 15.0.27130.2010
 | 
			
		||||
MinimumVisualStudioVersion = 10.0.40219.1
 | 
			
		||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TelsaleAuxKit", "TelsaleAuxKit\TelsaleAuxKit.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
 | 
			
		||||
EndProject
 | 
			
		||||
Global
 | 
			
		||||
	GlobalSection(SolutionConfigurationPlatforms) = preSolution
 | 
			
		||||
		Debug|x64 = Debug|x64
 | 
			
		||||
		Debug|x86 = Debug|x86
 | 
			
		||||
		Release|x64 = Release|x64
 | 
			
		||||
		Release|x86 = Release|x86
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ProjectConfigurationPlatforms) = postSolution
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.ActiveCfg = Debug|x64
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x64.Build.0 = Debug|x64
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.ActiveCfg = Debug|Win32
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Debug|x86.Build.0 = Debug|Win32
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.ActiveCfg = Release|x64
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x64.Build.0 = Release|x64
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.ActiveCfg = Release|Win32
 | 
			
		||||
		{B12702AD-ABFB-343A-A199-8E24837244A3}.Release|x86.Build.0 = Release|Win32
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(SolutionProperties) = preSolution
 | 
			
		||||
		HideSolutionNode = FALSE
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
	GlobalSection(ExtensibilityGlobals) = postSolution
 | 
			
		||||
		Qt5Version = qt_5.10.0_msvc2017_64
 | 
			
		||||
		SolutionGuid = {89ED0A44-DA37-4BE9-97E6-7C42257A3D78}
 | 
			
		||||
	EndGlobalSection
 | 
			
		||||
EndGlobal
 | 
			
		||||
@@ -1,602 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include <SQLAPI.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <sstream>
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include <stdlib.h>
 | 
			
		||||
#include <libxl.h>
 | 
			
		||||
#include "DataManipulation.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "StringCodeConverter.h"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
#pragma comment( lib, "user32.lib")
 | 
			
		||||
#pragma comment( lib, "version.lib")
 | 
			
		||||
#pragma comment( lib, "oleaut32.lib")
 | 
			
		||||
#pragma comment( lib, "ole32.lib")
 | 
			
		||||
#pragma comment( lib, "libxl.lib")
 | 
			
		||||
 | 
			
		||||
#ifdef _DEBUG
 | 
			
		||||
#pragma comment( lib, "sqlapisd.lib")
 | 
			
		||||
#else
 | 
			
		||||
#pragma comment( lib, "sqlapis.lib")
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
const char g_cszConnectStringIDS6[] = 
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16191;"
 | 
			
		||||
	"SERVER=xmcx1;"
 | 
			
		||||
	"HOST=10.39.0.91;"
 | 
			
		||||
	"DATABASE=ids6;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_szUserNameIDS6[] = "ccx99";
 | 
			
		||||
const static char g_szPasswordIDS6[] = "c91IT09";
 | 
			
		||||
 | 
			
		||||
const static char g_cszConnstringYwgl[] =
 | 
			
		||||
	"DRIVER={};"
 | 
			
		||||
	"PROTOCOL=onsoctcp;"
 | 
			
		||||
	"SERVICE=16192;"
 | 
			
		||||
	"SERVER=xmcx2;"
 | 
			
		||||
	"HOST=10.39.0.92;"
 | 
			
		||||
	"DATABASE=ywgl_xm;"
 | 
			
		||||
	"DB_LOCALE=en_US.819;";
 | 
			
		||||
 | 
			
		||||
const static char g_cszUserNameYwgl[] = "ccx99";
 | 
			
		||||
const static char g_cszPasswordYwgl[] = "c92IT09";
 | 
			
		||||
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	string strSQL = "select id, trim(name), default_price from w_dx_gifts";
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &connection );
 | 
			
		||||
	command.setCommandText( strSQL.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		connection.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	while ( command.FetchNext() )
 | 
			
		||||
	{
 | 
			
		||||
		TelSalePolicyGift gift;
 | 
			
		||||
 | 
			
		||||
		gift.Id( command.Field(1).asLong() );
 | 
			
		||||
		gift.GiftName( (const char *)(command.Field(2).asString()) );
 | 
			
		||||
		gift.GiftDefaultPrice( (const char *)(command.Field(3).asString()) );
 | 
			
		||||
 | 
			
		||||
		giftList.push_back( gift );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	connection.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void SaveTelSalePolicyInfo(const SPolicyRecord & policy, const vector<TelSalePolicyGift> & giftList)
 | 
			
		||||
{
 | 
			
		||||
	if ( policy.strPolicySerial.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD><EFBFBD>!" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strSalerCode.empty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		throw invalid_argument( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϊ<EFBFBD>գ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostringstream ostrCommand;
 | 
			
		||||
	string strAutotraderCall;
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
	if ( policy.bIsAutotraderCall == true )
 | 
			
		||||
	{
 | 
			
		||||
		strAutotraderCall = "1";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		strAutotraderCall = "0";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostrCommand << "insert into w_dxbd_i ( jjbj, khjl, khjllx, bdh, zhjywy, zhjywymc, zhjywybm, zhjywybmm, kshdm, kshmc, czydm, czrq , chdlh, chshdm, chshmc, khmc, chph, chjh, fdjh ) "
 | 
			
		||||
		"values( 1, 0, 0, "
 | 
			
		||||
		<< "trim('" << policy.strPolicySerial << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerDeptCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerDeptName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerOfficeCode << "'), "
 | 
			
		||||
		<< "trim('" << policy.strSalerOfficeName << "'), "
 | 
			
		||||
		<< "trim('" << policy.strOperatorCode << "'), "
 | 
			
		||||
		<< "today, "
 | 
			
		||||
		<< "'" << strAutotraderCall << "'";
 | 
			
		||||
 | 
			
		||||
	if ( policy.strAutoTraderCode.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strAutoTraderCode << "'";
 | 
			
		||||
		ostrCommand << ", '" << policy.strAutoTraderName << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL, NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strCustomerName.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strCustomerName << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strPlateSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strPlateSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strFrameSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strFrameSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( policy.strEngineSerial.empty() == false )
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", '" << policy.strEngineSerial << "'";
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		ostrCommand << ", NULL";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	ostrCommand << " )";
 | 
			
		||||
 | 
			
		||||
	string strCommand = ostrCommand.str();
 | 
			
		||||
 | 
			
		||||
	SAConnection conn;
 | 
			
		||||
	SACommand command;
 | 
			
		||||
 | 
			
		||||
	command.setConnection( &conn );
 | 
			
		||||
	command.setCommandText( strCommand.c_str() );
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		conn.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
		//conn.setAutoCommit( SA_AutoCommitOff ); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>汣<EFBFBD><E6B1A3>
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʒ<EFBFBD>б<EFBFBD>,<2C><>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		command.setCommandText( "delete w_dxbd_gift_i where bdh = :1 " );
 | 
			
		||||
		command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		command.setCommandText( "insert into w_dxbd_gift_i ( bdh, gift_name, gift_price ) values ( :1, :2, :3 )" );
 | 
			
		||||
 | 
			
		||||
		for ( vector<TelSalePolicyGift>::const_iterator iter = giftList.begin(); iter != giftList.end(); ++iter )
 | 
			
		||||
		{
 | 
			
		||||
			command.Param( 1 ).setAsString() = policy.strPolicySerial.c_str();
 | 
			
		||||
			command.Param( 2 ).setAsString() = iter->GiftName().c_str();
 | 
			
		||||
			command.Param( 3 ).setAsString() = iter->GiftDefaultPrice().c_str();
 | 
			
		||||
 | 
			
		||||
			command.Execute();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		conn.Commit();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException &error )
 | 
			
		||||
	{
 | 
			
		||||
		conn.Rollback();
 | 
			
		||||
		conn.Disconnect();
 | 
			
		||||
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	conn.Disconnect();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QueryTelSalePolicyInfo( const string & strPolicyNo, 
 | 
			
		||||
	                         const string & strOperatorCode, 
 | 
			
		||||
							 const string & strStartDate, 
 | 
			
		||||
							 const string & strEndDate, 
 | 
			
		||||
							 vector<SPolicyQuery> & vPolicyInfo )
 | 
			
		||||
{
 | 
			
		||||
	SACommand command;
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SPolicyQuery policy;
 | 
			
		||||
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"select trim(bdh) bdh, trim(zhjywy) zhjywy, to_char(czrq, '%Y<><59>%m<><6D>%d<><64>') czrq, trim(czydm) czydm, chdlh, zhjywybmm, kshmc, chshdm, chshmc "
 | 
			
		||||
		"  from w_dxbd_i "
 | 
			
		||||
		" where 1=1 ";
 | 
			
		||||
 | 
			
		||||
	if ( !strPolicyNo.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and bdh = '" );
 | 
			
		||||
		strSQL.append( strPolicyNo );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strOperatorCode.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czydm = '" );
 | 
			
		||||
		strSQL.append( strOperatorCode );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strStartDate.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czrq >= '" );
 | 
			
		||||
		strSQL.append( strStartDate );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( !strEndDate.empty() )
 | 
			
		||||
	{
 | 
			
		||||
		strSQL.append( "and czrq <= '" );
 | 
			
		||||
		strSQL.append( strEndDate );
 | 
			
		||||
		strSQL.append( "' " );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		command.setCommandText( strSQL.c_str() );
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
 | 
			
		||||
		connection.Connect(
 | 
			
		||||
			g_cszConnstringYwgl,
 | 
			
		||||
			g_cszUserNameYwgl,
 | 
			
		||||
			g_cszPasswordYwgl,
 | 
			
		||||
			SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		while ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strPolicySerial = command.Field("bdh").asString();
 | 
			
		||||
			policy.strSalerCode = command.Field("zhjywy").asString();
 | 
			
		||||
			policy.strDeptName = command.Field("zhjywybmm").asString();
 | 
			
		||||
			policy.strOfficeName = command.Field("kshmc").asString();
 | 
			
		||||
			policy.strAutoTraderCode = command.Field("chshdm").asString();
 | 
			
		||||
			policy.strAutoTraderName = command.Field("chshmc").asString();
 | 
			
		||||
			policy.strInputDate = command.Field("czrq").asString();
 | 
			
		||||
			policy.strCDLH = command.Field("chdlh").asString();
 | 
			
		||||
 | 
			
		||||
			QueryPolicyGifts( policy.strPolicySerial, policy.strGifts, policy.dGiftPriceSum );
 | 
			
		||||
 | 
			
		||||
			vPolicyInfo.push_back( policy );
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QueryPolicyGifts(const string & strPolicyNo, string & strGifts, double dGiftPriceSum )
 | 
			
		||||
{
 | 
			
		||||
	SAConnection connection;
 | 
			
		||||
	SACommand    command;
 | 
			
		||||
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"select gift_name, gift_price "
 | 
			
		||||
		"  from w_dxbd_gift_i "
 | 
			
		||||
		" where bdh = '" + strPolicyNo + "'";
 | 
			
		||||
 | 
			
		||||
	string strSQLSum = 
 | 
			
		||||
		"select sum( gift_price ) "
 | 
			
		||||
		"  from w_dxbd_gift_i "
 | 
			
		||||
		" where bdh = '" + strPolicyNo + "'";
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		command.setConnection( &connection );
 | 
			
		||||
		command.setCommandText( strSQL.c_str() );
 | 
			
		||||
 | 
			
		||||
		connection.Connect( g_cszConnstringYwgl,
 | 
			
		||||
			                g_cszUserNameYwgl,
 | 
			
		||||
							g_cszPasswordYwgl,
 | 
			
		||||
							SA_Informix_Client );
 | 
			
		||||
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		strGifts.clear();
 | 
			
		||||
		dGiftPriceSum = 0.0;
 | 
			
		||||
 | 
			
		||||
		while ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
			if ( !strGifts.empty() )
 | 
			
		||||
			{
 | 
			
		||||
				strGifts.append( "; " );
 | 
			
		||||
			}
 | 
			
		||||
 | 
			
		||||
			strGifts.append( command.Field("gift_name").asString() );
 | 
			
		||||
			strGifts.append( " " );
 | 
			
		||||
			strGifts.append( command.Field("gift_price").asString() );
 | 
			
		||||
			strGifts.append( "Ԫ" );
 | 
			
		||||
 | 
			
		||||
			dGiftPriceSum += command.Field("gift_price").asDouble();
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		/*command.setCommandText( strSQLSum.c_str() );
 | 
			
		||||
		command.Execute();
 | 
			
		||||
 | 
			
		||||
		if ( command.FetchNext() )
 | 
			
		||||
		{
 | 
			
		||||
		strGiftPriceSum = command.Field( 0 ).asString();
 | 
			
		||||
		}*/
 | 
			
		||||
 | 
			
		||||
		connection.Disconnect();
 | 
			
		||||
	}
 | 
			
		||||
	catch ( SAException & error )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( error.ErrText() );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsFile(const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML )
 | 
			
		||||
{
 | 
			
		||||
	IBookT<char> * pBook = NULL;
 | 
			
		||||
	ISheetT<char> * pSheet = NULL;
 | 
			
		||||
 | 
			
		||||
	int iRowCount = 0;
 | 
			
		||||
	int iRowIndex = 0;
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	//if ( isXML == true )
 | 
			
		||||
	//{
 | 
			
		||||
		pBook = xlCreateXMLBookA();
 | 
			
		||||
	/*}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		pBook = xlCreateBook();
 | 
			
		||||
	}*/
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	if ( pBook == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pBook->load(strFilePath.c_str()) == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		string strMessage = pBook->errorMessage();
 | 
			
		||||
		throw string( strMessage );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pSheet = pBook->getSheet( 0 );
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD>ȡsheetʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iRowCount = pSheet->lastRow();
 | 
			
		||||
 | 
			
		||||
	if ( hasTitle == true )
 | 
			
		||||
	{
 | 
			
		||||
		iRowIndex = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
 | 
			
		||||
	while ( iRowIndex < iRowCount )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policy;
 | 
			
		||||
 | 
			
		||||
		CellType type = pSheet->cellType( iRowIndex, 4 );
 | 
			
		||||
 | 
			
		||||
		policy.strSignDate     = readXlsCell( pSheet, iRowIndex, 0 );
 | 
			
		||||
		policy.strPolicySerial = readXlsCell( pSheet, iRowIndex, 1 );
 | 
			
		||||
		policy.strPlateSerial  = readXlsCell( pSheet, iRowIndex, 2 );
 | 
			
		||||
		policy.strCustomerName = readXlsCell( pSheet, iRowIndex, 3 );
 | 
			
		||||
		policy.strSalerCode    = readXlsCell( pSheet, iRowIndex, 4 );
 | 
			
		||||
		//policy.strAutoTraderName = readXlsCell( pSheet, iRowIndex, 5 );
 | 
			
		||||
		policy.strAutoTraderCode = readXlsCell( pSheet, iRowIndex, 6 );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>빤<EFBFBD><EBB9A4>
 | 
			
		||||
		if ( policy.strSalerCode.length() == 1 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("00") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( policy.strSalerCode.length() == 2 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("0") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		policy.strOperatorCode = getUserCode();
 | 
			
		||||
 | 
			
		||||
		queryAutoTraderInfo( policy.strAutoTraderCode, policy.strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
		queryStaffInfo( policy.strSalerCode, 
 | 
			
		||||
			            policy.strSalerName, 
 | 
			
		||||
						policy.strSalerDeptCode,
 | 
			
		||||
						policy.strSalerDeptName,
 | 
			
		||||
						policy.strSalerOfficeCode,
 | 
			
		||||
						policy.strSalerOfficeName );
 | 
			
		||||
 | 
			
		||||
		listPolicy.push_back( policy );
 | 
			
		||||
 | 
			
		||||
		iRowIndex++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pBook->release();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string readXlsCell(ISheetT<char> * pSheet, int iRowIndex, int iColIndex)
 | 
			
		||||
{
 | 
			
		||||
	string strCell;
 | 
			
		||||
	char szNum[40];
 | 
			
		||||
	int iCell;
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	CellType cellType = pSheet->cellType( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
	switch( cellType )
 | 
			
		||||
	{
 | 
			
		||||
	case libxl::CELLTYPE_STRING:
 | 
			
		||||
		strCell = pSheet->readStr( iRowIndex, iColIndex );
 | 
			
		||||
		break;
 | 
			
		||||
	case libxl::CELLTYPE_NUMBER:
 | 
			
		||||
		memset( szNum, NULL, 40 );
 | 
			
		||||
 | 
			
		||||
		iCell = pSheet->readNum( iRowIndex, iColIndex );
 | 
			
		||||
		sprintf( szNum, "%d", iCell );
 | 
			
		||||
		strCell = szNum;
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		strCell = "";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	return strCell;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string readXlsxCell(ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex)
 | 
			
		||||
{
 | 
			
		||||
	wstring strCell;
 | 
			
		||||
	string strReturn;
 | 
			
		||||
 | 
			
		||||
	char szNum[40];
 | 
			
		||||
	int iCell;
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	CellType cellType = pSheet->cellType( iRowIndex, iColIndex );
 | 
			
		||||
 | 
			
		||||
	switch( cellType )
 | 
			
		||||
	{
 | 
			
		||||
	case libxl::CELLTYPE_STRING:
 | 
			
		||||
		strCell = pSheet->readStr( iRowIndex, iColIndex );
 | 
			
		||||
		break;
 | 
			
		||||
	case libxl::CELLTYPE_NUMBER:
 | 
			
		||||
		memset( szNum, NULL, 40 );
 | 
			
		||||
 | 
			
		||||
		iCell = pSheet->readNum( iRowIndex, iColIndex );
 | 
			
		||||
		sprintf( szNum, "%d", iCell );
 | 
			
		||||
		strReturn = szNum;
 | 
			
		||||
 | 
			
		||||
		break;
 | 
			
		||||
	default:
 | 
			
		||||
		strReturn = "";
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	StringCodeConverter::unicode2mbs( strCell, strReturn );
 | 
			
		||||
 | 
			
		||||
	return strReturn;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsxFile(wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle)
 | 
			
		||||
{
 | 
			
		||||
	IBookT<wchar_t> * pBook = NULL;
 | 
			
		||||
	ISheetT<wchar_t> * pSheet = NULL;
 | 
			
		||||
 | 
			
		||||
	int iRowCount = 0;
 | 
			
		||||
	int iRowIndex = 0;
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
	pBook = xlCreateXMLBookW();
 | 
			
		||||
 | 
			
		||||
	if ( pBook == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("");
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if ( pBook->load(L"D:/1111.xlsx") == false )
 | 
			
		||||
	{
 | 
			
		||||
		throw string("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>ʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pSheet = pBook->getSheet( 0 );
 | 
			
		||||
 | 
			
		||||
	if ( pSheet == NULL )
 | 
			
		||||
	{
 | 
			
		||||
		throw string( "<EFBFBD><EFBFBD>ȡsheetʧ<EFBFBD>ܣ<EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iRowCount = pSheet->lastRow();
 | 
			
		||||
 | 
			
		||||
	if ( hasTitle == true )
 | 
			
		||||
	{
 | 
			
		||||
		iRowIndex = 1;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ȡ<EFBFBD><C8A1><EFBFBD><EFBFBD>
 | 
			
		||||
	while ( iRowIndex < iRowCount )
 | 
			
		||||
	{
 | 
			
		||||
		SPolicyRecord policy;
 | 
			
		||||
 | 
			
		||||
		CellType type = pSheet->cellType( iRowIndex, 4 );
 | 
			
		||||
 | 
			
		||||
		policy.strSignDate     = readXlsxCell( pSheet, iRowIndex, 0 );
 | 
			
		||||
		policy.strPolicySerial = readXlsxCell( pSheet, iRowIndex, 1 );
 | 
			
		||||
		policy.strPlateSerial  = readXlsxCell( pSheet, iRowIndex, 2 );
 | 
			
		||||
		policy.strCustomerName = readXlsxCell( pSheet, iRowIndex, 3 );
 | 
			
		||||
		policy.strSalerCode    = readXlsxCell( pSheet, iRowIndex, 4 );
 | 
			
		||||
		policy.strAutoTraderName = readXlsxCell( pSheet, iRowIndex, 6 );
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD>빤<EFBFBD><EBB9A4>
 | 
			
		||||
		if ( policy.strSalerCode.length() == 1 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("00") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		if ( policy.strSalerCode.length() == 2 )
 | 
			
		||||
		{
 | 
			
		||||
			policy.strSalerCode = string("0") + policy.strSalerCode;
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		policy.strOperatorCode = getUserCode();
 | 
			
		||||
 | 
			
		||||
		queryStaffInfo( 
 | 
			
		||||
			policy.strSalerCode, 
 | 
			
		||||
			policy.strSalerName, 
 | 
			
		||||
			policy.strSalerDeptCode,
 | 
			
		||||
			policy.strSalerDeptName,
 | 
			
		||||
			policy.strSalerOfficeCode,
 | 
			
		||||
			policy.strSalerOfficeName );
 | 
			
		||||
 | 
			
		||||
		listPolicy.push_back( policy );
 | 
			
		||||
 | 
			
		||||
		iRowIndex++;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	pBook->release();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@@ -1,145 +0,0 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * \file DataManipulation.h
 | 
			
		||||
 * \date 2014/08/18 15:43
 | 
			
		||||
 *
 | 
			
		||||
 * \author Kane
 | 
			
		||||
 * Contact: user@company.com
 | 
			
		||||
 *
 | 
			
		||||
 * \brief ת<><D7AA><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݴ<EFBFBD><DDB4><EFBFBD>
 | 
			
		||||
 *
 | 
			
		||||
 * TODO: long description
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef DataManipulation_h__
 | 
			
		||||
#define DataManipulation_h__
 | 
			
		||||
 | 
			
		||||
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
 | 
			
		||||
 | 
			
		||||
#include <libxl.h>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <vector>
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
using namespace libxl;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	string strPolicySerial;
 | 
			
		||||
	string strSignDate;
 | 
			
		||||
	string strSalerCode;
 | 
			
		||||
	string strSalerName;
 | 
			
		||||
	string strSalerDeptCode;
 | 
			
		||||
	string strSalerDeptName;
 | 
			
		||||
	string strSalerOfficeCode;
 | 
			
		||||
	string strSalerOfficeName;
 | 
			
		||||
	string strAutoTraderCode;
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
	string strCustomerName;
 | 
			
		||||
	string strPlateSerial;
 | 
			
		||||
	string strFrameSerial;
 | 
			
		||||
	string strEngineSerial;
 | 
			
		||||
	string strOperatorDate;
 | 
			
		||||
	string strOperatorCode;
 | 
			
		||||
	bool bIsAutotraderCall;
 | 
			
		||||
} SPolicyRecord;
 | 
			
		||||
 | 
			
		||||
typedef struct
 | 
			
		||||
{
 | 
			
		||||
	string strPolicySerial;
 | 
			
		||||
	string strSalerCode;
 | 
			
		||||
	string strDeptName;
 | 
			
		||||
	string strOfficeName;
 | 
			
		||||
	string strCDLH;
 | 
			
		||||
	string strAutoTraderCode;
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
	double dGiftPriceSum;
 | 
			
		||||
	string strGifts;
 | 
			
		||||
	string strInputDate;
 | 
			
		||||
} SPolicyQuery;
 | 
			
		||||
 | 
			
		||||
class TelSalePolicyGift
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	TelSalePolicyGift() {};
 | 
			
		||||
	TelSalePolicyGift( int id, string & name, string & defaultPrice ) : m_id( id ), m_giftName( name ), m_giftDefaultPrice( defaultPrice ) {}
 | 
			
		||||
 | 
			
		||||
	inline int Id() const { return m_id; }
 | 
			
		||||
	void Id(int val) { m_id = val; }
 | 
			
		||||
 | 
			
		||||
	string GiftName() const { return m_giftName; }
 | 
			
		||||
	void GiftName(string val) { m_giftName = val; }
 | 
			
		||||
 | 
			
		||||
	string GiftDefaultPrice() const { return m_giftDefaultPrice; }
 | 
			
		||||
	void GiftDefaultPrice(string val) { m_giftDefaultPrice = val; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	int m_id;
 | 
			
		||||
	string m_giftName;
 | 
			
		||||
	string m_giftDefaultPrice;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    queryTelsalePolicyGifts
 | 
			
		||||
// FullName:  queryTelsalePolicyGifts
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF>Ʒ<EFBFBD><C6B7>Ϣ
 | 
			
		||||
// Parameter: vector<TelSalePolicyGift> & giftList <20><>Ʒ<EFBFBD>б<EFBFBD>
 | 
			
		||||
//************************************
 | 
			
		||||
void queryTelsalePolicyGifts( vector<TelSalePolicyGift> &giftList );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    SaveTelSalePolicyInfo
 | 
			
		||||
// FullName:  SaveTelSalePolicyInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier:
 | 
			
		||||
// Parameter: const SPolicyRecord & policy
 | 
			
		||||
// Parameter: const vector<TelSalePolicyGift> & giftList
 | 
			
		||||
//************************************
 | 
			
		||||
void SaveTelSalePolicyInfo( const SPolicyRecord & policy, const vector<TelSalePolicyGift> & giftList );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    QueryTelSalePolicyInfo
 | 
			
		||||
// FullName:  QueryTelSalePolicyInfo
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier:
 | 
			
		||||
// Parameter: const string & strPolicyNo
 | 
			
		||||
// Parameter: const string & strOperatorCode
 | 
			
		||||
// Parameter: const string & strStartDate
 | 
			
		||||
// Parameter: const string & strEndDate
 | 
			
		||||
// Parameter: vector<SPolicyQuery> & vPolicyInfo
 | 
			
		||||
//************************************
 | 
			
		||||
void QueryTelSalePolicyInfo( const string & strPolicyNo,
 | 
			
		||||
	                         const string & strOperatorCode,
 | 
			
		||||
							 const string & strStartDate,
 | 
			
		||||
							 const string & strEndDate,
 | 
			
		||||
							 vector<SPolicyQuery> & vPolicyInfo );
 | 
			
		||||
 | 
			
		||||
//************************************
 | 
			
		||||
// Method:    QueryPolicyGifts
 | 
			
		||||
// FullName:  QueryPolicyGifts
 | 
			
		||||
// Access:    public 
 | 
			
		||||
// Returns:   void
 | 
			
		||||
// Qualifier: <20><>ѯ<EFBFBD><D1AF>Ʒ<EFBFBD>б<EFBFBD><D0B1><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ַ<EFBFBD><D6B7><EFBFBD>
 | 
			
		||||
// Parameter: const string & strPolicyNo
 | 
			
		||||
// Parameter: string & strGifts
 | 
			
		||||
//************************************
 | 
			
		||||
void QueryPolicyGifts( const string & strPolicyNo,
 | 
			
		||||
	                         string & strGifts,
 | 
			
		||||
							 double dGiftPriceSum );
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsFile( const string strFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle, bool isXML );
 | 
			
		||||
 | 
			
		||||
void readTelsaleXlsxFile( wchar_t * wszFilePath, vector<SPolicyRecord> & listPolicy, bool hasTitle );
 | 
			
		||||
 | 
			
		||||
string readXlsCell( ISheetT<char> * pSheet, int iRowIndex, int iColIndex );
 | 
			
		||||
string readXlsxCell( ISheetT<wchar_t> * pSheet, int iRowIndex, int iColIndex);
 | 
			
		||||
 | 
			
		||||
#endif // DataManipulation_h__
 | 
			
		||||
@@ -1,102 +0,0 @@
 | 
			
		||||
 | 
			
		||||
#include <exception>
 | 
			
		||||
#include "Parameters.h"
 | 
			
		||||
#include "sqlite3/sqlite3.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
Parameters::Parameters(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Parameters::Parameters(const string & strFilePath)
 | 
			
		||||
{
 | 
			
		||||
	sqlite3 * pdbParameter;
 | 
			
		||||
 | 
			
		||||
	int returnCode;
 | 
			
		||||
	int nRowCount;
 | 
			
		||||
	int nColCount;
 | 
			
		||||
 | 
			
		||||
	char ** result;
 | 
			
		||||
	char * pszMessage;
 | 
			
		||||
	char szSQL[] = 
 | 
			
		||||
		"select name, value from sys_parameter ";
 | 
			
		||||
 | 
			
		||||
	returnCode = sqlite3_open( strFilePath.c_str(), &pdbParameter );
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg(pdbParameter) );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><>ѯ
 | 
			
		||||
	returnCode = sqlite3_get_table( pdbParameter, szSQL, &result, &nRowCount, &nColCount, &pszMessage );
 | 
			
		||||
 | 
			
		||||
	if ( returnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg( pdbParameter ));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	for ( int nRowIndex = nColCount; nRowIndex < nColCount*(nRowCount+1); nRowIndex += nColCount )
 | 
			
		||||
	{
 | 
			
		||||
		string strName = result[nRowIndex];
 | 
			
		||||
		string strValue = result[nRowIndex+1];
 | 
			
		||||
 | 
			
		||||
		m_parameters[strName] = strValue;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD>
 | 
			
		||||
	sqlite3_free_table( result );
 | 
			
		||||
	sqlite3_close( pdbParameter );
 | 
			
		||||
 | 
			
		||||
	//<2F><><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>·<EFBFBD><C2B7>
 | 
			
		||||
	m_strDbFilePath = strFilePath;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
Parameters::~Parameters(void)
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
string Parameters::getParameter(const string & strParaName)
 | 
			
		||||
{
 | 
			
		||||
	return m_parameters[strParaName];
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void Parameters::setParameter(const string & strParaName, const string & strParaValue)
 | 
			
		||||
{
 | 
			
		||||
	if ( m_parameters.find( strParaName) == m_parameters.end() )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ƴ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>" );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	m_parameters[strParaName] = strParaValue;
 | 
			
		||||
 | 
			
		||||
	sqlite3 * pDb = NULL;
 | 
			
		||||
	int iReturnCode;
 | 
			
		||||
	char * szMsg;
 | 
			
		||||
	string strSQL = 
 | 
			
		||||
		"update sys_parameter set value = '";
 | 
			
		||||
 | 
			
		||||
	strSQL.append( strParaValue );
 | 
			
		||||
	strSQL.append( "' where name = '" );
 | 
			
		||||
	strSQL.append( strParaName );
 | 
			
		||||
	strSQL.append( "' " );
 | 
			
		||||
 | 
			
		||||
	iReturnCode = sqlite3_open( m_strDbFilePath.c_str(), &pDb );
 | 
			
		||||
 | 
			
		||||
	if ( iReturnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( sqlite3_errmsg( pDb ));
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	iReturnCode = sqlite3_exec( pDb, strSQL.c_str(), NULL, NULL, &szMsg );
 | 
			
		||||
 | 
			
		||||
	if ( iReturnCode != SQLITE_OK )
 | 
			
		||||
	{
 | 
			
		||||
		throw runtime_error( szMsg );
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	sqlite3_close( pDb );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@@ -1,44 +0,0 @@
 | 
			
		||||
/*!
 | 
			
		||||
 * \file Parameters.h
 | 
			
		||||
 * \date 2014/08/25 11:44
 | 
			
		||||
 *
 | 
			
		||||
 * \author Kane
 | 
			
		||||
 * Contact: user@company.com
 | 
			
		||||
 *
 | 
			
		||||
 * \brief 
 | 
			
		||||
 *
 | 
			
		||||
 * TODO: long description
 | 
			
		||||
 *
 | 
			
		||||
 * \note
 | 
			
		||||
*/
 | 
			
		||||
 | 
			
		||||
#ifndef Parameters_h__
 | 
			
		||||
#define Parameters_h__
 | 
			
		||||
 | 
			
		||||
#define _SILENCE_STDEXT_HASH_DEPRECATION_WARNINGS
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <hash_map>
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
using std::hash_map;
 | 
			
		||||
 | 
			
		||||
class Parameters
 | 
			
		||||
{
 | 
			
		||||
public:
 | 
			
		||||
	Parameters( const string & strFilePath );
 | 
			
		||||
	virtual ~Parameters(void);
 | 
			
		||||
 | 
			
		||||
	string getParameter( const string & strParaName );
 | 
			
		||||
	void   setParameter( const string & strParaName, const string & strParaValue );
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Parameters();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	string m_strDbFilePath;
 | 
			
		||||
	hash_map<string, string> m_parameters;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // Parameters_h__
 | 
			
		||||
 | 
			
		||||
@@ -1,84 +0,0 @@
 | 
			
		||||
#include <Qtwidgets/QtWidgets>
 | 
			
		||||
#include "QConfigurationWidget.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
 | 
			
		||||
QConfigurationWidget::QConfigurationWidget(QWidget *parent)
 | 
			
		||||
	: QWidget(parent)
 | 
			
		||||
{
 | 
			
		||||
	setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QConfigurationWidget::~QConfigurationWidget()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::init()
 | 
			
		||||
{
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( pLayoutMain );
 | 
			
		||||
 | 
			
		||||
	setMaximumWidth( 800 );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(editingFinished()), this, SLOT(onAutoTraderCodeEdited()));
 | 
			
		||||
	connect( pEditAutoTraderCode, SIGNAL(textChanged(const QString &)), this, SLOT(onAutoTraderCodeChanged()) );
 | 
			
		||||
	connect( pButtonSave, SIGNAL(clicked()), this, SLOT(onSave()) );
 | 
			
		||||
	connect( pButtonReset, SIGNAL(clicked()), this, SLOT(onReset()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::initData()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderCode->setText( QString::fromLocal8Bit( parameters.getParameter("Ĭ<EFBFBD>ϳ<EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>").c_str() ));
 | 
			
		||||
 | 
			
		||||
	emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onAutoTraderCodeEdited()
 | 
			
		||||
{
 | 
			
		||||
	string strAutoTraderCode = pEditAutoTraderCode->text().trimmed().toUpper().toLocal8Bit().data();
 | 
			
		||||
	string strAutoTraderName;
 | 
			
		||||
 | 
			
		||||
	queryAutoTraderInfo( strAutoTraderCode, strAutoTraderName );
 | 
			
		||||
 | 
			
		||||
	pEditAutoTraderName->setText( QString::fromLocal8Bit( strAutoTraderName.c_str() ));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onAutoTraderCodeChanged()
 | 
			
		||||
{
 | 
			
		||||
	pEditAutoTraderName->clear();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onSave()
 | 
			
		||||
{
 | 
			
		||||
	if ( pEditAutoTraderName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		emit pEditAutoTraderCode->editingFinished();
 | 
			
		||||
	}
 | 
			
		||||
	
 | 
			
		||||
	if ( pEditAutoTraderName->text().isEmpty() )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	parameters.setParameter( "Ĭ<EFBFBD>ϳ<EFBFBD><EFBFBD>̴<EFBFBD><EFBFBD><EFBFBD>", pEditAutoTraderCode->text().toLocal8Bit().data() );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QConfigurationWidget::onReset()
 | 
			
		||||
{
 | 
			
		||||
	initData();
 | 
			
		||||
}
 | 
			
		||||
@@ -1,31 +0,0 @@
 | 
			
		||||
#ifndef QCONFIGURATIONWIDGET_H
 | 
			
		||||
#define QCONFIGURATIONWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <QWidget>
 | 
			
		||||
#include <string>
 | 
			
		||||
#include "ui_QConfigurationWidget.h"
 | 
			
		||||
 | 
			
		||||
using std::string;
 | 
			
		||||
 | 
			
		||||
class QConfigurationWidget : public QWidget, public Ui::QConfigurationWidget
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QConfigurationWidget(QWidget *parent = 0);
 | 
			
		||||
	~QConfigurationWidget();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void onAutoTraderCodeEdited();
 | 
			
		||||
	void onAutoTraderCodeChanged();
 | 
			
		||||
	void onSave();
 | 
			
		||||
	void onReset();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
	void initData();
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QCONFIGURATIONWIDGET_H
 | 
			
		||||
@@ -1,224 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QConfigurationWidget</class>
 | 
			
		||||
 <widget class="QWidget" name="QConfigurationWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>843</width>
 | 
			
		||||
    <height>527</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>QConfigurationWidget</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>55</x>
 | 
			
		||||
     <y>95</y>
 | 
			
		||||
     <width>571</width>
 | 
			
		||||
     <height>208</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QVBoxLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="leftMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="topMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="rightMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <property name="bottomMargin">
 | 
			
		||||
     <number>5</number>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>默认车商代码:</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <widget class="QLabel" name="label_20">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商代码:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderCode">
 | 
			
		||||
         <property name="minimumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>90</width>
 | 
			
		||||
           <height>0</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="maximumSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>90</width>
 | 
			
		||||
           <height>16777215</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid red;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>false</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="2">
 | 
			
		||||
        <widget class="QLabel" name="label_21">
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>车商名称:</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="3">
 | 
			
		||||
        <widget class="QLineEdit" name="pEditAutoTraderName">
 | 
			
		||||
         <property name="styleSheet">
 | 
			
		||||
          <string notr="true">border: 1px solid silver;
 | 
			
		||||
height: 1.5em;</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string/>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="alignment">
 | 
			
		||||
          <set>Qt::AlignCenter</set>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="readOnly">
 | 
			
		||||
          <bool>true</bool>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <widget class="QGroupBox" name="groupBox_4">
 | 
			
		||||
      <property name="minimumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>0</width>
 | 
			
		||||
        <height>0</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="maximumSize">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>16777215</width>
 | 
			
		||||
        <height>16777215</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="title">
 | 
			
		||||
       <string>操作</string>
 | 
			
		||||
      </property>
 | 
			
		||||
      <layout class="QGridLayout" name="gridLayout_6">
 | 
			
		||||
       <item row="0" column="3">
 | 
			
		||||
        <spacer name="horizontalSpacer_2">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="0">
 | 
			
		||||
        <spacer name="horizontalSpacer_3">
 | 
			
		||||
         <property name="orientation">
 | 
			
		||||
          <enum>Qt::Horizontal</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="sizeHint" stdset="0">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>301</width>
 | 
			
		||||
           <height>20</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
        </spacer>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="1">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonSave">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>保存信息</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>保存</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/save2.png</normaloff>:/QMainFrame/Resources/save2.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
       <item row="0" column="2">
 | 
			
		||||
        <widget class="QToolButton" name="pButtonReset">
 | 
			
		||||
         <property name="toolTip">
 | 
			
		||||
          <string>重置所有</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="text">
 | 
			
		||||
          <string>重置</string>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="icon">
 | 
			
		||||
          <iconset resource="resource.qrc">
 | 
			
		||||
           <normaloff>:/QMainFrame/Resources/clean.png</normaloff>:/QMainFrame/Resources/clean.png</iconset>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="iconSize">
 | 
			
		||||
          <size>
 | 
			
		||||
           <width>64</width>
 | 
			
		||||
           <height>64</height>
 | 
			
		||||
          </size>
 | 
			
		||||
         </property>
 | 
			
		||||
         <property name="toolButtonStyle">
 | 
			
		||||
          <enum>Qt::ToolButtonIconOnly</enum>
 | 
			
		||||
         </property>
 | 
			
		||||
        </widget>
 | 
			
		||||
       </item>
 | 
			
		||||
      </layout>
 | 
			
		||||
     </widget>
 | 
			
		||||
    </item>
 | 
			
		||||
    <item>
 | 
			
		||||
     <spacer name="verticalSpacer">
 | 
			
		||||
      <property name="orientation">
 | 
			
		||||
       <enum>Qt::Vertical</enum>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="sizeHint" stdset="0">
 | 
			
		||||
       <size>
 | 
			
		||||
        <width>20</width>
 | 
			
		||||
        <height>40</height>
 | 
			
		||||
       </size>
 | 
			
		||||
      </property>
 | 
			
		||||
     </spacer>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||
@@ -1,86 +0,0 @@
 | 
			
		||||
 | 
			
		||||
//#include <occi.h>
 | 
			
		||||
#include <QTextCodec>
 | 
			
		||||
#include <QtWidgets/QMessageBox>
 | 
			
		||||
#include "QLoginWidget.h"
 | 
			
		||||
#include "SystemData.h"
 | 
			
		||||
#include "SystemDataQuery.h"
 | 
			
		||||
 | 
			
		||||
QLoginWidget::QLoginWidget(QWidget *parent)
 | 
			
		||||
	: QDialog(parent)
 | 
			
		||||
{
 | 
			
		||||
	ui.setupUi(this);
 | 
			
		||||
 | 
			
		||||
	init();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
QLoginWidget::~QLoginWidget()
 | 
			
		||||
{
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::init()
 | 
			
		||||
{
 | 
			
		||||
	initWidget();
 | 
			
		||||
	initSignal();
 | 
			
		||||
 | 
			
		||||
	pCodecLocal = QTextCodec::codecForLocale();
 | 
			
		||||
	pCodecUTF8 = QTextCodec::codecForName( "UTF-8" );
 | 
			
		||||
 | 
			
		||||
	m_isLoginSuccess = false;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::initWidget()
 | 
			
		||||
{
 | 
			
		||||
	setLayout( ui.pLayoutMain );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( ui.pButtonLogin, SIGNAL(clicked()), this, SLOT(login()) );
 | 
			
		||||
	connect( ui.pButtonCancel, SIGNAL(clicked()), this, SLOT(cancel()) );
 | 
			
		||||
	connect( ui.pEditUserCode, SIGNAL(editingFinished()), this, SLOT(getUserName()) );
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::login()
 | 
			
		||||
{
 | 
			
		||||
	string strPassword( (char *)ui.pEditPassword->text().toLocal8Bit().data() );
 | 
			
		||||
	
 | 
			
		||||
	if ( strPassword == m_userPassword )
 | 
			
		||||
	{
 | 
			
		||||
		m_isLoginSuccess = true;
 | 
			
		||||
 | 
			
		||||
		//<2F><><EFBFBD><EFBFBD><EFBFBD>û<EFBFBD><C3BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
 | 
			
		||||
		setUserCode( m_userCode );
 | 
			
		||||
		setUserName( m_userName );
 | 
			
		||||
 | 
			
		||||
		close();
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::warning( this, QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD>"), QString::fromLocal8Bit("<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>") );
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::cancel()
 | 
			
		||||
{
 | 
			
		||||
	m_isLoginSuccess = false;
 | 
			
		||||
 | 
			
		||||
	close();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QLoginWidget::getUserName()
 | 
			
		||||
{
 | 
			
		||||
	m_userCode = ui.pEditUserCode->text().toLocal8Bit().data();
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		QueryUserInfo( m_userCode, m_userName, m_userPassword );
 | 
			
		||||
 | 
			
		||||
		ui.pEditUserName->setText( QString::fromLocal8Bit(m_userName.c_str()));
 | 
			
		||||
	}
 | 
			
		||||
	catch ( runtime_error & exp )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical( this, "<EFBFBD><EFBFBD><EFBFBD><EFBFBD>", QString::fromUtf8( exp.what() ));
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
@@ -1,46 +0,0 @@
 | 
			
		||||
#ifndef QLOGINWIDGET_H
 | 
			
		||||
#define QLOGINWIDGET_H
 | 
			
		||||
 | 
			
		||||
#include <string>
 | 
			
		||||
#include <QDialog>
 | 
			
		||||
#include <QTextCodec>
 | 
			
		||||
#include "ui_QLoginWidget.h"
 | 
			
		||||
//#include "DataManipulate.h"
 | 
			
		||||
 | 
			
		||||
using namespace std;
 | 
			
		||||
 | 
			
		||||
class QLoginWidget : public QDialog
 | 
			
		||||
{
 | 
			
		||||
	Q_OBJECT
 | 
			
		||||
 | 
			
		||||
public:
 | 
			
		||||
	QLoginWidget(QWidget *parent = 0);
 | 
			
		||||
	~QLoginWidget();
 | 
			
		||||
 | 
			
		||||
	bool isLogin() const { return m_isLoginSuccess; }
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	void init();
 | 
			
		||||
	void initWidget();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
 | 
			
		||||
protected Q_SLOTS:
 | 
			
		||||
	void login();
 | 
			
		||||
	void cancel();
 | 
			
		||||
 | 
			
		||||
	void getUserName();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QLoginWidget ui;
 | 
			
		||||
	QTextCodec * pCodecLocal;
 | 
			
		||||
	QTextCodec * pCodecUTF8;
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	string m_userCode;
 | 
			
		||||
	string m_userName;
 | 
			
		||||
	string m_userPassword;
 | 
			
		||||
 | 
			
		||||
	bool m_isLoginSuccess;
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
#endif // QLOGINWIDGET_H
 | 
			
		||||
@@ -1,290 +0,0 @@
 | 
			
		||||
<?xml version="1.0" encoding="UTF-8"?>
 | 
			
		||||
<ui version="4.0">
 | 
			
		||||
 <class>QLoginWidget</class>
 | 
			
		||||
 <widget class="QDialog" name="QLoginWidget">
 | 
			
		||||
  <property name="geometry">
 | 
			
		||||
   <rect>
 | 
			
		||||
    <x>0</x>
 | 
			
		||||
    <y>0</y>
 | 
			
		||||
    <width>764</width>
 | 
			
		||||
    <height>480</height>
 | 
			
		||||
   </rect>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowTitle">
 | 
			
		||||
   <string>登录</string>
 | 
			
		||||
  </property>
 | 
			
		||||
  <property name="windowIcon">
 | 
			
		||||
   <iconset resource="resource.qrc">
 | 
			
		||||
    <normaloff>:/QMainFrame/Resources/CPIC.png</normaloff>:/QMainFrame/Resources/CPIC.png</iconset>
 | 
			
		||||
  </property>
 | 
			
		||||
  <widget class="QWidget" name="gridLayoutWidget">
 | 
			
		||||
   <property name="geometry">
 | 
			
		||||
    <rect>
 | 
			
		||||
     <x>40</x>
 | 
			
		||||
     <y>40</y>
 | 
			
		||||
     <width>369</width>
 | 
			
		||||
     <height>164</height>
 | 
			
		||||
    </rect>
 | 
			
		||||
   </property>
 | 
			
		||||
   <layout class="QGridLayout" name="pLayoutMain">
 | 
			
		||||
    <property name="sizeConstraint">
 | 
			
		||||
     <enum>QLayout::SetFixedSize</enum>
 | 
			
		||||
    </property>
 | 
			
		||||
    <item row="0" column="0">
 | 
			
		||||
     <layout class="QVBoxLayout" name="verticalLayout">
 | 
			
		||||
      <property name="leftMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="topMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="rightMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <property name="bottomMargin">
 | 
			
		||||
       <number>5</number>
 | 
			
		||||
      </property>
 | 
			
		||||
      <item>
 | 
			
		||||
       <layout class="QHBoxLayout" name="horizontalLayout">
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QLabel" name="label_4">
 | 
			
		||||
          <property name="sizePolicy">
 | 
			
		||||
           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
			
		||||
            <horstretch>0</horstretch>
 | 
			
		||||
            <verstretch>0</verstretch>
 | 
			
		||||
           </sizepolicy>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="minimumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>104</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="maximumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>104</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string/>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="pixmap">
 | 
			
		||||
           <pixmap resource="resource.qrc">:/QMainFrame/Resources/login.png</pixmap>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="scaledContents">
 | 
			
		||||
           <bool>true</bool>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="alignment">
 | 
			
		||||
           <set>Qt::AlignCenter</set>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QGroupBox" name="groupBox">
 | 
			
		||||
          <property name="sizePolicy">
 | 
			
		||||
           <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
 | 
			
		||||
            <horstretch>0</horstretch>
 | 
			
		||||
            <verstretch>0</verstretch>
 | 
			
		||||
           </sizepolicy>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="minimumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>245</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="maximumSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>245</width>
 | 
			
		||||
            <height>104</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="title">
 | 
			
		||||
           <string>登录信息:</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <layout class="QGridLayout" name="gridLayout">
 | 
			
		||||
           <property name="sizeConstraint">
 | 
			
		||||
            <enum>QLayout::SetFixedSize</enum>
 | 
			
		||||
           </property>
 | 
			
		||||
           <item row="0" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>    工号:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="0" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditUserCode">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>6</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="1" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label_2">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>名称:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="1" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditUserName">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>20</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="readOnly">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="2" column="0">
 | 
			
		||||
            <widget class="QLabel" name="label_3">
 | 
			
		||||
             <property name="text">
 | 
			
		||||
              <string>密码:</string>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
           <item row="2" column="1">
 | 
			
		||||
            <widget class="QLineEdit" name="pEditPassword">
 | 
			
		||||
             <property name="maxLength">
 | 
			
		||||
              <number>999</number>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="echoMode">
 | 
			
		||||
              <enum>QLineEdit::Password</enum>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="alignment">
 | 
			
		||||
              <set>Qt::AlignCenter</set>
 | 
			
		||||
             </property>
 | 
			
		||||
             <property name="clearButtonEnabled">
 | 
			
		||||
              <bool>true</bool>
 | 
			
		||||
             </property>
 | 
			
		||||
            </widget>
 | 
			
		||||
           </item>
 | 
			
		||||
          </layout>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </item>
 | 
			
		||||
      <item>
 | 
			
		||||
       <layout class="QHBoxLayout" name="horizontalLayout_2">
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer_2">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>40</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QToolButton" name="pButtonLogin">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>登录</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/ok.png</normaloff>:/QMainFrame/Resources/ok.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="iconSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>32</width>
 | 
			
		||||
            <height>32</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="toolButtonStyle">
 | 
			
		||||
           <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeType">
 | 
			
		||||
           <enum>QSizePolicy::Fixed</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>5</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <widget class="QToolButton" name="pButtonCancel">
 | 
			
		||||
          <property name="text">
 | 
			
		||||
           <string>放弃</string>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="icon">
 | 
			
		||||
           <iconset resource="resource.qrc">
 | 
			
		||||
            <normaloff>:/QMainFrame/Resources/x.png</normaloff>:/QMainFrame/Resources/x.png</iconset>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="iconSize">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>32</width>
 | 
			
		||||
            <height>32</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="toolButtonStyle">
 | 
			
		||||
           <enum>Qt::ToolButtonTextBesideIcon</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
         </widget>
 | 
			
		||||
        </item>
 | 
			
		||||
        <item>
 | 
			
		||||
         <spacer name="horizontalSpacer_3">
 | 
			
		||||
          <property name="orientation">
 | 
			
		||||
           <enum>Qt::Horizontal</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeType">
 | 
			
		||||
           <enum>QSizePolicy::Fixed</enum>
 | 
			
		||||
          </property>
 | 
			
		||||
          <property name="sizeHint" stdset="0">
 | 
			
		||||
           <size>
 | 
			
		||||
            <width>5</width>
 | 
			
		||||
            <height>20</height>
 | 
			
		||||
           </size>
 | 
			
		||||
          </property>
 | 
			
		||||
         </spacer>
 | 
			
		||||
        </item>
 | 
			
		||||
       </layout>
 | 
			
		||||
      </item>
 | 
			
		||||
     </layout>
 | 
			
		||||
    </item>
 | 
			
		||||
   </layout>
 | 
			
		||||
  </widget>
 | 
			
		||||
 </widget>
 | 
			
		||||
 <layoutdefault spacing="6" margin="11"/>
 | 
			
		||||
 <resources>
 | 
			
		||||
  <include location="resource.qrc"/>
 | 
			
		||||
  <include location="resources.qrc"/>
 | 
			
		||||
 </resources>
 | 
			
		||||
 <connections/>
 | 
			
		||||
</ui>
 | 
			
		||||