121221
This commit is contained in:
@@ -23,12 +23,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
this.UnitId = Request.Params["unitId"] ?? "";
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.PMIId = Request.Params["PMIId"] ?? "";
|
||||
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.UnitId = Request.Params["unitId"] ??"";
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
this.PMIId = Request.Params["PMIId"]??"";
|
||||
this.weldJointIds = Request.Params["weldJointIds"] ?? "";
|
||||
this.InitTreeMenu();//加载树
|
||||
this.BindGrid();
|
||||
}
|
||||
@@ -127,32 +127,12 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
select b.JointId
|
||||
).Distinct().ToList();
|
||||
|
||||
// string sql = @"SELECT WeldJointId,ProjectId,PipelineId,WeldJointCode,WPQCode,DetectionType,
|
||||
// convert(int,dbo.Fun_GetParseInt(WeldJointCode)) AS ConvertJointNo,
|
||||
//dbo.Fun_GetParseString(WeldJointCode) AS PreJotNo,
|
||||
// PipingClassCode,PipeSegment,JointAttribute,PageNum,
|
||||
// ComponentsCode1,ComponentsCode2,Is_hjName,IsHotProessStr,Material1Code,Material2Code,
|
||||
// WeldTypeCode,Specification,HeartNo1,HeartNo2,Size,Dia,Thickness,GrooveTypeCode,
|
||||
// WeldingMethodCode,WeldSilkId,WeldMatCode,WeldingDate,WeldingDailyCode,DoneDin,
|
||||
// BackingWelderCode,CoverWelderCode,SystemNumber,TestPackageNo,Remark,
|
||||
// MaterialCode,WeldingDate,
|
||||
// (CASE WHEN IsCancel=1 THEN '是' ELSE '否' END) AS IsCancel,isPMI
|
||||
// FROM View_Pipeline_WeldJoint WHERE isPMI=1 ";
|
||||
|
||||
|
||||
// List<SqlParameter> paramsList = new List<SqlParameter>();
|
||||
// if (!string.IsNullOrEmpty(this.txtJointNo.Text))
|
||||
// {
|
||||
// sql += @" and WeldJointCode=@WeldJointCode";
|
||||
// paramsList.Add(new SqlParameter("@WeldJointCode", txtJointNo.Text.Trim()));
|
||||
// }
|
||||
// if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
// {
|
||||
// sql += @" and PipelineId=@PipelineId ";
|
||||
// paramsList.Add(new SqlParameter("@PipelineId", this.tvControlItem.SelectedNodeID));
|
||||
// }
|
||||
// var dt = SQLHelper.GetDataTableRunText(sql, paramsList.ToArray());
|
||||
string[] arr = this.weldJointIds.Split('|');
|
||||
var query = Funs.DB.View_Pipeline_WeldJoint.Where(t => t.IsPMI == true);
|
||||
if (arr.Length > 0)
|
||||
{
|
||||
listData.Add(arr[0]);
|
||||
}
|
||||
if (listData.Count > 0)
|
||||
{
|
||||
query = query.Where(t => !listData.Contains(t.WeldJointId));
|
||||
@@ -165,7 +145,14 @@ namespace FineUIPro.Web.WeldingProcess.PMI
|
||||
{
|
||||
query = query.Where(t => t.PipelineId == this.tvControlItem.SelectedNodeID);
|
||||
}
|
||||
Grid1.DataSource = query.ToList();
|
||||
var data= query.ToList() ;
|
||||
if (!string.IsNullOrEmpty(weldJointIds))
|
||||
{
|
||||
string[] jots = weldJointIds.Split('|');
|
||||
data = data.Where(t => !jots.Contains(t.WeldJointId)).ToList();
|
||||
}
|
||||
data = data.OrderBy(t => t.WeldJointCode).ToList();
|
||||
Grid1.DataSource = data;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user