460 lines
30 KiB
C#
460 lines
30 KiB
C#
using System;
|
|
using BLL;
|
|
|
|
namespace FineUIPro.Web.HJGL.WeldingManage
|
|
{
|
|
public partial class WeldingProcessCardEdit : PageBase
|
|
{
|
|
#region 定义项
|
|
/// <summary>
|
|
/// 焊接工艺卡主键
|
|
/// </summary>
|
|
public string WeldingProcessCardId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["WeldingProcessCardId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["WeldingProcessCardId"] = value;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// 匹配主键
|
|
/// </summary>
|
|
private string MatchedProcedureMaterialId
|
|
{
|
|
get
|
|
{
|
|
return (string)ViewState["MatchedProcedureMaterialId"];
|
|
}
|
|
set
|
|
{
|
|
ViewState["MatchedProcedureMaterialId"] = value;
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 加载
|
|
/// <summary>
|
|
/// 加载页面
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
if (!IsPostBack)
|
|
{
|
|
this.drpJointImageId.DataValueField = "JointImageId";
|
|
this.drpJointImageId.DataTextField = "JointImageName";
|
|
this.drpJointImageId.DataSource = BLL.HJGL_JointImageService.GetJointImageList();
|
|
this.drpJointImageId.DataBind();
|
|
Funs.PleaseSelect(drpJointImageId);
|
|
|
|
this.drpWeldMethod.DataValueField = "WME_ID";
|
|
this.drpWeldMethod.DataTextField = "WME_Name";
|
|
this.drpWeldMethod.DataSource = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList();
|
|
this.drpWeldMethod.DataBind();
|
|
Funs.PleaseSelect(this.drpWeldMethod);
|
|
|
|
this.MatchedProcedureMaterialId = Request.Params["MatchedProcedureMaterialId"];
|
|
if (!string.IsNullOrEmpty(this.MatchedProcedureMaterialId))
|
|
{
|
|
Model.HJGL_WeldingProcedure_MatchedProcedureMaterial matchedProcedureMaterial = BLL.HJGL_MatchedProcedureMaterialService.GetMatchedProcedureMaterialById(this.MatchedProcedureMaterialId);
|
|
if (matchedProcedureMaterial != null)
|
|
{
|
|
this.WeldingProcessCardId = matchedProcedureMaterial.WeldingProcessCardId;
|
|
Model.HJGL_WeldingProcedure_WeldingProcessCard weldingProcessCard = HJGL_WeldingProcessCardService.GetWeldingProcessCardById(this.WeldingProcessCardId);
|
|
if (weldingProcessCard != null)
|
|
{
|
|
var project = BLL.Base_ProjectService.GetProjectByProjectId(weldingProcessCard.ProjectId);
|
|
if (project != null)
|
|
{
|
|
this.lblProjectName.Text = project.ProjectName;
|
|
}
|
|
this.txtWeldingProcedureCode.Text = weldingProcessCard.WeldingProcedureCode;
|
|
this.txtWeldingProcessCardCode.Text = weldingProcessCard.WeldingProcessCardCode;
|
|
this.txtMajor.Text = weldingProcessCard.Major;
|
|
if (!string.IsNullOrEmpty(weldingProcessCard.WME_ID))
|
|
{
|
|
this.drpWeldMethod.SelectedValue = weldingProcessCard.WME_ID;
|
|
}
|
|
this.txtWeldingPosition.Text = weldingProcessCard.WeldingPosition;
|
|
this.txtBaseGrade.Text = weldingProcessCard.BaseGrade;
|
|
this.txtBaseSpecifications.Text = weldingProcessCard.BaseSpecifications;
|
|
this.txtBaseWeldThickness.Text = weldingProcessCard.BaseWeldThickness;
|
|
this.txtMaterialGrade1.Text = weldingProcessCard.MaterialGrade1;
|
|
this.txtMaterialSpecifications1.Text = weldingProcessCard.MaterialSpecifications1;
|
|
this.txtMaterialBakingSpecifications1.Text = weldingProcessCard.MaterialBakingSpecifications1;
|
|
this.txtMaterialGrade2.Text = weldingProcessCard.MaterialGrade2;
|
|
this.txtMaterialSpecifications2.Text = weldingProcessCard.MaterialSpecifications2;
|
|
this.txtMaterialBakingSpecifications2.Text = weldingProcessCard.MaterialBakingSpecifications2;
|
|
this.txtJointForm.Text = weldingProcessCard.JointForm;
|
|
this.txtGrooveAngle.Text = weldingProcessCard.GrooveAngle;
|
|
this.txtGrooveProcessing.Text = weldingProcessCard.GrooveProcessing;
|
|
this.txtBluntEdge.Text = weldingProcessCard.BluntEdge;
|
|
this.txtGroupPairGap.Text = weldingProcessCard.GroupPairGap;
|
|
this.txtSurfaceCleaning.Text = weldingProcessCard.SurfaceCleaning;
|
|
this.txtHeatingTemperature.Text = weldingProcessCard.HeatingTemperature;
|
|
this.txtHeatingRate.Text = weldingProcessCard.HeatingRate;
|
|
this.txtHoldTime.Text = weldingProcessCard.HoldTime;
|
|
this.txtCoolRate.Text = weldingProcessCard.CoolRate;
|
|
this.txtPreheatTemperature.Text = weldingProcessCard.PreheatTemperature;
|
|
this.txtInterlayerTemperature.Text = weldingProcessCard.InterlayerTemperature;
|
|
this.txtCurrentType.Text = weldingProcessCard.CurrentType;
|
|
this.txtPolarity1.Text = weldingProcessCard.Polarity1;
|
|
this.txtPolarity2.Text = weldingProcessCard.Polarity2;
|
|
this.txtTungstenType.Text = weldingProcessCard.TungstenType;
|
|
this.txtTungstenSpecifications.Text = weldingProcessCard.TungstenSpecifications;
|
|
this.txtGasPositiveType.Text = weldingProcessCard.GasPositiveType;
|
|
this.txtGasPositiveFlow.Text = weldingProcessCard.GasPositiveFlow;
|
|
this.txtGasBackType.Text = weldingProcessCard.GasBackType;
|
|
this.txtGasBackFlow.Text = weldingProcessCard.GasBackFlow;
|
|
this.txtLayer1.Text = weldingProcessCard.Layer1;
|
|
this.txtWeldMethod1.Text = weldingProcessCard.WeldMethod1;
|
|
this.txtWeldGrade1.Text = weldingProcessCard.WeldGrade1;
|
|
this.txtWeldSpecifications1.Text = weldingProcessCard.WeldSpecifications1;
|
|
this.txtWeldCurrent1.Text = weldingProcessCard.WeldCurrent1;
|
|
this.txtWeldVoltage1.Text = weldingProcessCard.WeldVoltage1;
|
|
this.txtWeldSpeed1.Text = weldingProcessCard.WeldSpeed1;
|
|
this.txtRemark1.Text = weldingProcessCard.Remark1;
|
|
this.txtLayer2.Text = weldingProcessCard.Layer2;
|
|
this.txtWeldMethod2.Text = weldingProcessCard.WeldMethod2;
|
|
this.txtWeldGrade2.Text = weldingProcessCard.WeldGrade2;
|
|
this.txtWeldSpecifications2.Text = weldingProcessCard.WeldSpecifications2;
|
|
this.txtWeldCurrent2.Text = weldingProcessCard.WeldCurrent2;
|
|
this.txtWeldVoltage2.Text = weldingProcessCard.WeldVoltage2;
|
|
this.txtWeldSpeed2.Text = weldingProcessCard.WeldSpeed2;
|
|
this.txtRemark2.Text = weldingProcessCard.Remark2;
|
|
this.txtLayer3.Text = weldingProcessCard.Layer3;
|
|
this.txtWeldMethod3.Text = weldingProcessCard.WeldMethod3;
|
|
this.txtWeldGrade3.Text = weldingProcessCard.WeldGrade3;
|
|
this.txtWeldSpecifications3.Text = weldingProcessCard.WeldSpecifications3;
|
|
this.txtWeldCurrent3.Text = weldingProcessCard.WeldCurrent3;
|
|
this.txtWeldVoltage3.Text = weldingProcessCard.WeldVoltage3;
|
|
this.txtWeldSpeed3.Text = weldingProcessCard.WeldSpeed3;
|
|
this.txtRemark3.Text = weldingProcessCard.Remark3;
|
|
this.txtLayer4.Text = weldingProcessCard.Layer4;
|
|
this.txtWeldMethod4.Text = weldingProcessCard.WeldMethod4;
|
|
this.txtWeldGrade4.Text = weldingProcessCard.WeldGrade4;
|
|
this.txtWeldSpecifications4.Text = weldingProcessCard.WeldSpecifications4;
|
|
this.txtWeldCurrent4.Text = weldingProcessCard.WeldCurrent4;
|
|
this.txtWeldVoltage4.Text = weldingProcessCard.WeldVoltage4;
|
|
this.txtWeldSpeed4.Text = weldingProcessCard.WeldSpeed4;
|
|
this.txtRemark4.Text = weldingProcessCard.Remark4;
|
|
this.txtLayer5.Text = weldingProcessCard.Layer5;
|
|
this.txtWeldMethod5.Text = weldingProcessCard.WeldMethod5;
|
|
this.txtWeldGrade5.Text = weldingProcessCard.WeldGrade5;
|
|
this.txtWeldSpecifications5.Text = weldingProcessCard.WeldSpecifications5;
|
|
this.txtWeldCurrent5.Text = weldingProcessCard.WeldCurrent5;
|
|
this.txtWeldVoltage5.Text = weldingProcessCard.WeldVoltage5;
|
|
this.txtWeldSpeed5.Text = weldingProcessCard.WeldSpeed5;
|
|
this.txtRemark5.Text = weldingProcessCard.Remark5;
|
|
this.txtLayer6.Text = weldingProcessCard.Layer6;
|
|
this.txtWeldMethod6.Text = weldingProcessCard.WeldMethod6;
|
|
this.txtWeldGrade6.Text = weldingProcessCard.WeldGrade6;
|
|
this.txtWeldSpecifications6.Text = weldingProcessCard.WeldSpecifications6;
|
|
this.txtWeldCurrent6.Text = weldingProcessCard.WeldCurrent6;
|
|
this.txtWeldVoltage6.Text = weldingProcessCard.WeldVoltage6;
|
|
this.txtWeldSpeed6.Text = weldingProcessCard.WeldSpeed6;
|
|
this.txtRemark6.Text = weldingProcessCard.Remark6;
|
|
this.txtCompileMan.Text = weldingProcessCard.CompileMan;
|
|
if (weldingProcessCard.CompileDate != null)
|
|
{
|
|
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", weldingProcessCard.CompileDate);
|
|
}
|
|
this.txtExamineMan.Text = weldingProcessCard.ExamineMan;
|
|
if (weldingProcessCard.ExamineDate != null)
|
|
{
|
|
this.txtExamineDate.Text = string.Format("{0:yyyy-MM-dd}", weldingProcessCard.ExamineDate);
|
|
}
|
|
this.txtApprovalMan.Text = weldingProcessCard.ApprovalMan;
|
|
if (weldingProcessCard.ApprovalDate != null)
|
|
{
|
|
this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", weldingProcessCard.ApprovalDate);
|
|
}
|
|
if (!string.IsNullOrEmpty(weldingProcessCard.JointImageId))
|
|
{
|
|
this.drpJointImageId.SelectedValue = weldingProcessCard.JointImageId;
|
|
}
|
|
if (!string.IsNullOrEmpty(weldingProcessCard.JointImageId))
|
|
{
|
|
var image = BLL.AttachFileService.GetAttachFile(weldingProcessCard.JointImageId, BLL.Const.HJGL_JointImageMenuId);
|
|
if (image != null && !string.IsNullOrEmpty(image.AttachUrl))
|
|
{
|
|
imgPhoto.ImageUrl = image.AttachUrl;
|
|
}
|
|
}
|
|
this.ctlAuditFlow.MenuId = Const.HJGL_WeldingProcessCardMenuId;
|
|
this.ctlAuditFlow.Step = Convert.ToInt32(weldingProcessCard.State);
|
|
|
|
//如果流程结束,隐藏提交、提交按钮
|
|
var step = BLL.AudiFlowService.GetEndAuditFlowStep(Const.HJGL_WeldingProcessCardMenuId).AudiFlowStep;
|
|
if (weldingProcessCard.State == step.ToString())
|
|
{
|
|
this.btnSave.Hidden = true;
|
|
this.btnSubmit.Hidden = true;
|
|
this.formAudit.Hidden = true;
|
|
}
|
|
}
|
|
else
|
|
{
|
|
var project = BLL.Base_ProjectService.GetProjectByProjectId(matchedProcedureMaterial.ProjectId);
|
|
if (project != null)
|
|
{
|
|
this.lblProjectName.Text = project.ProjectName;
|
|
}
|
|
///编号
|
|
string prefix = project.ProjectCode + "-HK-";
|
|
this.txtWeldingProcessCardCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode5ByProjectId", "dbo.HJGL_WeldingProcedure_WeldingProcessCard", "WeldingProcessCardCode", matchedProcedureMaterial.ProjectId, prefix);
|
|
var weldingProcedure = BLL.HJGL_WeldingManage_WeldingProcedureService.GetWeldingProcedureById(matchedProcedureMaterial.WeldingProcedureId);
|
|
if (weldingProcedure != null)
|
|
{
|
|
this.txtWeldingProcedureCode.Text = weldingProcedure.WeldingProcedureCode;
|
|
}
|
|
|
|
this.txtWeldingPosition.Text = matchedProcedureMaterial.WeldingPosition;
|
|
if (!string.IsNullOrEmpty(matchedProcedureMaterial.WeldingMethodId))
|
|
{
|
|
this.drpWeldMethod.SelectedValue = matchedProcedureMaterial.WeldingMethodId;
|
|
}
|
|
var bsSteel = BLL.HJGL_MaterialService.GetSteelBySteID(matchedProcedureMaterial.STE_ID1); ///母材牌号
|
|
if (bsSteel != null)
|
|
{
|
|
this.txtBaseGrade.Text = bsSteel.STE_Name;
|
|
}
|
|
this.txtBaseSpecifications.Text = matchedProcedureMaterial.Specifications;
|
|
this.txtBaseWeldThickness.Text = matchedProcedureMaterial.Thickness.ToString();
|
|
this.txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
|
|
|
var jot = BLL.HJGL_MatchedProcedureMaterialService.GetJointInfoByMatchedProcedureMaterialId(this.MatchedProcedureMaterialId);
|
|
if (jot != null)
|
|
{
|
|
var weldMaterial1 = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jot.JOT_WeldSilk);
|
|
if (weldMaterial1 != null) ///焊接材料 焊丝牌号
|
|
{
|
|
this.txtMaterialGrade1.Text = weldMaterial1.WMT_MatCode;
|
|
//this.txtMaterialSpecifications1.Text = weldMaterial1.Specifications;
|
|
//this.txtMaterialBakingSpecifications1.Text = weldMaterial1.BakingSpecifications;
|
|
}
|
|
var weldMaterial2 = BLL.HJGL_ConsumablesService.getConsumablesByConsumablesId(jot.JOT_WeldMat);
|
|
if (weldMaterial2 != null) ///焊接材料 焊条牌号
|
|
{
|
|
this.txtMaterialGrade2.Text = weldMaterial2.WMT_MatCode;
|
|
//this.txtMaterialSpecifications2.Text = weldMaterial2.Specifications;
|
|
//this.txtMaterialBakingSpecifications2.Text = weldMaterial2.BakingSpecifications;
|
|
}
|
|
var slpoeType = BLL.HJGL_GrooveService.GetSlopeTypeByJSTID(jot.JST_ID); //坡口加工
|
|
if (slpoeType != null)
|
|
{
|
|
this.txtGrooveProcessing.Text = slpoeType.JST_Name;
|
|
}
|
|
var JointType = BLL.HJGL_WeldService.GetJointTypeByID(jot.JOTY_ID); //坡口加工
|
|
if (JointType != null)
|
|
{
|
|
this.txtJointForm.Text = JointType.JOTY_Name;
|
|
}
|
|
}
|
|
///初始化审核菜单
|
|
this.ctlAuditFlow.MenuId = Const.HJGL_WeldingProcessCardMenuId;
|
|
this.ctlAuditFlow.Step = 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
|
|
#region 提交、提交
|
|
/// <summary>
|
|
/// 提交按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSave_Click(object sender, EventArgs e)
|
|
{
|
|
SaveData(BLL.Const.BtnSave);
|
|
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|
}
|
|
|
|
#region 提交数据
|
|
private void SaveData(string type)
|
|
{
|
|
var newMatchedProcedureMaterial = BLL.HJGL_MatchedProcedureMaterialService.GetMatchedProcedureMaterialById(this.MatchedProcedureMaterialId);
|
|
if (newMatchedProcedureMaterial != null)
|
|
{
|
|
Model.HJGL_WeldingProcedure_WeldingProcessCard weldingProcessCard = new Model.HJGL_WeldingProcedure_WeldingProcessCard();
|
|
weldingProcessCard.ProjectId = newMatchedProcedureMaterial.ProjectId;
|
|
weldingProcessCard.WeldingProcedureCode = this.txtWeldingProcedureCode.Text.Trim();
|
|
weldingProcessCard.WeldingProcessCardCode = this.txtWeldingProcessCardCode.Text.Trim();
|
|
if (drpJointImageId.SelectedValue != "0")
|
|
{
|
|
weldingProcessCard.JointImageId = this.drpJointImageId.SelectedValue;
|
|
}
|
|
weldingProcessCard.Major = this.txtMajor.Text.Trim();
|
|
if (this.drpWeldMethod.SelectedValue != "0")
|
|
{
|
|
weldingProcessCard.WME_ID = this.drpWeldMethod.SelectedValue;
|
|
}
|
|
weldingProcessCard.WeldingPosition = this.txtWeldingPosition.Text.Trim();
|
|
weldingProcessCard.BaseGrade = this.txtBaseGrade.Text.Trim();
|
|
weldingProcessCard.BaseSpecifications = this.txtBaseSpecifications.Text.Trim();
|
|
weldingProcessCard.BaseWeldThickness = this.txtBaseWeldThickness.Text.Trim();
|
|
weldingProcessCard.MaterialGrade1 = this.txtMaterialGrade1.Text.Trim();
|
|
weldingProcessCard.MaterialSpecifications1 = this.txtMaterialSpecifications1.Text.Trim();
|
|
weldingProcessCard.MaterialBakingSpecifications1 = this.txtMaterialBakingSpecifications1.Text.Trim();
|
|
weldingProcessCard.MaterialGrade2 = this.txtMaterialGrade2.Text.Trim();
|
|
weldingProcessCard.MaterialSpecifications2 = this.txtMaterialSpecifications2.Text.Trim();
|
|
weldingProcessCard.MaterialBakingSpecifications2 = this.txtMaterialBakingSpecifications2.Text.Trim();
|
|
weldingProcessCard.JointForm = this.txtJointForm.Text.Trim();
|
|
weldingProcessCard.GrooveAngle = this.txtGrooveAngle.Text.Trim();
|
|
weldingProcessCard.GrooveProcessing = this.txtGrooveProcessing.Text.Trim();
|
|
weldingProcessCard.BluntEdge = this.txtBluntEdge.Text.Trim();
|
|
weldingProcessCard.GroupPairGap = this.txtGroupPairGap.Text.Trim();
|
|
weldingProcessCard.SurfaceCleaning = this.txtSurfaceCleaning.Text.Trim();
|
|
weldingProcessCard.HeatingTemperature = this.txtHeatingTemperature.Text.Trim();
|
|
weldingProcessCard.HeatingRate = this.txtHeatingRate.Text.Trim();
|
|
weldingProcessCard.HoldTime = this.txtHoldTime.Text.Trim();
|
|
weldingProcessCard.CoolRate = this.txtCoolRate.Text.Trim();
|
|
weldingProcessCard.PreheatTemperature = this.txtPreheatTemperature.Text.Trim();
|
|
weldingProcessCard.InterlayerTemperature = this.txtInterlayerTemperature.Text.Trim();
|
|
weldingProcessCard.CurrentType = this.txtCurrentType.Text.Trim();
|
|
weldingProcessCard.Polarity1 = this.txtPolarity1.Text.Trim();
|
|
weldingProcessCard.Polarity2 = this.txtPolarity2.Text.Trim();
|
|
weldingProcessCard.TungstenType = this.txtTungstenType.Text.Trim();
|
|
weldingProcessCard.TungstenSpecifications = this.txtTungstenSpecifications.Text.Trim();
|
|
weldingProcessCard.GasPositiveType = this.txtGasPositiveType.Text.Trim();
|
|
weldingProcessCard.GasPositiveFlow = this.txtGasPositiveFlow.Text.Trim();
|
|
weldingProcessCard.GasBackType = this.txtGasBackType.Text.Trim();
|
|
weldingProcessCard.GasBackFlow = this.txtGasBackFlow.Text.Trim();
|
|
weldingProcessCard.Layer1 = this.txtLayer1.Text.Trim();
|
|
weldingProcessCard.WeldMethod1 = this.txtWeldMethod1.Text.Trim();
|
|
weldingProcessCard.WeldGrade1 = this.txtWeldGrade1.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications1 = this.txtWeldSpecifications1.Text.Trim();
|
|
weldingProcessCard.WeldCurrent1 = this.txtWeldCurrent1.Text.Trim();
|
|
weldingProcessCard.WeldVoltage1 = this.txtWeldVoltage1.Text.Trim();
|
|
weldingProcessCard.WeldSpeed1 = this.txtWeldSpeed1.Text.Trim();
|
|
weldingProcessCard.Remark1 = this.txtRemark1.Text.Trim();
|
|
weldingProcessCard.Layer2 = this.txtLayer2.Text.Trim();
|
|
weldingProcessCard.WeldMethod2 = this.txtWeldMethod2.Text.Trim();
|
|
weldingProcessCard.WeldGrade2 = this.txtWeldGrade2.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications2 = this.txtWeldSpecifications2.Text.Trim();
|
|
weldingProcessCard.WeldCurrent2 = this.txtWeldCurrent2.Text.Trim();
|
|
weldingProcessCard.WeldVoltage2 = this.txtWeldVoltage2.Text.Trim();
|
|
weldingProcessCard.WeldSpeed2 = this.txtWeldSpeed2.Text.Trim();
|
|
weldingProcessCard.Remark2 = this.txtRemark2.Text.Trim();
|
|
weldingProcessCard.Layer3 = this.txtLayer3.Text.Trim();
|
|
weldingProcessCard.WeldMethod3 = this.txtWeldMethod3.Text.Trim();
|
|
weldingProcessCard.WeldGrade3 = this.txtWeldGrade3.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications3 = this.txtWeldSpecifications3.Text.Trim();
|
|
weldingProcessCard.WeldCurrent3 = this.txtWeldCurrent3.Text.Trim();
|
|
weldingProcessCard.WeldVoltage3 = this.txtWeldVoltage3.Text.Trim();
|
|
weldingProcessCard.WeldSpeed3 = this.txtWeldSpeed3.Text.Trim();
|
|
weldingProcessCard.Remark3 = this.txtRemark3.Text.Trim();
|
|
weldingProcessCard.Layer4 = this.txtLayer4.Text.Trim();
|
|
weldingProcessCard.WeldMethod4 = this.txtWeldMethod4.Text.Trim();
|
|
weldingProcessCard.WeldGrade4 = this.txtWeldGrade4.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications4 = this.txtWeldSpecifications4.Text.Trim();
|
|
weldingProcessCard.WeldCurrent4 = this.txtWeldCurrent4.Text.Trim();
|
|
weldingProcessCard.WeldVoltage4 = this.txtWeldVoltage4.Text.Trim();
|
|
weldingProcessCard.WeldSpeed4 = this.txtWeldSpeed4.Text.Trim();
|
|
weldingProcessCard.Remark4 = this.txtRemark4.Text.Trim();
|
|
weldingProcessCard.Layer5 = this.txtLayer5.Text.Trim();
|
|
weldingProcessCard.WeldMethod5 = this.txtWeldMethod5.Text.Trim();
|
|
weldingProcessCard.WeldGrade5 = this.txtWeldGrade5.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications5 = this.txtWeldSpecifications5.Text.Trim();
|
|
weldingProcessCard.WeldCurrent5 = this.txtWeldCurrent5.Text.Trim();
|
|
weldingProcessCard.WeldVoltage5 = this.txtWeldVoltage5.Text.Trim();
|
|
weldingProcessCard.WeldSpeed5 = this.txtWeldSpeed5.Text.Trim();
|
|
weldingProcessCard.Remark5 = this.txtRemark5.Text.Trim();
|
|
weldingProcessCard.Layer6 = this.txtLayer6.Text.Trim();
|
|
weldingProcessCard.WeldMethod6 = this.txtWeldMethod6.Text.Trim();
|
|
weldingProcessCard.WeldGrade6 = this.txtWeldGrade6.Text.Trim();
|
|
weldingProcessCard.WeldSpecifications6 = this.txtWeldSpecifications6.Text.Trim();
|
|
weldingProcessCard.WeldCurrent6 = this.txtWeldCurrent6.Text.Trim();
|
|
weldingProcessCard.WeldVoltage6 = this.txtWeldVoltage6.Text.Trim();
|
|
weldingProcessCard.WeldSpeed6 = this.txtWeldSpeed6.Text.Trim();
|
|
weldingProcessCard.Remark6 = this.txtRemark6.Text.Trim();
|
|
weldingProcessCard.CompileMan = this.txtCompileMan.Text.Trim();
|
|
weldingProcessCard.CompileDate = Funs.GetNewDateTime(this.txtCompileDate.Text);
|
|
weldingProcessCard.ExamineMan = this.txtExamineMan.Text.Trim();
|
|
weldingProcessCard.ExamineDate = Funs.GetNewDateTime(this.txtExamineDate.Text);
|
|
weldingProcessCard.ApprovalMan = this.txtApprovalMan.Text.Trim();
|
|
weldingProcessCard.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text);
|
|
if (type == BLL.Const.BtnSubmit)
|
|
{
|
|
weldingProcessCard.State = ctlAuditFlow.NextStep.ToString(); ////审核单据状态
|
|
}
|
|
if (!string.IsNullOrEmpty(this.WeldingProcessCardId))
|
|
{
|
|
weldingProcessCard.WeldingProcessCardId = this.WeldingProcessCardId;
|
|
BLL.HJGL_WeldingProcessCardService.UpdateWeldingProcessCard(weldingProcessCard);
|
|
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "修改焊接工艺卡");
|
|
}
|
|
else
|
|
{
|
|
this.WeldingProcessCardId = SQLHelper.GetNewID(typeof(Model.HJGL_WeldingProcedure_WeldingProcessCard));
|
|
weldingProcessCard.WeldingProcessCardId = this.WeldingProcessCardId;
|
|
BLL.HJGL_WeldingProcessCardService.AddWeldingProcessCard(weldingProcessCard);
|
|
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加焊接工艺卡");
|
|
}
|
|
newMatchedProcedureMaterial.WeldingProcessCardId = this.WeldingProcessCardId;
|
|
BLL.HJGL_MatchedProcedureMaterialService.UpdateMatchedProcedureMaterial(newMatchedProcedureMaterial);
|
|
}
|
|
}
|
|
#endregion
|
|
/// <summary>
|
|
/// 提交按钮
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void btnSubmit_Click(object sender, EventArgs e)
|
|
{
|
|
SaveData(BLL.Const.BtnSubmit);
|
|
Model.AuditFlowApprove auditFlowApprove = BLL.AuditFlowApproveService.GetAuditFlowApproveByToKey(this.WeldingProcessCardId);
|
|
if (auditFlowApprove != null)
|
|
{
|
|
auditFlowApprove.HandleDate = DateTime.Now;
|
|
auditFlowApprove.MyOpinions = ctlAuditFlow.Opinions;
|
|
auditFlowApprove.IsAgree = ctlAuditFlow.IsAgree;
|
|
BLL.AuditFlowApproveService.UpdateAuditFlowApprove(auditFlowApprove);
|
|
}
|
|
|
|
Model.HJGL_WeldingProcedure_WeldingProcessCard weldingProcessCard = BLL.HJGL_WeldingProcessCardService.GetWeldingProcessCardById(WeldingProcessCardId);
|
|
Model.AuditFlowApprove auditFlowApprove1 = new Model.AuditFlowApprove();
|
|
auditFlowApprove1.ToKey = this.WeldingProcessCardId;
|
|
auditFlowApprove1.MenuId = BLL.Const.HJGL_WeldingProcessCardMenuId;
|
|
auditFlowApprove1.HandleUser = ctlAuditFlow.HandleUser;
|
|
auditFlowApprove1.HandleStep = ctlAuditFlow.NextStep;
|
|
BLL.AuditFlowApproveService.AddAuditFlowApprove(auditFlowApprove1);
|
|
|
|
weldingProcessCard.State = ctlAuditFlow.NextStep.ToString();
|
|
BLL.HJGL_WeldingProcessCardService.UpdateWeldingProcessCard(weldingProcessCard);
|
|
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
|
}
|
|
#endregion
|
|
|
|
#region DropDownList下拉选择事件
|
|
/// <summary>
|
|
/// 焊接接头简图选择事件
|
|
/// </summary>
|
|
/// <param name="sender"></param>
|
|
/// <param name="e"></param>
|
|
protected void drpJointImageId_SelectedIndexChanged(object sender, EventArgs e)
|
|
{
|
|
if (this.drpJointImageId.SelectedValue != BLL.Const._Null)
|
|
{
|
|
var image = BLL.AttachFileService.GetAttachFile(this.drpJointImageId.SelectedValue, BLL.Const.HJGL_JointImageMenuId);
|
|
if (image != null && !string.IsNullOrEmpty(image.AttachUrl))
|
|
{
|
|
imgPhoto.ImageUrl = image.AttachUrl;
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
}
|
|
} |