From 5d423fdcc5c3e8e76e144b70347aa95235a21004 Mon Sep 17 00:00:00 2001
From: geh <1923421292@qq.com>
Date: Tue, 26 May 2026 15:48:00 +0800
Subject: [PATCH] =?UTF-8?q?=E9=9B=86=E5=9B=A2=E4=B8=BB=E6=95=B0=E6=8D=AE?=
=?UTF-8?q?=E5=9C=A8=E5=BB=BA=E9=A1=B9=E7=9B=AE=E4=BD=BF=E7=94=A8=E6=83=85?=
=?UTF-8?q?=E5=86=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
...V2026-05-20-xiaj(集团主数据项目关联情况).sql | 66 ++
.../版本日志/SUBQHSE_V2026-05-23-xiaj.sql | 54 ++
SUBQHSE/BLL/BLL.csproj | 1 +
.../ProjectMasterDataUsageService.cs | 110 +++
SUBQHSE/BLL/ProjectData/ProjectService.cs | 23 +
SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj | 6 +
.../ProjectData/MasterProjectData.aspx | 266 +++++++
.../ProjectData/MasterProjectData.aspx.cs | 554 +++++++++++++
.../MasterProjectData.aspx.designer.cs | 332 ++++++++
.../ProjectData/MasterProjectDataUsage.aspx | 180 +++++
.../MasterProjectDataUsage.aspx.cs | 261 +++++++
.../MasterProjectDataUsage.aspx.designer.cs | 242 ++++++
.../ProjectData/ProjectSetSave.aspx | 96 ++-
.../ProjectData/ProjectSetSave.aspx.cs | 129 ++-
.../ProjectSetSave.aspx.designer.cs | 733 +++++++++---------
SUBQHSE/FineUIPro.Web/common/PageBase.cs | 220 ++++++
.../APIItem/CNCEC/Ads_pms_pro_info_build.cs | 209 +++++
SUBQHSE/Model/Model.cs | 505 ++++++++++++
SUBQHSE/Model/Model.csproj | 1 +
19 files changed, 3580 insertions(+), 408 deletions(-)
create mode 100644 DataBase/版本日志/SUBQHSE_V2026-05-20-xiaj(集团主数据项目关联情况).sql
create mode 100644 DataBase/版本日志/SUBQHSE_V2026-05-23-xiaj.sql
create mode 100644 SUBQHSE/BLL/ProjectData/ProjectMasterDataUsageService.cs
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs
create mode 100644 SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs
create mode 100644 SUBQHSE/Model/APIItem/CNCEC/Ads_pms_pro_info_build.cs
diff --git a/DataBase/版本日志/SUBQHSE_V2026-05-20-xiaj(集团主数据项目关联情况).sql b/DataBase/版本日志/SUBQHSE_V2026-05-20-xiaj(集团主数据项目关联情况).sql
new file mode 100644
index 0000000..64916cf
--- /dev/null
+++ b/DataBase/版本日志/SUBQHSE_V2026-05-20-xiaj(集团主数据项目关联情况).sql
@@ -0,0 +1,66 @@
+
+
+
+
+--˾ڽĿʹ
+ע˵ڡĿ˵棻ݶƵλ봦
+ӢĵļӢIJ˵
+Usage of master data project
+SELECT SuperMenu,MenuType,SortIndex,* FROM Sys_Menu WHERE MenuName='Ŀ'
+
+IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '204ACA82-15B4-4C80-AE9F-ACF25CE79999')
+BEGIN
+INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
+VALUES (N'204ACA82-15B4-4C80-AE9F-ACF25CE79999', N'ڽĿʹ', N'ProjectData/MasterProjectData.aspx', 45,SuperMenu, MenuType, 1,1, 1);
+END
+GO
+
+
+--ڽĿʹ
+IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Project_MasterDataUsage') AND type = N'U')
+BEGIN
+CREATE TABLE [dbo].[Project_MasterDataUsage](
+ [id] [nvarchar](50) NOT NULL,
+ [pro_id] [varchar](32) NULL,
+ [pro_code] [varchar](200) NULL,
+ [pro_name] [varchar](500) NULL,
+ [is_relate] [bit] NOT NULL,
+ [is_use] [bit] NOT NULL,
+ [projectid] [nvarchar](50) NULL,
+ [projectname] [nvarchar](200) NULL,
+ [projectcode] [varchar](100) NULL,
+ [reason] [nvarchar](500) NULL,
+ [situation] [nvarchar](500) NULL,
+ [remark] [nvarchar](500) NULL,
+ [create_user] [varchar](100) NOT NULL,
+ [create_date] [datetime] NOT NULL,
+ CONSTRAINT [PK_Project_MasterDataUsage] PRIMARY KEY CLUSTERED
+(
+ [id] ASC
+)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
+) ON [PRIMARY]
+ALTER TABLE [dbo].[Project_MasterDataUsage] ADD CONSTRAINT [DF_Project_MasterDataUsage_is_relate] DEFAULT ((0)) FOR [is_relate]
+ALTER TABLE [dbo].[Project_MasterDataUsage] ADD CONSTRAINT [DF_Project_MasterDataUsage_is_use] DEFAULT ((0)) FOR [is_use]
+ALTER TABLE [dbo].[Project_MasterDataUsage] ADD CONSTRAINT [DF_Project_MasterDataUsage_create_date] DEFAULT (getdate()) FOR [create_date]
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'id'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'pro_id'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'pro_code'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'pro_name'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'is_relate'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿʹ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'is_use'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QHSEĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'projectid'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QHSEĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'projectname'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QHSEĿ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'projectcode'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ԭ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'reason'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'situation'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'remark'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ά' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'create_user'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'άʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'create_date'
+EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ڽĿʹ˵' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage'
+END
+
+GO
+
+
+
+
diff --git a/DataBase/版本日志/SUBQHSE_V2026-05-23-xiaj.sql b/DataBase/版本日志/SUBQHSE_V2026-05-23-xiaj.sql
new file mode 100644
index 0000000..8d26a92
--- /dev/null
+++ b/DataBase/版本日志/SUBQHSE_V2026-05-23-xiaj.sql
@@ -0,0 +1,54 @@
+
+
+--去除多个QHSE项目绑定同一个集团主数据项目的异常数据,只保留一条QHSE项目绑定
+
+WITH CTE AS (
+ SELECT
+ RN = ROW_NUMBER() OVER(PARTITION BY MasterSysId ORDER BY ISNULL(ProjectState,'1'),StartDate asc )
+ ,*
+ FROM Base_Project
+ WHERE MasterSysId <>'' AND MasterSysId IS NOT NULL
+)
+
+/***
+
+SELECT ProjectId as 项目id,MasterSysId as sss,ProjectState,StartDate ,RN as 序号,*
+FROM CTE
+--WHERE RN > 1
+ORDER BY MasterSysId,RN
+
+***/
+
+UPDATE Base_Project
+SET MasterSysId=NULL
+WHERE ProjectId IN (select ProjectId FROM CTE WHERE RN > 1 );
+
+
+GO
+
+
+
+
+
+--集团在建项目使用详情补充字段:审批人信息
+IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Project_MasterDataUsage' AND COLUMN_NAME = 'HandleMan')
+BEGIN
+ ALTER TABLE Project_MasterDataUsage ADD HandleMan nvarchar(50);
+ ALTER TABLE Project_MasterDataUsage ADD HandleManName nvarchar(50);
+ ALTER TABLE Project_MasterDataUsage ADD HandleState char(1);
+ ALTER TABLE Project_MasterDataUsage ADD HandleDate datetime;
+ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审批人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'HandleMan'
+ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审批人姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'HandleManName'
+ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审批状态(0:通过,1:不通过)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'HandleState'
+ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'审批时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'HandleDate'
+END
+GO
+
+
+--集团在建项目使用详情补充字段:原因类型
+IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Project_MasterDataUsage' AND COLUMN_NAME = 'ReasonType')
+BEGIN
+ ALTER TABLE Project_MasterDataUsage ADD ReasonType nvarchar(50);
+ EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'原因类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Project_MasterDataUsage', @level2type=N'COLUMN',@level2name=N'ReasonType'
+END
+GO
diff --git a/SUBQHSE/BLL/BLL.csproj b/SUBQHSE/BLL/BLL.csproj
index a0cfe17..1036de3 100644
--- a/SUBQHSE/BLL/BLL.csproj
+++ b/SUBQHSE/BLL/BLL.csproj
@@ -848,6 +848,7 @@
+
diff --git a/SUBQHSE/BLL/ProjectData/ProjectMasterDataUsageService.cs b/SUBQHSE/BLL/ProjectData/ProjectMasterDataUsageService.cs
new file mode 100644
index 0000000..5b64033
--- /dev/null
+++ b/SUBQHSE/BLL/ProjectData/ProjectMasterDataUsageService.cs
@@ -0,0 +1,110 @@
+
+using System.Linq;
+
+namespace BLL
+{
+ ///
+ /// 集团在建项目使用详情
+ ///
+ public static class ProjectMasterDataUsageService
+ {
+ ///
+ /// 根据主键获取使用详情
+ ///
+ ///
+ ///
+ public static Model.Project_MasterDataUsage GetProjectMasterDataUsageById(string useId)
+ {
+ return Funs.DB.Project_MasterDataUsage.FirstOrDefault(e => e.Id == useId);
+ }
+
+ ///
+ /// 根据主数据项目Id获取使用详情
+ ///
+ ///
+ ///
+ public static Model.Project_MasterDataUsage GetProjectMasterDataUsageByProId(string proId)
+ {
+ return Funs.DB.Project_MasterDataUsage.FirstOrDefault(e => e.Pro_id == proId);
+ }
+
+ ///
+ /// 添加使用详情
+ ///
+ ///
+ public static void AddProjectMasterDataUsage(Model.Project_MasterDataUsage model)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.Project_MasterDataUsage newModel = new Model.Project_MasterDataUsage
+ {
+ Id = model.Id,
+ Pro_id = model.Pro_id,
+ Pro_code = model.Pro_code,
+ Pro_name = model.Pro_name,
+ Is_relate = model.Is_relate,
+ Is_use = model.Is_use,
+ Projectid = model.Projectid,
+ Projectcode = model.Projectcode,
+ Projectname = model.Projectname,
+ ReasonType = model.ReasonType,
+ Reason = model.Reason,
+ Situation = model.Situation,
+ Remark = model.Remark,
+ Create_user = model.Create_user,
+ Create_date = model.Create_date,
+ HandleMan = model.HandleMan,
+ HandleManName = model.HandleManName,
+ };
+ db.Project_MasterDataUsage.InsertOnSubmit(newModel);
+ db.SubmitChanges();
+ }
+
+ ///
+ /// 修改使用详情
+ ///
+ ///
+ public static void UpdateProjectMasterDataUsage(Model.Project_MasterDataUsage model)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.Project_MasterDataUsage newModel = db.Project_MasterDataUsage.FirstOrDefault(e => e.Id == model.Id);
+ if (newModel != null)
+ {
+ //newModel.Pro_id = model.Pro_id;
+ //newModel.Pro_code = model.Pro_code;
+ //newModel.Pro_name = model.Pro_name;
+ //newModel.Is_relate = model.Is_relate;
+ //newModel.Projectid = model.Projectid;
+ //newModel.Projectcode = model.Projectcode;
+ //newModel.Projectname = model.Projectname;
+ //newModel.Create_user = model.Create_user;
+ //newModel.Create_date = model.Create_date;
+ newModel.Is_use = model.Is_use;
+ newModel.ReasonType = model.ReasonType;
+ newModel.Reason = model.Reason;
+ newModel.Situation = model.Situation;
+ newModel.Remark = model.Remark;
+ newModel.HandleMan = model.HandleMan;
+ newModel.HandleManName = model.HandleManName;
+ newModel.HandleState = model.HandleState;
+ newModel.HandleDate = model.HandleDate;
+ db.SubmitChanges();
+ }
+ }
+
+ ///
+ /// 根据主键删除使用详情
+ ///
+ ///
+ public static void DeleteProjectMasterDataUsageById(string useId)
+ {
+ Model.SUBQHSEDB db = Funs.DB;
+ Model.Project_MasterDataUsage model = db.Project_MasterDataUsage.FirstOrDefault(e => e.Id == useId);
+ if (model != null)
+ {
+ db.Project_MasterDataUsage.DeleteOnSubmit(model);
+ db.SubmitChanges();
+ }
+ }
+
+ }
+}
diff --git a/SUBQHSE/BLL/ProjectData/ProjectService.cs b/SUBQHSE/BLL/ProjectData/ProjectService.cs
index 5587e33..04c77fb 100644
--- a/SUBQHSE/BLL/ProjectData/ProjectService.cs
+++ b/SUBQHSE/BLL/ProjectData/ProjectService.cs
@@ -1172,6 +1172,29 @@
return projectInfos.ToList();
}
+
+ ///
+ /// 获取主数据项目【新的主数据表】
+ ///
+ ///
+ public static List GetMasterProjectDataInfos()
+ {
+ var thisUnit = CommonService.GetIsThisUnit();
+ Dictionary dic = new Dictionary()
+ {
+ {"collCropCode", thisUnit.CollCropCode}
+ };
+
+ List projectlist = new List();
+ var returnData = ServerService.GerDataFromCncec("/api/Common/GetMasterProjectDataByCollCropCode", dic, null);
+ if (returnData != null && returnData.code == 1)
+ {
+ projectlist = JsonConvert.DeserializeObject>(returnData.data.ToString());
+ }
+
+ return projectlist;
+ }
+
///
/// 获取主数据项目
diff --git a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
index 3c4cedc..b61febc 100644
--- a/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SUBQHSE/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1166,6 +1166,8 @@
+
+
@@ -12667,6 +12669,10 @@
LocationSelect.aspx
+
+
+
+
ProjectDevices.aspx
ASPXCodeBehind
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx
new file mode 100644
index 0000000..043d0d9
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx
@@ -0,0 +1,266 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MasterProjectData.aspx.cs" Inherits="FineUIPro.Web.ProjectData.MasterProjectData" %>
+
+
+
+
+
+ 集团在建项目清单
+
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs
new file mode 100644
index 0000000..14551ad
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.cs
@@ -0,0 +1,554 @@
+using BLL;
+using FineUIPro.Web.BaseInfo;
+using FineUIPro.Web.DataShow;
+using Model;
+using Model.Customization;
+using Newtonsoft.Json.Linq;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+using AspNet = System.Web.UI.WebControls;
+
+namespace FineUIPro.Web.ProjectData
+{
+ public partial class MasterProjectData : PageBase
+ {
+ #region 加载
+ ///
+ /// 加载页面
+ ///
+ ///
+ ///
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ Funs.DropDownPageSize(this.ddlPageSize);
+ this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
+ //// 绑定表格
+ //this.BindGrid();
+ TabStrip1_TabIndexChanged(null, null);
+ }
+ }
+
+ protected void TabStrip1_TabIndexChanged(object sender, EventArgs e)
+ {
+ if (TabStrip1.ActiveTabIndex == 0)
+ {
+ this.Panel1.Title = "企业主数据与QHSE系统项目建立一览表";
+ this.BindGrid();
+ }
+ else
+ {
+ this.Panel1.Title = "企业QHSE项目使用情况一览表";
+ this.BindGrid2();
+ }
+ }
+
+ #endregion
+
+ #region 集团在建项目使用情况
+
+
+ #region 绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ var list = new List();
+ var db = Funs.DB;
+ var masterProDatas = ProjectService.GetMasterProjectDataInfos();
+ var query = (from x in masterProDatas
+ join pro in db.Base_Project on x.Pro_id equals pro.MasterSysId into proGroup
+ from pro in proGroup.DefaultIfEmpty()
+ join use in db.Project_MasterDataUsage on x.Pro_id equals use.Pro_id into useGroup
+ from use in useGroup.DefaultIfEmpty()
+ select new MasterProjectDataInfo
+ {
+ //Pid = x.Pro_id + (pro != null ? $"-{pro.ProjectId}" : ""),
+ Pid = $"{x.Pro_id}|{(pro != null ? $"{pro.ProjectId}" : "")}|{(use != null ? use.Id : "")}",
+ Pro_id = x.Pro_id,
+ Pro_name = x.Pro_name,
+ Pro_code = x.Pro_code,
+ Start_date = x.Start_date,
+ Con_mode_desc = x.Con_mode_desc,
+ Pro_nature = x.Pro_nature,
+ Pro_status = x.Pro_status,
+ Org_name = x.Org_name,
+ Amount = ConvertAmount(x.Ori_amt_sum_vat_fc, x.Amt_add_sum_vat_fc_local),
+ ProjectId = pro != null ? pro.ProjectId : null,
+ ProjectName = pro != null ? pro.ProjectName : "",
+ ProjectCode = pro != null ? pro.ProjectCode : "",
+ StartDate = pro != null ? pro.StartDate : null,
+ ProjectState = pro != null ? pro.ProjectState : "",
+ Relate = pro != null && pro.MasterSysId != null ? 1 : 2,
+ RelateName = pro != null && pro.MasterSysId != null ? "已关联" : "未关联",
+ UseId = use != null ? use.Id : null,
+ //Use = use == null ? "" : (use != null && use.Is_use == true) ? "已使用" : "未使用",
+ ReasonType = use != null ? use.ReasonType : "",
+ Reason = use != null ? use.Reason : "",
+ //Situation = use != null ? use.Situation : "",
+ //Remark = use != null ? use.Remark : "",
+ }).ToList();
+
+ string startDate = this.txtStartTime.Text.Trim();
+ string endDate = this.txtEndTime.Text.Trim();
+ if (!string.IsNullOrWhiteSpace(startDate))
+ {
+ query = query.Where(x => Funs.GetNewDateTime(x.Start_date) >= Funs.GetNewDateTime(startDate)).ToList();
+ }
+ if (!string.IsNullOrWhiteSpace(endDate))
+ {
+ query = query.Where(x => Funs.GetNewDateTime(x.Start_date) <= Funs.GetNewDateTime(endDate)).ToList();
+ }
+ query = query.OrderByDescending(x => x.StartDate).ToList();
+ list.AddRange(query);
+
+
+ //// 获取施工中的项目
+ var getProjects = ProjectService.GetProjectWorkList();
+ getProjects = getProjects.Where(x => x.MasterSysId == null).OrderByDescending(x => x.StartDate).ToList();
+ foreach (var pro in getProjects)
+ {
+ list.Add(new MasterProjectDataInfo
+ {
+ Pid = $"|{pro.ProjectId}|",
+ Pro_id = "",
+ Pro_name = "",
+ Pro_code = "",
+ Start_date = "",
+ Con_mode_desc = "",
+ Pro_nature = "",
+ Pro_status = "",
+ Org_name = "",
+ Amount = "",
+ ProjectId = pro != null ? pro.ProjectId : null,
+ ProjectName = pro != null ? pro.ProjectName : "",
+ ProjectCode = pro != null ? pro.ProjectCode : "",
+ StartDate = pro != null ? pro.StartDate : null,
+ ProjectState = pro != null ? pro.ProjectState : "",
+ Relate = 3,
+ RelateName = "未对应",
+ UseId = null,
+ //Use = use == null ? "" : (use != null && use.Is_use == true) ? "已使用" : "未使用",
+ ReasonType = "",
+ Reason = "",
+ //Situation = use != null ? use.Situation : "",
+ //Remark = use != null ? use.Remark : "",
+ });
+ }
+
+ string proName = this.txtProName.Text.Trim();
+ string proCode = this.txtProCode.Text.Trim();
+ string projectName = this.txtProjectName.Text.Trim();
+ string projectCode = this.txtProjectCode.Text.Trim();
+ int relate = int.Parse(this.rblIsRelate.SelectedValue);
+
+ if (!string.IsNullOrEmpty(proName))
+ {
+ list = list.Where(x => x.Pro_name.Contains(proName)).ToList();
+ }
+ if (!string.IsNullOrEmpty(proCode))
+ {
+ list = list.Where(x => x.Pro_code.Contains(proCode)).ToList();
+ }
+ if (!string.IsNullOrEmpty(projectName))
+ {
+ list = list.Where(x => x.ProjectName.Contains(projectName)).ToList();
+ }
+ if (!string.IsNullOrEmpty(projectCode))
+ {
+ list = list.Where(x => x.ProjectCode.Contains(projectCode)).ToList();
+ }
+ if (relate > 0)
+ {
+ list = list.Where(x => x.Relate == relate).ToList();
+ }
+
+ DataTable tb = Funs.LINQToDataTable(list);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+
+ //int masterNum = query.Count();
+ int masterNum = 0;
+ int relateNum = 0;
+ int allQhseNum = 0;
+ try
+ {
+ for (int i = 0; i < Grid1.Rows.Count; i++)
+ {
+ var mpCode = table.Rows[i]["Pro_code"].ToString().Trim();
+ var pCode = table.Rows[i]["ProjectCode"].ToString().Trim();
+ var relateStr = table.Rows[i]["RelateName"].ToString().Trim();
+ var reason = table.Rows[i]["Reason"].ToString().Trim();
+ if (Grid1.Rows[i].DataKeys[0] != null && relateStr == "未关联" && !string.IsNullOrWhiteSpace(reason))
+ {
+ Grid1.Rows[i].RowCssClass = "Pause";
+ }
+ if (relateStr == "已关联")
+ {
+ relateNum++;
+ }
+ if (!string.IsNullOrWhiteSpace(mpCode))
+ {
+ masterNum++;
+ }
+ if (!string.IsNullOrWhiteSpace(pCode))
+ {
+ allQhseNum++;
+ }
+ }
+ }
+ catch (Exception ex) { }
+
+
+ JObject summary = new JObject();
+ summary.Add("tfNumber", "合计");
+ //summary.Add("Pro_name", masterNum);
+ //summary.Add("ProjectName", allQhseNum);
+ //summary.Add("RelateName", $"已关联:{relateNum}");
+
+ summary.Add("Pro_name", $"主数据(已关联/总数):{relateNum}/{masterNum}");
+ summary.Add("ProjectName", $"QHSE(已关联/总数):{relateNum}/{allQhseNum}");
+
+ Grid1.SummaryData = summary;
+ }
+
+ ///
+ /// 合同额(亿)
+ ///
+ /// 合同含税金额原始存档(元)
+ /// 增补合同本币含税金额(元)
+ ///
+ protected string ConvertAmount(decimal? Ori_amt, decimal? Amt_add)
+ {
+ string result = string.Empty;
+ Ori_amt = Ori_amt == null ? 0 : Ori_amt;
+ Amt_add = Amt_add == null ? 0 : Amt_add;
+ decimal? all = Amt_add + Ori_amt;
+ if (all != null)
+ {
+ double amount = all == null ? 0 : (Math.Round((double)(all / 100000000m), 2));
+ result = amount.ToString();
+ }
+ return result;
+ }
+
+ ///
+ /// 项目状态
+ ///
+ ///
+ ///
+ protected string ConvertProjectState(object state)
+ {
+ string result = string.Empty;
+ string stateStr = state.ToString();
+ if (state != null && !string.IsNullOrWhiteSpace(stateStr))
+ {
+ result = stateStr == "2" ? "暂停中" : stateStr == "3" ? "已完工" : "施工中";
+ }
+ return result;
+ }
+ #endregion
+
+ #region Grid
+
+ protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
+ {
+ EditData(sender, e);
+ }
+
+ ///
+ /// 编辑数据方法
+ ///
+ private void EditData(object sender, GridRowClickEventArgs e)
+ {
+ if (Grid1.SelectedRowIndexArray.Length == 0)
+ {
+ Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
+ return;
+ }
+ var pId = Grid1.SelectedRowID;
+
+ string pro_id = pId.Split('|')[0];
+ string projectId = pId.Split('|')[1];
+ string useId = pId.Split('|')[2];
+
+ var obj = Grid1.SelectedRow.Values;
+ string num = obj[0].ToString();
+ string pro_name = obj[2].ToString();
+ string pro_code = obj[3].ToString();
+ string startdate = obj[7].ToString();
+ string prostatus = obj[9].ToString();
+ string projectName = obj[11].ToString();
+ string projectCode = obj[12].ToString();
+ string startDate = obj[13].ToString();
+ string lblState = (Grid1.SelectedRow.FindControl("lblState") as AspNet.Label).Text;
+
+ if (!string.IsNullOrWhiteSpace(pro_id))
+ {
+ var masterUsage = Funs.DB.Project_MasterDataUsage.Where(x => x.Pro_id == pro_id).FirstOrDefault();
+ if (masterUsage != null)
+ {
+ useId = masterUsage.Id;
+ }
+ else
+ {
+ useId = SQLHelper.GetNewID(typeof(Model.Project_MasterDataUsage));
+ Model.Project_MasterDataUsage model = new Model.Project_MasterDataUsage();
+ model.Id = useId;
+ model.Pro_id = pro_id;
+ model.Pro_code = pro_code;
+ model.Pro_name = pro_name;
+ model.Is_relate = !string.IsNullOrWhiteSpace(projectId);
+ model.Is_use = !string.IsNullOrWhiteSpace(projectId);
+ model.Projectid = projectId;
+ model.Projectcode = projectName;
+ model.Projectname = projectCode;
+ model.Create_user = this.CurrUser.UserName;
+ model.Create_date = DateTime.Now;
+ ProjectMasterDataUsageService.AddProjectMasterDataUsage(model);
+ }
+ PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MasterProjectDataUsage.aspx?UseId={0}", useId)));
+ //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MasterProjectDataUsage.aspx?UseId={0}&ProId={1}", useId, pro_id)));
+ }
+ }
+
+ protected void Window1_Close(object sender, WindowCloseEventArgs e)
+ {
+ this.BindGrid();
+ }
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.BindGrid();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ 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 Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ BindGrid();
+ }
+ #endregion
+
+ #region 导出按钮
+
+ ///
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业主数据与QHSE系统项目建立一览表" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid1.PageSize = this.Grid1.RecordCount;
+ this.BindGrid();
+ Response.Write(GetGridMultiHeaderTableHtml(Grid1));
+ //Response.Write(GetGridTableHtml(Grid1));
+ Response.End();
+ }
+ #endregion
+
+ #endregion
+
+ #region 企业QHSE在建项目使用情况
+
+
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid2()
+ {
+ var db = Funs.DB;
+ //// 获取施工中的项目
+ var getProjects = ProjectService.GetProjectWorkList();
+
+ string projectName = this.txtProjectName2.Text.Trim();
+ string projectCode = this.txtProjectCode2.Text.Trim();
+ int relate = int.Parse(this.rblIsRelate.SelectedValue);
+
+ var list = new List();
+ if (!string.IsNullOrEmpty(projectName))
+ {
+ getProjects = getProjects.Where(x => x.ProjectName.Contains(projectName)).ToList();
+ }
+ if (!string.IsNullOrEmpty(projectCode))
+ {
+ getProjects = getProjects.Where(x => x.ProjectCode.Contains(projectCode)).ToList();
+ }
+
+ string startDate = this.txtStartTime2.Text.Trim();
+ string endDate = this.txtEndTime2.Text.Trim();
+ if (!string.IsNullOrWhiteSpace(startDate))
+ {
+ getProjects = getProjects.Where(x => x.StartDate >= Funs.GetNewDateTime(startDate)).ToList();
+ }
+ if (!string.IsNullOrWhiteSpace(endDate))
+ {
+ getProjects = getProjects.Where(x => x.StartDate <= Funs.GetNewDateTime(endDate)).ToList();
+ }
+
+ var dateNow = DateTime.Now.Date;//现在
+ var dateMonthAgo = dateNow.AddMonths(-1);//一个月前
+
+ var datas = (from x in db.Project_HSSEData_HSSE
+ where x.ReportDate == dateNow || x.ReportDate == dateMonthAgo
+ select new QHSEProjectHSSEData
+ {
+ ProjectId = x.ProjectId,
+ ReportDate = x.ReportDate,
+ DataMetricsSum = (x.JoinConstructionPersonNum ?? 0) + (x.GeneralClosedNum ?? 0) + (x.GeneralNotClosedNum ?? 0) + (x.SafeWorkingHour ?? 0)
+ }).ToList();
+
+ foreach (var pro in getProjects)
+ {
+ string result = "正常";
+ var nowData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateNow).FirstOrDefault();
+ var monthAgoData = datas.Where(x => x.ProjectId == pro.ProjectId && x.ReportDate == dateMonthAgo).FirstOrDefault();
+ if (nowData != null && monthAgoData != null)
+ {//两个时间点都有指标数据
+ if (nowData.DataMetricsSum == monthAgoData.DataMetricsSum)
+ {
+ result = "异常";
+ }
+ }
+ //else if (nowData != null)
+ //{//现在有指标数据,一个月前没有
+ // result = "正常";
+ //}
+ //else if (monthAgoData != null)
+ //{//现在没有指标数据,一个月前有
+ // result = "正常";
+ //}
+
+ list.Add(new QHSEProjectDataInfo
+ {
+ ProjectId = pro.ProjectId,
+ ProjectName = pro.ProjectName,
+ ShortName = pro.ShortName,
+ ProjectCode = pro.ProjectCode,
+ StartDate = pro.StartDate,
+ EndDate = pro.EndDate,
+ ProjectState = pro.ProjectState,
+ Usage = result
+ });
+ }
+
+ DataTable tb = Funs.LINQToDataTable(list);
+ Grid2.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid2, tb);
+ Grid2.DataSource = table;
+ Grid2.DataBind();
+
+ int exNum = 0;
+ int allQhseNum = 0;
+ //int allQhseNum = list.Count();
+ try
+ {
+ for (int i = 0; i < Grid2.Rows.Count; i++)
+ {
+ allQhseNum++;
+ var usage = table.Rows[i]["Usage"].ToString().Trim();
+ if (usage == "异常")
+ {
+ Grid2.Rows[i].RowCssClass = "Pause";
+ exNum++;
+ }
+ }
+ }
+ catch (Exception ex) { }
+
+
+ JObject summary = new JObject();
+ summary.Add("tfNumber", "合计");
+ summary.Add("ProjectCode", allQhseNum);
+ summary.Add("Usage", $"异常:{exNum}");
+
+ Grid2.SummaryData = summary;
+ }
+
+ protected void TextBox_TextChanged2(object sender, EventArgs e)
+ {
+ this.BindGrid2();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void Grid2_PageIndexChange(object sender, GridPageEventArgs e)
+ {
+ this.BindGrid2();
+ }
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ Grid2.PageSize = Convert.ToInt32(ddlPageSize2.SelectedValue);
+ this.BindGrid2();
+ }
+
+ protected void Grid2_Sort(object sender, FineUIPro.GridSortEventArgs e)
+ {
+ this.BindGrid2();
+ }
+
+ #region 导出按钮
+
+ ///
+ /// 导出按钮
+ ///
+ ///
+ ///
+ protected void btnOut_Click2(object sender, EventArgs e)
+ {
+ Response.ClearContent();
+ string filename = Funs.GetNewFileName();
+ Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("企业QHSE项目使用情况一览表" + filename, System.Text.Encoding.UTF8) + ".xls");
+ Response.ContentType = "application/excel";
+ Response.ContentEncoding = System.Text.Encoding.UTF8;
+ this.Grid2.PageSize = this.Grid2.RecordCount;
+ this.BindGrid2();
+ Response.Write(GetGridMultiHeaderTableHtml(Grid2));
+ //Response.Write(GetGridTableHtml(Grid2));
+ Response.End();
+ }
+ #endregion
+
+
+ #endregion
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs
new file mode 100644
index 0000000..acdb82d
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectData.aspx.designer.cs
@@ -0,0 +1,332 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ProjectData
+{
+
+
+ public partial class MasterProjectData
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// Panel1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Panel Panel1;
+
+ ///
+ /// TabStrip1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TabStrip TabStrip1;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtProCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProCode;
+
+ ///
+ /// txtProName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProName;
+
+ ///
+ /// txtStartTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtStartTime;
+
+ ///
+ /// Label5 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label5;
+
+ ///
+ /// txtEndTime 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEndTime;
+
+ ///
+ /// rblIsRelate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsRelate;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// txtProjectCode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectCode;
+
+ ///
+ /// txtProjectName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectName;
+
+ ///
+ /// btnOut 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut;
+
+ ///
+ /// lblNumber 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblNumber;
+
+ ///
+ /// lblState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblState;
+
+ ///
+ /// ToolbarSeparator1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
+
+ ///
+ /// ToolbarText1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText1;
+
+ ///
+ /// ddlPageSize 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize;
+
+ ///
+ /// Grid2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid2;
+
+ ///
+ /// Toolbar3 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar3;
+
+ ///
+ /// txtProjectCode2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectCode2;
+
+ ///
+ /// txtProjectName2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectName2;
+
+ ///
+ /// txtStartTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtStartTime2;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// txtEndTime2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DatePicker txtEndTime2;
+
+ ///
+ /// btnOut2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnOut2;
+
+ ///
+ /// lblPageIndex 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblPageIndex;
+
+ ///
+ /// lblStatus 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.WebControls.Label lblStatus;
+
+ ///
+ /// ToolbarSeparator2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2;
+
+ ///
+ /// ToolbarText2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarText ToolbarText2;
+
+ ///
+ /// ddlPageSize2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownList ddlPageSize2;
+
+ ///
+ /// Window1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Window Window1;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx
new file mode 100644
index 0000000..e1ce527
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx
@@ -0,0 +1,180 @@
+<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MasterProjectDataUsage.aspx.cs" Inherits="FineUIPro.Web.ProjectData.MasterProjectDataUsage" %>
+
+
+
+
+
+ 质量巡检
+
+
+
+
+
+
+
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs
new file mode 100644
index 0000000..19fe61d
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.cs
@@ -0,0 +1,261 @@
+using BLL;
+using Model;
+using System;
+using System.Collections.Generic;
+using System.Data;
+using System.Data.SqlClient;
+using System.Linq;
+
+namespace FineUIPro.Web.ProjectData
+{
+ public partial class MasterProjectDataUsage : PageBase
+ {
+ #region 公共字段
+ ///
+ /// 主键
+ ///
+ public string UseId
+ {
+ get
+ {
+ return (string)ViewState["UseId"];
+ }
+ set
+ {
+ ViewState["UseId"] = value;
+ }
+ }
+ /////
+ ///// 主数据项目Id
+ /////
+ //public string ProId
+ //{
+ // get
+ // {
+ // return (string)ViewState["ProId"];
+ // }
+ // set
+ // {
+ // ViewState["ProId"] = value;
+ // }
+ //}
+
+ #endregion
+
+ protected void Page_Load(object sender, EventArgs e)
+ {
+ if (!IsPostBack)
+ {
+ //this.ProId = Request.Params["ProId"];
+ this.UseId = Request.Params["UseId"];
+ BindGrid();
+ if (!string.IsNullOrEmpty(UseId))
+ {
+ var usage = ProjectMasterDataUsageService.GetProjectMasterDataUsageById(UseId);
+ //var usage = ProjectMasterDataUsageService.GetProjectMasterDataUsageByProId(ProId);
+ this.txtPro_code.Text = usage.Pro_code;
+ this.txtPro_name.Text = usage.Pro_name;
+ this.txtProjectcode.Text = usage.Projectcode;
+ this.txtProjectname.Text = usage.Projectname;
+ this.rblIsRelate.SelectedValue = usage.Is_relate ? "1" : "0";
+ //this.rblIsUse.SelectedValue = usage.Is_use ? "1" : "0";
+
+ this.rblReasonType.SelectedValue = usage.ReasonType;
+ this.txtReason.Text = usage.Reason;
+ //this.txtSituation.Text = usage.Situation;
+ //this.txtReason.Text = usage.Reason;
+ //this.txtRemark.Text = usage.Remark;
+
+ //this.rblIsUse.Readonly = true;
+ //if (this.rblIsRelate.SelectedValue == "0")
+ //{
+ // this.txtReason.Required = true;
+ // this.txtReason.ShowRedStar = true;
+ //}
+ //if (this.rblIsUse.SelectedValue == "1")
+ //{
+ // this.Next.Hidden = true;
+ //}
+ if (usage.Is_relate)
+ {
+ this.Next.Hidden = true;
+ this.Toolbar1.Hidden = true;
+ this.txtReason.Required = false;
+ this.txtReason.ShowRedStar = false;
+ }
+ else
+ {
+ this.Next.Hidden = false;
+ this.txtReason.Required = true;
+ this.txtReason.ShowRedStar = true;
+ }
+
+
+ string handleMan = this.drpHandleMan.Value;
+ if (!string.IsNullOrWhiteSpace(usage.HandleMan))
+ {
+ //this.cbNext.SelectedValue = "1";
+ this.drpHandleMan.Value = usage.HandleMan;
+ this.drpHandleMan.Text = usage.HandleManName;
+
+ bool isAuditer = usage.HandleMan == this.CurrUser.UserId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId;
+ if (usage.HandleState == null)
+ {
+ if (isAuditer)
+ {
+ this.Audit.Hidden = false;
+ this.rblHandleState.SelectedValue = "1";
+ }
+ else
+ {
+ this.Next.Hidden = true;
+ this.Toolbar1.Hidden = true;
+ }
+ }
+ if (usage.HandleState != null)
+ {
+ this.Toolbar1.Hidden = true;
+ this.Next.Hidden = true;
+ }
+ }
+ }
+ }
+ }
+
+ #region 人员下拉框绑定数据
+ ///
+ /// 绑定数据
+ ///
+ private void BindGrid()
+ {
+ string unitId = CommonService.GetThisUnitId();
+ string strSql = @"SELECT UserId,UserName,UserCode,role.RoleName"
+ + @" FROM Sys_User AS users LEFT JOIN Sys_Role AS role ON users.RoleId= role.RoleId"
+ + @" WHERE users.IsPost=1 AND role.IsAuditFlow=1 AND users.IsOffice =1 AND UnitId ='" + unitId + "'";
+ List listStr = new List();
+ if (!string.IsNullOrEmpty(this.txtUserName.Text.Trim()))
+ {
+ strSql += " AND (UserName LIKE @Name OR UserCode LIKE @Name OR role.RoleName LIKE @Name)";
+ listStr.Add(new SqlParameter("@Name", "%" + this.txtUserName.Text.Trim() + "%"));
+ }
+
+ SqlParameter[] parameter = listStr.ToArray();
+ DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
+ Grid1.RecordCount = tb.Rows.Count;
+ var table = this.GetPagedDataTable(Grid1, tb);
+ Grid1.DataSource = table;
+ Grid1.DataBind();
+ }
+
+ #region 查询
+ ///
+ /// 下拉框查询
+ ///
+ ///
+ ///
+ protected void TextBox_TextChanged(object sender, EventArgs e)
+ {
+ this.drpHandleMan.Values = null;
+ this.BindGrid();
+ }
+ #endregion
+
+ #endregion
+
+ ///
+ /// 是否使用触发事件
+ ///
+ ///
+ ///
+ protected void rblIsUse_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ //string isUse = this.rblIsUse.SelectedValue;
+ //if (isUse == "0")
+ //{
+ // this.txtReason.Required = true;
+ // this.txtReason.ShowRedStar = true;
+ // this.Next.Hidden = false;
+ //}
+ //else
+ //{
+ // this.Next.Hidden = true;
+ // this.txtReason.Required = false;
+ // this.txtReason.ShowRedStar = false;
+ //}
+ }
+
+ ///
+ /// 下一步触发事件
+ ///
+ ///
+ ///
+ protected void cbNext_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ if (this.cbNext.SelectedValue == "1")
+ {
+ //this.Audit.Hidden = false;
+ this.HandleMan.Hidden = false;
+ this.drpHandleMan.Required = true;
+ this.drpHandleMan.ShowRedStar = true;
+ }
+ else
+ {
+ //this.Audit.Hidden = true;
+ this.HandleMan.Hidden = true;
+ this.drpHandleMan.Required = false;
+ this.drpHandleMan.ShowRedStar = false;
+ }
+ }
+
+
+ protected void btnSave_Click(object sender, EventArgs e)
+ {
+ //var model = ProjectMasterDataUsageService.GetProjectMasterDataUsageByProId(ProId);
+ Project_MasterDataUsage usage = new Project_MasterDataUsage();
+ //usage.Id = model.Id;
+ usage.Id = this.UseId;
+ //usage.Is_use = this.rblIsUse.SelectedValue == "1";
+ usage.ReasonType = this.rblReasonType.SelectedValue;
+ usage.Reason = this.txtReason.Text.Trim();
+ //usage.Situation = this.txtSituation.Text.Trim();
+ //usage.Reason = this.txtReason.Text.Trim();
+ //usage.Remark = this.txtRemark.Text.Trim();
+
+
+ //usage.HandleMan = this.drpHandleMan.Value;
+ //usage.HandleManName = this.drpHandleMan.Text;
+
+ string handleMan = this.drpHandleMan.Value;
+ string handleManName = this.drpHandleMan.Text;
+ if (!string.IsNullOrWhiteSpace(handleMan))
+ {//
+ bool isAuditer = handleMan == this.CurrUser.UserId || this.CurrUser.UserId == Const.hfnbdId || this.CurrUser.UserId == Const.sysglyId;
+
+ usage.HandleMan = handleMan;
+ usage.HandleManName = handleManName;
+ if (isAuditer)
+ {
+ usage.HandleState = this.rblHandleState.SelectedValue;
+ //usage.HandleMan = this.CurrUser.UserId;
+ //usage.HandleManName = this.CurrUser.UserName;
+ usage.HandleDate = DateTime.Now;
+ }
+ }
+ else
+ {
+ usage.HandleState = this.rblHandleState.SelectedValue;
+ usage.HandleDate = DateTime.Now;
+ }
+ //if (this.cbNext.SelectedValue == "0")
+ //{
+ //}
+ ProjectMasterDataUsageService.UpdateProjectMasterDataUsage(usage);
+ PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
+ }
+
+ protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
+ {
+
+ }
+ }
+}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs
new file mode 100644
index 0000000..2017d64
--- /dev/null
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/MasterProjectDataUsage.aspx.designer.cs
@@ -0,0 +1,242 @@
+//------------------------------------------------------------------------------
+// <自动生成>
+// 此代码由工具生成。
+//
+// 对此文件的更改可能导致不正确的行为,如果
+// 重新生成代码,则所做更改将丢失。
+// 自动生成>
+//------------------------------------------------------------------------------
+
+namespace FineUIPro.Web.ProjectData
+{
+
+
+ public partial class MasterProjectDataUsage
+ {
+
+ ///
+ /// form1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::System.Web.UI.HtmlControls.HtmlForm form1;
+
+ ///
+ /// PageManager1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.PageManager PageManager1;
+
+ ///
+ /// SimpleForm1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Form SimpleForm1;
+
+ ///
+ /// txtPro_code 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPro_code;
+
+ ///
+ /// txtPro_name 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtPro_name;
+
+ ///
+ /// txtProjectcode 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectcode;
+
+ ///
+ /// txtProjectname 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtProjectname;
+
+ ///
+ /// rblIsRelate 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblIsRelate;
+
+ ///
+ /// rblReasonType 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblReasonType;
+
+ ///
+ /// txtReason 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextArea txtReason;
+
+ ///
+ /// Next 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow Next;
+
+ ///
+ /// cbNext 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList cbNext;
+
+ ///
+ /// lb 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label lb;
+
+ ///
+ /// HandleMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow HandleMan;
+
+ ///
+ /// drpHandleMan 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.DropDownBox drpHandleMan;
+
+ ///
+ /// Grid1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Grid Grid1;
+
+ ///
+ /// Toolbar2 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar2;
+
+ ///
+ /// txtUserName 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.TextBox txtUserName;
+
+ ///
+ /// Audit 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.FormRow Audit;
+
+ ///
+ /// rblHandleState 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.RadioButtonList rblHandleState;
+
+ ///
+ /// Label1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Label Label1;
+
+ ///
+ /// Toolbar1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Toolbar Toolbar1;
+
+ ///
+ /// hfGpsAreId 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.HiddenField hfGpsAreId;
+
+ ///
+ /// ToolbarFill1 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.ToolbarFill ToolbarFill1;
+
+ ///
+ /// btnSave 控件。
+ ///
+ ///
+ /// 自动生成的字段。
+ /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ ///
+ protected global::FineUIPro.Button btnSave;
+ }
+}
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
index 1ed27f1..2a43678 100644
--- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx
@@ -18,6 +18,60 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <%----%>
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ /// 集团主数据项目下拉加载方法
+ ///
private void BindGrid()
{
- var list = ProjectService.GetMasterProjectInfos();
+ var list = ProjectService.GetMasterProjectDataInfos();
string code = ttbCodeSearch.Text.Trim();
string name = ttbNameSearch.Text.Trim();
if (!string.IsNullOrWhiteSpace(code))
{
- list = list.Where(x => x.PrjCode.Contains(code)).ToList();
+ list = list.Where(x => x.Pro_code.Contains(code)).ToList();
}
if (!string.IsNullOrWhiteSpace(name))
{
- list = list.Where(x => x.PrjName.Contains(name)).ToList();
+ list = list.Where(x => x.Pro_name.Contains(name)).ToList();
}
-
// 1.设置总项数(特别注意:数据库分页一定要设置总记录数RecordCount)
Grid1.RecordCount = list.Count();
// 2.获取当前分页数据
@@ -234,6 +237,7 @@ namespace FineUIPro.Web.ProjectData
Grid1.DataBind();
}
+
protected void Grid1_Sort(object sender, GridSortEventArgs e)
{
BindGrid();
@@ -299,9 +303,25 @@ namespace FineUIPro.Web.ProjectData
Alert.ShowInTop("坐标中不允许出现汉字,请输入正确的坐标!", MessageBoxIcon.Warning);
return;
}
+ string masterSysId = this.drpMasterBox1.Value;
+ if (!string.IsNullOrWhiteSpace(masterSysId))
+ {
+ var relatePro = Funs.DB.Base_Project.FirstOrDefault(x => x.MasterSysId == masterSysId && (x.ProjectId != this.ProjectId || (this.ProjectId == null && x.ProjectId != null)));
+ if (relatePro != null)
+ {
+ ShowNotify($"已存在关联此主数据的项目:({relatePro.ProjectCode}){relatePro.ProjectName}!", MessageBoxIcon.Warning);
+ }
+ }
+ else
+ {
+ ShowNotify($"请选择关联集团主数据项目!", MessageBoxIcon.Warning);
+ return ;
+ }
+
this.SaveData();
}
+
///
/// 判断字符串中是否包含中文
///
@@ -891,6 +911,26 @@ namespace FineUIPro.Web.ProjectData
#endregion
protected void txtStartDate_Blur(object sender, EventArgs e)
+ {
+ ChangeDuration();
+ //var sDate = Funs.GetNewDateTime(this.txtStartDate.Text);
+ //var eDate = Funs.GetNewDateTime(this.txtEndDate.Text);
+ //if (sDate.HasValue && eDate.HasValue && eDate.Value > sDate.Value)
+ //{
+ // int m1 = sDate.Value.Year * 12 + sDate.Value.Month;
+ // int m2 = eDate.Value.Year * 12 + eDate.Value.Month;
+ // int a = m2 - m1;
+
+ // TimeSpan ts1 = new TimeSpan(sDate.Value.Ticks);
+ // TimeSpan ts2 = new TimeSpan(eDate.Value.AddMonths(0 - a).Ticks);
+ // TimeSpan ts = ts1.Subtract(ts2).Duration();
+ // this.txtDuration.Text = (Math.Round((ts.Days * 1.0 / 30), 1) + a).ToString();
+ //}
+ }
+ ///
+ /// 自动计算工期(月)
+ ///
+ private void ChangeDuration()
{
var sDate = Funs.GetNewDateTime(this.txtStartDate.Text);
var eDate = Funs.GetNewDateTime(this.txtEndDate.Text);
@@ -907,6 +947,7 @@ namespace FineUIPro.Web.ProjectData
}
}
+
protected void drpCountry_SelectedIndexChanged(object sender, EventArgs e)
{
this.drpProvince.Items.Clear();
@@ -990,5 +1031,85 @@ namespace FineUIPro.Web.ProjectData
}
#endregion
+
+ ///
+ /// 集团主数据境内外
+ ///
+ ///
+ ///
+ protected string ConvertProAddType(object addType)
+ {
+ string result = string.Empty;
+ string addtypeStr = addType.ToString();
+ if (addType != null)
+ {
+ result = addtypeStr == "1" ? "境内" : addtypeStr == "2" ? "境外" : "";
+ }
+ return result;
+ }
+
+
+ #region 集团主数据选择触发事件
+ ///
+ /// 集团主数据选择触发事件
+ ///
+ ///
+ ///
+ protected void MasterData_Changed(object sender, EventArgs e)
+ {
+ string proName = this.drpMasterBox1.Text.Trim();
+ string masterSysId = Grid1.SelectedRowID;
+ if (!string.IsNullOrWhiteSpace(masterSysId))
+ {
+ var obj = Grid1.SelectedRow.Values;
+ string num = obj[0].ToString();
+ string code = obj[1].ToString();
+ string name = obj[2].ToString();
+ string shortname = obj[3].ToString();
+ string startdate = obj[4].ToString();
+ string enddate = obj[5].ToString();
+ string address = obj[6].ToString();
+ //string proaddtype = obj[7].ToString();
+ string proaddtype = (Grid1.SelectedRow.FindControl("lblProaddtype") as AspNet.Label).Text;
+
+ var relatePro = Funs.DB.Base_Project.FirstOrDefault(x => x.MasterSysId == masterSysId && (x.ProjectId != this.ProjectId || (this.ProjectId == null && x.ProjectId != null)));
+ if (relatePro != null)
+ {
+ ShowNotify($"已存在关联此主数据的项目:({relatePro.ProjectCode}){relatePro.ProjectName}!", MessageBoxIcon.Warning);
+ }
+ var existPro = Funs.DB.Base_Project.FirstOrDefault(x => (x.ProjectName == name || x.ProjectName == code) && (x.ProjectId != this.ProjectId || (this.ProjectId == null && x.ProjectId != null)));
+ if (existPro != null)
+ {
+ ShowNotify($"已存在相同名称、编号的项目:({relatePro.ProjectCode}){relatePro.ProjectName}!", MessageBoxIcon.Warning);
+ }
+
+ this.txtProjectName.Text = name;
+ this.txtProjectCode.Text = code;
+ if (!string.IsNullOrWhiteSpace(shortname))
+ {
+ this.txtShortName.Text = shortname;
+ }
+ if (!string.IsNullOrWhiteSpace(address))
+ {
+ this.txtProjectAddress.Text = address;
+ }
+ if (!string.IsNullOrWhiteSpace(startdate))
+ {
+ this.txtStartDate.Text = startdate;
+ }
+ if (!string.IsNullOrWhiteSpace(enddate))
+ {
+ this.txtEndDate.Text = enddate;
+ ChangeDuration();
+ }
+ if (proaddtype == "境外")
+ {
+ this.ckbIsForeign.Checked = true;
+ }
+ }
+ }
+ #endregion
+
+
}
}
\ No newline at end of file
diff --git a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
index 8ef59c8..c623582 100644
--- a/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
+++ b/SUBQHSE/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs
@@ -1,10 +1,10 @@
//------------------------------------------------------------------------------
-// <自动生成>
-// 此代码由工具生成。
+//
+// This code was generated by a tool.
//
-// 对此文件的更改可能导致不正确的行为,如果
-// 重新生成代码,则所做更改将丢失。
-// 自动生成>
+// Changes to this file may cause incorrect behavior and will be lost if
+// the code is regenerated.
+//
//------------------------------------------------------------------------------
namespace FineUIPro.Web.ProjectData
@@ -15,479 +15,488 @@ namespace FineUIPro.Web.ProjectData
{
///
- /// form1 控件。
+ /// form1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
///
- /// PageManager1 控件。
+ /// PageManager1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.PageManager PageManager1;
///
- /// SimpleForm1 控件。
+ /// SimpleForm1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Form SimpleForm1;
///
- /// txtProjecyId 控件。
+ /// txtProjecyId control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TextBox txtProjecyId;
///
- /// txtProjectName 控件。
+ /// drpMasterBox1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtProjectName;
-
- ///
- /// drpProjectAttribute 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectAttribute;
-
- ///
- /// txtProjectCode 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtProjectCode;
-
- ///
- /// txtShortName 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtShortName;
-
- ///
- /// drpProjectType 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectType;
-
- ///
- /// drpProjectState 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectState;
-
- ///
- /// drpProjectState2 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectState2;
-
- ///
- /// drpProjectNature 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectNature;
-
- ///
- /// txtStartDate 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DatePicker txtStartDate;
-
- ///
- /// txtEndDate 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DatePicker txtEndDate;
-
- ///
- /// txtContractNo 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtContractNo;
-
- ///
- /// txtDuration 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtDuration;
-
- ///
- /// drpProjectManager 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProjectManager;
-
- ///
- /// drpConstructionManager 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpConstructionManager;
-
- ///
- /// drpQAManager 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpQAManager;
-
- ///
- /// drpHSSEManager 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpHSSEManager;
-
- ///
- /// drpDriveManager 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpDriveManager;
-
- ///
- /// txtProjectAddress 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtProjectAddress;
-
- ///
- /// drpUnit 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpUnit;
-
- ///
- /// ckbIsForeign 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.CheckBox ckbIsForeign;
-
- ///
- /// txtWorkRange 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextArea txtWorkRange;
-
- ///
- /// txtRemark 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextArea txtRemark;
-
- ///
- /// txtProjectInsurance 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextArea txtProjectInsurance;
-
- ///
- /// txtProjectMoney 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtProjectMoney;
-
- ///
- /// txtConstructionMoney 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtConstructionMoney;
-
- ///
- /// txtTelephone 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtTelephone;
-
- ///
- /// drpCountry 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpCountry;
-
- ///
- /// drpProvince 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.DropDownList drpProvince;
-
- ///
- /// txtCity 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtCity;
-
- ///
- /// txtMapCoordinates 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtMapCoordinates;
-
- ///
- /// bottomPanel 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.ContentPanel bottomPanel;
-
- ///
- /// txtEnglishRemark 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.TextBox txtEnglishRemark;
-
- ///
- /// txtProgress 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtProgress;
-
- ///
- /// drpMasterBox1 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.DropDownBox drpMasterBox1;
///
- /// Panel7 控件。
+ /// Panel7 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Panel Panel7;
///
- /// Form5 控件。
+ /// Form5 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Form Form5;
///
- /// ttbCodeSearch 控件。
+ /// ttbCodeSearch control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TwinTriggerBox ttbCodeSearch;
///
- /// ttbNameSearch 控件。
+ /// ttbNameSearch control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.TwinTriggerBox ttbNameSearch;
///
- /// Grid1 控件。
+ /// Grid1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Grid Grid1;
///
- /// drpSubjectUnit 控件。
+ /// lblProaddtype control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::System.Web.UI.WebControls.Label lblProaddtype;
+
+ ///
+ /// txtProjectName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtProjectName;
+
+ ///
+ /// drpProjectAttribute control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectAttribute;
+
+ ///
+ /// txtProjectCode control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtProjectCode;
+
+ ///
+ /// txtShortName control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtShortName;
+
+ ///
+ /// drpProjectType control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectType;
+
+ ///
+ /// drpProjectState control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectState;
+
+ ///
+ /// drpProjectState2 control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectState2;
+
+ ///
+ /// drpProjectNature control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectNature;
+
+ ///
+ /// txtStartDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DatePicker txtStartDate;
+
+ ///
+ /// txtEndDate control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DatePicker txtEndDate;
+
+ ///
+ /// txtContractNo control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtContractNo;
+
+ ///
+ /// txtDuration control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.NumberBox txtDuration;
+
+ ///
+ /// drpProjectManager control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProjectManager;
+
+ ///
+ /// drpConstructionManager control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpConstructionManager;
+
+ ///
+ /// drpQAManager control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpQAManager;
+
+ ///
+ /// drpHSSEManager control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpHSSEManager;
+
+ ///
+ /// drpDriveManager control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpDriveManager;
+
+ ///
+ /// txtProjectAddress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtProjectAddress;
+
+ ///
+ /// drpUnit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpUnit;
+
+ ///
+ /// ckbIsForeign control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.CheckBox ckbIsForeign;
+
+ ///
+ /// txtWorkRange control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextArea txtWorkRange;
+
+ ///
+ /// txtRemark control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextArea txtRemark;
+
+ ///
+ /// txtProjectInsurance control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextArea txtProjectInsurance;
+
+ ///
+ /// txtProjectMoney control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.NumberBox txtProjectMoney;
+
+ ///
+ /// txtConstructionMoney control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.NumberBox txtConstructionMoney;
+
+ ///
+ /// txtTelephone control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtTelephone;
+
+ ///
+ /// drpCountry control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpCountry;
+
+ ///
+ /// drpProvince control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.DropDownList drpProvince;
+
+ ///
+ /// txtCity control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtCity;
+
+ ///
+ /// txtMapCoordinates control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtMapCoordinates;
+
+ ///
+ /// bottomPanel control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.ContentPanel bottomPanel;
+
+ ///
+ /// txtEnglishRemark control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.TextBox txtEnglishRemark;
+
+ ///
+ /// txtProgress control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
+ ///
+ protected global::FineUIPro.NumberBox txtProgress;
+
+ ///
+ /// drpSubjectUnit control.
+ ///
+ ///
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.DropDownList drpSubjectUnit;
///
- /// drpSubjectProject 控件。
+ /// drpSubjectProject control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.DropDownList drpSubjectProject;
///
- /// Toolbar1 控件。
+ /// Toolbar1 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Toolbar Toolbar1;
///
- /// ckIsUpTotalMonth 控件。
+ /// ckIsUpTotalMonth control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.CheckBox ckIsUpTotalMonth;
///
- /// btnAttachUrl 控件。
+ /// btnAttachUrl control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnAttachUrl;
///
- /// btnAttachUrl2 控件。
+ /// btnAttachUrl2 control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnAttachUrl2;
///
- /// btnSave 控件。
+ /// btnSave control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnSave;
///
- /// btnClose 控件。
+ /// btnClose control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Button btnClose;
///
- /// hdCompileMan 控件。
+ /// hdCompileMan control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.HiddenField hdCompileMan;
///
- /// WindowAtt 控件。
+ /// WindowAtt control.
///
///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
+ /// Auto-generated field.
+ /// To modify move field declaration from designer file to code-behind file.
///
protected global::FineUIPro.Window WindowAtt;
}
diff --git a/SUBQHSE/FineUIPro.Web/common/PageBase.cs b/SUBQHSE/FineUIPro.Web/common/PageBase.cs
index 997f7d2..63cb6db 100644
--- a/SUBQHSE/FineUIPro.Web/common/PageBase.cs
+++ b/SUBQHSE/FineUIPro.Web/common/PageBase.cs
@@ -1312,5 +1312,225 @@ namespace FineUIPro.Web
return ip;
}
+
+ ///
+ /// 多表头导出方法
+ ///
+ ///
+ ///
+ public string GetGridMultiHeaderTableHtml(Grid grid)
+ {
+ StringBuilder sb = new StringBuilder();
+ sb.Append("");
+ sb.Append("");
+ //sb.Append("");
+ //foreach (GridColumn column in grid.Columns)
+ //{
+ // if (column.ColumnID != "ckbIsSelected" && column.ColumnID != "Punish" && column.ColumnID != "Del")
+ // {
+ // sb.AppendFormat("| {0} | ", column.HeaderText);
+ // }
+ //}
+ //sb.Append("
");
+ MultiHeaderTable mht = new MultiHeaderTable();
+ mht.ResolveMultiHeaderTable(grid.Columns);
+
+ foreach (List
");
+
+ return sb.ToString();
+ }
+
+
+
+ #region 多表头处理
+
+ ///
+ /// 处理多表头的类
+ ///
+ public class MultiHeaderTable
+ {
+ // 包含 rowspan,colspan 的多表头,方便生成 HTML 的 table 标签
+ public List> MultiTable = new List>();
+ // 最终渲染的列数组
+ public List Columns = new List();
+
+ public void ResolveMultiHeaderTable(GridColumnCollection columns)
+ {
+ List