From 97e26468a40af826d38e4a0b63c79dc0e29f1a85 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 13 Aug 2024 14:45:57 +0800 Subject: [PATCH 1/5] =?UTF-8?q?20240813=20=E5=8D=95=E4=BD=8D=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E5=8A=A0=E8=BD=BD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/API/APIBaseInfoService.cs | 2 +- SGGL/FineUIPro.Web/CQMS/Check/ShowWBS.aspx.cs | 2 +- .../ConTechnologyDisclosureDataIn.aspx.cs | 4 +- .../DataDistributionDataIn.aspx.cs | 4 +- .../DesignChangeOrderDataIn.aspx.cs | 4 +- .../Comprehensive/DesignDetailsDataIn.aspx.cs | 4 +- .../DesignDrawingsDataIn.aspx.cs | 4 +- .../GeneralPlanApprovalDataIn.aspx.cs | 4 +- .../InspectionPersonDataIn.aspx.cs | 4 +- .../MajorPlanApprovalDataIn.aspx.cs | 4 +- .../Comprehensive/NCRManagementDataIn.aspx.cs | 4 +- .../QualityAccidentDataIn.aspx.cs | 4 +- .../ReviewDrawingsDataIn.aspx.cs | 4 +- .../SiteVisaManagementDataIn.aspx.cs | 7 +- .../CQMS/WBS/ControlItemAndCycle.aspx.cs | 4 +- .../CQMS/WBS/ControlItemAndCycleShow.aspx.cs | 2 +- SGGL/FineUIPro.Web/ErrLog.txt | 20 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 2 +- .../HJGL/HotProcessHard/HardFeedback.aspx.cs | 2 +- .../HJGL/HotProcessHard/HardReport.aspx.cs | 2 +- .../HJGL/HotProcessHard/HardTrust.aspx.cs | 2 +- .../HotProcessHard/HotProessFeedback.aspx.cs | 2 +- .../HotProcessHard/HotProessReport.aspx.cs | 2 +- .../HotProcessHard/HotProessTrust.aspx.cs | 2 +- .../HJGL/LeakVacuum/LV_ItemEndCheck.aspx.cs | 2 +- .../HJGL/LeakVacuum/LeakVacuumAudit.aspx.cs | 2 +- .../LeakVacuum/LeakVacuumComplete.aspx.cs | 2 +- .../HJGL/LeakVacuum/LeakVacuumEdit.aspx.cs | 2 +- SGGL/FineUIPro.Web/HJGL/NDT/NDTBatch.aspx.cs | 2 +- .../HJGL/PointTrust/PointBatch.aspx.cs | 2 +- .../HJGL/PointTrust/TrustBatch.aspx.cs | 2 +- .../PurgingCleaning/PC_ItemEndCheck.aspx.cs | 2 +- .../PurgingCleaningAudit.aspx.cs | 2 +- .../PurgingCleaningComplete.aspx.cs | 2 +- .../PurgingCleaningEdit.aspx.cs | 2 +- .../RepairAndExpand/RepairAndExpand.aspx.cs | 2 +- .../HJGL/TestPackage/BItemEndCheck.aspx.cs | 2 +- .../HJGL/TestPackage/ItemEndCheck.aspx.cs | 2 +- .../HJGL/TestPackage/TestPackageAudit.aspx.cs | 996 +++++++++--------- .../TestPackage/TestPackageComplete.aspx.cs | 547 ++++++---- .../HJGL/TestPackage/TestPackageEdit.aspx.cs | 2 +- .../HJGL/WeldingManage/PipelineList.aspx.cs | 2 +- .../WeldingManage/PreWeldReportAudit.aspx.cs | 2 +- .../HJGL/WeldingManage/WeldJointList.aspx.cs | 2 +- .../HJGL/WeldingManage/WeldReport.aspx.cs | 2 +- .../HJGL/WeldingManage/WeldTask.aspx.cs | 2 +- .../HSSE/Check/CheckSpecialEdit.aspx.cs | 2 +- .../JDGL/Check/ProgressShow.aspx.cs | 2 +- .../ProjectData/ProjectUserSave.aspx.cs | 2 +- SGGL/FineUIPro.Web/Web.config | 2 +- 50 files changed, 910 insertions(+), 776 deletions(-) diff --git a/SGGL/BLL/API/APIBaseInfoService.cs b/SGGL/BLL/API/APIBaseInfoService.cs index f070b873..1a647d0c 100644 --- a/SGGL/BLL/API/APIBaseInfoService.cs +++ b/SGGL/BLL/API/APIBaseInfoService.cs @@ -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 { diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ShowWBS.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/ShowWBS.aspx.cs index 328d5b52..5d1fe3ed 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ShowWBS.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/ShowWBS.aspx.cs @@ -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) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs index b58b1674..882753da 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs index a938d139..6f925940 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs @@ -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++) { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs index 6e2530d7..7ee6dc37 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs @@ -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 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs index 11c6711e..d0f1bec4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs index d867b7cb..6f128b7e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs index 2c31f4ac..ba97526f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs index b2f87b15..4349c26a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs @@ -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; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs index 976e4f5b..4e79929f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs index 3d2e31e4..06d87761 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs @@ -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 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs index 59f0caad..73cc5f0b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs index 7a8a273c..32ee348a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsDataIn.aspx.cs @@ -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++) diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs index f56ed2ff..e6d9a421 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementDataIn.aspx.cs @@ -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; diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs index 68e185f9..b3b4d224 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs @@ -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) diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleShow.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleShow.aspx.cs index 9b159685..4a908769 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleShow.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleShow.aspx.cs @@ -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) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..669dacf8 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,20 @@ + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web.ProjectData.UnitWork.getWBSSet() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 461 + 在 FineUIPro.Web.ProjectData.UnitWork.Window2_Close(Object sender, WindowCloseEventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 221 + 在 FineUIPro.Window.OnClose(WindowCloseEventArgs e) + 在 (Window , WindowCloseEventArgs ) + 在 FineUIPro.Window.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:08/13/2024 14:44:02 +出错文件:http://localhost:8579/ProjectData/UnitWork.aspx +IP地址:::1 +操作人员:JT + +出错时间:08/13/2024 14:44:02 + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index b538f6f6..7efa2411 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -19216,7 +19216,7 @@ - + - + From 80e4a4097b85e230edca6362f758eea9e9465fad Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 13 Aug 2024 15:07:54 +0800 Subject: [PATCH 2/5] =?UTF-8?q?20240813=20=E4=BF=AE=E6=94=B9=E5=8D=95?= =?UTF-8?q?=E4=BD=8D=E5=B7=A5=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 20 + .../ProjectData/UnitWorkEdit.aspx.cs | 497 ++++++++++++++++-- 2 files changed, 472 insertions(+), 45 deletions(-) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 669dacf8..3af455ab 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -18,3 +18,23 @@ IP地址:::1 出错时间:08/13/2024 14:44:02 + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 FineUIPro.Web.ProjectData.UnitWork.getWBSSet() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 461 + 在 FineUIPro.Web.ProjectData.UnitWork.Window2_Close(Object sender, WindowCloseEventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 221 + 在 FineUIPro.Window.OnClose(WindowCloseEventArgs e) + 在 (Window , WindowCloseEventArgs ) + 在 FineUIPro.Window.RaisePostBackEvent(String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) + 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:08/13/2024 15:04:20 +出错文件:http://localhost:8579/ProjectData/UnitWork.aspx +IP地址:::1 +操作人员:JT + +出错时间:08/13/2024 15:04:20 + diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs index 8b00e769..72ec4866 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWorkEdit.aspx.cs @@ -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 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 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 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 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 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 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 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 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 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 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()); - //} + /// + /// 循环拷贝子级分部 + /// + /// + private void InsertDivisionDetail(List 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 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); + } + } + } + + /// + /// 循环拷贝子级类别 + /// + /// + private void InsertDataTypeDetail(List 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 childDataTypes = BLL.DataTypeService.GetDataTypesBySuperDataTypeId(d.DataTypeId); + if (childDataTypes.Count > 0) + { + InsertDataTypeDetail(childDataTypes, newDataTypeProject.DataTypeProjectId, projectId, unitWorkId); + } + + } } } } \ No newline at end of file From 1c756418a256d2db1ad3f6bd3f3e3e52d08b440d Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Tue, 13 Aug 2024 16:09:47 +0800 Subject: [PATCH 3/5] =?UTF-8?q?20240813=20=E5=8D=95=E4=BD=8D=E5=B7=A5?= =?UTF-8?q?=E7=A8=8B=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs | 6 +++++- SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs | 6 +++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs index f42c8ccd..25a462a5 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPoint.aspx.cs @@ -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(); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs index 4e41f1f6..e64a4fc5 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlPointFile.aspx.cs @@ -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(); From efb0fb797473b6b7d4d9bba21855ed9e76bb1d6e Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Wed, 14 Aug 2024 09:51:24 +0800 Subject: [PATCH 4/5] =?UTF-8?q?20240814=20=E4=BF=AE=E6=94=B9=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E7=AE=A1=E7=90=86=E5=88=B6=E5=BA=A6=E6=8E=92=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../QualityPlanning/QualityManagementSys.aspx | 4 +- .../QualityManagementSys.aspx.cs | 2 +- SGGL/FineUIPro.Web/ErrLog.txt | 37 +++++++++++++++++++ 3 files changed, 40 insertions(+), 3 deletions(-) diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx index 601945a8..5a830874 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx @@ -14,8 +14,8 @@ ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch"> diff --git a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs index 55287e1e..19cac7a9 100644 --- a/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/QualityPlanning/QualityManagementSys.aspx.cs @@ -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); diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 3af455ab..b8f64064 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -38,3 +38,40 @@ IP地址:::1 出错时间:08/13/2024 15:04:20 + +错误信息开始=====> +错误类型:SqlException +错误信息:参数化查询 '(@projectId nvarchar(4000))SELECT p.QualityManagementSysId, + ' 需要参数 '@projectId',但未提供该参数。 +错误堆栈: + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) + 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) + 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\SQLHelper.cs:行号 311 + 在 FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSys.BindGrid() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\QualityPlanning\QualityManagementSys.aspx.cs:行号 59 + 在 FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSys.Page_Load(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\QualityPlanning\QualityManagementSys.aspx.cs:行号 24 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() + 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +出错时间:08/14/2024 09:45:39 +出错文件:http://localhost:8579/CQMS/QualityPlanning/QualityManagementSys.aspx +IP地址:::1 +操作人员:JT + +出错时间:08/14/2024 09:45:39 + From 012f59da32e8caa42a52ec460e4f66ab566bdaca Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 16 Aug 2024 14:42:18 +0800 Subject: [PATCH 5/5] =?UTF-8?q?20240816=20=E4=BF=AE=E6=94=B9=E9=A1=B9?= =?UTF-8?q?=E7=9B=AE=E5=88=97=E8=A1=A8=E5=AF=BC=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/FineUIPro.Web/ErrLog.txt | 77 ------------------- .../ProjectData/ProjectList.aspx | 6 +- .../ProjectData/ProjectList.aspx.cs | 12 +-- .../ProjectData/ProjectList.aspx.designer.cs | 12 +-- SGGL/FineUIPro.Web/common/PageBase.cs | 12 +++ 5 files changed, 28 insertions(+), 91 deletions(-) diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index b8f64064..e69de29b 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,77 +0,0 @@ - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.ProjectData.UnitWork.getWBSSet() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 461 - 在 FineUIPro.Web.ProjectData.UnitWork.Window2_Close(Object sender, WindowCloseEventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 221 - 在 FineUIPro.Window.OnClose(WindowCloseEventArgs e) - 在 (Window , WindowCloseEventArgs ) - 在 FineUIPro.Window.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:08/13/2024 14:44:02 -出错文件:http://localhost:8579/ProjectData/UnitWork.aspx -IP地址:::1 -操作人员:JT - -出错时间:08/13/2024 14:44:02 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.ProjectData.UnitWork.getWBSSet() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 461 - 在 FineUIPro.Web.ProjectData.UnitWork.Window2_Close(Object sender, WindowCloseEventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\ProjectData\UnitWork.aspx.cs:行号 221 - 在 FineUIPro.Window.OnClose(WindowCloseEventArgs e) - 在 (Window , WindowCloseEventArgs ) - 在 FineUIPro.Window.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:08/13/2024 15:04:20 -出错文件:http://localhost:8579/ProjectData/UnitWork.aspx -IP地址:::1 -操作人员:JT - -出错时间:08/13/2024 15:04:20 - - -错误信息开始=====> -错误类型:SqlException -错误信息:参数化查询 '(@projectId nvarchar(4000))SELECT p.QualityManagementSysId, - ' 需要参数 '@projectId',但未提供该参数。 -错误堆栈: - 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) - 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) - 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) - 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() - 在 System.Data.SqlClient.SqlDataReader.get_MetaData() - 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) - 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) - 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) - 在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) - 在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) - 在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior) - 在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable) - 在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\SQLHelper.cs:行号 311 - 在 FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSys.BindGrid() 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\QualityPlanning\QualityManagementSys.aspx.cs:行号 59 - 在 FineUIPro.Web.CQMS.QualityPlanning.QualityManagementSys.Page_Load(Object sender, EventArgs e) 位置 E:\五环\SGGL_CWCEC\SGGL\FineUIPro.Web\CQMS\QualityPlanning\QualityManagementSys.aspx.cs:行号 24 - 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) - 在 System.EventHandler.Invoke(Object sender, EventArgs e) - 在 System.Web.UI.Control.OnLoad(EventArgs e) - 在 System.Web.UI.Control.LoadRecursive() - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:08/14/2024 09:45:39 -出错文件:http://localhost:8579/CQMS/QualityPlanning/QualityManagementSys.aspx -IP地址:::1 -操作人员:JT - -出错时间:08/14/2024 09:45:39 - diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx index 0d25607e..1840c01a 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx @@ -48,7 +48,7 @@ - + - - diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.cs index 084a506a..aea0f5db 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.cs @@ -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 双击行事件 /// /// 双击事件 /// @@ -116,7 +118,9 @@ namespace FineUIPro.Web.ProjectData } PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetView.aspx?ProjectId={0}", Grid1.SelectedRowID, "查看 - "))); } + #endregion + #region 查看 /// /// 查看 /// @@ -126,6 +130,7 @@ namespace FineUIPro.Web.ProjectData { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetView.aspx?ProjectId={0}", Grid1.SelectedRowID, "查看 - "))); } + #endregion #region 获取按钮权限 /// @@ -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(); } diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.designer.cs index e5b836ab..8664a4c1 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectList.aspx.designer.cs @@ -85,13 +85,13 @@ namespace FineUIPro.Web.ProjectData { protected global::FineUIPro.Button btnOut; /// - /// lblNumber 控件。 + /// labNumber 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lblNumber; + protected global::System.Web.UI.WebControls.Label labNumber; /// /// lblCM 控件。 @@ -103,22 +103,22 @@ namespace FineUIPro.Web.ProjectData { protected global::System.Web.UI.WebControls.Label lblCM; /// - /// Label1 控件。 + /// lblSubcontractor 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label1; + protected global::System.Web.UI.WebControls.Label lblSubcontractor; /// - /// Label2 控件。 + /// lblOwn 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label Label2; + protected global::System.Web.UI.WebControls.Label lblOwn; /// /// ToolbarSeparator1 控件。 diff --git a/SGGL/FineUIPro.Web/common/PageBase.cs b/SGGL/FineUIPro.Web/common/PageBase.cs index 5d708de9..420feb8d 100644 --- a/SGGL/FineUIPro.Web/common/PageBase.cs +++ b/SGGL/FineUIPro.Web/common/PageBase.cs @@ -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")) {