提交当前本机整理版本

This commit is contained in:
cyf
2026-07-02 10:11:39 +00:00
parent c10a5d64c7
commit aacefa24f8
822 changed files with 196665 additions and 14263 deletions
+12 -6
View File
@@ -14,6 +14,7 @@ using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.Common;
using System.Data.SqlClient;
using System.Drawing;
using System.IO;
@@ -52,7 +53,7 @@ namespace Lskj.PubPdfSign
/// <summary>
/// AdapterObj
/// </summary>
public SqlDataAdapter AdapterObj { get; set; }
public DbDataAdapter AdapterObj { get; set; }
/// <summary>
/// 初始化控件
/// </summary>
@@ -492,7 +493,7 @@ namespace Lskj.PubPdfSign
/// <summary>
/// 设置数据源
/// </summary>
private int SetGridViewDataSource(SqlDataAdapter adapter, bool selectRowHandler = true)
private int SetGridViewDataSource(DbDataAdapter adapter, bool selectRowHandler = true)
{
if (adapter == null) return 0;
@@ -502,7 +503,11 @@ namespace Lskj.PubPdfSign
this.AdapterObj = adapter;
DataSet dataSet = new DataSet();
adapter.Fill(dataSet, "SetGridViewDataSource");
SqlCommandBuilder cb = new SqlCommandBuilder(this.AdapterObj);
//SqlCommandBuilder cb = new SqlCommandBuilder(this.AdapterObj);
DbCommandBuilder cb = SqlHelper.dbFactory.CreateCommandBuilder();
cb.DataAdapter = this.AdapterObj;
DataTable dt = dataSet.Tables[0];
this.gcMain.DataSource = dt;
this.gridView.BestFitColumns();
@@ -551,17 +556,18 @@ namespace Lskj.PubPdfSign
/// </summary>
/// <param name="sqlValue"></param>
/// <returns></returns>
private SqlDataAdapter GetAdapterResult(string sqlValue)
private DbDataAdapter GetAdapterResult(string sqlValue)
{
DbDataAdapter dbDataAdapter = SqlHelper.dbFactory.CreateDataAdapter();
try
{
if (string.IsNullOrWhiteSpace(sqlValue)) return new SqlDataAdapter();
if (string.IsNullOrWhiteSpace(sqlValue)) return dbDataAdapter;
return SqlHelper.ExecuteAdapter(CommandType.Text, sqlValue);
}
catch (Exception)
{
}
return new SqlDataAdapter();
return dbDataAdapter;
}
}
}