提交代码
This commit is contained in:
@@ -87,7 +87,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
}
|
||||
public List<HJGL_Pipeline> Tree_hJGL_Pipelines;
|
||||
public int pageSize = PipelineService.pageSize;
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
@@ -103,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||
HJGL_MaterialService.materialStockItems_SHOP = new List<Model.MaterialStockItem>();
|
||||
|
||||
Tree_hJGL_Pipelines =new List<HJGL_Pipeline> ();
|
||||
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);
|
||||
BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true);
|
||||
@@ -149,10 +149,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
txtTaskCode.Enabled = false;
|
||||
}
|
||||
string projectId = string.Empty;
|
||||
|
||||
|
||||
if (UnitWorkId != null)
|
||||
{
|
||||
|
||||
{
|
||||
|
||||
projectId = UnitWork.ProjectId;
|
||||
this.txtUnitWorkName.Text = UnitWork.UnitWorkName;
|
||||
}
|
||||
@@ -169,15 +169,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private void InitTreeMenu()
|
||||
{
|
||||
this.tvControlItem.Nodes.Clear();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && 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.PipeArea == PipelineService.PipeArea_FIELD && x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim()) select x).Count();
|
||||
int a = (from x in Funs.DB.HJGL_Pipeline where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitWorkId == this.UnitWorkId && 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.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 = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); //页码|总页
|
||||
rootNode1.EnableClickEvent = true;
|
||||
rootNode1.EnableExpandEvent = true;
|
||||
rootNode1.EnableExpandEvent = true;
|
||||
this.tvControlItem.Nodes.Add(rootNode1);
|
||||
if (a > 0)
|
||||
{
|
||||
@@ -195,28 +195,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
this.tvControlItem.Nodes.Add(rootNode2);
|
||||
if (b > 0)
|
||||
{
|
||||
TreeNode newNode = new TreeNode();
|
||||
TreeNode newNode = new TreeNode();
|
||||
newNode.Text = "加载管线...";
|
||||
newNode.NodeID = "加载管线...";
|
||||
rootNode2.Nodes.Add(newNode);
|
||||
}
|
||||
|
||||
}
|
||||
void AddTreeNode(string PipeArea , TreeNode node )
|
||||
{
|
||||
void AddTreeNode(string PipeArea, TreeNode node)
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode select x).ToList();
|
||||
if (!string .IsNullOrEmpty( drpFlowingSection.SelectedValue)&& drpFlowingSection.SelectedValue!=Const._Null)
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
&& x.PipeArea == PipeArea
|
||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||
orderby x.PipelineCode
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||
{
|
||||
pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).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 pageindex = int.Parse(node.CommandName.Split('|')[0]);
|
||||
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||
|
||||
if (pageindex <= pageCount)
|
||||
@@ -250,8 +251,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
node.Nodes.Add(newNode);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||
{
|
||||
@@ -269,7 +270,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
@@ -293,8 +294,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
else if (e.Node.CommandName == "2")
|
||||
{
|
||||
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||
|
||||
}
|
||||
@@ -316,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||
|
||||
var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
||||
where x.PipelineId == pipelineId && x.WeldingDailyId == null &&x.JointAttribute==drpJointAttribute.SelectedValue
|
||||
where x.PipelineId == pipelineId && x.WeldingDailyId == null && x.JointAttribute == drpJointAttribute.SelectedValue
|
||||
&& (string.IsNullOrEmpty(drpWeldTypeCode.SelectedValue) || x.WeldTypeCode.Contains(drpWeldTypeCode.SelectedValue))
|
||||
select x).ToList();
|
||||
|
||||
@@ -363,9 +364,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
private void InitDropList()
|
||||
{
|
||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||
&& x.UnitWorkId == this.UnitWorkId
|
||||
select x.FlowingSection).Distinct().ToList();
|
||||
this.drpFlowingSection.DataTextField = "Value";
|
||||
this.drpFlowingSection.DataValueField = "Value";
|
||||
this.drpFlowingSection.DataSource = pipeline;
|
||||
@@ -570,8 +571,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
NewTask.TaskDate = Convert.ToDateTime(txtTaskDate.Text);
|
||||
NewTask.Tabler = this.CurrUser.PersonId;
|
||||
NewTask.TableDate = DateTime.Now;
|
||||
|
||||
weldJoint.WeldingMode= drpWeldingMode.SelectedValue;
|
||||
|
||||
weldJoint.WeldingMode = drpWeldingMode.SelectedValue;
|
||||
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||
}
|
||||
@@ -641,7 +642,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
||||
{
|
||||
e.RowSelectable = false;
|
||||
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
|
||||
Reference in New Issue
Block a user