This commit is contained in:
高飞 2024-08-19 09:21:38 +08:00
commit d8438a5c76
57 changed files with 1382 additions and 839 deletions

View File

@ -106,7 +106,7 @@ namespace BLL
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
{
var getDataLists = (from x in db.WBS_UnitWork
where x.ProjectId == projectId && x.UnitId == unitId && x.SuperUnitWork == null
where x.ProjectId == projectId && x.UnitId == unitId && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select new Model.BaseInfoItem
{

View File

@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.Check
if (e.Node.CommandName == "ProjectType") //展开工程类型
{
var trUnitWork = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID
where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null||x.SuperUnitWork=="0") && x.ProjectType == e.Node.NodeID
select x;
trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode);
if (trUnitWork.Count() > 0)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -403,7 +403,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -169,7 +169,9 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 0; i < ir; i++)
{

View File

@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
{
@ -428,7 +428,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork=="0")
select x;
var oldViewInfos = from x in Funs.DB.Comprehensive_DesignChangeOrder

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -412,7 +412,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -429,7 +429,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -403,7 +403,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var posts = from x in Funs.DB.Base_Post select x;
@ -456,7 +456,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var posts = from x in Funs.DB.Base_Post select x;

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -397,7 +397,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var users = from x in Funs.DB.Project_ProjectUser
@ -478,7 +478,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
var users = from x in Funs.DB.Project_ProjectUser

View File

@ -173,7 +173,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -379,7 +379,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -175,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)
@ -407,7 +407,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
select x;
for (int i = 1; i < ir; i++)

View File

@ -166,7 +166,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive
join y in Funs.DB.Project_ProjectUnit on x.UnitId equals y.UnitId
where y.ProjectId == this.CurrUser.LoginProjectId && (y.UnitType == Const.ProjectUnitType_1 || y.UnitType == Const.ProjectUnitType_2)
select x;
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null orderby x.UnitWorkCode select x;
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
for (int i = 1; i < ir; i++)
@ -394,7 +397,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive
select x;
var cns = from x in Funs.DB.Base_CNProfessional select x;
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null select x;
var ins = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") select x;
var oldViewInfos = from x in Funs.DB.Comprehensive_SiteVisaManagement
where x.ProjectId == this.CurrUser.LoginProjectId
select x;

View File

@ -14,8 +14,8 @@
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="质量管理制度" EnableCollapse="true" OnPageIndexChange="Grid1_PageIndexChange"
runat="server" BoxFlex="1" DataKeyNames="QualityManagementSysId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="QualityManagementSysId" AllowSorting="true" SortField="ApprovalDate"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
runat="server" BoxFlex="1" DataKeyNames="QualityManagementSysId" AllowCellEditing="true" ClicksToEdit="2" DataIDField="QualityManagementSysId" AllowSorting="true" SortField="FileCode"
SortDirection="ASC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">

View File

@ -224,7 +224,7 @@ namespace FineUIPro.Web.CQMS.QualityPlanning
{
lists = lists.Where(x => x.FileName.Contains(this.txtFileName.Text.Trim()));
}
lists = lists.OrderByDescending(x => x.ApprovalDate);
lists = lists.OrderBy(x => x.FileCode);
if (lists != null)
{
string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId);

View File

@ -121,7 +121,7 @@ namespace FineUIPro.Web.CQMS.WBS
if (e.Node.CommandName == "ProjectType") //展开工程类型
{
var trUnitWork = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID
where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.ProjectType == e.Node.NodeID
select x;
trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode);
if (trUnitWork.Count() > 0)
@ -1033,7 +1033,7 @@ namespace FineUIPro.Web.CQMS.WBS
{
rootNode.Expanded = true;
var trUnitWork = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.ProjectType == projectType
where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.ProjectType == projectType
select x;
trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode);
if (trUnitWork.Count() > 0)

View File

@ -120,7 +120,7 @@ namespace FineUIPro.Web.CQMS.WBS
if (e.Node.CommandName == "ProjectType") //展开工程类型
{
var trUnitWork = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID
where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.ProjectType == e.Node.NodeID
select x;
trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode);
if (trUnitWork.Count() > 0)

View File

@ -87,7 +87,11 @@ namespace FineUIPro.Web.CQMS.WBS
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select x;
foreach (var q in unitWorks)
{
TreeNode newNode = new TreeNode();

View File

@ -79,7 +79,11 @@ namespace FineUIPro.Web.CQMS.WBS
this.trWBS.EnableIcons = true;
this.trWBS.AutoScroll = true;
this.trWBS.EnableSingleClickExpand = true;
var unitWorks = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId orderby x.UnitWorkCode select x;
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select x;
foreach (var q in unitWorks)
{
TreeNode newNode = new TreeNode();

View File

@ -71,7 +71,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -72,7 +72,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -70,7 +70,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -72,7 +72,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -74,7 +74,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -71,7 +71,7 @@ namespace FineUIPro.Web.HJGL.HotProcessHard
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_LV_LeakVacuum> LeakVacuumLists = (from x in Funs.DB.HJGL_LV_LeakVacuum where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_LV_LeakVacuum> LeakVacuumLists = (from x in Funs.DB.HJGL_LV_LeakVacuum where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_LV_LeakVacuum> LeakVacuumLists = (from x in Funs.DB.HJGL_LV_LeakVacuum where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -71,7 +71,7 @@ namespace FineUIPro.Web.HJGL.LeakVacuum
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_LV_LeakVacuum> LeakVacuumLists = (from x in Funs.DB.HJGL_LV_LeakVacuum where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -73,7 +73,7 @@ namespace FineUIPro.Web.HJGL.NDT
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -71,7 +71,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -48,7 +48,7 @@ namespace FineUIPro.Web.HJGL.PointTrust
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_PC_PurgingCleaning> PurgingCleaningLists = (from x in Funs.DB.HJGL_PC_PurgingCleaning where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_PC_PurgingCleaning> PurgingCleaning = (from x in Funs.DB.HJGL_PC_PurgingCleaning where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -91,7 +91,7 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_PC_PurgingCleaning> PurgingCleaning = (from x in Funs.DB.HJGL_PC_PurgingCleaning where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -72,7 +72,7 @@ namespace FineUIPro.Web.HJGL.PurgingCleaning
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.HJGL_PC_PurgingCleaning> PurgingCleaning = (from x in Funs.DB.HJGL_PC_PurgingCleaning where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -117,7 +117,7 @@ namespace FineUIPro.Web.HJGL.RepairAndExpand
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -90,7 +90,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId && x.TableDate >= startTime && x.TableDate < endTime

View File

@ -88,7 +88,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();

View File

@ -1,494 +1,504 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.HJGL.TestPackage
{
public partial class TestPackageAudit : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
{
get
{
return (string)ViewState["PTP_ID"];
}
set
{
ViewState["PTP_ID"] = value;
}
}
/// <summary>
/// 未通过数
/// </summary>
public int Count
{
get
{
return (int)ViewState["Count"];
}
set
{
ViewState["Count"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.PTP_ID = string.Empty;
this.InitTreeMenu();//加载树
}
}
#endregion
#region --
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode1 = new TreeNode();
rootNode1.NodeID = "1";
rootNode1.Text = "建筑工程";
rootNode1.CommandName = "建筑工程";
this.tvControlItem.Nodes.Add(rootNode1);
TreeNode rootNode2 = new TreeNode();
rootNode2.NodeID = "2";
rootNode2.Text = "安装工程";
rootNode2.CommandName = "安装工程";
rootNode2.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode2);
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
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();
}
if (unitWork1.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + u.UnitName;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn1, testPackageUnitList);
}
}
if (unitWork2.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + u.UnitName;
tn2.CommandName = "单位工程";
rootNode2.Nodes.Add(tn2);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn2, testPackageUnitList);
}
}
}
#endregion
#region
/// <summary>
/// 绑定树节点
/// </summary>
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.PTP_TestPackage> testPackageUnitList)
{
if (node.CommandName == "单位工程")
{
var dReports = from x in testPackageUnitList
where x.UnitWorkId == node.NodeID
orderby x.TestPackageNo descending
select x;
foreach (var item in dReports)
{
TreeNode newNode = new TreeNode();
if (!string.IsNullOrEmpty(item.TestPackageNo))
{
newNode.Text = item.TestPackageNo;
}
else
{
newNode.Text = "未知";
}
if (!item.AduditDate.HasValue || string.IsNullOrEmpty(item.Auditer))
{
newNode.Text = "<font color='#FF7575'>" + newNode.Text + "</font>";
node.Text = "<font color='#FF7575'>" + node.Text + "</font>";
}
newNode.NodeID = item.PTP_ID;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.PTP_ID = tvControlItem.SelectedNodeID;
this.BindGrid();
btnAudit.Hidden = false;
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @"SELECT * FROM dbo.View_PTP_TestPackageAudit
WHERE ProjectId= @ProjectId AND PTP_ID=@PTP_ID";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
this.ShowGridItem();
}
/// <summary>
/// 行颜色设置
/// </summary>
private void ShowGridItem()
{
Count = 0;
int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0;
int rowsCount = this.Grid1.Rows.Count;
for (int i = 0; i < rowsCount; i++)
{
int IsoInfoCount = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[3].ToString()); //总焊口
int IsoInfoCountT = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[4].ToString()); //完成总焊口
int CountS = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[5].ToString()); //合格数
int CountU = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[6].ToString()); //不合格数
decimal Rate = 0;
bool convertible = decimal.TryParse(this.Grid1.Rows[i].Values[9].ToString(), out Rate); //应检测比例
decimal Ratio = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[10].ToString()); //实际检测比例
if (IsoInfoCount > IsoInfoCountT) //未焊完
{
Count1 += 1;
this.Grid1.Rows[i].RowCssClass = "Cyan";
}
else if (Rate > Ratio) //已焊完,未达检测比例
{
Count2 += 1;
this.Grid1.Rows[i].RowCssClass = "Yellow";
}
else if (CountU > 0) //已焊完,已达检测比例,但有不合格
{
Count3 += 1;
this.Grid1.Rows[i].RowCssClass = "Green";
}
else
{
Count4 += 1;
this.Grid1.Rows[i].RowCssClass = "Purple";
}
}
Count = Count1 + Count2 + Count2;
this.lab1.Text = Count1.ToString();
this.lab2.Text = Count2.ToString();
this.lab3.Text = Count3.ToString();
this.lab4.Text = Count4.ToString();
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
private void PageInfoLoad()
{
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (testPackageManage != null)
{
this.txtTestPackageNo.Text = testPackageManage.TestPackageNo;
this.txtTestPackageName.Text = testPackageManage.TestPackageName;
this.txtRemark.Text = testPackageManage.Remark;
this.txtadjustTestPressure.Text = testPackageManage.AdjustTestPressure;
if (!string.IsNullOrEmpty(testPackageManage.Check1))
{
drpInstallationSpecification.SelectedValue = testPackageManage.Check1;
}
if (!string.IsNullOrEmpty(testPackageManage.Check2))
{
drpPressureTest.SelectedValue = testPackageManage.Check2;
} if (!string.IsNullOrEmpty(testPackageManage.Check3))
{
drpWorkRecord.SelectedValue = testPackageManage.Check3;
} if (!string.IsNullOrEmpty(testPackageManage.Check4))
{
drpNDTConform.SelectedValue = testPackageManage.Check4;
} if (!string.IsNullOrEmpty(testPackageManage.Check5))
{
drpHotConform.SelectedValue = testPackageManage.Check5;
} if (!string.IsNullOrEmpty(testPackageManage.Check6))
{
drpInstallationCorrectness.SelectedValue = testPackageManage.Check6;
} if (!string.IsNullOrEmpty(testPackageManage.Check7))
{
drpMarkClearly.SelectedValue = testPackageManage.Check7;
} if (!string.IsNullOrEmpty(testPackageManage.Check8))
{
drpIsolationOpening.SelectedValue = testPackageManage.Check8;
} if (!string.IsNullOrEmpty(testPackageManage.Check9))
{
drpConstructionPlanAsk.SelectedValue = testPackageManage.Check9;
} if (!string.IsNullOrEmpty(testPackageManage.Check10))
{
drpCover.SelectedValue = testPackageManage.Check10;
} if (!string.IsNullOrEmpty(testPackageManage.Check11))
{
drpMeetRequirements.SelectedValue = testPackageManage.Check11;
} if (!string.IsNullOrEmpty(testPackageManage.Check12))
{
drpStainlessTestWater.SelectedValue = testPackageManage.Check12;
}
}
}
#endregion
#region
/// <summary>
/// 清空输入框
/// </summary>
private void SetTextTemp()
{
this.txtTestPackageNo.Text = string.Empty;
this.txtRemark.Text = string.Empty;
}
#endregion
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#region
#region
/// <summary>
/// 审核检测单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TestPackageAuditMenuId, Const.BtnAuditing))
{
var updateTestPackage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (updateTestPackage != null)
{
if (Count == 0)
{
string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID);
if (string.IsNullOrEmpty(isnoHot))
{
string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
if (string.IsNullOrEmpty(inspectionIsoRate))
{
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
updateTestPackage.Check4 = drpNDTConform.SelectedValue;
updateTestPackage.Check5 = drpHotConform.SelectedValue;
updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue;
updateTestPackage.Check7 = drpMarkClearly.SelectedValue;
updateTestPackage.Check8 = drpIsolationOpening.SelectedValue;
updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue;
updateTestPackage.Check10 = drpCover.SelectedValue;
updateTestPackage.Check11 = drpMeetRequirements.SelectedValue;
updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue;
updateTestPackage.AduditDate = DateTime.Now;
updateTestPackage.Auditer = this.CurrUser.UserId;
BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage);
this.InitTreeMenu();
this.BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop(isnoHot, MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("管线未全部通过不允许确认操作!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择要确认的单据!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.PTP_ID = this.hdPTP_ID.Text;
this.BindGrid();
this.InitTreeMenu();
this.hdPTP_ID.Text = string.Empty;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 试压包打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.PTP_ID))
{
//string reportId = BLL.Const.HJGL_TrustReportId; // 试压包打印 待做模板
//PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}", reportId, this.PTP_ID, string.Empty, "打印 - ")));
}
else
{
ShowNotify("请选择无损委托记录!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.HJGL.TestPackage
{
public partial class TestPackageAudit : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
{
get
{
return (string)ViewState["PTP_ID"];
}
set
{
ViewState["PTP_ID"] = value;
}
}
/// <summary>
/// 未通过数
/// </summary>
public int Count
{
get
{
return (int)ViewState["Count"];
}
set
{
ViewState["Count"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.PTP_ID = string.Empty;
this.InitTreeMenu();//加载树
}
}
#endregion
#region --
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode1 = new TreeNode();
rootNode1.NodeID = "1";
rootNode1.Text = "建筑工程";
rootNode1.CommandName = "建筑工程";
this.tvControlItem.Nodes.Add(rootNode1);
TreeNode rootNode2 = new TreeNode();
rootNode2.NodeID = "2";
rootNode2.Text = "安装工程";
rootNode2.CommandName = "安装工程";
rootNode2.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode2);
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
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();
}
if (unitWork1.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + u.UnitName;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn1, testPackageUnitList);
}
}
if (unitWork2.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + u.UnitName;
tn2.CommandName = "单位工程";
rootNode2.Nodes.Add(tn2);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn2, testPackageUnitList);
}
}
}
#endregion
#region
/// <summary>
/// 绑定树节点
/// </summary>
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.PTP_TestPackage> testPackageUnitList)
{
if (node.CommandName == "单位工程")
{
var dReports = from x in testPackageUnitList
where x.UnitWorkId == node.NodeID
orderby x.TestPackageNo descending
select x;
foreach (var item in dReports)
{
TreeNode newNode = new TreeNode();
if (!string.IsNullOrEmpty(item.TestPackageNo))
{
newNode.Text = item.TestPackageNo;
}
else
{
newNode.Text = "未知";
}
if (!item.AduditDate.HasValue || string.IsNullOrEmpty(item.Auditer))
{
newNode.Text = "<font color='#FF7575'>" + newNode.Text + "</font>";
node.Text = "<font color='#FF7575'>" + node.Text + "</font>";
}
newNode.NodeID = item.PTP_ID;
newNode.EnableClickEvent = true;
node.Nodes.Add(newNode);
}
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.PTP_ID = tvControlItem.SelectedNodeID;
this.BindGrid();
btnAudit.Hidden = false;
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @"SELECT * FROM dbo.View_PTP_TestPackageAudit
WHERE ProjectId= @ProjectId AND PTP_ID=@PTP_ID";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
this.ShowGridItem();
}
/// <summary>
/// 行颜色设置
/// </summary>
private void ShowGridItem()
{
Count = 0;
int Count1 = 0, Count2 = 0, Count3 = 0, Count4 = 0;
int rowsCount = this.Grid1.Rows.Count;
for (int i = 0; i < rowsCount; i++)
{
int IsoInfoCount = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[3].ToString()); //总焊口
int IsoInfoCountT = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[4].ToString()); //完成总焊口
int CountS = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[5].ToString()); //合格数
int CountU = Funs.GetNewIntOrZero(this.Grid1.Rows[i].Values[6].ToString()); //不合格数
decimal Rate = 0;
bool convertible = decimal.TryParse(this.Grid1.Rows[i].Values[9].ToString(), out Rate); //应检测比例
decimal Ratio = Funs.GetNewDecimalOrZero(this.Grid1.Rows[i].Values[10].ToString()); //实际检测比例
if (IsoInfoCount > IsoInfoCountT) //未焊完
{
Count1 += 1;
this.Grid1.Rows[i].RowCssClass = "Cyan";
}
else if (Rate > Ratio) //已焊完,未达检测比例
{
Count2 += 1;
this.Grid1.Rows[i].RowCssClass = "Yellow";
}
else if (CountU > 0) //已焊完,已达检测比例,但有不合格
{
Count3 += 1;
this.Grid1.Rows[i].RowCssClass = "Green";
}
else
{
Count4 += 1;
this.Grid1.Rows[i].RowCssClass = "Purple";
}
}
Count = Count1 + Count2 + Count2;
this.lab1.Text = Count1.ToString();
this.lab2.Text = Count2.ToString();
this.lab3.Text = Count3.ToString();
this.lab4.Text = Count4.ToString();
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
private void PageInfoLoad()
{
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (testPackageManage != null)
{
this.txtTestPackageNo.Text = testPackageManage.TestPackageNo;
this.txtTestPackageName.Text = testPackageManage.TestPackageName;
this.txtRemark.Text = testPackageManage.Remark;
this.txtadjustTestPressure.Text = testPackageManage.AdjustTestPressure;
if (!string.IsNullOrEmpty(testPackageManage.Check1))
{
drpInstallationSpecification.SelectedValue = testPackageManage.Check1;
}
if (!string.IsNullOrEmpty(testPackageManage.Check2))
{
drpPressureTest.SelectedValue = testPackageManage.Check2;
}
if (!string.IsNullOrEmpty(testPackageManage.Check3))
{
drpWorkRecord.SelectedValue = testPackageManage.Check3;
}
if (!string.IsNullOrEmpty(testPackageManage.Check4))
{
drpNDTConform.SelectedValue = testPackageManage.Check4;
}
if (!string.IsNullOrEmpty(testPackageManage.Check5))
{
drpHotConform.SelectedValue = testPackageManage.Check5;
}
if (!string.IsNullOrEmpty(testPackageManage.Check6))
{
drpInstallationCorrectness.SelectedValue = testPackageManage.Check6;
}
if (!string.IsNullOrEmpty(testPackageManage.Check7))
{
drpMarkClearly.SelectedValue = testPackageManage.Check7;
}
if (!string.IsNullOrEmpty(testPackageManage.Check8))
{
drpIsolationOpening.SelectedValue = testPackageManage.Check8;
}
if (!string.IsNullOrEmpty(testPackageManage.Check9))
{
drpConstructionPlanAsk.SelectedValue = testPackageManage.Check9;
}
if (!string.IsNullOrEmpty(testPackageManage.Check10))
{
drpCover.SelectedValue = testPackageManage.Check10;
}
if (!string.IsNullOrEmpty(testPackageManage.Check11))
{
drpMeetRequirements.SelectedValue = testPackageManage.Check11;
}
if (!string.IsNullOrEmpty(testPackageManage.Check12))
{
drpStainlessTestWater.SelectedValue = testPackageManage.Check12;
}
}
}
#endregion
#region
/// <summary>
/// 清空输入框
/// </summary>
private void SetTextTemp()
{
this.txtTestPackageNo.Text = string.Empty;
this.txtRemark.Text = string.Empty;
}
#endregion
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#region
#region
/// <summary>
/// 审核检测单
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
if (CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, Const.TestPackageAuditMenuId, Const.BtnAuditing))
{
var updateTestPackage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (updateTestPackage != null)
{
if (Count == 0)
{
string isnoHot = BLL.TestPackageEditService.IsExistNoHotHardItem(this.PTP_ID);
if (string.IsNullOrEmpty(isnoHot))
{
string inspectionIsoRate = BLL.TestPackageEditService.InspectionIsoRate(this.PTP_ID);
if (string.IsNullOrEmpty(inspectionIsoRate))
{
updateTestPackage.Check1 = drpInstallationSpecification.SelectedValue;
updateTestPackage.Check2 = drpPressureTest.SelectedValue;
updateTestPackage.Check3 = drpWorkRecord.SelectedValue;
updateTestPackage.Check4 = drpNDTConform.SelectedValue;
updateTestPackage.Check5 = drpHotConform.SelectedValue;
updateTestPackage.Check6 = drpInstallationCorrectness.SelectedValue;
updateTestPackage.Check7 = drpMarkClearly.SelectedValue;
updateTestPackage.Check8 = drpIsolationOpening.SelectedValue;
updateTestPackage.Check9 = drpConstructionPlanAsk.SelectedValue;
updateTestPackage.Check10 = drpCover.SelectedValue;
updateTestPackage.Check11 = drpMeetRequirements.SelectedValue;
updateTestPackage.Check12 = drpStainlessTestWater.SelectedValue;
updateTestPackage.AduditDate = DateTime.Now;
updateTestPackage.Auditer = this.CurrUser.UserId;
BLL.TestPackageEditService.UpdateTestPackage(updateTestPackage);
this.InitTreeMenu();
this.BindGrid();
ShowNotify("保存成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop(inspectionIsoRate, MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop(isnoHot, MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("管线未全部通过不允许确认操作!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("请选择要确认的单据!", MessageBoxIcon.Warning);
return;
}
}
else
{
Alert.ShowInTop("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning);
return;
}
}
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.PTP_ID = this.hdPTP_ID.Text;
this.BindGrid();
this.InitTreeMenu();
this.hdPTP_ID.Text = string.Empty;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 试压包打印
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnPrint_Click(object sender, EventArgs e)
{
if (!string.IsNullOrEmpty(this.PTP_ID))
{
//string reportId = BLL.Const.HJGL_TrustReportId; // 试压包打印 待做模板
//PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("../../Common/ReportPrint/ExReportPrint.aspx?ispop=1&reportId={0}&replaceParameter={1}&varValue={2}", reportId, this.PTP_ID, string.Empty, "打印 - ")));
}
else
{
ShowNotify("请选择无损委托记录!", MessageBoxIcon.Warning);
return;
}
}
#endregion
}
}

View File

@ -1,224 +1,323 @@
using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; using BLL; using Newtonsoft.Json.Linq; namespace FineUIPro.Web.HJGL.TestPackage { public partial class TestPackageComplete : PageBase { #region
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
{
get
{
return (string)ViewState["PTP_ID"];
}
set
{
ViewState["PTP_ID"] = value;
}
}
#endregion
#region /// <summary> /// 加载页面 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.PTP_ID = string.Empty; this.InitTreeMenu();//加载树 } } #endregion #region --
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode1 = new TreeNode();
rootNode1.NodeID = "1";
rootNode1.Text = "建筑工程";
rootNode1.CommandName = "建筑工程";
this.tvControlItem.Nodes.Add(rootNode1);
TreeNode rootNode2 = new TreeNode();
rootNode2.NodeID = "2";
rootNode2.Text = "安装工程";
rootNode2.CommandName = "安装工程";
rootNode2.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode2);
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
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();
}
if (unitWork1.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + u.UnitName;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn1, testPackageUnitList);
}
}
if (unitWork2.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + u.UnitName;
tn2.CommandName = "单位工程";
rootNode2.Nodes.Add(tn2);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn2, testPackageUnitList);
}
}
}
#endregion #region
/// <summary>
/// 绑定树节点
/// </summary>
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.PTP_TestPackage> testPackageUnitList)
{
if (node.CommandName == "单位工程")
{
var dReports = from x in testPackageUnitList
where x.UnitWorkId == node.NodeID
&& x.State == Const.TestPackage_Complete
orderby x.TestPackageNo descending
select x;
foreach (var item in dReports)
{
TreeNode newNode = new TreeNode();
if (!string.IsNullOrEmpty(item.TestPackageNo))
{
newNode.Text = item.TestPackageNo;
}
else
{
newNode.Text = "未知";
}
if (!item.AduditDate.HasValue || string.IsNullOrEmpty(item.Auditer))
{
newNode.Text = "<font color='#FF7575'>" + newNode.Text + "</font>";
node.Text = "<font color='#FF7575'>" + node.Text + "</font>";
}
newNode.NodeID = item.PTP_ID;
newNode.EnableClickEvent = true;
newNode.CommandName = "TestPackage";
node.Nodes.Add(newNode);
}
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.PTP_ID = tvControlItem.SelectedNodeID;
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
ptpPipe.TestMediumTemperature, ptpPipe.TestPressure, ptpPipe.HoldingTime,IsoInfo.PipelineCode,testMedium.MediumName
FROM dbo.PTP_PipelineList AS ptpPipe
LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium
WHERE ptpPipe.PTP_ID=@PTP_ID";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
private void PageInfoLoad()
{
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (testPackageManage != null)
{
this.txtadjustTestPressure.Text = testPackageManage.AdjustTestPressure;
this.txtAmbientTemperature.Text = testPackageManage.AmbientTemperature.ToString();
this.txtFinishDef.Text = testPackageManage.FinishDef;
this.txtHoldingTime.Text = testPackageManage.HoldingTime.ToString();
this.txtTestDate.Text = testPackageManage.TestDate?.ToString("yyyy-MM-dd");
this.txtTestMediumTemperature.Text = testPackageManage.TestMediumTemperature.ToString();
}
}
#endregion
#region
/// <summary>
/// 清空页面输入信息
/// </summary>
private void SetTextTemp()
{
this.txtadjustTestPressure.Text = string.Empty;
this.txtAmbientTemperature.Text = string.Empty;
this.txtFinishDef.Text = string.Empty;
this.txtHoldingTime.Text = string.Empty;
this.txtTestDate.Text = string.Empty;
this.txtTestMediumTemperature.Text = string.Empty;
}
#endregion
#endregion
#region
#region /// <summary> /// 页索引改变事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) { BindGrid(); } #endregion #region /// <summary> /// 排序 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Grid1_Sort(object sender, GridSortEventArgs e) { BindGrid(); } #endregion #region /// <summary> /// 分页选择下拉改变事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) { Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); BindGrid(); } #endregion #endregion #region /// <summary> /// 关闭弹出窗口 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Window1_Close(object sender, WindowCloseEventArgs e) { this.PTP_ID = this.hdPTP_ID.Text; this.BindGrid(); this.InitTreeMenu(); this.hdPTP_ID.Text = string.Empty; } /// <summary> /// 查询 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void Tree_TextChanged(object sender, EventArgs e) { this.InitTreeMenu(); this.BindGrid(); }
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdPTP_ID.ClientID)+ Window1.GetShowReference(String.Format("TestPackageCompleteEdit.aspx?PTP_ID={0}", this.tvControlItem.SelectedNodeID, "操作 - ")));
}
} }
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
using BLL;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.HJGL.TestPackage
{
public partial class TestPackageComplete : PageBase
{
#region
/// <summary>
/// 试压包主键
/// </summary>
public string PTP_ID
{
get
{
return (string)ViewState["PTP_ID"];
}
set
{
ViewState["PTP_ID"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString();
this.PTP_ID = string.Empty;
this.InitTreeMenu();//加载树
}
}
#endregion
#region --
/// <summary>
/// 加载树
/// </summary>
private void InitTreeMenu()
{
this.tvControlItem.Nodes.Clear();
TreeNode rootNode1 = new TreeNode();
rootNode1.NodeID = "1";
rootNode1.Text = "建筑工程";
rootNode1.CommandName = "建筑工程";
this.tvControlItem.Nodes.Add(rootNode1);
TreeNode rootNode2 = new TreeNode();
rootNode2.NodeID = "2";
rootNode2.Text = "安装工程";
rootNode2.CommandName = "安装工程";
rootNode2.Expanded = true;
this.tvControlItem.Nodes.Add(rootNode2);
var pUnits = (from x in Funs.DB.Project_ProjectUnit where x.ProjectId == this.CurrUser.LoginProjectId select x).ToList();
// 获取当前用户所在单位
var currUnit = pUnits.FirstOrDefault(x => x.UnitId == this.CurrUser.UnitId);
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;
List<Model.WBS_UnitWork> unitWork2 = null;
// 当前为施工单位,只能操作本单位的数据
if (currUnit != null && currUnit.UnitType == Const.ProjectUnitType_2)
{
unitWork1 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "1"
select x).ToList();
unitWork2 = (from x in unitWorkList
where x.UnitId == this.CurrUser.UnitId && x.ProjectType == "2"
select x).ToList();
}
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();
}
if (unitWork1.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn1 = new TreeNode();
tn1.NodeID = q.UnitWorkId;
tn1.Text = q.UnitWorkName;
tn1.ToolTip = "施工单位:" + u.UnitName;
tn1.CommandName = "单位工程";
rootNode1.Nodes.Add(tn1);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn1, testPackageUnitList);
}
}
if (unitWork2.Count() > 0)
{
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();
var u = BLL.UnitService.GetUnitByUnitId(q.UnitId);
TreeNode tn2 = new TreeNode();
tn2.NodeID = q.UnitWorkId;
tn2.Text = q.UnitWorkName;
tn2.ToolTip = "施工单位:" + u.UnitName;
tn2.CommandName = "单位工程";
rootNode2.Nodes.Add(tn2);
var testPackageUnitList = testPackageLists.Where(x => x.UnitWorkId == q.UnitWorkId).ToList();
BindNodes(tn2, testPackageUnitList);
}
}
}
#endregion
#region
/// <summary>
/// 绑定树节点
/// </summary>
/// <param name="node"></param>
private void BindNodes(TreeNode node, List<Model.PTP_TestPackage> testPackageUnitList)
{
if (node.CommandName == "单位工程")
{
var dReports = from x in testPackageUnitList
where x.UnitWorkId == node.NodeID
&& x.State == Const.TestPackage_Complete
orderby x.TestPackageNo descending
select x;
foreach (var item in dReports)
{
TreeNode newNode = new TreeNode();
if (!string.IsNullOrEmpty(item.TestPackageNo))
{
newNode.Text = item.TestPackageNo;
}
else
{
newNode.Text = "未知";
}
if (!item.AduditDate.HasValue || string.IsNullOrEmpty(item.Auditer))
{
newNode.Text = "<font color='#FF7575'>" + newNode.Text + "</font>";
node.Text = "<font color='#FF7575'>" + node.Text + "</font>";
}
newNode.NodeID = item.PTP_ID;
newNode.EnableClickEvent = true;
newNode.CommandName = "TestPackage";
node.Nodes.Add(newNode);
}
}
}
#endregion
#region TreeView
/// <summary>
/// 点击TreeView
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e)
{
this.PTP_ID = tvControlItem.SelectedNodeID;
this.BindGrid();
}
#endregion
#region
/// <summary>
/// 数据绑定
/// </summary>
private void BindGrid()
{
this.SetTextTemp();
this.PageInfoLoad(); ///页面输入保存信息
string strSql = @" SELECT ptpPipe.PT_PipeId, ptpPipe.PTP_ID, ptpPipe.PipelineId, ptpPipe.DesignPress,
ptpPipe.DesignTemperature, ptpPipe.AmbientTemperature, ptpPipe.TestMedium,
ptpPipe.TestMediumTemperature, ptpPipe.TestPressure, ptpPipe.HoldingTime,IsoInfo.PipelineCode,testMedium.MediumName
FROM dbo.PTP_PipelineList AS ptpPipe
LEFT JOIN dbo.HJGL_Pipeline AS IsoInfo ON ptpPipe.PipelineId = IsoInfo.PipelineId
LEFT JOIN dbo.Base_TestMedium AS testMedium ON testMedium.TestMediumId = IsoInfo.TestMedium
WHERE ptpPipe.PTP_ID=@PTP_ID";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@PTP_ID", this.PTP_ID));
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
// 2.获取当前分页数据
//var table = this.GetPagedDataTable(Grid1, tb1);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#region
/// <summary>
/// 加载页面输入保存信息
/// </summary>
private void PageInfoLoad()
{
var testPackageManage = BLL.TestPackageEditService.GetTestPackageByID(this.PTP_ID);
if (testPackageManage != null)
{
this.txtadjustTestPressure.Text = testPackageManage.AdjustTestPressure;
this.txtAmbientTemperature.Text = testPackageManage.AmbientTemperature.ToString();
this.txtFinishDef.Text = testPackageManage.FinishDef;
this.txtHoldingTime.Text = testPackageManage.HoldingTime.ToString();
this.txtTestDate.Text = testPackageManage.TestDate?.ToString("yyyy-MM-dd");
this.txtTestMediumTemperature.Text = testPackageManage.TestMediumTemperature.ToString();
}
}
#endregion
#region
/// <summary>
/// 清空页面输入信息
/// </summary>
private void SetTextTemp()
{
this.txtadjustTestPressure.Text = string.Empty;
this.txtAmbientTemperature.Text = string.Empty;
this.txtFinishDef.Text = string.Empty;
this.txtHoldingTime.Text = string.Empty;
this.txtTestDate.Text = string.Empty;
this.txtTestMediumTemperature.Text = string.Empty;
}
#endregion
#endregion
#region
#region
/// <summary>
/// 页索引改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页选择下拉改变事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#endregion
#region
/// <summary>
/// 关闭弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
this.PTP_ID = this.hdPTP_ID.Text;
this.BindGrid();
this.InitTreeMenu();
this.hdPTP_ID.Text = string.Empty;
}
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Tree_TextChanged(object sender, EventArgs e)
{
this.InitTreeMenu();
this.BindGrid();
}
#endregion
protected void btnMenuModify_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetSaveStateReference(this.hdPTP_ID.ClientID)+ Window1.GetShowReference(String.Format("TestPackageCompleteEdit.aspx?PTP_ID={0}", this.tvControlItem.SelectedNodeID, "操作 - ")));
}
}
}

View File

@ -73,7 +73,7 @@ namespace FineUIPro.Web.HJGL.TestPackage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.PTP_TestPackage> testPackageLists = (from x in Funs.DB.PTP_TestPackage
where x.ProjectId == this.CurrUser.LoginProjectId

View File

@ -57,7 +57,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -47,7 +47,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -58,7 +58,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -49,7 +49,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -64,7 +64,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
var unitWorkList = (from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId
&& x.SuperUnitWork == null && x.UnitId != null && x.ProjectType != null
&& (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.UnitId != null && x.ProjectType != null
select x).ToList();
List<Model.WBS_UnitWork> unitWork1 = null;

View File

@ -293,7 +293,7 @@ namespace FineUIPro.Web.HSSE.Check
{
string info = string.Empty;
var unitWorks = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.ProjectId && x.SuperUnitWork == null
where x.ProjectId == this.ProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0")
orderby x.UnitWorkCode
select new
{

View File

@ -117,7 +117,7 @@ namespace FineUIPro.Web.JDGL.Check
if (e.Node.CommandName == "ProjectType") //展开工程类型
{
var trUnitWork = from x in Funs.DB.WBS_UnitWork
where x.ProjectId == this.CurrUser.LoginProjectId && x.SuperUnitWork == null && x.ProjectType == e.Node.NodeID
where x.ProjectId == this.CurrUser.LoginProjectId && (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.ProjectType == e.Node.NodeID
select x;
trUnitWork = trUnitWork.OrderBy(x => x.UnitWorkCode);
if (trUnitWork.Count() > 0)

View File

@ -48,7 +48,7 @@
<f:TemplateField ColumnID="tfNumber" Width="55px" HeaderText="序号" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lblNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
<asp:Label ID="labNumber" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="ProjectCode" DataField="ProjectCode" SortField="ProjectCode" FieldType="String"
@ -77,13 +77,13 @@
</f:TemplateField>
<f:TemplateField ColumnID="tfSubcontractor" Width="400px" HeaderText="施工分包商" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertSubcontractor(Eval("ProjectId")) %>'
<asp:Label ID="lblSubcontractor" runat="server" Text='<%# ConvertSubcontractor(Eval("ProjectId")) %>'
ToolTip='<%# ConvertSubcontractor(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="tfOwn" Width="150px" HeaderText="建设单位" HeaderTextAlign="Center" TextAlign="Left">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# ConvertOwn(Eval("ProjectId")) %>'
<asp:Label ID="lblOwn" runat="server" Text='<%# ConvertOwn(Eval("ProjectId")) %>'
ToolTip='<%# ConvertOwn(Eval("ProjectId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>

View File

@ -3,6 +3,7 @@ using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.IO;
using System.Linq;
namespace FineUIPro.Web.ProjectData
@ -102,6 +103,7 @@ namespace FineUIPro.Web.ProjectData
}
#endregion
#region
/// <summary>
/// 双击事件
/// </summary>
@ -116,7 +118,9 @@ namespace FineUIPro.Web.ProjectData
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetView.aspx?ProjectId={0}", Grid1.SelectedRowID, "查看 - ")));
}
#endregion
#region
/// <summary>
/// 查看
/// </summary>
@ -126,6 +130,7 @@ namespace FineUIPro.Web.ProjectData
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetView.aspx?ProjectId={0}", Grid1.SelectedRowID, "查看 - ")));
}
#endregion
#region
/// <summary>
@ -204,12 +209,9 @@ namespace FineUIPro.Web.ProjectData
protected void btnOut_Click(object sender, EventArgs e)
{
Response.ClearContent();
string filename = Funs.GetNewFileName();
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("项目信息" + filename, System.Text.Encoding.UTF8) + ".xls");
Response.ContentType = "application/excel";
Response.AddHeader("content-disposition", "attachment; filename=项目信息.xls");
Response.ContentType = "application/vnd.ms-excel";
Response.ContentEncoding = System.Text.Encoding.UTF8;
this.Grid1.PageSize = this.Grid1.RecordCount;
this.BindGrid();
Response.Write(GetGridTableHtml(Grid1));
Response.End();
}

View File

@ -85,13 +85,13 @@ namespace FineUIPro.Web.ProjectData {
protected global::FineUIPro.Button btnOut;
/// <summary>
/// lblNumber 控件。
/// labNumber 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblNumber;
protected global::System.Web.UI.WebControls.Label labNumber;
/// <summary>
/// lblCM 控件。
@ -103,22 +103,22 @@ namespace FineUIPro.Web.ProjectData {
protected global::System.Web.UI.WebControls.Label lblCM;
/// <summary>
/// Label1 控件。
/// lblSubcontractor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
protected global::System.Web.UI.WebControls.Label lblSubcontractor;
/// <summary>
/// Label2 控件。
/// lblOwn 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
protected global::System.Web.UI.WebControls.Label lblOwn;
/// <summary>
/// ToolbarSeparator1 控件。

View File

@ -37,7 +37,7 @@ namespace FineUIPro.Web.ProjectData
BLL.WorkPostService.InitWorkPostDropDownList(this.drpWorkPost, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpMainCNProfessional, true);
CNProfessionalService.InitCNProfessionalDownList(this.drpViceCNProfessional, true);
gvUnitWork.DataSource = (from x in Funs.DB.WBS_UnitWork where x.SuperUnitWork == null && x.ProjectId == this.CurrUser.LoginProjectId select x);
gvUnitWork.DataSource = (from x in Funs.DB.WBS_UnitWork where (x.SuperUnitWork == null || x.SuperUnitWork == "0") && x.ProjectId == this.CurrUser.LoginProjectId select x);
gvUnitWork.DataBind();
this.ProjectUserId = Request.QueryString["ProjectUserId"];
if (!String.IsNullOrEmpty(this.ProjectUserId))

View File

@ -1,5 +1,10 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.ProjectData
{
@ -74,14 +79,13 @@ namespace FineUIPro.Web.ProjectData
newUnitWork.UnitWorkId = id;
BLL.UnitWorkService.UpdateUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "修改子单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
newUnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
BLL.UnitWorkService.AddUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "增加子单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); //PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(newUnitWork.UnitWorkId) + ActiveWindow.GetHidePostBackReference());
}
}
else
@ -96,14 +100,204 @@ namespace FineUIPro.Web.ProjectData
newUnitWork.UnitWorkId = id;
BLL.UnitWorkService.UpdateUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "修改单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
var divisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.UnitWorkId == newUnitWork.UnitWorkId);
if (divisionProject == null)
{
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
newDivisionProject.SubItemType = d1.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
bp.CheckAcceptType = b.CheckAcceptType;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
}
else
{
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null && x.CNProfessionalId == BLL.Const.CNProfessionalConstructId select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown
join y in Funs.DB.WBS_Division on x.DivisionId equals y.DivisionId
where y.CNProfessionalId == BLL.Const.CNProfessionalConstructId
select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
}
Model.DataBase_DataTypeProject dp = Funs.DB.DataBase_DataTypeProject.FirstOrDefault(x => x.UnitWorkId == newUnitWork.UnitWorkId);
if (dp == null)
{
#region
Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId);
List<Model.DataBase_DataType> childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId);
if (childDataTypes.Count > 0)
{
if (dataTypeProject != null)
{
InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, newUnitWork.UnitWorkId);
}
}
#endregion
}
}
else
{
newUnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
BLL.UnitWorkService.AddUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "增加单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); //PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(newUnitWork.UnitWorkId) + ActiveWindow.GetHidePostBackReference());
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
#region
Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId);
List<Model.DataBase_DataType> childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId);
if (childDataTypes.Count > 0)
{
if (dataTypeProject != null)
{
InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, newUnitWork.UnitWorkId);
}
}
#endregion
}
}
}
@ -119,57 +313,270 @@ namespace FineUIPro.Web.ProjectData
newUnitWork.UnitWorkId = id;
BLL.UnitWorkService.UpdateUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "修改单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
var divisionProject = Funs.DB.WBS_DivisionProject.FirstOrDefault(x => x.UnitWorkId == newUnitWork.UnitWorkId);
if (divisionProject == null)
{
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
newDivisionProject.SubItemType = d1.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
bp.CheckAcceptType = b.CheckAcceptType;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
}
else
{
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null && x.CNProfessionalId == BLL.Const.CNProfessionalConstructId select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown
join y in Funs.DB.WBS_Division on x.DivisionId equals y.DivisionId
where y.CNProfessionalId == BLL.Const.CNProfessionalConstructId
select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
}
Model.DataBase_DataTypeProject dp = Funs.DB.DataBase_DataTypeProject.FirstOrDefault(x => x.UnitWorkId == newUnitWork.UnitWorkId);
if (dp == null)
{
#region
Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId);
List<Model.DataBase_DataType> childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId);
if (childDataTypes.Count > 0)
{
if (dataTypeProject != null)
{
InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, newUnitWork.UnitWorkId);
}
}
#endregion
}
}
else
{
newUnitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
BLL.UnitWorkService.AddUnitWork(newUnitWork);
BLL.LogService.AddSys_Log(this.CurrUser, newUnitWork.UnitWorkId, newUnitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "增加单位工程!");
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());//PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(newUnitWork.UnitWorkId) + ActiveWindow.GetHidePostBackReference());
#region WBS内容
//拷贝分部及子分部
var divisions1 = from x in Funs.DB.WBS_Division where x.SuperDivisionId == null select x;
foreach (var d1 in divisions1)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d1.DivisionCode;
newDivisionProject.DivisionName = d1.DivisionName;
newDivisionProject.SortIndex = d1.SortIndex;
newDivisionProject.SuperDivisionId = d1.SuperDivisionId;
newDivisionProject.CNProfessionalId = d1.CNProfessionalId;
newDivisionProject.UnitWorkId = newUnitWork.UnitWorkId;
newDivisionProject.OldDivisionId = d1.DivisionId;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d1.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, newUnitWork.UnitWorkId);
}
}
//拷贝分项
var breakdowns = from x in Funs.DB.WBS_Breakdown select x;
foreach (var b in breakdowns)
{
Model.WBS_BreakdownProject bp = new Model.WBS_BreakdownProject();
bp.BreakdownProjectId = SQLHelper.GetNewID(typeof(Model.WBS_BreakdownProject));
bp.ProjectId = this.CurrUser.LoginProjectId;
bp.BreakdownCode = b.BreakdownCode;
bp.BreakdownName = b.BreakdownName;
bp.DivisionProjectId = (from x in Funs.DB.WBS_DivisionProject where x.OldDivisionId == b.DivisionId && x.UnitWorkId == newUnitWork.UnitWorkId select x.DivisionProjectId).FirstOrDefault();
bp.Basis = b.Basis;
bp.CheckPoints = b.CheckPoints;
bp.RecordAndCode = b.RecordAndCode;
bp.Class = b.Class;
bp.SortIndex = b.SortIndex;
bp.Remark = b.Remark;
bp.ModelURL = b.ModelURL;
bp.UnitWorkId = newUnitWork.UnitWorkId;
bp.IsAcceptance = b.IsAcceptance;
bp.IsYellow = b.IsYellow;
bp.WuHuan = b.WuHuan;
bp.JianLi = b.JianLi;
bp.FenBao = b.FenBao;
bp.YeZhu = b.YeZhu;
bp.SourceBreakdownId = b.BreakdownId;
BLL.BreakdownProjectService.AddBreakdownProject(bp);
}
#endregion
#region
Model.DataBase_DataTypeProject dataTypeProject = BLL.DataTypeProjectService.GetDataTypeProjectBySourceDataTypeId(Const.DataTypeNewConstructId, this.CurrUser.LoginProjectId);
List<Model.DataBase_DataType> childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(Const.DataTypeNewConstructId);
if (childDataTypes.Count > 0)
{
if (dataTypeProject != null)
{
InsertDataTypeDetail(childDataTypes, dataTypeProject.DataTypeProjectId, this.CurrUser.LoginProjectId, newUnitWork.UnitWorkId);
}
}
#endregion
}
}
//string projectId = string.Empty;
//string superUnitWorkId = string.Empty;
//Model.WBS_UnitWork unitWork = new Model.WBS_UnitWork();
//Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(superId);
//Model.WBS_UnitWork parUnitWork = BLL.UnitWorkService.getUnitWorkByUnitWorkId(superId);
//if (project != null)
//{
// projectId = project.ProjectId;
// superUnitWorkId = "0";
// unitWork.UnitWorkCode = txtSupUnitWorkCode.Text.Trim();
// unitWork.UnitWorkName = txtSupUnitWorkName.Text.Trim();
// unitWork.SuperUnitWork = superUnitWorkId;
//}
//else if (parUnitWork != null)
//{
// projectId = parUnitWork.ProjectId;
// superUnitWorkId = superId;
// unitWork.UnitWorkCode = txtUnitWorkCode.Text.Trim();
// unitWork.UnitWorkName = txtUnitWorkName.Text.Trim();
// unitWork.SuperUnitWork = superUnitWorkId;
//}
//unitWork.ProjectId = projectId;
//if (string.IsNullOrEmpty(id))
//{
// unitWork.UnitWorkId = SQLHelper.GetNewID(typeof(Model.WBS_UnitWork));
// BLL.UnitWorkService.AddUnitWork(unitWork);
// BLL.LogService.AddSys_Log(this.CurrUser, unitWork.UnitWorkId, unitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "增加单位工程!");
// PageContext.RegisterStartupScript(ActiveWindow.GetWriteBackValueReference(unitWork.UnitWorkId) + ActiveWindow.GetHidePostBackReference());
//}
//else
//{
// Model.WBS_UnitWork unitWork1 = BLL.UnitWorkService.getUnitWorkByUnitWorkId(id);
// unitWork.UnitWorkId = id;
// unitWork.ProjectId = unitWork1.ProjectId;
// unitWork.SuperUnitWork = unitWork1.SuperUnitWork;
// BLL.UnitWorkService.UpdateUnitWork(unitWork);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
// BLL.LogService.AddSys_Log(this.CurrUser, unitWork.UnitWorkId, unitWork.UnitWorkId, BLL.Const.UnitWorkMenuId, "修改单位工程!");
// PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
//}
/// <summary>
/// 循环拷贝子级分部
/// </summary>
/// <param name="dataTypes"></param>
private void InsertDivisionDetail(List<Model.WBS_Division> divisions, string superDivisionId, string unitWorkId)
{
foreach (var d in divisions)
{
Model.WBS_DivisionProject newDivisionProject = new Model.WBS_DivisionProject();
newDivisionProject.DivisionProjectId = SQLHelper.GetNewID(typeof(Model.WBS_DivisionProject));
newDivisionProject.ProjectId = this.CurrUser.LoginProjectId;
newDivisionProject.DivisionCode = d.DivisionCode;
newDivisionProject.DivisionName = d.DivisionName;
newDivisionProject.SortIndex = d.SortIndex;
newDivisionProject.SuperDivisionId = superDivisionId;
newDivisionProject.CNProfessionalId = d.CNProfessionalId;
newDivisionProject.UnitWorkId = unitWorkId;
newDivisionProject.OldDivisionId = d.DivisionId;
newDivisionProject.SubItemType = d.SubItemType;
BLL.DivisionProjectService.AddDivisionProject(newDivisionProject); //子级分部
List<Model.WBS_Division> divisions2 = (from x in Funs.DB.WBS_Division where x.SuperDivisionId == d.DivisionId select x).ToList();
if (divisions2.Count() > 0)
{
this.InsertDivisionDetail(divisions2, newDivisionProject.DivisionProjectId, unitWorkId);
}
}
}
/// <summary>
/// 循环拷贝子级类别
/// </summary>
/// <param name="dataTypes"></param>
private void InsertDataTypeDetail(List<Model.DataBase_DataType> dataTypes, string superDataTypeId, string projectId, string unitWorkId)
{
foreach (var d in dataTypes)
{
Model.DataBase_DataTypeProject newDataTypeProject = new Model.DataBase_DataTypeProject();
newDataTypeProject.DataTypeProjectId = SQLHelper.GetNewID(typeof(Model.DataBase_DataTypeProject));
newDataTypeProject.ProjectId = projectId;
newDataTypeProject.DataTypeCode = d.DataTypeCode;
newDataTypeProject.DataTypeName = d.DataTypeName;
newDataTypeProject.SuperDataTypeId = superDataTypeId;
newDataTypeProject.SortIndex = d.SortIndex;
newDataTypeProject.Pages = d.Pages;
newDataTypeProject.Remark = d.Remark;
newDataTypeProject.IsRelatedWBS = d.IsRelatedWBS;
newDataTypeProject.SourceDataTypeId = d.DataTypeId;
newDataTypeProject.UnitWorkId = unitWorkId;
BLL.DataTypeProjectService.AddDataTypeProject(newDataTypeProject);
List<Model.DataBase_DataType> childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(d.DataTypeId);
if (childDataTypes.Count > 0)
{
InsertDataTypeDetail(childDataTypes, newDataTypeProject.DataTypeProjectId, projectId, unitWorkId);
}
}
}
}
}

View File

@ -12,7 +12,7 @@
<appSettings>
<!--连接字符串-->
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<add key="ConnectionString" value="Server=.\SQL2012;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -1012,6 +1012,18 @@ namespace FineUIPro.Web
{
html = (row.FindControl("lbCheckManNames") as AspNet.Label).Text;
}
if (column.ColumnID== "tfCM")
{
html = (row.FindControl("lblCM") as AspNet.Label).Text;
}
if (column.ColumnID == "tfSubcontractor")
{
html = (row.FindControl("lblSubcontractor") as AspNet.Label).Text;
}
if (column.ColumnID == "tfOwn")
{
html = (row.FindControl("lblOwn") as AspNet.Label).Text;
}
// 处理CheckBox
if (html.Contains("f-grid-static-checkbox"))
{