fix:项目亮点
This commit is contained in:
parent
1cd9b54018
commit
4000a4ef96
|
|
@ -0,0 +1,180 @@
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
【注意】
|
||||
项目现场亮菜单位置根据客户环境放置。修改菜单脚本的MenuType和SortIndex
|
||||
示例:
|
||||
公司级菜单五环放在 综合管理模块下面
|
||||
项目级菜单五环放在 质量管理模块下面
|
||||
|
||||
/***********************************************************************************
|
||||
|
||||
|
||||
select*from Sys_Menu
|
||||
where MenuType='Menu_ZHGL' and SuperMenu='0'
|
||||
order by SortIndex
|
||||
|
||||
|
||||
select*from Sys_Menu where MenuName ='设计图纸管理'
|
||||
select*from Sys_Menu
|
||||
where MenuType='Menu_CQMS' and SuperMenu='0'
|
||||
order by SortIndex
|
||||
|
||||
update Sys_Menu set SortIndex=69
|
||||
where MenuType='Menu_ZHGL' and SuperMenu='0' and MenuName ='安全会议'
|
||||
|
||||
|
||||
**********************************************************************************/
|
||||
|
||||
|
||||
--公司级项目现场亮点
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '42106F55-BE3A-4252-8D4D-0793E4777524')
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'42106F55-BE3A-4252-8D4D-0793E4777524', N'项目现场亮点', N'', 65, N'0', N'Menu_CQMS', 1,0, 1);
|
||||
END
|
||||
GO
|
||||
--公司级项目现场亮点类型
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '67F04484-EC26-49AA-BFB4-6CF5DB06F8CA')
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'67F04484-EC26-49AA-BFB4-6CF5DB06F8CA', N'项目现场亮点类型', N'CQMS/ProjectHighlightsSite/ProjectHighlightsSiteType.aspx', 10, N'42106F55-BE3A-4252-8D4D-0793E4777524', N'Menu_CQMS', 1,1, 1);
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'项目现场亮点照片', N'CQMS/ProjectHighlightsSite/ProjectHighlightsSitePicReport.aspx', 20, N'42106F55-BE3A-4252-8D4D-0793E4777524', N'Menu_CQMS', 1,1, 1);
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
--项目级项目现场亮点
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = 'AB393E2F-7CC9-4ED2-AD32-202A961ED45D')
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'AB393E2F-7CC9-4ED2-AD32-202A961ED45D', N'项目现场亮点', N'', 110, N'0', N'Menu_CQMS_P',0,0, 1);
|
||||
END
|
||||
GO
|
||||
--项目级项目现场亮点类型
|
||||
IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = 'D81AE7C1-2022-4089-B0F9-49903798DEEF')
|
||||
BEGIN
|
||||
INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed)
|
||||
VALUES (N'D81AE7C1-2022-4089-B0F9-49903798DEEF', N'项目现场亮点照片', N'CQMS/ProjectHighlightsSite/ProjectHighlightsSitePic.aspx', 10, N'AB393E2F-7CC9-4ED2-AD32-202A961ED45D', N'Menu_CQMS_P', 1,1, 1);
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
--企业级项目现场亮点照片操作按钮
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '38177E89-4BA8-4D66-AFB9-93644DFE7451')
|
||||
BEGIN
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'BCAA2928-80AF-486B-A266-75FDD8B3C8D5', N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'增加', 1);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'C54E07A1-EB5A-45BC-9E70-6CDE67E2F12A', N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'修改', 2);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'A50A19C9-ACC0-4CFC-B356-E28767126481', N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'删除', 3);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'0563E76D-98EE-4D91-A0DE-A64F6664765E', N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'保存', 4);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'84172E43-0005-4D65-8F5A-AC87D1B210A0', N'38177E89-4BA8-4D66-AFB9-93644DFE7451', N'保存并上报', 5);
|
||||
END
|
||||
GO
|
||||
|
||||
--项目现场亮点照片操作按钮
|
||||
IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D81AE7C1-2022-4089-B0F9-49903798DEEF')
|
||||
BEGIN
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'53909252-6868-438D-AD0B-443186AA9DEF', N'D81AE7C1-2022-4089-B0F9-49903798DEEF', N'增加', 1);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'7E74086A-9846-4B2E-B08F-1CF058240F07', N'D81AE7C1-2022-4089-B0F9-49903798DEEF', N'修改', 2);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'FADC8D81-2DAF-4D7E-99E6-A4A605241953', N'D81AE7C1-2022-4089-B0F9-49903798DEEF', N'删除', 3);
|
||||
INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex])
|
||||
VALUES (N'3A296D42-25E4-4DF2-85A7-1490969F1ABD', N'D81AE7C1-2022-4089-B0F9-49903798DEEF', N'保存', 4);
|
||||
END
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
--集团项目现场亮点类型
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Base_ProjectHighlightsSiteType') AND type = N'U')
|
||||
BEGIN
|
||||
CREATE TABLE [dbo].[Base_ProjectHighlightsSiteType](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[MainType] [int] NOT NULL,
|
||||
[MainTypeName] [nvarchar](50) NOT NULL,
|
||||
[SubType] [nvarchar](200) NOT NULL,
|
||||
[Remark] [nvarchar](50) NULL,
|
||||
[CompileMan] [nvarchar](50) NOT NULL,
|
||||
[CompileManName] [nvarchar](50) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
CONSTRAINT [PK_Base_ProjectHighlightsSiteType] 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]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'Id'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'大类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'MainType'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'大类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'MainTypeName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'小类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'SubType'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @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'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'CompileManName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'集团项目现场亮点类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ProjectHighlightsSiteType'
|
||||
END
|
||||
|
||||
GO
|
||||
|
||||
--项目现场亮点照片
|
||||
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'CQMS_ProjectHighlightsSitePic') AND type = N'U')
|
||||
BEGIN
|
||||
CREATE TABLE [dbo].[CQMS_ProjectHighlightsSitePic](
|
||||
[Id] [nvarchar](50) NOT NULL,
|
||||
[ProjectId] [nvarchar](50) NOT NULL,
|
||||
[TypeId] [nvarchar](50) NOT NULL,
|
||||
[MainType] [int] NOT NULL,
|
||||
[MainTypeName] [nvarchar](50) NOT NULL,
|
||||
[SubType] [nvarchar](200) NOT NULL,
|
||||
[Remark] [nvarchar](50) NULL,
|
||||
[Resume] [nvarchar](500) NULL,
|
||||
[PicUrl] [nvarchar](500) NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[CompileManName] [nvarchar](50) NULL,
|
||||
[CompileDate] [datetime] NULL,
|
||||
[IsReport] [bit] NOT NULL,
|
||||
[ReportDate] [datetime] NULL,
|
||||
[ReportMan] [nvarchar](50) NULL,
|
||||
[ReportManName] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_CQMS_ProjectHighlightsSitePic] 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].[CQMS_ProjectHighlightsSitePic] ADD CONSTRAINT [DF_CQMS_ProjectHighlightsSitePic_IsReport] DEFAULT ((0)) FOR [IsReport]
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @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'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'TypeId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'ProjectId'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'大类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'MainType'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'大类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'MainTypeName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'小类' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'SubType'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @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'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'Resume'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'亮点照片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'PicUrl'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'CompileMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'CompileManName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'CompileDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否已上报集团' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'IsReport'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上报时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'ReportDate'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上报人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'ReportMan'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上报人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic', @level2type=N'COLUMN',@level2name=N'ReportManName'
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目现场亮点照片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'CQMS_ProjectHighlightsSitePic'
|
||||
END
|
||||
|
||||
GO
|
||||
|
|
@ -388,6 +388,7 @@
|
|||
<Compile Include="CQMS\ProcessControl\InspectionManagementApproveService.cs" />
|
||||
<Compile Include="CQMS\ProcessControl\NondestructiveTestService.cs" />
|
||||
<Compile Include="CQMS\ProcessControl\TestPackageManagementService.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSiteService.cs" />
|
||||
<Compile Include="CQMS\QualityActivity\QCManage\QCManage_QCGroupRegistrationService.cs" />
|
||||
<Compile Include="CQMS\Solution\CQMSConstructSolutionApproveService.cs" />
|
||||
<Compile Include="CQMS\Solution\CQMSConstructSolutionFinalService.cs" />
|
||||
|
|
|
|||
|
|
@ -0,0 +1,328 @@
|
|||
using FineUIPro;
|
||||
using Microsoft.SqlServer.Dts.Runtime;
|
||||
using Model;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using NPOI.SS.Formula.Functions;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 项目现场亮点照片收集
|
||||
/// </summary>
|
||||
public class ProjectHighlightsSiteService
|
||||
{
|
||||
#region 项目现场亮点类型
|
||||
|
||||
#region 获取集团项目现场亮点类型
|
||||
|
||||
/// <summary>
|
||||
/// 获取项目现场亮点类型
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static Model.ResponeData GetProjectHighlightsSiteTypeFromGroup()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId = CommonService.GetThisUnitId();
|
||||
string baseurl = $"{SysConstSetService.CNCECPath}/api/CQMSData/getProjectHighlightsSiteType?unitId=" + unitId;
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable
|
||||
{
|
||||
{ "token", ServerService.GetToken().Token }
|
||||
};
|
||||
var strJosn = APIGetHttpService.Http(baseurl, "GET", contenttype, newToken, null);
|
||||
if (!string.IsNullOrEmpty(strJosn))
|
||||
{
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
responeData.code = Funs.GetNewIntOrZero(obj["code"].ToString());
|
||||
responeData.message = obj["message"].ToString();
|
||||
if (responeData.code == 1)
|
||||
{
|
||||
JArray getData = JArray.Parse(obj["data"].ToString());
|
||||
if (getData.Count() > 0)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
List<string> ids = new List<string>();
|
||||
foreach (var item in getData)
|
||||
{
|
||||
string Id = item["Id"].ToString();
|
||||
var model = db.Base_ProjectHighlightsSiteType.FirstOrDefault(e => e.Id == Id);
|
||||
if (model == null)
|
||||
{
|
||||
Model.Base_ProjectHighlightsSiteType newModel = new Model.Base_ProjectHighlightsSiteType
|
||||
{
|
||||
Id = item["Id"].ToString(),
|
||||
MainType = int.Parse(item["MainType"].ToString()),
|
||||
MainTypeName = item["MainTypeName"].ToString(),
|
||||
SubType = item["SubType"].ToString(),
|
||||
Remark = item["Remark"].ToString(),
|
||||
CompileMan = item["CompileMan"].ToString(),
|
||||
CompileManName = item["CompileManName"].ToString(),
|
||||
CompileDate = DateTime.Now
|
||||
};
|
||||
db.Base_ProjectHighlightsSiteType.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.MainType = int.Parse(item["MainType"].ToString());
|
||||
model.MainTypeName = item["MainTypeName"].ToString();
|
||||
model.SubType = item["SubType"].ToString();
|
||||
model.Remark = item["Remark"].ToString();
|
||||
model.CompileMan = item["CompileMan"].ToString();
|
||||
model.CompileManName = item["CompileManName"].ToString();
|
||||
model.CompileDate = DateTime.Now;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
responeData.message = "获取成功:项目现场亮点类型" + getData.Count().ToString() + "条";
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("获取集团项目现场亮点类型!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 项目现场亮点类型下拉
|
||||
/// </summary>
|
||||
/// <param name="dropName"></param>
|
||||
/// <param name="isShowPlease"></param>
|
||||
public static void InitProjectHighlightsSiteTypeNameDropDownList(DropDownList dropName, bool isShowPlease)
|
||||
{
|
||||
dropName.DataValueField = "string";
|
||||
dropName.DataTextField = "string";
|
||||
dropName.DataSource = GetProjectHighlightsSiteTypeDropDownList();
|
||||
dropName.DataBind();
|
||||
if (isShowPlease)
|
||||
{
|
||||
Funs.FineUIPleaseSelect(dropName);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目现场亮点类型下拉
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public static List<string> GetProjectHighlightsSiteTypeDropDownList()
|
||||
{
|
||||
return (from x in (from x in Funs.DB.Base_ProjectHighlightsSiteType select new { x.MainType, x.MainTypeName }).Distinct()
|
||||
orderby x.MainType
|
||||
select x.MainTypeName).ToList();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 项目现场亮点照片收集
|
||||
|
||||
/// <summary>
|
||||
/// 项目亮点
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.CQMS_ProjectHighlightsSitePic GetProjectHighlightsSiteById(string Id)
|
||||
{
|
||||
return Funs.DB.CQMS_ProjectHighlightsSitePic.FirstOrDefault(e => e.Id == Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改项目亮点
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
public static void UpdateProjectHighlightsSite(Model.CQMS_ProjectHighlightsSitePic model)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.CQMS_ProjectHighlightsSitePic newModel = db.CQMS_ProjectHighlightsSitePic.FirstOrDefault(e => e.Id == model.Id);
|
||||
if (newModel != null)
|
||||
{
|
||||
newModel.IsReport = false;//维护项目亮点后,状态自动改为未上报
|
||||
newModel.Resume = model.Resume;
|
||||
newModel.PicUrl = model.PicUrl;
|
||||
newModel.CompileMan = model.CompileMan;
|
||||
newModel.CompileManName = model.CompileManName;
|
||||
newModel.CompileDate = model.CompileDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键Id重置项目亮点描述和照片信息
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
public static void ResetProjectHighlightsSitePicById(string Id)
|
||||
{
|
||||
Model.SUBQHSEDB db = Funs.DB;
|
||||
Model.CQMS_ProjectHighlightsSitePic model = db.CQMS_ProjectHighlightsSitePic.FirstOrDefault(e => e.Id == Id);
|
||||
if (model != null)
|
||||
{
|
||||
//删除亮点照片
|
||||
BLL.CommonService.DeleteAttachFileById(Id);
|
||||
model.PicUrl = null;
|
||||
model.IsReport = false;
|
||||
model.Resume = string.Empty;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 更新项目亮点类型
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <returns></returns>
|
||||
public static bool UpdateProjectHighlightsSiteTypeFromGroup(string projectId)
|
||||
{
|
||||
using (Model.SUBQHSEDB db = new Model.SUBQHSEDB(Funs.ConnString))
|
||||
{
|
||||
var lstBaseType = db.Base_ProjectHighlightsSiteType.ToList();
|
||||
var lstProPic = db.CQMS_ProjectHighlightsSitePic.Where(e => e.ProjectId == projectId);
|
||||
|
||||
//var oldProPicList = db.CQMS_ProjectHighlightsSitePic.Where(x=> lstBaseType.Contains());
|
||||
foreach (var item in lstProPic)
|
||||
{
|
||||
if (!lstBaseType.Where(e => e.Id == item.TypeId).Any())
|
||||
{//项目亮点类型不存在集团项目亮点类型库中时,删除冗余数据
|
||||
//删除亮点照片
|
||||
BLL.CommonService.DeleteAttachFileById(item.Id);
|
||||
//删除冗余数据
|
||||
db.CQMS_ProjectHighlightsSitePic.DeleteOnSubmit(item);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
lstProPic = db.CQMS_ProjectHighlightsSitePic.Where(e => e.ProjectId == projectId);
|
||||
foreach (var item in lstBaseType)
|
||||
{
|
||||
var model = lstProPic.FirstOrDefault(e => e.TypeId == item.Id);
|
||||
if (model == null)
|
||||
{
|
||||
Model.CQMS_ProjectHighlightsSitePic newModel = new Model.CQMS_ProjectHighlightsSitePic
|
||||
{
|
||||
Id = SQLHelper.GetNewID(),
|
||||
ProjectId = projectId,
|
||||
TypeId = item.Id,
|
||||
MainType = item.MainType,
|
||||
MainTypeName = item.MainTypeName,
|
||||
SubType = item.SubType,
|
||||
Remark = item.Remark
|
||||
};
|
||||
db.CQMS_ProjectHighlightsSitePic.InsertOnSubmit(newModel);
|
||||
db.SubmitChanges();
|
||||
}
|
||||
else
|
||||
{
|
||||
model.MainType = item.MainType;
|
||||
model.MainTypeName = item.MainTypeName;
|
||||
model.SubType = item.SubType;
|
||||
model.Remark = item.Remark;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 上报项目现场亮点信息到集团
|
||||
|
||||
/// <summary>
|
||||
/// 上报项目现场亮点信息到集团
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
/// <param name="currUser"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.ResponeData ReportProjectHighlightsSiteTypeToGroup(string projectId, Sys_User currUser)
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
var db = Funs.DB;
|
||||
try
|
||||
{
|
||||
var lstPic = (from x in db.CQMS_ProjectHighlightsSitePic
|
||||
//where x.IsReport == false
|
||||
orderby x.MainType, x.SubType
|
||||
select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(projectId))
|
||||
{
|
||||
lstPic = lstPic.Where(x => x.ProjectId == projectId).ToList();
|
||||
}
|
||||
if (lstPic.Any())
|
||||
{
|
||||
var thisUnit = CommonService.GetIsThisUnit();
|
||||
var newItem = new { CollCropCode = thisUnit.CollCropCode, ProjectId = projectId, Items = lstPic };
|
||||
string baseurl = $"{SysConstSetService.CNCECPath}/api/CQMSData/ReportProjectHighlightsSiteTypeToGroup";
|
||||
string contenttype = "application/json;charset=unicode";
|
||||
Hashtable newToken = new Hashtable { { "token", ServerService.GetToken().Token } };
|
||||
var pushContent = JsonConvert.SerializeObject(newItem);
|
||||
var strJosn = APIGetHttpService.Http(baseurl, "Post", contenttype, newToken, pushContent);
|
||||
if (!string.IsNullOrEmpty(strJosn))
|
||||
{//推送成功后,修改数据状态
|
||||
JObject obj = JObject.Parse(strJosn);
|
||||
string code = obj["code"].ToString();
|
||||
string message = obj["message"].ToString();
|
||||
responeData.message = message;
|
||||
if (code == "1")
|
||||
{
|
||||
var ReportDate = DateTime.Now;
|
||||
foreach (var item in lstPic)
|
||||
{
|
||||
Model.CQMS_ProjectHighlightsSitePic model = db.CQMS_ProjectHighlightsSitePic.FirstOrDefault(e => e.Id == item.Id);
|
||||
if (model != null)
|
||||
{
|
||||
model.IsReport = true;
|
||||
model.ReportMan = currUser.UserId;
|
||||
model.ReportManName = currUser.UserName;
|
||||
model.ReportDate = ReportDate;
|
||||
db.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "上报失败,请稍候再试!";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "当前没有未上报数据";
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "上报失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("上报项目现场亮点信息到集团!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -2843,7 +2843,7 @@ namespace BLL
|
|||
/// <summary>
|
||||
/// 项目检查
|
||||
/// </summary>
|
||||
public const string UnitHSSE_HiddenRectificationListMenuId = "87AEFB7C-0900-4B55-A82B-839359EB7403";
|
||||
public const string UnitHSSE_HiddenRectificationListMenuId = "976F859C-BE8C-4A88-8117-C6A971872135";
|
||||
/// <summary>
|
||||
/// 日常巡检
|
||||
/// </summary>
|
||||
|
|
@ -6767,5 +6767,20 @@ namespace BLL
|
|||
/// 图纸会审记录导入模板文件原始虚拟路径
|
||||
/// </summary>
|
||||
public const string ReviewDrawingsTemplateUrl = "File\\Excel\\DataIn\\图纸会审管理导入模板.xls";
|
||||
|
||||
|
||||
#region 项目现场亮点照片
|
||||
|
||||
/// <summary>
|
||||
/// 项目现场亮点照片
|
||||
/// </summary>
|
||||
public const string ProjectHighlightsSitePicMenuId = "D81AE7C1-2022-4089-B0F9-49903798DEEF";
|
||||
/// <summary>
|
||||
/// 公司级项目现场亮点照片
|
||||
/// </summary>
|
||||
public const string ProjectHighlightsSitePicReportMenuId = "38177E89-4BA8-4D66-AFB9-93644DFE7451";
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,162 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectHighlightsSitePic.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProjectHighlightsSite.ProjectHighlightsSitePic" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>项目现场亮点照片</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../res/css/viewer.min.css" rel="stylesheet" />
|
||||
<script src="../../res/js/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script src="../../res/js/viewer.min.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.customlabel span {
|
||||
margin-left: 140px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.imgPreview {
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%; /*容器占满整个屏幕*/
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.imgPreview img {
|
||||
z-index: 100;
|
||||
width: 60%;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
/*添加鼠标移入图片效果*/
|
||||
.img {
|
||||
cursor: url("ico/放大镜.png"), auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="项目现场亮点照片" ShowHeader="false" Layout="HBox">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="项目现场亮点照片" ShowHeader="false" EnableCollapse="true" PageSize="100000" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="false" IsDatabasePaging="false" runat="server" EnableColumnLines="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
DataKeyNames="Id" DataIDField="Id" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelAlign="Right" Label="大类" ID="drpMainType" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpReport" runat="server" Label="上报" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged" LabelWidth="80px" Width="200px">
|
||||
<f:ListItem Text="-请选择-" Value="" />
|
||||
<f:ListItem Text="已上报" Value="1" />
|
||||
<f:ListItem Text="未上报" Value="0" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpUploadPic" runat="server" Label="亮点照片" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged" LabelWidth="80px" Width="200px">
|
||||
<f:ListItem Text="-请选择-" Value="" />
|
||||
<f:ListItem Text="已上传" Value="1" />
|
||||
<f:ListItem Text="未上传" Value="0" Selected="true" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Label ID="Label3" runat="server" Text="双击或者选中数据行,鼠标右键维护项目现场亮点信息" CssClass="customlabel"></f:Label>
|
||||
<%--<f:Button ID="btnGet" Text="获取" ToolTip="从集团获取项目现场亮点类型" Icon="FolderPage" runat="server" OnClick="btnGet_Click">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="120px" ColumnID="MainTypeName" DataField="MainTypeName" FieldType="String"
|
||||
HeaderText="大类" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="SubType" DataField="SubType" FieldType="String"
|
||||
HeaderText="小类" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfImageUrl1" MinWidth="120px" HeaderText="亮点照片" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl1" runat="server" Text='<%# ConvertImageUrlByImage(Eval("PicUrl")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField Width="320px" ColumnID="Resume" DataField="Resume" FieldType="String"
|
||||
HeaderText="亮点描述" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="成果" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="680px" Height="520px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="维护亮点" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除亮点信息" ConfirmText="确定删除亮点信息?"
|
||||
OnClick="btnMenuDel_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<div class="imgPreview">
|
||||
<img src="#" alt="" id="imgPreview" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
var imgID = '<%=Grid1.ClientID %>';
|
||||
function showImg() {
|
||||
var $wrap = $("#" + imgID)
|
||||
console.log($wrap)
|
||||
$wrap.find('img').on('click', function () {
|
||||
var src = $(this).attr('src');
|
||||
console.log(src)
|
||||
if (src.indexOf("/res/icon") != -1) {
|
||||
return;
|
||||
}
|
||||
var div = document.createElement('div');
|
||||
div.style.display = 'none';
|
||||
div.innerHTML = '<img src="' + src + '">'; // 创建一个包含图片的 div 元素
|
||||
document.body.appendChild(div); // 将 div 元素添加到页面中
|
||||
|
||||
var viewer = new Viewer(div.firstChild); // 创建 Viewer 实例并传入图片元素
|
||||
viewer.show(); // 显示图片预览
|
||||
|
||||
// 在 Viewer 关闭后移除添加的 div 元素
|
||||
viewer.on('hidden', function () {
|
||||
document.body.removeChild(div);
|
||||
});
|
||||
|
||||
});
|
||||
$('.imgPreview').on('click', function () {
|
||||
// $('.imgPreview').hide()
|
||||
});
|
||||
}
|
||||
F.ready(function () {
|
||||
showImg();
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,292 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
public partial class ProjectHighlightsSitePic : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
UpdateProjectHighlightsSiteType();
|
||||
BLL.ProjectHighlightsSiteService.InitProjectHighlightsSiteTypeNameDropDownList(this.drpMainType, true);
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var q = (from x in Funs.DB.CQMS_ProjectHighlightsSitePic where x.ProjectId == this.ProjectId orderby x.MainType, x.SubType select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpReport.SelectedValue) && this.drpReport.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => x.IsReport == (this.drpReport.SelectedValue == "1")).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpUploadPic.SelectedValue) && this.drpUploadPic.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => string.IsNullOrWhiteSpace(x.PicUrl) == (this.drpUploadPic.SelectedValue == "0")).ToList();
|
||||
}
|
||||
Grid1.RecordCount = q.Count();
|
||||
// 2.获取当前分页数据
|
||||
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
PageContext.RegisterStartupScript("showImg();");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目亮点照片(放于Img中)
|
||||
/// </summary>
|
||||
/// <param name="picUrl"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertImageUrlByImage(object picUrl)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (picUrl != null && !string.IsNullOrWhiteSpace(picUrl.ToString()))
|
||||
{
|
||||
string httpUrl = string.Empty;
|
||||
var sysSet6 = (from x in Funs.DB.Sys_Set where x.SetName == "程序访问地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet6 != null)
|
||||
{
|
||||
httpUrl = sysSet6.SetValue;
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, picUrl.ToString());
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Model.CQMS_ProjectHighlightsSitePic> GetPagedDataTable(int pageIndex, int pageSize)
|
||||
{
|
||||
List<Model.CQMS_ProjectHighlightsSitePic> source = (from x in Funs.DB.CQMS_ProjectHighlightsSitePic where x.ProjectId == this.ProjectId orderby x.MainType, x.SubType select x).ToList();
|
||||
List<Model.CQMS_ProjectHighlightsSitePic> paged = new List<Model.CQMS_ProjectHighlightsSitePic>();
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpReport.SelectedValue) && this.drpReport.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => x.IsReport == (this.drpReport.SelectedValue == "1")).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpUploadPic.SelectedValue) && this.drpUploadPic.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => string.IsNullOrWhiteSpace(x.PicUrl) == (this.drpUploadPic.SelectedValue == "0")).ToList();
|
||||
}
|
||||
int rowbegin = pageIndex * pageSize;
|
||||
int rowend = (pageIndex + 1) * pageSize;
|
||||
if (rowend > source.Count())
|
||||
{
|
||||
rowend = source.Count();
|
||||
}
|
||||
|
||||
for (int i = rowbegin; i < rowend; i++)
|
||||
{
|
||||
paged.Add(source[i]);
|
||||
}
|
||||
|
||||
return paged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口关闭后刷新界面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 双击维护项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
ProjectHighlightsSiteService.ResetProjectHighlightsSitePicById(rowID);
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护项目亮点
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length != 1)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.btnMenuModify.Hidden)////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
Alert.ShowInTop("抱歉,您无权维护亮点!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectHighlightsSitePicView.aspx?Id={0}", Grid1.SelectedRowID), "查看项目亮点"));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectHighlightsSitePicEdit.aspx?Id={0}", Grid1.SelectedRowID), "维护项目亮点"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 大类下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpMainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 更新项目亮点类型
|
||||
/// </summary>
|
||||
protected void UpdateProjectHighlightsSiteType()
|
||||
{
|
||||
var returnValue = ProjectHighlightsSiteService.UpdateProjectHighlightsSiteTypeFromGroup(this.ProjectId);
|
||||
if (returnValue)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("更新项目亮点类型失败", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.ProjectId, this.CurrUser.UserId, BLL.Const.ProjectHighlightsSitePicMenuId);
|
||||
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
|
||||
|
||||
}
|
||||
}
|
||||
143
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePic.aspx.designer.cs
generated
Normal file
143
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePic.aspx.designer.cs
generated
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectHighlightsSitePic
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpMainType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMainType;
|
||||
|
||||
/// <summary>
|
||||
/// drpReport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpReport;
|
||||
|
||||
/// <summary>
|
||||
/// drpUploadPic 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUploadPic;
|
||||
|
||||
/// <summary>
|
||||
/// Label3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label Label3;
|
||||
|
||||
/// <summary>
|
||||
/// lbImageUrl1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbImageUrl1;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,67 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectHighlightsSitePicEdit.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProjectHighlightsSite.ProjectHighlightsSitePicEdit" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>维护项目亮点</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<script src="../../Controls/My97DatePicker/WdatePicker.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.labcenter {
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" />
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
|
||||
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextBox ID="txtMainTypeName" runat="server" Label="大类" Readonly="true" LabelWidth="100px">
|
||||
</f:TextBox>
|
||||
<f:TextBox ID="txtSubType" runat="server" Label="小类" Readonly="true">
|
||||
</f:TextBox>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:TextArea ID="txtResume" runat="server" Label="亮点简述" LabelWidth="100px" EmptyText="请输入亮点简要叙述(不少于5个字,不超过150字)" ShowRedStar="true" Required="true" LabelAlign="Right" MinLength="5" MaxLength="150" Height="180px">
|
||||
</f:TextArea>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Label runat="server" ID="lbTemp">
|
||||
</f:Label>
|
||||
<f:Button ID="imgBtnFile" Text="亮点照片" ToolTip="上传及查看" Icon="TableCell" runat="server" OnClick="imgBtnFile_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill ID="ToolbarFill1" runat="server">
|
||||
</f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" OnClick="btnSave_Click" runat="server" ToolTip="保存" Text="保存" ValidateForms="SimpleForm1">
|
||||
</f:Button>
|
||||
<f:HiddenField ID="hdId" runat="server">
|
||||
</f:HiddenField>
|
||||
<f:HiddenField ID="hdAttachUrl" runat="server">
|
||||
</f:HiddenField>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" OnClose="WindowAtt_Close" runat="server" IsModal="true" Width="700px"
|
||||
Height="550px">
|
||||
</f:Window>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
public partial class ProjectHighlightsSitePicEdit : PageBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["Id"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["Id"] = value;
|
||||
}
|
||||
}
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.Id = Request.Params["Id"];
|
||||
if (!string.IsNullOrEmpty(Id))
|
||||
{
|
||||
Model.CQMS_ProjectHighlightsSitePic model = BLL.ProjectHighlightsSiteService.GetProjectHighlightsSiteById(Id);
|
||||
this.txtMainTypeName.Text = model.MainTypeName;
|
||||
this.txtSubType.Text = model.SubType;
|
||||
this.txtResume.Text = model.Resume;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void WindowAtt_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected void imgBtnFile_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=1&toKeyId={0}&path=FileUpload/CQMS/ProjectHighlightsSite&menuId={1}", this.Id, BLL.Const.ProjectHighlightsSitePicMenuId)));
|
||||
}
|
||||
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
SaveDate();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
public void SaveDate()
|
||||
{
|
||||
Model.CQMS_ProjectHighlightsSitePic model = new Model.CQMS_ProjectHighlightsSitePic();
|
||||
model.Id = this.Id;
|
||||
model.Resume = this.txtResume.Text.Trim();
|
||||
model.CompileMan = this.CurrUser.UserId;
|
||||
model.CompileManName = this.CurrUser.UserName;
|
||||
model.CompileDate = DateTime.Now;
|
||||
var attachFile = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.Id);
|
||||
if (attachFile != null)
|
||||
{
|
||||
model.PicUrl = attachFile.AttachUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请上传项目亮点照片", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
ProjectHighlightsSiteService.UpdateProjectHighlightsSite(model);
|
||||
LogService.AddSys_Log(CurrUser, $"{model.MainTypeName}-{model.SubType}", model.Id, Const.ProjectHighlightsSitePicMenuId, "维护项目亮点");
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
}
|
||||
143
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePicEdit.aspx.designer.cs
generated
Normal file
143
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePicEdit.aspx.designer.cs
generated
Normal file
|
|
@ -0,0 +1,143 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectHighlightsSitePicEdit
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// txtMainTypeName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtMainTypeName;
|
||||
|
||||
/// <summary>
|
||||
/// txtSubType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextBox txtSubType;
|
||||
|
||||
/// <summary>
|
||||
/// txtResume 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtResume;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// lbTemp 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbTemp;
|
||||
|
||||
/// <summary>
|
||||
/// imgBtnFile 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button imgBtnFile;
|
||||
|
||||
/// <summary>
|
||||
/// ToolbarFill1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ToolbarFill ToolbarFill1;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// hdId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdId;
|
||||
|
||||
/// <summary>
|
||||
/// hdAttachUrl 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.HiddenField hdAttachUrl;
|
||||
|
||||
/// <summary>
|
||||
/// WindowAtt 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window WindowAtt;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectHighlightsSitePicReport.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProjectHighlightsSite.ProjectHighlightsSitePicReport" %>
|
||||
|
||||
<%@ Register Src="~/Controls/UnitProjectTControl.ascx" TagName="UnitProjectTControl" TagPrefix="uc1" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>项目现场亮点照片</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<link href="../../res/css/viewer.min.css" rel="stylesheet" />
|
||||
<script src="../../res/js/jquery-3.4.1.min.js" type="text/javascript"></script>
|
||||
<script src="../../res/js/viewer.min.js" type="text/javascript"></script>
|
||||
<style type="text/css">
|
||||
.customlabel span {
|
||||
margin-left: 140px;
|
||||
color: red;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.f-grid-row .f-grid-cell-inner {
|
||||
white-space: normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.imgPreview {
|
||||
display: none;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%; /*容器占满整个屏幕*/
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.imgPreview img {
|
||||
z-index: 100;
|
||||
width: 60%;
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
}
|
||||
/*添加鼠标移入图片效果*/
|
||||
.img {
|
||||
cursor: url("ico/放大镜.png"), auto;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" ShowBorder="false" ShowHeader="false" Layout="Region">
|
||||
<Items>
|
||||
<f:Panel runat="server" ID="panelLeftRegion" RegionPosition="Left" RegionSplit="true"
|
||||
EnableCollapse="true" Width="380" Title="公司-项目" TitleToolTip="公司-项目" ShowBorder="true"
|
||||
ShowHeader="true" AutoScroll="true" BodyPadding="5px" IconFont="ArrowCircleLeft" Layout="Fit">
|
||||
<Items>
|
||||
<f:ContentPanel ID="ContentPanel1" runat="server" ShowHeader="false" EnableCollapse="true" AutoScroll="true"
|
||||
BodyPadding="0px">
|
||||
<uc1:UnitProjectTControl ID="ucTree" runat="server" Onchange="changeTree" />
|
||||
</f:ContentPanel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Panel runat="server" ID="panelCenterRegion" RegionPosition="Center" ShowBorder="true"
|
||||
Layout="VBox" ShowHeader="false" BodyPadding="5px" IconFont="PlusCircle" AutoScroll="true">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="项目现场亮点照片" ShowHeader="false" EnableCollapse="true" PageSize="100000" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="false" IsDatabasePaging="false" runat="server" EnableColumnLines="true" EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick"
|
||||
DataKeyNames="Id" DataIDField="Id" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelAlign="Right" Label="大类" ID="drpMainType" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpReport" runat="server" Label="上报" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged" LabelWidth="80px" Width="200px">
|
||||
<f:ListItem Text="-请选择-" Value="" />
|
||||
<f:ListItem Text="已上报" Value="1" />
|
||||
<f:ListItem Text="未上报" Value="0" />
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpUploadPic" runat="server" Label="亮点照片" LabelAlign="Right" EnableEdit="true" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged" LabelWidth="80px" Width="200px">
|
||||
<f:ListItem Text="-请选择-" Value="" />
|
||||
<f:ListItem Text="已上传" Value="1" />
|
||||
<f:ListItem Text="未上传" Value="0" Selected="true" />
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnReportPro" Text="上报当前项目" ToolTip="上报当前项目现场亮点信息" Icon="FolderPage" runat="server" OnClick="btnReportPro_Click" Hidden="true"></f:Button>
|
||||
<f:Button ID="btnReport" Text="上报所有项目" ToolTip="上报所有项目现场亮点信息" Icon="FolderPage" runat="server" OnClick="btnReport_Click" Hidden="true"></f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="120px" ColumnID="MainTypeName" DataField="MainTypeName" FieldType="String"
|
||||
HeaderText="大类" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="180px" ColumnID="SubType" DataField="SubType" FieldType="String"
|
||||
HeaderText="小类" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:TemplateField ColumnID="tfImageUrl1" MinWidth="120px" HeaderText="亮点照片" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbImageUrl1" runat="server" Text='<%# ConvertImageUrlByImage(Eval("PicUrl")) %>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</f:TemplateField>
|
||||
<f:RenderField MinWidth="320px" ColumnID="Resume" DataField="Resume" FieldType="String"
|
||||
HeaderText="亮点描述" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
<f:Window ID="Window1" Title="成果" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
|
||||
Width="680px" Height="520px">
|
||||
</f:Window>
|
||||
<f:Menu ID="Menu1" runat="server">
|
||||
<Items>
|
||||
<f:MenuButton ID="btnMenuModify" EnablePostBack="true" runat="server" Text="维护亮点" Icon="Pencil" OnClick="btnMenuModify_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除亮点信息" ConfirmText="确定删除亮点信息?"
|
||||
OnClick="btnMenuDel_Click" Hidden="true">
|
||||
</f:MenuButton>
|
||||
</Items>
|
||||
</f:Menu>
|
||||
</form>
|
||||
<div class="imgPreview">
|
||||
<img src="#" alt="" id="imgPreview" />
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var menuID = '<%= Menu1.ClientID %>';
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
var imgID = '<%=Grid1.ClientID %>';
|
||||
function showImg() {
|
||||
var $wrap = $("#" + imgID)
|
||||
console.log($wrap)
|
||||
$wrap.find('img').on('click', function () {
|
||||
var src = $(this).attr('src');
|
||||
console.log(src)
|
||||
if (src.indexOf("/res/icon") != -1) {
|
||||
return;
|
||||
}
|
||||
var div = document.createElement('div');
|
||||
div.style.display = 'none';
|
||||
div.innerHTML = '<img src="' + src + '">'; // 创建一个包含图片的 div 元素
|
||||
document.body.appendChild(div); // 将 div 元素添加到页面中
|
||||
|
||||
var viewer = new Viewer(div.firstChild); // 创建 Viewer 实例并传入图片元素
|
||||
viewer.show(); // 显示图片预览
|
||||
|
||||
// 在 Viewer 关闭后移除添加的 div 元素
|
||||
viewer.on('hidden', function () {
|
||||
document.body.removeChild(div);
|
||||
});
|
||||
|
||||
});
|
||||
$('.imgPreview').on('click', function () {
|
||||
// $('.imgPreview').hide()
|
||||
});
|
||||
}
|
||||
F.ready(function () {
|
||||
showImg();
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,362 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
public partial class ProjectHighlightsSitePicReport : PageBase
|
||||
{
|
||||
#region 定义项
|
||||
|
||||
/// <summary>
|
||||
/// 项目id
|
||||
/// </summary>
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ProjectId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ProjectId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.ProjectId = this.CurrUser.LoginProjectId;
|
||||
if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId)
|
||||
{
|
||||
this.ProjectId = Request.Params["projectId"];
|
||||
}
|
||||
|
||||
this.ucTree.UnitId = this.CurrUser.UnitId;
|
||||
this.ucTree.ProjectId = this.ProjectId;
|
||||
//if (!string.IsNullOrEmpty(this.ProjectId))
|
||||
//{
|
||||
// this.panelLeftRegion.Hidden = true;
|
||||
//}
|
||||
////权限按钮方法
|
||||
this.GetButtonPower();
|
||||
//UpdateProjectHighlightsSiteType();
|
||||
BLL.ProjectHighlightsSiteService.InitProjectHighlightsSiteTypeNameDropDownList(this.drpMainType, true);
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 公司级树加载
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void changeTree(object sender, EventArgs e)
|
||||
{
|
||||
this.ProjectId = this.ucTree.ProjectId;
|
||||
//this.InitDropDownList();
|
||||
this.GetButtonPower();
|
||||
//if (string.IsNullOrEmpty(this.CurrUser.LoginProjectId))
|
||||
//{
|
||||
// btnNew.Hidden = true;
|
||||
//}
|
||||
this.BindGrid();
|
||||
}
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
//var q = (from x in Funs.DB.CQMS_ProjectHighlightsSitePic where x.ProjectId == this.ProjectId orderby x.MainType, x.SubType select x).ToList();
|
||||
var q = (from x in Funs.DB.CQMS_ProjectHighlightsSitePic orderby x.MainType, x.SubType select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
q = q.Where(x => x.ProjectId == this.ProjectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpReport.SelectedValue) && this.drpReport.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => x.IsReport == (this.drpReport.SelectedValue == "1")).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpUploadPic.SelectedValue) && this.drpUploadPic.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => string.IsNullOrWhiteSpace(x.PicUrl) == (this.drpUploadPic.SelectedValue == "0")).ToList();
|
||||
}
|
||||
Grid1.RecordCount = q.Count();
|
||||
// 2.获取当前分页数据
|
||||
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
PageContext.RegisterStartupScript("showImg();");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 项目亮点照片(放于Img中)
|
||||
/// </summary>
|
||||
/// <param name="picUrl"></param>
|
||||
/// <returns></returns>
|
||||
protected string ConvertImageUrlByImage(object picUrl)
|
||||
{
|
||||
string url = string.Empty;
|
||||
if (picUrl != null && !string.IsNullOrWhiteSpace(picUrl.ToString()))
|
||||
{
|
||||
string httpUrl = string.Empty;
|
||||
var sysSet6 = (from x in Funs.DB.Sys_Set where x.SetName == "程序访问地址" select x).ToList().FirstOrDefault();
|
||||
if (sysSet6 != null)
|
||||
{
|
||||
httpUrl = sysSet6.SetValue;
|
||||
}
|
||||
url = BLL.UploadAttachmentService.ShowImage(httpUrl, picUrl.ToString());
|
||||
}
|
||||
return url;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Model.CQMS_ProjectHighlightsSitePic> GetPagedDataTable(int pageIndex, int pageSize)
|
||||
{
|
||||
List<Model.CQMS_ProjectHighlightsSitePic> source = (from x in Funs.DB.CQMS_ProjectHighlightsSitePic orderby x.MainType, x.SubType select x).ToList();
|
||||
List<Model.CQMS_ProjectHighlightsSitePic> paged = new List<Model.CQMS_ProjectHighlightsSitePic>();
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
source = source.Where(x => x.ProjectId == this.ProjectId).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpReport.SelectedValue) && this.drpReport.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => x.IsReport == (this.drpReport.SelectedValue == "1")).ToList();
|
||||
}
|
||||
if (!string.IsNullOrWhiteSpace(this.drpUploadPic.SelectedValue) && this.drpUploadPic.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => string.IsNullOrWhiteSpace(x.PicUrl) == (this.drpUploadPic.SelectedValue == "0")).ToList();
|
||||
}
|
||||
int rowbegin = pageIndex * pageSize;
|
||||
int rowend = (pageIndex + 1) * pageSize;
|
||||
if (rowend > source.Count())
|
||||
{
|
||||
rowend = source.Count();
|
||||
}
|
||||
|
||||
for (int i = rowbegin; i < rowend; i++)
|
||||
{
|
||||
paged.Add(source[i]);
|
||||
}
|
||||
|
||||
return paged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 窗口关闭后刷新界面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnMenuModify_Click(object sender, EventArgs e)
|
||||
{
|
||||
EditData();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 双击维护项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
|
||||
{
|
||||
btnMenuModify_Click(sender, e);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 删除项目亮点
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
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();
|
||||
ProjectHighlightsSiteService.ResetProjectHighlightsSitePicById(rowID);
|
||||
}
|
||||
|
||||
BindGrid();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 维护项目亮点
|
||||
/// </summary>
|
||||
private void EditData()
|
||||
{
|
||||
if (Grid1.SelectedRowIndexArray.Length != 1)
|
||||
{
|
||||
Alert.ShowInTop("请选择一条记录", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
if (this.btnMenuModify.Hidden)////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面
|
||||
{
|
||||
Alert.ShowInTop("抱歉,您无权维护亮点!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectHighlightsSitePicView.aspx?Id={0}", Grid1.SelectedRowID), "查看项目亮点"));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectHighlightsSitePicEdit.aspx?Id={0}", Grid1.SelectedRowID), "维护项目亮点"));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 大类下拉触发事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpMainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 上报当前项目
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReportPro_Click(object sender, EventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrWhiteSpace(this.ProjectId))
|
||||
{
|
||||
//var report = ProjectHighlightsSiteService.ReportProjectHighlightsSiteTypeToGroup(this.ProjectId, this.CurrUser);
|
||||
Report(this.ProjectId);
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("请选择上报项目!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报所有项目
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnReport_Click(object sender, EventArgs e)
|
||||
{
|
||||
//ProjectHighlightsSiteService.ReportProjectHighlightsSiteTypeToGroup("", this.CurrUser);
|
||||
Report("");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报集团
|
||||
/// </summary>
|
||||
/// <param name="projectId"></param>
|
||||
private void Report(string projectId)
|
||||
{
|
||||
var report = ProjectHighlightsSiteService.ReportProjectHighlightsSiteTypeToGroup(projectId, this.CurrUser);
|
||||
if (report.code == 1)
|
||||
{
|
||||
ShowNotify($"上报成功:{report.message}!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent($"上报失败:{report.message}!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#region 获取按钮权限
|
||||
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
if (Request.Params["value"] == "0")
|
||||
{
|
||||
return;
|
||||
}
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(null, this.CurrUser.UserId, BLL.Const.ProjectHighlightsSitePicReportMenuId);
|
||||
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;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnSaveUp))
|
||||
{
|
||||
this.btnReport.Hidden = false;
|
||||
this.btnReportPro.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
}
|
||||
}
|
||||
188
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePicReport.aspx.designer.cs
generated
Normal file
188
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSitePicReport.aspx.designer.cs
generated
Normal file
|
|
@ -0,0 +1,188 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectHighlightsSitePicReport
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// panelLeftRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelLeftRegion;
|
||||
|
||||
/// <summary>
|
||||
/// ContentPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.ContentPanel ContentPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// ucTree 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Web.Controls.UnitProjectTControl ucTree;
|
||||
|
||||
/// <summary>
|
||||
/// panelCenterRegion 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel panelCenterRegion;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpMainType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMainType;
|
||||
|
||||
/// <summary>
|
||||
/// drpReport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpReport;
|
||||
|
||||
/// <summary>
|
||||
/// drpUploadPic 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUploadPic;
|
||||
|
||||
/// <summary>
|
||||
/// btnReportPro 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnReportPro;
|
||||
|
||||
/// <summary>
|
||||
/// btnReport 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnReport;
|
||||
|
||||
/// <summary>
|
||||
/// lbImageUrl1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.WebControls.Label lbImageUrl1;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Menu1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Menu Menu1;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuModify 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuModify;
|
||||
|
||||
/// <summary>
|
||||
/// btnMenuDel 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.MenuButton btnMenuDel;
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,56 @@
|
|||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectHighlightsSiteType.aspx.cs" Inherits="FineUIPro.Web.CQMS.ProjectHighlightsSite.ProjectHighlightsSiteType" %>
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<title>集团项目现场亮点类型</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
|
||||
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" Title="集团项目现场亮点类型" ShowHeader="false" Layout="HBox">
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" Title="集团项目现场亮点类型" ShowHeader="false" EnableCollapse="true" PageSize="100000" ForceFit="true"
|
||||
ShowBorder="true" AllowPaging="false" IsDatabasePaging="false" runat="server" EnableColumnLines="true"
|
||||
DataKeyNames="Id" DataIDField="Id" OnPageIndexChange="Grid1_PageIndexChange" AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar2" Position="Top" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList runat="server" EnableSimulateTree="True" LabelAlign="Right" Label="大类" ID="drpMainType" AutoPostBack="true" OnSelectedIndexChanged="drpMainType_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnGet" Text="获取" ToolTip="从集团获取项目现场亮点类型" Icon="FolderPage" runat="server" OnClick="btnGet_Click">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Columns>
|
||||
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
|
||||
<f:RenderField Width="200px" ColumnID="MainTypeName" DataField="MainTypeName" FieldType="String"
|
||||
HeaderText="大类" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="SubType" DataField="SubType" FieldType="String"
|
||||
HeaderText="小类" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="300px" ColumnID="Remark" DataField="Remark" FieldType="String"
|
||||
HeaderText="备注" HeaderTextAlign="Center" TextAlign="Left" ExpandUnusedSpace="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Panel>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
// 返回false,来阻止浏览器右键菜单
|
||||
function onRowContextMenu(event, rowId) {
|
||||
F(menuID).show(); //showAt(event.pageX, event.pageY);
|
||||
return false;
|
||||
}
|
||||
function reloadGrid() {
|
||||
__doPostBack(null, 'reloadGrid');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -0,0 +1,132 @@
|
|||
using BLL;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
public partial class ProjectHighlightsSiteType : PageBase
|
||||
{
|
||||
#region 加载
|
||||
/// <summary>
|
||||
/// 加载页面
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
// 绑定表格
|
||||
BindGrid();
|
||||
GetProjectHighlightsSiteType();
|
||||
|
||||
BLL.ProjectHighlightsSiteService.InitProjectHighlightsSiteTypeNameDropDownList(this.drpMainType, true);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 绑定数据
|
||||
/// </summary>
|
||||
private void BindGrid()
|
||||
{
|
||||
var q = (from x in Funs.DB.Base_ProjectHighlightsSiteType orderby x.MainType, x.SubType select x).ToList();
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
q = q.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
Grid1.RecordCount = q.Count();
|
||||
// 2.获取当前分页数据
|
||||
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
private List<Model.Base_ProjectHighlightsSiteType> GetPagedDataTable(int pageIndex, int pageSize)
|
||||
{
|
||||
List<Model.Base_ProjectHighlightsSiteType> source = (from x in Funs.DB.Base_ProjectHighlightsSiteType orderby x.MainType, x.SubType select x).ToList();
|
||||
List<Model.Base_ProjectHighlightsSiteType> paged = new List<Model.Base_ProjectHighlightsSiteType>();
|
||||
if (!string.IsNullOrWhiteSpace(this.drpMainType.SelectedValue) && this.drpMainType.SelectedValue != Const._Null)
|
||||
{
|
||||
source = source.Where(x => x.MainTypeName == this.drpMainType.SelectedValue).ToList();
|
||||
}
|
||||
int rowbegin = pageIndex * pageSize;
|
||||
int rowend = (pageIndex + 1) * pageSize;
|
||||
if (rowend > source.Count())
|
||||
{
|
||||
rowend = source.Count();
|
||||
}
|
||||
|
||||
for (int i = rowbegin; i < rowend; i++)
|
||||
{
|
||||
paged.Add(source[i]);
|
||||
}
|
||||
|
||||
return paged;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpMainType_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 改变索引事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 过滤表头
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid();
|
||||
}
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 从集团获取
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
GetProjectHighlightsSiteType();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 从集团获取项目现场亮点类型
|
||||
/// </summary>
|
||||
protected void GetProjectHighlightsSiteType()
|
||||
{
|
||||
var returnValue = ProjectHighlightsSiteService.GetProjectHighlightsSiteTypeFromGroup();
|
||||
if (returnValue.code == 1)
|
||||
{
|
||||
ShowNotify(returnValue.message, MessageBoxIcon.Success);
|
||||
BindGrid();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(returnValue.message, MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
80
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSiteType.aspx.designer.cs
generated
Normal file
80
SUBQHSE/FineUIPro.Web/CQMS/ProjectHighlightsSite/ProjectHighlightsSiteType.aspx.designer.cs
generated
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.CQMS.ProjectHighlightsSite
|
||||
{
|
||||
|
||||
|
||||
public partial class ProjectHighlightsSiteType
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// Panel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Panel Panel1;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar2;
|
||||
|
||||
/// <summary>
|
||||
/// drpMainType 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpMainType;
|
||||
|
||||
/// <summary>
|
||||
/// btnGet 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnGet;
|
||||
}
|
||||
}
|
||||
|
|
@ -492,6 +492,10 @@
|
|||
<Content Include="CQMS\ProcessControl\InspectionNotice.aspx" />
|
||||
<Content Include="CQMS\ProcessControl\InspectionNoticeEdit.aspx" />
|
||||
<Content Include="CQMS\ProcessControl\ShowUnitWork.aspx" />
|
||||
<Content Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePic.aspx" />
|
||||
<Content Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicEdit.aspx" />
|
||||
<Content Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicReport.aspx" />
|
||||
<Content Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSiteType.aspx" />
|
||||
<Content Include="CQMS\QualityActivity\QCManage\QCGroupRegistration.aspx" />
|
||||
<Content Include="CQMS\QualityActivity\QCManage\QCGroupRegistrationEdit.aspx" />
|
||||
<Content Include="CQMS\QualityActivity\QCManage\QCGroupRegistrationView.aspx" />
|
||||
|
|
@ -8136,6 +8140,14 @@
|
|||
<Compile Include="CQMS\ProcessControl\ShowUnitWork.aspx.designer.cs">
|
||||
<DependentUpon>ShowUnitWork.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePic.aspx.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePic.aspx.designer.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicEdit.aspx.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicEdit.aspx.designer.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicReport.aspx.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSitePicReport.aspx.designer.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSiteType.aspx.cs" />
|
||||
<Compile Include="CQMS\ProjectHighlightsSite\ProjectHighlightsSiteType.aspx.designer.cs" />
|
||||
<Compile Include="CQMS\QualityActivity\QCManage\QCGroupRegistration.aspx.cs">
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
|
|
|
|||
|
|
@ -191,6 +191,9 @@ namespace Model
|
|||
partial void InsertBase_Project(Base_Project instance);
|
||||
partial void UpdateBase_Project(Base_Project instance);
|
||||
partial void DeleteBase_Project(Base_Project instance);
|
||||
partial void InsertBase_ProjectHighlightsSiteType(Base_ProjectHighlightsSiteType instance);
|
||||
partial void UpdateBase_ProjectHighlightsSiteType(Base_ProjectHighlightsSiteType instance);
|
||||
partial void DeleteBase_ProjectHighlightsSiteType(Base_ProjectHighlightsSiteType instance);
|
||||
partial void InsertBase_ProjectSate(Base_ProjectSate instance);
|
||||
partial void UpdateBase_ProjectSate(Base_ProjectSate instance);
|
||||
partial void DeleteBase_ProjectSate(Base_ProjectSate instance);
|
||||
|
|
@ -776,6 +779,9 @@ namespace Model
|
|||
partial void InsertCQMS_Law_ConstructionStandardListProject(CQMS_Law_ConstructionStandardListProject instance);
|
||||
partial void UpdateCQMS_Law_ConstructionStandardListProject(CQMS_Law_ConstructionStandardListProject instance);
|
||||
partial void DeleteCQMS_Law_ConstructionStandardListProject(CQMS_Law_ConstructionStandardListProject instance);
|
||||
partial void InsertCQMS_ProjectHighlightsSitePic(CQMS_ProjectHighlightsSitePic instance);
|
||||
partial void UpdateCQMS_ProjectHighlightsSitePic(CQMS_ProjectHighlightsSitePic instance);
|
||||
partial void DeleteCQMS_ProjectHighlightsSitePic(CQMS_ProjectHighlightsSitePic instance);
|
||||
partial void InsertCQMS_Statement(CQMS_Statement instance);
|
||||
partial void UpdateCQMS_Statement(CQMS_Statement instance);
|
||||
partial void DeleteCQMS_Statement(CQMS_Statement instance);
|
||||
|
|
@ -3445,6 +3451,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Base_ProjectHighlightsSiteType> Base_ProjectHighlightsSiteType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<Base_ProjectHighlightsSiteType>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<Base_ProjectSate> Base_ProjectSate
|
||||
{
|
||||
get
|
||||
|
|
@ -5005,6 +5019,14 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<CQMS_ProjectHighlightsSitePic> CQMS_ProjectHighlightsSitePic
|
||||
{
|
||||
get
|
||||
{
|
||||
return this.GetTable<CQMS_ProjectHighlightsSitePic>();
|
||||
}
|
||||
}
|
||||
|
||||
public System.Data.Linq.Table<CQMS_Statement> CQMS_Statement
|
||||
{
|
||||
get
|
||||
|
|
@ -38116,6 +38138,236 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_ProjectHighlightsSiteType")]
|
||||
public partial class Base_ProjectHighlightsSiteType : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _Id;
|
||||
|
||||
private int _MainType;
|
||||
|
||||
private string _MainTypeName;
|
||||
|
||||
private string _SubType;
|
||||
|
||||
private string _Remark;
|
||||
|
||||
private string _CompileMan;
|
||||
|
||||
private string _CompileManName;
|
||||
|
||||
private System.Nullable<System.DateTime> _CompileDate;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnIdChanging(string value);
|
||||
partial void OnIdChanged();
|
||||
partial void OnMainTypeChanging(int value);
|
||||
partial void OnMainTypeChanged();
|
||||
partial void OnMainTypeNameChanging(string value);
|
||||
partial void OnMainTypeNameChanged();
|
||||
partial void OnSubTypeChanging(string value);
|
||||
partial void OnSubTypeChanged();
|
||||
partial void OnRemarkChanging(string value);
|
||||
partial void OnRemarkChanged();
|
||||
partial void OnCompileManChanging(string value);
|
||||
partial void OnCompileManChanged();
|
||||
partial void OnCompileManNameChanging(string value);
|
||||
partial void OnCompileManNameChanged();
|
||||
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnCompileDateChanged();
|
||||
#endregion
|
||||
|
||||
public Base_ProjectHighlightsSiteType()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Id != value))
|
||||
{
|
||||
this.OnIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Id = value;
|
||||
this.SendPropertyChanged("Id");
|
||||
this.OnIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainType", DbType="Int NOT NULL")]
|
||||
public int MainType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MainType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MainType != value))
|
||||
{
|
||||
this.OnMainTypeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MainType = value;
|
||||
this.SendPropertyChanged("MainType");
|
||||
this.OnMainTypeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainTypeName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string MainTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MainTypeName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MainTypeName != value))
|
||||
{
|
||||
this.OnMainTypeNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MainTypeName = value;
|
||||
this.SendPropertyChanged("MainTypeName");
|
||||
this.OnMainTypeNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubType", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
|
||||
public string SubType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SubType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SubType != value))
|
||||
{
|
||||
this.OnSubTypeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._SubType = value;
|
||||
this.SendPropertyChanged("SubType");
|
||||
this.OnSubTypeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(50)")]
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Remark != value))
|
||||
{
|
||||
this.OnRemarkChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Remark = value;
|
||||
this.SendPropertyChanged("Remark");
|
||||
this.OnRemarkChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string CompileMan
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileMan;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileMan != value))
|
||||
{
|
||||
this.OnCompileManChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileMan = value;
|
||||
this.SendPropertyChanged("CompileMan");
|
||||
this.OnCompileManChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileManName", DbType="NVarChar(50)")]
|
||||
public string CompileManName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileManName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileManName != value))
|
||||
{
|
||||
this.OnCompileManNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileManName = value;
|
||||
this.SendPropertyChanged("CompileManName");
|
||||
this.OnCompileManNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> CompileDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileDate != value))
|
||||
{
|
||||
this.OnCompileDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileDate = value;
|
||||
this.SendPropertyChanged("CompileDate");
|
||||
this.OnCompileDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void SendPropertyChanging()
|
||||
{
|
||||
if ((this.PropertyChanging != null))
|
||||
{
|
||||
this.PropertyChanging(this, emptyChangingEventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void SendPropertyChanged(String propertyName)
|
||||
{
|
||||
if ((this.PropertyChanged != null))
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Base_ProjectSate")]
|
||||
public partial class Base_ProjectSate : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
|
@ -131660,6 +131912,428 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CQMS_ProjectHighlightsSitePic")]
|
||||
public partial class CQMS_ProjectHighlightsSitePic : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
||||
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
|
||||
|
||||
private string _Id;
|
||||
|
||||
private string _ProjectId;
|
||||
|
||||
private string _TypeId;
|
||||
|
||||
private int _MainType;
|
||||
|
||||
private string _MainTypeName;
|
||||
|
||||
private string _SubType;
|
||||
|
||||
private string _Remark;
|
||||
|
||||
private string _Resume;
|
||||
|
||||
private string _PicUrl;
|
||||
|
||||
private string _CompileMan;
|
||||
|
||||
private string _CompileManName;
|
||||
|
||||
private System.Nullable<System.DateTime> _CompileDate;
|
||||
|
||||
private bool _IsReport;
|
||||
|
||||
private System.Nullable<System.DateTime> _ReportDate;
|
||||
|
||||
private string _ReportMan;
|
||||
|
||||
private string _ReportManName;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
partial void OnCreated();
|
||||
partial void OnIdChanging(string value);
|
||||
partial void OnIdChanged();
|
||||
partial void OnProjectIdChanging(string value);
|
||||
partial void OnProjectIdChanged();
|
||||
partial void OnTypeIdChanging(string value);
|
||||
partial void OnTypeIdChanged();
|
||||
partial void OnMainTypeChanging(int value);
|
||||
partial void OnMainTypeChanged();
|
||||
partial void OnMainTypeNameChanging(string value);
|
||||
partial void OnMainTypeNameChanged();
|
||||
partial void OnSubTypeChanging(string value);
|
||||
partial void OnSubTypeChanged();
|
||||
partial void OnRemarkChanging(string value);
|
||||
partial void OnRemarkChanged();
|
||||
partial void OnResumeChanging(string value);
|
||||
partial void OnResumeChanged();
|
||||
partial void OnPicUrlChanging(string value);
|
||||
partial void OnPicUrlChanged();
|
||||
partial void OnCompileManChanging(string value);
|
||||
partial void OnCompileManChanged();
|
||||
partial void OnCompileManNameChanging(string value);
|
||||
partial void OnCompileManNameChanged();
|
||||
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnCompileDateChanged();
|
||||
partial void OnIsReportChanging(bool value);
|
||||
partial void OnIsReportChanged();
|
||||
partial void OnReportDateChanging(System.Nullable<System.DateTime> value);
|
||||
partial void OnReportDateChanged();
|
||||
partial void OnReportManChanging(string value);
|
||||
partial void OnReportManChanged();
|
||||
partial void OnReportManNameChanging(string value);
|
||||
partial void OnReportManNameChanged();
|
||||
#endregion
|
||||
|
||||
public CQMS_ProjectHighlightsSitePic()
|
||||
{
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
|
||||
public string Id
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Id;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Id != value))
|
||||
{
|
||||
this.OnIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Id = value;
|
||||
this.SendPropertyChanged("Id");
|
||||
this.OnIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string ProjectId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ProjectId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ProjectId != value))
|
||||
{
|
||||
this.OnProjectIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ProjectId = value;
|
||||
this.SendPropertyChanged("ProjectId");
|
||||
this.OnProjectIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TypeId", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string TypeId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._TypeId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._TypeId != value))
|
||||
{
|
||||
this.OnTypeIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._TypeId = value;
|
||||
this.SendPropertyChanged("TypeId");
|
||||
this.OnTypeIdChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainType", DbType="Int NOT NULL")]
|
||||
public int MainType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MainType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MainType != value))
|
||||
{
|
||||
this.OnMainTypeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MainType = value;
|
||||
this.SendPropertyChanged("MainType");
|
||||
this.OnMainTypeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MainTypeName", DbType="NVarChar(50) NOT NULL", CanBeNull=false)]
|
||||
public string MainTypeName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._MainTypeName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._MainTypeName != value))
|
||||
{
|
||||
this.OnMainTypeNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._MainTypeName = value;
|
||||
this.SendPropertyChanged("MainTypeName");
|
||||
this.OnMainTypeNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SubType", DbType="NVarChar(200) NOT NULL", CanBeNull=false)]
|
||||
public string SubType
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._SubType;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._SubType != value))
|
||||
{
|
||||
this.OnSubTypeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._SubType = value;
|
||||
this.SendPropertyChanged("SubType");
|
||||
this.OnSubTypeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(50)")]
|
||||
public string Remark
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Remark;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Remark != value))
|
||||
{
|
||||
this.OnRemarkChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Remark = value;
|
||||
this.SendPropertyChanged("Remark");
|
||||
this.OnRemarkChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Resume", DbType="NVarChar(500)")]
|
||||
public string Resume
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._Resume;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._Resume != value))
|
||||
{
|
||||
this.OnResumeChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._Resume = value;
|
||||
this.SendPropertyChanged("Resume");
|
||||
this.OnResumeChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PicUrl", DbType="NVarChar(500)")]
|
||||
public string PicUrl
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._PicUrl;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._PicUrl != value))
|
||||
{
|
||||
this.OnPicUrlChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._PicUrl = value;
|
||||
this.SendPropertyChanged("PicUrl");
|
||||
this.OnPicUrlChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
|
||||
public string CompileMan
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileMan;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileMan != value))
|
||||
{
|
||||
this.OnCompileManChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileMan = value;
|
||||
this.SendPropertyChanged("CompileMan");
|
||||
this.OnCompileManChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileManName", DbType="NVarChar(50)")]
|
||||
public string CompileManName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileManName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileManName != value))
|
||||
{
|
||||
this.OnCompileManNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileManName = value;
|
||||
this.SendPropertyChanged("CompileManName");
|
||||
this.OnCompileManNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> CompileDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._CompileDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._CompileDate != value))
|
||||
{
|
||||
this.OnCompileDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._CompileDate = value;
|
||||
this.SendPropertyChanged("CompileDate");
|
||||
this.OnCompileDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsReport", DbType="Bit NOT NULL")]
|
||||
public bool IsReport
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._IsReport;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._IsReport != value))
|
||||
{
|
||||
this.OnIsReportChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._IsReport = value;
|
||||
this.SendPropertyChanged("IsReport");
|
||||
this.OnIsReportChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportDate", DbType="DateTime")]
|
||||
public System.Nullable<System.DateTime> ReportDate
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReportDate;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ReportDate != value))
|
||||
{
|
||||
this.OnReportDateChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ReportDate = value;
|
||||
this.SendPropertyChanged("ReportDate");
|
||||
this.OnReportDateChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportMan", DbType="NVarChar(50)")]
|
||||
public string ReportMan
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReportMan;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ReportMan != value))
|
||||
{
|
||||
this.OnReportManChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ReportMan = value;
|
||||
this.SendPropertyChanged("ReportMan");
|
||||
this.OnReportManChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReportManName", DbType="NVarChar(50)")]
|
||||
public string ReportManName
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReportManName;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ReportManName != value))
|
||||
{
|
||||
this.OnReportManNameChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._ReportManName = value;
|
||||
this.SendPropertyChanged("ReportManName");
|
||||
this.OnReportManNameChanged();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
||||
protected virtual void SendPropertyChanging()
|
||||
{
|
||||
if ((this.PropertyChanging != null))
|
||||
{
|
||||
this.PropertyChanging(this, emptyChangingEventArgs);
|
||||
}
|
||||
}
|
||||
|
||||
protected virtual void SendPropertyChanged(String propertyName)
|
||||
{
|
||||
if ((this.PropertyChanged != null))
|
||||
{
|
||||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.CQMS_Statement")]
|
||||
public partial class CQMS_Statement : INotifyPropertyChanging, INotifyPropertyChanged
|
||||
{
|
||||
|
|
@ -206109,8 +206783,6 @@ namespace Model
|
|||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
||||
private EntityRef<HSSE_Hazard_HazardRegisterTypes> _HSSE_Hazard_HazardRegisterTypes;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
|
@ -206210,7 +206882,6 @@ namespace Model
|
|||
public HSSE_Hazard_HazardRegister()
|
||||
{
|
||||
this._Base_Unit = default(EntityRef<Base_Unit>);
|
||||
this._HSSE_Hazard_HazardRegisterTypes = default(EntityRef<HSSE_Hazard_HazardRegisterTypes>);
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
|
|
@ -206729,10 +207400,6 @@ namespace Model
|
|||
{
|
||||
if ((this._RegisterTypesId != value))
|
||||
{
|
||||
if (this._HSSE_Hazard_HazardRegisterTypes.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnRegisterTypesIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RegisterTypesId = value;
|
||||
|
|
@ -207156,40 +207823,6 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_HSSE_Hazard_HazardRegisterTypes", Storage="_HSSE_Hazard_HazardRegisterTypes", ThisKey="RegisterTypesId", OtherKey="RegisterTypesId", IsForeignKey=true)]
|
||||
public HSSE_Hazard_HazardRegisterTypes HSSE_Hazard_HazardRegisterTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HSSE_Hazard_HazardRegisterTypes.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
HSSE_Hazard_HazardRegisterTypes previousValue = this._HSSE_Hazard_HazardRegisterTypes.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._HSSE_Hazard_HazardRegisterTypes.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._HSSE_Hazard_HazardRegisterTypes.Entity = null;
|
||||
previousValue.HSSE_Hazard_HazardRegister.Remove(this);
|
||||
}
|
||||
this._HSSE_Hazard_HazardRegisterTypes.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.HSSE_Hazard_HazardRegister.Add(this);
|
||||
this._RegisterTypesId = value.RegisterTypesId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._RegisterTypesId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("HSSE_Hazard_HazardRegisterTypes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
|
@ -207307,8 +207940,6 @@ namespace Model
|
|||
|
||||
private EntityRef<Base_Unit> _Base_Unit;
|
||||
|
||||
private EntityRef<HSSE_Hazard_HazardRegisterTypes> _HSSE_Hazard_HazardRegisterTypes;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
|
@ -207406,7 +208037,6 @@ namespace Model
|
|||
public HSSE_Hazard_HazardRegister_Unit()
|
||||
{
|
||||
this._Base_Unit = default(EntityRef<Base_Unit>);
|
||||
this._HSSE_Hazard_HazardRegisterTypes = default(EntityRef<HSSE_Hazard_HazardRegisterTypes>);
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
|
|
@ -207854,7 +208484,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleIdea", DbType="NVarChar(500)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleIdea", DbType="NVarChar(2000)")]
|
||||
public string HandleIdea
|
||||
{
|
||||
get
|
||||
|
|
@ -207925,10 +208555,6 @@ namespace Model
|
|||
{
|
||||
if ((this._RegisterTypesId != value))
|
||||
{
|
||||
if (this._HSSE_Hazard_HazardRegisterTypes.HasLoadedOrAssignedValue)
|
||||
{
|
||||
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
|
||||
}
|
||||
this.OnRegisterTypesIdChanging(value);
|
||||
this.SendPropertyChanging();
|
||||
this._RegisterTypesId = value;
|
||||
|
|
@ -208238,7 +208864,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirements", DbType="NVarChar(400)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirements", DbType="NVarChar(2000)")]
|
||||
public string Requirements
|
||||
{
|
||||
get
|
||||
|
|
@ -208332,40 +208958,6 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Unit_HSSE_Hazard_HazardRegister_UnitTypes", Storage="_HSSE_Hazard_HazardRegisterTypes", ThisKey="RegisterTypesId", OtherKey="RegisterTypesId", IsForeignKey=true)]
|
||||
public HSSE_Hazard_HazardRegisterTypes HSSE_Hazard_HazardRegisterTypes
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HSSE_Hazard_HazardRegisterTypes.Entity;
|
||||
}
|
||||
set
|
||||
{
|
||||
HSSE_Hazard_HazardRegisterTypes previousValue = this._HSSE_Hazard_HazardRegisterTypes.Entity;
|
||||
if (((previousValue != value)
|
||||
|| (this._HSSE_Hazard_HazardRegisterTypes.HasLoadedOrAssignedValue == false)))
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
if ((previousValue != null))
|
||||
{
|
||||
this._HSSE_Hazard_HazardRegisterTypes.Entity = null;
|
||||
previousValue.HSSE_Hazard_HazardRegister_Unit.Remove(this);
|
||||
}
|
||||
this._HSSE_Hazard_HazardRegisterTypes.Entity = value;
|
||||
if ((value != null))
|
||||
{
|
||||
value.HSSE_Hazard_HazardRegister_Unit.Add(this);
|
||||
this._RegisterTypesId = value.RegisterTypesId;
|
||||
}
|
||||
else
|
||||
{
|
||||
this._RegisterTypesId = default(string);
|
||||
}
|
||||
this.SendPropertyChanged("HSSE_Hazard_HazardRegisterTypes");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
|
@ -208407,10 +208999,6 @@ namespace Model
|
|||
|
||||
private System.Nullable<bool> _IsPunished;
|
||||
|
||||
private EntitySet<HSSE_Hazard_HazardRegister> _HSSE_Hazard_HazardRegister;
|
||||
|
||||
private EntitySet<HSSE_Hazard_HazardRegister_Unit> _HSSE_Hazard_HazardRegister_Unit;
|
||||
|
||||
#region 可扩展性方法定义
|
||||
partial void OnLoaded();
|
||||
partial void OnValidate(System.Data.Linq.ChangeAction action);
|
||||
|
|
@ -208433,8 +209021,6 @@ namespace Model
|
|||
|
||||
public HSSE_Hazard_HazardRegisterTypes()
|
||||
{
|
||||
this._HSSE_Hazard_HazardRegister = new EntitySet<HSSE_Hazard_HazardRegister>(new Action<HSSE_Hazard_HazardRegister>(this.attach_HSSE_Hazard_HazardRegister), new Action<HSSE_Hazard_HazardRegister>(this.detach_HSSE_Hazard_HazardRegister));
|
||||
this._HSSE_Hazard_HazardRegister_Unit = new EntitySet<HSSE_Hazard_HazardRegister_Unit>(new Action<HSSE_Hazard_HazardRegister_Unit>(this.attach_HSSE_Hazard_HazardRegister_Unit), new Action<HSSE_Hazard_HazardRegister_Unit>(this.detach_HSSE_Hazard_HazardRegister_Unit));
|
||||
OnCreated();
|
||||
}
|
||||
|
||||
|
|
@ -208578,32 +209164,6 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_HSSE_Hazard_HazardRegisterTypes", Storage="_HSSE_Hazard_HazardRegister", ThisKey="RegisterTypesId", OtherKey="RegisterTypesId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<HSSE_Hazard_HazardRegister> HSSE_Hazard_HazardRegister
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HSSE_Hazard_HazardRegister;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._HSSE_Hazard_HazardRegister.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Unit_HSSE_Hazard_HazardRegister_UnitTypes", Storage="_HSSE_Hazard_HazardRegister_Unit", ThisKey="RegisterTypesId", OtherKey="RegisterTypesId", DeleteRule="NO ACTION")]
|
||||
public EntitySet<HSSE_Hazard_HazardRegister_Unit> HSSE_Hazard_HazardRegister_Unit
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._HSSE_Hazard_HazardRegister_Unit;
|
||||
}
|
||||
set
|
||||
{
|
||||
this._HSSE_Hazard_HazardRegister_Unit.Assign(value);
|
||||
}
|
||||
}
|
||||
|
||||
public event PropertyChangingEventHandler PropertyChanging;
|
||||
|
||||
public event PropertyChangedEventHandler PropertyChanged;
|
||||
|
|
@ -208623,30 +209183,6 @@ namespace Model
|
|||
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
|
||||
}
|
||||
}
|
||||
|
||||
private void attach_HSSE_Hazard_HazardRegister(HSSE_Hazard_HazardRegister entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.HSSE_Hazard_HazardRegisterTypes = this;
|
||||
}
|
||||
|
||||
private void detach_HSSE_Hazard_HazardRegister(HSSE_Hazard_HazardRegister entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.HSSE_Hazard_HazardRegisterTypes = null;
|
||||
}
|
||||
|
||||
private void attach_HSSE_Hazard_HazardRegister_Unit(HSSE_Hazard_HazardRegister_Unit entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.HSSE_Hazard_HazardRegisterTypes = this;
|
||||
}
|
||||
|
||||
private void detach_HSSE_Hazard_HazardRegister_Unit(HSSE_Hazard_HazardRegister_Unit entity)
|
||||
{
|
||||
this.SendPropertyChanging();
|
||||
entity.HSSE_Hazard_HazardRegisterTypes = null;
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.HSSE_MajorSecurityRisk")]
|
||||
|
|
@ -473845,7 +474381,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
|
||||
public string RegisterTypesName
|
||||
{
|
||||
get
|
||||
|
|
@ -473966,6 +474502,8 @@ namespace Model
|
|||
|
||||
private string _States;
|
||||
|
||||
private string _ReviewedManId;
|
||||
|
||||
private string _IsEffective;
|
||||
|
||||
private string _ResponsibleMan;
|
||||
|
|
@ -474336,6 +474874,22 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ReviewedManId", DbType="NVarChar(2000)")]
|
||||
public string ReviewedManId
|
||||
{
|
||||
get
|
||||
{
|
||||
return this._ReviewedManId;
|
||||
}
|
||||
set
|
||||
{
|
||||
if ((this._ReviewedManId != value))
|
||||
{
|
||||
this._ReviewedManId = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsEffective", DbType="Char(1)")]
|
||||
public string IsEffective
|
||||
{
|
||||
|
|
@ -474496,7 +475050,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleIdea", DbType="NVarChar(500)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_HandleIdea", DbType="NVarChar(2000)")]
|
||||
public string HandleIdea
|
||||
{
|
||||
get
|
||||
|
|
@ -474880,7 +475434,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(200)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesName", DbType="NVarChar(50)")]
|
||||
public string RegisterTypesName
|
||||
{
|
||||
get
|
||||
|
|
@ -474944,7 +475498,7 @@ namespace Model
|
|||
}
|
||||
}
|
||||
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirements", DbType="NVarChar(400)")]
|
||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Requirements", DbType="NVarChar(2000)")]
|
||||
public string Requirements
|
||||
{
|
||||
get
|
||||
|
|
|
|||
Loading…
Reference in New Issue