修改质量综合管理导入及页面显示

This commit is contained in:
高飞 2023-06-26 11:16:55 +08:00
parent 966843abbe
commit f1c55719b3
35 changed files with 2194 additions and 501 deletions

1
.gitignore vendored
View File

@ -9,3 +9,4 @@
/SGGL/FineUIPro.Web/FileUpload/DataBase/ConstructionStandardProject/2023-05 /SGGL/FineUIPro.Web/FileUpload/DataBase/ConstructionStandardProject/2023-05
/SGGL/FineUIPro.Web/FileUpload/CQMS/InspectionEquipment/2023-05 /SGGL/FineUIPro.Web/FileUpload/CQMS/InspectionEquipment/2023-05
/SGGL/FineUIPro.Web/FileUpload/CQMS /SGGL/FineUIPro.Web/FileUpload/CQMS
/SGGL/FineUIPro.Web/FileUpload/LargerHazard/2023-06

View File

@ -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

View File

@ -97,6 +97,34 @@ namespace BLL
} }
} }
/// <summary>
/// 类型表下拉框
/// </summary>
/// <param name="dropName">下拉框名字</param>
/// <param name="isShowPlease">是否显示请选择</param>
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);
}
}
/// <summary>
/// 获取类别下拉项
/// </summary>
/// <returns></returns>
public static List<Model.Base_SpecialSchemeType> 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) public static Model.Base_SpecialSchemeType GetSpecialSchemeTypeByName(string name)
{ {
return Funs.DB.Base_SpecialSchemeType.FirstOrDefault(e => e.SpecialSchemeTypeName == name); return Funs.DB.Base_SpecialSchemeType.FirstOrDefault(e => e.SpecialSchemeTypeName == name);

View File

@ -69,6 +69,7 @@ namespace BLL
newLargerHazard.ExpectedTime = largerHazard.ExpectedTime; newLargerHazard.ExpectedTime = largerHazard.ExpectedTime;
newLargerHazard.IsArgument = largerHazard.IsArgument; newLargerHazard.IsArgument = largerHazard.IsArgument;
newLargerHazard.Remark = largerHazard.Remark; newLargerHazard.Remark = largerHazard.Remark;
newLargerHazard.RecordTime = largerHazard.RecordTime;
newLargerHazard.States = largerHazard.States; newLargerHazard.States = largerHazard.States;
newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum; newLargerHazard.TrainPersonNum = largerHazard.TrainPersonNum;
newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard; newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard;

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 10); AddDatasetToSQL(ds.Tables[0], 10);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -303,6 +301,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -322,21 +322,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -346,11 +346,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 4); AddDatasetToSQL2(ds.Tables[0], 4);
} }

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13); AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -324,6 +322,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -343,21 +343,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -367,11 +367,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13); AddDatasetToSQL2(ds.Tables[0], 13);
} }

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 12); AddDatasetToSQL(ds.Tables[0], 12);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -303,6 +300,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -322,21 +321,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -346,11 +345,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 12); AddDatasetToSQL2(ds.Tables[0], 12);
} }

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 11); AddDatasetToSQL(ds.Tables[0], 11);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -321,6 +318,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -340,21 +339,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -364,11 +363,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 11); AddDatasetToSQL2(ds.Tables[0], 11);
} }

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13); AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -194,13 +191,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|"; result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|";
} }
string row3 = pds.Rows[i][3].ToString(); string row2 = pds.Rows[i][2].ToString();
if (!string.IsNullOrEmpty(row3)) 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) if (cn == null)
{ {
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row2 + "]不存在!" + "|";
} }
} }
@ -240,7 +237,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else else
{ {
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|"; result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|";
} }
} }
@ -298,6 +295,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -317,21 +316,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -341,11 +340,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13); AddDatasetToSQL2(ds.Tables[0], 13);
} }
@ -394,7 +393,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
if (unitInfo != null && !string.IsNullOrEmpty(row0)) if (unitInfo != null && !string.IsNullOrEmpty(row0))
{ {
oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId 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(); ).FirstOrDefault();
if (oldViewInfo == null) if (oldViewInfo == null)
{ {
@ -402,11 +401,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.ProjectId = this.CurrUser.LoginProjectId; Ins.ProjectId = this.CurrUser.LoginProjectId;
Ins.UnitId = unitInfo.UnitId; Ins.UnitId = unitInfo.UnitId;
Ins.InspectionCode = pds.Rows[i][1].ToString().Trim(); Ins.InspectionCode = pds.Rows[i][1].ToString().Trim();
Ins.EquipmentNO = pds.Rows[i][2].ToString().Trim(); if (!string.IsNullOrEmpty(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; 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.InspectionName = pds.Rows[i][4].ToString().Trim();
Ins.Specifications = pds.Rows[i][5].ToString().Trim(); Ins.Specifications = pds.Rows[i][5].ToString().Trim();
Ins.Supplier = pds.Rows[i][6].ToString().Trim(); Ins.Supplier = pds.Rows[i][6].ToString().Trim();
@ -434,7 +433,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
else else
{ {
result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|"; result += (i + 2).ToString() + "," + "报验单位" + "," + "[" + row0 + "]不存在!" + "|";
} }
} }

View File

@ -42,8 +42,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
LoadAuditSelect(); LoadAuditSelect();
this.agree.Hidden = true; this.agree.Hidden = true;
this.options.Hidden = true; this.options.Hidden = true;
this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"]; this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"];
var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId); var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId);
if (inspectionEquipment != null) if (inspectionEquipment != null)

View File

@ -6,6 +6,18 @@
<head runat="server"> <head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title></title> <title></title>
<style type="text/css">
.f-grid-row.Red {
background-color: red;
}
.f-grid-row.Yellow {
background-color: yellow;
}
.LabelColor {
color: Red;
font-size: small;
}
</style>
</head> </head>
<body> <body>
<form id="form1" runat="server"> <form id="form1" runat="server">
@ -15,7 +27,7 @@
<Items> <Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="机具报验" EnableCollapse="true" <f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="机具报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="InspectionMachineId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="InspectionMachineId" AllowSorting="true" SortField="InspectionMachineCode" runat="server" BoxFlex="1" DataKeyNames="InspectionMachineId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="InspectionMachineId" AllowSorting="true" SortField="InspectionMachineCode"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnRowDataBound="Grid1_RowDataBound"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars> <Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left"> <f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">

View File

@ -100,6 +100,29 @@ namespace FineUIPro.Web.Comprehensive
} }
#endregion #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 #region
/// <summary> /// <summary>
/// 查询 /// 查询

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13); AddDatasetToSQL(ds.Tables[0], 13);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -352,6 +349,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -371,21 +370,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -395,11 +394,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13); AddDatasetToSQL2(ds.Tables[0], 13);
} }

View File

@ -51,8 +51,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.agree.Hidden = true; this.agree.Hidden = true;
this.options.Hidden = true; this.options.Hidden = true;
this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
this.InspectionMachineId = Request.Params["InspectionMachineId"]; this.InspectionMachineId = Request.Params["InspectionMachineId"];
Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId); Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId);
if (inspectionMachine != null) if (inspectionMachine != null)

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,13 +120,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 13); AddDatasetToSQL(ds.Tables[0], 12);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
} }
catch (Exception exc) catch (Exception exc)
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -202,23 +199,36 @@ namespace FineUIPro.Web.CQMS.Comprehensive
result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|";
} }
string row4 = pds.Rows[i][4].ToString(); string row3 = pds.Rows[i][3].ToString();
if (!string.IsNullOrEmpty(row4)) 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) if (cn == null)
{ {
result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row4 + "]不存在!" + "|"; result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|";
} }
} }
string row5 = pds.Rows[i][5].ToString(); string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row5)) 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) 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) 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)) if (!string.IsNullOrEmpty(row9))
{ {
try if (row9 != "是" && row9 != "否")
{ {
DateTime date = Convert.ToDateTime(row9.Trim()); result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|";
}
catch (Exception)
{
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 (!string.IsNullOrEmpty(row10))
{
if (row10 != "是" && row10 != "否")
{
result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|";
}
}
string row11 = pds.Rows[i][11].ToString();
if (!string.IsNullOrEmpty(row11))
{ {
try try
{ {
DateTime date = Convert.ToDateTime(row11.Trim()); DateTime date = Convert.ToDateTime(row10.Trim());
} }
catch (Exception) 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("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -355,21 +354,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -379,13 +378,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 13); AddDatasetToSQL2(ds.Tables[0], 12);
} }
catch (Exception ex) catch (Exception ex)
{ {
@ -443,45 +442,46 @@ namespace FineUIPro.Web.CQMS.Comprehensive
Ins.UnitId = unitInfo.UnitId; Ins.UnitId = unitInfo.UnitId;
Ins.InspectionPersonCode = pds.Rows[i][1].ToString().Trim(); Ins.InspectionPersonCode = pds.Rows[i][1].ToString().Trim();
Ins.PersonName = pds.Rows[i][2].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())) 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())) 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; Ins.Remark = pds.Rows[i][11].ToString().Trim();
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.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson));
Ins.CompileMan = this.CurrUser.UserId; Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date; Ins.CompileDate = DateTime.Now.Date;
Ins.IsTrain = true;
BLL.InspectionPersonService.AddInspectionPerson(Ins); BLL.InspectionPersonService.AddInspectionPerson(Ins);
if (pds.Rows[i][4].ToString().Trim() == "焊工") if (pds.Rows[i][4].ToString().Trim() == "焊工")
{ {
Model.BS_Welder welder = new Model.BS_Welder(); Model.BS_Welder welder = new Model.BS_Welder();
welder.WED_Unit = Ins.UnitId; welder.WED_Unit = Ins.UnitId;
welder.WED_Name = Ins.PersonName; 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.LimitDate = Ins.ValidityDate;
welder.LeaveDate = Ins.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); welder.LeaveDate = Ins.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString());
welder.PostDate = Ins.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); welder.PostDate = Ins.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString());

View File

@ -54,8 +54,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
this.agree.Hidden = true; this.agree.Hidden = true;
this.options.Hidden = true; this.options.Hidden = true;
this.btnSave.Hidden = true;
this.btnSubmit.Hidden = true;
this.InspectionPersonId = Request.Params["InspectionPersonId"]; this.InspectionPersonId = Request.Params["InspectionPersonId"];
Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId); Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId);
if (inspectionPerson != null) if (inspectionPerson != null)

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 10); AddDatasetToSQL(ds.Tables[0], 10);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -318,6 +315,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -337,21 +336,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -361,11 +360,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 10); AddDatasetToSQL2(ds.Tables[0], 10);
} }

View File

@ -96,22 +96,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -121,11 +120,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 10); AddDatasetToSQL(ds.Tables[0], 10);
hdCheckResult.Text = "1"; hdCheckResult.Text = "1";
@ -138,8 +137,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
finally finally
{ {
conn.Close();
conn.Dispose();
} }
} }
#endregion #endregion
@ -295,6 +292,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive
string rootPath = Server.MapPath("~/"); string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty; hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else
{ {
@ -314,21 +313,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive
/// <param name="filename">Excel文件路径名</param> /// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName) 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 try
{ {
//打开连接 string oleDBConnString = String.Empty;
if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
{ oleDBConnString += "Data Source=";
conn.Open(); oleDBConnString += fileName;
} oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null; OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable(); DataTable m_tableName = new DataTable();
DataSet ds = new DataSet(); 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) if (m_tableName != null && m_tableName.Rows.Count > 0)
{ {
@ -338,11 +337,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive
} }
string sqlMaster; string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose(); oleAdMaster.Dispose();
conn.Close(); oleDBConn.Close();
conn.Dispose(); oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 4); 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 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 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 where x.ProjectId == this.CurrUser.LoginProjectId
select x; select x;
for (int i = 0; i < ir; i++) 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) if (oldViewInfo == null)
{ {
Model.Comprehensive_DesignChangeOrder Ins = new Model.Comprehensive_DesignChangeOrder(); Model.Comprehensive_SiteVisaManagement Ins = new Model.Comprehensive_SiteVisaManagement();
Ins.ProjectId = this.CurrUser.LoginProjectId; Ins.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) 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;
} }
Ins.VisaCode = pds.Rows[i][1].ToString().Trim();
if (!string.IsNullOrEmpty(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())) 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())) 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());
} }
Ins.SignMan = pds.Rows[i][7].ToString().Trim();
if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) Ins.AuditMan = pds.Rows[i][8].ToString().Trim();
{ Ins.Remark = pds.Rows[i][9].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.CompileMan = this.CurrUser.UserId; Ins.CompileMan = this.CurrUser.UserId;
Ins.CompileDate = DateTime.Now.Date; Ins.Status = BLL.Const.Comprehensive_Compile;
BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins); Ins.VisaId = SQLHelper.GetNewID();
BLL.SiteVisaManagementService.AddSiteVisaManagement(Ins);
} }
} }
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
else else

View File

@ -365,9 +365,25 @@ namespace FineUIPro.Web.CQMS.WBS
{ {
// if (!string.IsNullOrEmpty(superDivisionProject.CNProfessionalId)) // 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; superDivisionProject.IsSelected = b;
BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject); BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject);
} }
}
else
{
superDivisionProject.IsSelected = b;
BLL.DivisionProjectService.UpdateDivisionProject(superDivisionProject);
}
}
else else
{ {
superDivisionProject.IsSelected = b; superDivisionProject.IsSelected = b;

View File

@ -0,0 +1,151 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectControlPointFile.aspx.cs" Inherits="FineUIPro.Web.CQMS.WBS.ProjectControlPointFile" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>现场控制点裁剪</title>
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
<style>
.f-grid-row .f-grid-cell-inner {
white-space: normal;
word-break: break-all;
}
.f-grid-colheader-text {
white-space: normal;
word-break: break-all;
}
</style>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" CssClass="blockpanel" Margin="5px" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true" EnableCollapse="true" Layout="Fit"
RegionPercent="20%" Title="现场控制点裁剪" TitleToolTip="现场控制点裁剪" ShowBorder="true" ShowHeader="true"
BodyPadding="10px">
<Items>
<f:Tree ID="trWBS" EnableCollapse="true" ShowHeader="true" OnNodeCheck="trWBS_NodeCheck" OnlyLeafCheck="true"
OnNodeCommand="trWBS_NodeCommand" OnNodeExpand="trWBS_NodeExpand" AutoLeafIdentification="true"
runat="server">
</f:Tree>
<f:HiddenField runat="server" ID="hdSelectId">
</f:HiddenField>
<f:HiddenField runat="server" ID="hdUnitWorkId">
</f:HiddenField>
</Items>
</f:Panel>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" Layout="Fit"
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
<Items>
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="BreakdownProjectId" AllowSorting="true" EnableColumnLines="true"
SortField="BreakdownCode" SortDirection="ASC" AllowCellEditing="true" ClicksToEdit="1" KeepCurrentSelection="true"
ForceFit="true" OnRowCommand="Grid1_RowCommand"
ShowSelectedCell="true" DataIDField="BreakdownProjectId" AllowPaging="true" IsDatabasePaging="true"
PageSize="100" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange">
<Columns>
<f:RenderField Width="70px" ColumnID="BreakdownCode" DataField="BreakdownCode" FieldType="String"
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="BreakdownName" DataField="BreakdownName" FieldType="String"
HeaderText="质量控制点检查、检测项" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Basis" DataField="Basis" FieldType="String"
HeaderText="执行依据或规范" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="CheckPoints" DataField="CheckPoints" FieldType="String"
HeaderText="质量检查要点" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RecordAndCode" DataField="RecordAndCode" FieldType="String"
HeaderText="质量记录及格式文本号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="CheckPoints" DataField="CheckPoints" FieldType="String"
HeaderText="质量记录名称" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="RecordAndCode" DataField="RecordAndCode" FieldType="String"
HeaderText="记录格式文本号" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" TextAlign="Center" Icon="ArrowDown" CommandName="download" />
<f:RenderField Width="40px" ColumnID="Class" DataField="Class" FieldType="String"
HeaderText="控制等级" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="FenBao" DataField="FenBao" FieldType="String"
HeaderText="分包" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="WuHuan" DataField="WuHuan" FieldType="String"
HeaderText="公司" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="JianLi" DataField="JianLi" FieldType="String"
HeaderText="监理" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="YeZhu" DataField="YeZhu" FieldType="String"
HeaderText="业主" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="Remark" DataField="Remark" FieldType="String"
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="40px" ColumnID="ModelURL" DataField="ModelURL" FieldType="String" Hidden="true"
HeaderText="模板附件" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:LinkButtonField HeaderText="附件" ColumnID="download" Width="40px" Text="附件" CommandName="download" />
</Columns>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator2" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText2" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="100" Value="100" />
<f:ListItem Text="500" Value="500" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Windowtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
<script type="text/javascript">
var treeID = '<%= trWBS.ClientID %>';
// 保存当前菜单对应的树节点ID
var currentNodeId;
// 显示菜单后,检查是否禁用菜单项
function onMenuShow() {
if (currentNodeId) {
var tree = F(treeID);
var nodeData = tree.getNodeData(currentNodeId);
if (nodeData.leaf) {
setMenuItemsDisabled(true);
} else {
setMenuItemsDisabled(false);
}
}
}
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID2).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.CQMS.WBS
{
public partial class ProjectControlPointFile
{
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// panelLeftRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelLeftRegion;
/// <summary>
/// trWBS 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trWBS;
/// <summary>
/// hdSelectId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdSelectId;
/// <summary>
/// hdUnitWorkId 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdUnitWorkId;
/// <summary>
/// panelCenterRegion 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel panelCenterRegion;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolbarSeparator2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2;
/// <summary>
/// ToolbarText2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText2;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Windowtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Windowtt;
}
}

View File

@ -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

View File

@ -493,6 +493,7 @@
<Content Include="CQMS\WBS\ForeignControlPointEdit.aspx" /> <Content Include="CQMS\WBS\ForeignControlPointEdit.aspx" />
<Content Include="CQMS\WBS\ProjectControlItemInitSet.aspx" /> <Content Include="CQMS\WBS\ProjectControlItemInitSet.aspx" />
<Content Include="CQMS\WBS\ProjectControlPoint.aspx" /> <Content Include="CQMS\WBS\ProjectControlPoint.aspx" />
<Content Include="CQMS\WBS\ProjectControlPointFile.aspx" />
<Content Include="CQMS\WBS\WorkPackageInitEdit.aspx" /> <Content Include="CQMS\WBS\WorkPackageInitEdit.aspx" />
<Content Include="CQMS\WBS\WorkPackageProjectEdit.aspx" /> <Content Include="CQMS\WBS\WorkPackageProjectEdit.aspx" />
<Content Include="CQMS\WBS\WorkPackageSet1.aspx" /> <Content Include="CQMS\WBS\WorkPackageSet1.aspx" />
@ -7874,6 +7875,13 @@
<Compile Include="CQMS\WBS\ProjectControlPoint.aspx.designer.cs"> <Compile Include="CQMS\WBS\ProjectControlPoint.aspx.designer.cs">
<DependentUpon>ProjectControlPoint.aspx</DependentUpon> <DependentUpon>ProjectControlPoint.aspx</DependentUpon>
</Compile> </Compile>
<Compile Include="CQMS\WBS\ProjectControlPointFile.aspx.cs">
<DependentUpon>ProjectControlPointFile.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="CQMS\WBS\ProjectControlPointFile.aspx.designer.cs">
<DependentUpon>ProjectControlPointFile.aspx</DependentUpon>
</Compile>
<Compile Include="CQMS\WBS\WorkPackageInitEdit.aspx.cs"> <Compile Include="CQMS\WBS\WorkPackageInitEdit.aspx.cs">
<DependentUpon>WorkPackageInitEdit.aspx</DependentUpon> <DependentUpon>WorkPackageInitEdit.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType> <SubType>ASPXCodeBehind</SubType>

View File

@ -31,10 +31,10 @@
LabelAlign="right"> LabelAlign="right">
</f:TextBox> </f:TextBox>
<f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill> <f:ToolbarFill ID="ToolbarFill1" runat="server"></f:ToolbarFill>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" <f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增"
Hidden="true"> Hidden="true">
</f:Button> </f:Button>
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" <f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp" Text="导出"
EnableAjax="false" DisableControlBeforePostBack="false"> EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button> </f:Button>
</Items> </Items>
@ -63,10 +63,6 @@
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="整理时间" FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="整理时间"
HeaderTextAlign="Center" TextAlign="Center"> HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField> </f:RenderField>
<f:RenderField Width="150px" ColumnID="FlowOperateName" DataField="StatesName"
SortField="StatesName" FieldType="String" HeaderText="状态" HeaderTextAlign="Center"
TextAlign="Center">
</f:RenderField>
</Columns> </Columns>
<Listeners> <Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" /> <f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />

View File

@ -148,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Solution
var getRecord = BLL.ExpertArgumentService.GetLargerHazardListById(Grid1.SelectedRowID); var getRecord = BLL.ExpertArgumentService.GetLargerHazardListById(Grid1.SelectedRowID);
if (getRecord != null) 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, "查看 - "))); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ExpertArgumentListEdit.aspx?LargerHazardListId={0}", getRecord.LargerHazardListId, "查看 - ")));
} }

View File

@ -32,7 +32,7 @@
<Toolbars> <Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right"> <f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
<Items> <Items>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"> <f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server" Text="新增">
</f:Button> </f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>
@ -74,13 +74,10 @@
</f:Label> </f:Label>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" <f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" Text="保存"
ValidateForms="SimpleForm1" OnClick="btnSave_Click"> ValidateForms="SimpleForm1" OnClick="btnSave_Click">
</f:Button> </f:Button>
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" ToolTip="提交" <f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭"
ValidateForms="SimpleForm1" OnClick="btnSubmit_Click">
</f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭"
runat="server" Icon="SystemClose"> runat="server" Icon="SystemClose">
</f:Button> </f:Button>
</Items> </Items>

View File

@ -81,19 +81,6 @@ namespace FineUIPro.Web.HSSE.Solution
} }
} }
#region
/// <summary>
/// 提交按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSubmit_Click(object sender, EventArgs e)
{
this.SaveData(BLL.Const.BtnSubmit);
PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference());
}
#endregion
#region #region
/// <summary> /// <summary>
/// 保存按钮 /// 保存按钮
@ -123,13 +110,8 @@ namespace FineUIPro.Web.HSSE.Solution
VersionNo = this.txtVersionNo.Text.Trim(), VersionNo = this.txtVersionNo.Text.Trim(),
RecardManId = this.CurrUser.UserId, 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)) if (!string.IsNullOrEmpty(this.LargerHazardListId))
{ {
BLL.ExpertArgumentService.UpdateLargerHazardList(newRecord); BLL.ExpertArgumentService.UpdateLargerHazardList(newRecord);

View File

@ -129,15 +129,6 @@ namespace FineUIPro.Web.HSSE.Solution {
/// </remarks> /// </remarks>
protected global::FineUIPro.Button btnSave; protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnSubmit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSubmit;
/// <summary> /// <summary>
/// btnClose 控件。 /// btnClose 控件。
/// </summary> /// </summary>

View File

@ -17,7 +17,7 @@
Required="true" ShowRedStar="true"> Required="true" ShowRedStar="true">
</f:NumberBox> </f:NumberBox>
<f:DropDownList ID="drpUnitWorkId" runat="server" Label="单位工程" EnableEdit="true" <f:DropDownList ID="drpUnitWorkId" runat="server" Label="单位工程" EnableEdit="true"
Required="true" ShowRedStar="true" AutoPostBack="true" OnSelectedIndexChanged="drpUnitWorkId_SelectedIndexChanged"> Required="true" ShowRedStar="true">
</f:DropDownList> </f:DropDownList>
</Items> </Items>
</f:FormRow> </f:FormRow>
@ -57,10 +57,10 @@
</f:Label> </f:Label>
<f:ToolbarFill ID="ToolbarFill1" runat="server"> <f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill> </f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" <f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1" Text="保存"
OnClick="btnSave_Click"> OnClick="btnSave_Click">
</f:Button> </f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose"> <f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" runat="server" Icon="SystemClose" Text="关闭">
</f:Button> </f:Button>
</Items> </Items>
</f:Toolbar> </f:Toolbar>

View File

@ -55,6 +55,7 @@ namespace FineUIPro.Web.HSSE.Solution
BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False"); BLL.ConstValue.InitConstValueRadioButtonList(this.rblIsArgument, ConstValue.Group_0001, "False");
//施工单位 //施工单位
BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnitId, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true);
BLL.SpecialSchemeTypeService.InitSpecialSchemeTypeDropDownList2(drpWorkPackageId, true);
this.LargerHazardListId = Request.Params["LargerHazardListId"]; this.LargerHazardListId = Request.Params["LargerHazardListId"];
this.LargerHazardListItemId = Request.Params["LargerHazardListItemId"]; this.LargerHazardListItemId = Request.Params["LargerHazardListItemId"];
@ -65,12 +66,11 @@ namespace FineUIPro.Web.HSSE.Solution
if (!string.IsNullOrEmpty(getItem.UnitWorkId)) if (!string.IsNullOrEmpty(getItem.UnitWorkId))
{ {
this.drpUnitWorkId.SelectedValue = getItem.UnitWorkId; this.drpUnitWorkId.SelectedValue = getItem.UnitWorkId;
BLL.WorkPackageService.InitWorkPackagesDropDownListByUnitWorkId(this.drpWorkPackageId, this.drpUnitWorkId.SelectedValue, true); }
if (!string.IsNullOrEmpty(getItem.WorkPackageId)) if (!string.IsNullOrEmpty(getItem.WorkPackageId))
{ {
this.drpWorkPackageId.SelectedValue = getItem.WorkPackageId; this.drpWorkPackageId.SelectedValue = getItem.WorkPackageId;
} }
}
this.txtWorkPackageSize.Text = getItem.WorkPackageSize; this.txtWorkPackageSize.Text = getItem.WorkPackageSize;
this.txtExpectedStartTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getItem.ExpectedStartTime); this.txtExpectedStartTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getItem.ExpectedStartTime);
this.txtExpectedEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getItem.ExpectedEndTime); this.txtExpectedEndTime.Text = string.Format("{0:yyyy-MM-dd HH:mm:ss}", getItem.ExpectedEndTime);
@ -128,11 +128,5 @@ namespace FineUIPro.Web.HSSE.Solution
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
} }
#endregion #endregion
protected void drpUnitWorkId_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpWorkPackageId.Items.Clear();
BLL.WorkPackageService.InitWorkPackagesDropDownListByUnitWorkId(this.drpWorkPackageId, this.drpUnitWorkId.SelectedValue, true);
}
} }
} }

View File

@ -19,7 +19,7 @@
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtVersionNo" runat="server" Label="版本" Readonly="true"> <f:TextBox ID="txtVersionNo" runat="server" Label="版本" Readonly="true">
</f:TextBox> </f:TextBox>
<f:TextBox ID="txtRecordTime" runat="server" Label="版本" Readonly="true"> <f:TextBox ID="txtRecordTime" runat="server" Label="编制日期" Readonly="true">
</f:TextBox> </f:TextBox>
</Items> </Items>
</f:FormRow> </f:FormRow>
@ -69,7 +69,7 @@
<f:Button ID="btnCancel" Icon="PageCancel" runat="server" ToolTip="作废" Hidden="true" <f:Button ID="btnCancel" Icon="PageCancel" runat="server" ToolTip="作废" Hidden="true"
OnClick="btnCancel_Click" Text="作废" ConfirmText="确定作废当前记录?"> OnClick="btnCancel_Click" Text="作废" ConfirmText="确定作废当前记录?">
</f:Button> </f:Button>
<f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" <f:Button ID="btnClose" EnablePostBack="false" ToolTip="关闭" Text="关闭"
runat="server" Icon="SystemClose"> runat="server" Icon="SystemClose">
</f:Button> </f:Button>
</Items> </Items>

View File

@ -3,6 +3,7 @@
<TreeNode id="3B322232-38A1-4291-9832-CD4A01C2A975" Text="WBS数据" NavigateUrl=""> <TreeNode id="3B322232-38A1-4291-9832-CD4A01C2A975" Text="WBS数据" NavigateUrl="">
<TreeNode id="5AA08233-9E04-4808-AC43-DD411C5F9D31" Text="现场控制点裁剪" NavigateUrl="CQMS/WBS/ProjectControlPoint.aspx"> <TreeNode id="5AA08233-9E04-4808-AC43-DD411C5F9D31" Text="现场控制点裁剪" NavigateUrl="CQMS/WBS/ProjectControlPoint.aspx">
</TreeNode> </TreeNode>
<TreeNode id="88F115C3-D193-4455-8E8D-76F2EAF56291" Text="现场控制点资料柜" NavigateUrl="CQMS/WBS/ProjectControlPointFile.aspx"></TreeNode>
</TreeNode> </TreeNode>
<TreeNode id="4a0e62cb-ee50-4a14-80b7-377602e9902c" Text="综合管理" NavigateUrl=""><TreeNode id="6c2c1e5e-1812-4e1c-a683-7125518e28c7" Text="设备材料报验" NavigateUrl="CQMS/Comprehensive/InspectionEquipment.aspx"></TreeNode> <TreeNode id="4a0e62cb-ee50-4a14-80b7-377602e9902c" Text="综合管理" NavigateUrl=""><TreeNode id="6c2c1e5e-1812-4e1c-a683-7125518e28c7" Text="设备材料报验" NavigateUrl="CQMS/Comprehensive/InspectionEquipment.aspx"></TreeNode>
<TreeNode id="8ed133de-5899-4687-878a-20b1f5280f18" Text="人员报验" NavigateUrl="CQMS/Comprehensive/InspectionPerson.aspx"></TreeNode> <TreeNode id="8ed133de-5899-4687-878a-20b1f5280f18" Text="人员报验" NavigateUrl="CQMS/Comprehensive/InspectionPerson.aspx"></TreeNode>

View File

@ -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> Base_DesignProfessional public EntitySet<Base_DesignProfessional> Base_DesignProfessional
{ {
get 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 public Base_CNProfessional Base_CNProfessional
{ {
get get
@ -308523,8 +308523,6 @@ namespace Model
private EntityRef<WBS_UnitWork> _WBS_UnitWork; private EntityRef<WBS_UnitWork> _WBS_UnitWork;
private EntityRef<WBS_WorkPackage> _WBS_WorkPackage;
#region #region
partial void OnLoaded(); partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action); partial void OnValidate(System.Data.Linq.ChangeAction action);
@ -308556,7 +308554,6 @@ namespace Model
this._Base_Unit = default(EntityRef<Base_Unit>); this._Base_Unit = default(EntityRef<Base_Unit>);
this._Solution_LargerHazardList = default(EntityRef<Solution_LargerHazardList>); this._Solution_LargerHazardList = default(EntityRef<Solution_LargerHazardList>);
this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>); this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>);
this._WBS_WorkPackage = default(EntityRef<WBS_WorkPackage>);
OnCreated(); OnCreated();
} }
@ -308659,10 +308656,6 @@ namespace Model
{ {
if ((this._WorkPackageId != value)) if ((this._WorkPackageId != value))
{ {
if (this._WBS_WorkPackage.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnWorkPackageIdChanging(value); this.OnWorkPackageIdChanging(value);
this.SendPropertyChanging(); this.SendPropertyChanging();
this._WorkPackageId = value; 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 PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged; 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 public string PackageContent
{ {
get get
@ -405992,8 +405951,6 @@ namespace Model
private System.Nullable<decimal> _Costs; private System.Nullable<decimal> _Costs;
private EntitySet<Solution_LargerHazardListItem> _Solution_LargerHazardListItem;
private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle; private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle;
private EntityRef<WBS_UnitWork> _WBS_UnitWork; private EntityRef<WBS_UnitWork> _WBS_UnitWork;
@ -406040,7 +405997,6 @@ namespace Model
public WBS_WorkPackage() public WBS_WorkPackage()
{ {
this._Solution_LargerHazardListItem = new EntitySet<Solution_LargerHazardListItem>(new Action<Solution_LargerHazardListItem>(this.attach_Solution_LargerHazardListItem), new Action<Solution_LargerHazardListItem>(this.detach_Solution_LargerHazardListItem));
this._WBS_ControlItemAndCycle = new EntitySet<WBS_ControlItemAndCycle>(new Action<WBS_ControlItemAndCycle>(this.attach_WBS_ControlItemAndCycle), new Action<WBS_ControlItemAndCycle>(this.detach_WBS_ControlItemAndCycle)); this._WBS_ControlItemAndCycle = new EntitySet<WBS_ControlItemAndCycle>(new Action<WBS_ControlItemAndCycle>(this.attach_WBS_ControlItemAndCycle), new Action<WBS_ControlItemAndCycle>(this.detach_WBS_ControlItemAndCycle));
this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>); this._WBS_UnitWork = default(EntityRef<WBS_UnitWork>);
OnCreated(); 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> 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")] [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> WBS_ControlItemAndCycle public EntitySet<WBS_ControlItemAndCycle> 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) private void attach_WBS_ControlItemAndCycle(WBS_ControlItemAndCycle entity)
{ {
this.SendPropertyChanging(); this.SendPropertyChanging();