提交代码
This commit is contained in:
@@ -87,7 +87,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
public List<HJGL_Pipeline> Tree_hJGL_Pipelines;
|
public List<HJGL_Pipeline> Tree_hJGL_Pipelines;
|
||||||
public int pageSize = PipelineService.pageSize;
|
public int pageSize = PipelineService.pageSize;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region 加载页面
|
#region 加载页面
|
||||||
@@ -103,7 +103,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
HJGL_MaterialService.materialStockItems_FIELD = new List<Model.MaterialStockItem>();
|
||||||
HJGL_MaterialService.materialStockItems_SHOP = 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.txtTaskDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now.AddDays(1));
|
||||||
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
|
this.txtTaskCode.Text = BLL.WeldTaskService.GetTaskCodeByDate(this.CurrUser.LoginProjectId, this.txtTaskDate.Text);
|
||||||
BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true);
|
BLL.Base_WeldingLocationServie.InitWeldingLocationDropDownList(drpWeldingLocation, true);
|
||||||
@@ -149,10 +149,10 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
txtTaskCode.Enabled = false;
|
txtTaskCode.Enabled = false;
|
||||||
}
|
}
|
||||||
string projectId = string.Empty;
|
string projectId = string.Empty;
|
||||||
|
|
||||||
if (UnitWorkId != null)
|
if (UnitWorkId != null)
|
||||||
{
|
{
|
||||||
|
|
||||||
projectId = UnitWork.ProjectId;
|
projectId = UnitWork.ProjectId;
|
||||||
this.txtUnitWorkName.Text = UnitWork.UnitWorkName;
|
this.txtUnitWorkName.Text = UnitWork.UnitWorkName;
|
||||||
}
|
}
|
||||||
@@ -169,15 +169,15 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
private void InitTreeMenu()
|
private void InitTreeMenu()
|
||||||
{
|
{
|
||||||
this.tvControlItem.Nodes.Clear();
|
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 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 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();
|
TreeNode rootNode1 = new TreeNode();
|
||||||
rootNode1.NodeID = BLL.PipelineService.PipeArea_SHOP;
|
rootNode1.NodeID = BLL.PipelineService.PipeArea_SHOP;
|
||||||
rootNode1.Text = "工厂预制";
|
rootNode1.Text = "工厂预制";
|
||||||
rootNode1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); //页码|总页
|
rootNode1.CommandName = 1 + "|" + Funs.GetEndPageNumber(a, pageSize); //页码|总页
|
||||||
rootNode1.EnableClickEvent = true;
|
rootNode1.EnableClickEvent = true;
|
||||||
rootNode1.EnableExpandEvent = true;
|
rootNode1.EnableExpandEvent = true;
|
||||||
this.tvControlItem.Nodes.Add(rootNode1);
|
this.tvControlItem.Nodes.Add(rootNode1);
|
||||||
if (a > 0)
|
if (a > 0)
|
||||||
{
|
{
|
||||||
@@ -195,28 +195,29 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
this.tvControlItem.Nodes.Add(rootNode2);
|
this.tvControlItem.Nodes.Add(rootNode2);
|
||||||
if (b > 0)
|
if (b > 0)
|
||||||
{
|
{
|
||||||
TreeNode newNode = new TreeNode();
|
TreeNode newNode = new TreeNode();
|
||||||
newNode.Text = "加载管线...";
|
newNode.Text = "加载管线...";
|
||||||
newNode.NodeID = "加载管线...";
|
newNode.NodeID = "加载管线...";
|
||||||
rootNode2.Nodes.Add(newNode);
|
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
|
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
&& x.UnitWorkId == this.UnitWorkId
|
&& x.UnitWorkId == this.UnitWorkId
|
||||||
&& x.PipeArea == PipeArea
|
&& x.PipeArea == PipeArea
|
||||||
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
&& x.PipelineCode.Contains(this.txtPipelineCode.Text.Trim())
|
||||||
orderby x.PipelineCode select x).ToList();
|
orderby x.PipelineCode
|
||||||
if (!string .IsNullOrEmpty( drpFlowingSection.SelectedValue)&& drpFlowingSection.SelectedValue!=Const._Null)
|
select x).ToList();
|
||||||
|
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
|
||||||
{
|
{
|
||||||
pipeline = pipeline.Where(x => x.FlowingSection == drpFlowingSection.SelectedValue).ToList();
|
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();
|
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]);
|
int pageCount = int.Parse(node.CommandName.Split('|')[1]);
|
||||||
|
|
||||||
if (pageindex <= pageCount)
|
if (pageindex <= pageCount)
|
||||||
@@ -250,8 +251,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
node.Nodes.Add(newNode);
|
node.Nodes.Add(newNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e)
|
||||||
{
|
{
|
||||||
@@ -269,7 +270,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -293,8 +294,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
AddTreeNode(BLL.PipelineService.PipeArea_SHOP, e.Node.ParentNode);
|
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);
|
AddTreeNode(BLL.PipelineService.PipeArea_FIELD, e.Node.ParentNode);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -316,7 +317,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
string pipelineId = this.tvControlItem.SelectedNodeID;
|
string pipelineId = this.tvControlItem.SelectedNodeID;
|
||||||
|
|
||||||
var toDoMatterList = (from x in Funs.DB.View_HJGL_NoWeldJointFind
|
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))
|
&& (string.IsNullOrEmpty(drpWeldTypeCode.SelectedValue) || x.WeldTypeCode.Contains(drpWeldTypeCode.SelectedValue))
|
||||||
select x).ToList();
|
select x).ToList();
|
||||||
|
|
||||||
@@ -363,9 +364,9 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
private void InitDropList()
|
private void InitDropList()
|
||||||
{
|
{
|
||||||
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
var pipeline = (from x in Funs.DB.HJGL_Pipeline
|
||||||
where x.ProjectId == this.CurrUser.LoginProjectId
|
where x.ProjectId == this.CurrUser.LoginProjectId
|
||||||
&& x.UnitWorkId == this.UnitWorkId
|
&& x.UnitWorkId == this.UnitWorkId
|
||||||
select x.FlowingSection).Distinct().ToList();
|
select x.FlowingSection).Distinct().ToList();
|
||||||
this.drpFlowingSection.DataTextField = "Value";
|
this.drpFlowingSection.DataTextField = "Value";
|
||||||
this.drpFlowingSection.DataValueField = "Value";
|
this.drpFlowingSection.DataValueField = "Value";
|
||||||
this.drpFlowingSection.DataSource = pipeline;
|
this.drpFlowingSection.DataSource = pipeline;
|
||||||
@@ -570,8 +571,8 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
NewTask.TaskDate = Convert.ToDateTime(txtTaskDate.Text);
|
NewTask.TaskDate = Convert.ToDateTime(txtTaskDate.Text);
|
||||||
NewTask.Tabler = this.CurrUser.PersonId;
|
NewTask.Tabler = this.CurrUser.PersonId;
|
||||||
NewTask.TableDate = DateTime.Now;
|
NewTask.TableDate = DateTime.Now;
|
||||||
|
|
||||||
weldJoint.WeldingMode= drpWeldingMode.SelectedValue;
|
weldJoint.WeldingMode = drpWeldingMode.SelectedValue;
|
||||||
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
BLL.WeldJointService.UpdateWeldJoint(weldJoint);
|
||||||
BLL.WeldTaskService.AddWeldTask(NewTask);
|
BLL.WeldTaskService.AddWeldTask(NewTask);
|
||||||
}
|
}
|
||||||
@@ -641,7 +642,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
e.RowSelectable = false;
|
e.RowSelectable = false;
|
||||||
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||||
|
|||||||
@@ -304,13 +304,13 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
SaveData();
|
SaveData(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 提交数据
|
/// 提交数据
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void SaveData()
|
private void SaveData(bool isClosed)
|
||||||
{
|
{
|
||||||
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
// if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null || string.IsNullOrEmpty(this.hdWeldingMethodId.Text) || string.IsNullOrEmpty(this.txtWpqId.Text.Trim()))
|
||||||
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
if (string.IsNullOrEmpty(this.txtWeldJointCode.Text.Trim()) || this.drpPipingClass.SelectedValue == BLL.Const._Null || this.drpMaterial1.SelectedValue == BLL.Const._Null || this.drpMaterial2.SelectedValue == BLL.Const._Null || this.drpWeldTypeCode.SelectedValue == BLL.Const._Null)
|
||||||
@@ -457,8 +457,11 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
|
|
||||||
BLL.WeldJointService.AddWeldJoint(joint);
|
BLL.WeldJointService.AddWeldJoint(joint);
|
||||||
}
|
}
|
||||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
if (isClosed)
|
||||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
{
|
||||||
|
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||||
|
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -871,7 +874,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(this.WeldJointId))
|
if (string.IsNullOrEmpty(this.WeldJointId))
|
||||||
{
|
{
|
||||||
SaveData();
|
SaveData(false);
|
||||||
}
|
}
|
||||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId)));
|
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/WeldJoint&menuId={1}", WeldJointId, BLL.Const.HJGL_WeldJointMenuId)));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -959,6 +959,12 @@ namespace FineUIPro.Web.HJGL.WeldingManage
|
|||||||
string str1 = hdItemsString.Text;
|
string str1 = hdItemsString.Text;
|
||||||
string str2 = hdTaskWeldJoint.Text;
|
string str2 = hdTaskWeldJoint.Text;
|
||||||
this.InitTreeMenu();
|
this.InitTreeMenu();
|
||||||
|
tvControlItem.SelectedNode.Expanded = true;
|
||||||
|
if (tvControlItem.SelectedNode.CommandName == "单位工程")
|
||||||
|
{
|
||||||
|
tvControlItem.SelectedNode.Nodes.Clear();
|
||||||
|
BindNodes(tvControlItem.SelectedNode);
|
||||||
|
}
|
||||||
var unit = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
|
var unit = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(tvControlItem.SelectedNodeID);
|
||||||
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
|
List<Model.View_HJGL_WeldingTask> GetWeldingTaskList = null;
|
||||||
if (unit == null)
|
if (unit == null)
|
||||||
|
|||||||
Reference in New Issue
Block a user