diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
index 79410dd..23776b0 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
@@ -42,7 +42,7 @@
+ AutoLeafIdentification="true" EnableTextSelection="true">
@@ -107,12 +107,23 @@
-
+
+
+
+
+
+
+
+
+
+
+
@@ -132,10 +143,20 @@
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
TextAlign="Center" Width="120px">
-
+
+
+
+
+
+
diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs
index 92ae0a2..48fd5fd 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs
@@ -8,6 +8,7 @@ using System.Web;
using System.Collections;
using Model;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
+using FineUIPro.Web.common.ProjectSet;
namespace FineUIPro.Web.WeldingProcess.PMI
{
@@ -48,8 +49,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
{
if (!string.IsNullOrEmpty(this.txtNDEDateMonth.Text.Trim()))
{
- DateTime startTime = Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01");
- DateTime endTime = startTime.AddMonths(1);
this.tvControlItem.Nodes.Clear();
List units = new List();
Model.Project_Unit pUnit = BLL.Project_UnitService.GetProject_UnitByProjectIdUnitId(this.CurrUser.LoginProjectId, this.CurrUser.UnitId);
@@ -96,30 +95,20 @@ namespace FineUIPro.Web.WeldingProcess.PMI
///
private void BindNodes(TreeNode node)
{
+ DateTime startTime = Convert.ToDateTime(this.txtNDEDateMonth.Text.Trim() + "-01");
+ DateTime endTime = startTime.AddMonths(1);
+ string searchCode = this.txtSearchCode.Text.Trim();
if (node.ToolTip == "Unit")
{
- ///装置
- var install = (from x in Funs.DB.Project_Installation
- join y in Funs.DB.PMI_Delegation on x.InstallationId equals y.InstallationId
- where y.UnitId == node.NodeID && x.ProjectId == this.CurrUser.LoginProjectId
- orderby x.InstallationCode
- select x).Distinct();
- foreach (var q in install)
- {
- TreeNode newNode = new TreeNode();
- newNode.Text = q.InstallationName;
- newNode.NodeID = q.InstallationId + "|" + node.NodeID;
- newNode.ToolTip = "Installation";
- node.Nodes.Add(newNode);
- BindNodes(newNode);
- }
- }
- else if (node.ToolTip == "Installation")
- {
- string[] unitAndInstallationArr= node.NodeID.Split('|');
- var ndt = from x in Funs.DB.PMI_Delegation where x.UnitId == unitAndInstallationArr[1]
- && x.InstallationId == unitAndInstallationArr[0]
- && x.ProjectId == this.CurrUser.LoginProjectId select x;
+ string unitId = node.NodeID;
+ var ndt = from x in Funs.DB.PMI_Delegation
+ where x.UnitId == unitId
+ && x.ProjectId == this.CurrUser.LoginProjectId
+ && x.DelegationDate >= startTime && x.DelegationDate <= endTime
+ &&( x.DelegationNo.Contains(searchCode)|| searchCode=="")
+ select x;
+ //if (!string.IsNullOrWhiteSpace(searchCode))
+ // ndt = ndt.Where(q => q.DelegationNo.Contains(searchCode));
foreach (var q in ndt)
{
@@ -130,8 +119,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
BindNodes(newNode);
- }
- }
+ }
+ }
}
#endregion
@@ -162,12 +151,51 @@ namespace FineUIPro.Web.WeldingProcess.PMI
{
if (!string.IsNullOrWhiteSpace(this.hdPMIId.Text) && this.tvControlItem.SelectedNode.ToolTip == "DelegationNo")
{
+ string strSql = string.Empty;
+ List listStr = new List();
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入提交信息
-
+
+ if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
+ {
+ var result = Funs.DB.PMI_Delegation.FirstOrDefault(t => t.Id == this.tvControlItem.SelectedNodeID);
+ if (result != null)
+ {
+ this.PMIID = result.Id;
+ strSql = @"SELECT *,
+ (case status when 0 then '合格' else '不合格' end) StatusText
+ FROM [View_PMI_DelegationDetails] WHERE ProjectId= @ProjectId AND PMIID=@PMIDelegationId ";
+
+ listStr.Add(new SqlParameter("@ProjectId", result != null ? result.ProjectId : this.CurrUser.LoginProjectId));
+ listStr.Add(new SqlParameter("@PMIDelegationId", this.PMIID));
+
+ if (!string.IsNullOrEmpty(this.txtIsoNo.Text.Trim()))
+ {
+ strSql += @" and PipelineCode like '%'+@PipelineCode+'%' ";
+ listStr.Add(new SqlParameter("@PipelineCode", this.txtIsoNo.Text.Trim()));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ // 2.获取当前分页数据
+ //var table = this.GetPagedDataTable(Grid1, tb1);
+ Grid1.RecordCount = tb.Rows.Count;
+ //tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+ }
}
}
+ private string StatusText(int status) {
+ if (status == 0)
+ return "合格";
+ else
+ return "不合格";
+ }
+
#region 加载页面输入提交信息
///
/// 加载页面输入提交信息
@@ -185,9 +213,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
DelegationDate=x.DelegationDate,
InstallationName=n.InstallationName,
UnitName=y.UnitName,
- DetectionMethod="待定",
+ DetectionMethod="PMI光谱分析",
Tabler=x.Tabler,
Remark=x.Remark,
+ DetectionStandard=x.DetectionStandard,
}).ToList();
if (pageInfo.Count>0)
{
@@ -198,6 +227,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
this.txtDetectionMethod.Text = pageInfo[0].DetectionMethod;
this.txtTabler.Text = pageInfo[0].Tabler;
this.txtRemark.Text = pageInfo[0].Remark;
+ this.txtDetectionStandard.Text= pageInfo[0].DetectionStandard;
}
}
#endregion
@@ -214,6 +244,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
this.txtDetectionMethod.Text = string.Empty;
this.txtTabler.Text = string.Empty;
this.txtRemark.Text = string.Empty;
+ this.txtDetectionStandard.Text = string.Empty;
}
#endregion
diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
index 76a035a..76109ee 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
@@ -221,6 +221,33 @@ namespace FineUIPro.Web.WeldingProcess.PMI
///
protected global::FineUIPro.Grid Grid1;
+ ///
+ /// Toolbar3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar3;
+
+ ///
+ /// txtIsoNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtIsoNo;
+
+ ///
+ /// ToolbarFill2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill2;
+
///
/// ToolbarSeparator1 控件。
///