91 lines
4.0 KiB
C#
91 lines
4.0 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
using BLL;
|
|
|
|
namespace FineUIPro.Web.WeldingProcess.WeldingManage
|
|
{
|
|
public partial class JointInfoCopy : PageBase
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
LoadData();
|
|
string weldJointId = Request.Params["WeldJointId"];
|
|
|
|
if (!string.IsNullOrEmpty(weldJointId))
|
|
{
|
|
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(weldJointId);
|
|
if (jot != null)
|
|
{
|
|
var pipe = BLL.Pipeline_PipelineService.GetPipelineByPipelineId(jot.PipelineId);
|
|
lbPipe.Text = "在管线号为:" + pipe.PipelineCode + " 焊口号为:" + jot.WeldJointCode + " 上增口";
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
string jotId = Request.Params["WeldJointId"];
|
|
var jot = BLL.Pipeline_WeldJointService.GetWeldJointByWeldJointId(jotId);
|
|
if (jot != null)
|
|
{
|
|
if (BLL.Pipeline_WeldJointService.IsExistWeldJointCode(this.txtWeldJointCode.Text.Trim(), jot.PipelineId, jotId))
|
|
{
|
|
Alert.ShowInTop(Resources.Lan.WeldingJointCodeExists, MessageBoxIcon.Warning);
|
|
return;
|
|
}
|
|
Model.Pipeline_WeldJoint newJointInfo = new Model.Pipeline_WeldJoint();
|
|
newJointInfo.ProjectId = jot.ProjectId;
|
|
newJointInfo.PipelineId = jot.PipelineId;
|
|
newJointInfo.WeldJointCode = txtWeldJointCode.Text.Trim();
|
|
newJointInfo.PipingClassId = jot.PipingClassId;
|
|
newJointInfo.JointAttribute = jot.JointAttribute;
|
|
newJointInfo.JointArea = jot.JointArea;
|
|
newJointInfo.PipeSegment = jot.PipeSegment;
|
|
newJointInfo.Material1Id = jot.Material1Id;
|
|
newJointInfo.Material2Id = jot.Material2Id;
|
|
newJointInfo.WeldTypeId = jot.WeldTypeId;
|
|
newJointInfo.Specification = jot.Specification;
|
|
newJointInfo.Size = jot.Size;
|
|
newJointInfo.Dia = jot.Dia;
|
|
newJointInfo.Thickness = jot.Thickness;
|
|
newJointInfo.WeldingMethodId = jot.WeldingMethodId;
|
|
newJointInfo.HeartNo1 = jot.HeartNo1;
|
|
newJointInfo.HeartNo2 = jot.HeartNo2;
|
|
newJointInfo.GrooveTypeId = jot.GrooveTypeId;
|
|
|
|
newJointInfo.PipeAssembly1Id = jot.PipeAssembly1Id;
|
|
newJointInfo.PipeAssembly2Id = jot.PipeAssembly2Id;
|
|
newJointInfo.WeldSilkId = jot.WeldSilkId;
|
|
newJointInfo.WeldMatId = jot.WeldMatId;
|
|
newJointInfo.IsHotProess = jot.IsHotProess;
|
|
newJointInfo.WeldingLocationId = jot.WeldingLocationId;
|
|
newJointInfo.SystemNumber = jot.SystemNumber;
|
|
newJointInfo.TestPackageNo = jot.TestPackageNo;
|
|
newJointInfo.PrepareTemp = jot.PrepareTemp;
|
|
newJointInfo.IsGoldJoint = jot.IsGoldJoint;
|
|
newJointInfo.PageNum = jot.PageNum;
|
|
newJointInfo.WPQId = jot.WPQId;
|
|
newJointInfo.DetectionType = jot.DetectionType;
|
|
newJointInfo.ANSISCH = jot.ANSISCH;
|
|
|
|
BLL.Pipeline_WeldJointService.AddWeldJoint(newJointInfo);
|
|
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.HJGL_JointInfoMenuId, Const.BtnAdd, string.Empty);
|
|
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|
ShowNotify(Resources.Lan.SaveSuccessfully, MessageBoxIcon.Success);
|
|
}
|
|
}
|
|
|
|
private void LoadData()
|
|
{
|
|
btnClose.OnClientClick = ActiveWindow.GetHideReference();
|
|
}
|
|
}
|
|
} |