代码无效引用清理,试压包资料界面看板修改

This commit is contained in:
2025-10-10 14:33:21 +08:00
parent 87fb529521
commit 55b798135c
933 changed files with 5897 additions and 7541 deletions
@@ -3,9 +3,7 @@ using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using System.Web.UI.DataVisualization.Charting;
namespace FineUIPro.Web.HJGL.PreDesign
{
@@ -51,19 +49,19 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
private void Bind()
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
}
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
this.imgPhoto.ImageUrl = "~/" + unit.FlowChartPic;
}
}
}
#region --
/// <summary>
@@ -111,8 +109,8 @@ namespace FineUIPro.Web.HJGL.PreDesign
//}
//else
//{
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
unitWork1 = (from x in unitWorkList where x.ProjectType == "1" select x).ToList();
unitWork2 = (from x in unitWorkList where x.ProjectType == "2" select x).ToList();
//}
if (unitWork1.Count() > 0)
@@ -138,17 +136,17 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
foreach (var q in unitWork2)
{
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId==q.UnitWorkId select x).Count();
int a = (from x in Funs.DB.HJGL_YardPlanning where x.SurperId == q.UnitWorkId select x).Count();
var unitNamesUnitIds = BLL.UnitService.getUnitNamesUnitIds(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName ;
// tn2.Text = q.UnitWorkName + "【" + a.ToString() + "】" + "管线";
tn2.Text = q.UnitWorkName;
tn2.CommandName = "主项";
tn2.ToolTip = "施工单位:" + unitNamesUnitIds;
tn2.EnableClickEvent = true;
rootNode2.Nodes.Add(tn2);
if (a>0)
if (a > 0)
{
BoundTree(tn2.Nodes, tn2.NodeID);
}
@@ -159,7 +157,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
private void BoundTree(TreeNodeCollection nodes, string superId)
{
var mdoel = BLL.HJGL_YardPlanningService.GetHJGL_YardPlanningBySurperId(superId);
foreach (var m in mdoel)
foreach (var m in mdoel)
{
TreeNode chidNode = new TreeNode
{
@@ -167,12 +165,12 @@ namespace FineUIPro.Web.HJGL.PreDesign
NodeID = m.YardPlanningId,
Expanded = true,
Selectable = true,
EnableClickEvent= true,
};
EnableClickEvent = true,
};
nodes.Add(chidNode);
this.BoundTree(chidNode.Nodes, m.YardPlanningId);
}
}
#endregion
@@ -226,11 +224,11 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
if (model != null)
{
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
}
this.imgPhoto.ImageUrl = null;
if (model != null)
{
HJGL_YardPlanningService.DeleteHJGL_YardPlanningById(model.YardPlanningId);
}
this.imgPhoto.ImageUrl = null;
}
else
{
@@ -245,37 +243,37 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (filePhoto.HasFile)
{
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
if (string.IsNullOrEmpty(rootUrl))
{
rootUrl = Funs.RootPath;
}
string rootUrl = ConfigurationManager.AppSettings["localRoot"];
if (string.IsNullOrEmpty(rootUrl))
{
rootUrl = Funs.RootPath;
}
string fileName = filePhoto.ShortFileName;
string fileName = filePhoto.ShortFileName;
if (!ValidateFileType(fileName))
{
// 清空文件上传控件
if (!ValidateFileType(fileName))
{
// 清空文件上传控件
filePhoto.Reset();
ShowNotify("无效的文件类型!");
return;
}
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName);
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
filePhoto.Reset();
ShowNotify("无效的文件类型!");
return;
}
fileName = fileName.Replace(":", "_").Replace(" ", "_").Replace("\\", "_").Replace("/", "_");
fileName = DateTime.Now.Ticks.ToString() + "_" + fileName;
filePhoto.SaveAs(rootUrl + "/FileUpload/HJGL_YardPlanning/" + fileName);
imgPhoto.ImageUrl = "~/FileUpload/HJGL_YardPlanning/" + fileName;
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "FileUpload/HJGL_YardPlanning/" + fileName);
// 清空文件上传组件(上传后要记着清空,否则点击提交表单时会再次上传!!)
filePhoto.Reset();
}
}
else
{
@@ -323,7 +321,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID))
{
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
var unit = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
this.imgPhoto.ImageUrl = null;
if (unit != null)
{
@@ -339,13 +337,13 @@ namespace FineUIPro.Web.HJGL.PreDesign
#endregion
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID)&& tvControlItem.SelectedNode.CommandName!="主项")
if (!string.IsNullOrEmpty(tvControlItem.SelectedNodeID) && tvControlItem.SelectedNode.CommandName != "主项")
{
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById( tvControlItem.SelectedNodeID);
var model = HJGL_YardPlanningService.GetHJGL_YardPlanningById(tvControlItem.SelectedNodeID);
if (model == null)
{
HJGL_YardPlanningService.SavePic( tvControlItem.SelectedNodeID, "");
// model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
HJGL_YardPlanningService.SavePic(tvControlItem.SelectedNodeID, "");
// model = HJGL_YardPlanningService.GetHJGL_YardPlanningByProjectId(this.CurrUser.LoginProjectId, tvControlItem.SelectedNodeID);
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/HJGL_YardPlanning&menuId={1}", model.YardPlanningId, BLL.Const.HJGL_YardPlanningMenuId)));
}