提交信息!
This commit is contained in:
		@@ -21,37 +21,38 @@ QCarDealerSchemaWidget::~QCarDealerSchemaWidget()
 | 
			
		||||
void QCarDealerSchemaWidget::onImport()
 | 
			
		||||
{
 | 
			
		||||
	//选择文件
 | 
			
		||||
	QString xlsxFilePath = QFileDialog::getOpenFileName(this,
 | 
			
		||||
		"请选择要导入的数据文件",
 | 
			
		||||
		".", "xlsx文件(*.xlsx)");
 | 
			
		||||
	if (xlsxFilePath.isEmpty() == true)
 | 
			
		||||
	QString xlsxFilePath = QFileDialog::getOpenFileName( this,
 | 
			
		||||
	                                                     "请选择要导入的数据文件",
 | 
			
		||||
	                                                     ".", "xlsx文件(*.xlsx)" );
 | 
			
		||||
	
 | 
			
		||||
	if ( xlsxFilePath.isEmpty() == true )
 | 
			
		||||
	{
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	schemeVector.clear();
 | 
			
		||||
 | 
			
		||||
	LoadCarDealerSchemeFromXlsx(xlsxFilePath.toStdWString(),
 | 
			
		||||
		0,
 | 
			
		||||
		1,
 | 
			
		||||
		schemeVector);
 | 
			
		||||
	LoadCarDealerSchemeFromXlsx( xlsxFilePath.toStdWString(),
 | 
			
		||||
	                             0,
 | 
			
		||||
	                             1,
 | 
			
		||||
	                             schemeVector );
 | 
			
		||||
 | 
			
		||||
	//以后要修改
 | 
			
		||||
	string userName = "car_dealer";
 | 
			
		||||
	string password = "cpic123456";
 | 
			
		||||
	string tnsName = "xmcx1";
 | 
			
		||||
	string tnsName  = "xmcx1";
 | 
			
		||||
 | 
			
		||||
	try
 | 
			
		||||
	{
 | 
			
		||||
		ImportCarDealerSchemeToOracle(userName, password, tnsName, schemeVector);
 | 
			
		||||
		ImportCarDealerSchemeToOracle( userName, password, tnsName, schemeVector );
 | 
			
		||||
 | 
			
		||||
		//showCarDealerAchievement();
 | 
			
		||||
		showCarDealerSchema();
 | 
			
		||||
	}
 | 
			
		||||
	catch (runtime_error& error)
 | 
			
		||||
	catch ( runtime_error & error )
 | 
			
		||||
	{
 | 
			
		||||
		QMessageBox::critical(this,
 | 
			
		||||
			"错误",
 | 
			
		||||
			error.what());
 | 
			
		||||
		QMessageBox::critical( this,
 | 
			
		||||
		                       "错误",
 | 
			
		||||
		                       error.what() );
 | 
			
		||||
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
@@ -78,5 +79,8 @@ void QCarDealerSchemaWidget::initWidgets()
 | 
			
		||||
void QCarDealerSchemaWidget::initSignal()
 | 
			
		||||
{
 | 
			
		||||
	connect( ui.pButtonImport, SIGNAL( clicked() ), this, SLOT( onImport() ) );
 | 
			
		||||
	
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void QCarDealerSchemaWidget::showCarDealerSchema()
 | 
			
		||||
{
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -23,6 +23,8 @@ private:
 | 
			
		||||
	void initWidgets();
 | 
			
		||||
	void initSignal();
 | 
			
		||||
 | 
			
		||||
	void showCarDealerSchema();
 | 
			
		||||
 | 
			
		||||
private:
 | 
			
		||||
	Ui::QCarDealerSchemaWidget ui;
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user