This commit is contained in:
jackchenyang 2024-05-12 15:28:06 +08:00
parent 66f479da9c
commit e256485115
7 changed files with 56 additions and 36 deletions

Binary file not shown.

View File

@ -3,7 +3,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>热处理委托及数据录入</title>
<title>PMI处理委托</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
@ -12,7 +12,7 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
EnableCollapse="true" Width="320px" Title="<%$ Resources:Lan,HotProessTrust %>"
EnableCollapse="true" Width="320px" Title="<%$ Resources:Lan,PMIDelegationTrust %>"
ShowBorder="true" Layout="VBox" ShowHeader="false" AutoScroll="true" BodyPadding="5px"
IconFont="ArrowCircleLeft">
<Toolbars>
@ -179,8 +179,8 @@
</f:Panel>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Top" EnableResize="true" runat="server" OnClose="Window1_Close"
<f:Window ID="Window2" Title="<%$ Resources:Lan,PopForm %>" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close"
IsModal="true" Width="1090px" Height="660px">
</f:Window>

View File

@ -7,6 +7,7 @@ using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using static System.Windows.Forms.VisualStyles.VisualStyleElement;
namespace FineUIPro.Web.WeldingProcess.PMI
{
@ -280,8 +281,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
{
this.SetTextTemp();
string window = String.Format("PMIDelegationEdit.aspx", string.Empty, "新增 - ") ;
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.PMIDelegationId)
+ Window1.GetShowReference(window));
PageContext.RegisterStartupScript(Window2.GetSaveStateReference(this.PMIDelegationId)
+ Window2.GetShowReference(window));
}
else
{
@ -303,8 +304,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
if (trustManage != null)
{
string window = String.Format("PMIDelegationEdit.aspx?PMIDelegationId={0}", this.PMIDelegationId, "编辑 - ");
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.PMIDelegationId)
+ Window1.GetShowReference(window));
PageContext.RegisterStartupScript(Window2.GetSaveStateReference(this.PMIDelegationId)
+ Window2.GetShowReference(window));
}
else
{

View File

@ -303,12 +303,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
protected global::FineUIPro.Window Window2;
}
}

View File

@ -4,7 +4,7 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>编辑热处理委托及数据录入</title>
<title>编辑PMI处理委托</title>
<base target="_self" />
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
@ -14,8 +14,8 @@
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
<Items>
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,HotProessTrust %>"
TitleToolTip="<%$ Resources:Lan,HotProessTrust %>" AutoScroll="true">
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" Title="<%$ Resources:Lan,PMIDelegationTrust %>"
TitleToolTip="<%$ Resources:Lan,PMIDelegationTrust %>" AutoScroll="true">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
<Items>

View File

@ -196,7 +196,8 @@ namespace FineUIPro.Web.WeldingProcess.PMI
}
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PMIDelegationId));
PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(this.PMIDelegationId)
+ ActiveWindow.GetHideReference());
}
else
{
@ -325,13 +326,10 @@ namespace FineUIPro.Web.WeldingProcess.PMI
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var item = GetHotProessTrustItem.FirstOrDefault(x => x.WeldJointId == rowID);
if (item != null)
{
if (string.IsNullOrEmpty(this.PMIDelegationId)) //新增记录可直接删除
{
GetHotProessTrustItem.Remove(item);
}
}
}
BindGrid(GetHotProessTrustItem);
ShowNotify(Resources.Lan.DeletedSuccessfully, MessageBoxIcon.Success);
}

View File

@ -120,31 +120,52 @@ namespace FineUIPro.Web.WeldingProcess.PMI
/// </summary>
private void BindGrid()
{
string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
PipingClassCode,PipeSegment,JointAttribute,PageNum,
ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
MaterialCode,WeldingDate,
(CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
var listData = (from a in Funs.DB.PMI_Delegation.AsQueryable()
join
b in Funs.DB.PMI_DelegationDetails.AsQueryable() on
a.Id equals b.PMIId
select b.JointId
).Distinct().ToList();
List<SqlParameter> paramsList = new List<SqlParameter>();
// string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
// convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
//dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
// PipingClassCode,PipeSegment,JointAttribute,PageNum,
// ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
// WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
// WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
// BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
// MaterialCode,WeldingDate,
// (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
// FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
// List<SqlParameter> paramsList = new List<SqlParameter>();
// if (!string.IsNullOrEmpty(this.txtJointNo.Text))
// {
// sql += @" and WeldJointCode=@WeldJointCode";
// paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
// }
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
// {
// sql += @" and PipelineId=@PipelineId ";
// paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
// }
// var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true);
if (listData.Count > 0)
{
query = query.Where(t => !listData.Contains(t.WeldJointId));
}
if (!string.IsNullOrEmpty(this.txtJointNo.Text))
{
sql += @" and WeldJointCode=@WeldJointCode";
paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
query = query.Where(t => t.WeldJointCode == this.txtJointNo.Text);
}
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
{
sql += @" and PipelineId=@PipelineId ";
paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID);
}
var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
Grid1.DataSource = dt;
Grid1.DataSource = query.ToList();
Grid1.DataBind();
}
#endregion