提交代码
This commit is contained in:
@@ -0,0 +1,228 @@
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES ('CB76394B-BDEB-4F45-9D19-F38612DC6591','中央企业安全生产治本攻坚三年行动工作台账','ZHGL/Information/ActionWorkLedger.aspx',150,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B269EF45-918E-42B0-9B28-65D1A1017CDF','CB76394B-BDEB-4F45-9D19-F38612DC6591','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('71B203E2-42C1-44CD-A0A1-8A75A96B79C7','CB76394B-BDEB-4F45-9D19-F38612DC6591','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('DB5C189E-0023-4174-AB83-B7D5028B3148','CB76394B-BDEB-4F45-9D19-F38612DC6591','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('BFF69201-1E48-46F4-A8CB-863A0304E6C6','CB76394B-BDEB-4F45-9D19-F38612DC6591','保存',4)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('70376B94-3340-4343-92B5-8543C6750F6B','CB76394B-BDEB-4F45-9D19-F38612DC6591','保存并上报',5)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('4B0AE23C-A03D-4146-A5CE-3AB563AF683C','CB76394B-BDEB-4F45-9D19-F38612DC6591','提交',6)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('7F968B8C-C31F-4D62-8AFC-D37D017C46BB','CB76394B-BDEB-4F45-9D19-F38612DC6591','导入',7)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('B318C22A-DBFF-46FE-919A-24F50BF190DC','CB76394B-BDEB-4F45-9D19-F38612DC6591','打印',8)
|
||||
GO
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_ActionWorkLedger](
|
||||
[ActionWorkLedgerId] [nvarchar](50) NOT NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[ReportDate] [datetime] NULL,
|
||||
[Quarter] [int] NULL,
|
||||
[YearId] [int] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[UpState] [char](1) NULL,
|
||||
[HandleState] [char](1) NULL,
|
||||
[HandleMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Information_ActionWorkLedger] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ActionWorkLedgerId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedger] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedger] CHECK CONSTRAINT [FK_Information_ActionWorkLedger_Base_Unit]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业安全生产治本攻坚三年行动工作台账表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedger'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_ActionWorkLedgerItem](
|
||||
[ActionWorkLedgerItemId] [nvarchar](50) NOT NULL,
|
||||
[ActionWorkLedgerId] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[Focus] [nvarchar](20) NULL,
|
||||
[SpecialTask] [nvarchar](100) NULL,
|
||||
[WorkPoints] [nvarchar](500) NULL,
|
||||
[FillingRequirements] [nvarchar](max) NULL,
|
||||
[CompletionDeadline] [nvarchar](50) NULL,
|
||||
[ImplementationStatus] [nvarchar](max) NULL,
|
||||
CONSTRAINT [PK_Information_ActionWorkLedgerItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[ActionWorkLedgerItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] WITH CHECK ADD CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger] FOREIGN KEY([ActionWorkLedgerId])
|
||||
REFERENCES [dbo].[Information_ActionWorkLedger] ([ActionWorkLedgerId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_ActionWorkLedgerItem] CHECK CONSTRAINT [FK_Information_ActionWorkLedgerItem_Information_ActionWorkLedger]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业安全生产治本攻坚三年行动工作台账明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_ActionWorkLedgerItem'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_Information_ActionWorkLedger] AS
|
||||
SELECT
|
||||
Report.ActionWorkLedgerId,
|
||||
Report.UnitId,
|
||||
Report.ReportDate,
|
||||
Report.YearId,
|
||||
Report.Quarter,
|
||||
Report.UpState,
|
||||
Report.HandleState,
|
||||
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters,
|
||||
u.UnitName,
|
||||
Report.HandleMan,
|
||||
US.PersonName as UserName
|
||||
FROM dbo.Information_ActionWorkLedger AS Report
|
||||
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId
|
||||
LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter
|
||||
Left join Base_Unit as u on u.UnitId=Report.UnitId
|
||||
LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
|
||||
|
||||
|
||||
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
|
||||
VALUES ('C48087A8-4C9F-485D-B0A4-C85E112BA705','中央企业安全生产管理评价工作调度台账','ZHGL/Information/SafetyProductionEvaluation.aspx',160,'ERDXV53M-09B1-6UIO-3EFM-5DVZDF329001','Menu_ZHGL',1,1,1)
|
||||
GO
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('39A75960-F70A-4B60-ABFF-C72C919807A6','C48087A8-4C9F-485D-B0A4-C85E112BA705','增加',1)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('9461B39D-D9FF-45CC-9D4C-38E49BCBCF6C','C48087A8-4C9F-485D-B0A4-C85E112BA705','修改',2)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E417A6A8-0666-49EB-A620-2E73D19C08CB','C48087A8-4C9F-485D-B0A4-C85E112BA705','删除',3)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('07F975F0-D634-4554-A3B7-667E99278265','C48087A8-4C9F-485D-B0A4-C85E112BA705','保存',4)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('23B71591-E933-4C3A-BCBF-E398D94A6C88','C48087A8-4C9F-485D-B0A4-C85E112BA705','保存并上报',5)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('E97C8630-3DD7-4A4B-A3FD-7DE592B489BC','C48087A8-4C9F-485D-B0A4-C85E112BA705','提交',6)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('5F910FC4-183E-4037-9EE1-1400B96C4584','C48087A8-4C9F-485D-B0A4-C85E112BA705','导入',7)
|
||||
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
|
||||
VALUES('D08BCEF7-843F-4BB6-BE87-182EC476E455','C48087A8-4C9F-485D-B0A4-C85E112BA705','打印',8)
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_SafetyProductionEvaluation](
|
||||
[SafetyProductionEvaluationId] [nvarchar](50) NOT NULL,
|
||||
[UnitId] [nvarchar](50) NULL,
|
||||
[ReportDate] [datetime] NULL,
|
||||
[Quarter] [int] NULL,
|
||||
[YearId] [int] NULL,
|
||||
[CompileMan] [nvarchar](50) NULL,
|
||||
[UpState] [char](1) NULL,
|
||||
[HandleState] [char](1) NULL,
|
||||
[HandleMan] [nvarchar](50) NULL,
|
||||
CONSTRAINT [PK_Information_SafetyProductionEvaluation] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[SafetyProductionEvaluationId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
SET ANSI_PADDING OFF
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit] FOREIGN KEY([UnitId])
|
||||
REFERENCES [dbo].[Base_Unit] ([UnitId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluation] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluation_Base_Unit]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业安全生产管理评价工作调度台账表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluation'
|
||||
GO
|
||||
|
||||
|
||||
|
||||
|
||||
CREATE TABLE [dbo].[Information_SafetyProductionEvaluationItem](
|
||||
[SafetyProductionEvaluationItemId] [nvarchar](50) NOT NULL,
|
||||
[SafetyProductionEvaluationId] [nvarchar](50) NULL,
|
||||
[SortIndex] [int] NULL,
|
||||
[Type] [nvarchar](50) NULL,
|
||||
[EvaluateWork] [nvarchar](1000) NULL,
|
||||
[EvaluationContent] [nvarchar](1000) NULL,
|
||||
[FillingRequirements] [nvarchar](max) NULL,
|
||||
[CompletionDeadline] [nvarchar](50) NULL,
|
||||
[ImplementationStatus] [nvarchar](max) NULL,
|
||||
CONSTRAINT [PK_Information_SafetyProductionEvaluationItem] PRIMARY KEY CLUSTERED
|
||||
(
|
||||
[SafetyProductionEvaluationItemId] ASC
|
||||
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
|
||||
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
|
||||
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] WITH CHECK ADD CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation] FOREIGN KEY([SafetyProductionEvaluationId])
|
||||
REFERENCES [dbo].[Information_SafetyProductionEvaluation] ([SafetyProductionEvaluationId])
|
||||
GO
|
||||
|
||||
ALTER TABLE [dbo].[Information_SafetyProductionEvaluationItem] CHECK CONSTRAINT [FK_Information_SafetyProductionEvaluationItem_Information_SafetyProductionEvaluation]
|
||||
GO
|
||||
|
||||
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'中央企业安全生产管理评价工作调度台账明细表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Information_SafetyProductionEvaluationItem'
|
||||
GO
|
||||
|
||||
|
||||
CREATE VIEW [dbo].[View_Information_SafetyProductionEvaluation] AS
|
||||
SELECT
|
||||
Report.SafetyProductionEvaluationId,
|
||||
Report.UnitId,
|
||||
Report.ReportDate,
|
||||
Report.YearId,
|
||||
Report.Quarter,
|
||||
Report.UpState,
|
||||
Report.HandleState,
|
||||
(ISNULL(Group_0008.ConstText,'-') + ISNULL(Group_0011.ConstText,'-')) AS Quarters,
|
||||
u.UnitName,
|
||||
Report.HandleMan,
|
||||
US.PersonName as UserName
|
||||
FROM dbo.Information_SafetyProductionEvaluation AS Report
|
||||
LEFT JOIN Sys_Const AS Group_0008 ON Group_0008.GroupId='0008' AND Group_0008.ConstValue =Report.YearId
|
||||
LEFT JOIN Sys_Const AS Group_0011 ON Group_0011.GroupId='0011' AND Group_0011.ConstValue =Report.Quarter
|
||||
Left join Base_Unit as u on u.UnitId=Report.UnitId
|
||||
LEFT JOIN Person_Persons AS US ON US.PersonId=Report.HandleMan
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
GO
|
||||
@@ -763,6 +763,8 @@
|
||||
<Compile Include="ZHGL\Environmental\ProjectEnergyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReportItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\DrillPlanHalfYearReportItemService.cs" />
|
||||
@@ -773,6 +775,8 @@
|
||||
<Compile Include="ZHGL\Information\QualityWorkSummaryReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\QuarterlyProjectQualityService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyBriefingService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationItemService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationService.cs" />
|
||||
<Compile Include="ZHGL\Information\SafetyQuarterlyReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\UrgeReportService.cs" />
|
||||
<Compile Include="ZHGL\Information\WorkSummaryReportService.cs" />
|
||||
|
||||
@@ -5110,5 +5110,26 @@ namespace BLL
|
||||
public const string ConstructionRisk_Complete = "5";//分包
|
||||
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public const string ActionWorkLedgerMenuId = "CB76394B-BDEB-4F45-9D19-F38612DC6591";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
public const string SafetyProductionEvaluationMenuId = "C48087A8-4C9F-485D-B0A4-C85E112BA705";
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public const string ReportType_11 = "11";
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账上报
|
||||
/// </summary>
|
||||
public const string ReportType_12 = "12";
|
||||
}
|
||||
}
|
||||
@@ -1632,6 +1632,190 @@
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产治本攻坚三年行动工作台账上报
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账上报
|
||||
/// </summary>
|
||||
public static string UpActionWorkLedger(string actionWorkLedgerId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
var upReport = from x in db.Information_ActionWorkLedger
|
||||
where x.ActionWorkLedgerId == actionWorkLedgerId
|
||||
select new Model.ActionWorkLedger
|
||||
{
|
||||
ActionWorkLedgerId = x.ActionWorkLedgerId,
|
||||
UnitId = x.UnitId,
|
||||
ReportDate = x.ReportDate,
|
||||
Quarter = x.Quarter,
|
||||
YearId = x.YearId,
|
||||
CompileMan = x.CompileMan,
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Information_ActionWorkLedgerItem
|
||||
where x.ActionWorkLedgerId == actionWorkLedgerId
|
||||
select new Model.ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = x.ActionWorkLedgerItemId,
|
||||
ActionWorkLedgerId = x.ActionWorkLedgerId,
|
||||
SortIndex = x.SortIndex,
|
||||
Focus = x.Focus,
|
||||
SpecialTask = x.SpecialTask,
|
||||
WorkPoints = x.WorkPoints,
|
||||
FillingRequirements = x.FillingRequirements,
|
||||
CompletionDeadline = x.CompletionDeadline,
|
||||
ImplementationStatus = x.ImplementationStatus,
|
||||
};
|
||||
|
||||
//var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiSaveActionWorkLedger(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.ActionWorkLedgerId))
|
||||
{
|
||||
var report = db.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
ProjectDataFlowSetService.CloseFlowOperate(Const.ActionWorkLedgerMenuId, item, string.Empty);
|
||||
////更新催报信息
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_11, report.YearId.ToString(), report.Quarter.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产治本攻坚三年行动工作台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DrillConductedQuarterlyReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiSaveActionWorkLedger(IQueryable<Model.ActionWorkLedger> upReport, IQueryable<Model.ActionWorkLedgerItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveActionWorkLedger";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJson1 = JsonConvert.SerializeObject(new { actionWorkLedgerItem = upReportItem });
|
||||
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产管理评价工作调度台账上报
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账上报
|
||||
/// </summary>
|
||||
public static string UpSafetyProductionEvaluation(string safetyProductionEvaluationId, Model.Person_Persons CurrUser)
|
||||
{
|
||||
string code = "0";
|
||||
using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
try
|
||||
{
|
||||
var upReport = from x in db.Information_SafetyProductionEvaluation
|
||||
where x.SafetyProductionEvaluationId == safetyProductionEvaluationId
|
||||
select new Model.SafetyProductionEvaluation
|
||||
{
|
||||
SafetyProductionEvaluationId = x.SafetyProductionEvaluationId,
|
||||
UnitId = x.UnitId,
|
||||
ReportDate = x.ReportDate,
|
||||
Quarter = x.Quarter,
|
||||
YearId = x.YearId,
|
||||
CompileMan = x.CompileMan,
|
||||
};
|
||||
|
||||
var upReportItem = from x in db.Information_SafetyProductionEvaluationItem
|
||||
where x.SafetyProductionEvaluationId == safetyProductionEvaluationId
|
||||
select new Model.SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = x.SafetyProductionEvaluationItemId,
|
||||
SafetyProductionEvaluationId = x.SafetyProductionEvaluationId,
|
||||
SortIndex = x.SortIndex,
|
||||
Type = x.Type,
|
||||
EvaluateWork = x.EvaluateWork,
|
||||
EvaluationContent = x.EvaluationContent,
|
||||
FillingRequirements = x.FillingRequirements,
|
||||
CompletionDeadline = x.CompletionDeadline,
|
||||
ImplementationStatus = x.ImplementationStatus,
|
||||
};
|
||||
|
||||
//var getR = hsseC.DataInsertInformation_DrillConductedQuarterlyReportTable(upReport.ToList(), upReportItem.ToList());
|
||||
//新接口Api
|
||||
code = UpApiSaveSafetyProductionEvaluation(upReport, upReportItem).ToString();
|
||||
if (code == "1")
|
||||
{
|
||||
foreach (var item in upReport.Select(p => p.SafetyProductionEvaluationId))
|
||||
{
|
||||
var report = db.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == item);
|
||||
if (report != null)
|
||||
{
|
||||
report.UpState = BLL.Const.UpState_3;
|
||||
db.SubmitChanges();
|
||||
////更新 当前人要处理的意见
|
||||
ProjectDataFlowSetService.CloseFlowOperate(Const.SafetyProductionEvaluationMenuId, item, string.Empty);
|
||||
////更新催报信息
|
||||
UrgeReportService.SetComplete(report.UnitId, Const.ReportType_12, report.YearId.ToString(), report.Quarter.ToString());
|
||||
}
|
||||
}
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器" + upReport.Count().ToString() + "条数据;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
else
|
||||
{
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
ErrLogInfo.WriteLog("【中央企业安全生产管理评价工作调度台账上报】上传到服务器", ex);
|
||||
LogService.AddSys_Log(CurrUser, "【中央企业安全生产管理评价工作调度台账上报】上传到服务器失败;", null, BLL.Const.MillionsMonthlyReportMenuId, BLL.Const.BtnUploadResources);
|
||||
}
|
||||
|
||||
return code;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// DrillConductedQuarterlyReportApi调用
|
||||
/// </summary>
|
||||
/// <param name="upReport">主表</param>
|
||||
/// <param name="upReportItem">明细表</param>
|
||||
/// <returns></returns>
|
||||
private static int UpApiSaveSafetyProductionEvaluation(IQueryable<Model.SafetyProductionEvaluation> upReport, IQueryable<Model.SafetyProductionEvaluationItem> upReportItem)
|
||||
{
|
||||
string baseurl = "/api/InformationData/SaveSafetyProductionEvaluation";
|
||||
//合并
|
||||
//var resultJson = JsonConvert.SerializeObject(new { upReport, ReportItem = upReportItem });
|
||||
var resultJson = JsonConvert.SerializeObject(upReport.FirstOrDefault());
|
||||
var resultJson1 = JsonConvert.SerializeObject(new { safetyProductionEvaluationItem = upReportItem });
|
||||
resultJson = "{\"InformationDataItems\":[" + (resultJson + resultJson1).Replace("}{", ",") + "]}";
|
||||
var responeData = BLL.ServerService.PushCNCEC(resultJson, baseurl);
|
||||
return responeData.code;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账明细表
|
||||
/// </summary>
|
||||
public static class ActionWorkLedgerItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedgerItem GetActionWorkLedgerItemById(string ActionWorkLedgerItemId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产治本攻坚三年行动工作台账Id获取所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Information_ActionWorkLedgerItem> GetActionWorkLedgerItemList(string ActionWorkLedgerId)
|
||||
{
|
||||
return (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItem"></param>
|
||||
public static void AddActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = new Model.Information_ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = ActionWorkLedgerItem.ActionWorkLedgerItemId,
|
||||
ActionWorkLedgerId = ActionWorkLedgerItem.ActionWorkLedgerId,
|
||||
Focus = ActionWorkLedgerItem.Focus,
|
||||
SpecialTask = ActionWorkLedgerItem.SpecialTask,
|
||||
WorkPoints = ActionWorkLedgerItem.WorkPoints,
|
||||
FillingRequirements = ActionWorkLedgerItem.FillingRequirements,
|
||||
CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline,
|
||||
ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus,
|
||||
SortIndex = ActionWorkLedgerItem.SortIndex
|
||||
};
|
||||
Funs.DB.Information_ActionWorkLedgerItem.InsertOnSubmit(newActionWorkLedgerItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItem"></param>
|
||||
public static void UpdateActionWorkLedgerItem(Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem newActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItem.ActionWorkLedgerItemId);
|
||||
if (newActionWorkLedgerItem != null)
|
||||
{
|
||||
newActionWorkLedgerItem.Focus = ActionWorkLedgerItem.Focus;
|
||||
newActionWorkLedgerItem.SpecialTask = ActionWorkLedgerItem.SpecialTask;
|
||||
newActionWorkLedgerItem.WorkPoints = ActionWorkLedgerItem.WorkPoints;
|
||||
newActionWorkLedgerItem.FillingRequirements = ActionWorkLedgerItem.FillingRequirements;
|
||||
newActionWorkLedgerItem.CompletionDeadline = ActionWorkLedgerItem.CompletionDeadline;
|
||||
newActionWorkLedgerItem.ImplementationStatus = ActionWorkLedgerItem.ImplementationStatus;
|
||||
newActionWorkLedgerItem.SortIndex = ActionWorkLedgerItem.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerItemId"></param>
|
||||
public static void DeleteActionWorkLedgerItemById(string ActionWorkLedgerItemId)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem ActionWorkLedgerItem = Funs.DB.Information_ActionWorkLedgerItem.FirstOrDefault(e => e.ActionWorkLedgerItemId == ActionWorkLedgerItemId);
|
||||
if (ActionWorkLedgerItem != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedgerItem.DeleteOnSubmit(ActionWorkLedgerItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产治本攻坚三年行动工作台账主表id删除所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
public static void DeleteActionWorkLedgerItemList(string ActionWorkLedgerId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Information_ActionWorkLedgerItem where x.ActionWorkLedgerId == ActionWorkLedgerId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedgerItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
public static class ActionWorkLedgerService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerById(string ActionWorkLedgerId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="quarters">季度</param>
|
||||
/// <returns>中央企业安全生产治本攻坚三年行动工作台账</returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdAndYearAndQuarters(string unitId, int year, int quarters)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取安全生产数据季报集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>安全生产数据季报集合</returns>
|
||||
public static List<Model.View_Information_ActionWorkLedger> GetActionWorkLedgersByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Information_ActionWorkLedger where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedger"></param>
|
||||
public static void AddActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger)
|
||||
{
|
||||
Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger
|
||||
{
|
||||
ActionWorkLedgerId = ActionWorkLedger.ActionWorkLedgerId,
|
||||
UnitId = ActionWorkLedger.UnitId,
|
||||
ReportDate = ActionWorkLedger.ReportDate,
|
||||
YearId = ActionWorkLedger.YearId,
|
||||
Quarter = ActionWorkLedger.Quarter,
|
||||
CompileMan = ActionWorkLedger.CompileMan,
|
||||
UpState = ActionWorkLedger.UpState,
|
||||
HandleState = ActionWorkLedger.HandleState,
|
||||
HandleMan = ActionWorkLedger.HandleMan
|
||||
};
|
||||
Funs.DB.Information_ActionWorkLedger.InsertOnSubmit(newActionWorkLedger);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedger"></param>
|
||||
public static void UpdateActionWorkLedger(Model.Information_ActionWorkLedger ActionWorkLedger)
|
||||
{
|
||||
Model.Information_ActionWorkLedger newActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedger.ActionWorkLedgerId);
|
||||
if (newActionWorkLedger != null)
|
||||
{
|
||||
newActionWorkLedger.UnitId = ActionWorkLedger.UnitId;
|
||||
newActionWorkLedger.ReportDate = ActionWorkLedger.ReportDate;
|
||||
newActionWorkLedger.YearId = ActionWorkLedger.YearId;
|
||||
newActionWorkLedger.Quarter = ActionWorkLedger.Quarter;
|
||||
newActionWorkLedger.UpState = ActionWorkLedger.UpState;
|
||||
newActionWorkLedger.HandleState = ActionWorkLedger.HandleState;
|
||||
newActionWorkLedger.HandleMan = ActionWorkLedger.HandleMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
public static void DeleteActionWorkLedgerById(string ActionWorkLedgerId)
|
||||
{
|
||||
Model.Information_ActionWorkLedger ActionWorkLedger = Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.ActionWorkLedgerId == ActionWorkLedgerId);
|
||||
if (ActionWorkLedger != null)
|
||||
{
|
||||
Funs.DB.Information_ActionWorkLedger.DeleteOnSubmit(ActionWorkLedger);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位、季度获取中央企业安全生产治本攻坚三年行动工作台账
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="quarter"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_ActionWorkLedger GetActionWorkLedgerByUnitIdDate(string unitId, int yearId, int quarter, string ActionWorkLedgerId)
|
||||
{
|
||||
return Funs.DB.Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((ActionWorkLedgerId == null && e.ActionWorkLedgerId != null) || e.ActionWorkLedgerId != ActionWorkLedgerId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,104 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账明细表
|
||||
/// </summary>
|
||||
public static class SafetyProductionEvaluationItemService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItemId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluationItem GetSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产管理评价工作调度台账Id获取所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
/// <returns></returns>
|
||||
public static List<Model.Information_SafetyProductionEvaluationItem> GetSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId)
|
||||
{
|
||||
return (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId orderby x.SortIndex select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItem"></param>
|
||||
public static void AddSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = new Model.Information_SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId,
|
||||
SafetyProductionEvaluationId = SafetyProductionEvaluationItem.SafetyProductionEvaluationId,
|
||||
Type = SafetyProductionEvaluationItem.Type,
|
||||
EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork,
|
||||
EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent,
|
||||
FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements,
|
||||
CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline,
|
||||
ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus,
|
||||
SortIndex = SafetyProductionEvaluationItem.SortIndex
|
||||
};
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.InsertOnSubmit(newSafetyProductionEvaluationItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItem"></param>
|
||||
public static void UpdateSafetyProductionEvaluationItem(Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem newSafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItem.SafetyProductionEvaluationItemId);
|
||||
if (newSafetyProductionEvaluationItem != null)
|
||||
{
|
||||
newSafetyProductionEvaluationItem.Type = SafetyProductionEvaluationItem.Type;
|
||||
newSafetyProductionEvaluationItem.EvaluateWork = SafetyProductionEvaluationItem.EvaluateWork;
|
||||
newSafetyProductionEvaluationItem.EvaluationContent = SafetyProductionEvaluationItem.EvaluationContent;
|
||||
newSafetyProductionEvaluationItem.FillingRequirements = SafetyProductionEvaluationItem.FillingRequirements;
|
||||
newSafetyProductionEvaluationItem.CompletionDeadline = SafetyProductionEvaluationItem.CompletionDeadline;
|
||||
newSafetyProductionEvaluationItem.ImplementationStatus = SafetyProductionEvaluationItem.ImplementationStatus;
|
||||
newSafetyProductionEvaluationItem.SortIndex = SafetyProductionEvaluationItem.SortIndex;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产管理评价工作调度台账明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationItemId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationItemById(string SafetyProductionEvaluationItemId)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem SafetyProductionEvaluationItem = Funs.DB.Information_SafetyProductionEvaluationItem.FirstOrDefault(e => e.SafetyProductionEvaluationItemId == SafetyProductionEvaluationItemId);
|
||||
if (SafetyProductionEvaluationItem != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.DeleteOnSubmit(SafetyProductionEvaluationItem);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据中央企业安全生产管理评价工作调度台账主表id删除所有相关明细信息
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationItemList(string SafetyProductionEvaluationId)
|
||||
{
|
||||
var q = (from x in Funs.DB.Information_SafetyProductionEvaluationItem where x.SafetyProductionEvaluationId == SafetyProductionEvaluationId select x).ToList();
|
||||
if (q != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluationItem.DeleteAllOnSubmit(q);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,113 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BLL
|
||||
{
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
public static class SafetyProductionEvaluationService
|
||||
{
|
||||
/// <summary>
|
||||
/// 根据主键获取中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationById(string SafetyProductionEvaluationId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="unitId">单位Id</param>
|
||||
/// <param name="year">年度</param>
|
||||
/// <param name="quarters">季度</param>
|
||||
/// <returns>中央企业安全生产管理评价工作调度台账</returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(string unitId, int year, int quarters)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.Quarter == quarters && e.YearId == year);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位Id获取安全生产数据季报集合
|
||||
/// </summary>
|
||||
/// <param name="UnitId">单位Id</param>
|
||||
/// <returns>安全生产数据季报集合</returns>
|
||||
public static List<Model.View_Information_SafetyProductionEvaluation> GetSafetyProductionEvaluationsByUnitId(string UnitId)
|
||||
{
|
||||
return (from x in Funs.DB.View_Information_SafetyProductionEvaluation where x.UnitId == UnitId orderby x.ReportDate descending select x).ToList();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluation"></param>
|
||||
public static void AddSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation
|
||||
{
|
||||
SafetyProductionEvaluationId = SafetyProductionEvaluation.SafetyProductionEvaluationId,
|
||||
UnitId = SafetyProductionEvaluation.UnitId,
|
||||
ReportDate = SafetyProductionEvaluation.ReportDate,
|
||||
YearId = SafetyProductionEvaluation.YearId,
|
||||
Quarter = SafetyProductionEvaluation.Quarter,
|
||||
CompileMan = SafetyProductionEvaluation.CompileMan,
|
||||
UpState = SafetyProductionEvaluation.UpState,
|
||||
HandleState = SafetyProductionEvaluation.HandleState,
|
||||
HandleMan = SafetyProductionEvaluation.HandleMan
|
||||
};
|
||||
Funs.DB.Information_SafetyProductionEvaluation.InsertOnSubmit(newSafetyProductionEvaluation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 修改中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluation"></param>
|
||||
public static void UpdateSafetyProductionEvaluation(Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
if (newSafetyProductionEvaluation != null)
|
||||
{
|
||||
newSafetyProductionEvaluation.UnitId = SafetyProductionEvaluation.UnitId;
|
||||
newSafetyProductionEvaluation.ReportDate = SafetyProductionEvaluation.ReportDate;
|
||||
newSafetyProductionEvaluation.YearId = SafetyProductionEvaluation.YearId;
|
||||
newSafetyProductionEvaluation.Quarter = SafetyProductionEvaluation.Quarter;
|
||||
newSafetyProductionEvaluation.UpState = SafetyProductionEvaluation.UpState;
|
||||
newSafetyProductionEvaluation.HandleState = SafetyProductionEvaluation.HandleState;
|
||||
newSafetyProductionEvaluation.HandleMan = SafetyProductionEvaluation.HandleMan;
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据主键删除中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
public static void DeleteSafetyProductionEvaluationById(string SafetyProductionEvaluationId)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.SafetyProductionEvaluationId == SafetyProductionEvaluationId);
|
||||
if (SafetyProductionEvaluation != null)
|
||||
{
|
||||
Funs.DB.Information_SafetyProductionEvaluation.DeleteOnSubmit(SafetyProductionEvaluation);
|
||||
Funs.DB.SubmitChanges();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 根据单位、季度获取中央企业安全生产管理评价工作调度台账
|
||||
/// </summary>
|
||||
/// <param name="unitId"></param>
|
||||
/// <param name="quarter"></param>
|
||||
/// <returns></returns>
|
||||
public static Model.Information_SafetyProductionEvaluation GetSafetyProductionEvaluationByUnitIdDate(string unitId, int yearId, int quarter, string SafetyProductionEvaluationId)
|
||||
{
|
||||
return Funs.DB.Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarter && ((SafetyProductionEvaluationId == null && e.SafetyProductionEvaluationId != null) || e.SafetyProductionEvaluationId != SafetyProductionEvaluationId));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -3406,6 +3406,8 @@
|
||||
<Content Include="ZHGL\Environmental\ProjectOperationReportEdit.aspx" />
|
||||
<Content Include="ZHGL\Information\AccidentCauseReport.aspx" />
|
||||
<Content Include="ZHGL\Information\AccidentCauseReportSave.aspx" />
|
||||
<Content Include="ZHGL\Information\ActionWorkLedger.aspx" />
|
||||
<Content Include="ZHGL\Information\ActionWorkLedgerAdd.aspx" />
|
||||
<Content Include="ZHGL\Information\DrillConductedQuarterlyReport.aspx" />
|
||||
<Content Include="ZHGL\Information\DrillConductedQuarterlyReportAdd.aspx" />
|
||||
<Content Include="ZHGL\Information\DrillPlanHalfYearReport.aspx" />
|
||||
@@ -3422,6 +3424,8 @@
|
||||
<Content Include="ZHGL\Information\ReportSubmit.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyBriefing.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyBriefingEdit.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyProductionEvaluation.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyProductionEvaluationAdd.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyQuarterlyReport.aspx" />
|
||||
<Content Include="ZHGL\Information\SafetyQuarterlyReportEdit.aspx" />
|
||||
<Content Include="ZHGL\Information\WorkSummaryReport.aspx" />
|
||||
@@ -15995,6 +15999,20 @@
|
||||
<Compile Include="ZHGL\Information\AccidentCauseReportSave.aspx.designer.cs">
|
||||
<DependentUpon>AccidentCauseReportSave.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedger.aspx.cs">
|
||||
<DependentUpon>ActionWorkLedger.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedger.aspx.designer.cs">
|
||||
<DependentUpon>ActionWorkLedger.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerAdd.aspx.cs">
|
||||
<DependentUpon>ActionWorkLedgerAdd.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\ActionWorkLedgerAdd.aspx.designer.cs">
|
||||
<DependentUpon>ActionWorkLedgerAdd.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\DrillConductedQuarterlyReport.aspx.cs">
|
||||
<DependentUpon>DrillConductedQuarterlyReport.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
@@ -16107,6 +16125,20 @@
|
||||
<Compile Include="ZHGL\Information\SafetyBriefingEdit.aspx.designer.cs">
|
||||
<DependentUpon>SafetyBriefingEdit.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluation.aspx.cs">
|
||||
<DependentUpon>SafetyProductionEvaluation.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluation.aspx.designer.cs">
|
||||
<DependentUpon>SafetyProductionEvaluation.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationAdd.aspx.cs">
|
||||
<DependentUpon>SafetyProductionEvaluationAdd.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\SafetyProductionEvaluationAdd.aspx.designer.cs">
|
||||
<DependentUpon>SafetyProductionEvaluationAdd.aspx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="ZHGL\Information\SafetyQuarterlyReport.aspx.cs">
|
||||
<DependentUpon>SafetyQuarterlyReport.aspx</DependentUpon>
|
||||
<SubType>ASPXCodeBehind</SubType>
|
||||
|
||||
@@ -0,0 +1,159 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionWorkLedger.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ActionWorkLedger" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>中央企业安全生产治本攻坚三年行动工作台账</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.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" runat="server" AutoSizePanelID="RegionPanel1" />
|
||||
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
|
||||
<Regions>
|
||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server" Title="">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="true" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="350px"
|
||||
LabelWidth="70px" Label="单位" EnableEdit="true" ForceSelection="false" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="150px"
|
||||
LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarter" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="150px"
|
||||
LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
OnClick="BtnBulletLeft_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
OnClick="BulletRight_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSee" ToolTip="查看审批流程" Icon="Find" runat="server" OnClick="btnSee_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Hidden="true" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnGet" ToolTip="获取" Icon="Add" Hidden="true" runat="server"
|
||||
OnClick="btnGet_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Hidden="true" Icon="Pencil" runat="server" OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Hidden="true" Icon="Delete" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit1" ToolTip="审核" Icon="Pencil" Hidden="true" runat="server" OnClick="btnAudit1_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit2" ToolTip="审批" Icon="Pencil" Hidden="true" runat="server" OnClick="btnAudit2_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdata" ToolTip="上报" Icon="PageSave" Hidden="true" runat="server" OnClick="btnUpdata_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnPrint" ToolTip="打印" Icon="Printer" Hidden="true" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtUnitName" runat="server" Hidden="true">
|
||||
</f:Label>
|
||||
<f:Label ID="txtQuarter" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtCompileDate" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="lbHandleMan" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="ActionWorkLedgerItemId"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="ActionWorkLedgerItemId"
|
||||
AllowSorting="true" SortField="SortIndex" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="false" PageSize="1000" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="55px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String"
|
||||
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="Focus" DataField="Focus" FieldType="String"
|
||||
HeaderText="重点工作" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SpecialTask" DataField="SpecialTask"
|
||||
FieldType="String" HeaderText="专项任务" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="WorkPoints" DataField="WorkPoints"
|
||||
FieldType="String" HeaderText="工作要点" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="FillingRequirements" DataField="FillingRequirements"
|
||||
FieldType="String" HeaderText="填报要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="CompletionDeadline" DataField="CompletionDeadline"
|
||||
FieldType="String" HeaderText="完成期限" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="ImplementationStatus" DataField="ImplementationStatus" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="落实情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Region>
|
||||
</Regions>
|
||||
</f:RegionPanel>
|
||||
<f:Window ID="Window1" Title="编辑中央企业安全生产治本攻坚三年行动工作台账" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="1300px" Height="540px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window2_Close"
|
||||
Title="导入中央企业安全生产治本攻坚三年行动工作台账" CloseAction="HidePostBack" EnableIFrame="true" Height="600px"
|
||||
Width="900px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true"
|
||||
Title="打印中央企业安全生产治本攻坚三年行动工作台账" CloseAction="HidePostBack" EnableIFrame="true" Height="768px"
|
||||
Width="1024px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window4" Title="查看审核信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="true" runat="server" IsModal="true" OnClose="Window4_Close"
|
||||
Width="1024px" Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['Focus','SpecialTask'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,619 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
public partial class ActionWorkLedger : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string ActionWorkLedgerId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ActionWorkLedgerId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ActionWorkLedgerId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.Information_ActionWorkLedgerItem> ActionWorkLedgerItems = new List<Model.Information_ActionWorkLedgerItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||
this.drpUnit.DataTextField = "UnitName";
|
||||
drpUnit.DataValueField = "UnitId";
|
||||
drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
||||
drpUnit.DataBind();
|
||||
this.drpUnit.Readonly = true;
|
||||
DateTime showDate = System.DateTime.Now.AddMonths(-3);
|
||||
this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||
GetValue();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清空文本框
|
||||
private void SetEmpty()
|
||||
{
|
||||
this.SimpleForm1.Title = string.Empty;
|
||||
txtUnitName.Text = string.Empty;
|
||||
txtQuarter.Text = string.Empty;
|
||||
txtCompileDate.Text = string.Empty;
|
||||
this.lbHandleMan.Text = string.Empty;
|
||||
Grid1.DataSource = null;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取记录值
|
||||
private void GetValue()
|
||||
{
|
||||
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||
int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue);
|
||||
this.ActionWorkLedgerId = string.Empty;
|
||||
Model.View_Information_ActionWorkLedger report = Funs.DB.View_Information_ActionWorkLedger.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year);
|
||||
if (report != null)
|
||||
{
|
||||
string state = string.Empty;
|
||||
if (report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
state = "(已上报)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (report.HandleState == BLL.Const.HandleState_1)
|
||||
{
|
||||
state = "(待提交)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
state = "(待审核)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
state = "(待审批)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
state = "(待上报)";
|
||||
}
|
||||
}
|
||||
this.SimpleForm1.Title = "中央企业安全生产治本攻坚三年行动工作台账" + state;
|
||||
this.ActionWorkLedgerId = report.ActionWorkLedgerId;
|
||||
txtUnitName.Text = "单位:" + report.UnitName;
|
||||
txtQuarter.Text = "季度:" + report.Quarters;
|
||||
if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
this.lbHandleMan.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbHandleMan.Hidden = false;
|
||||
this.lbHandleMan.Text = "下一步办理人:" + report.UserName;
|
||||
}
|
||||
if (report.ReportDate != null)
|
||||
{
|
||||
txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate);
|
||||
}
|
||||
BindGrid1();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetEmpty();
|
||||
}
|
||||
this.GetButtonPower();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载Grid
|
||||
private void BindGrid1()
|
||||
{
|
||||
string strSql = "select * from dbo.Information_ActionWorkLedgerItem where ActionWorkLedgerId = @ActionWorkLedgerId order by SortIndex";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@ActionWorkLedgerId",this.ActionWorkLedgerId),
|
||||
};
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 增加、修改、删除、审核、审批、上报按钮事件
|
||||
/// <summary>
|
||||
/// Tree增加按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionWorkLedgerAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示编辑页面
|
||||
/// </summary>
|
||||
private void ShowEdit()
|
||||
{
|
||||
Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report == null)
|
||||
{
|
||||
Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ActionWorkLedgerAdd.aspx?ActionWorkLedgerId={0}", report.ActionWorkLedgerId, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tree编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审批
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tree删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(),
|
||||
report.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnDelete);
|
||||
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.ActionWorkLedgerId);
|
||||
BLL.ActionWorkLedgerItemService.DeleteActionWorkLedgerItemList(report.ActionWorkLedgerId);
|
||||
BLL.ActionWorkLedgerService.DeleteActionWorkLedgerById(report.ActionWorkLedgerId);
|
||||
|
||||
SetEmpty();
|
||||
//this.btnNew.Hidden = false;
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 过滤、分页、排序、关闭窗口
|
||||
/// <summary>
|
||||
/// 表头过滤
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid1排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页列表显示条数下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭Grid1弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ActionWorkLedgerMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
//this.btnNew.Hidden = false;
|
||||
this.btnGet.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnPrint))
|
||||
//{
|
||||
// this.btnPrint.Hidden = false;
|
||||
//}
|
||||
int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue);
|
||||
int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue);
|
||||
var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter);
|
||||
this.btnAudit1.Hidden = true;
|
||||
this.btnAudit2.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
if (report != null)
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入
|
||||
{
|
||||
if (report.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
this.btnAudit1.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
this.btnAudit2.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnDelete.Hidden = true;
|
||||
this.btnUpdata.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
this.btnUpdata.Hidden = true;
|
||||
this.btnEdit.Hidden = true;
|
||||
this.btnDelete.Hidden = true;
|
||||
}
|
||||
if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName)
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnEdit.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.CurrUser.PersonId == BLL.Const.sysglyId)
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 单位下拉框联动事件
|
||||
/// <summary>
|
||||
/// 单位下拉框联动事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取
|
||||
/// <summary>
|
||||
/// 获取按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report == null)
|
||||
{
|
||||
var returnValue = getActionWorkLedgerToSUB();
|
||||
if (returnValue.code == 1)
|
||||
{
|
||||
ShowNotify(returnValue.message, MessageBoxIcon.Success);
|
||||
GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(returnValue.message, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("该季度记录已存在,无需获取!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getActionWorkLedgerToSUB()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId = BLL.Const.UnitId_SEDIN;
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getActionWorkLedger?year=" + this.drpYear.SelectedValue + "&quarter=" + this.drpQuarter.SelectedValue;
|
||||
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.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int i = 0;
|
||||
string actionWorkLedgerId = SQLHelper.GetNewID();
|
||||
foreach (var item in getData)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Model.Information_ActionWorkLedger actionWorkLedger = new Model.Information_ActionWorkLedger();
|
||||
actionWorkLedger.ActionWorkLedgerId = actionWorkLedgerId;
|
||||
actionWorkLedger.UnitId = BLL.Const.UnitId_SEDIN;
|
||||
actionWorkLedger.ReportDate = DateTime.Now;
|
||||
actionWorkLedger.Quarter = Funs.GetNewInt(this.drpQuarter.SelectedValue);
|
||||
actionWorkLedger.YearId = Funs.GetNewInt(this.drpYear.SelectedValue);
|
||||
actionWorkLedger.CompileMan = this.CurrUser.PersonName;
|
||||
actionWorkLedger.UpState = BLL.Const.UpState_2;
|
||||
actionWorkLedger.HandleState = BLL.Const.HandleState_1;
|
||||
actionWorkLedger.HandleMan = this.CurrUser.PersonId;
|
||||
BLL.ActionWorkLedgerService.AddActionWorkLedger(actionWorkLedger);
|
||||
}
|
||||
Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem();
|
||||
newItem.ActionWorkLedgerItemId = SQLHelper.GetNewID();
|
||||
newItem.ActionWorkLedgerId = actionWorkLedgerId;
|
||||
newItem.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString());
|
||||
newItem.Focus = item["Focus"].ToString();
|
||||
newItem.SpecialTask = item["SpecialTask"].ToString();
|
||||
newItem.WorkPoints = item["WorkPoints"].ToString();
|
||||
newItem.FillingRequirements = item["FillingRequirements"].ToString();
|
||||
newItem.CompletionDeadline = item["CompletionDeadline"].ToString();
|
||||
BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(newItem);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
responeData.message = "获取成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "集团记录尚未生成!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("中央企业安全生产治本攻坚三年行动工作台账获取!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭导入弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭查看审批信息弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window4_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 打印
|
||||
/// <summary>
|
||||
/// 打印
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
//if (report != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_ActionWorkLedgerId, report.ActionWorkLedgerId, "", "打印 - ")));
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 季度向前/向后
|
||||
/// <summary>
|
||||
/// 前一季度
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetMonthChange("-");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后一季度
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BulletRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetMonthChange("+");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 季度加减变化
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SetMonthChange(string type)
|
||||
{
|
||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString());
|
||||
if (nowDate.HasValue)
|
||||
{
|
||||
DateTime showDate = new DateTime();
|
||||
if (type == "+")
|
||||
{
|
||||
showDate = nowDate.Value.AddMonths(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
showDate = nowDate.Value.AddMonths(-3);
|
||||
}
|
||||
|
||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||
this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
||||
///值变化
|
||||
GetValue();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看审批信息
|
||||
/// <summary>
|
||||
/// 查看审批信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSee_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.ActionWorkLedgerId, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("所选月份无记录!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("中央企业安全生产治本攻坚三年行动工作台账" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,276 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information {
|
||||
|
||||
|
||||
public partial class ActionWorkLedger {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// RegionPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RegionPanel RegionPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// Region2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Region Region2;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletLeft 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletLeft;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletRight 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletRight;
|
||||
|
||||
/// <summary>
|
||||
/// btnSee 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSee;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnGet 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnGet;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit2;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdata 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdata;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// lbHandleMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbHandleMan;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,108 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActionWorkLedgerAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.ActionWorkLedgerAdd" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<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="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:DropDownList ID="ddlUnitId" runat="server" Label="单位" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlYearId" runat="server" Label="年度" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlQuarter" runat="server" Label="季度" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="制表时间" ID="dpkCompileDate"
|
||||
Required="True" ShowRedStar="True">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="ActionWorkLedgerItemId" AllowCellEditing="true"
|
||||
ClicksToEdit="1" DataIDField="ActionWorkLedgerItemId" EnableColumnLines="true"
|
||||
OnRowCommand="Grid1_RowCommand" EnableHeaderMenu="false" Width="1200px" Height="360px">
|
||||
<Columns>
|
||||
<f:RenderField Width="55px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String"
|
||||
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="Focus" DataField="Focus" FieldType="String"
|
||||
HeaderText="重点工作" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="SpecialTask" DataField="SpecialTask"
|
||||
FieldType="String" HeaderText="专项任务" HeaderTextAlign="Center"
|
||||
TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="WorkPoints" DataField="WorkPoints"
|
||||
FieldType="String" HeaderText="工作要点" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="FillingRequirements" DataField="FillingRequirements"
|
||||
FieldType="String" HeaderText="填报要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="CompletionDeadline" DataField="CompletionDeadline"
|
||||
FieldType="String" HeaderText="完成期限" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="ImplementationStatus" DataField="ImplementationStatus" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="落实情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextArea ID="txtImplementationStatus" Text='<%# Eval("ImplementationStatus")%>' runat="server" AutoGrowHeight="true">
|
||||
</f:TextArea>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="55px" ColumnID="ActionWorkLedgerItemId" DataField="ActionWorkLedgerItemId" FieldType="String"
|
||||
HeaderText="主键" HeaderTextAlign="Center" TextAlign="Center" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnCopy" Icon="Database" runat="server" ToolTip="复制上季度数据" ValidateForms="SimpleForm1"
|
||||
OnClick="btnCopy_Click" Hidden="true" MarginLeft="10px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Hidden="true"
|
||||
ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Hidden="true" ToolTip="提交"
|
||||
ValidateForms="SimpleForm1" OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdata" Icon="PageSave" runat="server" Hidden="true" ConfirmText="确定上报?"
|
||||
ToolTip="上报" ValidateForms="SimpleForm1" OnClick="btnUpdata_Click" MarginRight="10px">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['Focus','SpecialTask'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,534 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
public partial class ActionWorkLedgerAdd : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
public string ActionWorkLedgerId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["ActionWorkLedgerId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["ActionWorkLedgerId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.Information_ActionWorkLedgerItem> items = new List<Model.Information_ActionWorkLedgerItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
items.Clear();
|
||||
this.ddlUnitId.DataTextField = "UnitName";
|
||||
this.ddlUnitId.DataValueField = "UnitId";
|
||||
this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
||||
this.ddlUnitId.DataBind();
|
||||
|
||||
this.ddlYearId.DataTextField = "ConstText";
|
||||
ddlYearId.DataValueField = "ConstValue";
|
||||
ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008);
|
||||
ddlYearId.DataBind();
|
||||
|
||||
this.ddlQuarter.DataTextField = "ConstText";
|
||||
ddlQuarter.DataValueField = "ConstValue";
|
||||
ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011);
|
||||
ddlQuarter.DataBind();
|
||||
this.ddlUnitId.Readonly = true;
|
||||
string unitId = Request.Params["UnitId"];
|
||||
string year = Request.QueryString["Year"];
|
||||
string quarter = Request.QueryString["Quarter"];
|
||||
this.ActionWorkLedgerId = Request.Params["ActionWorkLedgerId"];
|
||||
if (!string.IsNullOrEmpty(this.ActionWorkLedgerId))
|
||||
{
|
||||
items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(this.ActionWorkLedgerId);
|
||||
this.Grid1.DataSource = items;
|
||||
this.Grid1.DataBind();
|
||||
|
||||
var ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId);
|
||||
if (ActionWorkLedger != null)
|
||||
{
|
||||
this.btnCopy.Hidden = true;
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
if (ActionWorkLedger.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnUpdata.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ActionWorkLedger.HandleMan == this.CurrUser.PersonId)
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (ActionWorkLedger.UpState == BLL.Const.UpState_3) //已上报
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(ActionWorkLedger.UnitId))
|
||||
{
|
||||
this.ddlUnitId.SelectedValue = ActionWorkLedger.UnitId;
|
||||
}
|
||||
if (ActionWorkLedger.YearId.HasValue)
|
||||
{
|
||||
this.ddlYearId.SelectedValue = ActionWorkLedger.YearId.ToString();
|
||||
}
|
||||
if (ActionWorkLedger.Quarter.HasValue)
|
||||
{
|
||||
this.ddlQuarter.SelectedValue = ActionWorkLedger.Quarter.ToString();
|
||||
}
|
||||
if (ActionWorkLedger.ReportDate != null)
|
||||
{
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", ActionWorkLedger.ReportDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.btnCopy.Hidden = false;
|
||||
this.ddlUnitId.SelectedValue = unitId;
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.ddlYearId.SelectedValue = year;
|
||||
this.ddlQuarter.SelectedValue = quarter;
|
||||
////获取项目报告集合
|
||||
//List<Model.InformationProject_ActionWorkLedgerItem> projectItems = (from x in Funs.DB.InformationProject_ActionWorkLedger
|
||||
// join y in Funs.DB.InformationProject_ActionWorkLedgerItem
|
||||
// on x.ActionWorkLedgerId equals y.ActionWorkLedgerId
|
||||
// where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2
|
||||
// select y).Distinct().ToList();
|
||||
//if (projectItems.Count > 0)
|
||||
//{
|
||||
// int i = 0;
|
||||
// foreach (var projectItem in projectItems)
|
||||
// {
|
||||
// i += 10;
|
||||
// Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem
|
||||
// {
|
||||
// ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)),
|
||||
// SortIndex = i
|
||||
// };
|
||||
// Model.Base_Project project = (from x in Funs.DB.Base_Project
|
||||
// join y in Funs.DB.InformationProject_ActionWorkLedger
|
||||
// on x.ProjectId equals y.ProjectId
|
||||
// join z in Funs.DB.InformationProject_ActionWorkLedgerItem
|
||||
// on y.ActionWorkLedgerId equals z.ActionWorkLedgerId
|
||||
// where z.ActionWorkLedgerItemId == projectItem.ActionWorkLedgerItemId
|
||||
// select x).FirstOrDefault();
|
||||
// if (project != null)
|
||||
// {
|
||||
// item.IndustryType = project.ProjectName;
|
||||
// }
|
||||
// item.TotalConductCount = projectItem.TotalConductCount;
|
||||
// item.TotalPeopleCount = projectItem.TotalPeopleCount;
|
||||
// item.TotalInvestment = projectItem.TotalInvestment;
|
||||
// item.HQConductCount = projectItem.HQConductCount;
|
||||
// item.HQPeopleCount = projectItem.HQPeopleCount;
|
||||
// item.HQInvestment = projectItem.HQInvestment;
|
||||
// item.BasicConductCount = projectItem.BasicConductCount;
|
||||
// item.BasicPeopleCount = projectItem.BasicPeopleCount;
|
||||
// item.BasicInvestment = projectItem.BasicInvestment;
|
||||
// item.ComprehensivePractice = projectItem.ComprehensivePractice;
|
||||
// item.CPScene = projectItem.CPScene;
|
||||
// item.CPDesktop = projectItem.CPDesktop;
|
||||
// item.SpecialDrill = projectItem.SpecialDrill;
|
||||
// item.SDScene = projectItem.SDScene;
|
||||
// item.SDDesktop = projectItem.SDDesktop;
|
||||
// items.Add(item);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// for (int i = 0; i < 100; i++)
|
||||
// {
|
||||
// i += 10;
|
||||
// Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem
|
||||
// {
|
||||
// ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)),
|
||||
// SortIndex = i
|
||||
// };
|
||||
// items.Add(newItem);
|
||||
// }
|
||||
//}
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存、提交、上报
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("add");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("updata");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("submit");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void Save(string type)
|
||||
{
|
||||
if (this.ddlUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var drill = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.ActionWorkLedgerId);
|
||||
if (drill != null)
|
||||
{
|
||||
ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var ActionWorkLedger = new Model.Information_ActionWorkLedger();
|
||||
if (this.ddlUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
ActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim()))
|
||||
{
|
||||
ActionWorkLedger.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim());
|
||||
}
|
||||
ActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue);
|
||||
ActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue);
|
||||
if (string.IsNullOrEmpty(this.ActionWorkLedgerId))
|
||||
{
|
||||
this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger)); ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId;
|
||||
ActionWorkLedger.CompileMan = this.CurrUser.PersonName;
|
||||
ActionWorkLedger.UpState = BLL.Const.UpState_2;
|
||||
ActionWorkLedger.HandleMan = this.CurrUser.PersonId;
|
||||
ActionWorkLedger.HandleState = BLL.Const.HandleState_1;
|
||||
BLL.ActionWorkLedgerService.AddActionWorkLedger(ActionWorkLedger);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(),
|
||||
ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Information_ActionWorkLedger oldReport = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId);
|
||||
if (oldReport != null)
|
||||
{
|
||||
ActionWorkLedger.HandleMan = oldReport.HandleMan;
|
||||
ActionWorkLedger.HandleState = oldReport.HandleState;
|
||||
}
|
||||
ActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId;
|
||||
ActionWorkLedger.UpState = BLL.Const.UpState_2;
|
||||
BLL.ActionWorkLedgerService.UpdateActionWorkLedger(ActionWorkLedger);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, ActionWorkLedger.YearId.ToString() + "-" + ActionWorkLedger.Quarter.ToString(),
|
||||
ActionWorkLedger.ActionWorkLedgerId, BLL.Const.ActionWorkLedgerMenuId, BLL.Const.BtnModify);
|
||||
BLL.ActionWorkLedgerItemService.DeleteActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId);
|
||||
}
|
||||
GetItems(ActionWorkLedger.ActionWorkLedgerId);
|
||||
foreach (var item in items)
|
||||
{
|
||||
BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(item);
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
if (ActionWorkLedger.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpActionWorkLedger(ActionWorkLedger.ActionWorkLedgerId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=ActionWorkLedger&Id={0}", ActionWorkLedger.ActionWorkLedgerId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取明细值
|
||||
/// </summary>
|
||||
/// <param name="ActionWorkLedgerId"></param>
|
||||
private void GetItems(string ActionWorkLedgerId)
|
||||
{
|
||||
items.Clear();
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
Model.Information_ActionWorkLedgerItem item = new Model.Information_ActionWorkLedgerItem();
|
||||
if (values["ActionWorkLedgerItemId"].ToString() != "")
|
||||
{
|
||||
item.ActionWorkLedgerItemId = values.Value<string>("ActionWorkLedgerItemId");
|
||||
}
|
||||
item.ActionWorkLedgerId = ActionWorkLedgerId;
|
||||
item.SortIndex = Funs.GetNewInt(values.Value<string>("SortIndex"));
|
||||
if (values["Focus"].ToString() != "")
|
||||
{
|
||||
item.Focus = values.Value<string>("Focus");
|
||||
}
|
||||
if (values["SpecialTask"].ToString() != "")
|
||||
{
|
||||
item.SpecialTask = values.Value<string>("SpecialTask");
|
||||
}
|
||||
if (values["WorkPoints"].ToString() != "")
|
||||
{
|
||||
item.WorkPoints = values.Value<string>("WorkPoints");
|
||||
}
|
||||
if (values["FillingRequirements"].ToString() != "")
|
||||
{
|
||||
item.FillingRequirements = values.Value<string>("FillingRequirements");
|
||||
}
|
||||
if (values["CompletionDeadline"].ToString() != "")
|
||||
{
|
||||
item.CompletionDeadline = values.Value<string>("CompletionDeadline");
|
||||
}
|
||||
if (values["ImplementationStatus"].ToString() != "")
|
||||
{
|
||||
item.ImplementationStatus = values.Value<string>("ImplementationStatus");
|
||||
}
|
||||
items.Add(item);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭办理流程窗口
|
||||
/// <summary>
|
||||
/// 关闭办理流程窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
Model.Information_ActionWorkLedger report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(this.ActionWorkLedgerId);
|
||||
if (report.HandleMan == this.CurrUser.PersonId)
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid行事件
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
GetItems(string.Empty);
|
||||
if (e.CommandName == "Add")
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem oldItem = items.FirstOrDefault(x => x.ActionWorkLedgerItemId == rowID);
|
||||
Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem))
|
||||
};
|
||||
if (oldItem != null)
|
||||
{
|
||||
newItem.SortIndex = oldItem.SortIndex + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newItem.SortIndex = 0;
|
||||
}
|
||||
items.Add(newItem);
|
||||
items = items.OrderBy(x => x.SortIndex).ToList();
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
if (Grid1.Rows.Count == 1)
|
||||
{
|
||||
ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item.ActionWorkLedgerItemId == rowID)
|
||||
{
|
||||
items.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ActionWorkLedgerMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnCopy.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnSaveUp))
|
||||
//{
|
||||
// this.btnUpdata.Hidden = false;
|
||||
|
||||
//}
|
||||
if (buttonList.Contains(BLL.Const.BtnSubmit))
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 复制上个季度数据
|
||||
/// <summary>
|
||||
/// 复制上个季度的数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
int lastYear = 0, lastQuarter = 0;
|
||||
int year = Convert.ToInt32(this.ddlYearId.SelectedValue);
|
||||
int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue);
|
||||
if (quarter == 1)
|
||||
{
|
||||
lastYear = year - 1;
|
||||
lastQuarter = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastYear = year;
|
||||
lastQuarter = quarter - 1;
|
||||
}
|
||||
Model.Information_ActionWorkLedger ActionWorkLedger = BLL.ActionWorkLedgerService.GetActionWorkLedgerByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter);
|
||||
if (ActionWorkLedger != null)
|
||||
{
|
||||
Model.Information_ActionWorkLedger newActionWorkLedger = new Model.Information_ActionWorkLedger();
|
||||
this.ActionWorkLedgerId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedger));
|
||||
newActionWorkLedger.ActionWorkLedgerId = this.ActionWorkLedgerId;
|
||||
newActionWorkLedger.UnitId = this.ddlUnitId.SelectedValue;
|
||||
newActionWorkLedger.ReportDate = DateTime.Now;
|
||||
newActionWorkLedger.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue);
|
||||
newActionWorkLedger.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue);
|
||||
newActionWorkLedger.CompileMan = this.CurrUser.PersonName;
|
||||
newActionWorkLedger.UpState = BLL.Const.UpState_2;
|
||||
newActionWorkLedger.HandleState = BLL.Const.HandleState_1;
|
||||
newActionWorkLedger.HandleMan = this.CurrUser.PersonId;
|
||||
BLL.ActionWorkLedgerService.AddActionWorkLedger(newActionWorkLedger);
|
||||
|
||||
items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedger.ActionWorkLedgerId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
Model.Information_ActionWorkLedgerItem newItem = new Model.Information_ActionWorkLedgerItem
|
||||
{
|
||||
ActionWorkLedgerItemId = SQLHelper.GetNewID(typeof(Model.Information_ActionWorkLedgerItem)),
|
||||
ActionWorkLedgerId = this.ActionWorkLedgerId,
|
||||
SortIndex = item.SortIndex
|
||||
};
|
||||
BLL.ActionWorkLedgerItemService.AddActionWorkLedgerItem(newItem);
|
||||
}
|
||||
}
|
||||
GetValues(newActionWorkLedger.ActionWorkLedgerId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据
|
||||
/// </summary>
|
||||
private void GetValues(string ActionWorkLedgerId)
|
||||
{
|
||||
var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(ActionWorkLedgerId);
|
||||
if (report != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(report.UnitId))
|
||||
{
|
||||
this.ddlUnitId.SelectedValue = report.UnitId;
|
||||
}
|
||||
if (report.YearId.HasValue)
|
||||
{
|
||||
this.ddlYearId.SelectedValue = report.YearId.ToString();
|
||||
}
|
||||
if (report.Quarter.HasValue)
|
||||
{
|
||||
this.ddlQuarter.SelectedValue = report.Quarter.ToString();
|
||||
}
|
||||
if (report.ReportDate != null)
|
||||
{
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate);
|
||||
}
|
||||
items = BLL.ActionWorkLedgerItemService.GetActionWorkLedgerItemList(ActionWorkLedgerId);
|
||||
this.Grid1.DataSource = items;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,150 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information {
|
||||
|
||||
|
||||
public partial class ActionWorkLedgerAdd {
|
||||
|
||||
/// <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>
|
||||
/// ddlUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// ddlYearId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlYearId;
|
||||
|
||||
/// <summary>
|
||||
/// ddlQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// dpkCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpkCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtImplementationStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtImplementationStatus;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCopy 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnCopy;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdata 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdata;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -205,6 +205,34 @@ namespace FineUIPro.Web.ZHGL.Information
|
||||
//}
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产治本攻坚三年行动工作台账
|
||||
if (Type == "ActionWorkLedger")//中央企业安全生产治本攻坚三年行动工作台账
|
||||
{
|
||||
var report = BLL.ActionWorkLedgerService.GetActionWorkLedgerById(Id);
|
||||
if (report != null)
|
||||
{
|
||||
SetFlowData(Const.ActionWorkLedgerMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.ActionWorkLedgerService.UpdateActionWorkLedger(report);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 中央企业安全生产管理评价工作调度台账
|
||||
if (Type == "SafetyProductionEvaluation")//中央企业安全生产管理评价工作调度台账
|
||||
{
|
||||
var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(Id);
|
||||
if (report != null)
|
||||
{
|
||||
SetFlowData(Const.SafetyProductionEvaluationMenuId, this.Id, handleMan);
|
||||
report.HandleState = handleStates;
|
||||
report.HandleMan = handleMan;
|
||||
BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(report);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
ShowNotify("提交成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
|
||||
@@ -0,0 +1,163 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluation.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluation" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title>中央企业安全生产管理评价工作调度台账</title>
|
||||
<link href="../../res/css/common.css" rel="stylesheet" type="text/css" />
|
||||
<style>
|
||||
.f-grid-row-summary .f-grid-cell-inner {
|
||||
font-weight: bold;
|
||||
color: red;
|
||||
}
|
||||
|
||||
.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" runat="server" AutoSizePanelID="RegionPanel1" />
|
||||
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
|
||||
<Regions>
|
||||
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox"
|
||||
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server" Title="">
|
||||
<Items>
|
||||
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="true" AutoScroll="true" BodyPadding="10px"
|
||||
runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Top" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:DropDownList ID="drpUnit" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="350px"
|
||||
LabelWidth="70px" Label="单位" EnableEdit="true" ForceSelection="false" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpYear" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="150px"
|
||||
LabelWidth="50px" Label="年度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="drpQuarter" AutoPostBack="true" EnableSimulateTree="true" runat="server" Width="150px"
|
||||
LabelWidth="50px" Label="季度" OnSelectedIndexChanged="drpUnit_SelectedIndexChanged">
|
||||
</f:DropDownList>
|
||||
<f:Button ID="BtnBulletLeft" ToolTip="前一季度" Icon="BulletLeft" runat="server" EnablePostBack="true"
|
||||
OnClick="BtnBulletLeft_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="BtnBulletRight" ToolTip="后一季度" Icon="BulletRight" runat="server" EnablePostBack="true"
|
||||
OnClick="BulletRight_Click">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSee" ToolTip="查看审批流程" Icon="Find" runat="server" OnClick="btnSee_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnNew" ToolTip="新增" Hidden="true" Icon="Add" runat="server" OnClick="btnNew_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnGet" ToolTip="获取" Icon="Add" Hidden="true" runat="server"
|
||||
OnClick="btnGet_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnEdit" ToolTip="编辑" Hidden="true" Icon="Pencil" runat="server" OnClick="btnEdit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnDelete" ToolTip="删除" Hidden="true" Icon="Delete" ConfirmText="确定删除当前数据?"
|
||||
OnClick="btnDelete_Click" runat="server">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit1" ToolTip="审核" Icon="Pencil" Hidden="true" runat="server" OnClick="btnAudit1_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnAudit2" ToolTip="审批" Icon="Pencil" Hidden="true" runat="server" OnClick="btnAudit2_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdata" ToolTip="上报" Icon="PageSave" Hidden="true" runat="server" OnClick="btnUpdata_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
|
||||
EnableAjax="false" DisableControlBeforePostBack="false">
|
||||
</f:Button>
|
||||
<%--<f:Button ID="btnPrint" ToolTip="打印" Icon="Printer" Hidden="true" runat="server"
|
||||
OnClick="btnPrint_Click">
|
||||
</f:Button>--%>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
<Rows>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Label ID="txtUnitName" runat="server" Hidden="true">
|
||||
</f:Label>
|
||||
<f:Label ID="txtQuarter" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="txtCompileDate" runat="server">
|
||||
</f:Label>
|
||||
<f:Label ID="lbHandleMan" runat="server">
|
||||
</f:Label>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
</f:Form>
|
||||
<f:Grid ID="Grid1" Width="870px" ShowBorder="true" ShowHeader="false" EnableCollapse="true"
|
||||
runat="server" BoxFlex="1" DataKeyNames="SafetyProductionEvaluationItemId"
|
||||
AllowCellEditing="true" ClicksToEdit="2" DataIDField="SafetyProductionEvaluationItemId"
|
||||
AllowSorting="true" SortField="SortIndex" SortDirection="ASC" OnSort="Grid1_Sort"
|
||||
AllowPaging="false" PageSize="1000" OnPageIndexChange="Grid1_PageIndexChange"
|
||||
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableColumnLines="true">
|
||||
<Columns>
|
||||
<f:RenderField Width="55px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String"
|
||||
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="Type" DataField="Type" FieldType="String"
|
||||
HeaderText="类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="EvaluateWork" DataField="EvaluateWork"
|
||||
FieldType="String" HeaderText="评价工作" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="EvaluationContent" DataField="EvaluationContent"
|
||||
FieldType="String" HeaderText="评价内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="FillingRequirements" DataField="FillingRequirements"
|
||||
FieldType="String" HeaderText="填报要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="CompletionDeadline" DataField="CompletionDeadline"
|
||||
FieldType="String" HeaderText="完成期限" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="ImplementationStatus" DataField="ImplementationStatus" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="落实情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:Region>
|
||||
</Regions>
|
||||
</f:RegionPanel>
|
||||
<f:Window ID="Window1" Title="编辑中央企业安全生产管理评价工作调度台账" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Parent" EnableResize="true" runat="server" OnClose="Window1_Close" IsModal="false"
|
||||
CloseAction="HidePostBack" Width="1300px" Height="540px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window2" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window2_Close"
|
||||
Title="导入中央企业安全生产管理评价工作调度台账" CloseAction="HidePostBack" EnableIFrame="true" Height="600px"
|
||||
Width="900px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window3" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true"
|
||||
Title="打印中央企业安全生产管理评价工作调度台账" CloseAction="HidePostBack" EnableIFrame="true" Height="768px"
|
||||
Width="1024px">
|
||||
</f:Window>
|
||||
<f:Window ID="Window4" Title="查看审核信息" Hidden="true" EnableIFrame="true" EnableMaximize="true"
|
||||
Target="Self" EnableResize="true" runat="server" IsModal="true" OnClose="Window4_Close"
|
||||
Width="1024px" Height="500px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['Type','EvaluateWork','EvaluationContent','FillingRequirements'], {
|
||||
depends: true
|
||||
});
|
||||
|
||||
this.mergeColumns(['FillingRequirements'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,619 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.Data.SqlClient;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using AspNet = System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
public partial class SafetyProductionEvaluation : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
/// <summary>
|
||||
/// 主键
|
||||
/// </summary>
|
||||
public string SafetyProductionEvaluationId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["SafetyProductionEvaluationId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SafetyProductionEvaluationId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.Information_SafetyProductionEvaluationItem> SafetyProductionEvaluationItems = new List<Model.Information_SafetyProductionEvaluationItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpQuarter, ConstValue.Group_0011, false);
|
||||
BLL.ConstValue.InitConstValueDropDownList(this.drpYear, ConstValue.Group_0008, false);
|
||||
this.drpUnit.DataTextField = "UnitName";
|
||||
drpUnit.DataValueField = "UnitId";
|
||||
drpUnit.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
||||
drpUnit.DataBind();
|
||||
this.drpUnit.Readonly = true;
|
||||
DateTime showDate = System.DateTime.Now.AddMonths(-3);
|
||||
this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||
GetValue();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 清空文本框
|
||||
private void SetEmpty()
|
||||
{
|
||||
this.SimpleForm1.Title = string.Empty;
|
||||
txtUnitName.Text = string.Empty;
|
||||
txtQuarter.Text = string.Empty;
|
||||
txtCompileDate.Text = string.Empty;
|
||||
this.lbHandleMan.Text = string.Empty;
|
||||
Grid1.DataSource = null;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取记录值
|
||||
private void GetValue()
|
||||
{
|
||||
int year = Funs.GetNewIntOrZero(drpYear.SelectedValue);
|
||||
int quarter = Funs.GetNewIntOrZero(drpQuarter.SelectedValue);
|
||||
this.SafetyProductionEvaluationId = string.Empty;
|
||||
Model.View_Information_SafetyProductionEvaluation report = Funs.DB.View_Information_SafetyProductionEvaluation.FirstOrDefault(e => e.UnitId == drpUnit.SelectedValue && e.Quarter == quarter && e.YearId == year);
|
||||
if (report != null)
|
||||
{
|
||||
string state = string.Empty;
|
||||
if (report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
state = "(已上报)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (report.HandleState == BLL.Const.HandleState_1)
|
||||
{
|
||||
state = "(待提交)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
state = "(待审核)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
state = "(待审批)";
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
state = "(待上报)";
|
||||
}
|
||||
}
|
||||
this.SimpleForm1.Title = "中央企业安全生产管理评价工作调度台账" + state;
|
||||
this.SafetyProductionEvaluationId = report.SafetyProductionEvaluationId;
|
||||
txtUnitName.Text = "单位:" + report.UnitName;
|
||||
txtQuarter.Text = "季度:" + report.Quarters;
|
||||
if (report.HandleState == BLL.Const.HandleState_1 || report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
this.lbHandleMan.Hidden = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.lbHandleMan.Hidden = false;
|
||||
this.lbHandleMan.Text = "下一步办理人:" + report.UserName;
|
||||
}
|
||||
if (report.ReportDate != null)
|
||||
{
|
||||
txtCompileDate.Text = "制表时间:" + string.Format("{0:yyyy-MM-dd}", report.ReportDate);
|
||||
}
|
||||
BindGrid1();
|
||||
}
|
||||
else
|
||||
{
|
||||
SetEmpty();
|
||||
}
|
||||
this.GetButtonPower();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 加载Grid
|
||||
private void BindGrid1()
|
||||
{
|
||||
string strSql = "select * from dbo.Information_SafetyProductionEvaluationItem where SafetyProductionEvaluationId = @SafetyProductionEvaluationId order by SortIndex";
|
||||
SqlParameter[] parameter = new SqlParameter[]
|
||||
{
|
||||
new SqlParameter("@SafetyProductionEvaluationId",this.SafetyProductionEvaluationId),
|
||||
};
|
||||
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
|
||||
Grid1.RecordCount = tb.Rows.Count;
|
||||
//tb = GetFilteredTable(Grid1.FilteredData, tb);
|
||||
var table = this.GetPagedDataTable(Grid1, tb);
|
||||
|
||||
Grid1.DataSource = table;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 增加、修改、删除、审核、审批、上报按钮事件
|
||||
/// <summary>
|
||||
/// Tree增加按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnNew_Click(object sender, EventArgs e)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?UnitId={0}&&Year={1}&&Quarter={2}", this.CurrUser.UnitId, this.drpYear.SelectedValue, this.drpQuarter.SelectedValue, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 显示编辑页面
|
||||
/// </summary>
|
||||
private void ShowEdit()
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report == null)
|
||||
{
|
||||
Alert.ShowInTop("所选时间无报表记录!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SafetyProductionEvaluationAdd.aspx?SafetyProductionEvaluationId={0}", report.SafetyProductionEvaluationId, "编辑 - ")));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tree编辑按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnEdit_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审核
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit1_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 审批
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnAudit2_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
ShowEdit();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tree删除按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnDelete_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report != null)
|
||||
{
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, report.YearId.ToString() + "-" + report.Quarter.ToString(),
|
||||
report.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnDelete);
|
||||
BLL.ProjectDataFlowSetService.DeleteFlowSetByDataId(report.SafetyProductionEvaluationId);
|
||||
BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(report.SafetyProductionEvaluationId);
|
||||
BLL.SafetyProductionEvaluationService.DeleteSafetyProductionEvaluationById(report.SafetyProductionEvaluationId);
|
||||
|
||||
SetEmpty();
|
||||
//this.btnNew.Hidden = false;
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("所选时间无报表记录!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 过滤、分页、排序、关闭窗口
|
||||
/// <summary>
|
||||
/// 表头过滤
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_FilterChange(object sender, EventArgs e)
|
||||
{
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
|
||||
{
|
||||
Grid1.PageIndex = e.NewPageIndex;
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Grid1排序
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Grid1_Sort(object sender, GridSortEventArgs e)
|
||||
{
|
||||
Grid1.SortDirection = e.SortDirection;
|
||||
Grid1.SortField = e.SortField;
|
||||
BindGrid1();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页列表显示条数下拉选择事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭Grid1弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SafetyProductionEvaluationMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnAdd))
|
||||
{
|
||||
//this.btnNew.Hidden = false;
|
||||
this.btnGet.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnModify))
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
if (buttonList.Contains(BLL.Const.BtnDelete))
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnPrint))
|
||||
//{
|
||||
// this.btnPrint.Hidden = false;
|
||||
//}
|
||||
int year = Funs.GetNewIntOrZero(this.drpYear.SelectedValue);
|
||||
int quarter = Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue);
|
||||
var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.drpUnit.SelectedValue, year, quarter);
|
||||
this.btnAudit1.Hidden = true;
|
||||
this.btnAudit2.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
if (report != null)
|
||||
{
|
||||
this.btnNew.Hidden = true;
|
||||
if (report.HandleMan == this.CurrUser.PersonId) //当前人是下一步办理入
|
||||
{
|
||||
if (report.HandleState == BLL.Const.HandleState_2)
|
||||
{
|
||||
this.btnAudit1.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_3)
|
||||
{
|
||||
this.btnAudit2.Hidden = false;
|
||||
}
|
||||
else if (report.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnDelete.Hidden = true;
|
||||
this.btnUpdata.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (report.UpState == BLL.Const.UpState_3)
|
||||
{
|
||||
this.btnUpdata.Hidden = true;
|
||||
this.btnEdit.Hidden = true;
|
||||
this.btnDelete.Hidden = true;
|
||||
}
|
||||
if (report.HandleMan == this.CurrUser.PersonId || report.CompileMan == this.CurrUser.PersonName)
|
||||
{
|
||||
this.btnEdit.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnEdit.Hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (this.CurrUser.PersonId == BLL.Const.sysglyId)
|
||||
{
|
||||
this.btnDelete.Hidden = false;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 单位下拉框联动事件
|
||||
/// <summary>
|
||||
/// 单位下拉框联动事件
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void drpUnit_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取
|
||||
/// <summary>
|
||||
/// 获取按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnGet_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report == null)
|
||||
{
|
||||
var returnValue = getSafetyProductionEvaluationToSUB();
|
||||
if (returnValue.code == 1)
|
||||
{
|
||||
ShowNotify(returnValue.message, MessageBoxIcon.Success);
|
||||
GetValue();
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop(returnValue.message, MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInTop("该季度记录已存在,无需获取!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
/// <returns></returns>
|
||||
public Model.ResponeData getSafetyProductionEvaluationToSUB()
|
||||
{
|
||||
var responeData = new Model.ResponeData();
|
||||
try
|
||||
{
|
||||
string unitId = BLL.Const.UnitId_SEDIN;
|
||||
string baseurl = SysConstSetService.CNCECPath + "/api/HSSEData/getSafetyProductionEvaluation?year=" + this.drpYear.SelectedValue + "&quarter=" + this.drpQuarter.SelectedValue;
|
||||
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.SGGLDB db = new Model.SGGLDB(Funs.ConnString))
|
||||
{
|
||||
int i = 0;
|
||||
string SafetyProductionEvaluationId = SQLHelper.GetNewID();
|
||||
foreach (var item in getData)
|
||||
{
|
||||
if (i == 0)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation();
|
||||
SafetyProductionEvaluation.SafetyProductionEvaluationId = SafetyProductionEvaluationId;
|
||||
SafetyProductionEvaluation.UnitId = BLL.Const.UnitId_SEDIN;
|
||||
SafetyProductionEvaluation.ReportDate = DateTime.Now;
|
||||
SafetyProductionEvaluation.Quarter = Funs.GetNewInt(this.drpQuarter.SelectedValue);
|
||||
SafetyProductionEvaluation.YearId = Funs.GetNewInt(this.drpYear.SelectedValue);
|
||||
SafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName;
|
||||
SafetyProductionEvaluation.UpState = BLL.Const.UpState_2;
|
||||
SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1;
|
||||
SafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId;
|
||||
BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation);
|
||||
}
|
||||
Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem();
|
||||
newItem.SafetyProductionEvaluationItemId = SQLHelper.GetNewID();
|
||||
newItem.SafetyProductionEvaluationId = SafetyProductionEvaluationId;
|
||||
newItem.SortIndex = Funs.GetNewInt(item["SortIndex"].ToString());
|
||||
newItem.Type = item["Type"].ToString();
|
||||
newItem.EvaluateWork = item["EvaluateWork"].ToString();
|
||||
newItem.EvaluationContent = item["EvaluationContent"].ToString();
|
||||
newItem.FillingRequirements = item["FillingRequirements"].ToString();
|
||||
newItem.CompletionDeadline = item["CompletionDeadline"].ToString();
|
||||
BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem);
|
||||
i++;
|
||||
}
|
||||
}
|
||||
responeData.message = "获取成功!";
|
||||
}
|
||||
else
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "集团记录尚未生成!";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
responeData.code = 0;
|
||||
responeData.message = "获取失败:" + ex.Message;
|
||||
ErrLogInfo.WriteLog("中央企业安全生产管理评价工作调度台账获取!", ex);
|
||||
}
|
||||
|
||||
return responeData;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭导入弹出窗口
|
||||
/// <summary>
|
||||
/// 关闭导入弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window2_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
GetValue();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 关闭查看审批信息弹出窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window4_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 打印
|
||||
/// <summary>
|
||||
/// 打印
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnPrint_Click(object sender, EventArgs e)
|
||||
{
|
||||
//Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
//if (report != null)
|
||||
//{
|
||||
// PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("../../ReportPrint/ExReportPrint.aspx?reportId={0}&&replaceParameter={1}&&varValue={2}", Const.Information_SafetyProductionEvaluationId, report.SafetyProductionEvaluationId, "", "打印 - ")));
|
||||
//}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 季度向前/向后
|
||||
/// <summary>
|
||||
/// 前一季度
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BtnBulletLeft_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetMonthChange("-");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 后一季度
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void BulletRight_Click(object sender, EventArgs e)
|
||||
{
|
||||
SetMonthChange("+");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 季度加减变化
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void SetMonthChange(string type)
|
||||
{
|
||||
DateTime? nowDate = Funs.GetNewDateTime(this.drpYear.SelectedValue + "-" + (Funs.GetNewIntOrZero(this.drpQuarter.SelectedValue) * 3).ToString());
|
||||
if (nowDate.HasValue)
|
||||
{
|
||||
DateTime showDate = new DateTime();
|
||||
if (type == "+")
|
||||
{
|
||||
showDate = nowDate.Value.AddMonths(3);
|
||||
}
|
||||
else
|
||||
{
|
||||
showDate = nowDate.Value.AddMonths(-3);
|
||||
}
|
||||
|
||||
this.drpYear.SelectedValue = showDate.Year.ToString();
|
||||
this.drpQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString();
|
||||
///值变化
|
||||
GetValue();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 查看审批信息
|
||||
/// <summary>
|
||||
/// 查看审批信息
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSee_Click(object sender, EventArgs e)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(drpUnit.SelectedValue, Funs.GetNewIntOrZero(drpYear.SelectedValue), Funs.GetNewIntOrZero(drpQuarter.SelectedValue));
|
||||
if (report != null)
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("ReportAuditSee.aspx?Id={0}", report.SafetyProductionEvaluationId, "查看 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("所选月份无记录!", MessageBoxIcon.Warning);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 导出按钮
|
||||
/// 导出按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnOut_Click(object sender, EventArgs e)
|
||||
{
|
||||
Response.ClearContent();
|
||||
string filename = Funs.GetNewFileName();
|
||||
Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("中央企业安全生产管理评价工作调度台账" + filename, System.Text.Encoding.UTF8) + ".xls");
|
||||
Response.ContentType = "application/excel";
|
||||
Response.ContentEncoding = System.Text.Encoding.UTF8;
|
||||
Response.Write(GetGridTableHtml(Grid1));
|
||||
Response.End();
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+276
@@ -0,0 +1,276 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information {
|
||||
|
||||
|
||||
public partial class SafetyProductionEvaluation {
|
||||
|
||||
/// <summary>
|
||||
/// form1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
|
||||
|
||||
/// <summary>
|
||||
/// PageManager1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.PageManager PageManager1;
|
||||
|
||||
/// <summary>
|
||||
/// RegionPanel1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.RegionPanel RegionPanel1;
|
||||
|
||||
/// <summary>
|
||||
/// Region2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Region Region2;
|
||||
|
||||
/// <summary>
|
||||
/// SimpleForm1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Form SimpleForm1;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// drpUnit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpUnit;
|
||||
|
||||
/// <summary>
|
||||
/// drpYear 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpYear;
|
||||
|
||||
/// <summary>
|
||||
/// drpQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList drpQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletLeft 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletLeft;
|
||||
|
||||
/// <summary>
|
||||
/// BtnBulletRight 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button BtnBulletRight;
|
||||
|
||||
/// <summary>
|
||||
/// btnSee 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSee;
|
||||
|
||||
/// <summary>
|
||||
/// btnNew 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnNew;
|
||||
|
||||
/// <summary>
|
||||
/// btnGet 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnGet;
|
||||
|
||||
/// <summary>
|
||||
/// btnEdit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnEdit;
|
||||
|
||||
/// <summary>
|
||||
/// btnDelete 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnDelete;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit1;
|
||||
|
||||
/// <summary>
|
||||
/// btnAudit2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnAudit2;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdata 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdata;
|
||||
|
||||
/// <summary>
|
||||
/// btnOut 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnOut;
|
||||
|
||||
/// <summary>
|
||||
/// txtUnitName 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtUnitName;
|
||||
|
||||
/// <summary>
|
||||
/// txtQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// txtCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label txtCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// lbHandleMan 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Label lbHandleMan;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
|
||||
/// <summary>
|
||||
/// Window2 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window2;
|
||||
|
||||
/// <summary>
|
||||
/// Window3 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window3;
|
||||
|
||||
/// <summary>
|
||||
/// Window4 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window4;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SafetyProductionEvaluationAdd.aspx.cs" Inherits="FineUIPro.Web.ZHGL.Information.SafetyProductionEvaluationAdd" %>
|
||||
|
||||
<!DOCTYPE html>
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<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="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:DropDownList ID="ddlUnitId" runat="server" Label="单位" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlYearId" runat="server" Label="年度" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DropDownList ID="ddlQuarter" runat="server" Label="季度" Required="True" ShowRedStar="True">
|
||||
</f:DropDownList>
|
||||
<f:DatePicker runat="server" DateFormatString="yyyy-MM-dd" Label="制表时间" ID="dpkCompileDate"
|
||||
Required="True" ShowRedStar="True">
|
||||
</f:DatePicker>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
<f:FormRow>
|
||||
<Items>
|
||||
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server"
|
||||
BoxFlex="1" DataKeyNames="SafetyProductionEvaluationItemId" AllowCellEditing="true"
|
||||
ClicksToEdit="1" DataIDField="SafetyProductionEvaluationItemId" EnableColumnLines="true"
|
||||
OnRowCommand="Grid1_RowCommand" EnableHeaderMenu="false" Width="1200px" Height="360px">
|
||||
<Columns>
|
||||
<f:RenderField Width="55px" ColumnID="SortIndex" DataField="SortIndex" FieldType="String"
|
||||
HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="90px" ColumnID="Type" DataField="Type" FieldType="String"
|
||||
HeaderText="类型" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="150px" ColumnID="EvaluateWork" DataField="EvaluateWork"
|
||||
FieldType="String" HeaderText="评价工作" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="250px" ColumnID="EvaluationContent" DataField="EvaluationContent"
|
||||
FieldType="String" HeaderText="评价内容" HeaderTextAlign="Center"
|
||||
TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="350px" ColumnID="FillingRequirements" DataField="FillingRequirements"
|
||||
FieldType="String" HeaderText="填报要求" HeaderTextAlign="Center" TextAlign="Left">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="CompletionDeadline" DataField="CompletionDeadline"
|
||||
FieldType="String" HeaderText="完成期限" HeaderTextAlign="Center" TextAlign="Center">
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="110px" ColumnID="ImplementationStatus" DataField="ImplementationStatus" ExpandUnusedSpace="true"
|
||||
FieldType="String" HeaderText="落实情况" HeaderTextAlign="Center" TextAlign="Left">
|
||||
<Editor>
|
||||
<f:TextArea ID="txtImplementationStatus" Text='<%# Eval("ImplementationStatus")%>' runat="server" AutoGrowHeight="true">
|
||||
</f:TextArea>
|
||||
</Editor>
|
||||
</f:RenderField>
|
||||
<f:RenderField Width="55px" ColumnID="SafetyProductionEvaluationItemId" DataField="SafetyProductionEvaluationItemId" FieldType="String"
|
||||
HeaderText="主键" HeaderTextAlign="Center" TextAlign="Center" Hidden="true">
|
||||
</f:RenderField>
|
||||
</Columns>
|
||||
<Listeners>
|
||||
<f:Listener Event="dataload" Handler="onGridDataLoad" />
|
||||
</Listeners>
|
||||
</f:Grid>
|
||||
</Items>
|
||||
</f:FormRow>
|
||||
</Rows>
|
||||
<Toolbars>
|
||||
<f:Toolbar ID="Toolbar1" Position="Bottom" ToolbarAlign="Right" runat="server">
|
||||
<Items>
|
||||
<f:Button ID="btnCopy" Icon="Database" runat="server" ToolTip="复制上季度数据" ValidateForms="SimpleForm1"
|
||||
OnClick="btnCopy_Click" Hidden="true" MarginLeft="10px">
|
||||
</f:Button>
|
||||
<f:ToolbarFill runat="server"></f:ToolbarFill>
|
||||
<f:Button ID="btnSave" Icon="SystemSave" runat="server" Hidden="true"
|
||||
ValidateForms="SimpleForm1" OnClick="btnSave_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnSubmit" Icon="SystemSaveNew" runat="server" Hidden="true" ToolTip="提交"
|
||||
ValidateForms="SimpleForm1" OnClick="btnSubmit_Click">
|
||||
</f:Button>
|
||||
<f:Button ID="btnUpdata" Icon="PageSave" runat="server" Hidden="true" ConfirmText="确定上报?"
|
||||
ToolTip="上报" ValidateForms="SimpleForm1" OnClick="btnUpdata_Click" MarginRight="10px">
|
||||
</f:Button>
|
||||
</Items>
|
||||
</f:Toolbar>
|
||||
</Toolbars>
|
||||
</f:Form>
|
||||
<f:Window ID="Window1" IconUrl="~/res/images/16/11.png" runat="server" Hidden="true"
|
||||
IsModal="false" Target="Parent" EnableMaximize="true" EnableResize="true" OnClose="Window1_Close"
|
||||
Title="办理流程" CloseAction="HidePostBack" EnableIFrame="true" Height="520px" Width="800px">
|
||||
</f:Window>
|
||||
</form>
|
||||
<script type="text/javascript">
|
||||
function onGridDataLoad(event) {
|
||||
this.mergeColumns(['Type','EvaluateWork','EvaluationContent','FillingRequirements'], {
|
||||
depends: true
|
||||
});
|
||||
|
||||
this.mergeColumns(['FillingRequirements'], {
|
||||
depends: true
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,534 @@
|
||||
using BLL;
|
||||
using Newtonsoft.Json.Linq;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information
|
||||
{
|
||||
public partial class SafetyProductionEvaluationAdd : PageBase
|
||||
{
|
||||
#region 定义变量
|
||||
public string SafetyProductionEvaluationId
|
||||
{
|
||||
get
|
||||
{
|
||||
return (string)ViewState["SafetyProductionEvaluationId"];
|
||||
}
|
||||
set
|
||||
{
|
||||
ViewState["SafetyProductionEvaluationId"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 定义集合
|
||||
/// </summary>
|
||||
private static List<Model.Information_SafetyProductionEvaluationItem> items = new List<Model.Information_SafetyProductionEvaluationItem>();
|
||||
#endregion
|
||||
|
||||
#region 加载页面
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
this.GetButtonPower();
|
||||
items.Clear();
|
||||
this.ddlUnitId.DataTextField = "UnitName";
|
||||
this.ddlUnitId.DataValueField = "UnitId";
|
||||
this.ddlUnitId.DataSource = BLL.UnitService.GetThisUnitDropDownList();
|
||||
this.ddlUnitId.DataBind();
|
||||
|
||||
this.ddlYearId.DataTextField = "ConstText";
|
||||
ddlYearId.DataValueField = "ConstValue";
|
||||
ddlYearId.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0008);
|
||||
ddlYearId.DataBind();
|
||||
|
||||
this.ddlQuarter.DataTextField = "ConstText";
|
||||
ddlQuarter.DataValueField = "ConstValue";
|
||||
ddlQuarter.DataSource = BLL.ConstValue.drpConstItemList(ConstValue.Group_0011);
|
||||
ddlQuarter.DataBind();
|
||||
this.ddlUnitId.Readonly = true;
|
||||
string unitId = Request.Params["UnitId"];
|
||||
string year = Request.QueryString["Year"];
|
||||
string quarter = Request.QueryString["Quarter"];
|
||||
this.SafetyProductionEvaluationId = Request.Params["SafetyProductionEvaluationId"];
|
||||
if (!string.IsNullOrEmpty(this.SafetyProductionEvaluationId))
|
||||
{
|
||||
items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(this.SafetyProductionEvaluationId);
|
||||
this.Grid1.DataSource = items;
|
||||
this.Grid1.DataBind();
|
||||
|
||||
var SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId);
|
||||
if (SafetyProductionEvaluation != null)
|
||||
{
|
||||
this.btnCopy.Hidden = true;
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
if (SafetyProductionEvaluation.HandleState == BLL.Const.HandleState_4)
|
||||
{
|
||||
this.btnUpdata.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (SafetyProductionEvaluation.HandleMan == this.CurrUser.PersonId)
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_3) //已上报
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnUpdata.Hidden = true;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(SafetyProductionEvaluation.UnitId))
|
||||
{
|
||||
this.ddlUnitId.SelectedValue = SafetyProductionEvaluation.UnitId;
|
||||
}
|
||||
if (SafetyProductionEvaluation.YearId.HasValue)
|
||||
{
|
||||
this.ddlYearId.SelectedValue = SafetyProductionEvaluation.YearId.ToString();
|
||||
}
|
||||
if (SafetyProductionEvaluation.Quarter.HasValue)
|
||||
{
|
||||
this.ddlQuarter.SelectedValue = SafetyProductionEvaluation.Quarter.ToString();
|
||||
}
|
||||
if (SafetyProductionEvaluation.ReportDate != null)
|
||||
{
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", SafetyProductionEvaluation.ReportDate);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//this.btnCopy.Hidden = false;
|
||||
this.ddlUnitId.SelectedValue = unitId;
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now);
|
||||
this.ddlYearId.SelectedValue = year;
|
||||
this.ddlQuarter.SelectedValue = quarter;
|
||||
////获取项目报告集合
|
||||
//List<Model.InformationProject_SafetyProductionEvaluationItem> projectItems = (from x in Funs.DB.InformationProject_SafetyProductionEvaluation
|
||||
// join y in Funs.DB.InformationProject_SafetyProductionEvaluationItem
|
||||
// on x.SafetyProductionEvaluationId equals y.SafetyProductionEvaluationId
|
||||
// where x.YearId.ToString() == year && x.Quarter.ToString() == quarter && x.States == BLL.Const.State_2
|
||||
// select y).Distinct().ToList();
|
||||
//if (projectItems.Count > 0)
|
||||
//{
|
||||
// int i = 0;
|
||||
// foreach (var projectItem in projectItems)
|
||||
// {
|
||||
// i += 10;
|
||||
// Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem
|
||||
// {
|
||||
// SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)),
|
||||
// SortIndex = i
|
||||
// };
|
||||
// Model.Base_Project project = (from x in Funs.DB.Base_Project
|
||||
// join y in Funs.DB.InformationProject_SafetyProductionEvaluation
|
||||
// on x.ProjectId equals y.ProjectId
|
||||
// join z in Funs.DB.InformationProject_SafetyProductionEvaluationItem
|
||||
// on y.SafetyProductionEvaluationId equals z.SafetyProductionEvaluationId
|
||||
// where z.SafetyProductionEvaluationItemId == projectItem.SafetyProductionEvaluationItemId
|
||||
// select x).FirstOrDefault();
|
||||
// if (project != null)
|
||||
// {
|
||||
// item.IndustryType = project.ProjectName;
|
||||
// }
|
||||
// item.TotalConductCount = projectItem.TotalConductCount;
|
||||
// item.TotalPeopleCount = projectItem.TotalPeopleCount;
|
||||
// item.TotalInvestment = projectItem.TotalInvestment;
|
||||
// item.HQConductCount = projectItem.HQConductCount;
|
||||
// item.HQPeopleCount = projectItem.HQPeopleCount;
|
||||
// item.HQInvestment = projectItem.HQInvestment;
|
||||
// item.BasicConductCount = projectItem.BasicConductCount;
|
||||
// item.BasicPeopleCount = projectItem.BasicPeopleCount;
|
||||
// item.BasicInvestment = projectItem.BasicInvestment;
|
||||
// item.ComprehensivePractice = projectItem.ComprehensivePractice;
|
||||
// item.CPScene = projectItem.CPScene;
|
||||
// item.CPDesktop = projectItem.CPDesktop;
|
||||
// item.SpecialDrill = projectItem.SpecialDrill;
|
||||
// item.SDScene = projectItem.SDScene;
|
||||
// item.SDDesktop = projectItem.SDDesktop;
|
||||
// items.Add(item);
|
||||
// }
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// for (int i = 0; i < 100; i++)
|
||||
// {
|
||||
// i += 10;
|
||||
// Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem
|
||||
// {
|
||||
// SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)),
|
||||
// SortIndex = i
|
||||
// };
|
||||
// items.Add(newItem);
|
||||
// }
|
||||
//}
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region 保存、提交、上报
|
||||
/// <summary>
|
||||
/// 保存按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSave_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("add");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 上报按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnUpdata_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("updata");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 提交按钮
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnSubmit_Click(object sender, EventArgs e)
|
||||
{
|
||||
Save("submit");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存数据
|
||||
/// </summary>
|
||||
/// <param name="type"></param>
|
||||
private void Save(string type)
|
||||
{
|
||||
if (this.ddlUnitId.SelectedValue == BLL.Const._Null)
|
||||
{
|
||||
ShowNotify("请选择单位!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
var drill = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdDate(this.ddlUnitId.SelectedValue, Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue), Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue), this.SafetyProductionEvaluationId);
|
||||
if (drill != null)
|
||||
{
|
||||
ShowNotify("本单位本季度报表已存在,不能重复编制", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
|
||||
var SafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation();
|
||||
if (this.ddlUnitId.SelectedValue != BLL.Const._Null)
|
||||
{
|
||||
SafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue;
|
||||
}
|
||||
if (!string.IsNullOrEmpty(this.dpkCompileDate.Text.Trim()))
|
||||
{
|
||||
SafetyProductionEvaluation.ReportDate = Convert.ToDateTime(this.dpkCompileDate.Text.Trim());
|
||||
}
|
||||
SafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue);
|
||||
SafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue);
|
||||
if (string.IsNullOrEmpty(this.SafetyProductionEvaluationId))
|
||||
{
|
||||
this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation)); SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId;
|
||||
SafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName;
|
||||
SafetyProductionEvaluation.UpState = BLL.Const.UpState_2;
|
||||
SafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId;
|
||||
SafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1;
|
||||
BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(SafetyProductionEvaluation);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(),
|
||||
SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnAdd);
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation oldReport = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId);
|
||||
if (oldReport != null)
|
||||
{
|
||||
SafetyProductionEvaluation.HandleMan = oldReport.HandleMan;
|
||||
SafetyProductionEvaluation.HandleState = oldReport.HandleState;
|
||||
}
|
||||
SafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId;
|
||||
SafetyProductionEvaluation.UpState = BLL.Const.UpState_2;
|
||||
BLL.SafetyProductionEvaluationService.UpdateSafetyProductionEvaluation(SafetyProductionEvaluation);
|
||||
BLL.LogService.AddSys_Log(this.CurrUser, SafetyProductionEvaluation.YearId.ToString() + "-" + SafetyProductionEvaluation.Quarter.ToString(),
|
||||
SafetyProductionEvaluation.SafetyProductionEvaluationId, BLL.Const.SafetyProductionEvaluationMenuId, BLL.Const.BtnModify);
|
||||
BLL.SafetyProductionEvaluationItemService.DeleteSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
}
|
||||
GetItems(SafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
foreach (var item in items)
|
||||
{
|
||||
BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(item);
|
||||
}
|
||||
if (type == "updata") //保存并上报
|
||||
{
|
||||
if (SafetyProductionEvaluation.UpState == BLL.Const.UpState_2)
|
||||
{
|
||||
string code = CNCECHSSEWebService.UpSafetyProductionEvaluation(SafetyProductionEvaluation.SafetyProductionEvaluationId, this.CurrUser);
|
||||
if (code == "1")
|
||||
{
|
||||
ShowNotify("同步成功!", MessageBoxIcon.Success);
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
Alert.ShowInParent("同步异常,请退出后重试!", MessageBoxIcon.Error);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ShowNotify("当前单据状态不能同步!", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (type == "submit")
|
||||
{
|
||||
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ReportSubmit.aspx?Type=SafetyProductionEvaluation&Id={0}", SafetyProductionEvaluation.SafetyProductionEvaluationId, "编辑 - ")));
|
||||
}
|
||||
else
|
||||
{
|
||||
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取明细值
|
||||
/// </summary>
|
||||
/// <param name="SafetyProductionEvaluationId"></param>
|
||||
private void GetItems(string SafetyProductionEvaluationId)
|
||||
{
|
||||
items.Clear();
|
||||
foreach (JObject mergedRow in Grid1.GetMergedData())
|
||||
{
|
||||
JObject values = mergedRow.Value<JObject>("values");
|
||||
Model.Information_SafetyProductionEvaluationItem item = new Model.Information_SafetyProductionEvaluationItem();
|
||||
if (values["SafetyProductionEvaluationItemId"].ToString() != "")
|
||||
{
|
||||
item.SafetyProductionEvaluationItemId = values.Value<string>("SafetyProductionEvaluationItemId");
|
||||
}
|
||||
item.SafetyProductionEvaluationId = SafetyProductionEvaluationId;
|
||||
item.SortIndex = Funs.GetNewInt(values.Value<string>("SortIndex"));
|
||||
if (values["Type"].ToString() != "")
|
||||
{
|
||||
item.Type = values.Value<string>("Type");
|
||||
}
|
||||
if (values["EvaluateWork"].ToString() != "")
|
||||
{
|
||||
item.EvaluateWork = values.Value<string>("EvaluateWork");
|
||||
}
|
||||
if (values["EvaluationContent"].ToString() != "")
|
||||
{
|
||||
item.EvaluationContent = values.Value<string>("EvaluationContent");
|
||||
}
|
||||
if (values["FillingRequirements"].ToString() != "")
|
||||
{
|
||||
item.FillingRequirements = values.Value<string>("FillingRequirements");
|
||||
}
|
||||
if (values["CompletionDeadline"].ToString() != "")
|
||||
{
|
||||
item.CompletionDeadline = values.Value<string>("CompletionDeadline");
|
||||
}
|
||||
if (values["ImplementationStatus"].ToString() != "")
|
||||
{
|
||||
item.ImplementationStatus = values.Value<string>("ImplementationStatus");
|
||||
}
|
||||
items.Add(item);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 关闭办理流程窗口
|
||||
/// <summary>
|
||||
/// 关闭办理流程窗口
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void Window1_Close(object sender, WindowCloseEventArgs e)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(this.SafetyProductionEvaluationId);
|
||||
if (report.HandleMan == this.CurrUser.PersonId)
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
this.btnSave.Hidden = true;
|
||||
this.btnSubmit.Hidden = true;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region Grid行事件
|
||||
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
|
||||
{
|
||||
string rowID = Grid1.DataKeys[e.RowIndex][0].ToString();
|
||||
GetItems(string.Empty);
|
||||
if (e.CommandName == "Add")
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem oldItem = items.FirstOrDefault(x => x.SafetyProductionEvaluationItemId == rowID);
|
||||
Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem))
|
||||
};
|
||||
if (oldItem != null)
|
||||
{
|
||||
newItem.SortIndex = oldItem.SortIndex + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
newItem.SortIndex = 0;
|
||||
}
|
||||
items.Add(newItem);
|
||||
items = items.OrderBy(x => x.SortIndex).ToList();
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
}
|
||||
if (e.CommandName == "Delete")
|
||||
{
|
||||
if (Grid1.Rows.Count == 1)
|
||||
{
|
||||
ShowNotify("只有一条数据,无法删除", MessageBoxIcon.Warning);
|
||||
return;
|
||||
}
|
||||
foreach (var item in items)
|
||||
{
|
||||
if (item.SafetyProductionEvaluationItemId == rowID)
|
||||
{
|
||||
items.Remove(item);
|
||||
break;
|
||||
}
|
||||
}
|
||||
Grid1.DataSource = items;
|
||||
Grid1.DataBind();
|
||||
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 获取按钮权限
|
||||
/// <summary>
|
||||
/// 获取按钮权限
|
||||
/// </summary>
|
||||
/// <param name="button"></param>
|
||||
/// <returns></returns>
|
||||
private void GetButtonPower()
|
||||
{
|
||||
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.SafetyProductionEvaluationMenuId);
|
||||
if (buttonList.Count() > 0)
|
||||
{
|
||||
if (buttonList.Contains(BLL.Const.BtnSave))
|
||||
{
|
||||
this.btnSave.Hidden = false;
|
||||
this.btnCopy.Hidden = false;
|
||||
}
|
||||
//if (buttonList.Contains(BLL.Const.BtnSaveUp))
|
||||
//{
|
||||
// this.btnUpdata.Hidden = false;
|
||||
|
||||
//}
|
||||
if (buttonList.Contains(BLL.Const.BtnSubmit))
|
||||
{
|
||||
this.btnSubmit.Hidden = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region 复制上个季度数据
|
||||
/// <summary>
|
||||
/// 复制上个季度的数据
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="e"></param>
|
||||
protected void btnCopy_Click(object sender, EventArgs e)
|
||||
{
|
||||
int lastYear = 0, lastQuarter = 0;
|
||||
int year = Convert.ToInt32(this.ddlYearId.SelectedValue);
|
||||
int quarter = Convert.ToInt32(this.ddlQuarter.SelectedValue);
|
||||
if (quarter == 1)
|
||||
{
|
||||
lastYear = year - 1;
|
||||
lastQuarter = 4;
|
||||
}
|
||||
else
|
||||
{
|
||||
lastYear = year;
|
||||
lastQuarter = quarter - 1;
|
||||
}
|
||||
Model.Information_SafetyProductionEvaluation SafetyProductionEvaluation = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationByUnitIdAndYearAndQuarters(this.ddlUnitId.SelectedValue, lastYear, lastQuarter);
|
||||
if (SafetyProductionEvaluation != null)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluation newSafetyProductionEvaluation = new Model.Information_SafetyProductionEvaluation();
|
||||
this.SafetyProductionEvaluationId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluation));
|
||||
newSafetyProductionEvaluation.SafetyProductionEvaluationId = this.SafetyProductionEvaluationId;
|
||||
newSafetyProductionEvaluation.UnitId = this.ddlUnitId.SelectedValue;
|
||||
newSafetyProductionEvaluation.ReportDate = DateTime.Now;
|
||||
newSafetyProductionEvaluation.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue);
|
||||
newSafetyProductionEvaluation.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue);
|
||||
newSafetyProductionEvaluation.CompileMan = this.CurrUser.PersonName;
|
||||
newSafetyProductionEvaluation.UpState = BLL.Const.UpState_2;
|
||||
newSafetyProductionEvaluation.HandleState = BLL.Const.HandleState_1;
|
||||
newSafetyProductionEvaluation.HandleMan = this.CurrUser.PersonId;
|
||||
BLL.SafetyProductionEvaluationService.AddSafetyProductionEvaluation(newSafetyProductionEvaluation);
|
||||
|
||||
items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
if (items.Count > 0)
|
||||
{
|
||||
foreach (var item in items)
|
||||
{
|
||||
Model.Information_SafetyProductionEvaluationItem newItem = new Model.Information_SafetyProductionEvaluationItem
|
||||
{
|
||||
SafetyProductionEvaluationItemId = SQLHelper.GetNewID(typeof(Model.Information_SafetyProductionEvaluationItem)),
|
||||
SafetyProductionEvaluationId = this.SafetyProductionEvaluationId,
|
||||
SortIndex = item.SortIndex
|
||||
};
|
||||
BLL.SafetyProductionEvaluationItemService.AddSafetyProductionEvaluationItem(newItem);
|
||||
}
|
||||
}
|
||||
GetValues(newSafetyProductionEvaluation.SafetyProductionEvaluationId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取数据
|
||||
/// </summary>
|
||||
private void GetValues(string SafetyProductionEvaluationId)
|
||||
{
|
||||
var report = BLL.SafetyProductionEvaluationService.GetSafetyProductionEvaluationById(SafetyProductionEvaluationId);
|
||||
if (report != null)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(report.UnitId))
|
||||
{
|
||||
this.ddlUnitId.SelectedValue = report.UnitId;
|
||||
}
|
||||
if (report.YearId.HasValue)
|
||||
{
|
||||
this.ddlYearId.SelectedValue = report.YearId.ToString();
|
||||
}
|
||||
if (report.Quarter.HasValue)
|
||||
{
|
||||
this.ddlQuarter.SelectedValue = report.Quarter.ToString();
|
||||
}
|
||||
if (report.ReportDate != null)
|
||||
{
|
||||
this.dpkCompileDate.Text = string.Format("{0:yyyy-MM-dd}", report.ReportDate);
|
||||
}
|
||||
items = BLL.SafetyProductionEvaluationItemService.GetSafetyProductionEvaluationItemList(SafetyProductionEvaluationId);
|
||||
this.Grid1.DataSource = items;
|
||||
this.Grid1.DataBind();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
+150
@@ -0,0 +1,150 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <自动生成>
|
||||
// 此代码由工具生成。
|
||||
//
|
||||
// 对此文件的更改可能导致不正确的行为,如果
|
||||
// 重新生成代码,则所做更改将丢失。
|
||||
// </自动生成>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace FineUIPro.Web.ZHGL.Information {
|
||||
|
||||
|
||||
public partial class SafetyProductionEvaluationAdd {
|
||||
|
||||
/// <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>
|
||||
/// ddlUnitId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlUnitId;
|
||||
|
||||
/// <summary>
|
||||
/// ddlYearId 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlYearId;
|
||||
|
||||
/// <summary>
|
||||
/// ddlQuarter 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DropDownList ddlQuarter;
|
||||
|
||||
/// <summary>
|
||||
/// dpkCompileDate 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.DatePicker dpkCompileDate;
|
||||
|
||||
/// <summary>
|
||||
/// Grid1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Grid Grid1;
|
||||
|
||||
/// <summary>
|
||||
/// txtImplementationStatus 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.TextArea txtImplementationStatus;
|
||||
|
||||
/// <summary>
|
||||
/// Toolbar1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Toolbar Toolbar1;
|
||||
|
||||
/// <summary>
|
||||
/// btnCopy 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnCopy;
|
||||
|
||||
/// <summary>
|
||||
/// btnSave 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSave;
|
||||
|
||||
/// <summary>
|
||||
/// btnSubmit 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnSubmit;
|
||||
|
||||
/// <summary>
|
||||
/// btnUpdata 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Button btnUpdata;
|
||||
|
||||
/// <summary>
|
||||
/// Window1 控件。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 自动生成的字段。
|
||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||
/// </remarks>
|
||||
protected global::FineUIPro.Window Window1;
|
||||
}
|
||||
}
|
||||
@@ -32,6 +32,8 @@
|
||||
<TreeNode id="ECDD89AC-1E16-4D82-B3BE-5D62F31B7A14" Text="化工行业能源节约与生态环境保护汇总表" NavigateUrl="ZHGL/Environmental/ChemicalReport.aspx"></TreeNode>
|
||||
<TreeNode id="7652D239-1897-4886-8DF2-B71E3B060D21" Text="中央企业节能环保产业企业基本情况和经营情况报表" NavigateUrl="ZHGL/Environmental/OperationReport.aspx"></TreeNode>
|
||||
<TreeNode id="30579BFE-AB4B-49A7-A73D-B7CE902A8B69" Text="中央企业节能环保产业企业生产和服务业务情况报表" NavigateUrl="ZHGL/Environmental/EnergyReport.aspx"></TreeNode>
|
||||
<TreeNode id="CB76394B-BDEB-4F45-9D19-F38612DC6591" Text="中央企业安全生产治本攻坚三年行动工作台账" NavigateUrl="ZHGL/Information/ActionWorkLedger.aspx"></TreeNode>
|
||||
<TreeNode id="C48087A8-4C9F-485D-B0A4-C85E112BA705" Text="中央企业安全生产管理评价工作调度台账" NavigateUrl="ZHGL/Information/SafetyProductionEvaluation.aspx"></TreeNode>
|
||||
</TreeNode>
|
||||
<TreeNode id="76E236DA-DDFC-4CE8-8CB8-02F8A27A8535" Text="专业技术方案评审" NavigateUrl=""><TreeNode id="B6A2B6EB-6B90-4953-B544-83FFF4F0EC19" Text="安全实施计划" NavigateUrl="ZHGL/Plan/ActionPlanList.aspx"></TreeNode>
|
||||
<TreeNode id="B9ADD006-BA46-4191-BCD1-CCB56767C82B" Text="总包施工质量计划" NavigateUrl="ZHGL/Plan/MainPlan.aspx"></TreeNode>
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class ActionWorkLedger
|
||||
{
|
||||
public string ActionWorkLedgerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string UnitId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public DateTime? ReportDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? Quarter
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? YearId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string CompileMan
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class ActionWorkLedgerItem
|
||||
{
|
||||
public string ActionWorkLedgerItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string ActionWorkLedgerId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? SortIndex
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Focus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string SpecialTask
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string WorkPoints
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string FillingRequirements
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string CompletionDeadline
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string ImplementationStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class SafetyProductionEvaluation
|
||||
{
|
||||
public string SafetyProductionEvaluationId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string UnitId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public DateTime? ReportDate
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? Quarter
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? YearId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string CompileMan
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Model
|
||||
{
|
||||
public class SafetyProductionEvaluationItem
|
||||
{
|
||||
public string SafetyProductionEvaluationItemId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string SafetyProductionEvaluationId
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public int? SortIndex
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string Type
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string EvaluateWork
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string EvaluationContent
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string FillingRequirements
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string CompletionDeadline
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
|
||||
public string ImplementationStatus
|
||||
{
|
||||
get;
|
||||
set;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1901
-133
File diff suppressed because it is too large
Load Diff
@@ -63,6 +63,8 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="APIItem\ActionWorkLedger.cs" />
|
||||
<Compile Include="APIItem\ActionWorkLedgerItem.cs" />
|
||||
<Compile Include="APIItem\ArchitectureReport.cs" />
|
||||
<Compile Include="APIItem\ArchitectureReportItem.cs" />
|
||||
<Compile Include="APIItem\BaseInfoItem.cs" />
|
||||
@@ -159,6 +161,8 @@
|
||||
<Compile Include="APIItem\QuarterlyProjectQuality.cs" />
|
||||
<Compile Include="APIItem\ReturnData.cs" />
|
||||
<Compile Include="APIItem\SafetyBriefing.cs" />
|
||||
<Compile Include="APIItem\SafetyProductionEvaluation.cs" />
|
||||
<Compile Include="APIItem\SafetyProductionEvaluationItem.cs" />
|
||||
<Compile Include="APIItem\SaveOnlineFileItem.cs" />
|
||||
<Compile Include="APIItem\SHHSE\NewSYHSEData.cs" />
|
||||
<Compile Include="APIItem\SHHSE\NewSYHSEDataHiddenDangerCheckItem.cs" />
|
||||
|
||||
Reference in New Issue
Block a user