704 lines
32 KiB
C#
704 lines
32 KiB
C#
namespace FineUIPro.Web.HJGL.WeldingManage
|
||
{
|
||
using System;
|
||
using BLL;
|
||
using System.Linq;
|
||
|
||
public partial class JointInfoBatchEdit : PageBase
|
||
{
|
||
#region 定义项
|
||
/// <summary>
|
||
/// 管线主键
|
||
/// </summary>
|
||
private string ISO_ID
|
||
{
|
||
get
|
||
{
|
||
return (string)ViewState["ISO_ID"];
|
||
}
|
||
set
|
||
{
|
||
ViewState["ISO_ID"] = value;
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 加载页面
|
||
/// <summary>
|
||
/// 加载页面
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void Page_Load(object sender, EventArgs e)
|
||
{
|
||
if (!IsPostBack)
|
||
{
|
||
this.ISO_ID = Request.Params["ISO_ID"];
|
||
///初始化下拉框
|
||
this.LoadDropDownList();
|
||
///初始化显示信息
|
||
this.LoadShowInfo();
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 初始化页面信息
|
||
#region 加载下拉框
|
||
/// <summary>
|
||
/// 加载下拉框
|
||
/// </summary>
|
||
private void LoadDropDownList()
|
||
{
|
||
///材质1
|
||
this.ddlSTE1.DataTextField = "STE_Code";
|
||
this.ddlSTE1.DataValueField = "STE_ID";
|
||
this.ddlSTE1.DataSource = BLL.HJGL_MaterialService.GetSteelList();
|
||
this.ddlSTE1.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlSTE1);
|
||
|
||
///材质2
|
||
this.ddlSTE2.DataTextField = "STE_Code";
|
||
this.ddlSTE2.DataValueField = "STE_ID";
|
||
this.ddlSTE2.DataSource = BLL.HJGL_MaterialService.GetSteelList();
|
||
this.ddlSTE2.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlSTE2);
|
||
|
||
///焊缝类型
|
||
this.ddlJOTY_ID.DataTextField = "JOTY_Name";
|
||
this.ddlJOTY_ID.DataValueField = "JOTY_ID";
|
||
this.ddlJOTY_ID.DataSource = BLL.HJGL_WeldService.GetJointTypeNameList("2");
|
||
this.ddlJOTY_ID.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlJOTY_ID);
|
||
|
||
///坡口类型
|
||
this.ddlJST_ID.DataTextField = "JST_Name";
|
||
this.ddlJST_ID.DataValueField = "JST_ID";
|
||
this.ddlJST_ID.DataSource = BLL.HJGL_GrooveService.GetSlopeTypeNameList();
|
||
this.ddlJST_ID.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlJST_ID);
|
||
|
||
///焊口属性
|
||
this.ddlJointAttribute.DataTextField = "Text";
|
||
this.ddlJointAttribute.DataValueField = "Value";
|
||
this.ddlJointAttribute.DataSource = BLL.DropListService.HJGL_JointAttributeItem();
|
||
this.ddlJointAttribute.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlJointAttribute);
|
||
|
||
///焊接方法
|
||
this.ddlWME_ID.DataTextField = "WME_Name";
|
||
this.ddlWME_ID.DataValueField = "WME_ID";
|
||
this.ddlWME_ID.DataSource = BLL.HJGL_WeldingMethodService.GetWeldMethodNameList();
|
||
this.ddlWME_ID.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlWME_ID);
|
||
|
||
///焊接区域
|
||
this.ddlWLO_CODE.DataTextField = "Text";
|
||
this.ddlWLO_CODE.DataValueField = "Value";
|
||
this.ddlWLO_CODE.DataSource = BLL.DropListService.HJGL_WLO_CODEItem();
|
||
this.ddlWLO_CODE.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlWLO_CODE);
|
||
|
||
this.drpInstallationId.DataTextField = "Text";
|
||
this.drpInstallationId.DataValueField = "Value";
|
||
this.drpInstallationId.DataSource = BLL.Project_InstallationService.GetInstallationList(this.CurrUser.LoginProjectId);
|
||
this.drpInstallationId.DataBind();
|
||
Funs.FineUIPleaseSelect(this.drpInstallationId);
|
||
|
||
//探伤比例
|
||
this.drpNDTR_ID.DataTextField = "NDTR_Name";
|
||
this.drpNDTR_ID.DataValueField = "NDTR_ID";
|
||
this.drpNDTR_ID.DataSource = BLL.HJGL_DetectionService.GetNDTRateNameList();
|
||
this.drpNDTR_ID.DataBind();
|
||
Funs.FineUIPleaseSelect(this.drpNDTR_ID);
|
||
|
||
//合格等级
|
||
this.drpJOT_QualifiedLevel.DataTextField = "Text";
|
||
this.drpJOT_QualifiedLevel.DataValueField = "Value";
|
||
this.drpJOT_QualifiedLevel.DataSource = BLL.DropListService.HJGL_NDTClassItem();
|
||
this.drpJOT_QualifiedLevel.DataBind();
|
||
Funs.FineUIPleaseSelect(this.drpJOT_QualifiedLevel);
|
||
|
||
///焊丝
|
||
this.ddlWeldSilk.DataTextField = "WMT_MatCode";
|
||
this.ddlWeldSilk.DataValueField = "WMT_ID";
|
||
this.ddlWeldSilk.DataSource = BLL.HJGL_ConsumablesService.GetMaterialList("1");
|
||
this.ddlWeldSilk.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlWeldSilk);
|
||
|
||
///焊条
|
||
this.ddlWeldMat.DataTextField = "WMT_MatCode";
|
||
this.ddlWeldMat.DataValueField = "WMT_ID";
|
||
this.ddlWeldMat.DataSource = BLL.HJGL_ConsumablesService.GetMaterialList("2");
|
||
this.ddlWeldMat.DataBind();
|
||
Funs.FineUIPleaseSelect(this.ddlWeldMat);
|
||
}
|
||
#endregion
|
||
|
||
#region 加载页面显示信息
|
||
/// <summary>
|
||
/// 加载页面显示信息
|
||
/// </summary>
|
||
private void LoadShowInfo()
|
||
{
|
||
///加载管线、区域、装置、单位
|
||
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID);
|
||
if (isoInfo != null)
|
||
{
|
||
this.txtISONO.Text = isoInfo.ISO_IsoNo;
|
||
var unit = BLL.Base_UnitService.GetUnit(isoInfo.BSU_ID);
|
||
var slope = from x in Funs.DB.HJGL_BS_SlopeType where x.JST_Code.Contains("V") select x;
|
||
if (unit != null)
|
||
{
|
||
this.lbUnitName.Text = unit.UnitName;
|
||
}
|
||
|
||
if (!string.IsNullOrEmpty(isoInfo.STE_ID))
|
||
{
|
||
this.ddlSTE1.SelectedValue = isoInfo.STE_ID;
|
||
this.ddlSTE2.SelectedValue = isoInfo.STE_ID;
|
||
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(isoInfo.STE_ID);
|
||
if (ste != null)
|
||
{
|
||
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
|
||
}
|
||
}
|
||
if (isoInfo.ISO_Dia != null)
|
||
{
|
||
this.txtDia.Text = isoInfo.ISO_Dia.Value.ToString();
|
||
var inch = HJGL_ControlService.GetSizeByDia(isoInfo.ISO_Dia.Value);
|
||
if (inch != null)
|
||
{
|
||
this.txtSize.Text = Convert.ToString(inch);
|
||
}
|
||
}
|
||
if (isoInfo.ISO_Sch != null)
|
||
{
|
||
this.txtSch.Text = isoInfo.ISO_Sch.Value.ToString();
|
||
}
|
||
|
||
if (isoInfo.ISO_Dia != null && isoInfo.ISO_Sch != null)
|
||
{
|
||
this.txtJointDesc.Text = "Φ" + isoInfo.ISO_Dia.Value.ToString("0.##") + "*" + isoInfo.ISO_Sch.Value.ToString("0.##");
|
||
}
|
||
|
||
if (slope.Count() > 0)
|
||
{
|
||
this.ddlJST_ID.SelectedValue = slope.First().JST_ID;
|
||
}
|
||
|
||
this.ddlJointAttribute.SelectedValue = "活动";
|
||
this.ddlWLO_CODE.SelectedValue = "S"; // 预制
|
||
|
||
if (!string.IsNullOrEmpty(isoInfo.IsHot))
|
||
{
|
||
this.drpIS_Proess.SelectedValue = isoInfo.IsHot;
|
||
if (this.drpIS_Proess.SelectedValue == "1")
|
||
{
|
||
this.drpProessTypes.Hidden = false;
|
||
if (!string.IsNullOrEmpty(isoInfo.IsHotType))
|
||
{
|
||
string[] proessTypes = isoInfo.IsHotType.Split('|');
|
||
this.drpProessTypes.Values = proessTypes;
|
||
}
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(isoInfo.PressureTestPackageNo))
|
||
{
|
||
txtPressureTestPackageNo.Text = isoInfo.PressureTestPackageNo;
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
#endregion
|
||
|
||
#region 提交按钮
|
||
/// <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.HJGL_JointInfoMenuId, Const.BtnSave))
|
||
{
|
||
if (this.drpInstallationId.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择装置", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
if (this.ddlSTE1.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择材质1", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
if (this.ddlJOTY_ID.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择焊缝类型!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
if (this.ddlJST_ID.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择坡口类型!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
if (this.ddlJointAttribute.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择焊口属性!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
if (this.ddlWME_ID.SelectedValue == BLL.Const._Null)
|
||
{
|
||
Alert.ShowInTop("请选择焊接方法!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
int startInt = Funs.GetNewIntOrZero(this.txtJointNo1.Text.Trim());
|
||
int endInt = Funs.GetNewIntOrZero(this.txtJointNo2.Text.Trim());
|
||
if (endInt < startInt)
|
||
{
|
||
Alert.ShowInTop("起编号应小于等于止编号!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
|
||
Model.HJGL_PW_JointInfo newJointInfo = new Model.HJGL_PW_JointInfo();
|
||
newJointInfo.ProjectId = this.CurrUser.LoginProjectId;
|
||
newJointInfo.ISO_ID = this.ISO_ID;
|
||
newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim();
|
||
newJointInfo.JOT_JointDesc = this.txtJointDesc.Text.Trim();
|
||
if (this.ddlSTE1.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.STE_ID = this.ddlSTE1.SelectedValue;
|
||
}
|
||
if (this.ddlSTE2.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.STE_ID2 = this.ddlSTE2.SelectedValue;
|
||
}
|
||
if (this.ddlJOTY_ID.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JOTY_ID = this.ddlJOTY_ID.SelectedValue;
|
||
}
|
||
if (this.ddlJST_ID.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JST_ID = this.ddlJST_ID.SelectedValue;
|
||
}
|
||
if (this.ddlJointAttribute.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JOT_JointAttribute = this.ddlJointAttribute.SelectedValue;
|
||
}
|
||
if (this.ddlWME_ID.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.WME_ID = this.ddlWME_ID.SelectedValue;
|
||
}
|
||
if (this.drpInstallationId.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.InstallationId = this.drpInstallationId.SelectedValue;
|
||
}
|
||
|
||
newJointInfo.JOT_Size = Funs.GetNewDecimal(this.txtSize.Text);
|
||
newJointInfo.JOT_Dia = Funs.GetNewDecimal(this.txtDia.Text);
|
||
newJointInfo.JOT_Sch = this.txtSch.Text.Trim();
|
||
|
||
newJointInfo.JOT_TrustFlag = "00";
|
||
newJointInfo.JOT_CheckFlag = "00";
|
||
newJointInfo.JOT_JointStatus = "100";
|
||
if (this.ddlWLO_CODE.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.WLO_Code = this.ddlWLO_CODE.SelectedValue;
|
||
}
|
||
if (this.drpNDTR_ID.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.NDTR_ID = this.drpNDTR_ID.SelectedValue;
|
||
}
|
||
if (this.drpJOT_QualifiedLevel.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JOT_QualifiedLevel = this.drpJOT_QualifiedLevel.SelectedValue;
|
||
}
|
||
|
||
newJointInfo.JOT_LastTemp = Funs.GetNewDecimal(this.txtLastTemp.Text);
|
||
newJointInfo.JOT_CellTemp = Funs.GetNewDecimal(this.txtCellTemp.Text);
|
||
newJointInfo.JOT_PrepareTemp = Funs.GetNewDecimal(this.txtPrepareTemp.Text);
|
||
newJointInfo.JOT_Electricity = this.txtElectricity.Text.Trim();
|
||
|
||
newJointInfo.PressureTestPackageNo = this.txtPressureTestPackageNo.Text;
|
||
|
||
if (this.drpIsSpecial.SelectedValue == "1")
|
||
{
|
||
newJointInfo.IsSpecial = true;
|
||
}
|
||
else
|
||
{
|
||
newJointInfo.IsSpecial = false;
|
||
}
|
||
if (this.drpIS_Proess.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.IS_Proess = this.drpIS_Proess.SelectedValue;
|
||
if (this.drpIS_Proess.SelectedValue == "1")
|
||
{
|
||
if (drpProessTypes.Values.Length > 0)
|
||
{
|
||
newJointInfo.ProessTypes = String.Join("|", drpProessTypes.Values);
|
||
}
|
||
else
|
||
{
|
||
Alert.ShowInTop("请选择热处理类型!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
}
|
||
}
|
||
if (this.ddlWeldSilk.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JOT_WeldSilk = this.ddlWeldSilk.SelectedValue;
|
||
}
|
||
if (this.ddlWeldMat.SelectedValue != BLL.Const._Null)
|
||
{
|
||
newJointInfo.JOT_WeldMat = this.ddlWeldMat.SelectedValue;
|
||
}
|
||
if (!string.IsNullOrEmpty(this.txtWeldL.Text))
|
||
{
|
||
newJointInfo.WeldL = Convert.ToInt32(this.txtWeldL.Text);
|
||
}
|
||
for (int i = startInt; i <= endInt; i++)
|
||
{
|
||
//if (i < 10)
|
||
//{
|
||
// newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim() + "0" + Convert.ToString(i);
|
||
//}
|
||
//else
|
||
//{
|
||
// newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim() + Convert.ToString(i);
|
||
//}
|
||
newJointInfo.JOT_JointNo = this.txtJointNo.Text.Trim() + Convert.ToString(i);
|
||
if (!BLL.HJGL_PW_JointInfoService.IsExistJointInfoCode(this.CurrUser.LoginProjectId, newJointInfo.JOT_JointNo, this.ISO_ID, null))
|
||
{
|
||
try
|
||
{
|
||
newJointInfo.JOT_ID = SQLHelper.GetNewID(typeof(Model.HJGL_PW_JointInfo));
|
||
BLL.HJGL_PW_JointInfoService.AddJointInfo(newJointInfo);
|
||
|
||
// 更新排序字段
|
||
string strSort = @"UPDATE dbo.HJGL_PW_JointInfo SET
|
||
Sort1=(case when PATINDEX('[A-Z]%',JOT_JointNo)>0 THEN 'B'
|
||
WHEN ISNUMERIC(JOT_JointNo)=1 then 'C' ELSE 'C' END),
|
||
Sort2=(CASE WHEN ISNUMERIC(JOT_JointNo)=1 then try_cast(REPLACE(JOT_JointNo,'.','') AS INT)
|
||
WHEN ISNUMERIC(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)))=1
|
||
THEN TRY_CAST(SUBSTRING(JOT_JointNo,0,CHARINDEX('Z',JOT_JointNo)) as int)
|
||
WHEN PATINDEX('[0-9]%',JOT_JointNo)>0 then
|
||
TRY_CAST(left(JOT_JointNo,PATINDEX('%[^0-9]%',JOT_JointNo)-1) as int)
|
||
ELSE 0 END),
|
||
Sort3= SUBSTRING(JOT_JointNo,1,1),
|
||
Sort4=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0 and SUBSTRING(JOT_JointNo,1,1)<>'Z'
|
||
THEN ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,CHARINDEX('Z',JOT_JointNo)-2) as int),0)
|
||
WHEN PATINDEX('%[A-G]%',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-2) as int),0)
|
||
ELSE ISNULL(TRY_CAST(SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)) as int),0) END),
|
||
Sort5=(CASE WHEN CHARINDEX('Z',JOT_JointNo)>0
|
||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,charindex('Z',JOT_JointNo)+1,len(JOT_JointNo)) AS INT),0)
|
||
WHEN PATINDEX('%[A-Y]',SUBSTRING(replace(JOT_JointNo,'#',''),2,len(JOT_JointNo)))>0
|
||
THEN ISNULL(TRY_CAST(SUBSTRING(JOT_JointNo,2,len(JOT_JointNo)-1) as int),0) ELSE 0 END)
|
||
WHERE JOT_ID='" + newJointInfo.JOT_ID + "'";
|
||
SQLHelper.ExecutSql(strSort);
|
||
BLL.Sys_LogService.AddLog(BLL.Const.System_3, this.CurrUser.LoginProjectId, this.CurrUser.UserId, "添加焊口信息!");
|
||
}
|
||
catch
|
||
{
|
||
|
||
}
|
||
}
|
||
}
|
||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||
|
||
}
|
||
else
|
||
{
|
||
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
|
||
return;
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 引用
|
||
/// <summary>
|
||
/// 引用
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void btnCopy_Click(object sender, EventArgs e)
|
||
{
|
||
if (!string.IsNullOrEmpty(this.txtJointNoS.Text.Trim()) && !string.IsNullOrEmpty(this.ISO_ID))
|
||
{
|
||
var jointInfo = BLL.HJGL_PW_JointInfoService.GetJointInfoByJointNoAndIsoId(this.txtJointNoS.Text.Trim(), this.ISO_ID, this.CurrUser.LoginProjectId);
|
||
if (jointInfo != null)
|
||
{
|
||
//this.txtJointNo.Text = jointInfo.JOT_JointNo;
|
||
this.txtJointDesc.Text = jointInfo.JOT_JointDesc;
|
||
if (!string.IsNullOrEmpty(jointInfo.STE_ID))
|
||
{
|
||
this.ddlSTE1.SelectedValue = jointInfo.STE_ID;
|
||
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(jointInfo.STE_ID);
|
||
if (ste != null)
|
||
{
|
||
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.STE_ID2))
|
||
{
|
||
this.ddlSTE2.SelectedValue = jointInfo.STE_ID2;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.JOTY_ID))
|
||
{
|
||
this.ddlJOTY_ID.SelectedValue = jointInfo.JOTY_ID;
|
||
var joty = BLL.HJGL_WeldService.GetJointTypeByID(this.ddlJOTY_ID.SelectedValue);
|
||
if (joty != null)
|
||
{
|
||
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID);
|
||
if (isoInfo != null)
|
||
{
|
||
if (!string.IsNullOrEmpty(isoInfo.ISC_ID) && !string.IsNullOrEmpty(isoInfo.ISO_Executive))
|
||
{
|
||
var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(isoInfo.ISC_ID, isoInfo.ISO_Executive);
|
||
if (weldControl != null)
|
||
{
|
||
if (joty.JOTY_Group == "1")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_Level;
|
||
}
|
||
else if (joty.JOTY_Group == "2")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_C_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_C_Level;
|
||
}
|
||
else if (joty.JOTY_Group == "3")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_D_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_D_Level;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.JST_ID))
|
||
{
|
||
this.ddlJST_ID.SelectedValue = jointInfo.JST_ID;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.JOT_JointAttribute))
|
||
{
|
||
this.ddlJointAttribute.SelectedValue = jointInfo.JOT_JointAttribute;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.WME_ID))
|
||
{
|
||
this.ddlWME_ID.SelectedValue = jointInfo.WME_ID;
|
||
}
|
||
this.txtSize.Text = Convert.ToString(jointInfo.JOT_Size);
|
||
this.txtDia.Text = Convert.ToString(jointInfo.JOT_Dia);
|
||
this.txtSch.Text = jointInfo.JOT_Sch;
|
||
if (!string.IsNullOrEmpty(jointInfo.WLO_Code))
|
||
{
|
||
this.ddlWLO_CODE.SelectedValue = jointInfo.WLO_Code;
|
||
}
|
||
|
||
this.txtLastTemp.Text = Convert.ToString(jointInfo.JOT_LastTemp);
|
||
this.txtCellTemp.Text = Convert.ToString(jointInfo.JOT_CellTemp);
|
||
this.txtPrepareTemp.Text = Convert.ToString(jointInfo.JOT_PrepareTemp);
|
||
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldSilk))
|
||
{
|
||
this.ddlWeldSilk.SelectedValue = jointInfo.JOT_WeldSilk;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.JOT_WeldMat))
|
||
{
|
||
this.ddlWeldMat.SelectedValue = jointInfo.JOT_WeldMat;
|
||
}
|
||
this.txtElectricity.Text = jointInfo.JOT_Electricity;
|
||
if (!string.IsNullOrEmpty(jointInfo.IS_Proess))
|
||
{
|
||
this.drpIS_Proess.SelectedValue = jointInfo.IS_Proess;
|
||
if (jointInfo.IS_Proess == "1")
|
||
{
|
||
this.drpProessTypes.Hidden = false;
|
||
|
||
if (!string.IsNullOrEmpty(jointInfo.ProessTypes))
|
||
{
|
||
string[] proessTypes = jointInfo.ProessTypes.Split('|');
|
||
this.drpProessTypes.Values = proessTypes;
|
||
}
|
||
}
|
||
}
|
||
|
||
if (!string.IsNullOrEmpty(jointInfo.InstallationId))
|
||
{
|
||
this.drpInstallationId.SelectedValue = jointInfo.InstallationId;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.NDTR_ID))
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = jointInfo.NDTR_ID;
|
||
}
|
||
if (!string.IsNullOrEmpty(jointInfo.JOT_QualifiedLevel))
|
||
{
|
||
this.drpJOT_QualifiedLevel.SelectedValue = jointInfo.JOT_QualifiedLevel;
|
||
}
|
||
if (jointInfo.IsSpecial == true)
|
||
{
|
||
this.drpIsSpecial.SelectedValue = "1";
|
||
}
|
||
else
|
||
{
|
||
this.drpIsSpecial.SelectedValue = "0";
|
||
}
|
||
|
||
this.txtPressureTestPackageNo.Text = jointInfo.PressureTestPackageNo;
|
||
}
|
||
}
|
||
}
|
||
#endregion
|
||
|
||
#region 根据寸经外径对照表,输入外径是自动得到寸径;焊口规格:Φ外径*壁厚
|
||
/// <summary>
|
||
/// 根据寸经外径对照表,输入外径是自动得到寸径;焊口规格:Φ外径*壁厚
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void txtText_TextChanged(object sender, EventArgs e)
|
||
{
|
||
//根据寸经外径对照表,输入外径是自动得到寸径
|
||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()))
|
||
{
|
||
decimal dia = Funs.GetNewDecimalOrZero(this.txtDia.Text.Trim());
|
||
if (dia >= 500)
|
||
{
|
||
this.drpIsSpecial.SelectedValue = "1";
|
||
}
|
||
|
||
var inch = HJGL_ControlService.GetSizeByDia(dia);
|
||
if (inch != null)
|
||
{
|
||
this.txtSize.Text = Convert.ToString(inch);
|
||
}
|
||
}
|
||
|
||
//焊口规格:Φ外径*壁厚
|
||
if (!string.IsNullOrEmpty(this.txtDia.Text.Trim()) && !string.IsNullOrEmpty(this.txtSch.Text.Trim()))
|
||
{
|
||
this.txtJointDesc.Text = "Φ" + this.txtDia.Text.Trim() + "×" + this.txtSch.Text.Trim();
|
||
}
|
||
}
|
||
|
||
// 非常规焊缝
|
||
protected void txtWeldL_TextChanged(object sender, EventArgs e)
|
||
{
|
||
if (!string.IsNullOrEmpty(this.txtWeldL.Text.Trim()))
|
||
{
|
||
this.txtJointDesc.Text = "L=" + this.txtWeldL.Text.Trim() + "×" + this.txtSch.Text.Trim();
|
||
}
|
||
}
|
||
|
||
#endregion
|
||
|
||
#region DropDownList下拉选择事件
|
||
/// <summary>
|
||
/// 焊缝类型下拉选择事件
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void ddlJOTY_ID_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (this.ddlJOTY_ID.SelectedValue != BLL.Const._Null)
|
||
{
|
||
var joty = BLL.HJGL_WeldService.GetJointTypeByID(this.ddlJOTY_ID.SelectedValue);
|
||
if (joty != null)
|
||
{
|
||
var isoInfo = BLL.HJGL_PW_IsoInfoService.GetIsoInfoByIsoInfoId(this.ISO_ID);
|
||
if (isoInfo != null)
|
||
{
|
||
if (!string.IsNullOrEmpty(isoInfo.ISC_ID) && !string.IsNullOrEmpty(isoInfo.ISO_Executive))
|
||
{
|
||
var weldControl = BLL.HJGL_WeldControlService.GEtWeldControlByISCIDAndExecStandardId(isoInfo.ISC_ID, isoInfo.ISO_Executive);
|
||
if (weldControl != null)
|
||
{
|
||
if (joty.JOTY_Group == "1")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_Level;
|
||
}
|
||
else if (joty.JOTY_Group == "2")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_C_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_C_Level;
|
||
}
|
||
else if (joty.JOTY_Group == "3")
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = weldControl.Joty_D_Rate;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = weldControl.Joty_D_Level;
|
||
}
|
||
else
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||
}
|
||
}
|
||
}
|
||
}
|
||
else
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||
}
|
||
}
|
||
else
|
||
{
|
||
this.drpNDTR_ID.SelectedValue = BLL.Const._Null;
|
||
this.drpJOT_QualifiedLevel.SelectedValue = BLL.Const._Null;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 材质1下拉选择事件
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void ddlSTE1_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (this.ddlSTE1.SelectedValue != BLL.Const._Null)
|
||
{
|
||
var ste = BLL.HJGL_MaterialService.GetSteelBySteID(this.ddlSTE1.SelectedValue);
|
||
if (ste != null)
|
||
{
|
||
this.txtHardQuaStandard.Text = ste.HardQuaStandard;
|
||
}
|
||
else
|
||
{
|
||
this.txtHardQuaStandard.Text = string.Empty;
|
||
}
|
||
this.ddlSTE2.SelectedValue = ddlSTE1.SelectedValue;
|
||
}
|
||
else
|
||
{
|
||
this.txtHardQuaStandard.Text = string.Empty;
|
||
}
|
||
}
|
||
|
||
/// <summary>
|
||
/// 是否显示热处理类型
|
||
/// </summary>
|
||
/// <param name="sender"></param>
|
||
/// <param name="e"></param>
|
||
protected void drpIS_Proess_SelectedIndexChanged(object sender, EventArgs e)
|
||
{
|
||
if (this.drpIS_Proess.SelectedValue == "1")
|
||
{
|
||
this.drpProessTypes.Hidden = false;
|
||
}
|
||
else
|
||
{
|
||
this.drpProessTypes.Hidden = true;
|
||
}
|
||
}
|
||
#endregion
|
||
}
|
||
} |