提交代码
This commit is contained in:
@@ -85,7 +85,7 @@ 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 = (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 unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -109,7 +109,7 @@ 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 select x).Count();
|
||||
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();
|
||||
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -169,29 +169,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
var AuditCount = (from x in hJGL_WeldJoints where x.PipelineId == item.PipelineId && x.IsTwoJoint == true && x.AuditDate != null select x).Count();
|
||||
TreeNode newNode = new TreeNode();
|
||||
|
||||
if (jotCount == AuditCount) //全部审核
|
||||
{
|
||||
newNode.Text = "<font color='#00FF00'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
else if (AuditCount == 0) //全部未审核
|
||||
{
|
||||
newNode.Text = "<font color='#FF0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
else //部分审核
|
||||
{
|
||||
newNode.Text = "<font color='#B9B925'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
}
|
||||
//if (jotCount > weldJotCount)
|
||||
//if (jotCount == AuditCount) //全部审核
|
||||
//{
|
||||
// newNode.Text = "<font color='#EE0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
// newNode.Text = "<font color='#00FF00'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
//else
|
||||
//else if (AuditCount == 0) //全部未审核
|
||||
//{
|
||||
// newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
// newNode.Text = "<font color='#FF0000'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
//else //部分审核
|
||||
//{
|
||||
// newNode.Text = "<font color='#B9B925'>" + item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】" + "</font>";
|
||||
|
||||
//}
|
||||
newNode.Text = item.PipelineCode + "【" + jotCount.ToString() + " " + "焊口" + "】";
|
||||
newNode.ToolTip = "管线号【焊口数】";
|
||||
newNode.NodeID = item.PipelineId;
|
||||
newNode.EnableClickEvent = true;
|
||||
@@ -239,7 +232,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
else
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
ckIsAudit.Checked = true;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
|
||||
@@ -290,13 +282,26 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked == true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
if (rbIsAudit.SelectedValue == "0")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " and AuditDate is not null";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate";
|
||||
listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal>("Size")).Sum();
|
||||
decimal? d = 0;
|
||||
var SizeSum = tb.AsEnumerable().Select(x => x.Field<decimal?>("Size") ?? d).Sum();
|
||||
lbSize.Text = SizeSum.ToString();
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
@@ -333,9 +338,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
strSql += " AND TwoJointType = @TwoJointType";
|
||||
listStr.Add(new SqlParameter("@TwoJointType", DropTwoJointType.SelectedValue));
|
||||
}
|
||||
if (ckIsAudit.Checked == true)
|
||||
if (rbIsAudit.SelectedValue != "2")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
if (rbIsAudit.SelectedValue == "0")
|
||||
{
|
||||
strSql += " and AuditDate is null";
|
||||
}
|
||||
else
|
||||
{
|
||||
strSql += " and AuditDate is not null";
|
||||
}
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.txtAuditDate.Text.Trim()))
|
||||
{
|
||||
strSql += " AND CONVERT(VARCHAR(20),AuditDate,23) =@AuditDate";
|
||||
listStr.Add(new SqlParameter("@AuditDate", this.txtAuditDate.Text.Trim()));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
@@ -805,12 +822,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 查询
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Tree_TextChanged(object sender, EventArgs e)
|
||||
protected void btnTreeFind_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.InitTreeMenu();
|
||||
this.BindGrid();
|
||||
@@ -1127,7 +1139,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
protected void ckIsAudit_CheckedChanged(object sender, CheckedEventArgs e)
|
||||
protected void rbIsAudit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByPipelineId(this.tvControlItem.SelectedNodeID);
|
||||
this.hdUnitWorkId.Text = string.Empty;
|
||||
@@ -1141,7 +1153,22 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
protected void txtAuditDate_TextChanged(object sender, EventArgs e)
|
||||
{
|
||||
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
|
||||
{
|
||||
this.hdUnitWorkId.Text = this.tvControlItem.SelectedNodeID;
|
||||
NoAuditBindGrid();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user