提交代码
This commit is contained in:
@@ -484,7 +484,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (wpqList != null)
|
||||
{
|
||||
Model.HJGL_WeldJoint newJot = WeldJointService.GetWeldJointByWeldJointId(jot.WeldJointId);
|
||||
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
|
||||
@@ -34,7 +34,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
ViewState["WeldJointId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
@@ -235,10 +235,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
//string perfix = txtPipelineCode.Text + "/Z-";
|
||||
string perfix = txtPipelineCode.Text + "/";
|
||||
this.txtWeldJointCode.Text = perfix;
|
||||
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
// txtWeldJointCode.Text = BLL.SQLHelper.RunProcNewIdByProjectId("SpGetNewCode4ByProjectId", "dbo.HJGL_WeldJoint", "WeldJointCode", this.CurrUser.LoginProjectId, perfix);
|
||||
|
||||
// txtWeldJointCode.Text = txtWeldJointCode.Text.Replace(perfix, "");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -322,7 +322,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void SaveData()
|
||||
{
|
||||
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
||||
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
||||
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
Alert.ShowInTop("页面必填项不能为空", MessageBoxIcon.Warning);
|
||||
@@ -337,22 +337,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
//if (!this.txtWeldJointCode.Text.Contains("G"))
|
||||
//{
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
int jointCode = Funs.GetNewIntOrZero(this.txtWeldJointCode.Text.Trim());
|
||||
if (jointCode != 0)
|
||||
{
|
||||
if (jointCode < 10)
|
||||
{
|
||||
if (jointCode < 10)
|
||||
{
|
||||
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = Convert.ToString(jointCode);
|
||||
}
|
||||
joint.WeldJointCode = "0" + Convert.ToString(jointCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
joint.WeldJointCode = Convert.ToString(jointCode);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
joint.WeldJointCode = this.txtWeldJointCode.Text;
|
||||
}
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
@@ -370,7 +370,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
joint.Size = Funs.GetNewDecimal(this.txtSize.Text.Trim());
|
||||
joint.Dia = Funs.GetNewDecimal(this.txtDia.Text.Trim());
|
||||
joint.DNDia=txtDNDia.Text.Trim();
|
||||
joint.DNDia = txtDNDia.Text.Trim();
|
||||
joint.Thickness = Funs.GetNewDecimal(this.txtThickness.Text.Trim());
|
||||
//if (this.drpComponent1.SelectedValue != BLL.Const._Null)
|
||||
//{
|
||||
@@ -644,7 +644,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
var wpsRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingRod);
|
||||
var matRod = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingRod.SelectedValue);
|
||||
if (IsCoverClass(wpsRod.SteelType, matRod.SteelType))
|
||||
if (wpsRod != null && matRod != null && IsCoverClass(wpsRod.SteelType, matRod.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
@@ -683,7 +683,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
var wpsWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(wps.WeldingWire);
|
||||
var matWire = BLL.Base_ConsumablesService.GetConsumablesByConsumablesId(drpWeldingWire.SelectedValue);
|
||||
if (IsCoverClass(wpsWire.SteelType, matWire.SteelType))
|
||||
if (wpsWire != null && matWire != null && IsCoverClass(wpsWire.SteelType, matWire.SteelType))
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
@@ -415,8 +415,16 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
Model.HJGL_WeldJoint newJot = new Model.HJGL_WeldJoint();
|
||||
if (wpqList != null)
|
||||
{
|
||||
|
||||
Model.WPQ_WPQList wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
Model.WPQ_WPQList wps = new Model.WPQ_WPQList();
|
||||
var a = wpqList.FirstOrDefault(x => x.WeldingMethodId == "feb1234c-a538-476f-99ac-7b3ab15997c1"); //优先匹配GTAW+SMAW的焊评
|
||||
if (a == null)
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(wpqList.First().WPQId);
|
||||
}
|
||||
else
|
||||
{
|
||||
wps = BLL.WPQListServiceService.GetWPQById(a.WPQId);
|
||||
}
|
||||
|
||||
newJot.WPQId = wps.WPQId;
|
||||
newJot.WeldJointId = jot.WeldJointId;
|
||||
@@ -483,11 +491,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
|
||||
{
|
||||
Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
//if (BLL.WeldTaskService.GetWeldTaskByWeldJointId(Grid1.SelectedRowID) != null) //已下任务单,不可修改数据
|
||||
//{
|
||||
// Alert.ShowInTop("该焊口已生成焊接任务单,不能编辑!", MessageBoxIcon.Warning);
|
||||
// return;
|
||||
//}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeldJointEdit.aspx?WeldJointId={0}&flag=2", Grid1.SelectedRowID, "维护 - ")));
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user