试压包导入

This commit is contained in:
jackchenyang
2024-05-24 21:27:14 +08:00
parent abfad3c2af
commit 3d974eead4
16 changed files with 1034 additions and 929 deletions
@@ -324,8 +324,8 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
{
string pipelineId = dr["PipelineId"].ToString();
string joinCodeList = dr["WeldJointCode"].ToString();
int count = countWeldJointCode(pipelineId);
int baseCount = countBaseWeldJointCode(pipelineId);
int count =BLL.TestPackageManageEditService.countWeldJointCode(pipelineId);
int baseCount = BLL.TestPackageManageEditService.countBaseWeldJointCode(pipelineId);
if (count == baseCount)
{
dr.Delete();
@@ -341,32 +341,7 @@ namespace FineUIPro.Web.WeldingProcess.TestPackageManage
Grid1.DataBind();
}
private int countBaseWeldJointCode(string pipelineId)
{
string sql = "select count(1) from Pipeline_WeldJoint where PipelineId=@PipelineId";
SqlParameter[] parameters = new SqlParameter[] {
new SqlParameter("@PipelineId",pipelineId)
};
int count = SQLHelper.getIntValue(sql, parameters);
return count;
}
private int countWeldJointCode(string pipelineId)
{
string sql = @"select WeldJointCode=(stuff((select ','+ WeldJonintCode from PTP_PipelineList where PipelineId=@PipelineId and isALL=0 for xml path('')),1,1,''))";
SqlParameter[] parameters = new SqlParameter[] {
new SqlParameter("@PipelineId",pipelineId)
};
string strCode = SQLHelper.GetStr(sql, parameters);
if(!string.IsNullOrEmpty(strCode) )
{
string[] arr=strCode.Split(',');
return arr==null?0:arr.Length;
}
else
{
return 0;
}
}
/// <summary>
/// 对GV 赋值
/// </summary>