20230220 003焊接修改
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Microsoft.Office.Interop.Word;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -73,7 +74,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork1)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
int a = 0;
|
||||
if (ckNOEdit.Checked)
|
||||
{
|
||||
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
a = dt.Rows.Count;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
|
||||
}
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -97,8 +113,25 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
foreach (var q in unitWork2)
|
||||
{
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int a = 0;
|
||||
if (ckNOEdit.Checked)
|
||||
{
|
||||
string strSql = "SELECT distinct PipelineCode FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL AND UnitWorkId =@UnitWorkId AND WPQId IS NULL";
|
||||
List<SqlParameter> listStr = new List<SqlParameter>();
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", q.UnitWorkId));
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
a = dt.Rows.Count;
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
a = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == q.UnitWorkId
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
select x).Count();
|
||||
|
||||
}
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -135,7 +168,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
private void BindNodes(TreeNode node)
|
||||
{
|
||||
BLL.PipelineService.BindTreeNodes(node, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
BLL.PipelineService.BindTreeNodes(node,true, this.txtPipelineCode.Text.Trim(), this.CurrUser.LoginProjectId, pageSize);
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -164,11 +197,20 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
if (!string.IsNullOrEmpty(this.tvControlItem.SelectedNodeID))
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
|
||||
if (tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
if (pipeline != null)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID;
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
else if (tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.NodeID;
|
||||
this.BindGrid();
|
||||
}
|
||||
}
|
||||
@@ -188,8 +230,18 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
FROM View_HJGL_WeldJoint WHERE IsTwoJoint IS NULL ";
|
||||
List<SqlParameter> listStr = new List<SqlParameter> { };
|
||||
|
||||
strSql += " AND PipelineId =@PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", tvControlItem.SelectedNodeID));
|
||||
if (tvControlItem.SelectedNode.CommandName == "管线")
|
||||
{
|
||||
strSql += " AND PipelineId =@PipelineId";
|
||||
listStr.Add(new SqlParameter("@PipelineId", tvControlItem.SelectedNodeID));
|
||||
|
||||
}
|
||||
else if (tvControlItem.SelectedNode.CommandName.Split('|').Count() == 2)
|
||||
{
|
||||
strSql += " AND UnitWorkId =@UnitWorkId";
|
||||
listStr.Add(new SqlParameter("@UnitWorkId", tvControlItem.SelectedNodeID));
|
||||
|
||||
}
|
||||
|
||||
if (!string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()))
|
||||
{
|
||||
@@ -209,12 +261,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
System.Data.DataTable dt = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = dt.Rows.Count;
|
||||
var table = this.GetPagedDataTable(Grid1, dt);
|
||||
Grid1.DataSource = dt;
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
Reference in New Issue
Block a user