123123
This commit is contained in:
parent
8e6eedf614
commit
11bd257838
|
@ -107,7 +107,7 @@
|
|||
</f:Form>
|
||||
</Items>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="<%$ Resources:Lan,HotProessTrust %>"
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false"
|
||||
EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="ID"
|
||||
AllowCellEditing="true" AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2"
|
||||
DataIDField="ID" AllowSorting="true" SortField="PipelineCode,WeldJointCode"
|
||||
|
@ -121,6 +121,8 @@
|
|||
</f:TextBox>
|
||||
<f:ToolbarFill ID="ToolbarFill2" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Text="保存" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
|
@ -143,28 +145,49 @@
|
|||
DataField="MaterialCode" SortField="MaterialCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Center" Width="120px">
|
||||
</f:RenderField>
|
||||
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,QualityNo %>" ColumnID="QualityNo" DataField="QualityNo"
|
||||
FieldType="String" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,Acceptance %>" ColumnID="Acceptance"
|
||||
DataField="Acceptance" FieldType="String" TextAlign="Left" Width="150px">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="检测日期" ColumnID="CreatedTime"
|
||||
<%-- 检测日期 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,FilmDate %>" ColumnID="TrustDate"
|
||||
DataField="TrustDate" SortField="TrustDate" FieldType="Date" Renderer="Date"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
<Editor>
|
||||
<f:DatePicker ID="tbxTrustDate" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<%-- 报告日期 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,ReportDate %>" ColumnID="CreatedTime"
|
||||
DataField="CreatedTime" SortField="CreatedTime" FieldType="Date" Renderer="Date"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px">
|
||||
<Editor>
|
||||
<f:DatePicker ID="tbxCreatedTime" Required="true" runat="server">
|
||||
</f:DatePicker>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="报告日期" FieldType="String" HeaderTextAlign="Center"
|
||||
<%-- 报告编号 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,ReportNo %>" ColumnID="reportNo"
|
||||
DataField="reportNo" SortField="reportNo" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:TextBox ID="tbxreportNo" Required="true" runat="server">
|
||||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="报告编号" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
</f:RenderField>
|
||||
|
||||
|
||||
<%-- 是否合格 --%>
|
||||
<f:RenderField HeaderText="<%$ Resources:Lan,IsPass %>" ColumnID="StatusText"
|
||||
DataField="StatusText" SortField="status" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="100px">
|
||||
<Editor>
|
||||
<f:DropDownList ID="drpstatus" runat="server" ShowRedStar="true" Required="true" >
|
||||
<f:ListItem Value="合格" Text="合格" />
|
||||
<f:ListItem Value="不合格" Text="不合格" />
|
||||
</f:DropDownList>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
|
|
|
@ -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 加载页面输入提交信息
|
||||
/// <summary>
|
||||
/// 加载页面输入提交信息
|
||||
|
@ -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
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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<string>("status");
|
||||
if (status == "modified")
|
||||
{
|
||||
JObject values = teamGroupRow.Value<JObject>("values");
|
||||
string id = teamGroupRow.Value<string>("id");
|
||||
Model.PMI_DelegationDetails onePMIDelegationDetails = Funs.DB.PMI_DelegationDetails.FirstOrDefault(p => p.Id == id);
|
||||
if (onePMIDelegationDetails == null)
|
||||
continue;
|
||||
//检测日期(缺失)
|
||||
string trustDate = values.Value<string>("TrustDate");
|
||||
if (string.IsNullOrWhiteSpace(trustDate))
|
||||
;
|
||||
else
|
||||
;
|
||||
//报告日期
|
||||
string createdTime = values.Value<string>("CreatedTime");
|
||||
if (string.IsNullOrWhiteSpace(createdTime))
|
||||
onePMIDelegationDetails.CreatedTime=null;
|
||||
else
|
||||
onePMIDelegationDetails.CreatedTime=Convert.ToDateTime(createdTime);
|
||||
//报告编号
|
||||
onePMIDelegationDetails.ReportNo = values.Value<string>("reportNo").ToString();
|
||||
//是否合格 0合格 1不合格
|
||||
string statusText = values.Value<string>("StatusText");
|
||||
if (statusText == "合格")
|
||||
onePMIDelegationDetails.Status = 0;
|
||||
else
|
||||
onePMIDelegationDetails.Status = 1;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
ShowNotify("数据保存成功!(表格数据已重新绑定)");
|
||||
}
|
||||
}
|
||||
}
|
|
@ -248,6 +248,51 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
|||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill2;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// tbxTrustDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker tbxTrustDate;
|
||||
|
||||
/// <summary>
|
||||
/// tbxCreatedTime 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker tbxCreatedTime;
|
||||
|
||||
/// <summary>
|
||||
/// tbxreportNo 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox tbxreportNo;
|
||||
|
||||
/// <summary>
|
||||
/// drpstatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpstatus;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarSeparator1 控件。
|
||||
/// </summary>
|
||||
|
|
Loading…
Reference in New Issue