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 @@ +
@@ -15,7 +27,7 @@ diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs index 705d8416..0cca4fab 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs @@ -100,6 +100,29 @@ namespace FineUIPro.Web.Comprehensive } #endregion + protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) + { + DataRowView row = e.DataItem as DataRowView; + string IsVerification = row["IsVerification"].ToString(); + string NextTestDate = row["NextTestDate"].ToString(); + if (IsVerification=="是" && !string.IsNullOrEmpty(NextTestDate)) //在校验期内 + { + if (DateTime.Compare(DateTime.Parse(NextTestDate).AddDays(-15), DateTime.Now) < 0) + { + // Grid1.Rows[e.RowIndex].RowCssClass = "Red"; + //过期为红色 + e.RowCssClass = "Red"; + + } + } + else + { + e.RowCssClass = "Yellow"; + + + } + } + #region 查询 /// /// 查询 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs index 4ac6d47a..55848c7f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.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 @@ -352,6 +349,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 { @@ -371,21 +370,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) { @@ -395,11 +394,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/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index c7a9dbc8..c4e80272 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -51,8 +51,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.agree.Hidden = true; this.options.Hidden = true; - this.btnSave.Hidden = true; - this.btnSubmit.Hidden = true; this.InspectionMachineId = Request.Params["InspectionMachineId"]; Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId); if (inspectionMachine != null) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs index aeac50ca..bb079780 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.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,13 +120,13 @@ 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); + AddDatasetToSQL(ds.Tables[0], 12); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } finally { - conn.Close(); - conn.Dispose(); } } #endregion @@ -202,23 +199,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; } - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) + string row3 = pds.Rows[i][3].ToString(); + if (!string.IsNullOrEmpty(row3)) { - var cn = cns.Where(x => x.ProfessionalName == row4.Trim()).FirstOrDefault(); + var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); if (cn == null) { - result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row4 + "]不存在!" + "|"; + result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; } } - string row5 = pds.Rows[i][5].ToString(); - if (!string.IsNullOrEmpty(row5)) + string row4 = pds.Rows[i][4].ToString(); + if (!string.IsNullOrEmpty(row4)) { - var post = posts.Where(x => x.PostName == row5.Trim()).FirstOrDefault(); + var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault(); if (post == null) { - result += (i + 2).ToString() + "," + "工种" + "," + "[" + row5 + "]不存在!" + "|"; + result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|"; + } + } + + string row7 = pds.Rows[i][7].ToString(); + if (!string.IsNullOrEmpty(row7)) + { + try + { + DateTime date = Convert.ToDateTime(row7.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|"; } } @@ -231,42 +241,29 @@ namespace FineUIPro.Web.CQMS.Comprehensive } catch (Exception) { - result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row8 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|"; } } - string row9 = pds.Rows[i][9].ToString(); + string row9 = pds.Rows[i][9].ToString().Trim(); if (!string.IsNullOrEmpty(row9)) { - try + if (row9 != "是" && row9 != "否") { - DateTime date = Convert.ToDateTime(row9.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row9 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|"; } } - string row10 = pds.Rows[i][10].ToString().Trim(); + string row10 = pds.Rows[i][10].ToString(); if (!string.IsNullOrEmpty(row10)) - { - if (row10 != "是" && row10 != "否") - { - result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|"; - } - } - - string row11 = pds.Rows[i][11].ToString(); - if (!string.IsNullOrEmpty(row11)) { try { - DateTime date = Convert.ToDateTime(row11.Trim()); + DateTime date = Convert.ToDateTime(row10.Trim()); } catch (Exception) { - result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row11 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|"; } } @@ -336,6 +333,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 { @@ -355,21 +354,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) { @@ -379,13 +378,13 @@ 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); + AddDatasetToSQL2(ds.Tables[0], 12); } catch (Exception ex) { @@ -443,45 +442,46 @@ namespace FineUIPro.Web.CQMS.Comprehensive Ins.UnitId = unitInfo.UnitId; Ins.InspectionPersonCode = pds.Rows[i][1].ToString().Trim(); Ins.PersonName = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + { + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + } + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][4].ToString().Trim()).CNProfessionalId; + Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId; } - if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) + Ins.CertificateNumber = pds.Rows[i][5].ToString().Trim(); + Ins.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) { - Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId; + Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); } - Ins.CertificateNumber = pds.Rows[i][6].ToString().Trim(); - Ins.QualifiedProjectCode = pds.Rows[i][7].ToString().Trim(); if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim())) { - Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); + Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); } + Ins.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false; - if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) { - Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); + Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); } - Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; - - if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) - { - Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); - } - Ins.Remark = pds.Rows[i][12].ToString().Trim(); + Ins.Remark = pds.Rows[i][11].ToString().Trim(); Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; + Ins.IsTrain = true; BLL.InspectionPersonService.AddInspectionPerson(Ins); if (pds.Rows[i][4].ToString().Trim() == "焊工") { Model.BS_Welder welder = new Model.BS_Welder(); welder.WED_Unit = Ins.UnitId; welder.WED_Name = Ins.PersonName; - welder.WED_Code = pds.Rows[i][3].ToString().Trim(); + welder.WED_Code = pds.Rows[i][1].ToString().Trim(); welder.LimitDate = Ins.ValidityDate; welder.LeaveDate = Ins.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); welder.PostDate = Ins.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index ec977f07..7348c717 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -54,8 +54,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.agree.Hidden = true; this.options.Hidden = true; - this.btnSave.Hidden = true; - this.btnSubmit.Hidden = true; this.InspectionPersonId = Request.Params["InspectionPersonId"]; Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId); if (inspectionPerson != null) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs index 896e5a8e..292b42e1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.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,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } finally { - conn.Close(); - conn.Dispose(); } } #endregion @@ -318,6 +315,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 { @@ -337,21 +336,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) { @@ -361,11 +360,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], 10); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs index 2423b527..b9f2e362 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.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,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } finally { - conn.Close(); - conn.Dispose(); } } #endregion @@ -295,6 +292,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 { @@ -314,21 +313,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) { @@ -338,11 +337,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); } @@ -379,70 +378,46 @@ namespace FineUIPro.Web.CQMS.Comprehensive var cns = from x in Funs.DB.Base_CNProfessional select x; var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; - var oldViewInfos = from x in Funs.DB.Comprehensive_DesignChangeOrder + var oldViewInfos = from x in Funs.DB.Comprehensive_SiteVisaManagement where x.ProjectId == this.CurrUser.LoginProjectId select x; for (int i = 0; i < ir; i++) { - var oldViewInfo = oldViewInfos.Where(x => x.ChangeOrderCode == pds.Rows[i][2].ToString().Trim()).FirstOrDefault(); + var oldViewInfo = oldViewInfos.Where(x => x.VisaCode == pds.Rows[i][1].ToString().Trim()).FirstOrDefault(); if (oldViewInfo == null) { - Model.Comprehensive_DesignChangeOrder Ins = new Model.Comprehensive_DesignChangeOrder(); + Model.Comprehensive_SiteVisaManagement Ins = new Model.Comprehensive_SiteVisaManagement(); Ins.ProjectId = this.CurrUser.LoginProjectId; if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][0].ToString().Trim()).CNProfessionalId; + Ins.UnitId = units.FirstOrDefault(x => x.UnitName == pds.Rows[i][0].ToString().Trim()).UnitId; } - - if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim())) + Ins.VisaCode = pds.Rows[i][1].ToString().Trim(); + Ins.VisaContent = pds.Rows[i][2].ToString().Trim(); + Ins.ProcessingState = pds.Rows[i][3].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) { - Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][1].ToString().Trim()).UnitWorkId; + Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][4].ToString().Trim()).UnitWorkId; } - - Ins.ChangeOrderCode = pds.Rows[i][2].ToString().Trim(); - Ins.ChangeReason = pds.Rows[i][3].ToString().Trim(); - Ins.Contents = pds.Rows[i][4].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - Ins.IssuedDate = Convert.ToDateTime(pds.Rows[i][5].ToString().Trim()); + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][5].ToString().Trim()).CNProfessionalId; } - if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) { - Ins.ApprovalDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); + Ins.VisaDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); } - - if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) - { - Ins.UnitId = BLL.UnitService.GetUnitByUnitId(pds.Rows[i][7].ToString().Trim()).UnitId; - } - - Ins.ImplementationFrontState = pds.Rows[i][8].ToString().Trim(); - - string row9 = pds.Rows[i][9].ToString().Trim(); - if (!string.IsNullOrEmpty(row9)) - { - if (row9 == "未实施") - { - Ins.HandleState = "1"; - } - if (row9 == "进行中") - { - Ins.HandleState = "2"; - } - if (row9 == "已完成") - { - Ins.HandleState = "3"; - } - } - - Ins.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); + Ins.SignMan = pds.Rows[i][7].ToString().Trim(); + Ins.AuditMan = pds.Rows[i][8].ToString().Trim(); + Ins.Remark = pds.Rows[i][9].ToString().Trim(); Ins.CompileMan = this.CurrUser.UserId; - Ins.CompileDate = DateTime.Now.Date; - BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins); + Ins.Status = BLL.Const.Comprehensive_Compile; + Ins.VisaId = SQLHelper.GetNewID(); + BLL.SiteVisaManagementService.AddSiteVisaManagement(Ins); } } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } else diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs index 23e76f22..7c5b129b 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs @@ -363,10 +363,26 @@ namespace FineUIPro.Web.CQMS.WBS { if (string.IsNullOrEmpty(superDivisionProject.SuperDivisionId)) { - // if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId)) - //{ - superDivisionProject.IsSelected = b; - BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); + // if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId)) + //{ + if (b == false) + { + var selectedDivisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x=> x.SuperDivisionId == superDivisionProject.DivisionProjectId && x.IsSelected==true); + if (selectedDivisionProject != null) + { + + } + else + { + superDivisionProject.IsSelected = b; + BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); + } + } + else + { + superDivisionProject.IsSelected = b; + BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); + } } else { diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx new file mode 100644 index 00000000..a2e6d87d --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx @@ -0,0 +1,151 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPointFile.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPointFile" %> + + + + + + + 现场控制点裁剪 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs new file mode 100644 index 00000000..4e41f1f6 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs @@ -0,0 +1,1009 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; +using System.Data; +using BLL; +using System.Data.SqlClient; + +namespace FineUIPro.Web.CQMS.WBS +{ + public partial class ProjectControlPointFile : PageBase + { + /// + /// 被选择项列表 + /// + public List SelectedList + { + get + { + return (List)ViewState["SelectedList"]; + } + set + { + ViewState["SelectedList"] = value; + } + } + + /// + /// 未被选择项列表 + /// + public List NoSelectedList + { + get + { + return (List)ViewState["NoSelectedList"]; + } + set + { + ViewState["NoSelectedList"] = value; + } + } + + #region 页面加载 + /// + /// 页面加载 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.SelectedList = new List(); + this.NoSelectedList = new List(); + GetButtonPower(); + InitTreeMenu(); + this.Grid1.Columns[2].Hidden = false; + this.Grid1.Columns[3].Hidden = true; + this.Grid1.Columns[4].Hidden = true; + this.Grid1.Columns[5].Hidden = false; + this.Grid1.Columns[7].Hidden = false; + this.Grid1.Columns[8].Hidden = false; + this.Grid1.Columns[9].Hidden = false; + this.Grid1.Columns[10].Hidden = false; + this.Grid1.Columns[11].Hidden = false; + } + } + #endregion + + #region 加载树 + /// + /// 加载树 + /// + private void InitTreeMenu() + { + this.trWBS.Nodes.Clear(); + this.trWBS.ShowBorder = false; + this.trWBS.ShowHeader = false; + this.trWBS.EnableIcons = true; + this.trWBS.AutoScroll = true; + this.trWBS.EnableSingleClickExpand = true; + var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x; + foreach (var q in unitWorks) + { + TreeNode newNode = new TreeNode(); + newNode.Text = q.UnitWorkName; + newNode.NodeID = q.UnitWorkId; + newNode.CommandName = "UnitWork"; + newNode.EnableExpandEvent = true; + newNode.EnableClickEvent = true; + this.trWBS.Nodes.Add(newNode); + TreeNode emptyNode = new TreeNode(); + emptyNode.Text = ""; + emptyNode.NodeID = ""; + newNode.Nodes.Add(emptyNode); + } + } + #endregion + + #region 展开树 + /// + /// 展开树 + /// + /// + /// + protected void trWBS_NodeExpand(object sender, TreeNodeEventArgs e) + { + e.Node.Nodes.Clear(); + if (e.Node.CommandName == "UnitWork") //展开工程类型 + { + TreeNode newNode1 = new TreeNode(); + newNode1.Text = "建筑工程"; + newNode1.NodeID = e.NodeID + "|" + "1"; + newNode1.CommandName = "ProjectType"; + newNode1.EnableExpandEvent = true; + newNode1.EnableClickEvent = true; + e.Node.Nodes.Add(newNode1); + TreeNode tempNode1 = new TreeNode(); + tempNode1.NodeID = ""; + tempNode1.Text = ""; + tempNode1.EnableExpandEvent = true; + tempNode1.EnableClickEvent = true; + newNode1.Nodes.Add(tempNode1); + TreeNode newNode2 = new TreeNode(); + newNode2.Text = "安装工程"; + newNode2.NodeID = e.NodeID + "|" + "2"; + newNode2.CommandName = "ProjectType"; + newNode2.EnableExpandEvent = true; + newNode2.EnableClickEvent = true; + e.Node.Nodes.Add(newNode2); + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + tempNode2.EnableExpandEvent = true; + tempNode2.EnableClickEvent = true; + newNode2.Nodes.Add(tempNode2); + } + else if (e.Node.CommandName == "ProjectType") //展开工程类型 + { + if (e.NodeID.Split('|')[1] == "1") + { + var cNProfessional = (from x in BLL.Funs.DB.Base_CNProfessional where x.CNProfessionalId == Const.CNProfessionalCVId orderby x.SortIndex select x).ToList(); + foreach (var c in cNProfessional) + { + TreeNode newCNProfessionalNode = new TreeNode(); + newCNProfessionalNode.Text = c.ProfessionalName; + newCNProfessionalNode.NodeID = e.NodeID.Split('|')[0] + "|" + c.CNProfessionalId; + newCNProfessionalNode.CommandName = "CNProfessional"; + newCNProfessionalNode.EnableExpandEvent = true; + newCNProfessionalNode.EnableClickEvent = true; + e.Node.Nodes.Add(newCNProfessionalNode); + TreeNode tempNode = new TreeNode(); + tempNode.NodeID = ""; + tempNode.Text = ""; + tempNode.EnableExpandEvent = true; + tempNode.EnableClickEvent = true; + newCNProfessionalNode.Nodes.Add(tempNode); + } + } + else + { + var cNProfessional = (from x in BLL.Funs.DB.Base_CNProfessional where x.CNProfessionalId != Const.CNProfessionalConstructId && x.CNProfessionalId != Const.CNProfessionalCVId orderby x.SortIndex select x).ToList(); + foreach (var c in cNProfessional) + { + TreeNode newCNProfessionalNode = new TreeNode(); + newCNProfessionalNode.Text = c.ProfessionalName; + newCNProfessionalNode.NodeID = e.NodeID.Split('|')[0] + "|" + c.CNProfessionalId; + newCNProfessionalNode.CommandName = "CNProfessional"; + newCNProfessionalNode.EnableExpandEvent = true; + newCNProfessionalNode.EnableClickEvent = true; + e.Node.Nodes.Add(newCNProfessionalNode); + TreeNode tempNode = new TreeNode(); + tempNode.NodeID = ""; + tempNode.Text = ""; + tempNode.EnableExpandEvent = true; + tempNode.EnableClickEvent = true; + newCNProfessionalNode.Nodes.Add(tempNode); + } + } + } + else if (e.Node.CommandName == "CNProfessional") //展开专业 + { + string unitWorkId = e.Node.ParentNode.NodeID; + if (string.IsNullOrEmpty(unitWorkId)) + { + unitWorkId = e.Node.ParentNode.ParentNode.NodeID; + } + Model.WBS_UnitWork unitWork1 = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(unitWorkId); + if (unitWork1 == null) + { + unitWorkId = e.Node.ParentNode.ParentNode.NodeID; + } + string cNProfessionalId = e.NodeID; + if (e.NodeID.Contains("|")) + { + cNProfessionalId = e.NodeID.Split('|')[1]; + } + var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.CNProfessionalId == cNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId + orderby x.SortIndex + select x).ToList(); + foreach (var q in divisions) + { + if (q.IsSelected == true) + { + TreeNode newNode = new TreeNode(); + newNode.Text = q.DivisionName; + newNode.NodeID = q.DivisionProjectId; + newNode.CommandName = "DivisionProject"; + newNode.EnableExpandEvent = true; + newNode.EnableClickEvent = true; + //newNode.EnableCheckBox = true; + //newNode.EnableCheckEvent = true; + e.Node.Nodes.Add(newNode); + + //newNode.Checked = true; + + var list = (from x in Funs.DB.WBS_DivisionProject + where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Count > 0) + { + TreeNode tempNode = new TreeNode(); + tempNode.NodeID = ""; + tempNode.Text = ""; + newNode.Nodes.Add(tempNode); + } + } + } + } + else if (e.Node.CommandName == "DivisionProject") //展开分部节点 + { + var childDivisions = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.SuperDivisionId == e.Node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId + orderby x.SortIndex + select x).ToList(); + foreach (var q in childDivisions) + {if (q.IsSelected == true) + { + TreeNode newNode = new TreeNode(); + newNode.Text = q.DivisionName; + newNode.NodeID = q.DivisionProjectId; + newNode.CommandName = "DivisionProject"; + newNode.EnableExpandEvent = true; + newNode.EnableClickEvent = true; + //newNode.EnableCheckBox = true; + //newNode.EnableCheckEvent = true; + e.Node.Nodes.Add(newNode); + + //newNode.Checked = true; + + var list = (from x in Funs.DB.WBS_DivisionProject + where x.SuperDivisionId == q.DivisionProjectId && x.ProjectId == this.CurrUser.LoginProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Count > 0) + { + TreeNode tempNode = new TreeNode(); + tempNode.NodeID = ""; + tempNode.Text = ""; + newNode.Nodes.Add(tempNode); + } + } + } + } + } + #endregion + + #region 树节点复选框勾选事件 + /// + /// 树节点复选框勾选事件 + /// + /// + /// + protected void trWBS_NodeCheck(object sender, FineUIPro.TreeCheckEventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId, BLL.Const.BtnSave)) + { + Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(e.NodeID); + divisionProject.IsSelected = e.Checked; + BLL.DivisionProjectService.UpdateDivisionProject(divisionProject); + this.UpdateParentDivision(divisionProject.SuperDivisionId, e.Checked); + BindGrid(); + } + else + { + ShowNotify("您没有保存(勾选)这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + /// + /// 更新分部的选择状态 + /// + /// + private void UpdateParentDivision(string superDivisionId, bool b) + { + Model.WBS_DivisionProject superDivisionProject = BLL.DivisionProjectService.GetDivisionProjectById(superDivisionId); + if (superDivisionProject != null) + { + if (string.IsNullOrEmpty(superDivisionProject.SuperDivisionId)) + { + // if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId)) + //{ + superDivisionProject.IsSelected = b; + BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); + } + else + { + superDivisionProject.IsSelected = b; + BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); + this.UpdateParentDivision(superDivisionProject.SuperDivisionId, b); + } + } + } + #endregion + + #region Tree点击事件 + /// + /// Tree点击事件 + /// + /// + /// + protected void trWBS_NodeCommand(object sender, TreeCommandEventArgs e) + { + for (int i = 0; i < this.Grid1.Rows.Count; i++) + { + if (this.Grid1.SelectedRowIDArray.Contains(this.Grid1.Rows[i].RowID)) + { + SelectedList.Add(this.Grid1.Rows[i].RowID); + } + else + { + NoSelectedList.Add(this.Grid1.Rows[i].RowID); + } + } + string divisionProjectId = this.trWBS.SelectedNode.NodeID; + var temp = BLL.DivisionProjectService.GetDivisionProjectById(divisionProjectId); + if (temp == null) + { + return; + } + if (temp.CNProfessionalId != null && temp.CNProfessionalId == Const.CNProfessionalConstructId) + { + this.Grid1.Columns[2].Hidden = false; + this.Grid1.Columns[3].Hidden = true; + this.Grid1.Columns[4].Hidden = true; + this.Grid1.Columns[5].Hidden = false; + this.Grid1.Columns[7].Hidden = false; + this.Grid1.Columns[8].Hidden = false; + this.Grid1.Columns[9].Hidden = false; + this.Grid1.Columns[10].Hidden = false; + this.Grid1.Columns[11].Hidden = false; + this.Grid1.Columns[12].Hidden = false; + } + else + { + this.Grid1.Columns[2].Hidden = false; + this.Grid1.Columns[3].Hidden = false; + this.Grid1.Columns[4].Hidden = false; + this.Grid1.Columns[5].Hidden = true; + this.Grid1.Columns[7].Hidden = true; + this.Grid1.Columns[8].Hidden = true; + this.Grid1.Columns[9].Hidden = true; + this.Grid1.Columns[10].Hidden = true; + this.Grid1.Columns[11].Hidden = true; + this.Grid1.Columns[12].Hidden = true; + } + BindGrid(); + } + #endregion + + #region 修改关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + ShowNotify("修改成功!", MessageBoxIcon.Success); + + GetSelectTreeNode(); + } + #endregion + + #region 增加关闭窗口 + /// + /// 增加关闭窗口 + /// + /// + /// + protected void Window2_Close(object sender, WindowCloseEventArgs e) + { + ShowNotify("增加成功!", MessageBoxIcon.Success); + + GetSelectTreeNode(); + } + #endregion + + #region 关闭窗口 + /// + /// 关闭窗口 + /// + /// + /// + protected void Window3_Close(object sender, WindowCloseEventArgs e) + { + ShowNotify("保存成功!", MessageBoxIcon.Success); + BindGrid(); + } + #endregion + + /// + /// 根据选择节点获取单位工程Id + /// + /// + private string GetUnitWorkId(TreeNode node) + { + string id = string.Empty; + TreeNode parentNode = node.ParentNode; + if (parentNode != null) + { + Model.WBS_UnitWork i = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(parentNode.NodeID); + if (i != null) + { + id = i.UnitWorkId; + } + else + { + id = this.GetUnitWorkId(parentNode); + } + } + return id; + } + + + + + #region 删除 + /// + /// 删除 + /// + /// + /// + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + //var controlItemAndCycle = Funs.DB.WBS_ControlItemAndCycle.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.InitControlItemCode == Grid1.SelectedRowID); + //if (controlItemAndCycle != null) + //{ + // ShowNotify("WBS定制中已使用该数据,无法删除!", MessageBoxIcon.Warning); + //} + //else + //{ + BLL.BreakdownProjectService.DeleteBreakdown(Grid1.SelectedRowID); + BLL.LogService.AddSys_Log(this.CurrUser, Grid1.SelectedRowID, Grid1.SelectedRowID, BLL.Const.ProjectControlPointMenuId, "删除分项"); + Grid1.DataBind(); + BindGrid(); + Alert.ShowInTop("删除数据成功!", MessageBoxIcon.Success); + //} + } + #endregion + + #region 绑定数据 + /// + /// 绑定数据 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); + } + + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + + /// + /// Grid1排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"SELECT BreakdownProjectId,BreakdownCode,BreakdownName,Basis,CheckPoints,RecordAndCode,Class,FenBao,WuHuan,JianLi,YeZhu,Remark,ModelURL + FROM WBS_BreakdownProject "; + List listStr = new List(); + strSql += " where IsSelected = 1 and DivisionProjectId = @DivisionProjectId and ProjectId=@ProjectId"; + listStr.Add(new SqlParameter("@DivisionProjectId", this.trWBS.SelectedNodeID)); + listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + + Grid1.RecordCount = tb.Rows.Count; + tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + + } + #endregion + + #region 根据所给Id定位到对应分部分项 + /// + /// 根据所给Id定位到对应具体的工程类型、单位工程、子单位工程、分部、子分部、分项、子分项 + /// + private void GetSelectTreeNode() + { + string projectType = string.Empty; + string cNProfessionalId = string.Empty; + string projectTypeId = string.Empty; + string unitWorkId = string.Empty; + List list = new List(); + Model.WBS_DivisionProject divisionProject = BLL.DivisionProjectService.GetDivisionProjectById(this.hdSelectId.Text); + if (divisionProject != null) + { + list = GetDivisionProjectIds(divisionProject); + list.Add(this.hdSelectId.Text); + cNProfessionalId = GetCNProfessionalId(divisionProject); + if (cNProfessionalId == Const.CNProfessionalConstructId || cNProfessionalId == Const.CNProfessionalCVId) + { + projectTypeId = Const.CNProfessionalConstructId; + } + else + { + projectTypeId = "2"; + } + list.Add(cNProfessionalId); + unitWorkId = divisionProject.UnitWorkId; + } + else + { + cNProfessionalId = this.hdSelectId.Text; + if (cNProfessionalId == Const.CNProfessionalConstructId || cNProfessionalId == Const.CNProfessionalCVId) + { + projectTypeId = Const.CNProfessionalConstructId; + } + else + { + projectTypeId = "2"; + } + unitWorkId = this.hdUnitWorkId.Text; + } + + InitTreeMenu(); + for (int i = 0; i < trWBS.Nodes.Count; i++) + { + if (trWBS.Nodes[i].NodeID == unitWorkId) + { + trWBS.Nodes[i].Expanded = true; + trWBS.Nodes[i].Nodes.Clear(); + TreeNode newNode1 = new TreeNode(); + newNode1.Text = "建筑工程"; + newNode1.NodeID = Const.CNProfessionalConstructId; + newNode1.CommandName = "CNProfessional"; + newNode1.EnableExpandEvent = true; + newNode1.EnableClickEvent = true; + trWBS.Nodes[i].Nodes.Add(newNode1); + TreeNode newNode2 = new TreeNode(); + newNode2.Text = "安装工程"; + newNode2.NodeID = "2"; + newNode2.CommandName = "ProjectType"; + newNode2.EnableExpandEvent = true; + newNode2.EnableClickEvent = true; + trWBS.Nodes[i].Nodes.Add(newNode2); + if (!string.IsNullOrEmpty(projectTypeId)) + { + for (int j = 0; j < trWBS.Nodes[i].Nodes.Count; j++) + { + if (trWBS.Nodes[i].Nodes[j].NodeID == projectTypeId) + { + trWBS.Nodes[i].Nodes[j].Expanded = true; + if (trWBS.Nodes[i].Nodes[j].NodeID == BLL.Const.CNProfessionalConstructId) //建筑工程 + { + var divisionsCV = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId && x.IsSelected == true + orderby x.SortIndex + select x).ToList(); + if (divisionsCV.Count > 0) //建筑工程下存在土建内容 + { + TreeNode newNode3 = new TreeNode(); + newNode3.Text = "土建"; + newNode3.NodeID = BLL.Const.CNProfessionalCVId; + newNode3.CommandName = "CNProfessional"; + newNode3.EnableExpandEvent = true; + newNode3.EnableClickEvent = true; + trWBS.Nodes[i].Nodes[j].Nodes.Add(newNode3); + newNode3.Expanded = true; + var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.CNProfessionalId == BLL.Const.CNProfessionalCVId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId + orderby x.SortIndex + select x).ToList(); + foreach (var q in divisions) + { + TreeNode newNode4 = new TreeNode(); + newNode4.Text = q.DivisionName; + newNode4.NodeID = q.DivisionProjectId; + newNode4.CommandName = "DivisionProject"; + newNode4.EnableExpandEvent = true; + newNode4.EnableClickEvent = true; + if (q.IsSelected == true) + { + newNode4.Checked = true; + } + newNode3.Nodes.Add(newNode4); + var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(q.DivisionProjectId)) + { + newNode4.Expanded = true; + foreach (var division1 in division1s) + { + TreeNode newNode5 = new TreeNode(); + newNode5.Text = division1.DivisionName; + newNode5.NodeID = division1.DivisionProjectId; + newNode5.CommandName = "DivisionProject"; + newNode5.EnableExpandEvent = true; + newNode5.EnableClickEvent = true; + newNode4.Nodes.Add(newNode5); + var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division1.DivisionProjectId)) + { + newNode5.Expanded = true; + foreach (var division2 in division2s) + { + TreeNode newNode6 = new TreeNode(); + newNode6.Text = division2.DivisionName; + newNode6.NodeID = division2.DivisionProjectId; + newNode6.CommandName = "DivisionProject"; + newNode6.EnableExpandEvent = true; + newNode6.EnableClickEvent = true; + newNode5.Nodes.Add(newNode6); + var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division2.DivisionProjectId)) + { + newNode6.Expanded = true; + } + else + { + if (division3s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode6.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division2s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode5.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division1s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode4.Nodes.Add(tempNode2); + } + } + } + } + else + { + var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.CNProfessionalId == BLL.Const.CNProfessionalConstructId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId + orderby x.SortIndex + select x).ToList(); + foreach (var q in divisions) + { + TreeNode newNode4 = new TreeNode(); + newNode4.Text = q.DivisionName; + newNode4.NodeID = q.DivisionProjectId; + newNode4.CommandName = "DivisionProject"; + newNode4.EnableExpandEvent = true; + newNode4.EnableClickEvent = true; + trWBS.Nodes[i].Nodes[j].Nodes.Add(newNode4); + if (q.IsSelected == true) + { + newNode4.Checked = true; + } + var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(q.DivisionProjectId)) + { + newNode4.Expanded = true; + foreach (var division1 in division1s) + { + TreeNode newNode5 = new TreeNode(); + newNode5.Text = division1.DivisionName; + newNode5.NodeID = division1.DivisionProjectId; + newNode5.CommandName = "DivisionProject"; + newNode5.EnableExpandEvent = true; + newNode5.EnableClickEvent = true; + newNode4.Nodes.Add(newNode5); + var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division1.DivisionProjectId)) + { + newNode5.Expanded = true; + foreach (var division2 in division2s) + { + TreeNode newNode6 = new TreeNode(); + newNode6.Text = division2.DivisionName; + newNode6.NodeID = division2.DivisionProjectId; + newNode6.CommandName = "DivisionProject"; + newNode6.EnableExpandEvent = true; + newNode6.EnableClickEvent = true; + newNode5.Nodes.Add(newNode6); + var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division2.DivisionProjectId)) + { + newNode6.Expanded = true; + } + else + { + if (division3s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode6.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division2s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode5.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division1s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode4.Nodes.Add(tempNode2); + } + } + } + } + } + else //安装工程 + { + var cNProfessional = (from x in BLL.Funs.DB.Base_CNProfessional where x.CNProfessionalId != Const.CNProfessionalConstructId && x.CNProfessionalId != Const.CNProfessionalCVId orderby x.SortIndex select x).ToList(); + foreach (var c in cNProfessional) + { + TreeNode newCNProfessionalNode = new TreeNode(); + newCNProfessionalNode.Text = c.ProfessionalName; + newCNProfessionalNode.NodeID = c.CNProfessionalId; + newCNProfessionalNode.CommandName = "CNProfessional"; + newCNProfessionalNode.EnableExpandEvent = true; + newCNProfessionalNode.EnableClickEvent = true; + trWBS.Nodes[i].Nodes[j].Nodes.Add(newCNProfessionalNode); + if (c.CNProfessionalId == cNProfessionalId) + { + newCNProfessionalNode.Expanded = true; + var divisions = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.CNProfessionalId == c.CNProfessionalId && x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == null && x.UnitWorkId == unitWorkId + orderby x.SortIndex + select x).ToList(); + foreach (var q in divisions) + { + TreeNode newNode4 = new TreeNode(); + newNode4.Text = q.DivisionName; + newNode4.NodeID = q.DivisionProjectId; + newNode4.CommandName = "DivisionProject"; + newNode4.EnableExpandEvent = true; + newNode4.EnableClickEvent = true; + newCNProfessionalNode.Nodes.Add(newNode4); + if (q.IsSelected == true) + { + newNode4.Checked = true; + } + var division1s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == q.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(q.DivisionProjectId)) + { + newNode4.Expanded = true; + foreach (var division1 in division1s) + { + TreeNode newNode5 = new TreeNode(); + newNode5.Text = division1.DivisionName; + newNode5.NodeID = division1.DivisionProjectId; + newNode5.CommandName = "DivisionProject"; + newNode5.EnableExpandEvent = true; + newNode5.EnableClickEvent = true; + newNode4.Nodes.Add(newNode5); + var division2s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division1.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division1.DivisionProjectId)) + { + newNode5.Expanded = true; + foreach (var division2 in division2s) + { + TreeNode newNode6 = new TreeNode(); + newNode6.Text = division2.DivisionName; + newNode6.NodeID = division2.DivisionProjectId; + newNode6.CommandName = "DivisionProject"; + newNode6.EnableExpandEvent = true; + newNode6.EnableClickEvent = true; + newNode5.Nodes.Add(newNode6); + var division3s = (from x in BLL.Funs.DB.WBS_DivisionProject + where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperDivisionId == division2.DivisionProjectId + orderby x.SortIndex + select x).ToList(); + if (list.Contains(division2.DivisionProjectId)) + { + newNode6.Expanded = true; + } + else + { + if (division3s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode6.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division2s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode5.Nodes.Add(tempNode2); + } + } + } + } + else + { + if (division1s.Count > 0) + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newNode4.Nodes.Add(tempNode2); + } + } + } + } + else + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + newCNProfessionalNode.Nodes.Add(tempNode2); + } + } + } + } + else + { + TreeNode tempNode2 = new TreeNode(); + tempNode2.NodeID = ""; + tempNode2.Text = ""; + trWBS.Nodes[i].Nodes[j].Nodes.Add(tempNode2); + } + } + } + } + else + { + TreeNode tempNode1 = new TreeNode(); + tempNode1.NodeID = ""; + tempNode1.Text = ""; + trWBS.Nodes[i].Nodes.Add(tempNode1); + } + } + this.trWBS.SelectedNodeID = this.hdSelectId.Text; + BindGrid(); + } + + private string GetCNProfessionalId(Model.WBS_DivisionProject divisionProject) + { + string id = string.Empty; + if (divisionProject != null && !string.IsNullOrEmpty(divisionProject.CNProfessionalId)) + { + id = divisionProject.CNProfessionalId; + } + else + { + Model.WBS_DivisionProject superDivisionProject = BLL.DivisionProjectService.GetDivisionProjectById(divisionProject.SuperDivisionId); + id = GetCNProfessionalId(superDivisionProject); + } + return id; + } + + private List GetDivisionProjectIds(Model.WBS_DivisionProject divisionProject) + { + List list = new List(); + if (divisionProject != null && !string.IsNullOrEmpty(divisionProject.SuperDivisionId)) + { + list.Add(divisionProject.SuperDivisionId); + Model.WBS_DivisionProject superDivisionProject = BLL.DivisionProjectService.GetDivisionProjectById(divisionProject.SuperDivisionId); + list.AddRange(GetDivisionProjectIds(superDivisionProject)); + } + return list; + } + #endregion + + #region 行点击事件 + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string id = e.RowID; + if (e.CommandName.Equals("download")) + { + string menuId = Const.ProjectControlPointMenuId; + PageContext.RegisterStartupScript(Windowtt.GetShowReference( + String.Format("../../AttachFile/webuploader.aspx?type=0&source=1&toKeyId={0}&path=FileUpload/BreakdownProject&menuId={1}", id, menuId))); + } + } + #endregion + + + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == "0") + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectControlPointMenuId); + if (buttonList.Count() > 0) + { + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.designer.cs new file mode 100644 index 00000000..45c49f08 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.designer.cs @@ -0,0 +1,134 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.WBS +{ + + + public partial class ProjectControlPointFile + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// trWBS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Tree trWBS; + + /// + /// hdSelectId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdSelectId; + + /// + /// hdUnitWorkId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdUnitWorkId; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2; + + /// + /// ToolbarText2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText2; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Windowtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Windowtt; + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..02a6c9bc 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,416 @@ + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2157 +出错时间:06/19/2023 13:38:58 +出错时间:06/19/2023 13:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2022 +出错时间:06/19/2023 13:38:58 +出错时间:06/19/2023 13:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1918 +出错时间:06/19/2023 13:38:58 +出错时间:06/19/2023 13:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1860 +出错时间:06/19/2023 13:38:58 +出错时间:06/19/2023 13:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2157 +出错时间:06/19/2023 15:38:58 +出错时间:06/19/2023 15:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2022 +出错时间:06/19/2023 15:38:58 +出错时间:06/19/2023 15:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1918 +出错时间:06/19/2023 15:38:58 +出错时间:06/19/2023 15:38:58 + + +错误信息开始=====> +错误类型:ArgumentException +错误信息:提供的 URI 方案“http”无效,应为“https”。 +参数名: via +错误堆栈: + 在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via) + 在 System.ServiceModel.ChannelFactory`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannel() + 在 System.ServiceModel.ClientBase`1.CreateChannelInternal() + 在 System.ServiceModel.ClientBase`1.get_Channel() + 在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1860 +出错时间:06/19/2023 15:38:58 +出错时间:06/19/2023 15:38:58 + + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add) + 在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion) + 在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context) + 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() + 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step) + 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +出错时间:06/23/2023 15:40:21 +出错文件:http://localhost:9733/res.axd?font=lib.iconfont.iconfont.woff&t=638137763580000000 +IP地址:::1 + +出错时间:06/23/2023 15:40:21 + + +错误信息开始=====> +错误类型:SqlException +错误信息:INSERT 语句与 FOREIGN KEY 约束"FK_Solution_LargerHazardListItem_WBS_WorkPackage"冲突。该冲突发生于数据库"SGGLDB_WH",表"dbo.WBS_WorkPackage", column 'WorkPackageId'。 +语句已终止。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicInsert(TrackedObject item) + 在 System.Data.Linq.ChangeDirector.StandardChangeDirector.Insert(TrackedObject item) + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.HSSE.Solution.ExpertArgumentListEdit.SaveData(String type) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\HSSE\Solution\ExpertArgumentListEdit.aspx.cs:行号 145 + 在 FineUIPro.Web.HSSE.Solution.ExpertArgumentListEdit.btnSave_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\HSSE\Solution\ExpertArgumentListEdit.aspx.cs:行号 92 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/25/2023 14:47:25 +出错文件:http://localhost:9733/HSSE/Solution/ExpertArgumentListEdit.aspx +IP地址:::1 +操作人员:JT + +出错时间:06/25/2023 14:47:25 + + +错误信息开始=====> +错误类型:SqlException +错误信息:INSERT 语句与 FOREIGN KEY 约束"FK_Solution_LargerHazardListItem_WBS_WorkPackage"冲突。该冲突发生于数据库"SGGLDB_WH",表"dbo.WBS_WorkPackage", column 'WorkPackageId'。 +语句已终止。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.ChangeDirector.StandardChangeDirector.DynamicInsert(TrackedObject item) + 在 System.Data.Linq.ChangeDirector.StandardChangeDirector.Insert(TrackedObject item) + 在 System.Data.Linq.ChangeProcessor.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges(ConflictMode failureMode) + 在 System.Data.Linq.DataContext.SubmitChanges() + 在 FineUIPro.Web.HSSE.Solution.ExpertArgumentListEdit.SaveData(String type) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\HSSE\Solution\ExpertArgumentListEdit.aspx.cs:行号 145 + 在 FineUIPro.Web.HSSE.Solution.ExpertArgumentListEdit.btnSave_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\HSSE\Solution\ExpertArgumentListEdit.aspx.cs:行号 92 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/25/2023 14:47:27 +出错文件:http://localhost:9733/HSSE/Solution/ExpertArgumentListEdit.aspx +IP地址:::1 +操作人员:JT + +出错时间:06/25/2023 14:47:27 + + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000),@HazardValue nvarchar(1))SELECT * FRO' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.DataShow.HiddenRectificationItem.BindGrid() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\DataShow\HiddenRectificationItem.aspx.cs:行号 97 + 在 FineUIPro.Web.DataShow.HiddenRectificationItem.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\DataShow\HiddenRectificationItem.aspx.cs:行号 57 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/25/2023 15:31:08 +出错文件:http://localhost:9733/DataShow/HiddenRectificationItem.aspx +IP地址:::1 + +出错时间:06/25/2023 15:31:09 + + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@ProjectId nvarchar(4000))SELECT jointInfo.JOT_ID, + ' 需要参数 '@ProjectId',但未提供该参数。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.DataShow.HJGLWeldingItem.BindGrid() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\DataShow\HJGLWeldingItem.aspx.cs:行号 120 + 在 FineUIPro.Web.DataShow.HJGLWeldingItem.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\DataShow\HJGLWeldingItem.aspx.cs:行号 29 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/25/2023 15:32:29 +出错文件:http://localhost:9733/DataShow/HJGLWeldingItem.aspx +IP地址:::1 + +出错时间:06/25/2023 15:32:29 + + +错误信息开始=====> +错误类型:SqlException +错误信息:将截断字符串或二进制数据。 +语句已终止。 +错误堆栈: + 在 FineUIPro.Web.CQMS.Comprehensive.InspectionPersonDataIn.ImportXlsToData2(String fileName) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionPersonDataIn.aspx.cs:行号 392 + 在 FineUIPro.Web.CQMS.Comprehensive.InspectionPersonDataIn.btnImport_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionPersonDataIn.aspx.cs:行号 337 + 在 FineUIPro.Button.OnClick(EventArgs e) + 在 (Button , EventArgs ) + 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/25/2023 17:30:28 +出错文件:http://localhost:9733/CQMS/Comprehensive/InspectionPersonDataIn.aspx +IP地址:::1 +操作人员:JT + +出错时间:06/25/2023 17:30:28 + + +错误信息开始=====> +错误类型:FormatException +错误信息:该字符串未被识别为有效的 DateTime。 +错误堆栈: + 在 System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) + 在 System.DateTime.Parse(String s) + 在 FineUIPro.Web.Comprehensive.InspectionMachine.Grid1_RowDataBound(Object sender, GridRowEventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionMachine.aspx.cs:行号 110 + 在 FineUIPro.Grid.OnRowDataBound(GridRowEventArgs e) + 在 (Grid , GridRowEventArgs ) + 在 FineUIPro.Grid.JKAqhrYRKGjUrputGryVTdIrcyJN(Int32 , Object ) + 在 (Grid , Int32 , Object ) + 在 FineUIPro.Grid.BCddVmyfIadUytlhvgnchfKxYmAe(DataTable , Boolean ) + 在 (Grid , DataTable , Boolean ) + 在 FineUIPro.Grid.DataBind(Boolean keepCurrentData) + 在 (Grid , Boolean ) + 在 FineUIPro.Grid.DataBind() + 在 FineUIPro.Web.Comprehensive.InspectionMachine.BindGrid() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionMachine.aspx.cs:行号 64 + 在 FineUIPro.Web.Comprehensive.InspectionMachine.Page_Load(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\Comprehensive\InspectionMachine.aspx.cs:行号 25 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:06/26/2023 11:10:07 +出错文件:http://localhost:9733/CQMS/Comprehensive/InspectionMachine.aspx +IP地址:::1 +操作人员:JT + +出错时间:06/26/2023 11:10:07 + diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls index 528af38d..39a206c2 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设备材料报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index ab53e2c5..ed2b276f 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -493,6 +493,7 @@ + @@ -7874,6 +7875,13 @@ ProjectControlPoint.aspx + + ProjectControlPointFile.aspx + ASPXCodeBehind + + + ProjectControlPointFile.aspx + WorkPackageInitEdit.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx index 2dda71fc..a99b1cc3 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx @@ -31,10 +31,10 @@ LabelAlign="right"> - - @@ -63,10 +63,6 @@ FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="整理时间" HeaderTextAlign="Center" TextAlign="Center"> - - diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx.cs index 8a4879b2..ddaf4f72 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentList.aspx.cs @@ -148,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Solution var getRecord = BLL.ExpertArgumentService.GetLargerHazardListById(Grid1.SelectedRowID); if (getRecord != null) { - if (!this.btnMenuModify.Hidden && (getRecord.States == BLL.Const.State_0 || string.IsNullOrEmpty(getRecord.States))) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 + if (!this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ExpertArgumentListEdit.aspx?LargerHazardListId={0}", getRecord.LargerHazardListId, "查看 - "))); } diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx index b2fffaaa..544f003a 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx @@ -32,7 +32,7 @@ - + @@ -74,13 +74,10 @@ - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.cs index 3c2756d8..6bbc3c66 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.cs @@ -81,19 +81,6 @@ namespace FineUIPro.Web.HSSE.Solution } } - #region 提交按钮 - /// - /// 提交按钮 - /// - /// - /// - protected void btnSubmit_Click(object sender, EventArgs e) - { - this.SaveData(BLL.Const.BtnSubmit); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - #endregion - #region 保存按钮 /// /// 保存按钮 @@ -123,13 +110,8 @@ namespace FineUIPro.Web.HSSE.Solution VersionNo = this.txtVersionNo.Text.Trim(), RecardManId = this.CurrUser.UserId, ////单据状态 - States = BLL.Const.State_0, + States = BLL.Const.State_1, }; - - if (type == BLL.Const.BtnSubmit) - { - newRecord.States = BLL.Const.State_1; - } if (!string.IsNullOrEmpty(this.LargerHazardListId)) { BLL.ExpertArgumentService.UpdateLargerHazardList(newRecord); diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.designer.cs index a33035d8..a723f008 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEdit.aspx.designer.cs @@ -129,15 +129,6 @@ namespace FineUIPro.Web.HSSE.Solution { /// protected global::FineUIPro.Button btnSave; - /// - /// btnSubmit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSubmit; - /// /// btnClose 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx index b744a115..743ea161 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx @@ -17,7 +17,7 @@ Required="true" ShowRedStar="true"> + Required="true" ShowRedStar="true"> @@ -57,10 +57,10 @@ - - + diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs index 2859dbf7..10244cb8 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListEditItem.aspx.cs @@ -55,6 +55,7 @@ namespace FineUIPro.Web.HSSE.Solution BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False"); //施工单位 BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); + BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList2(drpWorkPackageId, true); this.LargerHazardListId = Request.Params["LargerHazardListId"]; this.LargerHazardListItemId = Request.Params["LargerHazardListItemId"]; @@ -65,11 +66,10 @@ namespace FineUIPro.Web.HSSE.Solution if (!string.IsNullOrEmpty(getItem.UnitWorkId)) { this.drpUnitWorkId.SelectedValue = getItem.UnitWorkId; - BLL.WorkPackageService.InitWorkPackagesDropDownListByUnitWorkId(this.drpWorkPackageId, this.drpUnitWorkId.SelectedValue, true); - if (!string.IsNullOrEmpty(getItem.WorkPackageId)) - { - this.drpWorkPackageId.SelectedValue = getItem.WorkPackageId; - } + } + if (!string.IsNullOrEmpty(getItem.WorkPackageId)) + { + this.drpWorkPackageId.SelectedValue = getItem.WorkPackageId; } this.txtWorkPackageSize.Text = getItem.WorkPackageSize; this.txtExpectedStartTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getItem.ExpectedStartTime); @@ -128,11 +128,5 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } #endregion - - protected void drpUnitWorkId_SelectedIndexChanged(object sender, EventArgs e) - { - this.drpWorkPackageId.Items.Clear(); - BLL.WorkPackageService.InitWorkPackagesDropDownListByUnitWorkId(this.drpWorkPackageId, this.drpUnitWorkId.SelectedValue, true); - } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListView.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListView.aspx index 9ed6c1bb..8e1526de 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/ExpertArgumentListView.aspx @@ -19,7 +19,7 @@ - + @@ -66,10 +66,10 @@ - - diff --git a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml index 64ba8b9a..b46b8a7e 100644 --- a/SGGL/FineUIPro.Web/common/Menu_CQMS.xml +++ b/SGGL/FineUIPro.Web/common/Menu_CQMS.xml @@ -3,6 +3,7 @@ + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 616ea9ae..43d868f4 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -17743,7 +17743,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_CNProfessional", Storage="_Base_DesignProfessional", ThisKey="CNProfessionalId", OtherKey="ToCN", DeleteRule="NO ACTION")] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_DesignProfessional", Storage="_Base_DesignProfessional", ThisKey="CNProfessionalId", OtherKey="ToCN", DeleteRule="NO ACTION")] public EntitySet Base_DesignProfessional { get @@ -19273,7 +19273,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="ToCN", OtherKey="CNProfessionalId", IsForeignKey=true)] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_DesignProfessional", Storage="_Base_CNProfessional", ThisKey="ToCN", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { get @@ -308523,8 +308523,6 @@ namespace Model private EntityRef _WBS_UnitWork; - private EntityRef _WBS_WorkPackage; - #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -308556,7 +308554,6 @@ namespace Model this._Base_Unit = default(EntityRef); this._Solution_LargerHazardList = default(EntityRef); this._WBS_UnitWork = default(EntityRef); - this._WBS_WorkPackage = default(EntityRef); OnCreated(); } @@ -308659,10 +308656,6 @@ namespace Model { if ((this._WorkPackageId != value)) { - if (this._WBS_WorkPackage.HasLoadedOrAssignedValue) - { - throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); - } this.OnWorkPackageIdChanging(value); this.SendPropertyChanging(); this._WorkPackageId = value; @@ -308878,40 +308871,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_LargerHazardListItem_WBS_WorkPackage", Storage="_WBS_WorkPackage", ThisKey="WorkPackageId", OtherKey="WorkPackageId", IsForeignKey=true)] - public WBS_WorkPackage WBS_WorkPackage - { - get - { - return this._WBS_WorkPackage.Entity; - } - set - { - WBS_WorkPackage previousValue = this._WBS_WorkPackage.Entity; - if (((previousValue != value) - || (this._WBS_WorkPackage.HasLoadedOrAssignedValue == false))) - { - this.SendPropertyChanging(); - if ((previousValue != null)) - { - this._WBS_WorkPackage.Entity = null; - previousValue.Solution_LargerHazardListItem.Remove(this); - } - this._WBS_WorkPackage.Entity = value; - if ((value != null)) - { - value.Solution_LargerHazardListItem.Add(this); - this._WorkPackageId = value.WorkPackageId; - } - else - { - this._WorkPackageId = default(string); - } - this.SendPropertyChanged("WBS_WorkPackage"); - } - } - } - public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -386981,7 +386940,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(500)")] public string PackageContent { get @@ -405992,8 +405951,6 @@ namespace Model private System.Nullable _Costs; - private EntitySet _Solution_LargerHazardListItem; - private EntitySet _WBS_ControlItemAndCycle; private EntityRef _WBS_UnitWork; @@ -406040,7 +405997,6 @@ namespace Model public WBS_WorkPackage() { - this._Solution_LargerHazardListItem = new EntitySet(new Action(this.attach_Solution_LargerHazardListItem), new Action(this.detach_Solution_LargerHazardListItem)); this._WBS_ControlItemAndCycle = new EntitySet(new Action(this.attach_WBS_ControlItemAndCycle), new Action(this.detach_WBS_ControlItemAndCycle)); this._WBS_UnitWork = default(EntityRef); OnCreated(); @@ -406390,19 +406346,6 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Solution_LargerHazardListItem_WBS_WorkPackage", Storage="_Solution_LargerHazardListItem", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")] - public EntitySet Solution_LargerHazardListItem - { - get - { - return this._Solution_LargerHazardListItem; - } - set - { - this._Solution_LargerHazardListItem.Assign(value); - } - } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_ControlItemAndCycle", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")] public EntitySet WBS_ControlItemAndCycle { @@ -406470,18 +406413,6 @@ namespace Model } } - private void attach_Solution_LargerHazardListItem(Solution_LargerHazardListItem entity) - { - this.SendPropertyChanging(); - entity.WBS_WorkPackage = this; - } - - private void detach_Solution_LargerHazardListItem(Solution_LargerHazardListItem entity) - { - this.SendPropertyChanging(); - entity.WBS_WorkPackage = null; - } - private void attach_WBS_ControlItemAndCycle(WBS_ControlItemAndCycle entity) { this.SendPropertyChanging();