2022-11-23 焊接wbs树加载优化,管线划分数据加载优化
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -11,6 +12,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
|
||||
public partial class PipelingDivide : PageBase
|
||||
{
|
||||
public static List<Model.HJGL_Pipeline> view_HJGL_Pipelines =new List<Model.HJGL_Pipeline>();
|
||||
public decimal PipelineComplete
|
||||
{
|
||||
get
|
||||
@@ -50,7 +52,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
// this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
|
||||
this.InitTreeMenu();//加载树
|
||||
PipelineComplete = 0;
|
||||
PipelineNOComplete = 0;
|
||||
@@ -116,7 +118,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
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 PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn1 = new TreeNode();
|
||||
tn1.NodeID = q.UnitWorkId;
|
||||
@@ -130,7 +132,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
{
|
||||
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 PipelineService.hJGL_Pipelines where x.UnitWorkId == q.UnitWorkId select x).Count();
|
||||
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
|
||||
TreeNode tn2 = new TreeNode();
|
||||
tn2.NodeID = q.UnitWorkId;
|
||||
@@ -152,6 +154,16 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
Model.Parameter3D parameter3D = new Model.Parameter3D();
|
||||
Model.ColorModel colorModel = new Model.ColorModel();
|
||||
colorModel = BLL.Project_SysSetService.GetColorModel(this.CurrUser.LoginProjectId);
|
||||
@@ -174,32 +186,24 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
private void BindGrid()
|
||||
{
|
||||
|
||||
Model.View_HJGL_Pipeline view_HJGL_Pipeline = new Model.View_HJGL_Pipeline();
|
||||
Model.HJGL_Pipeline view_HJGL_Pipeline = new Model.HJGL_Pipeline();
|
||||
view_HJGL_Pipeline.ProjectId = this.CurrUser.LoginProjectId;
|
||||
view_HJGL_Pipeline.UnitWorkId = this.tvControlItem.SelectedNodeID;
|
||||
view_HJGL_Pipeline.PipelineCode = this.txtPipelineCode.Text.Trim();
|
||||
view_HJGL_Pipeline.SingleName = this.txtSingleName.Text.Trim();
|
||||
view_HJGL_Pipeline.DesignPress=this.txtDesignPress.Text.Trim();
|
||||
view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
// view_HJGL_Pipeline.MaterialCode=this.txtMaterialCode.Text.Trim();
|
||||
var list = BLL.PipelineService.GetView_HJGL_Pipelines(view_HJGL_Pipeline);
|
||||
var q = list.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP );
|
||||
var q2 = list.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD );
|
||||
if (q.Any())
|
||||
{
|
||||
List<string> listpipecode = new List<string>();
|
||||
foreach (var item in q)
|
||||
{
|
||||
listpipecode.Add("/" + item.PipelineCode);
|
||||
}
|
||||
Line_No = string.Join(",", listpipecode);
|
||||
}
|
||||
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
view_HJGL_Pipelines = list;
|
||||
// 2.获取当前分页数据
|
||||
Grid1.RecordCount = list.Count();
|
||||
//list = GetFilteredTable(Grid1.FilteredData, list);
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
|
||||
// 2.获取当前分页数据
|
||||
|
||||
// 3.绑定到Grid
|
||||
|
||||
|
||||
var table = this.GetPagedDataTable(Grid1, list);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
@@ -241,7 +245,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
// Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
@@ -325,7 +329,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
|
||||
#region 按钮事件
|
||||
protected void btnGetChart_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
var q = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_SHOP);
|
||||
var q2 = view_HJGL_Pipelines.Where(x => x.PipeArea == PipelineService.PipeArea_FIELD);
|
||||
PipelineComplete = q.Count();
|
||||
PipelineNOComplete = q2.Count();
|
||||
|
||||
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipelingDivideChart.aspx?PipelineComplete={0}&&PipelineNOComplete={1}", PipelineComplete, PipelineNOComplete, "编辑 - ")));
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user