2023-02-17 焊接任务单修改
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
System.InvalidOperationException: 可为空的对象必须具有一个值。
|
||||
在 System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
|
||||
在 System.Nullable`1.get_Value()
|
||||
在 BLL.HJGL_MaterialService.isInStockByPipeline(String pipelineid, String projectid) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\BLL\HJGL\PreDesign\HJGL_MaterialService.cs:行号 284
|
||||
|
||||
错误信息开始=====>
|
||||
错误类型:FormatException
|
||||
错误信息:输入字符串的格式不正确。
|
||||
错误堆栈:
|
||||
在 System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
|
||||
在 System.String.System.IConvertible.ToDouble(IFormatProvider provider)
|
||||
在 System.Convert.ToDouble(Object value)
|
||||
在 FineUIPro.RenderField.VQscVYXUOqxsrrrlgEYaXHIhTAZB(GridRow )
|
||||
在 (GridColumn , GridRow )
|
||||
在 FineUIPro.GridRow.BkpgFeAELTFlAvoTrOBrConfcLJbA()
|
||||
在 (GridRow )
|
||||
在 FineUIPro.Grid.BkpgFeAELTFlAvoTrOBrConfcLJbA(Int32 , Object )
|
||||
在 (Grid , Int32 , Object )
|
||||
在 FineUIPro.Grid.LDChsdiaqdhUTcxBcQPMKyQFfjEDB(DataTable , Boolean )
|
||||
在 (Grid , DataTable , Boolean )
|
||||
在 FineUIPro.Grid.DataBind(Boolean keepCurrentData)
|
||||
在 (Grid , Boolean )
|
||||
在 FineUIPro.Grid.DataBind()
|
||||
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.BindGrid() 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 339
|
||||
在 FineUIPro.Web.HJGL.WeldingManage.SelectTaskWeldJoint.tvControlItem_NodeCommand(Object sender, TreeCommandEventArgs e) 位置 D:\诺必达\赛鼎\SGGL_SeDin\SGGL\FineUIPro.Web\HJGL\WeldingManage\SelectTaskWeldJoint.aspx.cs:行号 296
|
||||
在 FineUIPro.Tree.OnNodeCommand(TreeCommandEventArgs e)
|
||||
在 (Tree , TreeCommandEventArgs )
|
||||
在 FineUIPro.Tree.RaisePostBackEvent(String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
|
||||
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
|
||||
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
|
||||
出错时间:02/17/2023 15:15:39
|
||||
出错文件:http://localhost:4909/HJGL/WeldingManage/SelectTaskWeldJoint.aspx?strList=51f17d4a-92b5-4bbc-8935-fa0fced13bcb%7C1af885ff-b778-46c6-a13d-a21b304ac835%7C2022-12-01
|
||||
IP地址:::1
|
||||
操作人员:JT
|
||||
|
||||
出错时间:02/17/2023 15:15:39
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="200px" Title="点口管理" ShowBorder="true" Layout="VBox"
|
||||
EnableCollapse="true" Width="300px" Title="点口管理" ShowBorder="true" Layout="VBox"
|
||||
ShowHeader="false" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar4" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
@@ -74,9 +74,14 @@
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar3" Position="Top" runat="server" ToolbarAlign="Right">
|
||||
<Items>
|
||||
<f:Label ID="txtPointBatchCode" Label="批次编号" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:TextBox runat="server" ID="txtpipelinecode" Label ="管线号" LabelWidth="100px" LabelAlign="Right"> </f:TextBox>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnQuery" Text="查询" ToolTip="查询" Icon="SystemSearch" runat="server"
|
||||
OnClick="btnQuery_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnManual" Text="手动点口" ToolTip="生成" Icon="cmy" runat="server"
|
||||
OnClick="btnManual_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAutoPoint" Text="自动点口" ToolTip="生成" Icon="cmy" runat="server"
|
||||
OnClick="btnAutoPoint_Click">
|
||||
</f:Button>
|
||||
@@ -101,7 +106,7 @@
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="TbPipeline" Position="Top" runat="server" ToolbarAlign="Left" Hidden="true">
|
||||
<Items>
|
||||
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||
<f:Label ID="lbPipelineCode" Label="管线号" runat="server" LabelAlign="Right" LabelWidth="100px" >
|
||||
</f:Label>
|
||||
<f:Label ID="lbRate" Label="检测比例" runat="server" LabelAlign="Right" LabelWidth="100px">
|
||||
</f:Label>
|
||||
@@ -127,6 +132,8 @@
|
||||
</f:Toolbar>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server" ToolbarAlign="Left">
|
||||
<Items>
|
||||
<f:Label ID="txtPointBatchCode" Label="批次编号" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:Label ID="txtStartDate" Label="批次开始时间" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
</f:Label>
|
||||
<f:Label ID="txtEndDate" Label="批次关闭日期" runat="server" LabelAlign="Right" LabelWidth="110px">
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using BLL;
|
||||
using Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
@@ -257,6 +258,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
EnableClickEvent = true,
|
||||
};
|
||||
var pipeline= PointBatchService.GetPointBatchById(item.PointBatchId);
|
||||
string startdate = string.Format("{0:yyyy-MM-dd}", pipeline.StartDate);
|
||||
string PipeArea = "";
|
||||
if (!string.IsNullOrEmpty(pipeline.PipelineId))
|
||||
{
|
||||
@@ -273,19 +275,19 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
string code = "DK-" + item.PointBatchCode.Substring(item.PointBatchCode.Length - 4)+ PipeArea;
|
||||
if (!item.EndDate.HasValue) ////批 没有关闭 粉色
|
||||
{
|
||||
newNode.Text = "<font color='#FA58D0'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#FA58D0'>" + code +"【"+startdate + "】"+"</font>";
|
||||
newNode.ToolTip = "批尚未关闭";
|
||||
}
|
||||
// 当天批
|
||||
else if (string.Format("{0:yyyy-MM-dd}", item.StartDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now)
|
||||
|| string.Format("{0:yyyy-MM-dd}", item.EndDate) == string.Format("{0:yyyy-MM-dd}", System.DateTime.Now))
|
||||
{
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "</font>";
|
||||
newNode.Text = "<font color='#EE0000'>" + code + "【" + startdate + "】" + "</font>";
|
||||
newNode.ToolTip = "当天批";
|
||||
}
|
||||
else
|
||||
{
|
||||
newNode.Text = code;
|
||||
newNode.Text = code+ "【" + startdate + "】";
|
||||
}
|
||||
e.Node.Nodes.Add(newNode);
|
||||
|
||||
@@ -449,6 +451,11 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
listStr.Add(new SqlParameter("@PointBatchId", this.PointBatchId));
|
||||
}
|
||||
if (!string.IsNullOrEmpty(txtpipelinecode.Text.Trim()))
|
||||
{
|
||||
strSql += " and PipelineCode like @PipelineCode ";
|
||||
listStr.Add(new SqlParameter("@PipelineCode", "%"+ txtpipelinecode.Text.Trim() + "%"));
|
||||
}
|
||||
SqlParameter[] parameter = listStr.ToArray();
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
|
||||
@@ -483,6 +490,10 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
protected void btnQuery_Click(object sender, EventArgs e)
|
||||
{
|
||||
this.BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 分页排序
|
||||
@@ -624,7 +635,31 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
|
||||
|
||||
}
|
||||
protected void btnManual_Click(object sender, EventArgs e)
|
||||
{
|
||||
var batch = BLL.PointBatchService.GetPointBatchById(this.PointBatchId);
|
||||
if (!batch.EndDate.HasValue)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Grid1.SelectedRowID) )
|
||||
{
|
||||
PointBatchDetailService.UpdatePointBatchDetail(Grid1.SelectedRowID, "1", System.DateTime.Now);
|
||||
this.BindGrid();
|
||||
Alert.ShowInTop("已成功点口!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择点口!", MessageBoxIcon.Warning);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("批已关闭,不能点口!", MessageBoxIcon.Success);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
/// <summary>
|
||||
/// 手动点口关闭
|
||||
/// </summary>
|
||||
|
||||
+29
-2
@@ -123,13 +123,31 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
protected global::FineUIPro.Toolbar Toolbar3;
|
||||
|
||||
/// <summary>
|
||||
/// txtPointBatchCode 控件。
|
||||
/// txtpipelinecode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtPointBatchCode;
|
||||
protected global::FineUIPro.TextBox txtpipelinecode;
|
||||
|
||||
/// <summary>
|
||||
/// btnQuery 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnQuery;
|
||||
|
||||
/// <summary>
|
||||
/// btnManual 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnManual;
|
||||
|
||||
/// <summary>
|
||||
/// btnAutoPoint 控件。
|
||||
@@ -302,6 +320,15 @@ namespace FineUIPro.Web.HJGL.PointTrust
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// txtPointBatchCode 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtPointBatchCode;
|
||||
|
||||
/// <summary>
|
||||
/// txtStartDate 控件。
|
||||
/// </summary>
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
EnablePostBack="true" OnClick="btnQuery_Click" runat="server">
|
||||
</f:Button>
|
||||
</Items>
|
||||
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Items>
|
||||
@@ -110,6 +111,10 @@
|
||||
<f:RenderField HeaderText="焊口号" ColumnID="WeldJointCode"
|
||||
DataField="WeldJointCode" SortField="WeldJointCode" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="140px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="备注" ColumnID="Remark"
|
||||
DataField="Remark" SortField="Remark" FieldType="String" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="140px" Locked="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="材质1" ColumnID="Material1Code"
|
||||
DataField="Material1Code" FieldType="String"
|
||||
@@ -119,13 +124,15 @@
|
||||
DataField="Material2Code" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia"
|
||||
DataField="Dia" SortField="Dia" FieldType="Double" HeaderTextAlign="Center" TextAlign="Left"
|
||||
Width="120px">
|
||||
<f:RenderField HeaderText="外径" ColumnID="Dia" DataField="Dia" SortField="Dia"
|
||||
FieldType="Double" HeaderTextAlign="Center" TextAlign="Left" Width="120px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="公称直径" ColumnID="DNDia" DataField="DNDia" SortField="DNDia"
|
||||
FieldType="String" HeaderTextAlign="Center" TextAlign="Left" Width="120px" >
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="壁厚" ColumnID="Thickness"
|
||||
DataField="Thickness" SortField="Thickness" FieldType="Double" HeaderTextAlign="Center"
|
||||
TextAlign="Left" Width="120px">
|
||||
TextAlign="Left" Width="120px" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊缝类型" ColumnID="WeldTypeCode"
|
||||
DataField="WeldTypeCode" SortField="WeldTypeCode" FieldType="String"
|
||||
@@ -133,15 +140,15 @@
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊接方法" ColumnID="WeldingMethodCode"
|
||||
DataField="WeldingMethodCode" SortField="WeldingMethodCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="140px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊丝" ColumnID="WeldingWireCode"
|
||||
DataField="WeldingWireCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
<f:RenderField HeaderText="焊条" ColumnID="WeldingRodCode"
|
||||
DataField="WeldingRodCode" FieldType="String"
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true">
|
||||
HeaderTextAlign="Center" TextAlign="Left" Width="120px" ExpandUnusedSpace="true" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
|
||||
@@ -85,9 +85,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
}
|
||||
public List<HJGL_Pipeline> Tree_hJGL_Pipelines;
|
||||
public int pageindex=1;
|
||||
public int pageindex_2=1;
|
||||
public int pageSize=20;
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -102,8 +101,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
pageindex = 1;
|
||||
pageindex_2 = 1;
|
||||
|
||||
Tree_hJGL_Pipelines =new List<HJGL_Pipeline> ();
|
||||
this.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
|
||||
@@ -166,77 +164,57 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
/// </summary>
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
pageindex = 1;
|
||||
pageindex_2 = 1;
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_SHOP && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_FIELD && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
|
||||
TreeNode rootNode1 = new TreeNode();
|
||||
rootNode1.NodeID = BLL.PipelineService.PipeArea_SHOP;
|
||||
rootNode1.Text = "工厂预制";
|
||||
rootNode1.CommandName = "工厂预制";
|
||||
rootNode1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); //页码|总页
|
||||
rootNode1.EnableClickEvent = true;
|
||||
rootNode1.EnableExpandEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_SHOP select x).Count();
|
||||
if (a > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode1.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
TreeNode rootNode2 = new TreeNode();
|
||||
rootNode2.NodeID = BLL.PipelineService.PipeArea_FIELD;
|
||||
rootNode2.Text = "现场安装";
|
||||
rootNode2.CommandName = "现场安装";
|
||||
rootNode2.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize);
|
||||
rootNode2.EnableClickEvent = true;
|
||||
rootNode2.EnableExpandEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
int b = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipelineService.PipeArea_FIELD select x).Count();
|
||||
if (b > 0)
|
||||
{
|
||||
// BindNodes(tn1);
|
||||
TreeNode newNode = new TreeNode();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode2.Nodes.Add(newNode);
|
||||
}
|
||||
//TreeNode rootNode = new TreeNode();
|
||||
//rootNode.Text = "管线号";
|
||||
//rootNode.NodeID = "0";
|
||||
//rootNode.Expanded = true;
|
||||
//this.tvControlItem.Nodes.Add(rootNode);
|
||||
|
||||
|
||||
|
||||
}
|
||||
void AddTreeNode(string PipeArea , TreeNode node )
|
||||
{
|
||||
|
||||
var iso = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && x.UnitId == this.UnitId && x.PipeArea == PipeArea orderby x.PipelineCode select x).ToList();
|
||||
if (!string.IsNullOrEmpty(this.txtPipelineCode.Text))
|
||||
{
|
||||
iso = (from x in iso where x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) orderby x.PipelineCode select x).ToList();
|
||||
}
|
||||
int pagenum = 1 ;
|
||||
switch (PipeArea)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.UnitId == this.UnitId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode select x).ToList();
|
||||
var joints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
int pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
|
||||
if (pageindex <= pageCount)
|
||||
{
|
||||
case "1":
|
||||
pagenum = pageindex;
|
||||
break;
|
||||
case "2":
|
||||
pagenum = pageindex_2;
|
||||
break;
|
||||
}
|
||||
|
||||
var Count = iso.Count();
|
||||
if (pagenum <= Funs.GetEndPageNumber(Count,pageSize))
|
||||
{
|
||||
iso = iso.Skip(pageSize * (pagenum - 1)).Take(pageSize).ToList(); ;
|
||||
var joints = (from x in Funs.DB.HJGL_WeldJoint where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
|
||||
foreach (var item in iso)
|
||||
pipeline = pipeline.Skip(pageSize * (pageindex - 1)).Take(pageSize).ToList(); ;
|
||||
foreach (var item in pipeline)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
int totalJointNum = joints.Count(x => x.PipelineId == item.PipelineId);
|
||||
@@ -253,7 +231,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
node.Nodes.Add(newNode);
|
||||
|
||||
}
|
||||
if (pagenum < Count)
|
||||
if (pageindex < pageCount)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载";
|
||||
@@ -272,12 +250,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
if (e.Node.Nodes[0].NodeID == "加载管线...")
|
||||
{
|
||||
e.Node.Nodes.Clear();
|
||||
if (e.Node.CommandName == "工厂预制")
|
||||
if (e.Node.Text == "工厂预制")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "现场安装")
|
||||
else if (e.Node.Text == "现场安装")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node);
|
||||
|
||||
@@ -285,12 +263,46 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (e.Node.Text == "加载")
|
||||
{
|
||||
string CommandName = e.Node.ParentNode.CommandName;
|
||||
e.Node.ParentNode.CommandName = (int.Parse(CommandName.Split('|')[0]) + 1) + "|" + int.Parse(CommandName.Split('|')[1]);
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
|
||||
if (e.Node.CommandName == "1")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 数据绑定
|
||||
/// <summary>
|
||||
/// 数据绑定
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
@@ -354,42 +366,6 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 点击TreeView
|
||||
/// <summary>
|
||||
/// 点击TreeView
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
|
||||
{
|
||||
if (e.Node.Text == "加载")
|
||||
{
|
||||
|
||||
if (e.Node.CommandName == "1")
|
||||
{
|
||||
pageindex = pageindex + 1;
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
pageindex_2 = pageindex_2 + 1;
|
||||
TreeNode treeNode = e.Node.ParentNode;
|
||||
treeNode.Nodes.Remove(e.Node);
|
||||
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.BindGrid();
|
||||
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region 排序
|
||||
/// <summary>
|
||||
/// 排序
|
||||
|
||||
Reference in New Issue
Block a user