From 3cf225ea86cc5498c5c2e3ce37b7d0e442b5831a Mon Sep 17 00:00:00 2001
From: gaofei <181547018@qq.com>
Date: Tue, 6 Jun 2023 09:54:46 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=BA=A6=E6=8A=A5?=
=?UTF-8?q?=E8=A1=A8?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../版本日志/SGGLDB_WH_2023-06-06.sql | 19 ++
.../1-4进度管理(Menu_JDGL).sql | 13 +
SGGL/BLL/BLL.csproj | 1 +
SGGL/BLL/Common/Const.cs | 5 +
.../WBS/EquipmentMaterialBigTypeService.cs | 125 ++++++++
.../JDGL/WBS/EquipmentMaterialTypeService.cs | 2 +
SGGL/FineUIPro.Web/ErrLog.txt | 17 +
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 24 ++
.../JDGL/CostAnalysis/JDReport.aspx | 2 +-
.../JDGL/CostAnalysis/JDReport.aspx.cs | 301 +++++++++++-------
.../JDGL/WBS/EquipmentMaterialBigType.aspx | 114 +++++++
.../JDGL/WBS/EquipmentMaterialBigType.aspx.cs | 182 +++++++++++
.../EquipmentMaterialBigType.aspx.designer.cs | 177 ++++++++++
.../WBS/EquipmentMaterialBigTypeEdit.aspx | 54 ++++
.../WBS/EquipmentMaterialBigTypeEdit.aspx.cs | 61 ++++
...ipmentMaterialBigTypeEdit.aspx.designer.cs | 105 ++++++
.../WBS/EquipmentMaterialBigTypeView.aspx | 54 ++++
.../WBS/EquipmentMaterialBigTypeView.aspx.cs | 33 ++
...ipmentMaterialBigTypeView.aspx.designer.cs | 105 ++++++
.../JDGL/WBS/EquipmentMaterialType.aspx | 6 +-
.../JDGL/WBS/EquipmentMaterialType.aspx.cs | 9 +-
.../EquipmentMaterialType.aspx.designer.cs | 9 +
.../JDGL/WBS/EquipmentMaterialTypeEdit.aspx | 5 +
.../WBS/EquipmentMaterialTypeEdit.aspx.cs | 11 +
...EquipmentMaterialTypeEdit.aspx.designer.cs | 9 +
.../JDGL/WBS/EquipmentMaterialTypeView.aspx | 5 +
.../WBS/EquipmentMaterialTypeView.aspx.cs | 5 +
...EquipmentMaterialTypeView.aspx.designer.cs | 9 +
SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 3 +-
SGGL/FineUIPro.Web/common/mainProject.aspx.cs | 2 +-
SGGL/Model/Model.cs | 238 ++++++++++++++
31 files changed, 1582 insertions(+), 123 deletions(-)
create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-06-06.sql
create mode 100644 SGGL/BLL/JDGL/WBS/EquipmentMaterialBigTypeService.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.designer.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.designer.cs
diff --git a/DataBase/版本日志/SGGLDB_WH_2023-06-06.sql b/DataBase/版本日志/SGGLDB_WH_2023-06-06.sql
new file mode 100644
index 00000000..61401eeb
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_WH_2023-06-06.sql
@@ -0,0 +1,19 @@
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('F2BC1293-8639-4BD6-8759-648BCF6346E9','豸ϴ','JDGL/WBS/EquipmentMaterialBigType.aspx',4,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A6A7CDD7-B223-4A80-9A0E-8E0F4B4E422A','F2BC1293-8639-4BD6-8759-648BCF6346E9','',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('0D343597-D1FD-4CD5-9F23-43E6A68FE26B','F2BC1293-8639-4BD6-8759-648BCF6346E9','',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D003035F-CE86-4A71-AD3A-33CD4E260A00','F2BC1293-8639-4BD6-8759-648BCF6346E9','ɾ',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('6210DDB2-9196-4315-9308-009BD3A85E78','F2BC1293-8639-4BD6-8759-648BCF6346E9','',4)
+ GO
+
+alter table WBS_EquipmentMaterialType add EquipmentMaterialBigTypeId nvarchar(50) null
+GO
+
+alter table WBS_EquipmentMaterialType add constraint FK_WBS_EquipmentMaterialType_WBS_EquipmentMaterialBigType
+foreign key (EquipmentMaterialBigTypeId) references WBS_EquipmentMaterialBigType (EquipmentMaterialBigTypeId)
+GO
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
index 11a57366..4b77ce99 100644
--- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
+++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
@@ -6,6 +6,19 @@ go
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('B707B4E0-EF73-4010-A13B-59263A5029C7','单位、分部、分项工程设置','',10,'0','Menu_JDGL',0,0,1)
--GO
+ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
+ VALUES('F2BC1293-8639-4BD6-8759-648BCF6346E9','设备材料大类','JDGL/WBS/EquipmentMaterialBigType.aspx',4,'0','Menu_JDGL',0,1,1)
+ GO
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('A6A7CDD7-B223-4A80-9A0E-8E0F4B4E422A','F2BC1293-8639-4BD6-8759-648BCF6346E9','增加',1)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('0D343597-D1FD-4CD5-9F23-43E6A68FE26B','F2BC1293-8639-4BD6-8759-648BCF6346E9','修改',2)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('D003035F-CE86-4A71-AD3A-33CD4E260A00','F2BC1293-8639-4BD6-8759-648BCF6346E9','删除',3)
+ INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
+ VALUES('6210DDB2-9196-4315-9308-009BD3A85E78','F2BC1293-8639-4BD6-8759-648BCF6346E9','保存',4)
+ GO
+
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('D00B3C53-2972-4D24-B88F-B38880D4A24F','设备材料分类','JDGL/WBS/EquipmentMaterialType.aspx',5,'0','Menu_JDGL',0,1,1)
GO
diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj
index 8999c286..fdc1ee73 100644
--- a/SGGL/BLL/BLL.csproj
+++ b/SGGL/BLL/BLL.csproj
@@ -582,6 +582,7 @@
+
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index 27d97a2a..1085e599 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -5204,6 +5204,11 @@ namespace BLL
///
public const string ProjectInstallationMenuId = "A4308F9A-0280-49C5-BEE4-FA858FE1CE24";
+ ///
+ /// 设备材料大类
+ ///
+ public const string EquipmentMaterialBigTypeMenuId = "F2BC1293-8639-4BD6-8759-648BCF6346E9";
+
///
/// 设备材料分类
///
diff --git a/SGGL/BLL/JDGL/WBS/EquipmentMaterialBigTypeService.cs b/SGGL/BLL/JDGL/WBS/EquipmentMaterialBigTypeService.cs
new file mode 100644
index 00000000..5904ae05
--- /dev/null
+++ b/SGGL/BLL/JDGL/WBS/EquipmentMaterialBigTypeService.cs
@@ -0,0 +1,125 @@
+using FineUIPro;
+using System;
+using System.Collections;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace BLL
+{
+ public static class EquipmentMaterialBigTypeService
+ {
+ public static Model.SGGLDB db = Funs.DB;
+
+ ///
+ /// 获取实体集合
+ ///
+ ///
+ public static List GetList()
+ {
+ var q = (from x in Funs.DB.WBS_EquipmentMaterialBigType orderby x.EquipmentMaterialBigTypeCode select x).ToList();
+ return q;
+ }
+ ///
+ /// 添加
+ ///
+ ///
+ public static void AddEquipmentMaterialBigType(Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.WBS_EquipmentMaterialBigType newEquipmentMaterialBigType = new Model.WBS_EquipmentMaterialBigType
+ {
+ EquipmentMaterialBigTypeId = EquipmentMaterialBigType.EquipmentMaterialBigTypeId,
+ EquipmentMaterialBigTypeCode = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode,
+ EquipmentMaterialBigTypeName = EquipmentMaterialBigType.EquipmentMaterialBigTypeName,
+ Remark = EquipmentMaterialBigType.Remark
+ };
+
+ db.WBS_EquipmentMaterialBigType.InsertOnSubmit(newEquipmentMaterialBigType);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改
+ ///
+ ///
+ public static void UpdateEquipmentMaterialBigType(Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.WBS_EquipmentMaterialBigType newEquipmentMaterialBigType = db.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigType.EquipmentMaterialBigTypeId);
+ if (newEquipmentMaterialBigType != null)
+ {
+ newEquipmentMaterialBigType.EquipmentMaterialBigTypeCode = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
+ newEquipmentMaterialBigType.EquipmentMaterialBigTypeName = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
+ newEquipmentMaterialBigType.Remark = EquipmentMaterialBigType.Remark;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除信息
+ ///
+ ///
+ public static void DeleteEquipmentMaterialBigTypeById(string EquipmentMaterialBigTypeId)
+ {
+ Model.SGGLDB db = Funs.DB;
+ Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = db.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigTypeId);
+ {
+ db.WBS_EquipmentMaterialBigType.DeleteOnSubmit(EquipmentMaterialBigType);
+ db.SubmitChanges();
+ }
+ }
+ public static void InitEquipmentMaterialBigTypeDownList(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "Value";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetEquipmentMaterialBigTypeItem();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ ///
+ /// 设备材料分类下拉框
+ ///
+ ///
+ ///
+ ///
+ public static void InitEquipmentMaterialBigType(FineUIPro.DropDownList dropName, bool isShowPlease)
+ {
+ dropName.DataValueField = "Text";
+ dropName.DataTextField = "Text";
+ dropName.DataSource = GetEquipmentMaterialBigTypeItem();
+ dropName.DataBind();
+ if (isShowPlease)
+ {
+ Funs.FineUIPleaseSelect(dropName);
+ }
+ }
+ ///
+ /// 获取设备材料分类集合
+ ///
+ ///
+ public static ListItem[] GetEquipmentMaterialBigTypeItem()
+ {
+ var q = (from x in Funs.DB.WBS_EquipmentMaterialBigType orderby x.EquipmentMaterialBigTypeCode select x).ToList();
+ ListItem[] list = new ListItem[q.Count()];
+ for (int i = 0; i < q.Count(); i++)
+ {
+ list[i] = new ListItem(q[i].EquipmentMaterialBigTypeName ?? "", q[i].EquipmentMaterialBigTypeId);
+ }
+ return list;
+ }
+
+ ///
+ /// 获取一个设备材料分类信息
+ ///
+ ///
+ ///
+ public static Model.WBS_EquipmentMaterialBigType GetEquipmentMaterialBigType(string EquipmentMaterialBigTypeId)
+ {
+ return Funs.DB.WBS_EquipmentMaterialBigType.FirstOrDefault(e => e.EquipmentMaterialBigTypeId == EquipmentMaterialBigTypeId);
+ }
+ }
+}
diff --git a/SGGL/BLL/JDGL/WBS/EquipmentMaterialTypeService.cs b/SGGL/BLL/JDGL/WBS/EquipmentMaterialTypeService.cs
index a16cfa4b..b019f444 100644
--- a/SGGL/BLL/JDGL/WBS/EquipmentMaterialTypeService.cs
+++ b/SGGL/BLL/JDGL/WBS/EquipmentMaterialTypeService.cs
@@ -32,6 +32,7 @@ namespace BLL
EquipmentMaterialTypeId = equipmentMaterialType.EquipmentMaterialTypeId,
EquipmentMaterialTypeCode = equipmentMaterialType.EquipmentMaterialTypeCode,
EquipmentMaterialTypeName = equipmentMaterialType.EquipmentMaterialTypeName,
+ EquipmentMaterialBigTypeId = equipmentMaterialType.EquipmentMaterialBigTypeId,
Remark = equipmentMaterialType.Remark
};
@@ -51,6 +52,7 @@ namespace BLL
{
newEquipmentMaterialType.EquipmentMaterialTypeCode = equipmentMaterialType.EquipmentMaterialTypeCode;
newEquipmentMaterialType.EquipmentMaterialTypeName = equipmentMaterialType.EquipmentMaterialTypeName;
+ newEquipmentMaterialType.EquipmentMaterialBigTypeId = equipmentMaterialType.EquipmentMaterialBigTypeId;
newEquipmentMaterialType.Remark = equipmentMaterialType.Remark;
db.SubmitChanges();
}
diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt
index 356083b2..dda9e1ae 100644
--- a/SGGL/FineUIPro.Web/ErrLog.txt
+++ b/SGGL/FineUIPro.Web/ErrLog.txt
@@ -387,3 +387,20 @@ IP地址:::1
出错时间:05/25/2023 10:08:31
+
+错误信息开始=====>
+错误类型:NullReferenceException
+错误信息:未将对象引用设置到对象的实例。
+错误堆栈:
+ 在 System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
+ 在 FineUIPro.ResourceHelper.GetResourceContentAsBinary(String resName, String resVersion)
+ 在 FineUIPro.ResourceHandler.ProcessRequest(HttpContext context)
+ 在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
+ 在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
+ 在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
+出错时间:06/05/2023 09:22:57
+出错文件:http://localhost:9733/res.axd?font=lib.iconfont.iconfont.woff&t=638137763580000000
+IP地址:::1
+
+出错时间:06/05/2023 09:22:57
+
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index f2961963..c232391f 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1281,6 +1281,9 @@
+
+
+
@@ -13045,6 +13048,27 @@
CostControlWeekItemDetailEdit.aspx
+
+ EquipmentMaterialBigType.aspx
+ ASPXCodeBehind
+
+
+ EquipmentMaterialBigType.aspx
+
+
+ EquipmentMaterialBigTypeEdit.aspx
+ ASPXCodeBehind
+
+
+ EquipmentMaterialBigTypeEdit.aspx
+
+
+ EquipmentMaterialBigTypeView.aspx
+ ASPXCodeBehind
+
+
+ EquipmentMaterialBigTypeView.aspx
+
EquipmentMaterialType.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx b/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx
index 78f0e900..9c068c28 100644
--- a/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx
@@ -169,7 +169,7 @@
-
diff --git a/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx.cs b/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx.cs
index 74dc7e67..18121b73 100644
--- a/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/CostAnalysis/JDReport.aspx.cs
@@ -197,152 +197,219 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
table4.Columns.Add(new DataColumn("CPI", typeof(String)));
table4.Columns.Add(new DataColumn("SPI", typeof(String)));
Model.SGGLDB db = Funs.DB;
- var cnProfessionInits = from x in db.WBS_CnProfessionInit select x;
- var cnProfessions = from x in db.WBS_CnProfession where x.ProjectId == this.CurrUser.LoginProjectId select x;
- var unitProjectInits = from x in db.Wbs_UnitProjectInit select x;
- var unitProjects = from x in db.Wbs_UnitProject where x.ProjectId == this.CurrUser.LoginProjectId select x;
+ var cnProfessions = from x in db.WBS_CnProfession where x.ProjectId == this.CurrUser.LoginProjectId && x.IsApprove == true select x;
+ var installationIds = cnProfessions.Select(x => x.InstallationId).Distinct().ToList();
+ var installations = from x in db.Project_Installation where x.ProjectId == this.CurrUser.LoginProjectId && installationIds.Contains(x.InstallationId) select x;
+ var unitProjects = from x in db.Wbs_UnitProject where x.ProjectId == this.CurrUser.LoginProjectId && x.IsApprove == true select x;
var details = from x in db.View_WBS_CostControlParentDetail
where x.Months == Funs.GetNewDateTime(date)
select x;
DataRow row4;
decimal cnACWP, cnBCWP, cnBCWS, cnmACWP, cnmBCWP, cnmBCWS, cnCV, cnSV, cnCPI, cnSPI, cnmCV, cnmSV, cnmCPI, cnmSPI,
- unACWP, unBCWP, unBCWS, unmACWP, unmBCWP, unmBCWS, unCV, unSV, unCPI, unSPI, unmCV, unmSV, unmCPI, unmSPI;
- int a = 1, b = 1;
- foreach (var cn in cnProfessionInits)
+ unACWP, unBCWP, unBCWS, unmACWP, unmBCWP, unmBCWS, unCV, unSV, unCPI, unSPI, unmCV, unmSV, unmCPI, unmSPI,
+ inACWP, inBCWP, inBCWS, inmACWP, inmBCWP, inmBCWS, inCV, inSV, inCPI, inSPI, inmCV, inmSV, inmCPI, inmSPI;
+ int a = 1, b = 1, c = 1;
+ foreach (var item in installations)
{
- cnACWP = 0;
- cnBCWP = 0;
- cnBCWS = 0;
- cnmACWP = 0;
- cnmBCWP = 0;
- cnmBCWS = 0;
- cnCV = 0;
- cnSV = 0;
- cnCPI = 0;
- cnSPI = 0;
- cnmCV = 0;
- cnmSV = 0;
- cnmCPI = 0;
- cnmSPI = 0;
+ inACWP = 0;
+ inBCWP = 0;
+ inBCWS = 0;
+ inmACWP = 0;
+ inmBCWP = 0;
+ inmBCWS = 0;
+ inCV = 0;
+ inSV = 0;
+ inCPI = 0;
+ inSPI = 0;
+ inmCV = 0;
+ inmSV = 0;
+ inmCPI = 0;
+ inmSPI = 0;
row4 = table4.NewRow();
- row4[0] = a;
+ row4[0] = c.ToString();
row4[1] = "0";
- row4[2] = cn.CnProfessionName;
- var cnDetails = (from x in details
- join y in cnProfessions on x.ParentId equals y.CnProfessionId
- where y.OldId == cn.CnProfessionId
+ row4[2] = item.InstallationName;
+ var inDetails = (from x in details
+ where x.ParentId == item.InstallationId
select x).ToList();
- cnmACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
- cnmBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
- cnmBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
- cnmCV = cnmBCWP - cnmACWP;
- cnmSV = cnmBCWP - cnmBCWS;
- if (cnmACWP > 0)
+ inmACWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
+ inmBCWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
+ inmBCWS = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
+ inmCV = inmBCWP - inmACWP;
+ inmSV = inmBCWP - inmBCWS;
+ if (inmACWP > 0)
{
- cnmCPI = cnmBCWP / cnmACWP;
+ inmCPI = inmBCWP / inmACWP;
}
- if (cnmBCWS > 0)
+ if (inmBCWS > 0)
{
- cnmSPI = cnmBCWP / cnmBCWS;
+ inmSPI = inmBCWP / inmBCWS;
}
- row4[3] = cnmBCWP.ToString("0.####");
- row4[4] = cnmBCWS.ToString("0.####");
- row4[5] = cnmACWP.ToString("0.####");
- row4[6] = cnmCV.ToString("0.####");
- row4[7] = cnmSV.ToString("0.####");
- row4[8] = cnmCPI.ToString("0.####");
- row4[9] = cnmSPI.ToString("0.####");
- cnACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
- cnBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
- cnBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
- cnCV = cnBCWP - cnACWP;
- cnSV = cnBCWP - cnBCWS;
- if (cnACWP > 0)
+ row4[3] = inmBCWP.ToString("0.####");
+ row4[4] = inmBCWS.ToString("0.####");
+ row4[5] = inmACWP.ToString("0.####");
+ row4[6] = inmCV.ToString("0.####");
+ row4[7] = inmSV.ToString("0.####");
+ row4[8] = inmCPI.ToString("0.####");
+ row4[9] = inmSPI.ToString("0.####");
+ inACWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
+ inBCWP = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
+ inBCWS = Funs.GetNewDecimalOrZero(inDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
+ inCV = inBCWP - inACWP;
+ inSV = inBCWP - inBCWS;
+ if (inACWP > 0)
{
- cnCPI = cnBCWP / cnACWP;
+ inCPI = inBCWP / inACWP;
}
- if (cnBCWS > 0)
+ if (inBCWS > 0)
{
- cnSPI = cnBCWP / cnBCWS;
+ inSPI = inBCWP / inBCWS;
}
- row4[10] = cnBCWP.ToString("0.####");
- row4[11] = cnBCWS.ToString("0.####");
- row4[12] = cnACWP.ToString("0.####");
- row4[13] = cnCV.ToString("0.####");
- row4[14] = cnSV.ToString("0.####");
- row4[15] = cnCPI.ToString("0.####");
- row4[16] = cnSPI.ToString("0.####");
+ row4[10] = inBCWP.ToString("0.####");
+ row4[11] = inBCWS.ToString("0.####");
+ row4[12] = inACWP.ToString("0.####");
+ row4[13] = inCV.ToString("0.####");
+ row4[14] = inSV.ToString("0.####");
+ row4[15] = inCPI.ToString("0.####");
+ row4[16] = inSPI.ToString("0.####");
table4.Rows.Add(row4);
- b = 1;
- var unLists = (from x in unitProjectInits where x.CnProfessionId == cn.CnProfessionId orderby x.SortIndex select x).ToList();
- foreach (var un in unLists)
+ a = 1;
+ var icnProfessions = cnProfessions.Where(x => x.InstallationId == item.InstallationId);
+ foreach (var cn in icnProfessions)
{
- unACWP = 0;
- unBCWP = 0;
- unBCWS = 0;
- unmACWP = 0;
- unmBCWP = 0;
- unmBCWS = 0;
- unCV = 0;
- unSV = 0;
- unCPI = 0;
- unSPI = 0;
- unmCV = 0;
- unmSV = 0;
- unmCPI = 0;
- unmSPI = 0;
+ cnACWP = 0;
+ cnBCWP = 0;
+ cnBCWS = 0;
+ cnmACWP = 0;
+ cnmBCWP = 0;
+ cnmBCWS = 0;
+ cnCV = 0;
+ cnSV = 0;
+ cnCPI = 0;
+ cnSPI = 0;
+ cnmCV = 0;
+ cnmSV = 0;
+ cnmCPI = 0;
+ cnmSPI = 0;
row4 = table4.NewRow();
- row4[0] = a.ToString() + "." + b.ToString();
- row4[1] = a;
- row4[2] = un.UnitProjectName;
- var unDetails = from x in details
- join y in unitProjects on x.ParentId equals y.UnitProjectId
- where y.UnitProjectCode == un.UnitProjectCode
- select x;
- unmACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
- unmBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
- unmBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
- unmCV = unmBCWP - unmACWP;
- unmSV = unmBCWP - unmBCWS;
- if (unmACWP > 0)
+ row4[0] = c.ToString() + "." + a.ToString();
+ row4[1] = c;
+ row4[2] = cn.CnProfessionName;
+ var cnDetails = (from x in details
+ where x.ParentId == cn.CnProfessionId
+ select x).ToList();
+ cnmACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
+ cnmBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
+ cnmBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
+ cnmCV = cnmBCWP - cnmACWP;
+ cnmSV = cnmBCWP - cnmBCWS;
+ if (cnmACWP > 0)
{
- unmCPI = unmBCWP / unmACWP;
+ cnmCPI = cnmBCWP / cnmACWP;
}
- if (unmBCWS > 0)
+ if (cnmBCWS > 0)
{
- unmSPI = unmBCWP / unmBCWS;
+ cnmSPI = cnmBCWP / cnmBCWS;
}
- row4[3] = unmBCWP.ToString("0.####");
- row4[4] = unmBCWS.ToString("0.####");
- row4[5] = unmACWP.ToString("0.####");
- row4[6] = unmCV.ToString("0.####");
- row4[7] = unmSV.ToString("0.####");
- row4[8] = unmCPI.ToString("0.####");
- row4[9] = unmSPI.ToString("0.####");
- unACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
- unBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
- unBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
- unCV = unBCWP - unACWP;
- unSV = unBCWP - unBCWS;
- if (unACWP > 0)
+ row4[3] = cnmBCWP.ToString("0.####");
+ row4[4] = cnmBCWS.ToString("0.####");
+ row4[5] = cnmACWP.ToString("0.####");
+ row4[6] = cnmCV.ToString("0.####");
+ row4[7] = cnmSV.ToString("0.####");
+ row4[8] = cnmCPI.ToString("0.####");
+ row4[9] = cnmSPI.ToString("0.####");
+ cnACWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
+ cnBCWP = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
+ cnBCWS = Funs.GetNewDecimalOrZero(cnDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
+ cnCV = cnBCWP - cnACWP;
+ cnSV = cnBCWP - cnBCWS;
+ if (cnACWP > 0)
{
- unCPI = unBCWP / unACWP;
+ cnCPI = cnBCWP / cnACWP;
}
- if (unBCWS > 0)
+ if (cnBCWS > 0)
{
- unSPI = unBCWP / unBCWS;
+ cnSPI = cnBCWP / cnBCWS;
}
- row4[10] = unBCWP.ToString("0.####");
- row4[11] = unBCWS.ToString("0.####");
- row4[12] = unACWP.ToString("0.####");
- row4[13] = unCV.ToString("0.####");
- row4[14] = unSV.ToString("0.####");
- row4[15] = unCPI.ToString("0.####");
- row4[16] = unSPI.ToString("0.####");
+ row4[10] = cnBCWP.ToString("0.####");
+ row4[11] = cnBCWS.ToString("0.####");
+ row4[12] = cnACWP.ToString("0.####");
+ row4[13] = cnCV.ToString("0.####");
+ row4[14] = cnSV.ToString("0.####");
+ row4[15] = cnCPI.ToString("0.####");
+ row4[16] = cnSPI.ToString("0.####");
table4.Rows.Add(row4);
- b++;
+ b = 1;
+ var unLists = from x in unitProjects where x.CnProfessionId == cn.CnProfessionId orderby x.SortIndex select x;
+ foreach (var un in unLists)
+ {
+ unACWP = 0;
+ unBCWP = 0;
+ unBCWS = 0;
+ unmACWP = 0;
+ unmBCWP = 0;
+ unmBCWS = 0;
+ unCV = 0;
+ unSV = 0;
+ unCPI = 0;
+ unSPI = 0;
+ unmCV = 0;
+ unmSV = 0;
+ unmCPI = 0;
+ unmSPI = 0;
+ row4 = table4.NewRow();
+ row4[0] = c.ToString() + "." + a.ToString() + "." + b.ToString();
+ row4[1] = c.ToString() + "." + a.ToString();
+ row4[2] = un.UnitProjectName;
+ var unDetails = from x in details
+ where x.ParentId == un.UnitProjectId
+ select x;
+ unmACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisRealCost).Sum().ToString()) / 10000;
+ unmBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanCost).Sum().ToString()) / 10000;
+ unmBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.ThisPlanValue).Sum().ToString()) / 10000;
+ unmCV = unmBCWP - unmACWP;
+ unmSV = unmBCWP - unmBCWS;
+ if (unmACWP > 0)
+ {
+ unmCPI = unmBCWP / unmACWP;
+ }
+ if (unmBCWS > 0)
+ {
+ unmSPI = unmBCWP / unmBCWS;
+ }
+ row4[3] = unmBCWP.ToString("0.####");
+ row4[4] = unmBCWS.ToString("0.####");
+ row4[5] = unmACWP.ToString("0.####");
+ row4[6] = unmCV.ToString("0.####");
+ row4[7] = unmSV.ToString("0.####");
+ row4[8] = unmCPI.ToString("0.####");
+ row4[9] = unmSPI.ToString("0.####");
+ unACWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalRealCost).Sum().ToString()) / 10000;
+ unBCWP = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanCost).Sum().ToString()) / 10000;
+ unBCWS = Funs.GetNewDecimalOrZero(unDetails.Select(x => x.TotalPlanValue).Sum().ToString()) / 10000;
+ unCV = unBCWP - unACWP;
+ unSV = unBCWP - unBCWS;
+ if (unACWP > 0)
+ {
+ unCPI = unBCWP / unACWP;
+ }
+ if (unBCWS > 0)
+ {
+ unSPI = unBCWP / unBCWS;
+ }
+ row4[10] = unBCWP.ToString("0.####");
+ row4[11] = unBCWS.ToString("0.####");
+ row4[12] = unACWP.ToString("0.####");
+ row4[13] = unCV.ToString("0.####");
+ row4[14] = unSV.ToString("0.####");
+ row4[15] = unCPI.ToString("0.####");
+ row4[16] = unSPI.ToString("0.####");
+ table4.Rows.Add(row4);
+ b++;
+ }
+ a++;
}
- a++;
+ c++;
}
if (table4.Rows.Count > 0)
{
@@ -350,7 +417,7 @@ namespace FineUIPro.Web.JDGL.CostAnalysis
this.Grid4.DataBind();
}
- //按专业统计
+ //按设备材料分类统计
DataTable table5 = new DataTable();
table5.Columns.Add(new DataColumn("Id", typeof(String)));
table5.Columns.Add(new DataColumn("Name", typeof(String)));
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx
new file mode 100644
index 00000000..c0ebe760
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx
@@ -0,0 +1,114 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigType.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigType" %>
+
+
+
+
+
+设备材料大类
+
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.cs
new file mode 100644
index 00000000..4360301a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.cs
@@ -0,0 +1,182 @@
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Web;
+using System.Web.UI;
+using System.Web.UI.WebControls;
+using BLL;
+
+namespace FineUIPro.Web.JDGL.WBS
+{
+ public partial class EquipmentMaterialBigType : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ GetButtonPower();
+ ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+
+ // 绑定表格
+ BindGrid();
+ btnNew.OnClientClick = Window1.GetShowReference("EquipmentMaterialBigTypeEdit.aspx") + "return false;";
+ }
+ }
+ ///
+ /// 绑定数据
+ ///
+
+ public void BindGrid()
+ {
+ DataTable tb = BindData();
+ Grid1.RecordCount = tb.Rows.Count;
+ tb = GetFilteredTable(Grid1.FilteredData, tb);
+ var table = this.GetPagedDataTable(Grid1, tb);
+
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+
+ protected DataTable BindData()
+ {
+ string strSql = @"select EquipmentMaterialBigTypeId,EquipmentMaterialBigTypeCode,EquipmentMaterialBigTypeName,Remark from [dbo].[WBS_EquipmentMaterialBigType] where 1=1 ";
+
+ List listStr = new List();
+ if (!string.IsNullOrEmpty(this.txtEquipmentMaterialBigTypeCode.Text.Trim()))
+ {
+ strSql += " AND EquipmentMaterialBigTypeCode like @EquipmentMaterialBigTypeCode";
+ listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeCode", "%" + this.txtEquipmentMaterialBigTypeCode.Text.Trim() + "%"));
+ }
+ if (!string.IsNullOrEmpty(this.txtEquipmentMaterialBigTypeName.Text.Trim()))
+ {
+ strSql += " AND EquipmentMaterialBigTypeName like @EquipmentMaterialBigTypeName";
+ listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeName", "%" + this.txtEquipmentMaterialBigTypeName.Text.Trim() + "%"));
+ }
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ return tb;
+ }
+ protected void btnMenuModify_Click(object sender, EventArgs e)
+ {
+ EditData();
+ }
+
+ protected void btnMenuDel_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length > 0)
+ {
+ foreach (int rowIndex in Grid1.SelectedRowIndexArray)
+ {
+ string rowID = Grid1.DataKeys[rowIndex][0].ToString();
+ BLL.EquipmentMaterialBigTypeService.DeleteEquipmentMaterialBigTypeById(rowID);
+ }
+
+ BindGrid();
+ ShowNotify("删除数据成功!", MessageBoxIcon.Success);
+ }
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData()
+ {
+
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ if (this.btnMenuModify.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeView.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "查看 - ")));
+ }
+ else
+ {
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeEdit.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "编辑 - ")));
+ }
+ }
+ #region 获取按钮权限
+ ///
+ /// 获取按钮权限
+ ///
+ ///
+ ///
+ private void GetButtonPower()
+ {
+ if (Request.Params["value"] == "0")
+ {
+ return;
+ }
+ var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.EquipmentMaterialBigTypeMenuId);
+ if (buttonList.Count() > 0)
+ {
+ if (buttonList.Contains(BLL.Const.BtnAdd))
+ {
+ this.btnNew.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnModify))
+ {
+ this.btnMenuModify.Hidden = false;
+ }
+ if (buttonList.Contains(BLL.Const.BtnDelete))
+ {
+ this.btnMenuDel.Hidden = false;
+ }
+ }
+ }
+ #endregion
+
+
+ protected void btnSearch_Click(object sender, EventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ EditData();
+ }
+
+
+ protected void btnMenuView_Click(object sender, EventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
+ return;
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("EquipmentMaterialBigTypeView.aspx?EquipmentMaterialBigTypeId={0}", Grid1.SelectedRowID, "查看 - ")));
+ }
+
+ protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ BindGrid();
+ }
+
+ protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
+ BindGrid();
+ }
+ ///
+ /// 重置
+ ///
+ ///
+ ///
+ protected void btnRset_Click(object sender, EventArgs e)
+ {
+ txtEquipmentMaterialBigTypeCode.Text = "";
+ txtEquipmentMaterialBigTypeName.Text = "";
+ BindGrid();
+ }
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ BindGrid();
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.designer.cs
new file mode 100644
index 00000000..00eaaf48
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigType.aspx.designer.cs
@@ -0,0 +1,177 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.WBS {
+
+
+ public partial class EquipmentMaterialBigType {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtEquipmentMaterialBigTypeCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
+
+ ///
+ /// txtEquipmentMaterialBigTypeName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
+
+ ///
+ /// btnSearch 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSearch;
+
+ ///
+ /// btnRset 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnRset;
+
+ ///
+ /// btnNew 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnNew;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+
+ ///
+ /// Menu1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Menu Menu1;
+
+ ///
+ /// btnMenuModify 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuModify;
+
+ ///
+ /// btnMenuDel 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.MenuButton btnMenuDel;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx
new file mode 100644
index 00000000..acdf9858
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx
@@ -0,0 +1,54 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigTypeEdit.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigTypeEdit" %>
+
+
+
+
+
+设备材料分类
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.cs
new file mode 100644
index 00000000..5ad5aad7
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.cs
@@ -0,0 +1,61 @@
+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.JDGL.WBS
+{
+ public partial class EquipmentMaterialBigTypeEdit : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
+ if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
+ {
+
+ Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = BLL.EquipmentMaterialBigTypeService.GetEquipmentMaterialBigType(EquipmentMaterialBigTypeId);
+ if (EquipmentMaterialBigType != null)
+ {
+ this.txtEquipmentMaterialBigTypeCode.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
+ this.txtEquipmentMaterialBigTypeName.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
+ this.txtRemark.Text = EquipmentMaterialBigType.Remark;
+ }
+ }
+ }
+
+ }
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ SaveData(true);
+ }
+
+ private void SaveData(bool b)
+ {
+ string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
+ Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = new Model.WBS_EquipmentMaterialBigType();
+ EquipmentMaterialBigType.EquipmentMaterialBigTypeCode = this.txtEquipmentMaterialBigTypeCode.Text.Trim();
+ EquipmentMaterialBigType.EquipmentMaterialBigTypeName = this.txtEquipmentMaterialBigTypeName.Text.Trim();
+ EquipmentMaterialBigType.Remark = this.txtRemark.Text.Trim();
+ if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
+ {
+ EquipmentMaterialBigType.EquipmentMaterialBigTypeId = EquipmentMaterialBigTypeId;
+ BLL.EquipmentMaterialBigTypeService.UpdateEquipmentMaterialBigType(EquipmentMaterialBigType);
+ }
+ else
+ {
+ EquipmentMaterialBigType.EquipmentMaterialBigTypeId = SQLHelper.GetNewID(typeof(Model.WBS_EquipmentMaterialBigType));
+ BLL.EquipmentMaterialBigTypeService.AddEquipmentMaterialBigType(EquipmentMaterialBigType);
+
+ }
+ ShowNotify("保存成功!", MessageBoxIcon.Success);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.designer.cs
new file mode 100644
index 00000000..e72ca44a
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeEdit.aspx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.WBS {
+
+
+ public partial class EquipmentMaterialBigTypeEdit {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtEquipmentMaterialBigTypeCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
+
+ ///
+ /// txtEquipmentMaterialBigTypeName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRemark;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hdCheckerId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckerId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx
new file mode 100644
index 00000000..66059fd6
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx
@@ -0,0 +1,54 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="EquipmentMaterialBigTypeView.aspx.cs" Inherits="FineUIPro.Web.JDGL.WBS.EquipmentMaterialBigTypeView" %>
+
+
+
+
+
+设备材料分类
+
+
+
+
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.cs
new file mode 100644
index 00000000..2455d515
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.cs
@@ -0,0 +1,33 @@
+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.JDGL.WBS
+{
+ public partial class EquipmentMaterialBigTypeView : PageBase
+ {
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ this.btnClose.OnClientClick = ActiveWindow.GetHideReference();
+ string EquipmentMaterialBigTypeId = Request.Params["EquipmentMaterialBigTypeId"];
+ if (!string.IsNullOrEmpty(EquipmentMaterialBigTypeId))
+ {
+
+ Model.WBS_EquipmentMaterialBigType EquipmentMaterialBigType = BLL.EquipmentMaterialBigTypeService.GetEquipmentMaterialBigType(EquipmentMaterialBigTypeId);
+ if (EquipmentMaterialBigType != null)
+ {
+ this.txtEquipmentMaterialBigTypeCode.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeCode;
+ this.txtEquipmentMaterialBigTypeName.Text = EquipmentMaterialBigType.EquipmentMaterialBigTypeName;
+ this.txtRemark.Text = EquipmentMaterialBigType.Remark;
+ }
+ }
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.designer.cs
new file mode 100644
index 00000000..88d163b1
--- /dev/null
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialBigTypeView.aspx.designer.cs
@@ -0,0 +1,105 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.JDGL.WBS {
+
+
+ public partial class EquipmentMaterialBigTypeView {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtEquipmentMaterialBigTypeCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeCode;
+
+ ///
+ /// txtEquipmentMaterialBigTypeName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtEquipmentMaterialBigTypeName;
+
+ ///
+ /// txtRemark 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtRemark;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hdCheckerId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hdCheckerId;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+
+ ///
+ /// btnClose 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnClose;
+ }
+}
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx
index 6bdd951e..93979e12 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx
@@ -29,6 +29,7 @@
+
@@ -52,11 +53,14 @@
SortField="EquipmentMaterialTypeCode" FieldType="String" HeaderText="编号" TextAlign="center"
HeaderTextAlign="Center">
-
+
+
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.cs
index 0a86d46a..7f42df34 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.cs
@@ -18,7 +18,7 @@ namespace FineUIPro.Web.JDGL.WBS
{
GetButtonPower();
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
-
+ BLL.EquipmentMaterialBigTypeService.InitEquipmentMaterialBigTypeDownList(this.drpEquipmentMaterialBigTypeId, true);
// 绑定表格
BindGrid();
btnNew.OnClientClick = Window1.GetShowReference("EquipmentMaterialTypeEdit.aspx") + "return false;";
@@ -42,7 +42,7 @@ namespace FineUIPro.Web.JDGL.WBS
protected DataTable BindData()
{
- string strSql = @"select EquipmentMaterialTypeId,EquipmentMaterialTypeCode,EquipmentMaterialTypeName,Remark from [dbo].[WBS_EquipmentMaterialType] where 1=1 ";
+ string strSql = @"select EquipmentMaterialTypeId,EquipmentMaterialTypeCode,EquipmentMaterialTypeName,a.Remark,b.EquipmentMaterialBigTypeName from [dbo].[WBS_EquipmentMaterialType] a left join WBS_EquipmentMaterialBigType b on a.EquipmentMaterialBigTypeId=b.EquipmentMaterialBigTypeId where 1=1 ";
List listStr = new List();
if (!string.IsNullOrEmpty(this.txtEquipmentMaterialTypeCode.Text.Trim()))
@@ -55,6 +55,11 @@ namespace FineUIPro.Web.JDGL.WBS
strSql += " AND EquipmentMaterialTypeName like @EquipmentMaterialTypeName";
listStr.Add(new SqlParameter("@EquipmentMaterialTypeName", "%" + this.txtEquipmentMaterialTypeName.Text.Trim() + "%"));
}
+ if (this.drpEquipmentMaterialBigTypeId.SelectedValue != BLL.Const._Null)
+ {
+ strSql += " AND a.EquipmentMaterialBigTypeId = @EquipmentMaterialBigTypeId";
+ listStr.Add(new SqlParameter("@EquipmentMaterialBigTypeId", this.drpEquipmentMaterialBigTypeId.SelectedValue));
+ }
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
return tb;
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.designer.cs
index 35bb7755..dc6a6110 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialType.aspx.designer.cs
@@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.WBS {
///
protected global::FineUIPro.TextBox txtEquipmentMaterialTypeName;
+ ///
+ /// drpEquipmentMaterialBigTypeId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList drpEquipmentMaterialBigTypeId;
+
///
/// btnSearch 控件。
///
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialTypeEdit.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialTypeEdit.aspx
index 196ddb4c..2e0a47ff 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialTypeEdit.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/EquipmentMaterialTypeEdit.aspx
@@ -27,6 +27,11 @@
+
+
+
+
+
+
+
+
+
+