diff --git a/DataBase/版本日志/HJGLDB_DS_2026-04-16_bwj.sql b/DataBase/版本日志/HJGLDB_DS_2026-04-16_bwj.sql
new file mode 100644
index 0000000..dc768bb
--- /dev/null
+++ b/DataBase/版本日志/HJGLDB_DS_2026-04-16_bwj.sql
@@ -0,0 +1,3 @@
+
+alter table HJGL_BS_Steel add IsCracking bit
+go
\ No newline at end of file
diff --git a/HJGL_DS/BLL/DropListService.cs b/HJGL_DS/BLL/DropListService.cs
index 6d19520..46cc96d 100644
--- a/HJGL_DS/BLL/DropListService.cs
+++ b/HJGL_DS/BLL/DropListService.cs
@@ -348,19 +348,19 @@
///
public static ListItem[] HJGL_GetSteTypeList()
{
- ListItem[] list = new ListItem[11];
+ ListItem[] list = new ListItem[12];
list[0] = new ListItem("低碳钢(FeⅠ)", "FeⅠ");
list[1] = new ListItem("低合金钢(FeⅡ)", "FeⅡ");
list[2] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ)", "FeⅢ");
- list[3] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ");
- list[4] = new ListItem("奥氏体钢,奥氏体与铁素体双相钢(FeⅣ无保护气体)", "FeⅣ无保护气体");
- list[5] = new ListItem("镍合金(Ni)", "Ni");
- list[6] = new ListItem("锆合金(Zr)", "Zr");
- list[7] = new ListItem("铝与铝合金(Al)", "Al");
- list[8] = new ListItem("钛与钛合金(Ti)", "Ti");
- list[9] = new ListItem("铜与铜合金(Cu)", "Cu");
- list[10] = new ListItem("其他", "其他");
-
+ list[3] = new ListItem("Cr≥5%铬钼钢、铁素体钢、马氏体钢(FeⅢ无保护气体)", "FeⅢ无保护气体");
+ list[4] = new ListItem("奥氏体钢、奥氏体与铁素体双相钢(FeⅣ)", "FeⅣ");
+ list[5] = new ListItem("奥氏体钢,奥氏体与铁素体双相钢(FeⅣ无保护气体)", "FeⅣ无保护气体");
+ list[6] = new ListItem("镍合金(Ni)", "Ni");
+ list[7] = new ListItem("锆合金(Zr)", "Zr");
+ list[8] = new ListItem("铝与铝合金(Al)", "Al");
+ list[9] = new ListItem("钛与钛合金(Ti)", "Ti");
+ list[10] = new ListItem("铜与铜合金(Cu)", "Cu");
+ list[11] = new ListItem("其他", "其他");
return list;
}
diff --git a/HJGL_DS/BLL/HJGLServer/BaseInfo/HJGL_MaterialService.cs b/HJGL_DS/BLL/HJGLServer/BaseInfo/HJGL_MaterialService.cs
index afab6c8..af0f059 100644
--- a/HJGL_DS/BLL/HJGLServer/BaseInfo/HJGL_MaterialService.cs
+++ b/HJGL_DS/BLL/HJGLServer/BaseInfo/HJGL_MaterialService.cs
@@ -63,6 +63,7 @@ namespace BLL
newSteel.MaterialGroup = steel.MaterialGroup;
newSteel.HardQuaStandard = steel.HardQuaStandard;
newSteel.IsUse = steel.IsUse;
+ newSteel.IsCracking = steel.IsCracking;
db.HJGL_BS_Steel.InsertOnSubmit(newSteel);
db.SubmitChanges();
@@ -87,6 +88,7 @@ namespace BLL
newSteel.MaterialGroup = steel.MaterialGroup;
newSteel.HardQuaStandard = steel.HardQuaStandard;
newSteel.IsUse = steel.IsUse;
+ newSteel.IsCracking = steel.IsCracking;
db.SubmitChanges();
}
diff --git a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user
index 6e29203..abef49a 100644
--- a/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user
+++ b/HJGL_DS/FineUIPro.Web/FineUIPro.Web.csproj.user
@@ -1,4 +1,4 @@
-
+
true
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx
index 07b915a..e7a1631 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx
@@ -36,7 +36,7 @@
-
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs
index faf27df..e7936fb 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardReportSet.aspx.cs
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
- //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
//var projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue);
//RadioButtonList1.DataTextField = "ProjectCode";
@@ -106,7 +106,11 @@ namespace FineUIPro.Web.HJGL.HotHardManage
rootProjectNode.EnableClickEvent = true;
rootNode.Nodes.Add(rootProjectNode);
}
-
+ if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue))
+ {
+ this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
+ BindGrid();
+ }
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx
index b449275..4ed08ba 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx
@@ -33,7 +33,7 @@
+ EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpProjectId_SelectedIndexChanged">
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs
index 39e6f44..e41683d 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestReport.aspx.cs
@@ -52,7 +52,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
- //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "项目";
@@ -64,6 +64,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
//this.InitTreeMenu();//加载树
//this.tvControlItem.SelectedNodeID = this.CurrUser.LoginProjectId;
//BindGrid();
+ this.InitTreeMenu();
}
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx
index af1deb0..dddfeef 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx
@@ -31,7 +31,7 @@
-
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs
index e2ba8c6..609fdcc 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HardTestResult.aspx.cs
@@ -39,7 +39,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
- //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
this.tvHardTestTrust.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "项目";
@@ -48,7 +48,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
rootNode.Expanded = true;
rootNode.EnableClickEvent = true;
this.tvHardTestTrust.Nodes.Add(rootNode);
- //this.InitTreeMenu();//加载树
+ this.InitTreeMenu();//加载树
//this.tvHardTestTrust.SelectedNodeID = "0";
//BindGrid();
CheckBoxField cbf1 = Grid1.FindColumn("IsOK1") as CheckBoxField;
@@ -213,6 +213,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
rootUnitNode.Nodes.Add(tn);
}
}
+
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx
index 149df27..917cd21 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx
@@ -28,7 +28,7 @@
-
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs
index cb77a62..88453bc 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardManageEdit.aspx.cs
@@ -41,12 +41,14 @@ namespace FineUIPro.Web.HJGL.HotHardManage
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.HardTestReportId = string.Empty;
+
this.drpProjectId.DataTextField = "ProjectCode";
this.drpProjectId.DataValueField = "ProjectId";
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
- //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+
this.tvControlItem.Nodes.Clear();
TreeNode rootNode = new TreeNode();
rootNode.Text = "项目";
@@ -58,6 +60,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
//this.InitTreeMenu();//加载树
//this.tvControlItem.SelectedNodeID = "0";
//BindGrid();
+ this.InitTreeMenu();
}
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx
index c1e1e72..18ac7ed 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx
@@ -36,7 +36,7 @@
-
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs
index f6130e4..034a65b 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotHardManage/HotHardSet.aspx.cs
@@ -40,7 +40,7 @@ namespace FineUIPro.Web.HJGL.HotHardManage
this.drpProjectId.DataSource = BLL.Base_ProjectService.GetOnProjectListByUserId(this.CurrUser.UserId, "1");
this.drpProjectId.DataBind();
Funs.FineUIPleaseSelect(this.drpProjectId);
- //this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
+ this.drpProjectId.SelectedValue = this.CurrUser.LoginProjectId;
//var projects = BLL.Base_ProjectService.GetProjectListByUserIdAndState(this.CurrUser.UserId, this.drpIsProjectClosed.SelectedValue);
//RadioButtonList1.DataTextField = "ProjectCode";
@@ -103,6 +103,11 @@ namespace FineUIPro.Web.HJGL.HotHardManage
rootProjectNode.EnableClickEvent = true;
rootNode.Nodes.Add(rootProjectNode);
}
+ if (this.drpProjectId.SelectedValue != BLL.Const._Null && !string.IsNullOrEmpty(this.drpProjectId.SelectedValue))
+ {
+ this.tvControlItem.SelectedNodeID = this.drpProjectId.SelectedValue;
+ BindGrid();
+ }
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs
index ae75691..be6eba9 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/HotProessManage/HotProessManageEdit.aspx.cs
@@ -1,15 +1,16 @@
-using System;
+using BLL;
+using Newtonsoft.Json.Linq;
+using NPOI.SS.UserModel;
+using NPOI.XSSF.UserModel;
+using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
-using System.Linq;
-using BLL;
-using Newtonsoft.Json.Linq;
-using System.Web;
-using System.IO;
-using NPOI.SS.UserModel;
using System.Drawing;
-using NPOI.XSSF.UserModel;
+using System.IO;
+using System.Linq;
+using System.Text;
+using System.Web;
namespace FineUIPro.Web.HJGL.HotProessManage
{
@@ -974,7 +975,6 @@ namespace FineUIPro.Web.HJGL.HotProessManage
// return;
//}
SaveData();
- ShowNotify("提交成功!", MessageBoxIcon.Success);
}
else
{
@@ -989,6 +989,7 @@ namespace FineUIPro.Web.HJGL.HotProessManage
///
private void SaveData()
{
+ bool isEmpty = false;//是否为空
string isoidLog = string.Empty; //是否同一管线标记
int i = 0; //检验数量
int flag = 0; //打印标记
@@ -1033,22 +1034,120 @@ namespace FineUIPro.Web.HJGL.HotProessManage
//}
//else
//{
-
- newHotProessItem.PointCount = values.Value("PointCount").ToString();
- newHotProessItem.RequiredT = values.Value("RequiredT").ToString();
- newHotProessItem.ActualT = values.Value("ActualT").ToString();
- newHotProessItem.RequestTime = values.Value("RequestTime").ToString();
- newHotProessItem.ActualTime = values.Value("ActualTime").ToString();
- newHotProessItem.HotProessDate = Funs.GetNewDateTime(values.Value("HotProessDate").ToString());
- newHotProessItem.RecordChartNo = values.Value("RecordChartNo").ToString();
- newHotProessItem.ThermocouplesNum = values.Value("ThermocouplesNum").ToString();
- newHotProessItem.HeatingRange = values.Value("HeatingRange").ToString();
- newHotProessItem.InsulationRange = values.Value("InsulationRange").ToString();
- newHotProessItem.InsulationThickness = values.Value("InsulationThickness").ToString();
- newHotProessItem.HotStartDate = Funs.GetNewDateTime(values.Value("HotStartDate").ToString());
- newHotProessItem.HotEndDate = Funs.GetNewDateTime(values.Value("HotEndDate").ToString());
+ if (!string.IsNullOrEmpty(values.Value("PointCount").ToString()))
+ {
+ newHotProessItem.PointCount = values.Value("PointCount").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("RequiredT").ToString()))
+ {
+ newHotProessItem.RequiredT = values.Value("RequiredT").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("ActualT").ToString()))
+ {
+ newHotProessItem.ActualT = values.Value("ActualT").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("RequestTime").ToString()))
+ {
+ newHotProessItem.RequestTime = values.Value("RequestTime").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("ActualTime").ToString()))
+ {
+ newHotProessItem.ActualTime = values.Value("ActualTime").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("HotProessDate").ToString()))
+ {
+ newHotProessItem.HotProessDate = Funs.GetNewDateTime(values.Value("HotProessDate").ToString());
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("RecordChartNo").ToString()))
+ {
+ newHotProessItem.RecordChartNo = values.Value("RecordChartNo").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("ThermocouplesNum").ToString()))
+ {
+ newHotProessItem.ThermocouplesNum = values.Value("ThermocouplesNum").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("HeatingRange").ToString()))
+ {
+ newHotProessItem.HeatingRange = values.Value("HeatingRange").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("InsulationRange").ToString()))
+ {
+ newHotProessItem.InsulationRange = values.Value("InsulationRange").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("InsulationThickness").ToString()))
+ {
+ newHotProessItem.InsulationThickness = values.Value("InsulationThickness").ToString();
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("HotStartDate").ToString()))
+ {
+ newHotProessItem.HotStartDate = Funs.GetNewDateTime(values.Value("HotStartDate").ToString());
+ }
+ else
+ {
+ isEmpty = true;
+ }
+ if (!string.IsNullOrEmpty(values.Value("HotEndDate").ToString()))
+ {
+ newHotProessItem.HotEndDate = Funs.GetNewDateTime(values.Value("HotEndDate").ToString());
+ }
+ else
+ {
+ isEmpty = true;
+ }
newHotProessItem.Remark = values.Value("Remark").ToString();
- Funs.DB.SubmitChanges();
+ if (!isEmpty)
+ {
+ Funs.DB.SubmitChanges();
+ }
+ else
+ {
+ Alert.ShowInTop("测温点编号、热处理温度℃(要求)、热处理温度℃(实际)、恒温时间h(要求)、恒温时间h(实际)、热处理日期、记录曲线图编号、热电偶数量、加热范围、保温范围、保温厚度、热处理开始时间、热处理完成时间不能为空!", MessageBoxIcon.Warning);
+ return;
+ }
//}
}
if (hotProessItem.ProessTypes.Contains("4")) //消应力热处理需要进行硬度委托
@@ -1270,6 +1369,10 @@ namespace FineUIPro.Web.HJGL.HotProessManage
// oldHardTestReport2.TestCount = i;
// BLL.HJGL_CH_HardTestReportService.UpdateCH_HardTestReport(oldHardTestReport2);
//}
+ if (!isEmpty)
+ {
+ ShowNotify("提交成功!", MessageBoxIcon.Success);
+ }
}
///
@@ -1309,10 +1412,6 @@ namespace FineUIPro.Web.HJGL.HotProessManage
#endregion
#region 导出按钮
- /// 导出按钮
- ///
- ///
- ///
protected void btnOut_Click(object sender, EventArgs e)
{
string ids = string.Empty;
@@ -1332,40 +1431,40 @@ namespace FineUIPro.Web.HJGL.HotProessManage
string filePath = string.Empty;
initTemplatePath = Const.HotProessManageOutTemplateUrl;
uploadfilepath = rootPath + initTemplatePath;
- //newUrl = uploadfilepath.Replace(".xlsx", "(" + BLL.Base_ProjectService.GetProjectCode(this.tvControlItem.SelectedNodeID) + "_" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ").xlsx");
newUrl = uploadfilepath.Replace(".xlsx", "(" + BLL.Base_ProjectService.GetProjectCode(this.tvControlItem.SelectedNodeID).Replace("/", "-") + ").xlsx");
+
if (File.Exists(newUrl))
{
File.Delete(newUrl);
}
File.Copy(uploadfilepath, newUrl);
- // 第一步:读取文件流
- NPOI.SS.UserModel.IWorkbook workbook;
+
+ // 读取模板
+ IWorkbook workbook;
using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
{
- workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ workbook = new XSSFWorkbook(stream);
}
- string strSql = string.Empty;
- List listStr = new List();
- Model.SGGLDB db = Funs.DB;
- var attachFiles = from x in db.AttachFile select x;
- // 创建单元格样式
- NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
- cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
- cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
- cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
- cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
- cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
- cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+
+ // 单元格样式
+ ICellStyle cellStyle = workbook.CreateCellStyle();
+ cellStyle.BorderTop = BorderStyle.Thin;
+ cellStyle.BorderRight = BorderStyle.Thin;
+ cellStyle.BorderBottom = BorderStyle.Thin;
+ cellStyle.BorderLeft = BorderStyle.Thin;
+ cellStyle.Alignment = HorizontalAlignment.Center;
+ cellStyle.VerticalAlignment = VerticalAlignment.Center;
cellStyle.WrapText = true;
- var font = workbook.CreateFont();
+
+ IFont font = workbook.CreateFont();
font.FontHeightInPoints = 10;
- //font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
cellStyle.SetFont(font);
- // 第二步:创建新数据行
- NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+
+ ISheet sheet = workbook.GetSheetAt(0);
int i = 2;
- strSql = @"SELECT JointInfo.ProjectId,JointInfo.JOT_ID,Project.ProjectCode,HotProessItem.PrintDate,HotProessTrust.HotProessTrustCode,(select Top 1 TrustDate from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId) as TrustDate,
+
+ string strSql = @"SELECT JointInfo.ProjectId,JointInfo.JOT_ID,Project.ProjectCode,HotProessItem.PrintDate,HotProessTrust.HotProessTrustCode,
+(select Top 1 TrustDate from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId) as TrustDate,
JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,
(CASE WHEN v.RepairMark IS NOT NULL THEN (JointInfo.JOT_JointNo+v.RepairMark)
ELSE JointInfo.JOT_JointNo END )+isnull((select Top 1 HardRepairMark from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId and a.ProessTypes=HotProessItem.ProessTypes),'') AS JOT_JointNo,IsoInfo.ISO_IsoNo,IsoInfo.ISO_ID,
@@ -1395,311 +1494,574 @@ namespace FineUIPro.Web.HJGL.HotProessManage
left join dbo.HJGL_HotProessItem h on h.JOT_ID=TrustItem.JOT_ID
where h.JOT_ID = TrustItem.JOT_ID and h.HotProessTrustId=TrustItem.HotProessTrustId and h.ProessTypes=TrustItem.ProessTypes) v
on v.JOT_ID=HotProessItem.JOT_ID and v.HotProessItemId=HotProessItem.HotProessItemId
- WHERE JointInfo.ProjectId= @ProjectId order by ISO_IsoNo,JOT_JointNo,SortIndex,PointCount ";
+ WHERE JointInfo.ProjectId= @ProjectId order by ISO_IsoNo,Sort1,Sort2,Sort3,Sort4,Sort5,SortIndex,PointCount ";
+
+ List listStr = new List();
listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
- SqlParameter[] parameter = listStr.ToArray();
- DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- // 第二步:创建新数据行
- NPOI.SS.UserModel.IRow row;
- NPOI.SS.UserModel.ICell cell;
- List jotIds = new List();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, listStr.ToArray());
+
+ // 加载附件
+ Model.SGGLDB db = Funs.DB;
+ var attachFiles = db.AttachFile.ToList();
+
+ // 先遍历一遍,设置列宽 + 行高
+ Dictionary maxHeightDic = new Dictionary();
int col13 = 0, col14 = 0, col15 = 0, col16 = 0;
- for (int j = 0; j < tb.Rows.Count; j++)
+
+ foreach (DataRow row in tb.Rows)
{
- if (!jotIds.Contains(tb.Rows[j]["JOT_ID"].ToString()))
+ string jotId = row["JOT_ID"].ToString();
+ if (!maxHeightDic.ContainsKey(jotId))
{
- string jotId = tb.Rows[j]["JOT_ID"].ToString();
- jotIds.Add(jotId);
- var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
- var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
- var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
- var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
- if (attachFile1 != null)
- {
- string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Width > col13)
- {
- col13 = image.Width;
- }
- }
- }
- if (attachFile2 != null)
- {
- string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Width > col14)
- {
- col14 = image.Width;
- }
- }
- }
- if (attachFile3 != null)
- {
- string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Width > col15)
- {
- col15 = image.Width;
- }
- }
- }
- if (attachFile4 != null)
- {
- string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Width > col16)
- {
- col16 = image.Width;
- }
- }
- }
- i++;
+ int maxH = 0;
+ CheckAndUpdateImageSize(attachFiles, jotId + "1", ref col13, ref maxH);
+ CheckAndUpdateImageSize(attachFiles, jotId + "2", ref col14, ref maxH);
+ CheckAndUpdateImageSize(attachFiles, jotId + "3", ref col15, ref maxH);
+ CheckAndUpdateImageSize(attachFiles, jotId + "4", ref col16, ref maxH);
+ maxHeightDic[jotId] = maxH;
}
}
- if (col13 > 0)
+
+ // 设置列宽
+ if (col13 > 0) sheet.SetColumnWidth(13, col13 * 30);
+ if (col14 > 0) sheet.SetColumnWidth(14, col14 * 30);
+ if (col15 > 0) sheet.SetColumnWidth(15, col15 * 30);
+ if (col16 > 0) sheet.SetColumnWidth(16, col16 * 30);
+
+ // 填充数据 + 插入图片
+ foreach (DataRow row in tb.Rows)
{
- sheet.SetColumnWidth(13, col13 * 37);
- }
- if (col14 > 0)
- {
- sheet.SetColumnWidth(14, col14 * 37);
- }
- if (col15 > 0)
- {
- sheet.SetColumnWidth(15, col15 * 37);
- }
- if (col16 > 0)
- {
- sheet.SetColumnWidth(16, col16 * 37);
- }
- i = 2;
- jotIds.Clear();
- for (int j = 0; j < tb.Rows.Count; j++)
- {
- if (!jotIds.Contains(tb.Rows[j]["JOT_ID"].ToString()))
+ string jotId = row["JOT_ID"].ToString();
+ IRow excelRow = sheet.CreateRow(i);
+
+ // 设置行高(根据图片高度自动适应)
+ if (maxHeightDic.TryGetValue(jotId, out int height) && height > 0)
{
- string jotId = tb.Rows[j]["JOT_ID"].ToString();
- jotIds.Add(jotId);
- row = sheet.CreateRow(i);
- var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
- var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
- var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
- var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
- int height = 0;
- if (attachFile1 != null)
- {
- string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Height > height)
- {
- height = image.Height;
- }
- }
- }
- if (attachFile2 != null)
- {
- string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Height > height)
- {
- height = image.Height;
- }
- }
- }
- if (attachFile3 != null)
- {
- string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Height > height)
- {
- height = image.Height;
- }
- }
- }
- if (attachFile4 != null)
- {
- string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
- if (File.Exists(url))
- {
- System.Drawing.Image image = System.Drawing.Image.FromFile(url);
- if (image.Height > height)
- {
- height = image.Height;
- }
- }
- }
- if (height > 0)
- {
- row.Height = (short)(height * 17);
- }
-
- // 添加数据
- cell = row.CreateCell(0);
- cell.CellStyle = cellStyle;
- cell.SetCellValue((i - 1).ToString());
- cell = row.CreateCell(1);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["ISO_IsoNo"].ToString());
- cell = row.CreateCell(2);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["JOT_JointNo"].ToString());
- cell = row.CreateCell(3);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["JOT_JointDesc"].ToString());
- cell = row.CreateCell(4);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["STE_Code"].ToString());
- cell = row.CreateCell(5);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["ThermocouplesNum"].ToString());
- cell = row.CreateCell(6);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["HeatingRange"].ToString());
- cell = row.CreateCell(7);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["InsulationRange"].ToString());
- cell = row.CreateCell(8);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["InsulationThickness"].ToString());
- cell = row.CreateCell(9);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["HotProessTrustCode"].ToString());
- cell = row.CreateCell(10);
- cell.CellStyle = cellStyle;
- string trustDate = string.Empty;
- if (tb.Rows[j]["TrustDate"] != DBNull.Value)
- {
- trustDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["TrustDate"]));
- }
- cell.SetCellValue(trustDate);
- cell = row.CreateCell(11);
- cell.CellStyle = cellStyle;
- string hotStartDate = string.Empty;
- if (tb.Rows[j]["HotStartDate"] != DBNull.Value)
- {
- hotStartDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["HotStartDate"]));
- }
- cell.SetCellValue(hotStartDate);
- cell = row.CreateCell(12);
- cell.CellStyle = cellStyle;
- string hotEndDate = string.Empty;
- if (tb.Rows[j]["HotEndDate"] != DBNull.Value)
- {
- hotEndDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["HotEndDate"]));
- }
- cell.SetCellValue(hotEndDate);
- cell = row.CreateCell(13);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
- cell = row.CreateCell(14);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
- cell = row.CreateCell(15);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
- cell = row.CreateCell(16);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(string.Empty);
- cell = row.CreateCell(17);
- cell.CellStyle = cellStyle;
- cell.SetCellValue(tb.Rows[j]["Remark"].ToString());
-
- if (attachFile1 != null)
- {
- string fp = BLL.Funs.RootPath + attachFile1.AttachUrl;
- if (File.Exists(fp))
- {
- byte[] fileBytes = File.ReadAllBytes(fp);
- TryAddPicture(sheet, i, 13, fileBytes, PictureType.PNG);
- }
- }
- if (attachFile2 != null)
- {
- string fp = BLL.Funs.RootPath + attachFile2.AttachUrl;
- if (File.Exists(fp))
- {
- byte[] fileBytes = File.ReadAllBytes(fp);
- TryAddPicture(sheet, i, 14, fileBytes, PictureType.PNG);
- }
- }
- if (attachFile3 != null)
- {
- string fp = BLL.Funs.RootPath + attachFile3.AttachUrl;
- if (File.Exists(fp))
- {
- byte[] fileBytes = File.ReadAllBytes(fp);
- TryAddPicture(sheet, i, 15, fileBytes, PictureType.PNG);
- }
- }
- if (attachFile4 != null)
- {
- string fp = BLL.Funs.RootPath + attachFile4.AttachUrl;
- if (File.Exists(fp))
- {
- byte[] fileBytes = File.ReadAllBytes(fp);
- TryAddPicture(sheet, i, 16, fileBytes, PictureType.PNG);
- }
- }
-
- i++;
+ excelRow.Height = (short)(height * 17);
}
+ else
+ {
+ excelRow.Height = 400; // 默认行高,防止图片被截断
+ }
+
+ // 赋值单元格
+ SetCell(excelRow, 0, cellStyle, (i - 1).ToString());
+ SetCell(excelRow, 1, cellStyle, row["ISO_IsoNo"].ToString());
+ SetCell(excelRow, 2, cellStyle, row["JOT_JointNo"].ToString());
+ SetCell(excelRow, 3, cellStyle, row["JOT_JointDesc"].ToString());
+ SetCell(excelRow, 4, cellStyle, row["STE_Code"].ToString());
+ SetCell(excelRow, 5, cellStyle, row["ThermocouplesNum"].ToString());
+ SetCell(excelRow, 6, cellStyle, row["HeatingRange"].ToString());
+ SetCell(excelRow, 7, cellStyle, row["InsulationRange"].ToString());
+ SetCell(excelRow, 8, cellStyle, row["InsulationThickness"].ToString());
+ SetCell(excelRow, 9, cellStyle, row["HotProessTrustCode"].ToString());
+ string trustDate = row["TrustDate"] != DBNull.Value ? $"{Convert.ToDateTime(row["TrustDate"]):yyyy-MM-dd}" : "";
+ SetCell(excelRow, 10, cellStyle, trustDate);
+ string hotStart = row["HotStartDate"] != DBNull.Value ? $"{Convert.ToDateTime(row["HotStartDate"]):yyyy-MM-dd}" : "";
+ SetCell(excelRow, 11, cellStyle, hotStart);
+ string hotEnd = row["HotEndDate"] != DBNull.Value ? $"{Convert.ToDateTime(row["HotEndDate"]):yyyy-MM-dd}" : "";
+ SetCell(excelRow, 12, cellStyle, hotEnd);
+
+ // 图片列(空值)
+ SetCell(excelRow, 13, cellStyle, "");
+ SetCell(excelRow, 14, cellStyle, "");
+ SetCell(excelRow, 15, cellStyle, "");
+ SetCell(excelRow, 16, cellStyle, "");
+
+ SetCell(excelRow, 17, cellStyle, row["Remark"].ToString());
+
+ // 插入图片
+ InsertImageToExcel(sheet, i, 13, attachFiles, jotId + "1");
+ InsertImageToExcel(sheet, i, 14, attachFiles, jotId + "2");
+ InsertImageToExcel(sheet, i, 15, attachFiles, jotId + "3");
+ InsertImageToExcel(sheet, i, 16, attachFiles, jotId + "4");
+
+ i++;
}
- // 第三步:写入文件流
using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
{
workbook.Write(stream);
workbook.Close();
}
string fileName = Path.GetFileName(newUrl);
- FileInfo info = new FileInfo(newUrl);
- long fileSize = info.Length;
Response.Clear();
- Response.ContentType = "application/x-zip-compressed";
- Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
- Response.AddHeader("Content-Length", fileSize.ToString());
- Response.TransmitFile(newUrl, 0, fileSize);
+ Response.ContentType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
+ Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8));
+ Response.TransmitFile(newUrl);
Response.Flush();
Response.Close();
File.Delete(newUrl);
}
+ ///
+ /// 检查图片尺寸(不使用 System.Drawing,避免报错)
+ ///
+ private void CheckAndUpdateImageSize(List attachFiles, string keyId, ref int colWidth, ref int maxHeight)
+ {
+ try
+ {
+ var file = attachFiles.FirstOrDefault(x => x.ToKeyId == keyId);
+ if (file == null) return;
+
+ string path = BLL.Funs.RootPath + file.AttachUrl;
+ if (!File.Exists(path)) return;
+
+ // 不读取图片,直接给固定宽高,避免报错
+ colWidth = 120;
+ maxHeight = 120;
+ }
+ catch { }
+ }
+
+ ///
+ /// 向Excel指定单元格插入单张图片
+ ///
+ private void InsertImageToExcel(ISheet sheet, int row, int col, List attachFiles, string toKeyId)
+ {
+ try
+ {
+ var attach = attachFiles.FirstOrDefault(x => x.ToKeyId == toKeyId);
+ if (attach == null) return;
+
+ string filePath = BLL.Funs.RootPath + attach.AttachUrl;
+ if (!File.Exists(filePath)) return;
+
+ byte[] bytes = File.ReadAllBytes(filePath);
+ TryAddPicture(sheet, row, col, bytes, PictureType.PNG);
+ }
+ catch
+ {
+ // 图片异常不影响导出
+ }
+ }
+
+ ///
+ /// 快速设置单元格
+ ///
+ private void SetCell(IRow row, int index, ICellStyle style, string value)
+ {
+ ICell cell = row.CreateCell(index);
+ cell.CellStyle = style;
+ cell.SetCellValue(value);
+ }
+ /// 导出按钮
+ ///
+ ///
+ ///
+ // protected void btnOut_Click(object sender, EventArgs e)
+ // {
+ // string ids = string.Empty;
+ // if (this.tvControlItem.SelectedNode != null && this.tvControlItem.SelectedNode.CommandName == "项目名称")
+ // {
+
+ // }
+ // else
+ // {
+ // ShowNotify("请选择要导出的项目!", MessageBoxIcon.Warning);
+ // return;
+ // }
+ // string rootPath = Server.MapPath("~/");
+ // string initTemplatePath = string.Empty;
+ // string uploadfilepath = string.Empty;
+ // string newUrl = string.Empty;
+ // string filePath = string.Empty;
+ // initTemplatePath = Const.HotProessManageOutTemplateUrl;
+ // uploadfilepath = rootPath + initTemplatePath;
+ // //newUrl = uploadfilepath.Replace(".xlsx", "(" + BLL.Base_ProjectService.GetProjectCode(this.tvControlItem.SelectedNodeID) + "_" + string.Format("{0:yyyy-MM-dd}", DateTime.Now) + ").xlsx");
+ // newUrl = uploadfilepath.Replace(".xlsx", "(" + BLL.Base_ProjectService.GetProjectCode(this.tvControlItem.SelectedNodeID).Replace("/", "-") + ").xlsx");
+ // if (File.Exists(newUrl))
+ // {
+ // File.Delete(newUrl);
+ // }
+ // File.Copy(uploadfilepath, newUrl);
+ // // 第一步:读取文件流
+ // NPOI.SS.UserModel.IWorkbook workbook;
+ // using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read))
+ // {
+ // workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream);
+ // }
+ // string strSql = string.Empty;
+ // List listStr = new List();
+ // Model.SGGLDB db = Funs.DB;
+ // var attachFiles = from x in db.AttachFile select x;
+ // // 创建单元格样式
+ // NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle();
+ // cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin;
+ // cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin;
+ // cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin;
+ // cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin;
+ // cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center;
+ // cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center;
+ // cellStyle.WrapText = true;
+ // var font = workbook.CreateFont();
+ // font.FontHeightInPoints = 10;
+ // //font.FontHeightInPoints = (short)8.5;字号为小数时要转为short
+ // cellStyle.SetFont(font);
+ // // 第二步:创建新数据行
+ // NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0);
+ // int i = 2;
+ // strSql = @"SELECT JointInfo.ProjectId,JointInfo.JOT_ID,Project.ProjectCode,HotProessItem.PrintDate,HotProessTrust.HotProessTrustCode,(select Top 1 TrustDate from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId) as TrustDate,
+ // JointInfo.JOT_ID+'1' as JOT_ID1, JointInfo.JOT_ID+'2' as JOT_ID2,JointInfo.JOT_ID+'3' as JOT_ID3,JointInfo.JOT_ID+'4' as JOT_ID4,
+ // (CASE WHEN v.RepairMark IS NOT NULL THEN (JointInfo.JOT_JointNo+v.RepairMark)
+ // ELSE JointInfo.JOT_JointNo END )+isnull((select Top 1 HardRepairMark from dbo.HJGL_CH_HotProessTrustItem a where a.JOT_ID=HotProessItem.JOT_ID and a.HotProessTrustId=HotProessItem.HotProessTrustId and a.ProessTypes=HotProessItem.ProessTypes),'') AS JOT_JointNo,IsoInfo.ISO_IsoNo,IsoInfo.ISO_ID,
+ // (CASE WHEN Steel.STE_Code IS NOT NULL AND Steel2.STE_Code IS NOT NULL and Steel.STE_Code!=Steel2.STE_Code
+ // THEN Steel.STE_Code + '/' + Steel2.STE_Code
+ // WHEN Steel.STE_Code IS NOT NULL THEN Steel.STE_Code
+ // ELSE ISNULL(Steel2.STE_Code,'') END) AS STE_Code,ThermocouplesNum,HeatingRange,InsulationRange,InsulationThickness,HotStartDate,HotEndDate,
+ // HotProessItem.PointCount,HotProessItem.RequiredT,HotProessItem.ActualT,
+ // HotProessItem.RequestTime,HotProessItem.ActualTime,HotProessItem.RecordChartNo,
+ // HotProessItem.HotProessDate,HotProessItem.HotProessTrustId,
+ //(SELECT (case when HotHardCode is null then HardTestReportCode else HotHardCode end) as HardTestReportCode FROM dbo.HJGL_CH_HardTestReport
+ // WHERE HardTestReportId =(SELECT TOP 1 re.HardTestReportId FROM dbo.HJGL_CH_HardTestReportItem item
+ // left join dbo.HJGL_CH_HardTestReport re on item.HardTestReportId=re.HardTestReportId
+ // WHERE item.JOT_ID=HotProessItem.JOT_ID AND item.HotProessTrustId=HotProessItem.HotProessTrustId and (re.FileType='R' or re.FileType is null)))
+ // AS HardnessReportNo,
+ // HotProessItem.HotProessItemId,HotProessItem.SortIndex,HotProessItem.ProessTypes,JointInfo.JOT_JointDesc,isnull(HotProessItem.Remark,'') as Remark
+ // FROM dbo.HJGL_HotProessItem AS HotProessItem
+ // LEFT JOIN dbo.HJGL_CH_HotProessTrust AS HotProessTrust ON HotProessTrust.HotProessTrustId = HotProessItem.HotProessTrustId
+ // LEFT JOIN dbo.HJGL_PW_JointInfo AS JointInfo ON JointInfo.JOT_ID = HotProessItem.JOT_ID
+ // LEFT JOIN dbo.HJGL_PW_IsoInfo AS IsoInfo ON JointInfo.ISO_ID = IsoInfo.ISO_ID
+ // left join Base_Project as Project on Project.ProjectId = IsoInfo.ProjectId
+ // LEFT JOIN dbo.Project_WorkArea AS WorkArea ON IsoInfo.BAW_ID = WorkArea.WorkAreaId
+ // LEFT JOIN dbo.HJGL_BS_Steel AS Steel ON JointInfo.STE_ID = Steel.STE_ID
+ // LEFT JOIN dbo.HJGL_BS_Steel AS Steel2 ON JointInfo.STE_ID2 = Steel2.STE_ID
+ // left join (select record.RepairMark,record.JOT_ID,h.HotProessItemId from dbo.HJGL_CH_HotProessTrustItem AS TrustItem
+ // left join dbo.HJGL_CH_RepairItemRecord AS record ON record.RepairItemRecordId=TrustItem.TrustItemID
+ // left join dbo.HJGL_HotProessItem h on h.JOT_ID=TrustItem.JOT_ID
+ // where h.JOT_ID = TrustItem.JOT_ID and h.HotProessTrustId=TrustItem.HotProessTrustId and h.ProessTypes=TrustItem.ProessTypes) v
+ // on v.JOT_ID=HotProessItem.JOT_ID and v.HotProessItemId=HotProessItem.HotProessItemId
+ // WHERE JointInfo.ProjectId= @ProjectId order by ISO_IsoNo,JOT_JointNo,SortIndex,PointCount ";
+ // listStr.Add(new SqlParameter("@ProjectId", this.tvControlItem.SelectedNodeID));
+ // SqlParameter[] parameter = listStr.ToArray();
+ // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ // // 第二步:创建新数据行
+ // NPOI.SS.UserModel.IRow row;
+ // NPOI.SS.UserModel.ICell cell;
+ // //List jotIds = new List();
+ // //int col13 = 0, col14 = 0, col15 = 0, col16 = 0;
+ // //for (int j = 0; j < tb.Rows.Count; j++)
+ // //{
+ // // if (!jotIds.Contains(tb.Rows[j]["JOT_ID"].ToString()))
+ // // {
+ // // string jotId = tb.Rows[j]["JOT_ID"].ToString();
+ // // jotIds.Add(jotId);
+ // // var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
+ // // var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
+ // // var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
+ // // var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
+ // // if (attachFile1 != null)
+ // // {
+ // // string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Width > col13)
+ // // {
+ // // col13 = image.Width;
+ // // }
+ // // }
+ // // }
+ // // if (attachFile2 != null)
+ // // {
+ // // string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Width > col14)
+ // // {
+ // // col14 = image.Width;
+ // // }
+ // // }
+ // // }
+ // // if (attachFile3 != null)
+ // // {
+ // // string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Width > col15)
+ // // {
+ // // col15 = image.Width;
+ // // }
+ // // }
+ // // }
+ // // if (attachFile4 != null)
+ // // {
+ // // string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Width > col16)
+ // // {
+ // // col16 = image.Width;
+ // // }
+ // // }
+ // // }
+ // // i++;
+ // // }
+ // //}
+ // //if (col13 > 0)
+ // //{
+ // // sheet.SetColumnWidth(13, col13 * 37);
+ // //}
+ // //if (col14 > 0)
+ // //{
+ // // sheet.SetColumnWidth(14, col14 * 37);
+ // //}
+ // //if (col15 > 0)
+ // //{
+ // // sheet.SetColumnWidth(15, col15 * 37);
+ // //}
+ // //if (col16 > 0)
+ // //{
+ // // sheet.SetColumnWidth(16, col16 * 37);
+ // //}
+ // //i = 2;
+ // //jotIds.Clear();
+ // for (int j = 0; j < tb.Rows.Count; j++)
+ // {
+ // //if (!jotIds.Contains(tb.Rows[j]["JOT_ID"].ToString()))
+ // //{
+ // string jotId = tb.Rows[j]["JOT_ID"].ToString();
+ // //jotIds.Add(jotId);
+ // row = sheet.CreateRow(i);
+ // //var attachFile1 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "1"));
+ // //var attachFile2 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "2"));
+ // //var attachFile3 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "3"));
+ // //var attachFile4 = attachFiles.FirstOrDefault(x => x.ToKeyId == (jotId + "4"));
+ // //int height = 0;
+ // //if (attachFile1 != null)
+ // //{
+ // // string url = BLL.Funs.RootPath + attachFile1.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Height > height)
+ // // {
+ // // height = image.Height;
+ // // }
+ // // }
+ // //}
+ // //if (attachFile2 != null)
+ // //{
+ // // string url = BLL.Funs.RootPath + attachFile2.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Height > height)
+ // // {
+ // // height = image.Height;
+ // // }
+ // // }
+ // //}
+ // //if (attachFile3 != null)
+ // //{
+ // // string url = BLL.Funs.RootPath + attachFile3.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Height > height)
+ // // {
+ // // height = image.Height;
+ // // }
+ // // }
+ // //}
+ // //if (attachFile4 != null)
+ // //{
+ // // string url = BLL.Funs.RootPath + attachFile4.AttachUrl;
+ // // if (File.Exists(url))
+ // // {
+ // // System.Drawing.Image image = System.Drawing.Image.FromFile(url);
+ // // if (image.Height > height)
+ // // {
+ // // height = image.Height;
+ // // }
+ // // }
+ // //}
+ // //if (height > 0)
+ // //{
+ // // row.Height = (short)(height * 17);
+ // //}
+
+ // // 添加数据
+ // cell = row.CreateCell(0);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue((i - 1).ToString());
+ // cell = row.CreateCell(1);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["ISO_IsoNo"].ToString());
+ // cell = row.CreateCell(2);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["JOT_JointNo"].ToString());
+ // cell = row.CreateCell(3);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["JOT_JointDesc"].ToString());
+ // cell = row.CreateCell(4);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["STE_Code"].ToString());
+ // cell = row.CreateCell(5);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["ThermocouplesNum"].ToString());
+ // cell = row.CreateCell(6);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["HeatingRange"].ToString());
+ // cell = row.CreateCell(7);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["InsulationRange"].ToString());
+ // cell = row.CreateCell(8);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["InsulationThickness"].ToString());
+ // cell = row.CreateCell(9);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["HotProessTrustCode"].ToString());
+ // cell = row.CreateCell(10);
+ // cell.CellStyle = cellStyle;
+ // string trustDate = string.Empty;
+ // if (tb.Rows[j]["TrustDate"] != DBNull.Value)
+ // {
+ // trustDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["TrustDate"]));
+ // }
+ // cell.SetCellValue(trustDate);
+ // cell = row.CreateCell(11);
+ // cell.CellStyle = cellStyle;
+ // string hotStartDate = string.Empty;
+ // if (tb.Rows[j]["HotStartDate"] != DBNull.Value)
+ // {
+ // hotStartDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["HotStartDate"]));
+ // }
+ // cell.SetCellValue(hotStartDate);
+ // cell = row.CreateCell(12);
+ // cell.CellStyle = cellStyle;
+ // string hotEndDate = string.Empty;
+ // if (tb.Rows[j]["HotEndDate"] != DBNull.Value)
+ // {
+ // hotEndDate = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(tb.Rows[j]["HotEndDate"]));
+ // }
+ // cell.SetCellValue(hotEndDate);
+ // cell = row.CreateCell(13);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(string.Empty);
+ // cell = row.CreateCell(14);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(string.Empty);
+ // cell = row.CreateCell(15);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(string.Empty);
+ // cell = row.CreateCell(16);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(string.Empty);
+ // cell = row.CreateCell(17);
+ // cell.CellStyle = cellStyle;
+ // cell.SetCellValue(tb.Rows[j]["Remark"].ToString());
+
+ // //if (attachFile1 != null)
+ // //{
+ // // string fp = BLL.Funs.RootPath + attachFile1.AttachUrl;
+ // // if (File.Exists(fp))
+ // // {
+ // // byte[] fileBytes = File.ReadAllBytes(fp);
+ // // TryAddPicture(sheet, i, 13, fileBytes, PictureType.PNG);
+ // // }
+ // //}
+ // //if (attachFile2 != null)
+ // //{
+ // // string fp = BLL.Funs.RootPath + attachFile2.AttachUrl;
+ // // if (File.Exists(fp))
+ // // {
+ // // byte[] fileBytes = File.ReadAllBytes(fp);
+ // // TryAddPicture(sheet, i, 14, fileBytes, PictureType.PNG);
+ // // }
+ // //}
+ // //if (attachFile3 != null)
+ // //{
+ // // string fp = BLL.Funs.RootPath + attachFile3.AttachUrl;
+ // // if (File.Exists(fp))
+ // // {
+ // // byte[] fileBytes = File.ReadAllBytes(fp);
+ // // TryAddPicture(sheet, i, 15, fileBytes, PictureType.PNG);
+ // // }
+ // //}
+ // //if (attachFile4 != null)
+ // //{
+ // // string fp = BLL.Funs.RootPath + attachFile4.AttachUrl;
+ // // if (File.Exists(fp))
+ // // {
+ // // byte[] fileBytes = File.ReadAllBytes(fp);
+ // // TryAddPicture(sheet, i, 16, fileBytes, PictureType.PNG);
+ // // }
+ // //}
+
+ // i++;
+ // //}
+ // }
+ // // 第三步:写入文件流
+ // using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write))
+ // {
+ // workbook.Write(stream);
+ // workbook.Close();
+ // }
+ // string fileName = Path.GetFileName(newUrl);
+ // FileInfo info = new FileInfo(newUrl);
+ // long fileSize = info.Length;
+ // Response.Clear();
+ // Response.ContentType = "application/x-zip-compressed";
+ // Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
+ // Response.AddHeader("Content-Length", fileSize.ToString());
+ // Response.TransmitFile(newUrl, 0, fileSize);
+ // Response.Flush();
+ // Response.Close();
+ // File.Delete(newUrl);
+ // }
+
+ //private void TryAddPicture(ISheet sheet, int row, int col, byte[] pictureBytes, PictureType pictureType = PictureType.PNG)
+ //{
+ // if (sheet is null)
+ // {
+ // throw new ArgumentNullException(nameof(sheet));
+ // }
+
+ // try
+ // {
+ // var pictureIndex = sheet.Workbook.AddPicture(pictureBytes, pictureType);
+
+ // var clientAnchor = sheet.Workbook.GetCreationHelper().CreateClientAnchor();
+ // clientAnchor.Row1 = row;
+ // clientAnchor.Col1 = col;
+
+ // var picture = (sheet.DrawingPatriarch ?? sheet.CreateDrawingPatriarch())
+ // .CreatePicture(clientAnchor, pictureIndex);
+ // picture.Resize();
+ // }
+ // catch (Exception ex)
+ // {
+
+ // }
+ //}
+
private void TryAddPicture(ISheet sheet, int row, int col, byte[] pictureBytes, PictureType pictureType = PictureType.PNG)
{
- if (sheet is null)
- {
+ if (sheet == null)
throw new ArgumentNullException(nameof(sheet));
- }
+ if (pictureBytes == null || pictureBytes.Length == 0)
+ return;
try
{
- var pictureIndex = sheet.Workbook.AddPicture(pictureBytes, pictureType);
+ int pictureIndex = sheet.Workbook.AddPicture(pictureBytes, pictureType);
- var clientAnchor = sheet.Workbook.GetCreationHelper().CreateClientAnchor();
+ IClientAnchor clientAnchor = sheet.Workbook.GetCreationHelper().CreateClientAnchor();
clientAnchor.Row1 = row;
clientAnchor.Col1 = col;
+ clientAnchor.Row2 = row + 1;
+ clientAnchor.Col2 = col + 1;
- var picture = (sheet.DrawingPatriarch ?? sheet.CreateDrawingPatriarch())
- .CreatePicture(clientAnchor, pictureIndex);
- picture.Resize();
+ IDrawing drawing = sheet.DrawingPatriarch ?? sheet.CreateDrawingPatriarch();
+ IPicture picture = drawing.CreatePicture(clientAnchor, pictureIndex);
+ picture.Resize(0.6); // 缩放
}
- catch (Exception ex)
+ catch
{
-
+ // 不抛异常,不影响导出
}
}
#endregion
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
index 69e5e56..eabf459 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfo.aspx.cs
@@ -525,7 +525,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
db.SubmitChanges();
BLL.HJGL_BO_BatchDetailService.DeleteBatchDetail(rowID); //删除批明细
BLL.HJGL_PW_JointInfoService.DeleteJointInfo(rowID);
- BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口信息");
+ var jot = BLL.HJGL_PW_JointInfoService.GetJointInfoByJotID(rowID);
+ BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "删除焊口[" + jot.JOT_JointNo + "]");
}
else
{
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs
index 258a7c5..63548d3 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/JointInfoEdit.aspx.cs
@@ -765,7 +765,7 @@
newJointInfo.JOT_ID = SQLHelper.GetNewID(typeof(Model.HJGL_PW_JointInfo));
this.JOT_ID = newJointInfo.JOT_ID;
BLL.HJGL_PW_JointInfoService.AddJointInfo(newJointInfo);
- BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加焊口信息!");
+ BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!");
}
catch
{
@@ -818,7 +818,7 @@
{
BLL.HJGL_PW_JointInfoService.UpdateJointNoAddG(this.JOT_ID, this.ddlJointAttribute.SelectedValue, Const.Add);
}
- BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改焊口信息!");
+ BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改[" + this.txtISONO.Text + "]管线下,焊口[" + newJointInfo.JOT_JointNo + "]!");
}
// 更新排序字段
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/PointManage.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/PointManage.aspx.cs
index 9b0d3e3..e9a5d97 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/PointManage.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/PointManage.aspx.cs
@@ -1344,9 +1344,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理未合格,";
}
- else if ((DateTime.Now - joint.HotResultDate.Value).Days < 1)
+ else
{
- EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理合格未满24小时,";
+ if (!string.IsNullOrEmpty(joint.STE_ID))
+ {
+ //材质有延迟裂纹倾向,热处理合格未满24小时提醒
+ var material = BLL.HJGL_MaterialService.GetSteelBySteID(joint.STE_ID);
+ if (material.IsCracking == true && (DateTime.Now - joint.HotResultDate.Value).Days < 1)
+ {
+ EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理合格未满24小时,";
+ }
+ }
}
}
}
@@ -1529,9 +1537,17 @@ namespace FineUIPro.Web.HJGL.WeldingManage
{
EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理未合格,";
}
- else if ((DateTime.Now - joint.HotResultDate.Value).Days < 1)
+ else
{
- EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理合格未满24小时,";
+ if (!string.IsNullOrEmpty(joint.STE_ID))
+ {
+ //材质有延迟裂纹倾向,热处理合格未满24小时提醒
+ var material = BLL.HJGL_MaterialService.GetSteelBySteID(joint.STE_ID);
+ if (material.IsCracking == true && (DateTime.Now - joint.HotResultDate.Value).Days < 1)
+ {
+ EventArg = EventArg + "焊口" + joint.JOT_JointNo + "热处理合格未满24小时,";
+ }
+ }
}
}
}
diff --git a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
index 0552477..7466cab 100644
--- a/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGL/WeldingManage/WeldReportEdit.aspx
@@ -43,7 +43,7 @@
-
+
diff --git a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx
index 77c83d5..baa012a 100644
--- a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx
+++ b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx
@@ -17,8 +17,8 @@
-
@@ -37,14 +37,14 @@
-
+
-
-
+ <%--
@@ -53,24 +53,25 @@
-
- --%>
+
-
-
-
-
+ <%--
+ --%>
+
+
+
-
@@ -90,30 +91,31 @@
+ LabelWidth="100px" BodyPadding="5px" Width="320px">
-
+ runat="server" LabelWidth="140px" LabelAlign="right">
-
-
+ --%>
+ LabelWidth="140px" LabelAlign="right" ShowRedStar="true" Required="true" >
-
+
-
-
@@ -186,8 +188,8 @@
var txtSte_NameClientID = '<%= txtSte_Name.ClientID %>';
var txtHardQuaStandardClientID = '<%= txtHardQuaStandard.ClientID %>';
var txtRemarkClientID = '<%= txtRemark.ClientID %>';
- var drpMaterialClassClientID = '<%= drpMaterialClass.ClientID %>';
- var drpMaterialGroupClientID = '<%= drpMaterialGroup.ClientID %>';
+ <%--var drpMaterialClassClientID = '<%= drpMaterialClass.ClientID %>';
+ var drpMaterialGroupClientID = '<%= drpMaterialGroup.ClientID %>';--%>
function onGridRowSelect(event, rowId) {
var grid = F(gridClientID);
@@ -206,8 +208,8 @@
F(txtHardQuaStandardClientID).setValue(rowValue['HardQuaStandard']);
F(txtRemarkClientID).setValue(rowValue['STE_Remark']);
- F(drpMaterialClassClientID).setValue(rowValue['MaterialType']);
- F(drpMaterialGroupClientID).setValue(rowValue['MaterialGroup']);
+ //F(drpMaterialClassClientID).setValue(rowValue['MaterialType']);
+ //F(drpMaterialGroupClientID).setValue(rowValue['MaterialGroup']);
// 更新提交按钮文本
F(btnSaveClientID).setText('提交数据(编辑)');
diff --git a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.cs b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.cs
index beec42f..b61e5ed 100644
--- a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.cs
@@ -41,17 +41,17 @@
this.drpSteType.DataBind();
Funs.FineUIPleaseSelect(this.drpSteType);
- this.drpMaterialClass.DataTextField = "MaterialClass";
- this.drpMaterialClass.DataValueField = "MaterialClassId";
- this.drpMaterialClass.DataSource = BLL.HJGL_MaterialClassService.GetMaterialClassList();
- this.drpMaterialClass.DataBind();
- Funs.FineUIPleaseSelect(this.drpMaterialClass);
+ //this.drpMaterialClass.DataTextField = "MaterialClass";
+ //this.drpMaterialClass.DataValueField = "MaterialClassId";
+ //this.drpMaterialClass.DataSource = BLL.HJGL_MaterialClassService.GetMaterialClassList();
+ //this.drpMaterialClass.DataBind();
+ //Funs.FineUIPleaseSelect(this.drpMaterialClass);
- this.drpMaterialGroup.DataTextField = "MaterialGroup";
- this.drpMaterialGroup.DataValueField = "MaterialGroupId";
- this.drpMaterialGroup.DataSource = (from x in Funs.DB.HJGL_BS_MaterialGroup orderby x.MaterialGroupCode select x).ToList();
- this.drpMaterialGroup.DataBind();
- Funs.FineUIPleaseSelect(this.drpMaterialGroup);
+ //this.drpMaterialGroup.DataTextField = "MaterialGroup";
+ //this.drpMaterialGroup.DataValueField = "MaterialGroupId";
+ //this.drpMaterialGroup.DataSource = (from x in Funs.DB.HJGL_BS_MaterialGroup orderby x.MaterialGroupCode select x).ToList();
+ //this.drpMaterialGroup.DataBind();
+ //Funs.FineUIPleaseSelect(this.drpMaterialGroup);
// 绑定表格
BindGrid();
}
@@ -66,7 +66,7 @@
{
string strSql = @"SELECT Steel.STE_ID,Steel.STE_Code,Steel.STE_Name,Steel.STE_SteelType,Steel.STE_Remark,
Steel.MaterialType,Steel.MaterialGroup,MaterialClas.MaterialClass as MaterialClassName,
- MaterialGroup.MaterialGroup as MaterialGroupName,Steel.HardQuaStandard,Steel.IsUse
+ MaterialGroup.MaterialGroup as MaterialGroupName,Steel.HardQuaStandard,Steel.IsUse,Steel.IsCracking
FROM HJGL_BS_Steel AS Steel
LEFT JOIN HJGL_BS_MaterialClass AS MaterialClas ON Steel.MaterialType=MaterialClas.MaterialClassId
LEFT JOIN HJGL_BS_MaterialGroup AS MaterialGroup ON Steel.MaterialGroup=MaterialGroup.MaterialGroupId
@@ -113,7 +113,14 @@
{
cbIsUse.Checked = false;
}
-
+ if (q.IsCracking == true)
+ {
+ cbIsCracking.Checked = true;
+ }
+ else
+ {
+ cbIsCracking.Checked = false;
+ }
}
#region 分页排序
@@ -275,8 +282,8 @@
{
this.ddlSteType.SelectedValue = Material.STE_SteelType;
}
- this.drpMaterialClass.SelectedValue = Material.MaterialType;
- this.drpMaterialGroup.SelectedValue = Material.MaterialGroup;
+ //this.drpMaterialClass.SelectedValue = Material.MaterialType;
+ //this.drpMaterialGroup.SelectedValue = Material.MaterialGroup;
this.txtHardQuaStandard.Text = Material.HardQuaStandard;
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
@@ -310,14 +317,14 @@
{
steel.STE_SteelType = this.ddlSteType.SelectedValue;
}
- if (this.drpMaterialClass.SelectedValue != BLL.Const._Null)
- {
- steel.MaterialType = this.drpMaterialClass.SelectedValue;
- }
- if (this.drpMaterialGroup.SelectedValue != BLL.Const._Null)
- {
- steel.MaterialGroup = this.drpMaterialGroup.SelectedValue;
- }
+ //if (this.drpMaterialClass.SelectedValue != BLL.Const._Null)
+ //{
+ // steel.MaterialType = this.drpMaterialClass.SelectedValue;
+ //}
+ //if (this.drpMaterialGroup.SelectedValue != BLL.Const._Null)
+ //{
+ // steel.MaterialGroup = this.drpMaterialGroup.SelectedValue;
+ //}
if (cbIsUse.Checked)
{
@@ -327,6 +334,14 @@
{
steel.IsUse = false;
}
+ if (cbIsCracking.Checked)
+ {
+ steel.IsCracking = true;
+ }
+ else
+ {
+ steel.IsCracking = false;
+ }
if (string.IsNullOrEmpty(strRowID))
{
@@ -490,19 +505,19 @@
///
///
///
- protected string ConvertMaterialType(object MaterialType)
- {
- string name = string.Empty;
- if (MaterialType != null)
- {
- var type = BLL.HJGL_MaterialClassService.GetMaterialClassById(MaterialType.ToString());
- if (type != null)
- {
- name =type.MaterialClass;
- }
- }
- return name;
- }
+ //protected string ConvertMaterialType(object MaterialType)
+ //{
+ // string name = string.Empty;
+ // if (MaterialType != null)
+ // {
+ // var type = BLL.HJGL_MaterialClassService.GetMaterialClassById(MaterialType.ToString());
+ // if (type != null)
+ // {
+ // name =type.MaterialClass;
+ // }
+ // }
+ // return name;
+ //}
///
/// 获取工作阶段
@@ -524,14 +539,14 @@
}
#endregion
- protected void drpMaterialClass_SelectedIndexChanged(object sender, EventArgs e)
- {
- this.drpMaterialGroup.Items.Clear();
- this.drpMaterialGroup.DataTextField = "MaterialGroup";
- this.drpMaterialGroup.DataValueField = "MaterialGroupId";
- this.drpMaterialGroup.DataSource = BLL.HJGL_MaterialGroupService.GetMaterialGroupByMaterialClassId(this.drpMaterialClass.SelectedValue);
- this.drpMaterialGroup.DataBind();
- Funs.FineUIPleaseSelect(this.drpMaterialGroup);
- }
+ //protected void drpMaterialClass_SelectedIndexChanged(object sender, EventArgs e)
+ //{
+ // this.drpMaterialGroup.Items.Clear();
+ // this.drpMaterialGroup.DataTextField = "MaterialGroup";
+ // this.drpMaterialGroup.DataValueField = "MaterialGroupId";
+ // this.drpMaterialGroup.DataSource = BLL.HJGL_MaterialGroupService.GetMaterialGroupByMaterialClassId(this.drpMaterialClass.SelectedValue);
+ // this.drpMaterialGroup.DataBind();
+ // Funs.FineUIPleaseSelect(this.drpMaterialGroup);
+ //}
}
}
\ No newline at end of file
diff --git a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.designer.cs
index b2ab646..469d8cb 100644
--- a/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/HJGLServer/BaseInfo/Material.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.HJGLServer.BaseInfo {
-
-
- public partial class Material {
-
+namespace FineUIPro.Web.HJGLServer.BaseInfo
+{
+
+
+ public partial class Material
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar2 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar2;
-
+
///
/// txtCode 控件。
///
@@ -65,7 +67,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtCode;
-
+
///
/// txtName 控件。
///
@@ -74,7 +76,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtName;
-
+
///
/// drpSteType 控件。
///
@@ -83,25 +85,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpSteType;
-
- ///
- /// Label1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.WebControls.Label Label1;
-
- ///
- /// Label2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::System.Web.UI.WebControls.Label Label2;
-
+
///
/// ToolbarSeparator1 控件。
///
@@ -110,7 +94,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -119,7 +103,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
@@ -128,7 +112,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlPageSize;
-
+
///
/// SimpleForm1 控件。
///
@@ -137,7 +121,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.SimpleForm SimpleForm1;
-
+
///
/// hfFormID 控件。
///
@@ -146,7 +130,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.HiddenField hfFormID;
-
+
///
/// txtSte_Code 控件。
///
@@ -155,7 +139,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtSte_Code;
-
+
///
/// txtSte_Name 控件。
///
@@ -164,25 +148,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtSte_Name;
-
- ///
- /// drpMaterialClass 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpMaterialClass;
-
- ///
- /// drpMaterialGroup 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpMaterialGroup;
-
+
///
/// ddlSteType 控件。
///
@@ -191,7 +157,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList ddlSteType;
-
+
///
/// txtHardQuaStandard 控件。
///
@@ -200,7 +166,16 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtHardQuaStandard;
-
+
+ ///
+ /// cbIsCracking 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.CheckBox cbIsCracking;
+
///
/// cbIsUse 控件。
///
@@ -209,7 +184,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.CheckBox cbIsUse;
-
+
///
/// txtRemark 控件。
///
@@ -218,7 +193,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextArea txtRemark;
-
+
///
/// Toolbar1 控件。
///
@@ -227,7 +202,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar1;
-
+
///
/// btnNew 控件。
///
@@ -236,7 +211,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnNew;
-
+
///
/// btnDelete 控件。
///
@@ -245,7 +220,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnDelete;
-
+
///
/// ToolbarFill1 控件。
///
@@ -254,7 +229,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnSave 控件。
///
@@ -263,7 +238,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Button btnSave;
-
+
///
/// Menu1 控件。
///
@@ -272,7 +247,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Menu Menu1;
-
+
///
/// btnMenuEdit 控件。
///
@@ -281,7 +256,7 @@ namespace FineUIPro.Web.HJGLServer.BaseInfo {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.MenuButton btnMenuEdit;
-
+
///
/// btnMenuDelete 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx
index da12d87..fd808e1 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx
@@ -19,6 +19,7 @@
+
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs
index fe0c406..0c919f0 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.cs
@@ -1,9 +1,12 @@
-using System;
+using BLL;
+using FineUIPro.Web.Welder;
+using Model;
+using System;
using System.Collections.Generic;
-using System.Data.SqlClient;
using System.Data;
+using System.Data.SqlClient;
using System.Linq;
-using BLL;
+using System.Web.DynamicData;
namespace FineUIPro.Web.WeldMat.UsingPlan
{
@@ -31,6 +34,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
if (!IsPostBack)
{
this.ProjectId = Request.Params["projectId"];
+ this.lblWED_ID.Text = Request.Params["wed_Id"];
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
this.drpWeldType.DataTextField = "WeldTypeName";
@@ -49,14 +53,42 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
///
private void BindGrid()
{
- string strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType,
+ string strSql = string.Empty;
+ bool isQua = false;
+ if (!string.IsNullOrEmpty(this.lblWED_ID.Text.Trim()))
+ {
+ var qualifiedProject = BLL.HJGL_WelderQualifiedProjectService.GetWelderQualifiedProjectByWedId(this.lblWED_ID.Text.Trim());
+ if (qualifiedProject.Count > 0)
+ {
+ //当材质类型为FeⅢ并且资质后面三个数中间的为11时可领用FeⅢ无保护气体焊丝
+ qualifiedProject = qualifiedProject.Where(e => e.MaterialType.Contains("FeⅢ") && e.QualifiedProjectCode.Contains("/11/")).ToList();
+ if (qualifiedProject.Count > 0)
+ {
+ isQua = true;
+ }
+ }
+ }
+
+ if (isQua)
+ {
+ strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType,
WeldType.WeldTypeName,WeldType.WeldUnit
FROM dbo.Weld_WeldInfo weld
LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId
WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0)
-and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
- //and (select (SUM(ISNULL(stockIn.Amount,0))-SUM(ISNULL(stockIn.UsingAmount,0))) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
- List listStr = new List();
+ and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
+ }
+ else
+ {
+ strSql = @"SELECT weld.WeldId, weld.WeldCode, weld.WeldName, weld.WeldSpec,weld.WeldTypeId,weld.SteelType,
+ WeldType.WeldTypeName,WeldType.WeldUnit
+ FROM dbo.Weld_WeldInfo weld
+ LEFT JOIN Weld_WeldType AS weldType ON weldType.WeldTypeId =weld.WeldTypeId
+ WHERE 1 = 1 and (weld.IsLock is null or weld.IsLock=0)
+ and weld.SteelType != 'FeⅢ无保护气体'
+ and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitStoreId=@UnitStoreId and WeldId=weld.WeldId)>0";
+ }
+ List listStr = new List();
//listStr.Add(new SqlParameter("@ProjectId", this.ProjectId));
listStr.Add(new SqlParameter("@UnitStoreId", Request.Params["unitStoreId"]));
if (drpWeldType.SelectedValue != BLL.Const._Null)
@@ -74,7 +106,6 @@ and (select SUM(ISNULL(stockIn.Amount,0)) from Weld_StockIn stockIn where UnitSt
strSql += " AND weld.WeldCode LIKE @WeldCode";
listStr.Add(new SqlParameter("@WeldCode", "%" + this.txtCode.Text.Trim() + "%"));
}
-
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs
index 597e282..e6d3376 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/ShowPlanWeld.aspx.designer.cs
@@ -7,11 +7,13 @@
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.WeldMat.UsingPlan {
-
-
- public partial class ShowPlanWeld {
-
+namespace FineUIPro.Web.WeldMat.UsingPlan
+{
+
+
+ public partial class ShowPlanWeld
+ {
+
///
/// Head1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
-
+
///
/// form1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// Grid1 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar2 控件。
///
@@ -65,7 +67,16 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar2;
-
+
+ ///
+ /// lblWED_ID 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblWED_ID;
+
///
/// txtName 控件。
///
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtName;
-
+
///
/// txtCode 控件。
///
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtCode;
-
+
///
/// drpWeldType 控件。
///
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.DropDownList drpWeldType;
-
+
///
/// ToolbarFill1 控件。
///
@@ -101,7 +112,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// Label1 控件。
///
@@ -110,7 +121,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Label Label1;
-
+
///
/// ToolbarSeparator1 控件。
///
@@ -119,7 +130,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
-
+
///
/// ToolbarText1 控件。
///
@@ -128,7 +139,7 @@ namespace FineUIPro.Web.WeldMat.UsingPlan {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarText ToolbarText1;
-
+
///
/// ddlPageSize 控件。
///
diff --git a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
index 1930f4a..d41eb95 100644
--- a/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
+++ b/HJGL_DS/FineUIPro.Web/WeldMat/UsingPlan/UsingPlanEdit.aspx.cs
@@ -579,7 +579,12 @@ namespace FineUIPro.Web.WeldMat.UsingPlan
Alert.ShowInTop("请选择焊材库!", MessageBoxIcon.Warning);
return;
}
- string window = String.Format("ShowPlanWeld.aspx?projectId={0}&unitStoreId={1}", drpProjectId.SelectedValue, this.drpUnitStore.SelectedValue, "编辑 - ");
+ if (string.IsNullOrEmpty(this.hdUsingMan1.Text.Trim()))
+ {
+ Alert.ShowInTop("请选择领料人!", MessageBoxIcon.Warning);
+ return;
+ }
+ string window = String.Format("ShowPlanWeld.aspx?projectId={0}&unitStoreId={1}&wed_Id={2}", drpProjectId.SelectedValue, this.drpUnitStore.SelectedValue, hdUsingMan1.Text.Trim(), "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdWeldId.ClientID) + Window1.GetShowReference(window));
}
diff --git a/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx b/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx
index 41b4ab2..8e2b53e 100644
--- a/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx
+++ b/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx
@@ -31,6 +31,7 @@
+
/// 项目id
///
- public string ProjectId
- {
- get
- {
- return (string)ViewState["ProjectId"];
- }
- set
- {
- ViewState["ProjectId"] = value;
- }
- }
+ //public string ProjectId
+ //{
+ // get
+ // {
+ // return (string)ViewState["ProjectId"];
+ // }
+ // set
+ // {
+ // ViewState["ProjectId"] = value;
+ // }
+ //}
#endregion
#region 加载
@@ -37,7 +37,8 @@ namespace FineUIPro.Web.common.ProjectSet
{
if (!IsPostBack)
{
- this.ProjectId = Request.Params["projectId"];
+ this.lblProjectId.Text = Request.Params["projectId"];
+ //this.ProjectId = Request.Params["projectId"];
BindGrid();
//InitTreeMenu();//加载树
}
@@ -76,7 +77,7 @@ namespace FineUIPro.Web.common.ProjectSet
WHERE WED_ID NOT IN(SELECT WED_ID FROM Project_Welder WHERE ProjectId =@ProjectId)
AND IsOAM=1";
List listStr = new List();
- listStr.Add(new SqlParameter("@ProjectId", ProjectId));
+ listStr.Add(new SqlParameter("@ProjectId", this.lblProjectId.Text.Trim()));
if (!string.IsNullOrEmpty(txtWeldCode.Text))
{
@@ -91,7 +92,7 @@ namespace FineUIPro.Web.common.ProjectSet
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
- tb = GetFilteredTable(Grid1.FilteredData, tb);
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
Grid1.DataSource = tb;
Grid1.DataBind();
}
@@ -140,7 +141,7 @@ namespace FineUIPro.Web.common.ProjectSet
{
Model.Project_Welder newProjectWelder = new Model.Project_Welder();
newProjectWelder.WED_ID = Grid1.DataKeys[i][0].ToString();
- newProjectWelder.ProjectId = this.ProjectId;
+ newProjectWelder.ProjectId = this.lblProjectId.Text.Trim(); //this.ProjectId;
newProjectWelder.IsSelected = true;
newProjectWelder.IsApprove = true;
newProjectWelder.ProjectWelderId = SQLHelper.GetNewID(typeof(Model.Project_Welder));
diff --git a/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx.designer.cs b/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx.designer.cs
index 6b668c7..bba9c55 100644
--- a/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx.designer.cs
+++ b/HJGL_DS/FineUIPro.Web/common/ProjectSet/SelectWelder.aspx.designer.cs
@@ -2,16 +2,18 @@
// <自动生成>
// 此代码由工具生成。
//
-// 对此文件的更改可能会导致不正确的行为,并且如果
-// 重新生成代码,这些更改将会丢失。
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
// 自动生成>
//------------------------------------------------------------------------------
-namespace FineUIPro.Web.common.ProjectSet {
-
-
- public partial class SelectWelder {
-
+namespace FineUIPro.Web.common.ProjectSet
+{
+
+
+ public partial class SelectWelder
+ {
+
///
/// form1 控件。
///
@@ -20,7 +22,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
-
+
///
/// PageManager1 控件。
///
@@ -29,7 +31,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.PageManager PageManager1;
-
+
///
/// Panel1 控件。
///
@@ -38,7 +40,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel Panel1;
-
+
///
/// panelCenterRegion 控件。
///
@@ -47,7 +49,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Panel panelCenterRegion;
-
+
///
/// Grid1 控件。
///
@@ -56,7 +58,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Grid Grid1;
-
+
///
/// Toolbar3 控件。
///
@@ -65,7 +67,16 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.Toolbar Toolbar3;
-
+
+ ///
+ /// lblProjectId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lblProjectId;
+
///
/// txtWeldCode 控件。
///
@@ -74,7 +85,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtWeldCode;
-
+
///
/// txtWeldName 控件。
///
@@ -83,7 +94,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.TextBox txtWeldName;
-
+
///
/// ToolbarFill1 控件。
///
@@ -92,7 +103,7 @@ namespace FineUIPro.Web.common.ProjectSet {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
///
protected global::FineUIPro.ToolbarFill ToolbarFill1;
-
+
///
/// btnEdit 控件。
///
diff --git a/HJGL_DS/Model/Model.cs b/HJGL_DS/Model/Model.cs
index f98f69f..e1eef6c 100644
--- a/HJGL_DS/Model/Model.cs
+++ b/HJGL_DS/Model/Model.cs
@@ -24850,6 +24850,8 @@ namespace Model
private System.Nullable _IsUse;
+ private System.Nullable _IsCracking;
+
private EntitySet _HJGL_BO_Batch;
private EntitySet _HJGL_BS_MaterialCompare;
@@ -24894,6 +24896,8 @@ namespace Model
partial void OnHardQuaStandardChanged();
partial void OnIsUseChanging(System.Nullable value);
partial void OnIsUseChanged();
+ partial void OnIsCrackingChanging(System.Nullable value);
+ partial void OnIsCrackingChanged();
#endregion
public HJGL_BS_Steel()
@@ -25092,6 +25096,26 @@ namespace Model
}
}
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCracking", DbType="Bit")]
+ public System.Nullable IsCracking
+ {
+ get
+ {
+ return this._IsCracking;
+ }
+ set
+ {
+ if ((this._IsCracking != value))
+ {
+ this.OnIsCrackingChanging(value);
+ this.SendPropertyChanging();
+ this._IsCracking = value;
+ this.SendPropertyChanged("IsCracking");
+ this.OnIsCrackingChanged();
+ }
+ }
+ }
+
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HJGL_BO_Batch_HJGL_BS_Steel", Storage="_HJGL_BO_Batch", ThisKey="STE_ID", OtherKey="STE_ID", DeleteRule="NO ACTION")]
public EntitySet HJGL_BO_Batch
{
@@ -131749,8 +131773,6 @@ namespace Model
private EntityRef _Base_Project;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -131772,7 +131794,6 @@ namespace Model
public Weld_ProjectPlan()
{
this._Base_Project = default(EntityRef);
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -131831,10 +131852,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -131938,40 +131955,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_ProjectPlan.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_ProjectPlan.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -132225,8 +132208,6 @@ namespace Model
private EntityRef _Weld_UsingPlan;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -132275,7 +132256,6 @@ namespace Model
this._Weld_Storeman = default(EntityRef);
this._Weld_UsingMat = default(EntityRef);
this._Weld_UsingPlan = default(EntityRef);
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -132354,10 +132334,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -132795,40 +132771,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMat_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_RecycleMat.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_RecycleMat.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -132892,8 +132834,6 @@ namespace Model
private EntityRef _Weld_UsingPlan;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -132934,7 +132874,6 @@ namespace Model
this._Weld_Storeman = default(EntityRef);
this._Weld_UsingMat = default(EntityRef);
this._Weld_UsingPlan = default(EntityRef);
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -133013,10 +132952,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -133374,40 +133309,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMatTop_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_RecycleMatTop.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_RecycleMatTop.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -134328,8 +134229,6 @@ namespace Model
private System.Nullable _Weight;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -134346,7 +134245,6 @@ namespace Model
public Weld_StockInit()
{
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -134381,10 +134279,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -134434,40 +134328,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_StockInit_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_StockInit.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_StockInit.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -135378,8 +135238,6 @@ namespace Model
private EntityRef _Weld_UsingPlan;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -135435,7 +135293,6 @@ namespace Model
this._Base_Project = default(EntityRef);
this._Weld_Storeman = default(EntityRef);
this._Weld_UsingPlan = default(EntityRef);
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -135514,10 +135371,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -136003,40 +135856,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingMat_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_UsingMat.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_UsingMat.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -136146,8 +135965,6 @@ namespace Model
private EntitySet _Weld_UsingMat;
- private EntityRef _Weld_WeldInfo;
-
#region 可扩展性方法定义
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
@@ -136211,7 +136028,6 @@ namespace Model
this._Weld_RecycleMat = new EntitySet(new Action(this.attach_Weld_RecycleMat), new Action(this.detach_Weld_RecycleMat));
this._Weld_RecycleMatTop = new EntitySet(new Action(this.attach_Weld_RecycleMatTop), new Action(this.detach_Weld_RecycleMatTop));
this._Weld_UsingMat = new EntitySet(new Action(this.attach_Weld_UsingMat), new Action(this.detach_Weld_UsingMat));
- this._Weld_WeldInfo = default(EntityRef);
OnCreated();
}
@@ -136246,10 +136062,6 @@ namespace Model
{
if ((this._WeldId != value))
{
- if (this._Weld_WeldInfo.HasLoadedOrAssignedValue)
- {
- throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
- }
this.OnWeldIdChanging(value);
this.SendPropertyChanging();
this._WeldId = value;
@@ -136778,40 +136590,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingPlan_Weld_WeldInfo", Storage="_Weld_WeldInfo", ThisKey="WeldId", OtherKey="WeldId", IsForeignKey=true)]
- public Weld_WeldInfo Weld_WeldInfo
- {
- get
- {
- return this._Weld_WeldInfo.Entity;
- }
- set
- {
- Weld_WeldInfo previousValue = this._Weld_WeldInfo.Entity;
- if (((previousValue != value)
- || (this._Weld_WeldInfo.HasLoadedOrAssignedValue == false)))
- {
- this.SendPropertyChanging();
- if ((previousValue != null))
- {
- this._Weld_WeldInfo.Entity = null;
- previousValue.Weld_UsingPlan.Remove(this);
- }
- this._Weld_WeldInfo.Entity = value;
- if ((value != null))
- {
- value.Weld_UsingPlan.Add(this);
- this._WeldId = value.WeldId;
- }
- else
- {
- this._WeldId = default(string);
- }
- this.SendPropertyChanged("Weld_WeldInfo");
- }
- }
- }
-
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
@@ -137101,7 +136879,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelType", DbType="NVarChar(10)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelType", DbType="NVarChar(50)")]
public string SteelType
{
get
@@ -137482,18 +137260,6 @@ namespace Model
private System.Nullable _IsLock;
- private EntitySet _Weld_ProjectPlan;
-
- private EntitySet _Weld_RecycleMat;
-
- private EntitySet _Weld_RecycleMatTop;
-
- private EntitySet _Weld_StockInit;
-
- private EntitySet _Weld_UsingMat;
-
- private EntitySet _Weld_UsingPlan;
-
private EntityRef _Weld_WeldType;
#region 可扩展性方法定义
@@ -137526,12 +137292,6 @@ namespace Model
public Weld_WeldInfo()
{
- this._Weld_ProjectPlan = new EntitySet(new Action(this.attach_Weld_ProjectPlan), new Action(this.detach_Weld_ProjectPlan));
- this._Weld_RecycleMat = new EntitySet(new Action(this.attach_Weld_RecycleMat), new Action(this.detach_Weld_RecycleMat));
- this._Weld_RecycleMatTop = new EntitySet(new Action(this.attach_Weld_RecycleMatTop), new Action(this.detach_Weld_RecycleMatTop));
- this._Weld_StockInit = new EntitySet(new Action(this.attach_Weld_StockInit), new Action(this.detach_Weld_StockInit));
- this._Weld_UsingMat = new EntitySet(new Action(this.attach_Weld_UsingMat), new Action(this.detach_Weld_UsingMat));
- this._Weld_UsingPlan = new EntitySet(new Action(this.attach_Weld_UsingPlan), new Action(this.detach_Weld_UsingPlan));
this._Weld_WeldType = default(EntityRef);
OnCreated();
}
@@ -137680,7 +137440,7 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelType", DbType="NVarChar(10)")]
+ [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SteelType", DbType="NVarChar(50)")]
public string SteelType
{
get
@@ -137760,84 +137520,6 @@ namespace Model
}
}
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_ProjectPlan_Weld_WeldInfo", Storage="_Weld_ProjectPlan", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_ProjectPlan
- {
- get
- {
- return this._Weld_ProjectPlan;
- }
- set
- {
- this._Weld_ProjectPlan.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMat_Weld_WeldInfo", Storage="_Weld_RecycleMat", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_RecycleMat
- {
- get
- {
- return this._Weld_RecycleMat;
- }
- set
- {
- this._Weld_RecycleMat.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_RecycleMatTop_Weld_WeldInfo", Storage="_Weld_RecycleMatTop", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_RecycleMatTop
- {
- get
- {
- return this._Weld_RecycleMatTop;
- }
- set
- {
- this._Weld_RecycleMatTop.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_StockInit_Weld_WeldInfo", Storage="_Weld_StockInit", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_StockInit
- {
- get
- {
- return this._Weld_StockInit;
- }
- set
- {
- this._Weld_StockInit.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingMat_Weld_WeldInfo", Storage="_Weld_UsingMat", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_UsingMat
- {
- get
- {
- return this._Weld_UsingMat;
- }
- set
- {
- this._Weld_UsingMat.Assign(value);
- }
- }
-
- [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_UsingPlan_Weld_WeldInfo", Storage="_Weld_UsingPlan", ThisKey="WeldId", OtherKey="WeldId", DeleteRule="NO ACTION")]
- public EntitySet Weld_UsingPlan
- {
- get
- {
- return this._Weld_UsingPlan;
- }
- set
- {
- this._Weld_UsingPlan.Assign(value);
- }
- }
-
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Weld_WeldInfo_Weld_WeldType", Storage="_Weld_WeldType", ThisKey="WeldTypeId", OtherKey="WeldTypeId", IsForeignKey=true)]
public Weld_WeldType Weld_WeldType
{
@@ -137891,78 +137573,6 @@ namespace Model
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
-
- private void attach_Weld_ProjectPlan(Weld_ProjectPlan entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_ProjectPlan(Weld_ProjectPlan entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
-
- private void attach_Weld_RecycleMat(Weld_RecycleMat entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_RecycleMat(Weld_RecycleMat entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
-
- private void attach_Weld_RecycleMatTop(Weld_RecycleMatTop entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_RecycleMatTop(Weld_RecycleMatTop entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
-
- private void attach_Weld_StockInit(Weld_StockInit entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_StockInit(Weld_StockInit entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
-
- private void attach_Weld_UsingMat(Weld_UsingMat entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_UsingMat(Weld_UsingMat entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
-
- private void attach_Weld_UsingPlan(Weld_UsingPlan entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = this;
- }
-
- private void detach_Weld_UsingPlan(Weld_UsingPlan entity)
- {
- this.SendPropertyChanging();
- entity.Weld_WeldInfo = null;
- }
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Weld_WeldType")]
diff --git a/HJGL_DS/WebAPI/WebAPI.csproj.user b/HJGL_DS/WebAPI/WebAPI.csproj.user
index ef14066..a48b337 100644
--- a/HJGL_DS/WebAPI/WebAPI.csproj.user
+++ b/HJGL_DS/WebAPI/WebAPI.csproj.user
@@ -1,4 +1,4 @@
-
+
Debug|Any CPU