20260408 热处理硬度委托
This commit is contained in:
parent
4f2160ff91
commit
78088aad6a
|
|
@ -101,7 +101,7 @@
|
|||
<f:RenderField HeaderText="热处理曲线编号" ColumnID="RecordChartNo" DataField="RecordChartNo" SortField="RecordChartNo"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="200px">
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="90px" HeaderText="硬度委托" HeaderTextAlign="Center" ID="IsNeedHardTest" TextAlign="Center">
|
||||
<f:TemplateField Width="90px" HeaderText="硬度委托" HeaderTextAlign="Center" ColumnID="IsNeedHardTest" ID="IsNeedHardTest" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbIsNeedHardTest" runat="server" AutoPostBack="true" OnCheckedChanged="cbIsNeedHardTest_OnCheckedChanged"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
|
|
@ -114,12 +114,12 @@
|
|||
</f:TextBox>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:TemplateField Width="90px" HeaderText="硬度合格" HeaderTextAlign="Center" ID="HardIsOK" TextAlign="Center">
|
||||
<f:TemplateField Width="90px" HeaderText="硬度合格" HeaderTextAlign="Center" ColumnID="HardIsOK" ID="HardIsOK" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="Label1" runat="server" Text='<%# ConvertHardTestResult(Eval("HotProessResultId")) %>' ></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:TemplateField Width="130px" HeaderText="热处理合格" HeaderTextAlign="Center" ID="IsOK" TextAlign="Center">
|
||||
<f:TemplateField Width="130px" HeaderText="热处理合格" HeaderTextAlign="Center" ColumnID="IsOK" ID="IsOK" TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:CheckBox ID="cbIsOK" runat="server"></asp:CheckBox>
|
||||
</ItemTemplate>
|
||||
|
|
|
|||
|
|
@ -40,6 +40,8 @@ namespace FineUIPro.Web.HJGL.HotProessManage
|
|||
this.InitTreeMenu();
|
||||
}
|
||||
|
||||
private static DataTable tb = null;
|
||||
|
||||
private void BindGrid()
|
||||
{
|
||||
string strSql = string.Empty;
|
||||
|
|
@ -77,11 +79,11 @@ namespace FineUIPro.Web.HJGL.HotProessManage
|
|||
strSql += @" AND IsOK is null";
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
// 2.获取当前分页数据
|
||||
//var table = this.GetPagedDataTable(Grid1, tb1);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
|
|
@ -114,31 +116,57 @@ namespace FineUIPro.Web.HJGL.HotProessManage
|
|||
|
||||
protected void cbIsNeedHardTest_OnCheckedChanged(object sender, EventArgs e)
|
||||
{
|
||||
System.Web.UI.WebControls.CheckBox cbIsNeedHardTest = sender as System.Web.UI.WebControls.CheckBox;
|
||||
for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
#region 勾选当前行更新当前行数据
|
||||
//System.Web.UI.WebControls.CheckBox cbIsNeedHardTest = sender as System.Web.UI.WebControls.CheckBox;
|
||||
//for (int i = 0; i < this.Grid1.Rows.Count; i++)
|
||||
//{
|
||||
// System.Web.UI.WebControls.CheckBox cbIsNeedHardTest1 = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsNeedHardTest"));
|
||||
// if (cbIsNeedHardTest.ClientID == cbIsNeedHardTest1.ClientID)
|
||||
// {
|
||||
// if (cbIsNeedHardTest.Checked)
|
||||
// {
|
||||
// Model.HJGL_CH_HotProessResult result = BLL.HJGL_CH_HotProessResultService.GetHotProessResultByID(this.Grid1.Rows[i].DataKeys[0].ToString());
|
||||
// result.IsNeedHardTest = true;
|
||||
// result.IsOK = true;
|
||||
// if (result.ResultDate == null)
|
||||
// {
|
||||
// result.ResultDate = DateTime.Now;
|
||||
// }
|
||||
// BLL.HJGL_CH_HotProessResultService.UpdateHotProessResult(result);
|
||||
// if (result.ProessTypes == "4" || result.ProessTypes == "5")
|
||||
// {
|
||||
// //回写热处理合格及反馈时间
|
||||
// BLL.HJGL_PW_JointInfoService.WriteBackHotProessResultOKAndDate(result.JOT_ID, true);
|
||||
// }
|
||||
// BindGrid();
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
#endregion
|
||||
|
||||
// 点击任意一个CheckBox,就让【所有行全部勾选】并批量更新
|
||||
foreach (DataRow dr in tb.Rows)
|
||||
{
|
||||
System.Web.UI.WebControls.CheckBox cbIsNeedHardTest1 = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsNeedHardTest"));
|
||||
if (cbIsNeedHardTest.ClientID == cbIsNeedHardTest1.ClientID)
|
||||
int rowCount = tb.Rows.Count;
|
||||
string resultId = dr["HotProessResultId"].ToString();
|
||||
Model.HJGL_CH_HotProessResult result = BLL.HJGL_CH_HotProessResultService.GetHotProessResultByID(resultId);
|
||||
if (result == null) continue;
|
||||
|
||||
// 全部设为需要硬度检测 + 合格
|
||||
result.IsNeedHardTest = true;
|
||||
result.IsOK = true;
|
||||
if (result.ResultDate == null)
|
||||
{
|
||||
if (cbIsNeedHardTest.Checked)
|
||||
{
|
||||
Model.HJGL_CH_HotProessResult result = BLL.HJGL_CH_HotProessResultService.GetHotProessResultByID(this.Grid1.Rows[i].DataKeys[0].ToString());
|
||||
result.IsNeedHardTest = true;
|
||||
result.IsOK = true;
|
||||
if (result.ResultDate == null)
|
||||
{
|
||||
result.ResultDate = DateTime.Now;
|
||||
}
|
||||
BLL.HJGL_CH_HotProessResultService.UpdateHotProessResult(result);
|
||||
if (result.ProessTypes == "4" || result.ProessTypes == "5")
|
||||
{
|
||||
//回写热处理合格及反馈时间
|
||||
BLL.HJGL_PW_JointInfoService.WriteBackHotProessResultOKAndDate(result.JOT_ID, true);
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
result.ResultDate = DateTime.Now;
|
||||
}
|
||||
// 回写焊口状态
|
||||
if (result.ProessTypes == "4" || result.ProessTypes == "5")
|
||||
{
|
||||
BLL.HJGL_PW_JointInfoService.WriteBackHotProessResultOKAndDate(result.JOT_ID, true);
|
||||
}
|
||||
BLL.HJGL_CH_HotProessResultService.UpdateHotProessResult(result);
|
||||
}
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#region 查询
|
||||
|
|
|
|||
|
|
@ -2,15 +2,17 @@
|
|||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果
|
||||
// 重新生成代码,这些更改将会丢失。
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.HJGL.HotProessManage {
|
||||
namespace FineUIPro.Web.HJGL.HotProessManage
|
||||
{
|
||||
|
||||
|
||||
public partial class HotProessResult {
|
||||
public partial class HotProessResult
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpIsoId" runat="server" Label="管线号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoId_SelectedIndexChanged"></f:DropDownList>
|
||||
<f:DropDownList ID="drpIsoId" runat="server" Label="管线号" LabelAlign="Right" AutoPostBack="true" OnSelectedIndexChanged="drpIsoId_SelectedIndexChanged" EnableEdit="true"></f:DropDownList>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnPrint" Text="管道焊接工作记录打印" Icon="Printer" runat="server" OnClick="btnPrint_Click">
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtWarrantybook" runat="server" Label="入库自编号" LabelAlign="Right" Required="true"
|
||||
ShowRedStar="true">
|
||||
ShowRedStar="true" AutoPostBack="true" OnTextChanged="txtWarrantybook_TextChanged">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtWeldType" runat="server" Label="类型" LabelAlign="Right" Readonly="true">
|
||||
</f:TextBox>
|
||||
|
|
|
|||
|
|
@ -467,6 +467,20 @@ namespace FineUIPro.Web.WeldMat.Stock
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 输入入库自编号同步到质保书自编号
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void txtWarrantybook_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
this.txtWarrantyNo.Text = string.Empty;
|
||||
if (!string.IsNullOrEmpty(this.txtWarrantybook.Text.Trim()))
|
||||
{
|
||||
this.txtWarrantyNo.Text = this.txtWarrantybook.Text.Trim();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
//protected void rblIsReview_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
|
|
|||
Loading…
Reference in New Issue