diff --git a/.gitignore b/.gitignore
index 79fa850a..00420380 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,3 +9,4 @@
/SGGL/FineUIPro.Web/FileUpload/DataBase/ConstructionStandardProject/2023-05
/SGGL/FineUIPro.Web/FileUpload/CQMS/InspectionEquipment/2023-05
/SGGL/FineUIPro.Web/FileUpload/CQMS
+/SGGL/FineUIPro.Web/FileUpload/LargerHazard/2023-06
diff --git a/DataBase/版本日志/SGGLDB_WH_2023-06-25.sql b/DataBase/版本日志/SGGLDB_WH_2023-06-25.sql
new file mode 100644
index 00000000..bf2159ab
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2023-06-25.sql
@@ -0,0 +1,38 @@
+INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+VALUES('88F115C3-D193-4455-8E8D-76F2EAF56291','ֳƵϹ','CQMS/WBS/ProjectControlPointFile.aspx',20,'3B322232-38A1-4291-9832-CD4A01C2A975','Menu_CQMS',0,1,1)
+GO
+
+alter table dbo.Solution_LargerHazardListItem drop constraint FK_Solution_LargerHazardListItem_WBS_WorkPackage
+GO
+
+
+ALTER VIEW [dbo].[View_Solution_LargerHazardListItem]
+ AS
+/*Σ嵥ϸбͼ*/
+SELECT Item.LargerHazardListItemId
+ ,Item.SortIndex
+ ,Item.LargerHazardListId
+ ,Item.UnitWorkId
+ ,(UnitWork.UnitWorkName+'('+(CASE WHEN UnitWork.ProjectType='1' THEN '' ELSE 'װ' END)+')') AS UnitWorkName
+ ,Item.WorkPackageId
+ ,SpecialSchemeType.SpecialSchemeTypeName as PackageContent
+ ,Item.WorkPackageSize
+ ,Item.ExpectedStartTime
+ ,Item.ExpectedEndTime
+ ,Item.IsArgument
+ ,(CASE WHEN Item.IsArgument=1 THEN '' ELSE '' END) AS IsArgumentName
+ ,Item.UnitId
+ ,Unit.UnitName
+ ,((CASE WHEN Item.ExpectedStartTime IS NULL THEN '' ELSE CONVERT(varchar(100), Item.ExpectedStartTime, 20) END)
+ + ''+ (CASE WHEN Item.ExpectedEndTime IS NULL THEN '' ELSE CONVERT(varchar(100), Item.ExpectedEndTime, 20) END)) AS ExpectedTime
+FROM dbo.Solution_LargerHazardListItem AS Item
+LEFT JOIN WBS_UnitWork AS UnitWork ON Item.UnitWorkId=UnitWork.UnitWorkId
+LEFT JOIN Base_SpecialSchemeType AS SpecialSchemeType ON Item.WorkPackageId=SpecialSchemeType.SpecialSchemeTypeId
+LEFT JOIN Base_Unit AS Unit ON Item.UnitId=Unit.UnitId
+
+
+GO
+
+
+alter table [dbo].[BS_Welder] alter column WED_Class nvarchar(50) null
+GO
\ No newline at end of file
diff --git a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs
index 7c7d7912..3c40f54c 100644
--- a/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs
+++ b/SGGL/BLL/BaseInfo/SpecialSchemeTypeService.cs
@@ -97,6 +97,34 @@ namespace BLL
}
}
+ ///
+ /// 类型表下拉框
+ ///
+ /// 下拉框名字
+ /// 是否显示请选择
+ public static void InitSpecialSchemeTypeDropDownList2(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.Items.Clear();
+ dropName.DataValueField = "SpecialSchemeTypeId";
+ dropName.DataTextField = "SpecialSchemeTypeName";
+ dropName.DataSource = GetSpecialSchemeTypeList2();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+
+ ///
+ /// 获取类别下拉项
+ ///
+ ///
+ public static List GetSpecialSchemeTypeList2()
+ {
+ var list = (from x in Funs.DB.Base_SpecialSchemeType orderby x.SpecialSchemeTypeCode select x).ToList();
+ return list;
+ }
+
public static Model.Base_SpecialSchemeType GetSpecialSchemeTypeByName(string name)
{
return Funs.DB.Base_SpecialSchemeType.FirstOrDefault(e => e.SpecialSchemeTypeName == name);
diff --git a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
index e4dee6e3..a00b75c9 100644
--- a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
+++ b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs
@@ -69,6 +69,7 @@ namespace BLL
newLargerHazard.ExpectedTime = largerHazard.ExpectedTime;
newLargerHazard.IsArgument = largerHazard.IsArgument;
newLargerHazard.Remark = largerHazard.Remark;
+ newLargerHazard.RecordTime = largerHazard.RecordTime;
newLargerHazard.States = largerHazard.States;
newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs
index 2ebd1b03..a938d139 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs
@@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
-
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 10);
hdCheckResult.Text = "1";
@@ -138,8 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
finally
{
- conn.Close();
- conn.Dispose();
+
}
}
#endregion
@@ -303,6 +301,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
@@ -322,21 +322,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData2(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -346,11 +346,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 4);
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs
index 836c2cd8..4be77e4b 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs
@@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
-
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1";
@@ -138,8 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
finally
{
- conn.Close();
- conn.Dispose();
+
}
}
#endregion
@@ -324,6 +322,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
@@ -343,21 +343,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData2(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -367,11 +367,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13);
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs
index 4d7b35fc..a775a17f 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs
@@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
-
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 12);
hdCheckResult.Text = "1";
@@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
finally
{
- conn.Close();
- conn.Dispose();
}
}
#endregion
@@ -303,6 +300,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
@@ -322,21 +321,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData2(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -346,11 +345,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 12);
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
index 73be3523..f669586d 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs
@@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
-
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 11);
hdCheckResult.Text = "1";
@@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
finally
{
- conn.Close();
- conn.Dispose();
}
}
#endregion
@@ -321,6 +318,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
@@ -340,21 +339,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData2(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -364,11 +363,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 11);
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs
index 0064f3ed..e38a3263 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs
@@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
-
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1";
@@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
finally
{
- conn.Close();
- conn.Dispose();
}
}
#endregion
@@ -194,13 +191,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|";
}
- string row3 = pds.Rows[i][3].ToString();
- if (!string.IsNullOrEmpty(row3))
+ string row2 = pds.Rows[i][2].ToString();
+ if (!string.IsNullOrEmpty(row2))
{
- var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault();
+ var cn = cns.Where(x => x.ProfessionalName == row2.Trim()).FirstOrDefault();
if (cn == null)
{
- result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
+ result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row2 + "]不存在!" + "|";
}
}
@@ -240,7 +237,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
- result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|";
+ result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|";
}
}
@@ -298,6 +295,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
+ ShowNotify("导入成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
@@ -317,21 +316,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// Excel文件路径名
private void ImportXlsToData2(string fileName)
{
- //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据;
- string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'";
- //建立连接
- OleDbConnection conn = new OleDbConnection(string.Format(cmdText, fileName));
try
{
- //打开连接
- if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed)
- {
- conn.Open();
- }
+ string oleDBConnString = String.Empty;
+ oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
+ oleDBConnString += "Data Source=";
+ oleDBConnString += fileName;
+ oleDBConnString += ";Extended Properties=Excel 8.0;";
+ OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
- m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
+
+ oleDBConn = new OleDbConnection(oleDBConnString);
+ oleDBConn.Open();
+ m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
@@ -341,11 +340,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
- oleAdMaster = new OleDbDataAdapter(sqlMaster, conn);
+ oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
- conn.Close();
- conn.Dispose();
+ oleDBConn.Close();
+ oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13);
}
@@ -394,7 +393,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (unitInfo != null && !string.IsNullOrEmpty(row0))
{
oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId
- && x.RemarkCode == pds.Rows[i][11].ToString().Trim()
+ && x.RemarkCode == pds.Rows[i][12].ToString().Trim()
).FirstOrDefault();
if (oldViewInfo == null)
{
@@ -402,11 +401,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.ProjectId = this.CurrUser.LoginProjectId;
Ins.UnitId = unitInfo.UnitId;
Ins.InspectionCode = pds.Rows[i][1].ToString().Trim();
- Ins.EquipmentNO = pds.Rows[i][2].ToString().Trim();
- if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim()))
+ if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim()))
{
- Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId;
+ Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][2].ToString().Trim()).CNProfessionalId;
}
+ Ins.EquipmentNO = pds.Rows[i][3].ToString().Trim();
Ins.InspectionName = pds.Rows[i][4].ToString().Trim();
Ins.Specifications = pds.Rows[i][5].ToString().Trim();
Ins.Supplier = pds.Rows[i][6].ToString().Trim();
@@ -434,7 +433,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else
{
- result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|";
+ result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|";
}
}
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs
index 240f921c..47f7eb3c 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs
@@ -42,8 +42,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
LoadAuditSelect();
this.agree.Hidden = true;
this.options.Hidden = true;
- this.btnSave.Hidden = true;
- this.btnSubmit.Hidden = true;
this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"];
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
if (inspectionEquipment != null)
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
index 5ea7a614..a04f93dd 100644
--- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
+++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx
@@ -6,6 +6,18 @@
+