提交代码

This commit is contained in:
高飞 2024-05-14 09:03:31 +08:00
parent c57b03d665
commit 3c73800853
26 changed files with 3821 additions and 542 deletions

View File

@ -0,0 +1,112 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
GO
CREATE TABLE [dbo].[JDGL_WeekPlan](
[WeekPlanId] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[WeekNo] [nvarchar](50) NULL,
[StartDate] [datetime] NULL,
[EndDate] [datetime] NULL,
[UnitWork] [nvarchar](50) NULL,
[Major] [nvarchar](50) NULL,
[WorkContent] [nvarchar](500) NULL,
[UnitId] [nvarchar](50) NULL,
[DutyPerson] [nvarchar](50) NULL,
[PlanDate] [datetime] NULL,
[IsOK] [bit] NULL,
[Remark] [nvarchar](200) NULL,
[CompileMan] [nvarchar](50) NULL,
[CompileDate] [datetime] NULL,
[SortIndex] [int] NULL,
CONSTRAINT [PK_JDGL_WeekPlan] PRIMARY KEY CLUSTERED
(
[WeekPlanId] 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
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] FOREIGN KEY([ProjectId])
REFERENCES [dbo].[Base_Project] ([ProjectId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Project]
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] FOREIGN KEY([UnitId])
REFERENCES [dbo].[Base_Unit] ([UnitId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit]
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] FOREIGN KEY([DutyPerson])
REFERENCES [dbo].[Sys_User] ([UserId])
GO
ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Sys_User]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekPlanId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'项目Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'ProjectId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'周号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekNo'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开始日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'StartDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'EndDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工序/单位工程' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitWork'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'专业' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Major'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'工作项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WorkContent'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'责任单位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitId'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'五环责任人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'DutyPerson'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'计划完成时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'PlanDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'完成状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'IsOK'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Remark'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileMan'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编制日期' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileDate'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'SortIndex'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'周进度计划表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan'
GO

View File

@ -104,6 +104,19 @@ go
VALUES('F136D1B4-A988-42E7-AD7C-4A246B440D03','94287B92-7E96-4B90-BC6F-DAF30AE3B314','保存',4)
GO
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1)
GO
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3)
INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex)
VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4)
GO
--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
--VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1)
--GO

View File

@ -587,6 +587,7 @@
<Compile Include="JDGL\Check\QuantityListService.cs" />
<Compile Include="JDGL\Check\SteelStructureCompletionService.cs" />
<Compile Include="JDGL\Check\UndergroundPipeCompletionService.cs" />
<Compile Include="JDGL\Check\WeekPlanService.cs" />
<Compile Include="JDGL\WBSCompleteAndReal\WBSReportService.cs" />
<Compile Include="JDGL\WBS\CnProfessionInitService.cs" />
<Compile Include="JDGL\WBS\CnProfessionService.cs" />

View File

@ -47,7 +47,7 @@ namespace BLL
{
try
{
var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(100).ToList();
var getDataList = (from x in Funs.DB.Sys_DataExchange where x.IsUpdate == false select x).Take(500).ToList();
if (getDataList.Count() > 0)
{
var getDataList0 = getDataList.Where(x => x.MessageText.Contains("\"Type\":0")).ToList();

View File

@ -3152,6 +3152,10 @@ namespace BLL
/// </summary>
public const string MonthPlanTemplateUrl = "File\\Excel\\DataIn\\月度计划情况导入模板.xls";
/// <summary>
/// 周进度计划导入模版文件原始的虚拟路径
/// </summary>
public const string WeekPlanTemplateUrl = "File\\Excel\\DataIn\\周进度计划导入模板.xls";
/// <summary>
/// 仪表索引
/// </summary>
public const string InstrumentUrl = "File\\Excel\\TestRun\\仪表索引模板.xlsx";
@ -5767,10 +5771,15 @@ namespace BLL
public const string RectificationMeasureMenuId = "0629BAB1-DB1C-42CE-A333-49F3813617D7";
/// <summary>
/// 工程量完成情况
/// 月度计划情况
/// </summary>
public const string MonthPlanMenuId = "94287B92-7E96-4B90-BC6F-DAF30AE3B314";
/// <summary>
/// 周进度计划
/// </summary>
public const string WeekPlanMenuId = "56A54B4B-BBA3-4249-9FFC-3A60DAC79059";
/// <summary>
/// 进度完成情况
/// </summary>

View File

@ -0,0 +1,122 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
/// <summary>
/// 周计划情况
/// </summary>
public class WeekPlanService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
/// <returns></returns>
public static Model.JDGL_WeekPlan GetWeekPlanById(string WeekPlanId)
{
return Funs.DB.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlanId);
}
/// <summary>
/// 根据主键获取周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
/// <returns></returns>
public static List<Model.JDGL_WeekPlan> GetWeekPlansByWeeks(string projectId, string weekNo)
{
return (from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x).ToList();
}
/// <summary>
/// 添加周计划情况
/// </summary>
/// <param name="WeekPlan"></param>
public static void AddWeekPlan(Model.JDGL_WeekPlan WeekPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan
{
WeekPlanId = WeekPlan.WeekPlanId,
ProjectId = WeekPlan.ProjectId,
WeekNo = WeekPlan.WeekNo,
StartDate = WeekPlan.StartDate,
EndDate = WeekPlan.EndDate,
UnitWork = WeekPlan.UnitWork,
Major = WeekPlan.Major,
WorkContent = WeekPlan.WorkContent,
UnitId = WeekPlan.UnitId,
DutyPerson = WeekPlan.DutyPerson,
PlanDate = WeekPlan.PlanDate,
IsOK = WeekPlan.IsOK,
Remark = WeekPlan.Remark,
CompileMan = WeekPlan.CompileMan,
CompileDate = WeekPlan.CompileDate,
SortIndex = WeekPlan.SortIndex,
};
db.JDGL_WeekPlan.InsertOnSubmit(newWeekPlan);
db.SubmitChanges();
}
/// <summary>
/// 修改周计划情况
/// </summary>
/// <param name="WeekPlan"></param>
public static void UpdateWeekPlan(Model.JDGL_WeekPlan WeekPlan)
{
Model.SGGLDB db = Funs.DB;
Model.JDGL_WeekPlan newWeekPlan = db.JDGL_WeekPlan.FirstOrDefault(e => e.WeekPlanId == WeekPlan.WeekPlanId);
if (newWeekPlan != null)
{
newWeekPlan.UnitWork = WeekPlan.UnitWork;
newWeekPlan.Major = WeekPlan.Major;
newWeekPlan.WorkContent = WeekPlan.WorkContent;
newWeekPlan.UnitId = WeekPlan.UnitId;
newWeekPlan.DutyPerson = WeekPlan.DutyPerson;
newWeekPlan.PlanDate = WeekPlan.PlanDate;
newWeekPlan.IsOK = WeekPlan.IsOK;
newWeekPlan.Remark = WeekPlan.Remark;
newWeekPlan.CompileMan = WeekPlan.CompileMan;
newWeekPlan.CompileDate = WeekPlan.CompileDate;
newWeekPlan.SortIndex = WeekPlan.SortIndex;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
public static void DeleteWeekPlanByWeekPlanId(string WeekPlanId)
{
Model.SGGLDB db = Funs.DB;
var q = (from x in db.JDGL_WeekPlan where x.WeekPlanId == WeekPlanId select x).FirstOrDefault();
if (q != null)
{
db.JDGL_WeekPlan.DeleteOnSubmit(q);
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除周计划情况
/// </summary>
/// <param name="WeekPlanId"></param>
public static void DeleteAllWeekPlan(string projectId, string weekNo)
{
Model.SGGLDB db = Funs.DB;
var q = from x in db.JDGL_WeekPlan where x.ProjectId == projectId && x.WeekNo == weekNo select x;
if (q != null)
{
db.JDGL_WeekPlan.DeleteAllOnSubmit(q);
db.SubmitChanges();
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -1403,6 +1403,8 @@
<Content Include="JDGL\Check\UndergroundPipeCompletion.aspx" />
<Content Include="JDGL\Check\UndergroundPipeCompletionEdit.aspx" />
<Content Include="JDGL\Check\UndergroundPipeCompletionIn.aspx" />
<Content Include="JDGL\Check\WeekPlan.aspx" />
<Content Include="JDGL\Check\WeekPlanIn.aspx" />
<Content Include="JDGL\CostAnalysis\EarnedValueCurve.aspx" />
<Content Include="JDGL\CostAnalysis\JDReport.aspx" />
<Content Include="JDGL\CostAnalysis\PlanAdjust.aspx" />
@ -13922,6 +13924,20 @@
<Compile Include="JDGL\Check\UndergroundPipeCompletionIn.aspx.designer.cs">
<DependentUpon>UndergroundPipeCompletionIn.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\WeekPlan.aspx.cs">
<DependentUpon>WeekPlan.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\WeekPlan.aspx.designer.cs">
<DependentUpon>WeekPlan.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\Check\WeekPlanIn.aspx.cs">
<DependentUpon>WeekPlanIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="JDGL\Check\WeekPlanIn.aspx.designer.cs">
<DependentUpon>WeekPlanIn.aspx</DependentUpon>
</Compile>
<Compile Include="JDGL\CostAnalysis\EarnedValueCurve.aspx.cs">
<DependentUpon>EarnedValueCurve.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress>false</Use64BitIISExpress>
<IISExpressSSLPort />

View File

@ -0,0 +1,114 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlan.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlan" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>周进度计划</title>
<link href="../res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="Panel1" runat="server" />
<f:Panel ID="Panel1" runat="server" Margin="5px" BodyPadding="5px" ShowBorder="false"
ShowHeader="false" Layout="VBox" BoxConfigAlign="Stretch">
<Items>
<f:Grid ID="Grid1" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="周进度计划" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="WeekPlanId" AllowCellEditing="true" ForceFit="true"
ClicksToEdit="1" DataIDField="WeekPlanId" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" EnableColumnLines="true"
AllowPaging="true" IsDatabasePaging="true" PageSize="1000"
AllowFilters="true" EnableTextSelection="True">
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:DatePicker runat="server" ID="txtWeeks" DateFormatString="yyyy-MM" AutoPostBack="true"
Label="月份" LabelWidth="50px" Width="150px" OnTextChanged="txtWeeks_TextChanged">
</f:DatePicker>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" Hidden="true"
OnClick="btnSave_Click">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="BtnAnalyse" ToolTip="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
<f:Button ID="btnNew" ToolTip="新增" Icon="Add" EnablePostBack="false" runat="server"
Hidden="true">
</f:Button>
<f:Button ID="btnModify" ToolTip="修改" Icon="Pencil" OnClick="btnModify_Click" runat="server"
Hidden="true">
</f:Button>
<f:Button ID="btnImport" ToolTip="导入" Icon="ApplicationGet" runat="server"
OnClick="btnImport_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# Grid1.PageIndex * Grid1.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="UnitWorkName" DataField="UnitWorkName"
SortField="UnitWorkName" FieldType="String" HeaderText="工序/单位工程" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="80px" ColumnID="ProfessionalName" DataField="ProfessionalName"
SortField="ProfessionalName" FieldType="String" HeaderText="专业" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="250px" ColumnID="WorkContent" DataField="WorkContent"
SortField="WorkContent" FieldType="String" HeaderText="工作项" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="UnitName" DataField="UnitName"
SortField="UnitName" FieldType="String" HeaderText="责任单位" TextAlign="center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="DutyPersonName" DataField="DutyPersonName"
SortField="DutyPersonName" FieldType="String" HeaderText="五环责任人" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="95px" ColumnID="PlanDate" DataField="PlanDate" SortField="PlanDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="IsOKStr" DataField="IsOKStr"
SortField="IsOKStr" FieldType="String" HeaderText="完成状态" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="录入" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="false"
CloseAction="HidePostBack" Width="1200px" Height="700px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Hidden="true" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click">
</f:MenuButton>
</Items>
</f:Menu>
</form>
<script type="text/javascript">
var menuID = '<%= Menu1.ClientID %>';
// 返回false来阻止浏览器右键菜单
function onRowContextMenu(event, rowId) {
F(menuID).show(); //showAt(event.pageX, event.pageY);
return false;
}
</script>
</body>
</html>

View File

@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.Data.SqlClient;
using BLL;
using Newtonsoft.Json.Linq;
namespace FineUIPro.Web.JDGL.Check
{
public partial class WeekPlan : PageBase
{
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
btnNew.OnClientClick = Window1.GetShowReference("WeekPlanEdit.aspx") + "return false;";
this.txtWeeks.Text = string.Format("{0:yyyy-MM}", DateTime.Now);
BindGrid();
}
}
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == BLL.Const._Null)
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.WeekPlanMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnNew.Hidden = false;
this.btnModify.Hidden = false;
this.btnMenuDel.Hidden = false;
}
}
}
#endregion
protected void btnModify_Click(object sender, EventArgs e)
{
Window1.Title = "录入";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanEdit.aspx?Weeks={0}", this.txtWeeks.Text, "编辑 - ")));
}
/// <summary>
/// 加载Grid
/// </summary>
private void BindGrid()
{
string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName,uw.UnitWorkName,cn.ProfessionalName,case mp.IsOK when 1 then '已完成' when 0 then '未完成' else '' end as IsOKStr from [dbo].[JDGL_WeekPlan] mp
left join Base_Unit u on u.UnitId=mp.UnitId
left join Sys_User us on us.UserId=mp.DutyPerson
left join WBS_UnitWork uw on uw.UnitWorkId=mp.UnitWork
left join Base_CNProfessional cn on cn.CNProfessionalId=mp.Major
where mp.ProjectId=@ProjectId and mp.WeekNo=@WeekNo order by mp.SortIndex";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
listStr.Add(new SqlParameter("@WeekNo", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtWeeks.Text.Trim() + "-01"))));
SqlParameter[] parameter = listStr.ToArray();
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();
}
#region
/// <summary>
/// 月份选择事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void txtWeeks_TextChanged(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (this.Grid1.Rows.Count > 0)
{
JArray mergedData = Grid1.GetMergedData();
foreach (JObject mergedRow in mergedData)
{
JObject values = mergedRow.Value<JObject>("values");
int i = mergedRow.Value<int>("index");
Model.JDGL_WeekPlan WeekPlan = BLL.WeekPlanService.GetWeekPlanById(this.Grid1.Rows[i].RowID);
if (WeekPlan != null)
{
WeekPlan.CompileMan = this.CurrUser.UserId;
WeekPlan.CompileDate = DateTime.Now;
BLL.WeekPlanService.UpdateWeekPlan(WeekPlan);
}
}
Alert.ShowInTop("保存成功!", MessageBoxIcon.Success);
}
else
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
}
#endregion
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
BLL.WeekPlanService.DeleteWeekPlanByWeekPlanId(rowID);
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#region
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
Window1.Title = "导入";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - ")));
}
/// <summary>
/// 关闭导入弹出窗口
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Window1_Close(object sender, WindowCloseEventArgs e)
{
BindGrid();
}
#endregion
#region
/// <summary>
/// 统计分析
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
Window1.Title = "统计";
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanStatisc.aspx", "统计 - ")));
}
#endregion
}
}

View File

@ -0,0 +1,150 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.Check {
public partial class WeekPlan {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtWeeks 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtWeeks;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnModify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnModify;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDel;
}
}

View File

@ -0,0 +1,125 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlanIn" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>导入信息</title>
<link href="~/res/css/common.css" rel="stylesheet" type="text/css" />
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" runat="server" OnCustomEvent="PageManager1_CustomEvent" />
<f:Form ID="SimpleForm1" ShowBorder="false" ShowHeader="false" AutoScroll="true"
BodyPadding="10px" runat="server" RedStarPosition="BeforeText" LabelAlign="Right">
<Toolbars>
<f:Toolbar ID="Toolbar2" Position="Top" ToolbarAlign="Right" runat="server">
<Items>
<f:TextBox runat="server" ID="txtWeekNo" ShowRedStar="true" Required="true" Label="周号" LabelAlign="Right"></f:TextBox>
<f:DatePicker ID="txtStartDate" runat="server" ShowRedStar="true" Required="true" Label="开始日期" LabelAlign="Right"
EnableEdit="true" >
</f:DatePicker>
<f:DatePicker ID="txtEndDate" runat="server" ShowRedStar="true" Required="true" Label="结束日期" LabelAlign="Right"
EnableEdit="true" >
</f:DatePicker>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ToolTip="保存" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click">
</f:Button>
<%--<f:Button ID="btnOut" Icon="Pencil" runat="server" Text="导出" ToolTip="导出错误列表" ValidateForms="SimpleForm1"
OnClick="btnOut_Click" Hidden="true"></f:Button>--%>
</Items>
</f:Toolbar>
</Toolbars>
<Rows>
<f:FormRow>
<Items>
<f:FileUpload runat="server" ID="fuAttachUrl" EmptyText="选择要导入的文件" Label="选择要导入的文件"
LabelWidth="150px">
</f:FileUpload>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" EnableCollapse="true" runat="server" ForceFit="true"
EnableColumnLines="true" BoxFlex="1" DataKeyNames="WeekPlanId" DataIDField="WeekPlanId"
AllowSorting="true" SortField="Name" PageSize="500" Height="400px">
<Columns>
<f:TemplateField Width="55px" HeaderText="序号">
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="UnitWorkName" Width="100px" HeaderText="工序/单位工程" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# ConvertUnitWorkName(Eval("UnitWork")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="ProfessionalName" Width="80px" HeaderText="专业" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# ConvertProfessionalName(Eval("Major")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="150px" ColumnID="WorkContent" DataField="WorkContent"
SortField="WorkContent" FieldType="String" HeaderText="工作项" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="UnitName" Width="150px" HeaderText="责任单位" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertUnitName(Eval("UnitId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:TemplateField ColumnID="DutyPersonName" Width="100px" HeaderText="五环责任人" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# ConvertDutyPersonName(Eval("DutyPerson")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="95px" ColumnID="PlanDate" DataField="PlanDate" SortField="PlanDate"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="计划完成时间" TextAlign="Center" HeaderTextAlign="Center">
</f:RenderField>
<f:TemplateField ColumnID="IsOK" Width="100px" HeaderText="完成状态" HeaderTextAlign="Center"
TextAlign="Center">
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# ConvertIsOK(Eval("IsOK")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:RenderField Width="100px" ColumnID="Remark" DataField="Remark"
SortField="Remark" FieldType="String" HeaderText="备注" TextAlign="Center"
HeaderTextAlign="Center">
</f:RenderField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</Items>
</f:FormRow>
<%-- <f:FormRow>
<Items>
<f:Label ID="lblBottom" runat="server" Text="说明1 人员信息导入模板中灰色项为必填项。2 身份证号码必须为15或18位所属单位、所在班组、单位工程、岗位、特岗证书等必须与基础信息中对应类型的名称一致,否则无法导入。3 如需修改已有人员信息请到系统中修改。4 数据导入后,点击“保存”,即可完成人员信息导入。">
</f:Label>
</Items>
</f:FormRow>--%>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,735 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web.UI;
namespace FineUIPro.Web.JDGL.Check
{
public partial class WeekPlanIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 人员集合
/// </summary>
public static List<Model.JDGL_WeekPlan> WeekPlans = new List<Model.JDGL_WeekPlan>();
/// <summary>
/// 错误集合
/// </summary>
public static string errorInfos = string.Empty;
/// <summary>
/// 项目ID
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.hdFileName.Text = string.Empty;
this.hdCheckResult.Text = string.Empty;
if (WeekPlans != null)
{
WeekPlans.Clear();
}
errorInfos = string.Empty;
this.ProjectId = Request.Params["ProjectId"];
}
}
#endregion
#region
/// <summary>
/// 审核
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAudit_Click(object sender, EventArgs e)
{
try
{
if (this.fuAttachUrl.HasFile == false)
{
ShowNotify("请您选择Excel文件", MessageBoxIcon.Warning);
return;
}
string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower();
if (IsXls != ".xls")
{
ShowNotify("只可以选择Excel文件", MessageBoxIcon.Warning);
return;
}
if (WeekPlans != null)
{
WeekPlans.Clear();
}
if (!string.IsNullOrEmpty(errorInfos))
{
errorInfos = string.Empty;
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
if (!Directory.Exists(initFullPath))
{
Directory.CreateDirectory(initFullPath);
}
this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls;
string filePath = initFullPath + this.hdFileName.Text;
this.fuAttachUrl.PostedFile.SaveAs(filePath);
//PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - ")));
ImportXlsToData(rootPath + initPath + this.hdFileName.Text);
}
catch (Exception ex)
{
ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL(ds.Tables[0], 8);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集行数</param>
/// <returns></returns>
private bool AddDatasetToSQL(DataTable pds, int Cols)
{
string result = string.Empty;
int ic, ir;
ic = pds.Columns.Count;
if (ic < Cols)
{
Alert.ShowInTop("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning);
}
ir = pds.Rows.Count;
Model.SGGLDB db = Funs.DB;
var projectUnits = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UnitId, y.UnitName };
var cns = from x in db.Base_CNProfessional select x;
var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
var projectUsers = from x in db.Project_ProjectUser
join y in db.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UserId, y.UserName };
if (pds != null && ir > 0)
{
for (int i = 0; i < ir; i++)
{
string col0 = pds.Rows[i][0].ToString().Trim();
if (string.IsNullOrEmpty(col0))
{
result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "此项为必填项!" + "|";
}
else
{
var unitWork = unitWorks.FirstOrDefault(e => e.UnitWorkName == col0);
if (unitWork == null)
{
result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "[" + col0 + "]不在项目单位工程中!" + "|";
}
}
string col1 = pds.Rows[i][1].ToString().Trim();
if (string.IsNullOrEmpty(col1))
{
result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "此项为必填项!" + "|";
}
else
{
var cn = cns.FirstOrDefault(e => e.ProfessionalName == col1);
if (cn == null)
{
result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "[" + col1 + "]不在专业信息中!" + "|";
}
}
string col2 = pds.Rows[i][2].ToString().Trim();
if (string.IsNullOrEmpty(col2))
{
result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|";
}
string col3 = pds.Rows[i][3].ToString().Trim();
if (string.IsNullOrEmpty(col3))
{
result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|";
}
else
{
var unit = projectUnits.FirstOrDefault(e => e.UnitName == col3);
if (unit == null)
{
result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col3 + "]不在项目单位中!" + "|";
}
}
string col4 = pds.Rows[i][4].ToString().Trim();
if (string.IsNullOrEmpty(col4))
{
result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|";
}
else
{
var user = projectUsers.FirstOrDefault(e => e.UserName == col4);
if (user == null)
{
result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col4 + "]不在项目用户信息中!" + "|";
}
}
string col5 = pds.Rows[i][5].ToString().Trim();
if (!string.IsNullOrEmpty(col5))
{
try
{
DateTime dec = Convert.ToDateTime(col5);
}
catch (Exception)
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col5 + "]错误!" + "|";
}
}
else
{
result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|";
}
string col6 = pds.Rows[i][6].ToString().Trim();
if (!string.IsNullOrEmpty(col6))
{
if (col6 != "已完成" && col6 != "未完成")
{
result += "第" + (i + 2).ToString() + "行," + "完成状态" + "," + "[" + col6 + "]错误!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
errorInfos = result;
Alert alert = new Alert
{
Message = result,
Target = Target.Self
};
alert.Show();
}
else
{
errorInfos = string.Empty;
ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success);
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
#region
/// <summary>
/// 导入
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(errorInfos))
{
if (!string.IsNullOrEmpty(this.hdFileName.Text))
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
}
else
{
ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning);
}
}
else
{
Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
}
}
#region Excel提取数据
/// <summary>
/// 从Excel提取数据--》Dataset
/// </summary>
/// <param name="filename">Excel文件路径名</param>
private void ImportXlsToData2(string fileName)
{
try
{
string oleDBConnString = String.Empty;
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
DataSet ds = new DataSet();
oleDBConn = new OleDbConnection(oleDBConnString);
oleDBConn.Open();
m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null);
if (m_tableName != null && m_tableName.Rows.Count > 0)
{
m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim();
}
string sqlMaster;
sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]";
oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn);
oleAdMaster.Fill(ds, "m_tableName");
oleAdMaster.Dispose();
oleDBConn.Close();
oleDBConn.Dispose();
AddDatasetToSQL2(ds.Tables[0], 8);
}
catch (Exception ex)
{
throw ex;
}
}
#endregion
#region Dataset的数据导入数据库
/// <summary>
/// 将Dataset的数据导入数据库
/// </summary>
/// <param name="pds">数据集</param>
/// <param name="Cols">数据集列数</param>
/// <returns></returns>
private bool AddDatasetToSQL2(DataTable pds, int Cols)
{
int ic, ir;
WeekPlans.Clear();
ic = pds.Columns.Count;
if (ic < Cols)
{
Alert.ShowInTop("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
ir = pds.Rows.Count;
Model.SGGLDB db = Funs.DB;
var projectUnits = from x in db.Project_ProjectUnit
join y in db.Base_Unit on x.UnitId equals y.UnitId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UnitId, y.UnitName };
var projectUsers = from x in db.Project_ProjectUser
join y in db.Sys_User on x.UserId equals y.UserId
where x.ProjectId == this.CurrUser.LoginProjectId
select new { x.UserId, y.UserName };
var cns = from x in db.Base_CNProfessional select x;
var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x;
string weekNo = this.txtWeekNo.Text.Trim();
DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim());
DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim());
if (pds != null && ir > 0)
{
for (int i = 0; i < ir; i++)
{
Model.JDGL_WeekPlan WeekPlan = new Model.JDGL_WeekPlan();
string col0 = pds.Rows[i][0].ToString().Trim();
string col1 = pds.Rows[i][1].ToString().Trim();
string col2 = pds.Rows[i][2].ToString().Trim();
string col3 = pds.Rows[i][3].ToString().Trim();
string col4 = pds.Rows[i][4].ToString().Trim();
string col5 = pds.Rows[i][5].ToString().Trim();
string col6 = pds.Rows[i][6].ToString().Trim();
string col7 = pds.Rows[i][7].ToString().Trim();
WeekPlan.WeekNo = weekNo;
WeekPlan.StartDate = startDate;
WeekPlan.EndDate = endDate;
if (!string.IsNullOrEmpty(col0))//单位工程
{
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkName == col0);
if (unitWork != null)
{
WeekPlan.UnitWork = unitWork.UnitWorkId;
}
}
if (!string.IsNullOrEmpty(col1))//专业
{
var cn = cns.FirstOrDefault(x => x.ProfessionalName == col1);
if (cn != null)
{
WeekPlan.Major = cn.CNProfessionalId;
}
}
if (!string.IsNullOrEmpty(col2))//工作项
{
WeekPlan.WorkContent = col2;
}
if (!string.IsNullOrEmpty(col3))//责任单位
{
var projectUnit = projectUnits.FirstOrDefault(x => x.UnitName == col3);
if (projectUnit != null)
{
WeekPlan.UnitId = projectUnit.UnitId;
}
}
if (!string.IsNullOrEmpty(col4))//五环责任人
{
var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col4);
if (projectUser != null)
{
WeekPlan.DutyPerson = projectUser.UserId;
}
}
if (!string.IsNullOrEmpty(col5))//计划完成时间
{
WeekPlan.PlanDate = Funs.GetNewDateTime(col5);
}
if (!string.IsNullOrEmpty(col6))//完成状态
{
WeekPlan.IsOK = col6 == "已完成" ? true : false;
}
if (!string.IsNullOrEmpty(col7))//备注
{
WeekPlan.Remark = col7;
}
int num = (from x in Funs.DB.JDGL_WeekPlan where x.WeekNo == weekNo && x.ProjectId == this.CurrUser.LoginProjectId select x).Count();
WeekPlan.SortIndex = num + 1;
WeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
WeekPlans.Add(WeekPlan);
}
if (WeekPlans.Count > 0)
{
this.Grid1.Hidden = false;
this.Grid1.DataSource = WeekPlans;
this.Grid1.DataBind();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#endregion
#region
/// <summary>
/// 保存
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.txtWeekNo.Text.Trim()))
{
ShowNotify("请选择周号!", MessageBoxIcon.Warning);
return;
}
if (string.IsNullOrEmpty(errorInfos))
{
var WeekPlanLists = from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == this.ProjectId select x;
string quantityListId = string.Empty;
int a = WeekPlans.Count();
string weekNo = this.txtWeekNo.Text.Trim();
for (int i = 0; i < a; i++)
{
var oldWeekPlan = WeekPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.WeekNo == weekNo && x.UnitId == WeekPlans[i].UnitId && x.WorkContent == WeekPlans[i].WorkContent);
if (oldWeekPlan == null)
{
Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan();
newWeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan));
newWeekPlan.ProjectId = this.ProjectId;
newWeekPlan.WeekNo = weekNo;
newWeekPlan.StartDate= WeekPlans[i].StartDate;
newWeekPlan.EndDate = WeekPlans[i].EndDate;
newWeekPlan.UnitWork = WeekPlans[i].UnitWork;
newWeekPlan.Major = WeekPlans[i].Major;
newWeekPlan.WorkContent = WeekPlans[i].WorkContent;
newWeekPlan.UnitId = WeekPlans[i].UnitId;
newWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
newWeekPlan.PlanDate = WeekPlans[i].PlanDate;
newWeekPlan.IsOK = WeekPlans[i].IsOK;
newWeekPlan.Remark = WeekPlans[i].Remark;
newWeekPlan.SortIndex = WeekPlans[i].SortIndex;
newWeekPlan.CompileMan = this.CurrUser.UserId;
newWeekPlan.CompileDate = DateTime.Now;
BLL.WeekPlanService.AddWeekPlan(newWeekPlan);
}
else
{
oldWeekPlan.UnitWork = WeekPlans[i].UnitWork;
oldWeekPlan.Major = WeekPlans[i].Major;
oldWeekPlan.WorkContent = WeekPlans[i].WorkContent;
oldWeekPlan.UnitId = WeekPlans[i].UnitId;
oldWeekPlan.DutyPerson = WeekPlans[i].DutyPerson;
oldWeekPlan.PlanDate = WeekPlans[i].PlanDate;
oldWeekPlan.IsOK = WeekPlans[i].IsOK;
oldWeekPlan.Remark = WeekPlans[i].Remark;
BLL.WeekPlanService.UpdateWeekPlan(oldWeekPlan);
}
}
string rootPath = Server.MapPath("~/");
string initFullPath = rootPath + initPath;
string filePath = initFullPath + this.hdFileName.Text;
if (filePath != string.Empty && System.IO.File.Exists(filePath))
{
System.IO.File.Delete(filePath);//删除上传的XLS文件
}
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 导出错误提示
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnOut_Click(object sender, EventArgs e)
{
//string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss");
//System.Web.HttpContext HC = System.Web.HttpContext.Current;
//HC.Response.Clear();
//HC.Response.Buffer = true;
//HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文
////---导出为Excel文件
//HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls");
//HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。
//System.IO.StringWriter sw = new System.IO.StringWriter();
//System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw);
//this.gvErrorInfo.RenderControl(htw);
//HC.Response.Write(sw.ToString());
//HC.Response.End();
}
/// <summary>
/// 重载VerifyRenderingInServerForm方法否则运行的时候会出现如下错误提示“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内”
/// </summary>
/// <param name="control"></param>
public override void VerifyRenderingInServerForm(Control control)
{
}
#endregion
#region
/// <summary>
/// 下载模板按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDownLoad_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel")));
}
/// <summary>
/// 下载导入模板
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void PageManager1_CustomEvent(object sender, CustomEventArgs e)
{
if (e.EventArgument == "Confirm_OK")
{
string rootPath = Server.MapPath("~/");
string uploadfilepath = rootPath + Const.WeekPlanTemplateUrl;
string filePath = Const.WeekPlanTemplateUrl;
string fileName = Path.GetFileName(filePath);
FileInfo info = new FileInfo(uploadfilepath);
long fileSize = info.Length;
Response.ClearContent();
Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8));
Response.ContentType = "excel/plain";
Response.ContentEncoding = System.Text.Encoding.UTF8;
Response.AddHeader("Content-Length", fileSize.ToString().Trim());
Response.TransmitFile(uploadfilepath, 0, fileSize);
Response.End();
}
}
#endregion
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertUnitName(object UnitId)
{
string name = string.Empty;
if (UnitId != null)
{
name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString());
}
return name;
}
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertDutyPersonName(object DutyPerson)
{
string name = string.Empty;
if (DutyPerson != null)
{
name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString());
}
return name;
}
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertUnitWorkName(object UnitWork)
{
string name = string.Empty;
if (UnitWork != null)
{
Model.WBS_UnitWork uw = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWork.ToString());
if (uw != null)
{
name = uw.UnitWorkName;
}
}
return name;
}
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertProfessionalName(object Major)
{
string name = string.Empty;
if (Major != null)
{
Model.Base_CNProfessional major = BLL.CNProfessionalService.GetCNProfessional(Major.ToString());
if (major != null)
{
name = major.ProfessionalName;
}
}
return name;
}
/// <summary>
///
/// </summary>
/// <param name="registrationId"></param>
/// <returns></returns>
protected string ConvertIsOK(object IsOK)
{
string name = string.Empty;
if (IsOK != null)
{
if (IsOK.ToString() == "True")
{
name = "已完成";
}
else
{
name = "未完成";
}
}
return name;
}
}
}

View File

@ -0,0 +1,204 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.JDGL.Check {
public partial class WeekPlanIn {
/// <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>
/// Toolbar2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar2;
/// <summary>
/// txtWeekNo 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtWeekNo;
/// <summary>
/// txtStartDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartDate;
/// <summary>
/// txtEndDate 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndDate;
/// <summary>
/// btnAudit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAudit;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// fuAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.FileUpload fuAttachUrl;
/// <summary>
/// Grid1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// Label2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label2;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label3;
/// <summary>
/// Label4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label4;
/// <summary>
/// lbImageUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lbImageUrl;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label1;
/// <summary>
/// Label5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label Label5;
/// <summary>
/// hdFileName 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdFileName;
/// <summary>
/// hdCheckResult 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.HiddenField hdCheckResult;
}
}

View File

@ -77,7 +77,7 @@
<add verb="GET" path="res.axd" type="FineUIPro.ResourceHandler, FineUIPro" validate="false"/>
<add path="ChartImg.axd" verb="GET,POST,HEAD" type="System.Web.UI.DataVisualization.Charting.ChartHttpHandler, System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" validate="false"/>
</httpHandlers>
<compilation debug="true" targetFramework="4.6.1"/>
<compilation debug="false" targetFramework="4.6.1"/>
<httpRuntime requestValidationMode="2.0" maxRequestLength="2147483647" executionTimeout="36000"/>
<authentication mode="Forms">
<forms loginUrl="Login.aspx" name="PUBLISHERCOOKIE" protection="All" timeout="1440" path="/"/>

View File

@ -250,15 +250,12 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
}).ToList();
//一次共检合格数
var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
where y.IsOnceQualified == true && y.InspectionDate != null
select new { y.ProjectId,y.InspectionDate,y.IsOnceQualified,x.InspectionId, Isid= y.InspectionId }).ToList();
var list20 = (from x in Funs.DB.ProcessControl_InspectionManagement
where x.IsOnceQualified == true
select new { x.ProjectId,x.CompileDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList();
////总数
var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail
join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId
where y.InspectionDate != null
select new { y.ProjectId, x.InspectionId, Isid = y.InspectionId,y.InspectionDate }).ToList();
var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement
select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.CompileDate }).ToList();
//关键事项
var list22 = (from x in Funs.DB.GJSX
@ -639,7 +636,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary
if (hgs>0)
{
//验收日期
model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate;
model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate;
}
model.SummeryResult = hgs.ToString();
allList.Add(model);

View File

@ -11,6 +11,7 @@
<TreeNode id="D1FC6ACA-C789-401C-B9FB-3A96FFE4C8AC" Text="进度报表" NavigateUrl="JDGL/CostAnalysis/JDReport.aspx"></TreeNode>
<TreeNode id="9CAF311E-C234-4DA4-B235-D4E478FBD80E" Text="里程碑" NavigateUrl="JDGL/WBS/MilePost.aspx"></TreeNode>
<TreeNode id="94287B92-7E96-4B90-BC6F-DAF30AE3B314" Text="月度计划情况" NavigateUrl="JDGL/Check/MonthPlan.aspx"></TreeNode>
<TreeNode id="56A54B4B-BBA3-4249-9FFC-3A60DAC79059" Text="周进度计划" NavigateUrl="JDGL/Check/WeekPlan.aspx"></TreeNode>
<TreeNode id="92CBD072-20F8-45B1-9D17-6F7494DD2020" Text="数据导入" NavigateUrl=""><TreeNode id="F3AA42B3-5776-4992-A625-1216C579FEDE" Text="项目进度情况" NavigateUrl="JDGL/Check/ProgressCompletion.aspx"></TreeNode>
<TreeNode id="2AE9D982-A499-497F-8F54-ADDA5856887E" Text="工程量完成情况" NavigateUrl="JDGL/Check/QuantityCompletion.aspx"></TreeNode>
<TreeNode id="82E513B9-1A6F-495A-A633-EBC89CE5273A" Text="低温储罐完成情况" NavigateUrl="JDGL/Check/LowTankCompletion.aspx"></TreeNode>

View File

@ -291,9 +291,9 @@
var one1 =<%=One1 %>
var one2 =<%=One2 %>
var one3 =<%=One3 %>
category_One('one1', "质量验收一次合格率", one1, one1 + "%")
category_One('one1', "施工质量一次共检合格率", one1, one1 + "%")
category_One('one2', "焊接一次拍片合格率", one2, one2 + "%")
category_One('one3', "质量问题整改完成率", one3, one3 + "%")
category_One('one3', "质量巡检问题整改率", one3, one3 + "%")
</script>
<script type="text/javascript">
function category_six(id, title, xArr, data) {
@ -735,7 +735,7 @@
//var data = [12, 5, 28, 43, 22, 11]
//var data1 = [21, 9, 12, 15, 8, 43]
var series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
barGap: 0,
data: three.series[0].data,
@ -876,7 +876,7 @@
//var data = [12, 5, 28, 43, 22, 11, 40, 21, 9]
//var data1 = [21, 9, 12, 15, 8, 43, 17, 11, 22]
var series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
barWidth: 30,
barGap: 0,
@ -1045,7 +1045,7 @@
//var data = [12, 5, 28, 43, 22, 11]
//var data1 = [21, 9, 12, 15, 8, 43]
var series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
data: three.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }
@ -1060,7 +1060,7 @@
//xArr = ["专业1", "专业2", "专业3", "专业4", "专业5", "专业6"]
xArr = three2.categories
series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
data: three2.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }
@ -1077,7 +1077,7 @@
else if (value == 4) {
var xArr = four.categories
var series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
data: four.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }
@ -1091,7 +1091,7 @@
if (index == 2) {
xArr = four2.categories
series = [{
name: '质量验收一次合格率',
name: '施工质量一次共检合格率',
type: 'bar',
data: four2.series[0].data,
itemStyle: { normal: { color: 'rgba(43,155,176,1)' } }

View File

@ -588,7 +588,7 @@
var aPassChart = echarts.init(document.getElementById('hjmap'));
aPassChart.setOption(AOption1);
}
// 一次共检合格率
// 施工质量一次共检合格率
ycmap()
function ycmap() {
let allNumber = 70 // 总计
@ -597,7 +597,7 @@
let AOption1 = {
title: [
{
text: '一次共检合格率',
text: '施工质量一次共检合格率',
bottom: fontSize(30),
left: 'center',
textStyle: {
@ -673,7 +673,7 @@
var aPassChart = echarts.init(document.getElementById('ycmap'));
aPassChart.setOption(AOption1);
}
// 质量问题整改率
// 质量巡检问题整改率
zlmap()
function zlmap() {
let allNumber = 70 // 总计
@ -682,7 +682,7 @@ zlmap()
let AOption1 = {
title: [
{
text: '质量问题整改率',
text: '质量巡检问题整改率',
bottom: fontSize(30),
left: 'center',
textStyle: {

View File

@ -491,7 +491,7 @@
let AOption1 = {
title: [
{
text: '质量问题整改率',
text: '质量巡检问题整改率',
bottom: fontSize(30),
left: 'center',
textStyle: {
@ -567,7 +567,7 @@
var aPassChart = echarts.init(document.getElementById('zlmap'));
aPassChart.setOption(AOption1);
}
// 一次共检合格率
// 施工质量一次共检合格率
ycmap()
function ycmap() {
let allNumber = 70 // 总计
@ -576,7 +576,7 @@
let AOption1 = {
title: [
{
text: '一次共检合格率',
text: '施工质量一次共检合格率',
bottom: fontSize(30),
left: 'center',
textStyle: {

View File

@ -146,7 +146,7 @@
<div class="zl-number" style="color: #FF7474;"><%=getIsOnceInspectionManagement() %></div>
</div>
<div class="y_image_default y_column" style="width: 2.7625rem;">
<div class="zl-label">一次验收合格率</div>
<div class="zl-label">施工质量一次共检合格率</div>
<div class="zl-number" style="color: #FFA602;"><%=GetInspectionManagementZgl() %></div>
</div>
</div>
@ -186,7 +186,7 @@
</div>
<div class="y_box js-hover" data-type="QualityProblem">
<div class="y_box_label y_image_default">质量问题治理数据</div>
<div class="y_box_label y_image_default">质量巡检问题治理数据</div>
<div class="y_box_main">
<div class="zl-card y_row">
<div class="y_image_default y_column">
@ -421,7 +421,7 @@
let value = [<%=InspectionManagementSumCount%>]
//合格
let value1 = [<%=InspectionManagementOkCount%>]
//一次验收合格率
//施工质量一次共检合格率
let value2 = [<%=InspectionManagementOneOkCount%>]
//专业
let label = [<%=InspectionManagementZy%>]
@ -434,7 +434,7 @@
legend: {
top: fontSize(10),
left: 'center',
data: [{ name: '总计', textStyle: { color: '#20AFFF' } }, { name: '合格', textStyle: { color: '#12CDA2' } }, { name: '一次验收合格率', textStyle: { color: '#FFA602' } }]
data: [{ name: '总计', textStyle: { color: '#20AFFF' } }, { name: '合格', textStyle: { color: '#12CDA2' } }, { name: '施工质量一次共检合格率', textStyle: { color: '#FFA602' } }]
},
xAxis: {
type: 'category',
@ -516,7 +516,7 @@
},
},
{
name: '一次验收合格率',
name: '施工质量一次共检合格率',
data: value2,
type: 'line',
itemStyle: {

View File

@ -507,6 +507,8 @@ namespace FineUIPro.Web
CreateMenuXML.getMenuXML();
MenuSwitchMethod(string.Empty);
ShowNotify("菜单刷新完成!", MessageBoxIcon.Success);
BOSHENGMonitorService.AddData(null,null);
//ShowNotify("同步完成!", MessageBoxIcon.Success);
}
protected void drpYear_SelectedIndexChanged(object sender, EventArgs e)

View File

@ -1337,6 +1337,9 @@ namespace Model
partial void InsertJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance);
partial void UpdateJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance);
partial void DeleteJDGL_UndergroundPipeCompletion(JDGL_UndergroundPipeCompletion instance);
partial void InsertJDGL_WeekPlan(JDGL_WeekPlan instance);
partial void UpdateJDGL_WeekPlan(JDGL_WeekPlan instance);
partial void DeleteJDGL_WeekPlan(JDGL_WeekPlan instance);
partial void InsertLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
partial void UpdateLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
partial void DeleteLaw_HSSEStandardsList(Law_HSSEStandardsList instance);
@ -6191,6 +6194,14 @@ namespace Model
}
}
public System.Data.Linq.Table<JDGL_WeekPlan> JDGL_WeekPlan
{
get
{
return this.GetTable<JDGL_WeekPlan>();
}
}
public System.Data.Linq.Table<Law_HSSEStandardsList> Law_HSSEStandardsList
{
get
@ -26407,6 +26418,8 @@ namespace Model
private EntitySet<JDGL_UndergroundPipeCompletion> _JDGL_UndergroundPipeCompletion;
private EntitySet<JDGL_WeekPlan> _JDGL_WeekPlan;
private EntitySet<Law_LawRegulationIdentify> _Law_LawRegulationIdentify;
private EntitySet<License_BreakGround> _License_BreakGround;
@ -26926,6 +26939,7 @@ namespace Model
this._JDGL_QuantityList = new EntitySet<JDGL_QuantityList>(new Action<JDGL_QuantityList>(this.attach_JDGL_QuantityList), new Action<JDGL_QuantityList>(this.detach_JDGL_QuantityList));
this._JDGL_SteelStructureCompletion = new EntitySet<JDGL_SteelStructureCompletion>(new Action<JDGL_SteelStructureCompletion>(this.attach_JDGL_SteelStructureCompletion), new Action<JDGL_SteelStructureCompletion>(this.detach_JDGL_SteelStructureCompletion));
this._JDGL_UndergroundPipeCompletion = new EntitySet<JDGL_UndergroundPipeCompletion>(new Action<JDGL_UndergroundPipeCompletion>(this.attach_JDGL_UndergroundPipeCompletion), new Action<JDGL_UndergroundPipeCompletion>(this.detach_JDGL_UndergroundPipeCompletion));
this._JDGL_WeekPlan = new EntitySet<JDGL_WeekPlan>(new Action<JDGL_WeekPlan>(this.attach_JDGL_WeekPlan), new Action<JDGL_WeekPlan>(this.detach_JDGL_WeekPlan));
this._Law_LawRegulationIdentify = new EntitySet<Law_LawRegulationIdentify>(new Action<Law_LawRegulationIdentify>(this.attach_Law_LawRegulationIdentify), new Action<Law_LawRegulationIdentify>(this.detach_Law_LawRegulationIdentify));
this._License_BreakGround = new EntitySet<License_BreakGround>(new Action<License_BreakGround>(this.attach_License_BreakGround), new Action<License_BreakGround>(this.detach_License_BreakGround));
this._License_Electricity = new EntitySet<License_Electricity>(new Action<License_Electricity>(this.attach_License_Electricity), new Action<License_Electricity>(this.detach_License_Electricity));
@ -30157,6 +30171,19 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Base_Project", Storage="_JDGL_WeekPlan", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<JDGL_WeekPlan> JDGL_WeekPlan
{
get
{
return this._JDGL_WeekPlan;
}
set
{
this._JDGL_WeekPlan.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Law_LawRegulationIdentify_Base_Project", Storage="_Law_LawRegulationIdentify", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")]
public EntitySet<Law_LawRegulationIdentify> Law_LawRegulationIdentify
{
@ -33906,6 +33933,18 @@ namespace Model
entity.Base_Project = null;
}
private void attach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Base_Project = this;
}
private void detach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Base_Project = null;
}
private void attach_Law_LawRegulationIdentify(Law_LawRegulationIdentify entity)
{
this.SendPropertyChanging();
@ -39663,6 +39702,8 @@ namespace Model
private EntitySet<JDGL_UndergroundPipeCompletion> _JDGL_UndergroundPipeCompletion;
private EntitySet<JDGL_WeekPlan> _JDGL_WeekPlan;
private EntitySet<License_BreakGround> _License_BreakGround;
private EntitySet<License_Electricity> _License_Electricity;
@ -39964,6 +40005,7 @@ namespace Model
this._JDGL_PipelineCompletion = new EntitySet<JDGL_PipelineCompletion>(new Action<JDGL_PipelineCompletion>(this.attach_JDGL_PipelineCompletion), new Action<JDGL_PipelineCompletion>(this.detach_JDGL_PipelineCompletion));
this._JDGL_SteelStructureCompletion = new EntitySet<JDGL_SteelStructureCompletion>(new Action<JDGL_SteelStructureCompletion>(this.attach_JDGL_SteelStructureCompletion), new Action<JDGL_SteelStructureCompletion>(this.detach_JDGL_SteelStructureCompletion));
this._JDGL_UndergroundPipeCompletion = new EntitySet<JDGL_UndergroundPipeCompletion>(new Action<JDGL_UndergroundPipeCompletion>(this.attach_JDGL_UndergroundPipeCompletion), new Action<JDGL_UndergroundPipeCompletion>(this.detach_JDGL_UndergroundPipeCompletion));
this._JDGL_WeekPlan = new EntitySet<JDGL_WeekPlan>(new Action<JDGL_WeekPlan>(this.attach_JDGL_WeekPlan), new Action<JDGL_WeekPlan>(this.detach_JDGL_WeekPlan));
this._License_BreakGround = new EntitySet<License_BreakGround>(new Action<License_BreakGround>(this.attach_License_BreakGround), new Action<License_BreakGround>(this.detach_License_BreakGround));
this._License_Electricity = new EntitySet<License_Electricity>(new Action<License_Electricity>(this.attach_License_Electricity), new Action<License_Electricity>(this.detach_License_Electricity));
this._License_EquipmentSafetyList = new EntitySet<License_EquipmentSafetyList>(new Action<License_EquipmentSafetyList>(this.attach_License_EquipmentSafetyList), new Action<License_EquipmentSafetyList>(this.detach_License_EquipmentSafetyList));
@ -41951,6 +41993,19 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Base_Unit", Storage="_JDGL_WeekPlan", ThisKey="UnitId", OtherKey="UnitId", DeleteRule="NO ACTION")]
public EntitySet<JDGL_WeekPlan> JDGL_WeekPlan
{
get
{
return this._JDGL_WeekPlan;
}
set
{
this._JDGL_WeekPlan.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_License_BreakGround_Base_Unit", Storage="_License_BreakGround", ThisKey="UnitId", OtherKey="ApplyUnitId", DeleteRule="NO ACTION")]
public EntitySet<License_BreakGround> License_BreakGround
{
@ -44150,6 +44205,18 @@ namespace Model
entity.Base_Unit = null;
}
private void attach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Base_Unit = this;
}
private void detach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Base_Unit = null;
}
private void attach_License_BreakGround(License_BreakGround entity)
{
this.SendPropertyChanging();
@ -214965,6 +215032,551 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.JDGL_WeekPlan")]
public partial class JDGL_WeekPlan : INotifyPropertyChanging, INotifyPropertyChanged
{
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
private string _WeekPlanId;
private string _ProjectId;
private string _WeekNo;
private System.Nullable<System.DateTime> _StartDate;
private System.Nullable<System.DateTime> _EndDate;
private string _UnitWork;
private string _Major;
private string _WorkContent;
private string _UnitId;
private string _DutyPerson;
private System.Nullable<System.DateTime> _PlanDate;
private System.Nullable<bool> _IsOK;
private string _Remark;
private string _CompileMan;
private System.Nullable<System.DateTime> _CompileDate;
private System.Nullable<int> _SortIndex;
private EntityRef<Base_Project> _Base_Project;
private EntityRef<Base_Unit> _Base_Unit;
private EntityRef<Sys_User> _Sys_User;
#region
partial void OnLoaded();
partial void OnValidate(System.Data.Linq.ChangeAction action);
partial void OnCreated();
partial void OnWeekPlanIdChanging(string value);
partial void OnWeekPlanIdChanged();
partial void OnProjectIdChanging(string value);
partial void OnProjectIdChanged();
partial void OnWeekNoChanging(string value);
partial void OnWeekNoChanged();
partial void OnStartDateChanging(System.Nullable<System.DateTime> value);
partial void OnStartDateChanged();
partial void OnEndDateChanging(System.Nullable<System.DateTime> value);
partial void OnEndDateChanged();
partial void OnUnitWorkChanging(string value);
partial void OnUnitWorkChanged();
partial void OnMajorChanging(string value);
partial void OnMajorChanged();
partial void OnWorkContentChanging(string value);
partial void OnWorkContentChanged();
partial void OnUnitIdChanging(string value);
partial void OnUnitIdChanged();
partial void OnDutyPersonChanging(string value);
partial void OnDutyPersonChanged();
partial void OnPlanDateChanging(System.Nullable<System.DateTime> value);
partial void OnPlanDateChanged();
partial void OnIsOKChanging(System.Nullable<bool> value);
partial void OnIsOKChanged();
partial void OnRemarkChanging(string value);
partial void OnRemarkChanged();
partial void OnCompileManChanging(string value);
partial void OnCompileManChanged();
partial void OnCompileDateChanging(System.Nullable<System.DateTime> value);
partial void OnCompileDateChanged();
partial void OnSortIndexChanging(System.Nullable<int> value);
partial void OnSortIndexChanged();
#endregion
public JDGL_WeekPlan()
{
this._Base_Project = default(EntityRef<Base_Project>);
this._Base_Unit = default(EntityRef<Base_Unit>);
this._Sys_User = default(EntityRef<Sys_User>);
OnCreated();
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeekPlanId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)]
public string WeekPlanId
{
get
{
return this._WeekPlanId;
}
set
{
if ((this._WeekPlanId != value))
{
this.OnWeekPlanIdChanging(value);
this.SendPropertyChanging();
this._WeekPlanId = value;
this.SendPropertyChanged("WeekPlanId");
this.OnWeekPlanIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")]
public string ProjectId
{
get
{
return this._ProjectId;
}
set
{
if ((this._ProjectId != value))
{
if (this._Base_Project.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnProjectIdChanging(value);
this.SendPropertyChanging();
this._ProjectId = value;
this.SendPropertyChanged("ProjectId");
this.OnProjectIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WeekNo", DbType="NVarChar(50)")]
public string WeekNo
{
get
{
return this._WeekNo;
}
set
{
if ((this._WeekNo != value))
{
this.OnWeekNoChanging(value);
this.SendPropertyChanging();
this._WeekNo = value;
this.SendPropertyChanged("WeekNo");
this.OnWeekNoChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")]
public System.Nullable<System.DateTime> StartDate
{
get
{
return this._StartDate;
}
set
{
if ((this._StartDate != value))
{
this.OnStartDateChanging(value);
this.SendPropertyChanging();
this._StartDate = value;
this.SendPropertyChanged("StartDate");
this.OnStartDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")]
public System.Nullable<System.DateTime> EndDate
{
get
{
return this._EndDate;
}
set
{
if ((this._EndDate != value))
{
this.OnEndDateChanging(value);
this.SendPropertyChanging();
this._EndDate = value;
this.SendPropertyChanged("EndDate");
this.OnEndDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWork", DbType="NVarChar(50)")]
public string UnitWork
{
get
{
return this._UnitWork;
}
set
{
if ((this._UnitWork != value))
{
this.OnUnitWorkChanging(value);
this.SendPropertyChanging();
this._UnitWork = value;
this.SendPropertyChanged("UnitWork");
this.OnUnitWorkChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Major", DbType="NVarChar(50)")]
public string Major
{
get
{
return this._Major;
}
set
{
if ((this._Major != value))
{
this.OnMajorChanging(value);
this.SendPropertyChanging();
this._Major = value;
this.SendPropertyChanged("Major");
this.OnMajorChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkContent", DbType="NVarChar(500)")]
public string WorkContent
{
get
{
return this._WorkContent;
}
set
{
if ((this._WorkContent != value))
{
this.OnWorkContentChanging(value);
this.SendPropertyChanging();
this._WorkContent = value;
this.SendPropertyChanged("WorkContent");
this.OnWorkContentChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitId", DbType="NVarChar(50)")]
public string UnitId
{
get
{
return this._UnitId;
}
set
{
if ((this._UnitId != value))
{
if (this._Base_Unit.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnUnitIdChanging(value);
this.SendPropertyChanging();
this._UnitId = value;
this.SendPropertyChanged("UnitId");
this.OnUnitIdChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DutyPerson", DbType="NVarChar(50)")]
public string DutyPerson
{
get
{
return this._DutyPerson;
}
set
{
if ((this._DutyPerson != value))
{
if (this._Sys_User.HasLoadedOrAssignedValue)
{
throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException();
}
this.OnDutyPersonChanging(value);
this.SendPropertyChanging();
this._DutyPerson = value;
this.SendPropertyChanged("DutyPerson");
this.OnDutyPersonChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanDate", DbType="DateTime")]
public System.Nullable<System.DateTime> PlanDate
{
get
{
return this._PlanDate;
}
set
{
if ((this._PlanDate != value))
{
this.OnPlanDateChanging(value);
this.SendPropertyChanging();
this._PlanDate = value;
this.SendPropertyChanged("PlanDate");
this.OnPlanDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsOK", DbType="Bit")]
public System.Nullable<bool> IsOK
{
get
{
return this._IsOK;
}
set
{
if ((this._IsOK != value))
{
this.OnIsOKChanging(value);
this.SendPropertyChanging();
this._IsOK = value;
this.SendPropertyChanged("IsOK");
this.OnIsOKChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(200)")]
public string Remark
{
get
{
return this._Remark;
}
set
{
if ((this._Remark != value))
{
this.OnRemarkChanging(value);
this.SendPropertyChanging();
this._Remark = value;
this.SendPropertyChanged("Remark");
this.OnRemarkChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")]
public string CompileMan
{
get
{
return this._CompileMan;
}
set
{
if ((this._CompileMan != value))
{
this.OnCompileManChanging(value);
this.SendPropertyChanging();
this._CompileMan = value;
this.SendPropertyChanged("CompileMan");
this.OnCompileManChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")]
public System.Nullable<System.DateTime> CompileDate
{
get
{
return this._CompileDate;
}
set
{
if ((this._CompileDate != value))
{
this.OnCompileDateChanging(value);
this.SendPropertyChanging();
this._CompileDate = value;
this.SendPropertyChanged("CompileDate");
this.OnCompileDateChanged();
}
}
}
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SortIndex", DbType="Int")]
public System.Nullable<int> SortIndex
{
get
{
return this._SortIndex;
}
set
{
if ((this._SortIndex != value))
{
this.OnSortIndexChanging(value);
this.SendPropertyChanging();
this._SortIndex = value;
this.SendPropertyChanged("SortIndex");
this.OnSortIndexChanged();
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)]
public Base_Project Base_Project
{
get
{
return this._Base_Project.Entity;
}
set
{
Base_Project previousValue = this._Base_Project.Entity;
if (((previousValue != value)
|| (this._Base_Project.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Project.Entity = null;
previousValue.JDGL_WeekPlan.Remove(this);
}
this._Base_Project.Entity = value;
if ((value != null))
{
value.JDGL_WeekPlan.Add(this);
this._ProjectId = value.ProjectId;
}
else
{
this._ProjectId = default(string);
}
this.SendPropertyChanged("Base_Project");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Base_Unit", Storage="_Base_Unit", ThisKey="UnitId", OtherKey="UnitId", IsForeignKey=true)]
public Base_Unit Base_Unit
{
get
{
return this._Base_Unit.Entity;
}
set
{
Base_Unit previousValue = this._Base_Unit.Entity;
if (((previousValue != value)
|| (this._Base_Unit.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Base_Unit.Entity = null;
previousValue.JDGL_WeekPlan.Remove(this);
}
this._Base_Unit.Entity = value;
if ((value != null))
{
value.JDGL_WeekPlan.Add(this);
this._UnitId = value.UnitId;
}
else
{
this._UnitId = default(string);
}
this.SendPropertyChanged("Base_Unit");
}
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Sys_User", Storage="_Sys_User", ThisKey="DutyPerson", OtherKey="UserId", IsForeignKey=true)]
public Sys_User Sys_User
{
get
{
return this._Sys_User.Entity;
}
set
{
Sys_User previousValue = this._Sys_User.Entity;
if (((previousValue != value)
|| (this._Sys_User.HasLoadedOrAssignedValue == false)))
{
this.SendPropertyChanging();
if ((previousValue != null))
{
this._Sys_User.Entity = null;
previousValue.JDGL_WeekPlan.Remove(this);
}
this._Sys_User.Entity = value;
if ((value != null))
{
value.JDGL_WeekPlan.Add(this);
this._DutyPerson = value.UserId;
}
else
{
this._DutyPerson = default(string);
}
this.SendPropertyChanged("Sys_User");
}
}
}
public event PropertyChangingEventHandler PropertyChanging;
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void SendPropertyChanging()
{
if ((this.PropertyChanging != null))
{
this.PropertyChanging(this, emptyChangingEventArgs);
}
}
protected virtual void SendPropertyChanged(String propertyName)
{
if ((this.PropertyChanged != null))
{
this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName));
}
}
}
[global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Law_HSSEStandardsList")]
public partial class Law_HSSEStandardsList : INotifyPropertyChanging, INotifyPropertyChanged
{
@ -351895,6 +352507,8 @@ namespace Model
private EntitySet<JDGL_UndergroundPipeCompletion> _JDGL_UndergroundPipeCompletion;
private EntitySet<JDGL_WeekPlan> _JDGL_WeekPlan;
private EntitySet<Law_HSSEStandardsList> _Law_HSSEStandardsList;
private EntitySet<Law_LawRegulationList> _Law_LawRegulationList;
@ -352548,6 +353162,7 @@ namespace Model
this._JDGL_QuantityCompletion = new EntitySet<JDGL_QuantityCompletion>(new Action<JDGL_QuantityCompletion>(this.attach_JDGL_QuantityCompletion), new Action<JDGL_QuantityCompletion>(this.detach_JDGL_QuantityCompletion));
this._JDGL_SteelStructureCompletion = new EntitySet<JDGL_SteelStructureCompletion>(new Action<JDGL_SteelStructureCompletion>(this.attach_JDGL_SteelStructureCompletion), new Action<JDGL_SteelStructureCompletion>(this.detach_JDGL_SteelStructureCompletion));
this._JDGL_UndergroundPipeCompletion = new EntitySet<JDGL_UndergroundPipeCompletion>(new Action<JDGL_UndergroundPipeCompletion>(this.attach_JDGL_UndergroundPipeCompletion), new Action<JDGL_UndergroundPipeCompletion>(this.detach_JDGL_UndergroundPipeCompletion));
this._JDGL_WeekPlan = new EntitySet<JDGL_WeekPlan>(new Action<JDGL_WeekPlan>(this.attach_JDGL_WeekPlan), new Action<JDGL_WeekPlan>(this.detach_JDGL_WeekPlan));
this._Law_HSSEStandardsList = new EntitySet<Law_HSSEStandardsList>(new Action<Law_HSSEStandardsList>(this.attach_Law_HSSEStandardsList), new Action<Law_HSSEStandardsList>(this.detach_Law_HSSEStandardsList));
this._Law_LawRegulationList = new EntitySet<Law_LawRegulationList>(new Action<Law_LawRegulationList>(this.attach_Law_LawRegulationList), new Action<Law_LawRegulationList>(this.detach_Law_LawRegulationList));
this._Law_ManageRule = new EntitySet<Law_ManageRule>(new Action<Law_ManageRule>(this.attach_Law_ManageRule), new Action<Law_ManageRule>(this.detach_Law_ManageRule));
@ -355771,6 +356386,19 @@ namespace Model
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_JDGL_WeekPlan_Sys_User", Storage="_JDGL_WeekPlan", ThisKey="UserId", OtherKey="DutyPerson", DeleteRule="NO ACTION")]
public EntitySet<JDGL_WeekPlan> JDGL_WeekPlan
{
get
{
return this._JDGL_WeekPlan;
}
set
{
this._JDGL_WeekPlan.Assign(value);
}
}
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Law_HSSEStandardsList_Sys_User2", Storage="_Law_HSSEStandardsList", ThisKey="UserId", OtherKey="AuditMan", DeleteRule="NO ACTION")]
public EntitySet<Law_HSSEStandardsList> Law_HSSEStandardsList
{
@ -360246,6 +360874,18 @@ namespace Model
entity.Sys_User = null;
}
private void attach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Sys_User = this;
}
private void detach_JDGL_WeekPlan(JDGL_WeekPlan entity)
{
this.SendPropertyChanging();
entity.Sys_User = null;
}
private void attach_Law_HSSEStandardsList(Law_HSSEStandardsList entity)
{
this.SendPropertyChanging();

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<LastActiveSolutionConfig>Debug|Any CPU</LastActiveSolutionConfig>
<LastActiveSolutionConfig>Release|Any CPU</LastActiveSolutionConfig>
<UseIISExpress>true</UseIISExpress>
<Use64BitIISExpress />
<IISExpressSSLPort />