diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
index de1f1f9..0e97b6c 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx
@@ -107,7 +107,7 @@
-
+
+
@@ -143,28 +145,49 @@
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 48fd5fd..cce02e4 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.cs
@@ -9,6 +9,7 @@ using System.Collections;
using Model;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
using FineUIPro.Web.common.ProjectSet;
+using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.WeldingProcess.PMI
{
@@ -105,7 +106,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
where x.UnitId == unitId
&& x.ProjectId == this.CurrUser.LoginProjectId
&& x.DelegationDate >= startTime && x.DelegationDate <= endTime
- &&( x.DelegationNo.Contains(searchCode)|| searchCode=="")
+ && (x.DelegationNo.Contains(searchCode) || searchCode == "")
select x;
//if (!string.IsNullOrWhiteSpace(searchCode))
// ndt = ndt.Where(q => q.DelegationNo.Contains(searchCode));
@@ -120,7 +121,7 @@ namespace FineUIPro.Web.WeldingProcess.PMI
node.Nodes.Add(newNode);
BindNodes(newNode);
}
- }
+ }
}
#endregion
@@ -189,13 +190,6 @@ namespace FineUIPro.Web.WeldingProcess.PMI
}
}
- private string StatusText(int status) {
- if (status == 0)
- return "合格";
- else
- return "不合格";
- }
-
#region 加载页面输入提交信息
///
/// 加载页面输入提交信息
@@ -208,17 +202,19 @@ namespace FineUIPro.Web.WeldingProcess.PMI
join n in Funs.DB.Project_Installation on x.InstallationId equals n.InstallationId
join u in Funs.DB.Sys_User on x.DetectionStandard equals u.UserId into u1 //左连接查询
from u in u1.DefaultIfEmpty()
- where x.Id==hdPMIId.Text
- select new { DelegationNo=x.DelegationNo,
- DelegationDate=x.DelegationDate,
- InstallationName=n.InstallationName,
- UnitName=y.UnitName,
- DetectionMethod="PMI光谱分析",
- Tabler=x.Tabler,
- Remark=x.Remark,
- DetectionStandard=x.DetectionStandard,
+ where x.Id == hdPMIId.Text
+ select new
+ {
+ DelegationNo = x.DelegationNo,
+ DelegationDate = x.DelegationDate,
+ InstallationName = n.InstallationName,
+ UnitName = y.UnitName,
+ DetectionMethod = "PMI光谱分析",
+ Tabler = x.Tabler,
+ Remark = x.Remark,
+ DetectionStandard = x.DetectionStandard,
}).ToList();
- if (pageInfo.Count>0)
+ if (pageInfo.Count > 0)
{
this.txtDelegationNo.Text = pageInfo[0].DelegationNo;
this.txtDelegationDate.Text = pageInfo[0].DelegationDate.ToString();
@@ -227,7 +223,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;
+ this.txtDetectionStandard.Text = pageInfo[0].DetectionStandard;
}
}
#endregion
@@ -325,5 +321,60 @@ namespace FineUIPro.Web.WeldingProcess.PMI
return str;
}
#endregion
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ //if (!CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.BItemEndCheckMenuId, Const.BtnSave))
+ //{
+ // ShowNotify("您没有这个权限,请与管理员联系!");
+ // return;
+ //}
+
+ if (Grid1.GetModifiedData().Count > 0)
+ {
+ JArray teamGroupData = Grid1.GetMergedData();
+ foreach (JObject teamGroupRow in teamGroupData)
+ {
+ string status = teamGroupRow.Value("status");
+ if (status == "modified")
+ {
+ JObject values = teamGroupRow.Value("values");
+ string id = teamGroupRow.Value("id");
+ Model.PMI_DelegationDetails onePMIDelegationDetails = Funs.DB.PMI_DelegationDetails.FirstOrDefault(p => p.Id == id);
+ if (onePMIDelegationDetails == null)
+ continue;
+ //检测日期(缺失)
+ string trustDate = values.Value("TrustDate");
+ if (string.IsNullOrWhiteSpace(trustDate))
+ ;
+ else
+ ;
+ //报告日期
+ string createdTime = values.Value("CreatedTime");
+ if (string.IsNullOrWhiteSpace(createdTime))
+ onePMIDelegationDetails.CreatedTime=null;
+ else
+ onePMIDelegationDetails.CreatedTime=Convert.ToDateTime(createdTime);
+ //报告编号
+ onePMIDelegationDetails.ReportNo = values.Value("reportNo").ToString();
+ //是否合格 0合格 1不合格
+ string statusText = values.Value("StatusText");
+ if (statusText == "合格")
+ onePMIDelegationDetails.Status = 0;
+ else
+ onePMIDelegationDetails.Status = 1;
+ Funs.DB.SubmitChanges();
+ }
+ }
+ this.BindGrid();
+ }
+
+ ShowNotify("数据保存成功!(表格数据已重新绑定)");
+ }
}
}
\ No newline at end of file
diff --git a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
index 76109ee..285256e 100644
--- a/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
+++ b/HJGL/FineUIPro.Web/WeldingProcess/PMI/PMIDetectionEntry.aspx.designer.cs
@@ -248,6 +248,51 @@ namespace FineUIPro.Web.WeldingProcess.PMI
///
protected global::FineUIPro.ToolbarFill ToolbarFill2;
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// tbxTrustDate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker tbxTrustDate;
+
+ ///
+ /// tbxCreatedTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker tbxCreatedTime;
+
+ ///
+ /// tbxreportNo 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox tbxreportNo;
+
+ ///
+ /// drpstatus 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpstatus;
+
///
/// ToolbarSeparator1 控件。
///