This commit is contained in:
李鹏飞 2024-02-04 11:13:06 +08:00
commit 07fc46b27e
101 changed files with 10502 additions and 1387 deletions

View File

@ -572,6 +572,9 @@ GO
INSERT INTO Sys_Const (ID,ConstValue,ConstText,SortIndex,GroupId)
VALUES('85CF0BBF-A3F3-42DF-89DC-CE9A4886BCA1','Menu_Video','ÊÓÆµ¼à¿Ø',11,'MenuType_P')
GO
INSERT INTO Sys_Const (ID,ConstValue,ConstText,SortIndex,GroupId)
VALUES('4F835AC7-9FD8-443D-A5A6-F557AA5A2221','Menu_Transfer','移交管理',12,'MenuType_P')
GO
--ÏîÄ¿ÀàÐÍ
INSERT INTO dbo.Sys_Const(ID, ConstValue, ConstText, SortIndex, GroupId)

View File

@ -53,6 +53,52 @@ GO
CREATE TABLE [dbo].[Transfer_StaticEquipment](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[StaticEquipment] [nvarchar](50) NULL,
[SYSTEM] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[TestPackage] [nvarchar](50) NULL,
[TestPackageSTART] [datetime] NULL,
[TestPackageFINISH] [datetime] NULL,
[MechanicalFINALStatus] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_StaticEquipment] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'StaticEquipment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Transfer_StaticEquipment'
GO
CREATE TABLE [dbo].[Transfer_RotatingEquipment](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[RotatingEquipment] [nvarchar](50) NULL,
[SYSTEM] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[TestPackage] [nvarchar](50) NULL,
[TestPackageSTART] [datetime] NULL,
[TestPackageFINISH] [datetime] NULL,
[MechanicalFINALStatus] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_RotatingEquipment] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'RotatingEquipment' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Transfer_RotatingEquipment'
GO
CREATE TABLE [dbo].[Transfer_Instrumentation](

View File

@ -1,11 +1,11 @@
alter table DriverSub_DriverSubPlan add DriverSubNames varchar(100);
go;
alter table DriverSub_DriverSubContact add DriverSubPlanId varchar(100);
go;
alter table DriverSub_DriverSubContact add DriverSubContractorsId varchar(100);
go;
alter table DriverSub_DriverSubContact add SubcontractingType varchar(100);
go;
alter table DriverSub_DriverSubPlan add DriverSubNames varchar(100)
go
alter table DriverSub_DriverSubContact add DriverSubPlanId varchar(100)
go
alter table DriverSub_DriverSubContact add DriverSubContractorsId varchar(100)
go
alter table DriverSub_DriverSubContact add SubcontractingType varchar(100)
go
create table DriverSub_DriverSubContractors
(
DriverSubContractorsId varchar(100) primary key,
@ -20,8 +20,8 @@ create table DriverSub_DriverSubContractors
Province varchar(100),
City varchar(100),
IsUse bit default 1,
);
go;
)
go
exec sp_addextendedproperty 'MS_Description', N'企业名称', 'SCHEMA', 'dbo', 'TABLE', 'DriverSub_DriverSubContractors',
'COLUMN', 'SubUnitName'
go

View File

@ -1,79 +0,0 @@
CREATE TABLE [dbo].[Transfer_PunchlistFrom](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[Item_No] [nvarchar](50) NULL,
[Punch_No] [nvarchar](50) NULL,
[SystemName] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[Test_Package] [nvarchar](50) NULL,
[Discipline] [nvarchar](50) NULL,
[DESCRIPTION] [nvarchar](50) NULL,
[Identified] [nvarchar](50) NULL,
[Category] [nvarchar](50) NULL,
[PUNCH_ITEM_FINISH_DATE] [datetime] NULL,
[Action_By] [nvarchar](50) NULL,
[Required_By] [nvarchar](50) NULL,
[PUNCH_ITEM_STATUS] [nvarchar](50) NULL,
[Comments] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_PunchlistFrom] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Transfer_HVAC](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[HVAC] [nvarchar](50) NULL,
[SystemName] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[Test_Package] [nvarchar](50) NULL,
[Test_Package_START] [datetime] NULL,
[Test_Package_FINISH] [datetime] NULL,
[FINAL_Status] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_HVAC] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Transfer_Plumbing](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[Plumbing] [nvarchar](50) NULL,
[SystemName] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[Test_Package] [nvarchar](50) NULL,
[Test_Package_START] [datetime] NULL,
[Test_Package_FINISH] [datetime] NULL,
[FINAL_Status] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_Plumbing] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Transfer_Telecom](
[Id] [nvarchar](50) NOT NULL,
[ProjectId] [nvarchar](50) NULL,
[Telecom] [nvarchar](50) NULL,
[SystemName] [nvarchar](50) NULL,
[Subsystem] [nvarchar](50) NULL,
[Test_Package] [nvarchar](50) NULL,
[Test_Package_START] [datetime] NULL,
[Test_Package_FINISH] [datetime] NULL,
[FINAL_Status] [nvarchar](50) NULL,
CONSTRAINT [PK_Transfer_Telecom] PRIMARY KEY CLUSTERED
(
[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO

View File

@ -0,0 +1,71 @@
INSERT INTO Sys_Const (ID,ConstValue,ConstText,SortIndex,GroupId)
VALUES('4F835AC7-9FD8-443D-A5A6-F557AA5A2221','Menu_Transfer','移交管理',12,'MenuType_P')
GO
insert into Sys_Menu( MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType ,IsOffice,IsEnd,IsUsed )
values('D0850615-BF32-4CFA-84CA-EEA261676EA8','移交专业设置','BaseInfo/TransferMajor.aspx',180,'5196A6FD-4BF1-46B3-8D24-9A3CE5BB4760','Menu_SysSet',1,1,1)
GO
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('0465EA2B-2F37-4103-A717-4033894108E0','D0850615-BF32-4CFA-84CA-EEA261676EA8','增加',1)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('EF58BDF7-F303-4633-8B83-DB4B151F8EAF','D0850615-BF32-4CFA-84CA-EEA261676EA8','修改',2)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('FC1373E2-D942-4D0E-822F-CE2F16C5D42D','D0850615-BF32-4CFA-84CA-EEA261676EA8','删除',3)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('65427D56-5490-42D7-8F00-EB3A59FAA6B0','D0850615-BF32-4CFA-84CA-EEA261676EA8','保存',4)
GO
CREATE TABLE [dbo].[Base_TransferMajor](
[TransferMajorId] [nvarchar](50) NOT NULL,
[Discipline] [nvarchar](50) NULL,
[Major] [nvarchar](50) NULL,
[DisciplineCode] [nvarchar](50) NULL,
[Remark] [nvarchar](200) NULL,
CONSTRAINT [PK_BaseInfo_TransferMajor] PRIMARY KEY CLUSTERED
(
[TransferMajorId] 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
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'移交专业表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_TransferMajor'
GO
INSERT INTO Base_TransferMajor
VALUES('7A0CD361-2BF9-466A-A586-3DBA49A7D4A1','Static Equipment','静设备','01',null)
GO
INSERT INTO Base_TransferMajor
VALUES('3D5FC248-8437-4062-A882-945C077B1910','Equipment','动设备','02',null)
GO
INSERT INTO Base_TransferMajor
VALUES('B55C034D-057E-4CD3-B09B-75DBDB7D2CDC','Piping','管道','03',null)
GO
INSERT INTO Base_TransferMajor
VALUES('2DA0AB18-78BD-43A5-BBB0-2BF96E25789E','Instrument','仪表','04','only refer to field instrument')
GO
INSERT INTO Base_TransferMajor
VALUES('A7C08424-D6B4-40AD-8563-DCD793290ADE','Eletrical','电气','05',null)
GO
INSERT INTO Base_TransferMajor
VALUES('0A4DE4BE-DE07-41F2-ABB1-FE8B8710BC2A','Structure','结构','06',null)
GO
INSERT INTO Base_TransferMajor
VALUES('2EE1D310-53DF-43E1-B7A0-F4C1389E4A52','Civil','土建','07',null)
GO
INSERT INTO Base_TransferMajor
VALUES('2CDA9F7D-2212-4D6F-9E62-14241BA57DF3','Architecture','建筑','08',null)
GO
INSERT INTO Base_TransferMajor
VALUES('53CB3BF5-517F-4E67-A218-E9A7E1E31A58','FF','消防','09',null)
GO
INSERT INTO Base_TransferMajor
VALUES('B87322EC-75DA-4BEB-9CED-31B7E89B4FA9','Plumbing','给排水','10',null)
GO
INSERT INTO Base_TransferMajor
VALUES('D109A3D9-E8CC-46B4-830A-AB2686E6321F','Plot Plan','总图','11',null)
GO
INSERT INTO Base_TransferMajor
VALUES('DE4904D2-1CD8-4248-8599-AC16995FBDDB','Telecom','电信','12',null)
GO
INSERT INTO Base_TransferMajor
VALUES('82B6666D-1866-4A38-927A-0B2DB60C4D64','HVAC','暖通','13',null)
GO

View File

@ -0,0 +1,76 @@
Create VIEW [dbo].[View_TransferDetail] AS
/*ÒÆ½»¹ÜÀíÁбíÊÓͼ*/
select Projectid,SystemName,Subsystem,TestPackage,sDate,fDate,Status from (
SELECT Projectid, SYSTEM as SystemName, Subsystem ,TestPackage,
TestPackageSTART as sDate,TestPackageFINISH as fDate,FINALStatus as Status
FROM Transfer_Piping
UNION ALL
SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate,
TestPackageFINISH as fDate,
MechanicalFINALStatus as Status
FROM Transfer_StaticEquipment
UNION ALL
SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate,
TestPackageFINISH as fDate,
MechanicalFINALStatus as Status
FROM Transfer_RotatingEquipment
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Instrumentation
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Electrical
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Civil_Structure
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Firefighting
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Telecom
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_Plumbing
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status
FROM Transfer_HVAC
)f
GO

View File

@ -0,0 +1,2 @@
alter table Transfer_PunchlistFrom alter column DESCRIPTION nvarchar(500) null
GO

View File

@ -0,0 +1,86 @@
Alter VIEW [dbo].[View_TransferDetail] AS
/*ÒÆ½»¹ÜÀíÁбíÊÓͼ*/
select Projectid,SystemName,Subsystem,TestPackage,sDate,fDate,Status,aDate from (
SELECT Projectid, SYSTEM as SystemName, Subsystem ,TestPackage,
TestPackageSTART as sDate,TestPackageFINISH as fDate,FINALStatus as Status,
CompleteTime as aDate
FROM Transfer_Piping
UNION ALL
SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate,
TestPackageFINISH as fDate,
MechanicalFINALStatus as Status ,
CompleteTime as aDate
FROM Transfer_StaticEquipment
UNION ALL
SELECT Projectid,SYSTEM as SystemName, Subsystem ,TestPackage,TestPackageSTART as sDate,
TestPackageFINISH as fDate,
MechanicalFINALStatus as Status,
CompleteTime as aDate
FROM Transfer_RotatingEquipment
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Instrumentation
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Electrical
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Civil_Structure
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Firefighting
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Telecom
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_Plumbing
UNION ALL
SELECT Projectid,SystemName, Subsystem ,Test_Package as TestPackage, Test_Package_START as sDate,
Test_Package_FINISH as fDate,
FINAL_Status as Status,
CompleteTime as aDate
FROM Transfer_HVAC
)f
GO

View File

@ -0,0 +1,10 @@
alter table Transfer_Piping add CompleteTime datetime null;
alter table Transfer_StaticEquipment add CompleteTime datetime null;
alter table Transfer_RotatingEquipment add CompleteTime datetime null;
alter table Transfer_Instrumentation add CompleteTime datetime null;
alter table Transfer_Electrical add CompleteTime datetime null;
alter table Transfer_Civil_Structure add CompleteTime datetime null;
alter table Transfer_Firefighting add CompleteTime datetime null;
alter table Transfer_Telecom add CompleteTime datetime null;
alter table Transfer_Plumbing add CompleteTime datetime null;
alter table Transfer_HVAC add CompleteTime datetime null;

View File

@ -0,0 +1,13 @@
--
delete from Transfer_Piping;
delete from Transfer_StaticEquipment;
delete from Transfer_RotatingEquipment;
--
update Transfer_Instrumentation set CompleteTime=getdate();
update Transfer_Electrical set CompleteTime=getdate();
update Transfer_Civil_Structure set CompleteTime=getdate();
update Transfer_Firefighting set CompleteTime=getdate();
update Transfer_Telecom set CompleteTime=getdate();
update Transfer_Plumbing set CompleteTime=getdate();
update Transfer_HVAC set CompleteTime=getdate();

View File

@ -244,6 +244,15 @@ GO
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('124B7659-5F18-49F3-8D30-BF8680830827','F0DF2F2B-7C12-4A0F-B7D4-0B00BADE1D64','±£´æ',4)
GO
insert into Sys_Menu( MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType ,IsOffice,IsEnd,IsUsed )
values('D0850615-BF32-4CFA-84CA-EEA261676EA8','移交专业设置','BaseInfo/TransferMajor.aspx',180,'5196A6FD-4BF1-46B3-8D24-9A3CE5BB4760','Menu_SysSet',1,1,1)
GO
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('0465EA2B-2F37-4103-A717-4033894108E0','D0850615-BF32-4CFA-84CA-EEA261676EA8','增加',1)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('EF58BDF7-F303-4633-8B83-DB4B151F8EAF','D0850615-BF32-4CFA-84CA-EEA261676EA8','修改',2)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('FC1373E2-D942-4D0E-822F-CE2F16C5D42D','D0850615-BF32-4CFA-84CA-EEA261676EA8','删除',3)
insert into Sys_ButtonToMenu (ButtonToMenuId,MenuId,ButtonName,SortIndex) values('65427D56-5490-42D7-8F00-EB3A59FAA6B0','D0850615-BF32-4CFA-84CA-EEA261676EA8','保存',4)
GO
/****ÖÊÁ¿»ù´¡ÉèÖÃ******/
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('A93BA810-3511-4BB2-9C10-9663351DF79F','ÖÊÁ¿ÉèÖÃ','',20,'D363BD9D-4DEC-45D8-89C8-B0E49DEF61B4','Menu_SysSet',1,0,1)

View File

@ -0,0 +1,20 @@
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('3517DBE2-9728-4BA0-9EA5-AE2147DB883B','移交图表','',
130,'0','Menu_Transfer',0,0,1)
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('E6F5125D-DD94-4978-B7EB-D9C26694D86D','全厂移交统计表',
'Transfer/Chart/Instrumentation.aspx',10,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B','Menu_Transfer',0,1,1)
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('C2DD3E9E-DB18-466F-8FA0-19AD6E21EEF0','Punchlist from',
'Transfer/Chart/PunchlistFrom.aspx',20,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B','Menu_Transfer',0,1,1)
INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed)
VALUES('F97BCF55-E450-4007-AD84-AB64B3496204','全厂移交统计递增表',
'Transfer/Chart/TransferChart.aspx',15,'3517DBE2-9728-4BA0-9EA5-AE2147DB883B','Menu_Transfer',0,1,1)

View File

@ -165,6 +165,7 @@
<Compile Include="BaseInfo\SteelService.cs" />
<Compile Include="BaseInfo\TrainLevelService.cs" />
<Compile Include="BaseInfo\TrainTypeService.cs" />
<Compile Include="BaseInfo\TransferMajorService.cs" />
<Compile Include="BaseInfo\UnitTypeService.cs" />
<Compile Include="BaseInfo\WorkPostService.cs" />
<Compile Include="BaseInfo\WorkStageService.cs" />
@ -770,6 +771,8 @@
<Compile Include="BoSheng\BOSHENGMonitorService.cs" />
<Compile Include="Transfer\PipingService.cs" />
<Compile Include="Transfer\ProjectSetupService.cs" />
<Compile Include="Transfer\RotatingEquipmentService.cs" />
<Compile Include="Transfer\StaticEquipmentService.cs" />
<Compile Include="WebService\MCSWebService.cs" />
<Compile Include="WebService\CNCECHSSEWebService.cs" />
<Compile Include="WebService\CNCECHSSEMonitorService.cs" />

View File

@ -0,0 +1,86 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace BLL
{
/// <summary>
/// 移交专业
/// </summary>
public static class TransferMajorService
{
public static Model.SGGLDB db = Funs.DB;
/// <summary>
/// 根据主键获取移交专业
/// </summary>
/// <param name="TransferMajorId"></param>
/// <returns></returns>
public static Model.Base_TransferMajor GetTransferMajorById(string TransferMajorId)
{
return Funs.DB.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajorId);
}
/// <summary>
/// 添加移交专业
/// </summary>
/// <param name="TransferMajor"></param>
public static void AddTransferMajor(Model.Base_TransferMajor TransferMajor)
{
Model.SGGLDB db = Funs.DB;
Model.Base_TransferMajor newTransferMajor = new Model.Base_TransferMajor
{
TransferMajorId = TransferMajor.TransferMajorId,
Discipline = TransferMajor.Discipline,
Major = TransferMajor.Major,
DisciplineCode = TransferMajor.DisciplineCode,
Remark = TransferMajor.Remark
};
db.Base_TransferMajor.InsertOnSubmit(newTransferMajor);
db.SubmitChanges();
}
/// <summary>
/// 修改移交专业
/// </summary>
/// <param name="TransferMajor"></param>
public static void UpdateTransferMajor(Model.Base_TransferMajor TransferMajor)
{
Model.SGGLDB db = Funs.DB;
Model.Base_TransferMajor newTransferMajor = db.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajor.TransferMajorId);
if (newTransferMajor != null)
{
newTransferMajor.Discipline = TransferMajor.Discipline;
newTransferMajor.Major = TransferMajor.Major;
newTransferMajor.DisciplineCode = TransferMajor.DisciplineCode;
newTransferMajor.Remark = TransferMajor.Remark;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除移交专业
/// </summary>
/// <param name="TransferMajorId"></param>
public static void DeleteTransferMajorById(string TransferMajorId)
{
Model.SGGLDB db = Funs.DB;
Model.Base_TransferMajor TransferMajor = db.Base_TransferMajor.FirstOrDefault(e => e.TransferMajorId == TransferMajorId);
if (TransferMajor != null)
{
db.Base_TransferMajor.DeleteOnSubmit(TransferMajor);
db.SubmitChanges();
}
}
/// <summary>
/// 获取移交专业下拉列表项
/// </summary>
/// <returns></returns>
public static List<Model.Base_TransferMajor> GetTransferMajorList()
{
return (from x in Funs.DB.Base_TransferMajor orderby x.DisciplineCode select x).ToList();
}
}
}

View File

@ -109,5 +109,49 @@
return chart;
}
#endregion
/// <summary>
/// 给chart类赋值
/// </summary>
/// <param name="dt">数据源表值</param>
/// <param name="title">图标题</param>
/// <param name="type">图类型</param>
/// <param name="width">图显示宽度</param>
/// <param name="height">图显示高度</param>
/// <param name="isNotEnable3D">是否显示3D效果</param>
/// <returns>返回图</returns>
public static Model.DataSourceChart GetDataSourceChartByYijiao(DataTable dt, string title, string type, int width, int height, bool isNotEnable3D)
{
Model.DataSourceChart dataSourceChart = new Model.DataSourceChart
{
Width = width,
Height = height,
Title = title,
IsNotEnable3D = isNotEnable3D,
ChartType = GetChartType(type)
};
List<Model.DataSourceTeam> dataSourceTeams = new List<Model.DataSourceTeam>();
for (int i = 1; i < dt.Columns.Count; i++)
{
Model.DataSourceTeam dataSourceTeam = new Model.DataSourceTeam
{
DataPointName = dt.Columns[i].ToString()
};
List<Model.DataSourcePoint> dataSourcePoints = new List<Model.DataSourcePoint>();
for (int j = 0; j < dt.Rows.Count; j++)
{
Model.DataSourcePoint dataSourcePoint = new Model.DataSourcePoint
{
PointText = dt.Rows[j][0].ToString(),
PointValue = dt.Rows[j][i].ToString()
};
dataSourcePoints.Add(dataSourcePoint);
}
dataSourceTeam.DataSourcePoints = dataSourcePoints;
dataSourceTeams.Add(dataSourceTeam);
}
dataSourceChart.DataSourceTeams = dataSourceTeams;
return dataSourceChart;
}
}
}

View File

@ -1026,6 +1026,10 @@ namespace BLL
/// 风险等级
/// </summary>
public const string RiskLevelMenuId = "E4B526CC-805E-4131-8E18-2FFA6871507E";
/// <summary>
/// 移交专业
/// </summary>
public const string TransferMajorMenuId = "D0850615-BF32-4CFA-84CA-EEA261676EA8";
#endregion
#region

View File

@ -83,10 +83,9 @@ namespace BLL
Model.DriverRun_DriverRunPlan newDriverRunPlan = Funs.DB.DriverRun_DriverRunPlan.FirstOrDefault(e => e.DriverRunPlanId == driverRunPlanId);
if (newDriverRunPlan != null)
{
if (!string.IsNullOrEmpty(newDriverRunPlan.AttachUrl))
{
UploadAttachmentService.DeleteFile(Funs.RootPath, newDriverRunPlan.AttachUrl);
}
////删除附件表
BLL.CommonService.DeleteAttachFileById(newDriverRunPlan.DriverRunPlanId);
BLL.CommonService.DeleteAttachFileById(newDriverRunPlan.DriverRunPlanId + "K");
Funs.DB.DriverRun_DriverRunPlan.DeleteOnSubmit(newDriverRunPlan);
Funs.DB.SubmitChanges();
}

View File

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class RotatingEquipmentService
{
/// <summary>
/// 根据主键获取设备材料报验信息
/// </summary>
/// <param name="RotatingEquipmentId"></param>
/// <returns></returns>
public static Model.Transfer_RotatingEquipment GetRotatingEquipmentById(string Id)
{
return Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(e => e.Id == Id);
}
/// <summary>
/// 添加设备材料报验
/// </summary>
/// <param name="RotatingEquipment"></param>
public static void AddRotatingEquipment(Model.Transfer_RotatingEquipment RotatingEquipment)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_RotatingEquipment newRotatingEquipment = new Model.Transfer_RotatingEquipment();
newRotatingEquipment.Id = RotatingEquipment.Id;
newRotatingEquipment.ProjectId = RotatingEquipment.ProjectId;
newRotatingEquipment.RotatingEquipment = RotatingEquipment.RotatingEquipment;
newRotatingEquipment.SYSTEM = RotatingEquipment.SYSTEM;
newRotatingEquipment.Subsystem = RotatingEquipment.Subsystem;
newRotatingEquipment.TestPackage = RotatingEquipment.TestPackage;
newRotatingEquipment.TestPackageSTART = RotatingEquipment.TestPackageSTART;
newRotatingEquipment.TestPackageFINISH = RotatingEquipment.TestPackageFINISH;
newRotatingEquipment.MechanicalFINALStatus = RotatingEquipment.MechanicalFINALStatus;
db.Transfer_RotatingEquipment.InsertOnSubmit(newRotatingEquipment);
db.SubmitChanges();
}
/// <summary>
/// 修改设备材料报验
/// </summary>
/// <param name="RotatingEquipment"></param>
public static void UpdateRotatingEquipment(Model.Transfer_RotatingEquipment RotatingEquipment)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_RotatingEquipment newRotatingEquipment = db.Transfer_RotatingEquipment.FirstOrDefault(e => e.Id == RotatingEquipment.Id);
if (newRotatingEquipment != null)
{
newRotatingEquipment.ProjectId = RotatingEquipment.ProjectId;
newRotatingEquipment.RotatingEquipment = RotatingEquipment.RotatingEquipment;
newRotatingEquipment.SYSTEM = RotatingEquipment.SYSTEM;
newRotatingEquipment.Subsystem = RotatingEquipment.Subsystem;
newRotatingEquipment.TestPackage = RotatingEquipment.TestPackage;
newRotatingEquipment.TestPackageSTART = RotatingEquipment.TestPackageSTART;
newRotatingEquipment.TestPackageFINISH = RotatingEquipment.TestPackageFINISH;
newRotatingEquipment.MechanicalFINALStatus = RotatingEquipment.MechanicalFINALStatus;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除设备材料报验
/// </summary>
/// <param name="Id"></param>
public static void DeleteRotatingEquipment(string Id)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_RotatingEquipment RotatingEquipment = db.Transfer_RotatingEquipment.FirstOrDefault(e => e.Id == Id);
if (RotatingEquipment != null)
{
db.Transfer_RotatingEquipment.DeleteOnSubmit(RotatingEquipment);
db.SubmitChanges();
}
}
}
}

View File

@ -0,0 +1,79 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace BLL
{
public class StaticEquipmentService
{
/// <summary>
/// 根据主键获取设备材料报验信息
/// </summary>
/// <param name="StaticEquipmentId"></param>
/// <returns></returns>
public static Model.Transfer_StaticEquipment GetStaticEquipmentById(string Id)
{
return Funs.DB.Transfer_StaticEquipment.FirstOrDefault(e => e.Id == Id);
}
/// <summary>
/// 添加设备材料报验
/// </summary>
/// <param name="StaticEquipment"></param>
public static void AddStaticEquipment(Model.Transfer_StaticEquipment StaticEquipment)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_StaticEquipment newStaticEquipment = new Model.Transfer_StaticEquipment();
newStaticEquipment.Id = StaticEquipment.Id;
newStaticEquipment.ProjectId = StaticEquipment.ProjectId;
newStaticEquipment.StaticEquipment = StaticEquipment.StaticEquipment;
newStaticEquipment.SYSTEM = StaticEquipment.SYSTEM;
newStaticEquipment.Subsystem = StaticEquipment.Subsystem;
newStaticEquipment.TestPackage = StaticEquipment.TestPackage;
newStaticEquipment.TestPackageSTART = StaticEquipment.TestPackageSTART;
newStaticEquipment.TestPackageFINISH = StaticEquipment.TestPackageFINISH;
newStaticEquipment.MechanicalFINALStatus = StaticEquipment.MechanicalFINALStatus;
db.Transfer_StaticEquipment.InsertOnSubmit(newStaticEquipment);
db.SubmitChanges();
}
/// <summary>
/// 修改设备材料报验
/// </summary>
/// <param name="StaticEquipment"></param>
public static void UpdateStaticEquipment(Model.Transfer_StaticEquipment StaticEquipment)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_StaticEquipment newStaticEquipment = db.Transfer_StaticEquipment.FirstOrDefault(e => e.Id == StaticEquipment.Id);
if (newStaticEquipment != null)
{
newStaticEquipment.ProjectId = StaticEquipment.ProjectId;
newStaticEquipment.StaticEquipment = StaticEquipment.StaticEquipment;
newStaticEquipment.SYSTEM = StaticEquipment.SYSTEM;
newStaticEquipment.Subsystem = StaticEquipment.Subsystem;
newStaticEquipment.TestPackage = StaticEquipment.TestPackage;
newStaticEquipment.TestPackageSTART = StaticEquipment.TestPackageSTART;
newStaticEquipment.TestPackageFINISH = StaticEquipment.TestPackageFINISH;
newStaticEquipment.MechanicalFINALStatus = StaticEquipment.MechanicalFINALStatus;
db.SubmitChanges();
}
}
/// <summary>
/// 根据主键删除设备材料报验
/// </summary>
/// <param name="Id"></param>
public static void DeleteStaticEquipment(string Id)
{
Model.SGGLDB db = Funs.DB;
Model.Transfer_StaticEquipment StaticEquipment = db.Transfer_StaticEquipment.FirstOrDefault(e => e.Id == Id);
if (StaticEquipment != null)
{
db.Transfer_StaticEquipment.DeleteOnSubmit(StaticEquipment);
db.SubmitChanges();
}
}
}
}

View File

@ -0,0 +1,152 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferMajor.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.TransferMajor" %>
<!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" Title="移交专业" Layout="HBox" ShowHeader="false">
<Items>
<f:Grid ID="Grid1" Title="移交专业" ShowHeader="false" EnableCollapse="true" PageSize="10" EnableColumnLines="true"
ShowBorder="true" AllowPaging="true" IsDatabasePaging="true" runat="server" Width="750px" ForceFit="true"
DataKeyNames="TransferMajorId" DataIDField="TransferMajorId" OnPageIndexChange="Grid1_PageIndexChange"
AllowFilters="true" OnFilterChange="Grid1_FilterChange" EnableTextSelection="True">
<Columns>
<f:RowNumberField EnablePagingNumber="true" HeaderText="序号" Width="50px" HeaderTextAlign="Center" TextAlign="Center" />
<f:RenderField Width="150px" ColumnID="Discipline" DataField="Discipline" FieldType="String"
HeaderText="Discipline" HeaderTextAlign="Center" TextAlign="Center">
</f:RenderField>
<f:RenderField Width="90px" ColumnID="Major" DataField="Major" FieldType="String"
HeaderText="专业" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="150px" ColumnID="DisciplineCode" DataField="DisciplineCode" FieldType="String"
HeaderText="Discipline Code" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
<f:RenderField Width="200px" ColumnID="Remark" DataField="Remark" FieldType="String"
HeaderText="Remark" HeaderTextAlign="Center" TextAlign="Left">
</f:RenderField>
</Columns>
<Listeners>
<f:Listener Event="rowselect" Handler="onGridRowSelect" />
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarSeparator ID="ToolbarSeparator1" runat="server">
</f:ToolbarSeparator>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true"
OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
</f:DropDownList>
</PageItems>
</f:Grid>
<f:SimpleForm ID="SimpleForm1" runat="server" ShowBorder="true" ShowHeader="false"
LabelWidth="80px" BodyPadding="5px" Width="350px">
<Items>
<f:TextBox ID="hfFormID" runat="server" Hidden="true"></f:TextBox>
<f:TextBox ID="txtDiscipline" Label="Discipline" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
</f:TextBox>
<f:TextBox ID="txtMajor" Label="专业" ShowRedStar="true" Required="true" runat="server"
LabelAlign="right" AutoPostBack="true" OnTextChanged="TextBox_TextChanged">
</f:TextBox>
<f:TextBox ID="txtDisciplineCode" runat="server" Label="Discipline Code" LabelAlign="right">
</f:TextBox>
<f:TextArea ID="txtRemark" runat="server" Label="备注" LabelAlign="right">
</f:TextArea>
</Items>
<Toolbars>
<f:Toolbar ID="Toolbar1" Position="Bottom" runat="server">
<Items>
<f:Button ID="btnNew" Icon="Add" ToolTip="新增" EnablePostBack="false" runat="server">
<Listeners>
<f:Listener Event="click" Handler="onNewButtonClick" />
</Listeners>
</f:Button>
<f:Button ID="btnDelete" Enabled="false" ToolTip="删除" Icon="Delete" ConfirmText="确定删除当前数据?"
OnClick="btnDelete_Click" runat="server">
</f:Button>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnSave" Icon="SystemSave" runat="server" ValidateForms="SimpleForm1"
OnClick="btnSave_Click">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>
</f:SimpleForm>
</Items>
</f:Panel>
<f:Menu ID="Menu1" runat="server">
<f:MenuButton ID="btnMenuEdit" OnClick="btnMenuEdit_Click" EnablePostBack="true"
runat="server" Text="编辑" Icon="Pencil">
</f:MenuButton>
<f:MenuButton ID="btnMenuDelete" OnClick="btnMenuDelete_Click" EnablePostBack="true"
ConfirmText="删除选中行?" ConfirmTarget="Parent" runat="server" Text="删除" Icon="Delete">
</f:MenuButton>
</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;
}
function reloadGrid() {
__doPostBack(null, 'reloadGrid');
}
var gridClientID = '<%= Grid1.ClientID %>';
var btnDeleteClientID = '<%= btnDelete.ClientID %>';
var btnSaveClientID = '<%= btnSave.ClientID %>';
var formClientID = '<%= SimpleForm1.ClientID %>';
var hfFormIDClientID = '<%= hfFormID.ClientID %>';
var txtDisciplineClientID = '<%= txtDiscipline.ClientID %>';
var txtMajorClientID = '<%= txtMajor.ClientID %>';
var txtDisciplineCodeClientID = '<%= txtDisciplineCode.ClientID %>';
var txtRemarkClientID = '<%=txtRemark.ClientID %>';
function onGridRowSelect(event, rowId) {
var grid = F(gridClientID);
// 启用删除按钮
F(btnDeleteClientID).enable();
// 当前行数据
var rowValue = grid.getRowValue(rowId);
// 使用当前行数据填充表单字段
F(hfFormIDClientID).setValue(rowId);
F(txtDisciplineClientID).setValue(rowValue['Discipline']);
F(txtMajorClientID).setValue(rowValue['Major']);
F(txtDisciplineCodeClientID).setValue(rowValue['DisciplineCode']);
F(txtRemarkClientID).setValue(rowValue['Remark']);
// 更新保存按钮文本
// F(btnSaveClientID).setText('保存数据(编辑)');
}
function onNewButtonClick() {
// 重置表单字段
F(formClientID).reset();
F(hfFormIDClientID).reset();
// 清空表格选中行
F(gridClientID).clearSelections();
// 禁用删除按钮
F(btnDeleteClientID).disable();
// 更新保存按钮文本
// F(btnSaveClientID).setText('保存数据(新增)');
}
</script>
</body>
</html>

View File

@ -0,0 +1,280 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.BaseInfo
{
public partial class TransferMajor : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
////权限按钮方法
this.GetButtonPower();
Funs.DropDownPageSize(this.ddlPageSize);
ddlPageSize.SelectedValue = Grid1.PageSize.ToString();
// 绑定表格
BindGrid();
}
}
/// <summary>
/// 绑定数据
/// </summary>
private void BindGrid()
{
var q = from x in Funs.DB.Base_TransferMajor orderby x.DisciplineCode select x;
Grid1.RecordCount = q.Count();
// 2.获取当前分页数据
var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize);
Grid1.DataSource = table;
Grid1.DataBind();
}
/// <summary>
/// 分页
/// </summary>
/// <returns></returns>
private List<Model.Base_TransferMajor> GetPagedDataTable(int pageIndex, int pageSize)
{
List<Model.Base_TransferMajor> source = (from x in Funs.DB.Base_TransferMajor orderby x.DisciplineCode select x).ToList();
List<Model.Base_TransferMajor> paged = new List<Model.Base_TransferMajor>();
int rowbegin = pageIndex * pageSize;
int rowend = (pageIndex + 1) * pageSize;
if (rowend > source.Count())
{
rowend = source.Count();
}
for (int i = rowbegin; i < rowend; i++)
{
paged.Add(source[i]);
}
return paged;
}
/// <summary>
/// 过滤表头
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_FilterChange(object sender, EventArgs e)
{
BindGrid();
}
/// <summary>
/// 改变索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
Grid1.PageIndex = e.NewPageIndex;
BindGrid();
}
#endregion
#region
/// <summary>
/// 分页下拉选择
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
#endregion
#region
/// <summary>
/// 删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnDelete_Click(object sender, EventArgs e)
{
var getV = BLL.TransferMajorService.GetTransferMajorById(hfFormID.Text);
if (getV != null)
{
BLL.LogService.AddSys_Log(this.CurrUser, getV.DisciplineCode, getV.TransferMajorId, BLL.Const.TransferMajorMenuId, BLL.Const.BtnDelete);
BLL.TransferMajorService.DeleteTransferMajorById(hfFormID.Text);
// 重新绑定表格,并模拟点击[新增按钮]
BindGrid();
PageContext.RegisterStartupScript("onNewButtonClick();");
}
}
/// <summary>
/// 右键删除事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDelete_Click(object sender, EventArgs e)
{
this.DeleteData();
}
/// <summary>
/// 删除方法
/// </summary>
private void DeleteData()
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var getV = BLL.TransferMajorService.GetTransferMajorById(rowID);
if (getV != null)
{
BLL.LogService.AddSys_Log(this.CurrUser, getV.DisciplineCode, getV.TransferMajorId, BLL.Const.TransferMajorMenuId, BLL.Const.BtnDelete);
BLL.TransferMajorService.DeleteTransferMajorById(rowID);
}
}
BindGrid();
PageContext.RegisterStartupScript("onNewButtonClick();");
}
}
#endregion
#region
/// <summary>
/// 右键编辑事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuEdit_Click(object sender, EventArgs e)
{
this.EditData();
}
/// <summary>
/// 编辑数据方法
/// </summary>
private void EditData()
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning);
return;
}
string Id = Grid1.SelectedRowID;
var TransferMajor = BLL.TransferMajorService.GetTransferMajorById(Id);
if (TransferMajor != null)
{
this.txtDiscipline.Text = TransferMajor.Discipline;
this.txtMajor.Text = TransferMajor.Major;
this.txtDisciplineCode.Text = TransferMajor.DisciplineCode;
this.txtRemark.Text = TransferMajor.Remark;
hfFormID.Text = Id;
this.btnDelete.Enabled = true;
}
}
#endregion
#region
/// <summary>
/// 保存按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSave_Click(object sender, EventArgs e)
{
string strRowID = hfFormID.Text;
Model.Base_TransferMajor TransferMajor = new Model.Base_TransferMajor
{
Discipline = this.txtDiscipline.Text.Trim(),
Major = this.txtMajor.Text.Trim(),
DisciplineCode= this.txtDisciplineCode.Text.Trim(),
Remark = txtRemark.Text.Trim()
};
if (string.IsNullOrEmpty(strRowID))
{
TransferMajor.TransferMajorId = SQLHelper.GetNewID(typeof(Model.Base_TransferMajor));
BLL.TransferMajorService.AddTransferMajor(TransferMajor);
BLL.LogService.AddSys_Log(this.CurrUser, TransferMajor.Discipline, TransferMajor.TransferMajorId, BLL.Const.TransferMajorMenuId, BLL.Const.BtnAdd);
}
else
{
TransferMajor.TransferMajorId = strRowID;
BLL.TransferMajorService.UpdateTransferMajor(TransferMajor);
BLL.LogService.AddSys_Log(this.CurrUser, TransferMajor.Discipline, TransferMajor.TransferMajorId, BLL.Const.TransferMajorMenuId, BLL.Const.BtnModify);
}
this.SimpleForm1.Reset();
// 重新绑定表格,并点击当前编辑或者新增的行
BindGrid();
PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, TransferMajor.TransferMajorId));
}
#endregion
#region
/// <summary>
/// 验证费用类别名称、编号是否存在
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void TextBox_TextChanged(object sender, EventArgs e)
{
var q = Funs.DB.Base_TransferMajor.FirstOrDefault(x => x.Discipline == this.txtDiscipline.Text.Trim() && (x.TransferMajorId != hfFormID.Text || (hfFormID.Text == null && x.TransferMajorId != null)));
if (q != null)
{
ShowNotify("输入的Discipline已存在", MessageBoxIcon.Warning);
}
var q2 = Funs.DB.Base_TransferMajor.FirstOrDefault(x => x.Major == this.txtMajor.Text.Trim() && (x.TransferMajorId != hfFormID.Text || (hfFormID.Text == null && x.TransferMajorId != null)));
if (q2 != null)
{
ShowNotify("输入的专业已存在!", MessageBoxIcon.Warning);
}
}
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.TransferMajorMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnAdd))
{
this.btnNew.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
{
this.btnMenuEdit.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnDelete.Hidden = false;
this.btnMenuDelete.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnSave.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,204 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.BaseInfo {
public partial class TransferMajor {
/// <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>
/// ToolbarSeparator1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// SimpleForm1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.SimpleForm SimpleForm1;
/// <summary>
/// hfFormID 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox hfFormID;
/// <summary>
/// txtDiscipline 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDiscipline;
/// <summary>
/// txtMajor 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtMajor;
/// <summary>
/// txtDisciplineCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDisciplineCode;
/// <summary>
/// txtRemark 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextArea txtRemark;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// btnNew 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnNew;
/// <summary>
/// btnDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDelete;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarFill ToolbarFill1;
/// <summary>
/// btnSave 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSave;
/// <summary>
/// Menu1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuEdit 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuEdit;
/// <summary>
/// btnMenuDelete 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.MenuButton btnMenuDelete;
}
}

View File

@ -282,5 +282,154 @@ namespace Web.Controls
Controls.Add(chart1);
}
/// <summary>
/// 创建Chart图形百分比
/// </summary>
/// <param name="dataSourceChart">Chart类</param>
public void CreateChartBaifenbi(Model.DataSourceChart dataSourceChart)
{
Chart chart1 = new Chart
{
ID = "chart1",
BackColor = Color.WhiteSmoke,
ImageLocation = "~/Images/ChartPic_#SEQ(300,3)",
BorderlineDashStyle = ChartDashStyle.Solid,
Palette = ChartColorPalette.BrightPastel,
BackSecondaryColor = Color.White,
BackGradientStyle = GradientStyle.TopBottom,
BorderWidth = 2,
BorderColor = Color.FromArgb(26, 59, 105),
ImageType = ChartImageType.Png,
Width = dataSourceChart.Width,
Height = dataSourceChart.Height
};
Title title = new Title
{
Text = dataSourceChart.Title,
ShadowColor = Color.FromArgb(32, 0, 0, 0),
Font = new Font("Trebuchet MS", 10F, FontStyle.Bold),
ShadowOffset = 3,
ForeColor = Color.FromArgb(26, 59, 105)
};
chart1.Titles.Add(title);
Legend legend = new Legend
{
Name = dataSourceChart.Title,
TextWrapThreshold = 1,
Docking = Docking.Top,
Alignment = StringAlignment.Center,
BackColor = Color.Transparent,
Font = new Font(new FontFamily("Trebuchet MS"), 8),
LegendStyle = LegendStyle.Row,
IsEquallySpacedItems = true,
IsTextAutoFit = false
};
chart1.Legends.Add(legend);
ChartArea chartArea = new ChartArea
{
Name = dataSourceChart.Title,
BackColor = Color.Transparent
};
chartArea.AxisX.IsLabelAutoFit = false;
chartArea.AxisY.IsLabelAutoFit = false;
chartArea.AxisX.LabelStyle.Font = new Font("Verdana,Arial,Helvetica,sans-serif", 8F, FontStyle.Regular);
chartArea.AxisY.LabelStyle.Font = new Font("Verdana,Arial,Helvetica,sans-serif", 8F, FontStyle.Regular);
chartArea.AxisY.LineColor = Color.FromArgb(64, 64, 64, 64);
chartArea.AxisX.LineColor = Color.FromArgb(64, 64, 64, 64);
chartArea.AxisY.MajorGrid.LineColor = Color.FromArgb(64, 64, 64, 64);
chartArea.AxisX.MajorGrid.LineColor = Color.FromArgb(64, 64, 64, 64);
chartArea.AxisX.Interval = 1;
chartArea.Area3DStyle.Enable3D = dataSourceChart.IsNotEnable3D;
chartArea.AxisY.LabelStyle.Format = " 0% "; // 格式化,为了显示百分号
chart1.ChartAreas.Add(chartArea);
if (dataSourceChart.ChartType == SeriesChartType.Pie)
{
foreach (Model.DataSourceTeam dataSourceTeam in dataSourceChart.DataSourceTeams)
{
this.lblTotal.Text = "累计值为:";
if (dataSourceTeam.DataPointName == "累计")
{
foreach (Model.DataSourcePoint dataSourcePoint in dataSourceTeam.DataSourcePoints)
{
this.lblTotal.Text += (dataSourcePoint.PointText + "" + dataSourcePoint.PointValue + ",");
}
if (this.lblTotal.Text != "累计值为:")
{
this.lblTotal.Text = this.lblTotal.Text.Substring(0, this.lblTotal.Text.LastIndexOf(","));
}
}
else
{
this.lblTotal.Visible = false;
chart1.Series.Add(dataSourceTeam.DataPointName);
chart1.Series[dataSourceTeam.DataPointName].ChartType = dataSourceChart.ChartType;
chart1.Series[dataSourceTeam.DataPointName].Name = dataSourceTeam.DataPointName;
chart1.Series[dataSourceTeam.DataPointName].IsValueShownAsLabel = true;
chart1.Series[dataSourceTeam.DataPointName].BorderWidth = 2;
chart1.Series[dataSourceTeam.DataPointName].Label = "#PERCENT{P1}";
chart1.Series[dataSourceTeam.DataPointName]["DrawingStyle"] = "Cylinder";
int m = 0;
foreach (Model.DataSourcePoint dataSourcePoint in dataSourceTeam.DataSourcePoints)
{
chart1.Series[dataSourceTeam.DataPointName].Points.AddXY(dataSourcePoint.PointText, dataSourcePoint.PointValue);
chart1.Series[dataSourceTeam.DataPointName].Points[m].LegendText = dataSourcePoint.PointText + "#PERCENT{P1}";
m++;
}
}
}
}
else
{
foreach (Model.DataSourceTeam dataSourceTeam in dataSourceChart.DataSourceTeams)
{
this.lblTotal.Text = "累计值为:";
if (dataSourceTeam.DataPointName == "累计")
{
foreach (Model.DataSourcePoint dataSourcePoint in dataSourceTeam.DataSourcePoints)
{
this.lblTotal.Text += (dataSourcePoint.PointText + "" + dataSourcePoint.PointValue + ",");
}
if (this.lblTotal.Text != "累计值为:")
{
this.lblTotal.Text = this.lblTotal.Text.Substring(0, this.lblTotal.Text.LastIndexOf(","));
}
}
else
{
this.lblTotal.Visible = false;
chart1.Series.Add(dataSourceTeam.DataPointName);
chart1.Series[dataSourceTeam.DataPointName].ChartType = dataSourceChart.ChartType;
chart1.Series[dataSourceTeam.DataPointName].Name = dataSourceTeam.DataPointName;
chart1.Series[dataSourceTeam.DataPointName].IsValueShownAsLabel = true;
chart1.Series[dataSourceTeam.DataPointName].BorderWidth = 2;
chart1.Series[dataSourceTeam.DataPointName]["DrawingStyle"] = "Cylinder";
chart1.Series[dataSourceTeam.DataPointName].Label = "#VAL{P}";//设置标签文本 (在设计期通过属性窗口编辑更直观)
chart1.Series[dataSourceTeam.DataPointName].IsValueShownAsLabel = true;//显示标签
if (dataSourceTeam.DataPointName == "Actual Finished(%)")
{
chart1.Series[dataSourceTeam.DataPointName].Color = Color.Red;
}
else {
chart1.Series[dataSourceTeam.DataPointName].Color = Color.Blue;
}
foreach (Model.DataSourcePoint dataSourcePoint in dataSourceTeam.DataSourcePoints)
{
chart1.Series[dataSourceTeam.DataPointName].Points.AddXY(dataSourcePoint.PointText, dataSourcePoint.PointValue);
}
}
}
}
Controls.Add(chart1);
}
}
}

View File

@ -1,457 +1,77 @@
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误类型:SqlException
错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14204
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
出错时间:01/23/2024 12:21:40
出错时间:01/23/2024 12:21:40
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14228
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
出错时间:01/23/2024 12:21:41
出错时间:01/23/2024 12:21:41
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14220
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
出错时间:01/23/2024 12:21:41
出错时间:01/23/2024 12:21:41
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14020
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\五环\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
出错时间:01/23/2024 12:21:41
出错时间:01/23/2024 12:21:41
错误信息开始=====>
错误类型:HttpParseException
错误信息:基类包括字段“txtRemark”但其类型(FineUIPro.TextBox)与控件(FineUIPro.TextArea)的类型不兼容。
错误堆栈:
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildFieldDeclaration(ControlBuilder builder)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.BaseTemplateCodeDomTreeGenerator.BuildSourceDataTreeFromBuilder(ControlBuilder builder, Boolean fInTemplate, Boolean topLevelControlInTemplate, PropertyEntry pse)
在 System.Web.Compilation.TemplateControlCodeDomTreeGenerator.BuildMiscClassMembers()
在 System.Web.Compilation.PageCodeDomTreeGenerator.BuildMiscClassMembers()
在 System.Web.Compilation.BaseCodeDomTreeGenerator.BuildSourceDataTree()
在 System.Web.Compilation.BaseCodeDomTreeGenerator.GetCodeDomTree(CodeDomProvider codeDomProvider, StringResourceBuilder stringResourceBuilder, VirtualPath virtualPath)
在 System.Web.Compilation.BaseTemplateBuildProvider.GenerateCode(AssemblyBuilder assemblyBuilder)
在 System.Web.Compilation.AssemblyBuilder.AddBuildProvider(BuildProvider buildProvider)
出错时间:01/24/2024 19:37:42
出错文件:http://localhost:8579/TestRun/PersonTrain/TrainContractEdit.aspx?id=684accf8-74c8-4ba7-817f-914011ab0a03
IP地址:::1
出错时间:01/24/2024 19:37:42
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetSupervise_SubUnitReportListToSUB() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14204
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2181
出错时间:01/25/2024 12:39:51
出错时间:01/25/2024 12:39:51
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckInfo_Table8ItemListToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14228
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2046
出错时间:01/25/2024 12:39:51
出错时间:01/25/2024 12:39:51
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetCheck_CheckRectifyListToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14220
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1942
出错时间:01/25/2024 12:39:51
出错时间:01/25/2024 12:39:51
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEService.HSSEServiceClient.GetInformation_UrgeReportToSUB(String unitId) 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\Service References\CNCECHSSEService\Reference.cs:行号 14020
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\SGGL_CWCEC\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1884
出错时间:01/25/2024 12:39:51
出错时间:01/25/2024 12:39:51
错误信息开始=====>
错误类型:FileNotFoundException
错误信息:未能找到文件“E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\Menu_Transfer.xml”。
错误堆栈:
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
在 System.Web.UI.Control.OpenFileAndGetDependency(VirtualPath virtualPath, String physicalPath, CacheDependency& dependency)
在 System.Web.UI.WebControls.XmlDataSource.GetReader(String path, String content, CacheDependency& cacheDependency)
在 System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency)
在 System.Web.UI.WebControls.XmlDataSource.GetXmlDocument()
在 FineUIPro.Web.indexProject.InitTreeMenu() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 102
在 FineUIPro.Web.indexProject.MenuSwitchMethod(String type) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 728
在 FineUIPro.Web.indexProject.btnTransfer_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 786
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.ExecuteReader()
在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult)
在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries)
在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
在 System.Data.Linq.DataQuery`1.System.Linq.IQueryProvider.Execute[S](Expression expression)
在 System.Linq.Queryable.Count[TSource](IQueryable`1 source)
在 FineUIPro.Web.common.main_new.Page_Load(Object sender, EventArgs e) 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\main_new.aspx.cs:行号 67
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:01/26/2024 09:14:17
出错文件:http://localhost:8579/indexProject.aspx?projectId=05a4f675-0caa-4e9e-b171-fc2b7d7ba025
IP地址:::1
操作人员:JT
出错时间:01/26/2024 09:14:17
错误信息开始=====>
错误类型:FileNotFoundException
错误信息:未能找到文件“E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\common\Menu_Transfer.xml”。
错误堆栈:
在 System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
在 System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
在 System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
在 System.Web.UI.Control.OpenFileAndGetDependency(VirtualPath virtualPath, String physicalPath, CacheDependency& dependency)
在 System.Web.UI.WebControls.XmlDataSource.GetReader(String path, String content, CacheDependency& cacheDependency)
在 System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency)
在 System.Web.UI.WebControls.XmlDataSource.GetXmlDocument()
在 FineUIPro.Web.indexProject.InitTreeMenu() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 102
在 FineUIPro.Web.indexProject.MenuSwitchMethod(String type) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 728
在 FineUIPro.Web.indexProject.btnTransfer_Click(Object sender, EventArgs e) 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 786
在 FineUIPro.Button.OnClick(EventArgs e)
在 (Button , EventArgs )
在 FineUIPro.Button.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:01/26/2024 09:14:20
出错文件:http://localhost:8579/indexProject.aspx?projectId=05a4f675-0caa-4e9e-b171-fc2b7d7ba025
IP地址:::1
操作人员:JT
出错时间:01/26/2024 09:14:20
错误信息开始=====>
错误类型:HttpException
错误信息:文件“/common/mainMenu_Transfer.aspx”不存在。
错误堆栈:
在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:01/26/2024 09:42:36
出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx
IP地址:::1
出错时间:01/26/2024 09:42:36
错误信息开始=====>
错误类型:HttpException
错误信息:文件“/common/mainMenu_Transfer.aspx”不存在。
错误堆栈:
在 System.Web.UI.Util.CheckVirtualFileExists(VirtualPath virtualPath)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultInternal(VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVPathBuildResultWithNoAssert(HttpContext context, VirtualPath virtualPath, Boolean noBuild, Boolean allowCrossApp, Boolean allowBuildInPrecompile, Boolean throwIfNotFound, Boolean ensureIsUpToDate)
在 System.Web.Compilation.BuildManager.GetVirtualPathObjectFactory(VirtualPath virtualPath, HttpContext context, Boolean allowCrossApp, Boolean throwIfNotFound)
在 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp)
在 System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath)
在 System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path)
在 System.Web.HttpApplication.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
出错时间:01/26/2024 09:47:07
出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx
IP地址:::1
出错时间:01/26/2024 09:47:07
错误信息开始=====>
错误类型:HttpParseException
错误信息:未能加载类型“FineUIPro.Web.common.mainMenu_Transfer”。
错误堆栈:
在 System.Web.UI.TemplateParser.ProcessException(Exception ex)
在 System.Web.UI.TemplateParser.ParseStringInternal(String text, Encoding fileEncoding)
在 System.Web.UI.TemplateParser.ParseString(String text, VirtualPath virtualPath, Encoding fileEncoding)
----错误类型:HttpException
----错误类型:Win32Exception
----错误信息:
----未能加载类型“FineUIPro.Web.common.mainMenu_Transfer”
----等待的操作过时。
----错误堆栈:
在 System.Web.UI.TemplateParser.GetType(String typeName, Boolean ignoreCase, Boolean throwOnError)
在 System.Web.UI.TemplateParser.ProcessInheritsAttribute(String baseTypeName, String codeFileBaseTypeName, String src, Assembly assembly)
在 System.Web.UI.TemplateParser.PostProcessMainDirectiveAttributes(IDictionary parseData)
出错时间:01/26/2024 09:47:58
出错文件:http://localhost:8579/common/mainMenu_Transfer.aspx
出错时间:02/02/2024 11:24:03
出错文件:http://localhost:8579/common/main_new.aspx
IP地址:::1
操作人员:JT
出错时间:01/26/2024 09:47:58
出错时间:02/02/2024 11:24:12
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误类型:SqlException
错误信息:参数化查询 '(@ProjectId nvarchar(4000))select * from Transfer_Piping C
' 需要参数 '@ProjectId',但未提供该参数。
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getSupervise_SubUnitReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2180
出错时间:01/26/2024 12:55:46
出错时间:01/26/2024 12:55:46
在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData()
在 System.Data.SqlClient.SqlDataReader.get_MetaData()
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior)
在 System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable[] dataTables, Int32 startRecord, Int32 maxRecords, IDbCommand command, CommandBehavior behavior)
在 System.Data.Common.DbDataAdapter.Fill(DataTable dataTable)
在 BLL.SQLHelper.GetDataTableRunText(String strSql, SqlParameter[] parameters) 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\SQLHelper.cs:行号 311
在 FineUIPro.Web.Transfer.Piping.BindGrid() 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\Piping.aspx.cs:行号 58
在 FineUIPro.Web.Transfer.Piping.Page_Load(Object sender, EventArgs e) 位置 E:\2023公司项目\五环新\CNCEC_SUBQHSE_WUHUAN\SGGL\FineUIPro.Web\Transfer\Piping.aspx.cs:行号 24
在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e)
在 System.EventHandler.Invoke(Object sender, EventArgs e)
在 System.Web.UI.Control.OnLoad(EventArgs e)
在 System.Web.UI.Control.LoadRecursive()
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
出错时间:02/04/2024 10:42:45
出错文件:http://localhost:8579/Transfer/Piping.aspx
IP地址:::1
操作人员:JT
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getCheck_CheckInfo_Table8Item() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 2045
出错时间:01/26/2024 12:55:46
出错时间:01/26/2024 12:55:46
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getCheck_CheckRectify() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1941
出错时间:01/26/2024 12:55:46
出错时间:01/26/2024 12:55:46
错误信息开始=====>
错误类型:ArgumentException
错误信息:提供的 URI 方案“http”无效应为“https”。
参数名: via
错误堆栈:
在 System.ServiceModel.Channels.TransportChannelFactory`1.ValidateScheme(Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.ValidateCreateChannelParameters(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.HttpsChannelFactory`1.OnCreateChannelCore(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.HttpChannelFactory`1.OnCreateChannel(EndpointAddress remoteAddress, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.InternalCreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ChannelFactoryBase`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.ServiceChannelFactoryOverRequest.CreateInnerChannelBinder(EndpointAddress to, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateServiceChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.Channels.ServiceChannelFactory.CreateChannel(Type channelType, EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel(EndpointAddress address, Uri via)
在 System.ServiceModel.ChannelFactory`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannel()
在 System.ServiceModel.ClientBase`1.CreateChannelInternal()
在 System.ServiceModel.ClientBase`1.get_Channel()
在 BLL.CNCECHSSEWebService.getInformation_UrgeReport() 位置 E:\工作\五环施工平台\CNCEC_SUBQHSE_WUHUAN\SGGL\BLL\WebService\CNCECHSSEWebService.cs:行号 1883
出错时间:01/26/2024 12:55:46
出错时间:01/26/2024 12:55:46
出错时间:02/04/2024 10:42:45

View File

@ -244,6 +244,7 @@
<Content Include="BaseInfo\TrainLevel.aspx" />
<Content Include="BaseInfo\TrainType.aspx" />
<Content Include="BaseInfo\TrainTypeEdit.aspx" />
<Content Include="BaseInfo\TransferMajor.aspx" />
<Content Include="BaseInfo\UnitType.aspx" />
<Content Include="BaseInfo\WorkPost.aspx" />
<Content Include="BaseInfo\WorkStage.aspx" />
@ -368,6 +369,7 @@
<Content Include="common\Menu_ToDo.xml" />
<Content Include="common\Menu_ZHGL.xml" />
<Content Include="common\themes.aspx" />
<Content Include="Controls\DataImportControl.ascx" />
<Content Include="Controls\FlowOperateControl.ascx" />
<Content Include="Controls\QRCodePrint.aspx" />
<Content Include="Controls\SeeQRImage.aspx" />
@ -1829,6 +1831,9 @@
<Content Include="TestRun\TestRunManage\TailTermHandleList.aspx" />
<Content Include="TestRun\TestRunManage\TestRunRecordUpload.aspx" />
<Content Include="TestRun\TestRunManage\TestRunRecordUploadList.aspx" />
<Content Include="Transfer\Chart\Instrumentation.aspx" />
<Content Include="Transfer\Chart\PunchlistFrom.aspx" />
<Content Include="Transfer\Chart\TransferChart.aspx" />
<Content Include="Transfer\CivilStructure.aspx" />
<Content Include="Transfer\CivilStructureDataIn.aspx" />
<Content Include="Transfer\Electrical.aspx" />
@ -1840,12 +1845,17 @@
<Content Include="Transfer\Instrumentation.aspx" />
<Content Include="Transfer\InstrumentationDataIn.aspx" />
<Content Include="Transfer\Piping.aspx" />
<Content Include="Transfer\PipingDataIn.aspx" />
<Content Include="Transfer\Plumbing.aspx" />
<Content Include="Transfer\PlumbingDataIn.aspx" />
<Content Include="Transfer\ProjectSetup.aspx" />
<Content Include="Transfer\ProjectSetupDataIn.aspx" />
<Content Include="Transfer\PunchlistFrom.aspx" />
<Content Include="Transfer\PunchlistFromDataIn.aspx" />
<Content Include="Transfer\RotatingEquipment.aspx" />
<Content Include="Transfer\RotatingEquipmentDataIn.aspx" />
<Content Include="Transfer\StaticEquipment.aspx" />
<Content Include="Transfer\StaticEquipmentDataIn.aspx" />
<Content Include="Transfer\Telecom.aspx" />
<Content Include="Transfer\TelecomDataIn.aspx" />
<Content Include="Video\Video.aspx" />
@ -6468,6 +6478,13 @@
<Compile Include="BaseInfo\TrainTypeEdit.aspx.designer.cs">
<DependentUpon>TrainTypeEdit.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\TransferMajor.aspx.cs">
<DependentUpon>TransferMajor.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="BaseInfo\TransferMajor.aspx.designer.cs">
<DependentUpon>TransferMajor.aspx</DependentUpon>
</Compile>
<Compile Include="BaseInfo\UnitType.aspx.cs">
<DependentUpon>UnitType.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -6846,6 +6863,13 @@
<Compile Include="common\themes.aspx.designer.cs">
<DependentUpon>themes.aspx</DependentUpon>
</Compile>
<Compile Include="Controls\DataImportControl.ascx.cs">
<DependentUpon>DataImportControl.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Controls\DataImportControl.ascx.designer.cs">
<DependentUpon>DataImportControl.ascx</DependentUpon>
</Compile>
<Compile Include="Controls\FlowOperateControl.ascx.cs">
<DependentUpon>FlowOperateControl.ascx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -16341,6 +16365,27 @@
<Compile Include="TestRun\TestRunManage\TestRunRecordUploadList.aspx.designer.cs">
<DependentUpon>TestRunRecordUploadList.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Chart\Instrumentation.aspx.cs">
<DependentUpon>Instrumentation.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\Chart\Instrumentation.aspx.designer.cs">
<DependentUpon>Instrumentation.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Chart\PunchlistFrom.aspx.cs">
<DependentUpon>PunchlistFrom.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\Chart\PunchlistFrom.aspx.designer.cs">
<DependentUpon>PunchlistFrom.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Chart\TransferChart.aspx.cs">
<DependentUpon>TransferChart.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\Chart\TransferChart.aspx.designer.cs">
<DependentUpon>TransferChart.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\CivilStructure.aspx.cs">
<DependentUpon>CivilStructure.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -16418,6 +16463,13 @@
<Compile Include="Transfer\Piping.aspx.designer.cs">
<DependentUpon>Piping.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\PipingDataIn.aspx.cs">
<DependentUpon>PipingDataIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\PipingDataIn.aspx.designer.cs">
<DependentUpon>PipingDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Plumbing.aspx.cs">
<DependentUpon>Plumbing.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -16460,6 +16512,34 @@
<Compile Include="Transfer\PunchlistFromDataIn.aspx.designer.cs">
<DependentUpon>PunchlistFromDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\RotatingEquipment.aspx.cs">
<DependentUpon>RotatingEquipment.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\RotatingEquipment.aspx.designer.cs">
<DependentUpon>RotatingEquipment.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\RotatingEquipmentDataIn.aspx.cs">
<DependentUpon>RotatingEquipmentDataIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\RotatingEquipmentDataIn.aspx.designer.cs">
<DependentUpon>RotatingEquipmentDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\StaticEquipment.aspx.cs">
<DependentUpon>StaticEquipment.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\StaticEquipment.aspx.designer.cs">
<DependentUpon>StaticEquipment.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\StaticEquipmentDataIn.aspx.cs">
<DependentUpon>StaticEquipmentDataIn.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Transfer\StaticEquipmentDataIn.aspx.designer.cs">
<DependentUpon>StaticEquipmentDataIn.aspx</DependentUpon>
</Compile>
<Compile Include="Transfer\Telecom.aspx.cs">
<DependentUpon>Telecom.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>

View File

@ -28,6 +28,8 @@
<f:Button ID="btnOut" OnClick="btnOut_Click" runat="server" ToolTip="导出" Icon="FolderUp"
EnableAjax="false" DisableControlBeforePostBack="false">
</f:Button>
<f:Button ID="btnDel" Icon="Delete" ToolTip="删除" OnClick="btnDel_Click" runat="server" ConfirmText="确定删除当前数据?" Hidden="true">
</f:Button>
</Items>
</f:Toolbar>
</Toolbars>

View File

@ -97,6 +97,20 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
protected void btnDel_Click(object sender, EventArgs e)
{
var plan = (from x in Funs.DB.DriverPrepare_SchemePlan where x.ProjectId == this.CurrUser.LoginProjectId select x).FirstOrDefault();
if (plan == null)
{
Alert.ShowInTop("项目无记录,无需删除!", MessageBoxIcon.Warning);
return;
}
BLL.DriverPrepareSchemePlanItemService.DeleteSchemePlanItemByschemePlanId(plan.SchemePlanId);
BLL.DriverPrepareSchemePlanService.DeleteDriverPlan(plan.SchemePlanId);
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
#endregion
#region
@ -119,6 +133,7 @@ namespace FineUIPro.Web.TestRun.DriverPrepare
}
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnDel.Hidden = false;
this.btnMenuDel.Hidden = false;
}
}

View File

@ -93,6 +93,15 @@ namespace FineUIPro.Web.TestRun.DriverPrepare {
/// </remarks>
protected global::FineUIPro.Button btnOut;
/// <summary>
/// btnDel 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDel;
/// <summary>
/// Window1 控件。
/// </summary>

View File

@ -41,7 +41,7 @@ namespace FineUIPro.Web.TestRun.DriverRun
(CASE WHEN driverRun.IsAcceptInvite=1 THEN '是' ELSE '否' END) AS IsAcceptInvite,
driverRun.AttachUrl,
driverRun.Remark,
Unit.UnitName AS SubUnitName"
Unit.UnitName AS UnitName"
+ @" FROM DriverRun_DriverRunPlan AS driverRun"
+ @" LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = driverRun.UnitId WHERE driverRun.ProjectId=@projectId";
List<SqlParameter> listStr = new List<SqlParameter>();

View File

@ -4,12 +4,12 @@
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑开车保运计划</title>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" AutoSizePanelID="SimpleForm1" 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>
@ -47,7 +47,7 @@
</f:FormRow>
<f:FormRow>
<Items>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="意向保运装置或单元" LabelAlign="Right" LabelWidth="150px" EnableMultiSelect="true" EnableCheckBoxSelect="true" ></f:DropDownList>
<f:DropDownList ID="drpUnitWorkIds" runat="server" Label="意向保运装置或单元" LabelAlign="Right" LabelWidth="150px" EnableMultiSelect="true" EnableCheckBoxSelect="true"></f:DropDownList>
</Items>
</f:FormRow>
<f:FormRow>
@ -78,7 +78,11 @@
<f:Label ID="lblAttach" runat="server" Label="上传附件"
LabelWidth="150px">
</f:Label>
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="附件" runat="server" OnClick="btnAttach_Click">
<f:Button ID="btnAttach" Icon="TableCell" EnablePostBack="true" Text="保运合同" ToolTip="上传保运合同" runat="server" OnClick="btnAttach_Click">
</f:Button>
<f:Button ID="btnAttachK" Icon="TableCell" EnablePostBack="true" Text="保运考勤表" ToolTip="上传保运考勤表" runat="server" OnClick="btnAttachK_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载保运考勤表模板" OnClick="btnDownLoad_Click" Text="下载保运考勤表模板">
</f:Button>
</Items>
</f:Panel>
@ -97,4 +101,4 @@
</f:Window>
</form>
</body>
</html>
</html>

View File

@ -1,5 +1,6 @@
using BLL;
using System;
using System.IO;
namespace FineUIPro.Web.TestRun.DriverRun
{
@ -63,6 +64,57 @@ namespace FineUIPro.Web.TestRun.DriverRun
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverRun/DriverRunPlan&menuId={1}", this.hdId.Text, BLL.Const.DriverRunPlanMenuId)));
}
/// <summary>
/// 附件上传
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachK_Click(object sender, EventArgs e)
{
if (string.IsNullOrEmpty(this.hdId.Text)) //新增记录
{
this.hdId.Text = SQLHelper.GetNewID(typeof(Model.DriverRun_DriverRunPlan));
}
PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/TestRun/DriverRun/DriverRunPlan&menuId={1}", this.hdId.Text+"K", BLL.Const.DriverRunPlanMenuId)));
}
#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 + "File\\Excel\\TestRun\\保运考勤表模板.xls";
string filePath = "File\\Excel\\TestRun\\保运考勤表模板.xls";
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
#region

View File

@ -192,6 +192,24 @@ namespace FineUIPro.Web.TestRun.DriverRun {
/// </remarks>
protected global::FineUIPro.Button btnAttach;
/// <summary>
/// btnAttachK 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachK;
/// <summary>
/// btnDownLoad 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnDownLoad;
/// <summary>
/// WindowAtt 控件。
/// </summary>

View File

@ -0,0 +1,111 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Instrumentation.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.Instrumentation" %>
<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" AjaxAspnetControls="divAnalyse,divCheck" />
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" RegionPosition="Top"
BodyPadding="0 5 0 0" Width="200px" Layout="Fit" runat="server" EnableCollapse="true">
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server">
<Rows>
<f:FormRow ColumnWidths="20% 20% 20% 10% 10%">
<Items>
<f:DropDownList ID="drpdateType" runat="server" Label="日期类型" AutoPostBack="true"
OnSelectedIndexChanged="drpdateType_SelectedIndexChanged" Width="100px" LabelWidth="80px">
<f:ListItem Value="0" Text="按年月" Selected="true"></f:ListItem>
<f:ListItem Value="1" Text="按日期"></f:ListItem>
</f:DropDownList>
<f:DatePicker runat="server" Label="时间" ID="txtStarTime" EnableEdit="true" LabelWidth="50px" DateFormatString="yyyy-MM" DisplayType="Month"></f:DatePicker>
<f:DatePicker runat="server" ID="txtEndTime" EnableEdit="true" LabelWidth="80px" DateFormatString="yyyy-MM" DisplayType="Month"></f:DatePicker>
<f:DatePicker runat="server" Label="完成时间" ID="txtStarTime1" EnableEdit="true" LabelWidth="80px" Hidden="true"></f:DatePicker>
<f:DatePicker runat="server" ID="txtEndTime1" EnableEdit="true" LabelWidth="80px" Hidden="true"></f:DatePicker>
<%--<f:DropDownList ID="drpChartType" runat="server" Label="图形类型" AutoPostBack="true"
OnSelectedIndexChanged="drpChartType_SelectedIndexChanged" Width="300px" LabelWidth="80px">
<f:ListItem Value="Column" Text="柱形图" Selected="true"></f:ListItem>
<f:ListItem Value="Line" Text="折线图"></f:ListItem>
</f:DropDownList>--%>
<%--<f:DropDownList ID="drpChartType" runat="server" LabelWidth="80px" Label="图形类型"
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
</f:DropDownList>
<f:CheckBox ID="ckbShow" runat="server" LabelWidth="80px" Label="三维效果"
AutoPostBack="true" OnCheckedChanged="ckbShow_CheckedChanged">
</f:CheckBox>--%>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
<f:Button ID="btnAttachUrl" Text="附件" ToolTip="附件上传及查看" Icon="TableCell" runat="server"
OnClick="btnAttachUrl_Click" ValidateForms="SimpleForm1">
</f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Region>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox" AutoScroll="true"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="800px" ShowBorder="true"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
<Tabs>
<f:Tab ID="Tab2" Title="图表" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" AutoScroll="true"
runat="server" TitleToolTip="按图形显示">
<Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpCostTime" Margin="0 0 0 0" CssStyle="margin-left:200px">
<div id="divAnalyse">
<uc1:ChartControl ID="ChartUc" runat="server" />
</div>
</f:ContentPanel>
</Items>
<Items>
<%-- <f:Tree ID="Tree1" IsFluid="true" ShowHeader="true" EnableCollapse="false"
Title="System" runat="server" Width="400px" CssStyle="width:200px; height:600px"
OnNodeCommand="tvControlItem_NodeCommand"
AutoLeafIdentification="true">
</f:Tree>--%>
<%--<f:Tree ID="Tree1" IsFluid="true" EnableCollapse="false" ShowHeader="false"
OnNodeCommand="tvControlItem_NodeCommand" CssStyle="width:200px; height:600px"
runat="server">
</f:Tree>--%>
<f:Tree ID="trRectify" Width="200px" EnableCollapse="true" ShowHeader="true" AutoScroll="true"
CssStyle="width:200px;"
OnNodeCommand="trRectify_NodeCommand" AutoLeafIdentification="true" runat="server">
</f:Tree>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="true" runat="server" IsModal="true" Width="700px"
Height="500px">
</f:Window>
</form>
</body>
</html>

View File

@ -0,0 +1,508 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using BLL;
namespace FineUIPro.Web.Transfer.Chart
{
public partial class Instrumentation : PageBase
{
#region
/// <summary>
/// 项目主键
/// </summary>
public string ProjectId
{
get
{
return (string)ViewState["ProjectId"];
}
set
{
ViewState["ProjectId"] = value;
}
}
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.ProjectId = this.CurrUser.LoginProjectId;
if (!string.IsNullOrEmpty(Request.Params["projectId"]))
{
this.ProjectId = Request.Params["projectId"];
}
//this.AnalyseData();
}
}
#endregion
protected void drpdateType_SelectedIndexChanged(object sender, EventArgs e) {
if (drpdateType.SelectedValue == "0")
{
txtStarTime.Hidden = false;
txtEndTime.Hidden = false;
txtStarTime1.Hidden = true;
txtEndTime1.Hidden = true;
}
else {
txtStarTime1.Hidden = false;
txtEndTime1.Hidden = false;
txtStarTime.Hidden = true;
txtEndTime.Hidden = true;
}
}
#region
/// <summary>
/// 统计方法
/// </summary>
private void AnalyseData()
{
if (string.IsNullOrEmpty(ProjectId))
{
Alert.ShowInTop("项目未获取到,请刷新页面。", MessageBoxIcon.Warning);
return;
}
var sTime = DateTime.Now.AddDays(-7);
var eTime = DateTime.Now; ;
if (drpdateType.SelectedValue == "0")
{
if (string.IsNullOrEmpty(txtStarTime.Text) || string.IsNullOrEmpty(txtEndTime.Text))
{
Alert.ShowInTop("请选择日期。", MessageBoxIcon.Warning);
return;
}
else {
sTime = Convert.ToDateTime(txtStarTime.Text);
eTime = Convert.ToDateTime(txtEndTime.Text).AddMonths(1).AddDays(-1);
}
}
else {
if (string.IsNullOrEmpty(txtStarTime1.Text) || string.IsNullOrEmpty(txtEndTime1.Text))
{
Alert.ShowInTop("请选择日期。", MessageBoxIcon.Warning);
return;
}
else {
sTime = Convert.ToDateTime(txtStarTime1.Text);
eTime = Convert.ToDateTime(txtEndTime1.Text);
}
}
////如果没有填写日期,则是七天内的
//if (!string.IsNullOrEmpty(txtStarTime.Text) && !string.IsNullOrEmpty(txtEndTime.Text))
// {
//}
//查询当前日期中的system的具体数目去除重复
var list = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId
&& x.FDate >= sTime && x.FDate <= eTime).ToList();
var SystemList = (from x in list select x.SystemName).Distinct();
//先加载左侧system 树菜单
LoadData(SystemList);
DataTable dtTime = new DataTable();
dtTime.Columns.Add("日期", typeof(string));
dtTime.Columns.Add("Finished", typeof(string));
dtTime.Columns.Add("In Progress", typeof(string));
dtTime.Columns.Add("Not Start", typeof(string));
var systemBol = false;
for (var i = sTime; i <= eTime; i=returnDay(i))
{
var finishedCount = 0;
var inProgress = 0;
var notStart = 0;
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
//按年月
if (drpdateType.SelectedValue == "0")
{
rowTime["日期"] = string.Format("{0:yyyy-MM}", i);
}
else {
rowTime["日期"] = string.Format("{0:yyyy-MM-dd}", i);
}
//根据日期查询当前system的数量
var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//如果按年月
if (drpdateType.SelectedValue == "0")
{
systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddMonths(1)).ToList();
}
//查询TestPackage 去重
var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct();
if (testpackageList.ToList().Count>0)
{
systemBol = true;
}
foreach (var item in testpackageList)
{
//查询当前日期每个testpackage的数量
var systemSumCount = systemListbyDate.Where(x => x.TestPackage == item).ToList().Count;
//子系统中完成的数量
var subSystemSumCount = systemListbyDate.Where(x => x.TestPackage == item &&
x.Status.ToLower() == "finished").ToList().Count;
//子系统中没完成的情况
var subSystemSumNotStartCount = systemListbyDate.Where(x => x.TestPackage == item &&
(x.Status.ToLower() == "not start"|| x.Status=="" || x.Status==null )).ToList().Count;
//如果总数量等于完成的数量,完成量+1
if (systemSumCount == subSystemSumCount)
{
//如果都是完成,需要最后 12表 test packge 必须是Finished才能是完成
var punchlistFromList= Funs.DB.Transfer_PunchlistFrom.Where(x=>x.ProjectId==ProjectId
&& x.Test_Package==item
).ToList();
////如果按年月
//if (drpdateType.SelectedValue == "0") {
// punchlistFromList = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == ProjectId
// && x.Test_Package == item
// && x.PUNCH_ITEM_FINISH_DATE >= Convert.ToDateTime(rowTime["日期"])
// && x.PUNCH_ITEM_FINISH_DATE < Convert.ToDateTime(rowTime["日期"]).AddMonths(1)).ToList();
//}
//如果查到
if (punchlistFromList.Count > 0)
{
//12表当前日期完成的数量
var punchlistFromFinshCount = punchlistFromList.Where(x => x.PUNCH_ITEM_STATUS.ToLower() == "finished").ToList().Count();
//如果完成的数量等于总得数量,则是完成
if (punchlistFromFinshCount == punchlistFromList.Count)
{
finishedCount += 1;
}
else {
inProgress += 1;
}
}
else {
finishedCount += 1;
}
}
//如果总数量等于not start未开始量+1
else if (systemSumCount== subSystemSumNotStartCount)
{
notStart += 1;
}
else {
inProgress += 1;
}
}
rowTime["Finished"] = finishedCount;
rowTime["In Progress"] = inProgress;
rowTime["Not Start"] = notStart;
dtTime.Rows.Add(rowTime);
}
if (systemBol)
{
this.ChartUc.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "PROGRESS REPORT", "Column", 1100, 600, false));
}
}
public DateTime returnDay(DateTime x) {
//按年月
if (drpdateType.SelectedValue == "0")
{
x = x.AddMonths(1);
return x;
}
else
{
x = x.AddDays(1);
return x;
}
}
public class CheckAnalysisModel
{
public string itemType { get; set; }
public int count { get; set; }
}
#endregion
/// <summary>
/// 统计分析
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
this.AnalyseData();
}
protected void drpChartType_SelectedIndexChanged(object sender, EventArgs e)
{
this.AnalyseData();
}
private void LoadData(IEnumerable<String> list)
{
this.trRectify.Nodes.Clear();
this.trRectify.ShowBorder = false;
this.trRectify.ShowHeader = false;
this.trRectify.EnableIcons = true;
this.trRectify.AutoScroll = true;
this.trRectify.EnableSingleClickExpand = true;
TreeNode rootNode = new TreeNode
{
Text = "全部",
NodeID = "ALL",
EnableClickEvent = true,
Expanded = true
};
this.trRectify.Nodes.Add(rootNode);
BoundTree(rootNode.Nodes, list);
this.trRectify.AutoScroll = true;
}
/// <summary>
/// 加载树
/// </summary>
/// <param name="nodes"></param>
/// <param name="menuId"></param>
private void BoundTree(TreeNodeCollection nodes, IEnumerable<String> list)
{
TreeNode tn = null;
foreach (var item in list)
{
tn = new TreeNode
{
Text = item.ToString(),
NodeID = item.ToString(),
EnableClickEvent = true
};
nodes.Add(tn);
}
}
#region
protected void trRectify_NodeCommand(object sender, TreeCommandEventArgs e) {
var SystemName = this.trRectify.SelectedNodeID;
if (SystemName == "ALL")
{
AnalyseData();
}
else
{
var sTime = DateTime.Now.AddDays(-7);
var eTime = DateTime.Now; ;
if (drpdateType.SelectedValue == "0")
{
if (string.IsNullOrEmpty(txtStarTime.Text) || string.IsNullOrEmpty(txtEndTime.Text))
{
Alert.ShowInTop("请选择日期。", MessageBoxIcon.Warning);
return;
}
else
{
sTime = Convert.ToDateTime(txtStarTime.Text);
eTime = Convert.ToDateTime(txtEndTime.Text).AddMonths(1).AddDays(-1);
}
}
else
{
if (string.IsNullOrEmpty(txtStarTime1.Text) || string.IsNullOrEmpty(txtEndTime1.Text))
{
Alert.ShowInTop("请选择日期。", MessageBoxIcon.Warning);
return;
}
else
{
sTime = Convert.ToDateTime(txtStarTime1.Text);
eTime = Convert.ToDateTime(txtEndTime1.Text);
}
}
//var sTime = DateTime.Now.AddDays(-7);
//var eTime = DateTime.Now; ;
////如果没有填写日期,则是七天内的
//if (!string.IsNullOrEmpty(txtStarTime.Text) && !string.IsNullOrEmpty(txtEndTime.Text))
//{
// sTime = Convert.ToDateTime(txtStarTime.Text);
// eTime = Convert.ToDateTime(txtEndTime.Text);
//}
DataTable dtTime = new DataTable();
dtTime.Columns.Add("日期", typeof(string));
dtTime.Columns.Add("Finished", typeof(string));
dtTime.Columns.Add("In Progress", typeof(string));
dtTime.Columns.Add("Not Start", typeof(string));
var systemBol = false;
for (var i = sTime; i <= eTime; i = returnDay(i))
{
var finishedCount = 0;
var inProgress = 0;
var notStart = 0;
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
//按年月
if (drpdateType.SelectedValue == "0")
{
rowTime["日期"] = string.Format("{0:yyyy-MM}", i);
}
else
{
rowTime["日期"] = string.Format("{0:yyyy-MM-dd}", i);
}
//根据日期查询当前system的数量
var systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId && x.SystemName == SystemName
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddDays(1)).ToList();
//如果按年月
if (drpdateType.SelectedValue == "0")
{
systemListbyDate = Funs.DB.View_TransferDetail.Where(x => x.Projectid == ProjectId && x.SystemName == SystemName
&& x.FDate >= Convert.ToDateTime(rowTime["日期"])
&& x.FDate < Convert.ToDateTime(rowTime["日期"]).AddMonths(1)).ToList();
}
//查询TestPackage 去重
var testpackageList = (from x in systemListbyDate select x.TestPackage).Distinct();
if (testpackageList.ToList().Count > 0)
{
systemBol = true;
}
foreach (var item in testpackageList)
{
//查询当前日期每个testpackage的数量
var systemSumCount = systemListbyDate.Where(x => x.TestPackage == item).ToList().Count;
//子系统中完成的数量
var subSystemSumCount = systemListbyDate.Where(x => x.TestPackage == item &&
x.Status.ToLower() == "finished").ToList().Count;
//子系统中没完成的情况
var subSystemSumNotStartCount = systemListbyDate.Where(x => x.TestPackage == item &&
(x.Status.ToLower() == "not start" || x.Status == "" || x.Status == null)).ToList().Count;
//如果总数量等于完成的数量,完成量+1
if (systemSumCount == subSystemSumCount)
{
//如果都是完成,需要最后 12表 test packge 必须是Finished才能是完成
var punchlistFromList = Funs.DB.Transfer_PunchlistFrom.Where(x => x.ProjectId == ProjectId
&& x.SystemName==SystemName
&& x.Test_Package == item
).ToList();
//&& x.PUNCH_ITEM_FINISH_DATE >= Convert.ToDateTime(rowTime["日期"])
//&& x.PUNCH_ITEM_FINISH_DATE < Convert.ToDateTime(rowTime["日期"]).AddDays(1)
//如果查到
if (punchlistFromList.Count > 0)
{
//12表当前日期完成的数量
var punchlistFromFinshCount = punchlistFromList.Where(x => x.PUNCH_ITEM_STATUS.ToLower() == "finished").ToList().Count();
//如果完成的数量等于总得数量,则是完成
if (punchlistFromFinshCount == punchlistFromList.Count)
{
finishedCount += 1;
}
else
{
inProgress += 1;
}
}
else
{
finishedCount += 1;
}
}
//如果总数量等于not start未开始量+1
else if (systemSumCount == subSystemSumNotStartCount)
{
notStart += 1;
}
else
{
inProgress += 1;
}
}
rowTime["Finished"] = finishedCount;
rowTime["In Progress"] = inProgress;
rowTime["Not Start"] = notStart;
dtTime.Rows.Add(rowTime);
}
if (systemBol)
{
this.ChartUc.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "SYSTEM PROGRESS REPORT", "Column", 1100, 600, false));
}
}
}
#endregion
#region
/// <summary>
/// 上传附件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnAttachUrl_Click(object sender, EventArgs e)
{
//必须点击系统
var SystemName = this.trRectify.SelectedNodeID;
if (SystemName=="ALL"|| SystemName=="")
{
Alert.ShowInTop("请选择系统。", MessageBoxIcon.Warning);
return;
}
var toKeyId = "D142B96F-4D36-429D-AB08-FA0D7C30BB69" + SystemName;
PageContext.RegisterStartupScript(WindowAtt.GetShowReference
(String.Format("~/AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/Trancfer&menuId={1}",
toKeyId, "E6F5125D-DD94-4978-B7EB-D9C26694D86D")));
}
#endregion
}
}

View File

@ -0,0 +1,188 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer.Chart
{
public partial class Instrumentation
{
/// <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>
/// Region1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region1;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpdateType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpdateType;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// txtStarTime1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime1;
/// <summary>
/// txtEndTime1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime1;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// btnAttachUrl 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnAttachUrl;
/// <summary>
/// Region2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab2;
/// <summary>
/// cpCostTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel cpCostTime;
/// <summary>
/// ChartUc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::Web.Controls.ChartControl ChartUc;
/// <summary>
/// trRectify 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tree trRectify;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
}
}

View File

@ -0,0 +1,86 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PunchlistFrom.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.PunchlistFrom" %>
<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" AjaxAspnetControls="divAccidentUnit,divAccidentTime" />
<f:Panel ID="Panel3" CssClass="blockpanel" runat="server" EnableCollapse="false"
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server">
<Rows>
<f:FormRow ColumnWidths="20% 3% 20% 30% 15% 10%">
<Items>
<f:DatePicker ID="txtStartTime" runat="server" Label="时间" LabelAlign="Right"
LabelWidth="80px">
</f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至" Width="5px">
</f:Label>
<f:DatePicker ID="txtEndTime" runat="server">
</f:DatePicker>
<f:DropDownList ID="drpChartType" runat="server" Label="图形类型" AutoPostBack="true"
OnSelectedIndexChanged="drpChartType_SelectedIndexChanged" Width="300px" LabelWidth="80px">
<f:ListItem Value="Column" Text="柱形图"></f:ListItem>
<f:ListItem Value="Line" Text="折线图"></f:ListItem>
<f:ListItem Value="Pie" Text="饼形图"></f:ListItem>
<f:ListItem Value="StackedArea" Text="堆积面积图"></f:ListItem>
<f:ListItem Value="Spline" Text="样条图"></f:ListItem>
<f:ListItem Value="SplineArea" Text="样条面积图"></f:ListItem>
<f:ListItem Value="StepLine" Text="阶梯线图"></f:ListItem>
<f:ListItem Value="Stock" Text="股价图"></f:ListItem>
<f:ListItem Value="Radar" Text="雷达图"></f:ListItem>
</f:DropDownList>
<f:CheckBox ID="ckbShow" runat="server" LabelWidth="80px" Label="三维效果" AutoPostBack="true"
OnCheckedChanged="ckbShow_CheckedChanged" Width="110px">
</f:CheckBox>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click">
</f:Button>
</Items>
</f:FormRow>
<f:FormRow>
<Items>
<f:RadioButtonList ID="rblState" runat="server" Label="分析类型" LabelWidth="80px" Width="250px"
AutoPostBack="true" OnSelectedIndexChanged="drpChartType_SelectedIndexChanged">
<f:RadioItem Value="0" Selected="true" Text="按Identified during/by" />
<f:RadioItem Value="1" Text="按Discipline" />
</f:RadioButtonList>
<%--<f:DropDownList ID="drpType" OnSelectedIndexChanged="drpType_SelectedIndexChanged" AutoPostBack="true" runat="server" Label="Identified during/by" LabelAlign="Right" AutoSelectFirstItem="false" EnableEdit="true">
</f:DropDownList>--%>
<f:Label ID="aa" runat="server">
</f:Label>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Panel>
<f:Panel ID="Panel4" CssClass="blockpanel" runat="server" EnableCollapse="false"
BodyPadding="10px" ShowBorder="true" ShowHeader="false">
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="600px" ShowBorder="true"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
<Tabs>
<f:Tab ID="Tab2" Title="图形" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" runat="server"
TitleToolTip="图形">
<Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpAccidentTime" Margin="0 0 0 0">
<div id="divAccidentTime">
<uc1:ChartControl ID="ChartAccidentTime" runat="server" />
</div>
</f:ContentPanel>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
</f:Panel>
</form>
</body>
</html>

View File

@ -0,0 +1,177 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using BLL;
namespace FineUIPro.Web.Transfer.Chart
{
public partial class PunchlistFrom : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
}
}
#endregion
#region
/// <summary>
/// 统计分析
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void BtnAnalyse_Click(object sender, EventArgs e)
{
this.AnalyseData();
}
/// <summary>
/// 统计方法
/// </summary>
private void AnalyseData()
{
var forms = from x in Funs.DB.Transfer_PunchlistFrom
where x.ProjectId == this.CurrUser.LoginProjectId
select x;
if (!string.IsNullOrEmpty(this.txtStartTime.Text.Trim()))
{
forms = forms.Where(x => x.PUNCH_ITEM_FINISH_DATE >= Funs.GetNewDateTime(this.txtStartTime.Text.Trim()));
}
if (!string.IsNullOrEmpty(this.txtEndTime.Text.Trim()))
{
forms = forms.Where(x => x.PUNCH_ITEM_FINISH_DATE <= Funs.GetNewDateTime(this.txtEndTime.Text.Trim()));
}
var list = new List<string> { "Testing", "Pre-Commissioning", "PSSR", "Commissioning" };
if (this.rblState.SelectedValue == "0")
{
#region Identified during/by统计
if (this.drpChartType.SelectedValue != "Pie") //非饼形图
{
///按单位统计
DataTable dtTime = new DataTable();
dtTime.Columns.Add("Identified during/by", typeof(string));
dtTime.Columns.Add("总数量", typeof(string));
dtTime.Columns.Add("A数量", typeof(string));
dtTime.Columns.Add("B数量", typeof(string));
dtTime.Columns.Add("C数量", typeof(string));
dtTime.Columns.Add("Finished", typeof(string));
dtTime.Columns.Add("In Progress", typeof(string));
dtTime.Columns.Add("Not Start", typeof(string));
foreach (var item in list)
{
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["Identified during/by"] = item;
var types = forms.Where(x => x.Identified == item);
rowTime["总数量"] = types.Count();
rowTime["A数量"] = types.Where(x => x.Category == "A").Count();
rowTime["B数量"] = types.Where(x => x.Category == "B").Count();
rowTime["C数量"] = types.Where(x => x.Category == "C").Count();
rowTime["Finished"] = types.Where(x => x.PUNCH_ITEM_STATUS == "Finished").Count();
rowTime["In Progress"] = types.Where(x => x.PUNCH_ITEM_STATUS == "In Progress").Count();
rowTime["Not Start"] = types.Where(x => x.PUNCH_ITEM_STATUS == "Not Start").Count();
dtTime.Rows.Add(rowTime);
}
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项分析", this.drpChartType.SelectedValue, 1300, 550, this.ckbShow.Checked));
}
else //饼形图
{
DataTable dtTime = new DataTable();
dtTime.Columns.Add("Identified during/by", typeof(string));
dtTime.Columns.Add("总数量", typeof(string));
foreach (var item in list)
{
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["Identified during/by"] = item;
var types = forms.Where(x => x.Identified == item);
rowTime["总数量"] = types.Count();
dtTime.Rows.Add(rowTime);
}
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项分析", this.drpChartType.SelectedValue, 1300, 550, this.ckbShow.Checked));
}
#endregion
}
else
{
#region Discipline
var disciplines = from x in Funs.DB.Base_TransferMajor orderby x.DisciplineCode select x;
if (this.drpChartType.SelectedValue != "Pie") //非饼形图
{
///按检查项
DataTable dtTime = new DataTable();
dtTime.Columns.Add("Discipline", typeof(string));
dtTime.Columns.Add("总数量", typeof(string));
dtTime.Columns.Add("A数量", typeof(string));
dtTime.Columns.Add("B数量", typeof(string));
dtTime.Columns.Add("C数量", typeof(string));
dtTime.Columns.Add("Finished", typeof(string));
dtTime.Columns.Add("In Progress", typeof(string));
dtTime.Columns.Add("Not Start", typeof(string));
foreach (var item in disciplines)
{
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["Discipline"] = item.Discipline;
var types = forms.Where(x => x.Discipline == item.Discipline || x.Discipline==item.DisciplineCode);
rowTime["总数量"] = types.Count();
rowTime["A数量"] = types.Where(x => x.Category == "A").Count();
rowTime["B数量"] = types.Where(x => x.Category == "B").Count();
rowTime["C数量"] = types.Where(x => x.Category == "C").Count();
rowTime["Finished"] = types.Where(x => x.PUNCH_ITEM_STATUS == "Finished").Count();
rowTime["In Progress"] = types.Where(x => x.PUNCH_ITEM_STATUS == "In Progress").Count();
rowTime["Not Start"] = types.Where(x => x.PUNCH_ITEM_STATUS == "Not Start").Count();
dtTime.Rows.Add(rowTime);
}
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项分析", this.drpChartType.SelectedValue, 1300, 550, this.ckbShow.Checked));
}
else //饼形图
{
///按问题类型
DataTable dtTime = new DataTable();
dtTime.Columns.Add("Discipline", typeof(string));
dtTime.Columns.Add("总数量", typeof(string));
foreach (var item in disciplines)
{
DataRow rowTime = dtTime.NewRow();
Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem();
rowTime["Discipline"] = item.Discipline;
var types = forms.Where(x => x.Discipline == item.Discipline || x.Discipline == item.DisciplineCode);
rowTime["总数量"] = types.Count();
dtTime.Rows.Add(rowTime);
}
this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "尾项分析", this.drpChartType.SelectedValue, 1300, 550, this.ckbShow.Checked));
}
#endregion
}
}
#endregion
#region
/// <summary>
/// 图形变换
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void drpChartType_SelectedIndexChanged(object sender, EventArgs e)
{
this.AnalyseData();
}
protected void ckbShow_CheckedChanged(object sender, CheckedEventArgs e)
{
this.AnalyseData();
}
#endregion
}
}

View File

@ -0,0 +1,168 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer.Chart {
public partial class PunchlistFrom {
/// <summary>
/// form1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel3;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// txtStartTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStartTime;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// drpChartType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpChartType;
/// <summary>
/// ckbShow 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.CheckBox ckbShow;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// rblState 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.RadioButtonList rblState;
/// <summary>
/// aa 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label aa;
/// <summary>
/// Panel4 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel4;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab2;
/// <summary>
/// cpAccidentTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel cpAccidentTime;
/// <summary>
/// ChartAccidentTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::Web.Controls.ChartControl ChartAccidentTime;
}
}

View File

@ -0,0 +1,97 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TransferChart.aspx.cs" Inherits="FineUIPro.Web.Transfer.Chart.TransferChart" %>
<%@ Register Src="~/Controls/ChartControl.ascx" TagName="ChartControl" TagPrefix="uc1" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="RegionPanel1" AjaxAspnetControls="divAnalyse,divCheck" />
<f:RegionPanel ID="RegionPanel1" ShowBorder="false" runat="server" Margin="5px">
<Regions>
<f:Region ID="Region1" ShowBorder="false" ShowHeader="false" RegionPosition="Top"
BodyPadding="0 5 0 0" Width="200px" Layout="Fit" runat="server" EnableCollapse="true">
<Items>
<f:Form ID="Form2" ShowHeader="false" ShowBorder="false" runat="server">
<Rows>
<f:FormRow ColumnWidths="30% 20% 3% 20% 15%">
<Items>
<f:DropDownList ID="drpType" runat="server" Label="分类" AutoPostBack="true"
Width="100px" LabelWidth="80px">
<f:ListItem Value="" Text="全部" Selected="true"></f:ListItem>
<f:ListItem Value="Piping" Text="Piping"></f:ListItem>
<f:ListItem Value="Static Equipment" Text="Static Equipment"></f:ListItem>
<f:ListItem Value="Rotating Equipment" Text="Rotating Equipment"></f:ListItem>
<f:ListItem Value="Instrumentation" Text="Instrumentation"></f:ListItem>
<f:ListItem Value="Electrical" Text="Electrical"></f:ListItem>
<f:ListItem Value="Civil Structure" Text="Civil Structure"></f:ListItem>
<f:ListItem Value="Firefighting" Text="Firefighting"></f:ListItem>
<f:ListItem Value="Telecom" Text="Telecom"></f:ListItem>
<f:ListItem Value="Plumbing" Text="Plumbing"></f:ListItem>
<f:ListItem Value="HVAC" Text="HVAC"></f:ListItem>
</f:DropDownList>
<%--<f:DropDownList ID="drpdateType" runat="server" Label="日期类型" AutoPostBack="true"
OnSelectedIndexChanged="drpdateType_SelectedIndexChanged" Width="100px" LabelWidth="80px">
<f:ListItem Value="0" Text="按年月" Selected="true"></f:ListItem>
<f:ListItem Value="1" Text="按日期"></f:ListItem>
</f:DropDownList>--%>
<f:DatePicker runat="server" Label="时间" ID="txtStarTime" EnableEdit="true" LabelWidth="50px" DateFormatString="yyyy-MM" DisplayType="Month"></f:DatePicker>
<f:Label ID="Label3" runat="server" Text="至" Width="5px">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" EnableEdit="true" LabelWidth="80px" DateFormatString="yyyy-MM" DisplayType="Month"></f:DatePicker>
<%-- <f:DatePicker runat="server" Label="完成时间" ID="txtStarTime1" EnableEdit="true" LabelWidth="80px" Hidden="true"></f:DatePicker>
<f:DatePicker runat="server" ID="txtEndTime1" EnableEdit="true" LabelWidth="80px" Hidden="true"></f:DatePicker>--%>
<%-- <f:DropDownList ID="drpChartType" runat="server" Label="图形类型" AutoPostBack="true"
OnSelectedIndexChanged="drpChartType_SelectedIndexChanged" Width="300px" LabelWidth="80px">
<f:ListItem Value="Column" Text="柱形图" Selected="true"></f:ListItem>
<f:ListItem Value="Line" Text="折线图"></f:ListItem>
</f:DropDownList>--%>
<f:Button ID="BtnAnalyse" Text="统计" Icon="ChartPie" runat="server" OnClick="BtnAnalyse_Click"></f:Button>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</Items>
</f:Region>
<f:Region ID="Region2" ShowBorder="false" ShowHeader="false" Position="Center" Layout="VBox" AutoScroll="true"
BoxConfigAlign="Stretch" BoxConfigPosition="Left" runat="server">
<Items>
<f:TabStrip ID="TabStrip1" CssClass="f-tabstrip-theme-simple" Height="800px" ShowBorder="true"
TabPosition="Top" MarginBottom="5px" EnableTabCloseMenu="false" runat="server">
<Tabs>
<f:Tab ID="Tab2" Title="图表" BodyPadding="5px" Layout="Fit" IconFont="Bookmark" AutoScroll="true"
runat="server" TitleToolTip="图表">
<Items>
<f:ContentPanel ShowHeader="false" runat="server" ID="cpCostTime" Margin="0 0 0 0">
<div id="divAnalyse">
<uc1:ChartControl ID="ChartUc" runat="server" />
</div>
</f:ContentPanel>
</Items>
</f:Tab>
</Tabs>
</f:TabStrip>
</Items>
</f:Region>
</Regions>
</f:RegionPanel>
</form>
</body>
</html>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,152 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer.Chart
{
public partial class TransferChart
{
/// <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>
/// Region1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region1;
/// <summary>
/// Form2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Form Form2;
/// <summary>
/// drpType 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpType;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label3;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// BtnAnalyse 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button BtnAnalyse;
/// <summary>
/// Region2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Region Region2;
/// <summary>
/// TabStrip1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TabStrip TabStrip1;
/// <summary>
/// Tab2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Tab Tab2;
/// <summary>
/// cpCostTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ContentPanel cpCostTime;
/// <summary>
/// ChartUc 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::Web.Controls.ChartControl ChartUc;
}
}

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtCivil_Structure" Label="Structure/Civil/Architecture" LabelWidth="180px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -50,6 +50,12 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Test_Package_START <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by Civil_Structure ";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtCivil_Structure;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -329,41 +329,52 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Civil_Structure> list = new List<Model.Transfer_Civil_Structure>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Civil_Structure == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Civil_Structure.FirstOrDefault(x => x.Civil_Structure == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly==null)
{
Model.Transfer_Civil_Structure model = new Model.Transfer_Civil_Structure();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Civil_Structure = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
if (modelOnly == null)
{
Model.Transfer_Civil_Structure model = new Model.Transfer_Civil_Structure();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Civil_Structure = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Civil_Structure = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.Civil_Structure = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtELECTRICAL" Label="ELECTRICAL" LabelWidth="150px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -51,6 +51,12 @@ namespace FineUIPro.Web.Transfer
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by ELECTRICAL ";
SqlParameter[] parameter = listStr.ToArray();

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtELECTRICAL;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -180,7 +180,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,41 +328,53 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Electrical> list = new List<Model.Transfer_Electrical>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.ELECTRICAL == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Electrical.FirstOrDefault(x => x.ELECTRICAL == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Electrical model = new Model.Transfer_Electrical();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.ELECTRICAL = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
if (modelOnly == null)
{
Model.Transfer_Electrical model = new Model.Transfer_Electrical();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.ELECTRICAL = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.ELECTRICAL = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.ELECTRICAL = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtFirefighting" Label="Firefighting" LabelWidth="120px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -50,6 +50,11 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Test_Package_START <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by Firefighting ";

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtFirefighting;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -329,40 +329,51 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Firefighting> list = new List<Model.Transfer_Firefighting>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
Model.Transfer_Firefighting model = new Model.Transfer_Firefighting();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Firefighting = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Firefighting model = new Model.Transfer_Firefighting();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Firefighting = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -25,6 +25,8 @@
<f:TextBox runat="server" ID="txtHVAC" Label="HVAC" LabelWidth="80px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -50,6 +50,12 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Test_Package_START <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by HVAC ";
SqlParameter[] parameter = listStr.ToArray();

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtHVAC;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -180,7 +180,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -328,41 +328,53 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_HVAC> list = new List<Model.Transfer_HVAC>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_HVAC.FirstOrDefault(x => x.HVAC == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_HVAC.FirstOrDefault(x => x.HVAC == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_HVAC model = new Model.Transfer_HVAC();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.HVAC = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
if (modelOnly == null)
{
Model.Transfer_HVAC model = new Model.Transfer_HVAC();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.HVAC = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.HVAC = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.HVAC = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtINSTRUMENTATION" Label="INSTRUMENTATION" LabelWidth="150px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -51,6 +51,12 @@ namespace FineUIPro.Web.Transfer
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by INSTRUMENTATION ";
SqlParameter[] parameter = listStr.ToArray();

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtINSTRUMENTATION;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -106,7 +106,7 @@ namespace FineUIPro.Web.Transfer
oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;";
oleDBConnString += "Data Source=";
oleDBConnString += fileName;
oleDBConnString += ";Extended Properties=Excel 8.0;";
oleDBConnString += ";Extended Properties='Excel 8.0';";
OleDbConnection oleDBConn = null;
OleDbDataAdapter oleAdMaster = null;
DataTable m_tableName = new DataTable();
@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -329,40 +329,55 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Instrumentation> list = new List<Model.Transfer_Instrumentation>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.INSTRUMENTATION == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId==CurrUser.LoginProjectId);
if (modelOnly == null)
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Instrumentation.FirstOrDefault(x => x.INSTRUMENTATION == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Instrumentation model = new Model.Transfer_Instrumentation();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else {
//修改
modelOnly.INSTRUMENTATION = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
}
}
if (list.Count > 0)

View File

@ -16,12 +16,26 @@
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="PIPINGLINENUMBER"
SortDirection="DESC" OnSort="Grid1_Sort"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtPIPINGLINENUMBER" Label="PIPINGLINENUMBER" LabelWidth="180px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
</f:Button>
@ -38,43 +52,47 @@
<f:GroupField ID="g1" HeaderText="PIPING" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="PIPINGLINENUMBER" DataField="PIPINGLINENUMBER" FieldType="String" HeaderText="PIPING/LINE NUMBER" TextAlign="Center"
HeaderTextAlign="Center" Width="150px">
HeaderTextAlign="Center" Width="170px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g2" HeaderText="SYSTEM AND TEST PACKAGE SELECTION" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="SYSTEM" DataField="SYSTEM" FieldType="String" HeaderText="SYSTEM" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="Subsystem" DataField="Subsystem" FieldType="String" HeaderText="Subsystem" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="TestPackage" DataField="TestPackage" FieldType="String" HeaderText="Test Package" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g3" HeaderText="Test Package Schedule" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="TestPackageSTART" DataField="TestPackageSTART" FieldType="String" HeaderText="Test Package<br/>START" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
<f:RenderField ColumnID="TestPackageSTART" DataField="TestPackageSTART" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>START" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField ColumnID="TestPackageFINISH" DataField="TestPackageFINISH" FieldType="String" HeaderText="Test Package<br/>FINISH" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="DescriptionArea" DataField="DescriptionArea" FieldType="String" HeaderText="Description<br/>(Area)" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
<f:RenderField ColumnID="TestPackageFINISH" DataField="TestPackageFINISH" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>FINISH" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g4" HeaderText="PRE-TEST/CHECK" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="FINALStatus" DataField="FINALStatus" FieldType="String" HeaderText="FINAL Status" TextAlign="Center"
HeaderTextAlign="Center" Width="100px">
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField ColumnID="PreTestFINISHED" DataField="PreTestFINISHED" FieldType="String" HeaderText="Pre-Test FINISHED?" TextAlign="Center"
HeaderTextAlign="Center" Width="150px">
HeaderTextAlign="Center" Width="170px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g5" HeaderText="WITNESS TEST/CHECK<br/>BY OWNER" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="FinalTestFINISHED" DataField="FinalTestFINISHED" FieldType="String" HeaderText="Final Test FINISHED?" ExpandUnusedSpace="true" TextAlign="Center"
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>

View File

@ -30,10 +30,30 @@ namespace FineUIPro.Web.Transfer
/// </summary>
public void BindGrid()
{
string strSql = @"select * from Transfer_ProjectSetup C
string strSql = @"select * from Transfer_Piping C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.txtPIPINGLINENUMBER.Text.Trim()))
{
strSql += " AND PIPINGLINENUMBER like @PIPINGLINENUMBER";
listStr.Add(new SqlParameter("@PIPINGLINENUMBER", "%" + this.txtPIPINGLINENUMBER.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
{
strSql += " AND TestPackageSTART >= @InspectionDateA";
listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
{
strSql += " AND TestPackageSTART <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SYSTEM like @SYSTEM";
listStr.Add(new SqlParameter("@SYSTEM", "%" + this.txtSystem.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
@ -154,10 +174,10 @@ namespace FineUIPro.Web.Transfer
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var data = BLL.ProjectSetupService.GetProjectSetupById(rowID);
var data = BLL.PipingService.GetPipingById(rowID);
if (data != null)
{
BLL.ProjectSetupService.DeleteProjectSetup(rowID);
BLL.PipingService.DeletePiping(rowID);
}
}
BindGrid();
@ -174,7 +194,7 @@ namespace FineUIPro.Web.Transfer
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("ProjectSetupDataIn.aspx", "导入 - ")));
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("PipingDataIn.aspx", "导入 - ")));
}
#endregion
@ -190,7 +210,7 @@ namespace FineUIPro.Web.Transfer
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ProjectSetupMenuId);
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.PipingMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))

View File

@ -7,11 +7,13 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer {
public partial class Piping {
namespace FineUIPro.Web.Transfer
{
public partial class Piping
{
/// <summary>
/// form1 控件。
/// </summary>
@ -20,7 +22,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -29,7 +31,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -38,7 +40,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -47,7 +49,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolSearch 控件。
/// </summary>
@ -56,7 +58,61 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtPIPINGLINENUMBER 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPIPINGLINENUMBER;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
@ -65,7 +121,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
@ -74,7 +130,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// g1 控件。
/// </summary>
@ -83,7 +139,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g1;
/// <summary>
/// g2 控件。
/// </summary>
@ -92,7 +148,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g2;
/// <summary>
/// g3 控件。
/// </summary>
@ -101,7 +157,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g3;
/// <summary>
/// g4 控件。
/// </summary>
@ -110,7 +166,16 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g4;
/// <summary>
/// g5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g5;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -119,7 +184,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -128,7 +193,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
@ -137,7 +202,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
@ -146,7 +211,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// WindowAtt 控件。
/// </summary>
@ -155,7 +220,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -164,7 +229,7 @@ namespace FineUIPro.Web.Transfer {
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDel 控件。
/// </summary>

View File

@ -0,0 +1,68 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipingDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.PipingDataIn" %>
<!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>
</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:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
</f:Button>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</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="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField DataField="Row" HeaderText="错误行号">
</f:BoundField>
<f:BoundField DataField="Column" HeaderText="错误列">
</f:BoundField>
<f:BoundField DataField="Reason" HeaderText="错误类型">
</f:BoundField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,430 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Transfer
{
public partial class PipingDataIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.hdCheckResult.Text = string.Empty;
this.hdFileName.Text = string.Empty;
if (errorInfos != null)
{
errorInfos.Clear();
}
}
}
#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 (errorInfos != null)
{
errorInfos.Clear();
}
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);
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], 9);
hdCheckResult.Text = "1";
}
catch (Exception exc)
{
Response.Write(exc);
//return null;
// return dt;
}
finally
{
}
}
#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)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
return false;
}
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
for (int i = 1; i < ir; i++)
{
string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
}
errorInfos.Clear();
if (!string.IsNullOrEmpty(result))
{
string results = result;
List<string> errorInfoList = results.Split('|').ToList();
foreach (var item in errorInfoList)
{
string[] errors = item.Split(',');
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
errorInfo.Row = errors[0];
errorInfo.Column = errors[1];
errorInfo.Reason = errors[2];
errorInfos.Add(errorInfo);
}
if (errorInfos.Count > 0)
{
this.gvErrorInfo.DataSource = errorInfos;
this.gvErrorInfo.DataBind();
}
}
else
{
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(hdCheckResult.Text))
{
if (errorInfos.Count <= 0)
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请先审核要导入的文件!", 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], 9);
}
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;
ic = pds.Columns.Count;
if (ic < Cols)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
string result = string.Empty;
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
List<Model.Transfer_Piping> list = new List<Model.Transfer_Piping>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Piping.FirstOrDefault(x => x.PIPINGLINENUMBER == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Piping model = new Model.Transfer_Piping();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.PIPINGLINENUMBER = pds.Rows[i][0].ToString().Trim();
model.SYSTEM = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.TestPackageFINISH = t2;
model.FINALStatus = pds.Rows[i][6].ToString().Trim();
if (model.FINALStatus.ToLower()== "finished")
{
model.CompleteTime = DateTime.Now;
}
model.PreTestFINISHED = pds.Rows[i][7].ToString().Trim();
model.FinalTestFINISHED = pds.Rows[i][8].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.PIPINGLINENUMBER = pds.Rows[i][0].ToString().Trim();
modelOnly.SYSTEM = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.TestPackageFINISH = t2;
modelOnly.FINALStatus = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINALStatus.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
modelOnly.PreTestFINISHED = pds.Rows[i][7].ToString().Trim();
modelOnly.FinalTestFINISHED = pds.Rows[i][8].ToString().Trim();
Funs.DB.SubmitChanges();
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_Piping.InsertAllOnSubmit(list);
Funs.DB.SubmitChanges();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#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 + "File\\Excel\\DataIn\\Piping导入模板.xls";
string filePath = "File\\Excel\\DataIn\\Piping导入模板.xls";
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
}
}

View File

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

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtPlumbing" Label="Plumbing" LabelWidth="120px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -51,6 +51,11 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Test_Package_START <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by Plumbing ";
SqlParameter[] parameter = listStr.ToArray();

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtPlumbing;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -329,41 +329,52 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Plumbing> list = new List<Model.Transfer_Plumbing>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Plumbing model = new Model.Transfer_Plumbing();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Plumbing = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
if (modelOnly == null)
{
Model.Transfer_Plumbing model = new Model.Transfer_Plumbing();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Plumbing = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -15,8 +15,8 @@
<Items>
<f:Grid ID="Grid1" ShowBorder="true" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="CommissioningSystem"
SortDirection="DESC" OnSort="Grid1_Sort"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="SortIndex"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">
<Toolbars>

View File

@ -30,7 +30,7 @@ namespace FineUIPro.Web.Transfer
/// </summary>
public void BindGrid()
{
string strSql = @"select * from Transfer_ProjectSetup C
string strSql = @"select *,isnull(CAST(SN as int),0) as SortIndex from Transfer_ProjectSetup C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));

View File

@ -22,10 +22,11 @@
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtPunch_No" Label="Punch_No" LabelWidth="80px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="PUNCH_ITEM_FINISH_DATE" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
<f:TextBox runat="server" ID="txtPunch_No" Label="Punch_No" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSYSTEM" Label="SYSTEM" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtSUBSYSTEM" Label="SUBSYSTEM" LabelWidth="100px" LabelAlign="Right" Width="170px"></f:TextBox>
<f:DatePicker runat="server" Label="PUNCH_ITEM_FINISH_DATE" ID="txtStarTime" LabelAlign="Right" LabelWidth="200px"
Width="320px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
@ -43,6 +44,14 @@
</f:Button>
</Items>
</f:Toolbar>
<f:Toolbar ID="Toolbar1" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtTestPackage" Label="Test Package" LabelWidth="105px" LabelAlign="Right" Width="300px"></f:TextBox>
<f:TextBox runat="server" ID="txtDiscipline" Label="Discipline" LabelWidth="80px" LabelAlign="Right" Width="150px"></f:TextBox>
<f:TextBox runat="server" ID="txtIdentified" Label="Identified during/by" LabelWidth="150px" LabelAlign="Right" Width="300px"></f:TextBox>
<f:TextBox runat="server" ID="txtCategory" Label="Select Punch List Category" LabelWidth="220px" LabelAlign="Right" Width="300px"></f:TextBox>
</Items>
</f:Toolbar>
</Toolbars>
<Columns>
@ -50,33 +59,33 @@
<Columns>
<f:BoundField Width="80px" TextAlign="Center" ColumnID="Item_No" DataField="Item_No" HeaderText="Item No." />
<f:BoundField Width="100px" TextAlign="Center" ColumnID="Punch_No" DataField="Punch_No" HeaderText="Punch No" />
<f:BoundField Width="90px" TextAlign="Center" ColumnID="Punch_No" DataField="Punch_No" HeaderText="Punch No" />
<f:BoundField Width="120px" TextAlign="Center" ColumnID="SystemName" DataField="SystemName" HeaderText="SYSTEM" />
<f:BoundField Width="80px" TextAlign="Center" ColumnID="SystemName" DataField="SystemName" HeaderText="SYSTEM" />
<f:BoundField Width="150px" ColumnID="Subsystem" DataField="Subsystem" HeaderText="SUBSYSTEM" TextAlign="Center"/>
<f:BoundField Width="108px" ColumnID="Subsystem" DataField="Subsystem" HeaderText="SUBSYSTEM" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Test_Package" DataField="Test_Package" HeaderText="Test Package" TextAlign="Center"/>
<f:BoundField Width="140px" ColumnID="Test_Package" DataField="Test_Package" HeaderText="Test Package" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Discipline" DataField="Discipline" HeaderText="Discipline" TextAlign="Center"/>
<f:BoundField Width="85px" ColumnID="Discipline" DataField="Discipline" HeaderText="Discipline" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="DESCRIPTION" DataField="DESCRIPTION" HeaderText="PUNCH LIST ITEM DESCRIPTION" TextAlign="Center"/>
<f:BoundField Width="180px" ColumnID="Identified" DataField="Identified" HeaderText="Identified during/by" TextAlign="Center"/>
<f:BoundField Width="145px" ColumnID="Identified" DataField="Identified" HeaderText="Identified during/by" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="Category" DataField="Category" HeaderText="Select Punch List Category" TextAlign="Center"/>
<f:BoundField Width="110px" ColumnID="Category" DataField="Category" HeaderText="Select Punch<br/>List Category" TextAlign="Center"/>
<f:RenderField Width="200px" ColumnID="PUNCH_ITEM_FINISH_DATE" DataField="PUNCH_ITEM_FINISH_DATE"
HeaderText="PUNCH ITEM FINISH DATE" TextAlign="Center"
<f:RenderField Width="110px" ColumnID="PUNCH_ITEM_FINISH_DATE" DataField="PUNCH_ITEM_FINISH_DATE"
HeaderText="PUNCH ITEM<br/>FINISH DATE" TextAlign="Center"
FieldType="Date" Renderer="Date" RendererArgument="yyyy-MM-dd"/>
<f:BoundField Width="150px" ColumnID="Action_By" DataField="Action_By" HeaderText="Action By" TextAlign="Center"/>
<f:BoundField Width="100px" ColumnID="Action_By" DataField="Action_By" HeaderText="Action By" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Required_By" DataField="Required_By" HeaderText="Required By" TextAlign="Center"/>
<f:BoundField Width="100px" ColumnID="Required_By" DataField="Required_By" HeaderText="Required By" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="PUNCH_ITEM_STATUS" DataField="PUNCH_ITEM_STATUS" HeaderText="PUNCH ITEM STATUS" TextAlign="Center"/>
<f:BoundField Width="110px" ColumnID="PUNCH_ITEM_STATUS" DataField="PUNCH_ITEM_STATUS" HeaderText="PUNCH ITEM<br/>STATUS" TextAlign="Center"/>
<f:BoundField Width="250px" ColumnID="Comments" DataField="Comments" HeaderText="Comments" TextAlign="Center"/>
<f:BoundField Width="150px" ColumnID="Comments" DataField="Comments" HeaderText="Comments" TextAlign="Center"/>
</Columns>
</f:GroupField>

View File

@ -40,6 +40,16 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Punch_No like @Punch_No";
listStr.Add(new SqlParameter("@Punch_No", "%" + this.txtPunch_No.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtSYSTEM.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSYSTEM.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtSUBSYSTEM.Text.Trim()))
{
strSql += " AND Subsystem like @Subsystem";
listStr.Add(new SqlParameter("@Subsystem", "%" + this.txtSUBSYSTEM.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
{
strSql += " AND PUNCH_ITEM_FINISH_DATE >= @InspectionDateA";
@ -50,6 +60,26 @@ namespace FineUIPro.Web.Transfer
strSql += " AND PUNCH_ITEM_FINISH_DATE <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtTestPackage.Text.Trim()))
{
strSql += " AND Test_Package like @Test_Package";
listStr.Add(new SqlParameter("@Test_Package", "%" + this.txtTestPackage.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtDiscipline.Text.Trim()))
{
strSql += " AND Discipline like @Discipline";
listStr.Add(new SqlParameter("@Discipline", "%" + this.txtDiscipline.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtIdentified.Text.Trim()))
{
strSql += " AND Identified like @Identified";
listStr.Add(new SqlParameter("@Identified", "%" + this.txtIdentified.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(this.txtCategory.Text.Trim()))
{
strSql += " AND Category like @Category";
listStr.Add(new SqlParameter("@Category", "%" + this.txtCategory.Text.Trim() + "%"));
}
strSql += " order by Punch_No ";
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);

View File

@ -7,13 +7,11 @@
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer
{
public partial class PunchlistFrom
{
namespace FineUIPro.Web.Transfer {
public partial class PunchlistFrom {
/// <summary>
/// form1 控件。
/// </summary>
@ -22,7 +20,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// PageManager1 控件。
/// </summary>
@ -31,7 +29,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.PageManager PageManager1;
/// <summary>
/// Panel1 控件。
/// </summary>
@ -40,7 +38,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Panel Panel1;
/// <summary>
/// Grid1 控件。
/// </summary>
@ -49,7 +47,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Grid Grid1;
/// <summary>
/// ToolSearch 控件。
/// </summary>
@ -58,7 +56,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtPunch_No 控件。
/// </summary>
@ -67,7 +65,25 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtPunch_No;
/// <summary>
/// txtSYSTEM 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSYSTEM;
/// <summary>
/// txtSUBSYSTEM 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSUBSYSTEM;
/// <summary>
/// txtStarTime 控件。
/// </summary>
@ -76,7 +92,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
@ -85,7 +101,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
@ -94,7 +110,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnSearch 控件。
/// </summary>
@ -103,7 +119,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
@ -112,7 +128,52 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// Toolbar1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar Toolbar1;
/// <summary>
/// txtTest Package 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtTestPackage;
/// <summary>
/// txtDiscipline 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtDiscipline;
/// <summary>
/// txtIdentified 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtIdentified;
/// <summary>
/// txtCategory 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtCategory;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
@ -121,7 +182,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
@ -130,7 +191,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window2 控件。
/// </summary>
@ -139,7 +200,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// Menu1 控件。
/// </summary>
@ -148,7 +209,7 @@ namespace FineUIPro.Web.Transfer
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Menu Menu1;
/// <summary>
/// btnMenuDel 控件。
/// </summary>

View File

@ -317,57 +317,60 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_PunchlistFrom> list = new List<Model.Transfer_PunchlistFrom>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_PunchlistFrom.FirstOrDefault(x => x.Punch_No == pds.Rows[i][1].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_PunchlistFrom model = new Model.Transfer_PunchlistFrom();
if (modelOnly == null)
{
Model.Transfer_PunchlistFrom model = new Model.Transfer_PunchlistFrom();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Item_No = pds.Rows[i][0].ToString().Trim();
model.Punch_No = pds.Rows[i][1].ToString().Trim();
model.SystemName = pds.Rows[i][2].ToString().Trim();
model.Subsystem = pds.Rows[i][3].ToString().Trim();
model.Item_No = pds.Rows[i][0].ToString().Trim();
model.Punch_No = pds.Rows[i][1].ToString().Trim();
model.SystemName = pds.Rows[i][2].ToString().Trim();
model.Subsystem = pds.Rows[i][3].ToString().Trim();
model.Test_Package = pds.Rows[i][4].ToString().Trim();
model.Discipline = pds.Rows[i][5].ToString().Trim();
model.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
model.Identified = pds.Rows[i][7].ToString().Trim();
model.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
model.PUNCH_ITEM_FINISH_DATE = t1;
model.Test_Package = pds.Rows[i][4].ToString().Trim();
model.Discipline = pds.Rows[i][5].ToString().Trim();
model.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
model.Identified = pds.Rows[i][7].ToString().Trim();
model.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
model.PUNCH_ITEM_FINISH_DATE = t1;
model.Action_By = pds.Rows[i][10].ToString().Trim();
model.Required_By = pds.Rows[i][11].ToString().Trim();
model.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
model.Comments = pds.Rows[i][13].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Item_No = pds.Rows[i][0].ToString().Trim();
modelOnly.Punch_No = pds.Rows[i][1].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][2].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][3].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][4].ToString().Trim();
modelOnly.Discipline = pds.Rows[i][5].ToString().Trim();
modelOnly.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
modelOnly.Identified = pds.Rows[i][7].ToString().Trim();
modelOnly.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
modelOnly.PUNCH_ITEM_FINISH_DATE = t1;
modelOnly.Action_By = pds.Rows[i][10].ToString().Trim();
modelOnly.Required_By = pds.Rows[i][11].ToString().Trim();
modelOnly.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
modelOnly.Comments = pds.Rows[i][13].ToString().Trim();
Funs.DB.SubmitChanges();
model.Action_By = pds.Rows[i][10].ToString().Trim();
model.Required_By = pds.Rows[i][11].ToString().Trim();
model.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
model.Comments = pds.Rows[i][13].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Item_No = pds.Rows[i][0].ToString().Trim();
modelOnly.Punch_No = pds.Rows[i][1].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][2].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][3].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][4].ToString().Trim();
modelOnly.Discipline = pds.Rows[i][5].ToString().Trim();
modelOnly.DESCRIPTION = pds.Rows[i][6].ToString().Trim();
modelOnly.Identified = pds.Rows[i][7].ToString().Trim();
modelOnly.Category = pds.Rows[i][8].ToString().Trim();
DateTime t1;
if (DateTime.TryParse(pds.Rows[i][9].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][9].ToString()))
modelOnly.PUNCH_ITEM_FINISH_DATE = t1;
modelOnly.Action_By = pds.Rows[i][10].ToString().Trim();
modelOnly.Required_By = pds.Rows[i][11].ToString().Trim();
modelOnly.PUNCH_ITEM_STATUS = pds.Rows[i][12].ToString().Trim();
modelOnly.Comments = pds.Rows[i][13].ToString().Trim();
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -0,0 +1,137 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RotatingEquipment.aspx.cs" Inherits="FineUIPro.Web.Transfer.RotatingEquipment" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<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" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="RotatingEquipment"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtRotatingEquipment" Label="Rotating Equipment" LabelWidth="180px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
</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:GroupField ID="g1" HeaderText="MECHANICAL" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="RotatingEquipment" DataField="RotatingEquipment" FieldType="String" HeaderText="Rotating Equipment" TextAlign="Center"
HeaderTextAlign="Center" Width="170px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g2" HeaderText="SYSTEM AND TEST PACKAGE SELECTION" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="SYSTEM" DataField="SYSTEM" FieldType="String" HeaderText="SYSTEM" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="Subsystem" DataField="Subsystem" FieldType="String" HeaderText="Subsystem" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="TestPackage" DataField="TestPackage" FieldType="String" HeaderText="Test Package" TextAlign="Center"
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g3" HeaderText="Test Package Schedule" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="TestPackageSTART" DataField="TestPackageSTART" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>START" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField ColumnID="TestPackageFINISH" DataField="TestPackageFINISH" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>FINISH" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g5" HeaderText="" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="MechanicalFINALStatus" DataField="MechanicalFINALStatus" FieldType="String" HeaderText="Mechanical FINAL Status" ExpandUnusedSpace="true" TextAlign="Center"
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设备材料报验" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="480px">
</f:Window>
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="560px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click" Hidden="true">
</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,228 @@
using BLL;
using BLL.CQMS.Comprehensive;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.Transfer
{
public partial class RotatingEquipment : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
BindGrid();
}
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
string strSql = @"select * from Transfer_RotatingEquipment C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.txtRotatingEquipment.Text.Trim()))
{
strSql += " AND RotatingEquipment like @RotatingEquipment";
listStr.Add(new SqlParameter("@RotatingEquipment", "%" + this.txtRotatingEquipment.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
{
strSql += " AND TestPackageSTART >= @InspectionDateA";
listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
{
strSql += " AND TestPackageSTART <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SYSTEM like @SYSTEM";
listStr.Add(new SqlParameter("@SYSTEM", "%" + this.txtSystem.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <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 btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - ")));
}
#endregion
#region
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuModify_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx?InspectionEquipmentId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.btnMenuModify_Click(sender, e);
}
#endregion
#region
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var data = BLL.RotatingEquipmentService.GetRotatingEquipmentById(rowID);
if (data != null)
{
BLL.RotatingEquipmentService.DeleteRotatingEquipment(rowID);
}
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#endregion
#region
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RotatingEquipmentDataIn.aspx", "导入 - ")));
}
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.RotatingEquipmentMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnImport.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,233 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer
{
public partial class RotatingEquipment
{
/// <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>
/// ToolSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtRotatingEquipment 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtRotatingEquipment;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// g1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g1;
/// <summary>
/// g2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g2;
/// <summary>
/// g3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g3;
/// <summary>
/// g5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g5;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <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,68 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RotatingEquipmentDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.RotatingEquipmentDataIn" %>
<!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>
</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:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
</f:Button>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</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="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField DataField="Row" HeaderText="错误行号">
</f:BoundField>
<f:BoundField DataField="Column" HeaderText="错误列">
</f:BoundField>
<f:BoundField DataField="Reason" HeaderText="错误类型">
</f:BoundField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,427 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Transfer
{
public partial class RotatingEquipmentDataIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.hdCheckResult.Text = string.Empty;
this.hdFileName.Text = string.Empty;
if (errorInfos != null)
{
errorInfos.Clear();
}
}
}
#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 (errorInfos != null)
{
errorInfos.Clear();
}
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);
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], 7);
hdCheckResult.Text = "1";
}
catch (Exception exc)
{
Response.Write(exc);
//return null;
// return dt;
}
finally
{
}
}
#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)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
return false;
}
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
for (int i = 1; i < ir; i++)
{
string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
}
errorInfos.Clear();
if (!string.IsNullOrEmpty(result))
{
string results = result;
List<string> errorInfoList = results.Split('|').ToList();
foreach (var item in errorInfoList)
{
string[] errors = item.Split(',');
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
errorInfo.Row = errors[0];
errorInfo.Column = errors[1];
errorInfo.Reason = errors[2];
errorInfos.Add(errorInfo);
}
if (errorInfos.Count > 0)
{
this.gvErrorInfo.DataSource = errorInfos;
this.gvErrorInfo.DataBind();
}
}
else
{
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(hdCheckResult.Text))
{
if (errorInfos.Count <= 0)
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请先审核要导入的文件!", 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], 7);
}
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;
ic = pds.Columns.Count;
if (ic < Cols)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
string result = string.Empty;
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
List<Model.Transfer_RotatingEquipment> list = new List<Model.Transfer_RotatingEquipment>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(x => x.RotatingEquipment == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_RotatingEquipment model = new Model.Transfer_RotatingEquipment();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.RotatingEquipment = pds.Rows[i][0].ToString().Trim();
model.SYSTEM = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.TestPackageFINISH = t2;
model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim();
if (model.MechanicalFINALStatus.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.RotatingEquipment = pds.Rows[i][0].ToString().Trim();
modelOnly.SYSTEM = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.TestPackageFINISH = t2;
modelOnly.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim();
if (modelOnly.MechanicalFINALStatus.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_RotatingEquipment.InsertAllOnSubmit(list);
Funs.DB.SubmitChanges();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#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 + "File\\Excel\\DataIn\\RotatingEquipment导入模板.xls";
string filePath = "File\\Excel\\DataIn\\RotatingEquipment导入模板.xls";
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
}
}

View File

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

View File

@ -0,0 +1,137 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaticEquipment.aspx.cs" Inherits="FineUIPro.Web.Transfer.StaticEquipment" %>
<!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>
</head>
<body>
<form id="form1" runat="server">
<f:PageManager ID="PageManager1" runat="server" AutoSizePanelID="Panel1" />
<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" ShowHeader="false" Title="设备材料报验" EnableCollapse="true"
runat="server" BoxFlex="1" DataKeyNames="Id" AllowCellEditing="true" EnableColumnLines="true"
ClicksToEdit="2" DataIDField="Id" AllowSorting="true" SortField="StaticEquipment"
SortDirection="ASC" OnSort="Grid1_Sort"
AllowPaging="true" IsDatabasePaging="true" PageSize="10" OnPageIndexChange="Grid1_PageIndexChange"
EnableTextSelection="true">
<Toolbars>
<f:Toolbar ID="ToolSearch" Position="Top" runat="server" ToolbarAlign="Left">
<Items>
<f:TextBox runat="server" ID="txtStaticEquipment" Label="Static Equipment" LabelWidth="180px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>
<f:Label ID="Label1" runat="server" Text="至">
</f:Label>
<f:DatePicker runat="server" ID="txtEndTime" LabelAlign="Right" Width="150px">
</f:DatePicker>
<f:Button ID="btnSearch" Icon="SystemSearch" EnablePostBack="true" runat="server" OnClick="btnSearch_Click" ToolTip="查询">
</f:Button>
<f:ToolbarFill runat="server"></f:ToolbarFill>
<f:Button ID="btnImport" ToolTip="导入" Icon="PackageIn" runat="server" OnClick="btnImport_Click" Hidden="true">
</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:GroupField ID="g1" HeaderText="MECHANICAL" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="StaticEquipment" DataField="StaticEquipment" FieldType="String" HeaderText="Static Equipment" TextAlign="Center"
HeaderTextAlign="Center" Width="170px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g2" HeaderText="SYSTEM AND TEST PACKAGE SELECTION" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="SYSTEM" DataField="SYSTEM" FieldType="String" HeaderText="SYSTEM" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="Subsystem" DataField="Subsystem" FieldType="String" HeaderText="Subsystem" TextAlign="Center"
HeaderTextAlign="Center" Width="120px">
</f:RenderField>
<f:RenderField ColumnID="TestPackage" DataField="TestPackage" FieldType="String" HeaderText="Test Package" TextAlign="Center"
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g3" HeaderText="Test Package Schedule" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="TestPackageSTART" DataField="TestPackageSTART" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>START" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
<f:RenderField ColumnID="TestPackageFINISH" DataField="TestPackageFINISH" FieldType="Date" Renderer="Date" HeaderText="Test Package<br/>FINISH" TextAlign="Center"
HeaderTextAlign="Center" Width="130px">
</f:RenderField>
</Columns>
</f:GroupField>
<f:GroupField ID="g5" HeaderText="" HeaderTextAlign="Center">
<Columns>
<f:RenderField ColumnID="MechanicalFINALStatus" DataField="MechanicalFINALStatus" FieldType="String" HeaderText="Mechanical FINAL Status" ExpandUnusedSpace="true" TextAlign="Center"
HeaderTextAlign="Center" Width="200px">
</f:RenderField>
</Columns>
</f:GroupField>
</Columns>
<Listeners>
<f:Listener Event="beforerowcontextmenu" Handler="onRowContextMenu" />
</Listeners>
<PageItems>
<f:ToolbarText ID="ToolbarText1" runat="server" Text="每页记录数:">
</f:ToolbarText>
<f:DropDownList runat="server" ID="ddlPageSize" Width="80px" AutoPostBack="true" OnSelectedIndexChanged="ddlPageSize_SelectedIndexChanged">
<f:ListItem Text="10" Value="10" />
<f:ListItem Text="15" Value="15" />
<f:ListItem Text="20" Value="20" />
<f:ListItem Text="25" Value="25" />
<f:ListItem Text="所有行" Value="100000" />
</f:DropDownList>
</PageItems>
</f:Grid>
</Items>
</f:Panel>
<f:Window ID="Window1" Title="设备材料报验" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Parent" EnableResize="false" runat="server" IsModal="true" OnClose="Window1_Close"
Width="900px" Height="480px">
</f:Window>
<f:Window ID="Window2" Title="弹出窗体" Hidden="true" EnableIFrame="true" EnableMaximize="true"
Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true"
Width="700px" Height="560px">
</f:Window>
<f:Window ID="WindowAtt" Title="弹出窗体" Hidden="true" EnableIFrame="true"
EnableMaximize="true" Target="Parent" EnableResize="false" runat="server"
IsModal="true" Width="700px" Height="500px">
</f:Window>
<f:Menu ID="Menu1" runat="server">
<Items>
<f:MenuButton ID="btnMenuDel" EnablePostBack="true" runat="server" Icon="Delete" Text="删除" ConfirmText="确定删除当前数据?"
OnClick="btnMenuDel_Click" Hidden="true">
</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,229 @@
using BLL;
using BLL.CQMS.Comprehensive;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Linq;
namespace FineUIPro.Web.Transfer
{
public partial class StaticEquipment : PageBase
{
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
GetButtonPower();
BindGrid();
}
}
/// <summary>
/// 数据绑定
/// </summary>
public void BindGrid()
{
string strSql = @"select * from Transfer_StaticEquipment C
where C.ProjectId = @ProjectId";
List<SqlParameter> listStr = new List<SqlParameter>();
listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId));
if (!string.IsNullOrEmpty(this.txtStaticEquipment.Text.Trim()))
{
strSql += " AND StaticEquipment like @StaticEquipment";
listStr.Add(new SqlParameter("@StaticEquipment", "%" + this.txtStaticEquipment.Text.Trim() + "%"));
}
if (!string.IsNullOrEmpty(txtStarTime.Text.Trim()))
{
strSql += " AND TestPackageSTART >= @InspectionDateA";
listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(txtEndTime.Text.Trim()))
{
strSql += " AND TestPackageSTART <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SYSTEM like @SYSTEM";
listStr.Add(new SqlParameter("@SYSTEM", "%" + this.txtSystem.Text.Trim() + "%"));
}
SqlParameter[] parameter = listStr.ToArray();
DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter);
Grid1.RecordCount = tb.Rows.Count;
var table = this.GetPagedDataTable(Grid1, tb);
Grid1.DataSource = table;
Grid1.DataBind();
}
#endregion
#region
/// <summary>
/// 分页下拉
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e)
{
Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue);
BindGrid();
}
/// <summary>
/// 分页索引事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e)
{
BindGrid();
}
/// <summary>
/// 排序
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e)
{
Grid1.SortDirection = e.SortDirection;
Grid1.SortField = e.SortField;
BindGrid();
}
#endregion
#region
/// <summary>
/// 查询
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnSearch_Click(object sender, EventArgs e)
{
BindGrid();
}
#endregion
#region
/// <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 btnNew_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - ")));
}
#endregion
#region
/// <summary>
/// 右键编辑
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuModify_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length == 0)
{
Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning);
return;
}
PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx?InspectionEquipmentId={0}", Grid1.SelectedRowID, "编辑 - ")));
}
/// <summary>
/// Grid行双击事件
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e)
{
this.btnMenuModify_Click(sender, e);
}
#endregion
#region
/// <summary>
/// 右键删除
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnMenuDel_Click(object sender, EventArgs e)
{
if (Grid1.SelectedRowIndexArray.Length > 0)
{
foreach (int rowIndex in Grid1.SelectedRowIndexArray)
{
string rowID = Grid1.DataKeys[rowIndex][0].ToString();
var data = BLL.StaticEquipmentService.GetStaticEquipmentById(rowID);
if (data != null)
{
BLL.StaticEquipmentService.DeleteStaticEquipment(rowID);
}
}
BindGrid();
ShowNotify("删除数据成功!", MessageBoxIcon.Success);
}
}
#endregion
#region
/// <summary>
/// 导入按钮
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void btnImport_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("StaticEquipmentDataIn.aspx", "导入 - ")));
}
#endregion
#region
/// <summary>
/// 获取按钮权限
/// </summary>
/// <param name="button"></param>
/// <returns></returns>
private void GetButtonPower()
{
if (Request.Params["value"] == "0")
{
return;
}
var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.StaticEquipmentMenuId);
if (buttonList.Count() > 0)
{
if (buttonList.Contains(BLL.Const.BtnDelete))
{
this.btnMenuDel.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnSave))
{
this.btnImport.Hidden = false;
}
}
}
#endregion
}
}

View File

@ -0,0 +1,233 @@
//------------------------------------------------------------------------------
// <自动生成>
// 此代码由工具生成。
//
// 对此文件的更改可能导致不正确的行为,如果
// 重新生成代码,则所做更改将丢失。
// </自动生成>
//------------------------------------------------------------------------------
namespace FineUIPro.Web.Transfer
{
public partial class StaticEquipment
{
/// <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>
/// ToolSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Toolbar ToolSearch;
/// <summary>
/// txtStaticEquipment 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtStaticEquipment;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtStarTime;
/// <summary>
/// Label1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Label Label1;
/// <summary>
/// txtEndTime 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DatePicker txtEndTime;
/// <summary>
/// btnSearch 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnSearch;
/// <summary>
/// btnImport 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImport;
/// <summary>
/// lblPageIndex 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblPageIndex;
/// <summary>
/// g1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g1;
/// <summary>
/// g2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g2;
/// <summary>
/// g3 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g3;
/// <summary>
/// g5 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.GroupField g5;
/// <summary>
/// ToolbarText1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.ToolbarText ToolbarText1;
/// <summary>
/// ddlPageSize 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList ddlPageSize;
/// <summary>
/// Window1 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window1;
/// <summary>
/// Window2 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window Window2;
/// <summary>
/// WindowAtt 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Window WindowAtt;
/// <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,68 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaticEquipmentDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.StaticEquipmentDataIn" %>
<!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>
</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:HiddenField ID="hdFileName" runat="server">
</f:HiddenField>
<f:Button ID="btnAudit" Icon="ApplicationEdit" runat="server" ToolTip="审核" ValidateForms="SimpleForm1" Text="审核"
OnClick="btnAudit_Click">
</f:Button>
<f:Button ID="btnImport" Icon="ApplicationGet" runat="server" ToolTip="导入" ValidateForms="SimpleForm1" Text="导入"
OnClick="btnImport_Click">
</f:Button>
<f:Button ID="btnDownLoad" runat="server" Icon="ApplicationGo" ToolTip="下载模板" OnClick="btnDownLoad_Click" Text="下载模板">
</f:Button>
<f:HiddenField ID="hdCheckResult" runat="server">
</f:HiddenField>
</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="gvErrorInfo" ShowBorder="true" EnableAjax="false" ShowHeader="false" Title="人员报验" EnableCollapse="true"
runat="server" BoxFlex="1" AllowCellEditing="true" ClicksToEdit="2" AllowSorting="true"
SortDirection="DESC" EnableColumnLines="true" ForceFit="true" AllowPaging="true" IsDatabasePaging="true" PageSize="10"
EnableRowDoubleClickEvent="true" AllowFilters="true" EnableTextSelection="True">
<Columns>
<f:TemplateField ColumnID="tfPageIndex" Width="55px" HeaderText="序号" HeaderTextAlign="Center" TextAlign="Center"
EnableLock="true" Locked="False">
<ItemTemplate>
<asp:Label ID="lblPageIndex" runat="server" Text='<%# gvErrorInfo.PageIndex * gvErrorInfo.PageSize + Container.DataItemIndex + 1 %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>
<f:BoundField DataField="Row" HeaderText="错误行号">
</f:BoundField>
<f:BoundField DataField="Column" HeaderText="错误列">
</f:BoundField>
<f:BoundField DataField="Reason" HeaderText="错误类型">
</f:BoundField>
</Columns>
</f:Grid>
</Items>
</f:FormRow>
</Rows>
</f:Form>
</form>
</body>
</html>

View File

@ -0,0 +1,426 @@
using BLL;
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.OleDb;
using System.IO;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FineUIPro.Web.Transfer
{
public partial class StaticEquipmentDataIn : PageBase
{
#region
/// <summary>
/// 上传预设的虚拟路径
/// </summary>
private string initPath = Const.ExcelUrl;
/// <summary>
/// 错误集合
/// </summary>
public static List<Model.ErrorInfo> errorInfos = new List<Model.ErrorInfo>();
#endregion
#region
/// <summary>
/// 加载页面
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
this.hdCheckResult.Text = string.Empty;
this.hdFileName.Text = string.Empty;
if (errorInfos != null)
{
errorInfos.Clear();
}
}
}
#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 (errorInfos != null)
{
errorInfos.Clear();
}
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);
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], 7);
hdCheckResult.Text = "1";
}
catch (Exception exc)
{
Response.Write(exc);
//return null;
// return dt;
}
finally
{
}
}
#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)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
return false;
}
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
for (int i = 1; i < ir; i++)
{
string row4 = pds.Rows[i][4].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row4.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|";
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
{
try
{
DateTime date = Convert.ToDateTime(row5.Trim());
}
catch (Exception)
{
result += (i + 3).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|";
}
}
}
if (!string.IsNullOrEmpty(result))
{
result = result.Substring(0, result.LastIndexOf("|"));
}
errorInfos.Clear();
if (!string.IsNullOrEmpty(result))
{
string results = result;
List<string> errorInfoList = results.Split('|').ToList();
foreach (var item in errorInfoList)
{
string[] errors = item.Split(',');
Model.ErrorInfo errorInfo = new Model.ErrorInfo();
errorInfo.Row = errors[0];
errorInfo.Column = errors[1];
errorInfo.Reason = errors[2];
errorInfos.Add(errorInfo);
}
if (errorInfos.Count > 0)
{
this.gvErrorInfo.DataSource = errorInfos;
this.gvErrorInfo.DataBind();
}
}
else
{
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(hdCheckResult.Text))
{
if (errorInfos.Count <= 0)
{
string rootPath = Server.MapPath("~/");
ImportXlsToData2(rootPath + initPath + this.hdFileName.Text);
hdCheckResult.Text = string.Empty;
ShowNotify("导入成功!", MessageBoxIcon.Success);
PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference());
}
else
{
ShowNotify("请先将错误数据修正,再重新导入提交!", MessageBoxIcon.Warning);
}
}
else
{
ShowNotify("请先审核要导入的文件!", 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], 7);
}
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;
ic = pds.Columns.Count;
if (ic < Cols)
{
ShowNotify("导入Excel格式错误Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning);
}
string result = string.Empty;
ir = pds.Rows.Count;
if (pds != null && ir > 0)
{
List<Model.Transfer_StaticEquipment> list = new List<Model.Transfer_StaticEquipment>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_StaticEquipment.FirstOrDefault(x => x.StaticEquipment == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_StaticEquipment model = new Model.Transfer_StaticEquipment();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.StaticEquipment = pds.Rows[i][0].ToString().Trim();
model.SYSTEM = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.TestPackageFINISH = t2;
model.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim();
if (model.MechanicalFINALStatus.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.StaticEquipment = pds.Rows[i][0].ToString().Trim();
modelOnly.SYSTEM = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.TestPackage = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.TestPackageSTART = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.TestPackageFINISH = t2;
modelOnly.MechanicalFINALStatus = pds.Rows[i][6].ToString().Trim();
if (modelOnly.MechanicalFINALStatus.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
if (list.Count > 0)
{
Funs.DB.Transfer_StaticEquipment.InsertAllOnSubmit(list);
Funs.DB.SubmitChanges();
}
}
else
{
ShowNotify("导入数据为空!", MessageBoxIcon.Warning);
}
return true;
}
#endregion
#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 + "File\\Excel\\DataIn\\StaticEquipment导入模板.xls";
string filePath = "File\\Excel\\DataIn\\StaticEquipment导入模板.xls";
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
}
}

View File

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

View File

@ -24,6 +24,8 @@
<f:TextBox runat="server" ID="txtTelecom" Label="Telecom" LabelWidth="120px" LabelAlign="Right"></f:TextBox>
<f:TextBox runat="server" ID="txtSystem" Label="SYSTEM" LabelWidth="100px" LabelAlign="Right"></f:TextBox>
<f:DatePicker runat="server" Label="Test_Package_START" ID="txtStarTime" LabelAlign="Right" LabelWidth="150px"
Width="280px">
</f:DatePicker>

View File

@ -51,6 +51,11 @@ namespace FineUIPro.Web.Transfer
strSql += " AND Test_Package_START <= @InspectionDateZ";
listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim())));
}
if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim()))
{
strSql += " AND SystemName like @SystemName";
listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%"));
}
strSql += " order by Telecom ";

View File

@ -68,6 +68,15 @@ namespace FineUIPro.Web.Transfer
/// </remarks>
protected global::FineUIPro.TextBox txtTelecom;
/// <summary>
/// txtSystem 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.TextBox txtSystem;
/// <summary>
/// txtStarTime 控件。
/// </summary>

View File

@ -181,7 +181,7 @@ namespace FineUIPro.Web.Transfer
}
}
string row5 = pds.Rows[i][5].ToString();
if (!string.IsNullOrEmpty(row4))
if (!string.IsNullOrEmpty(row5))
{
try
{
@ -329,41 +329,52 @@ namespace FineUIPro.Web.Transfer
List<Model.Transfer_Telecom> list = new List<Model.Transfer_Telecom>();
for (int i = 1; i < ir; i++)
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim()
if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim()))
{
//查询第一列,没查到的情况下作导入处理
var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim()
&& x.ProjectId == CurrUser.LoginProjectId);
if (modelOnly == null)
{
Model.Transfer_Telecom model = new Model.Transfer_Telecom();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Telecom = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
if (modelOnly == null)
{
Model.Transfer_Telecom model = new Model.Transfer_Telecom();
model.Id = Guid.NewGuid().ToString();
model.ProjectId = CurrUser.LoginProjectId;
model.Telecom = pds.Rows[i][0].ToString().Trim();
model.SystemName = pds.Rows[i][1].ToString().Trim();
model.Subsystem = pds.Rows[i][2].ToString().Trim();
model.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
model.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
model.Test_Package_FINISH = t2;
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
list.Add(model);
}
else
{
//修改
modelOnly.Telecom = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
Funs.DB.SubmitChanges();
model.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (model.FINAL_Status.ToLower() == "finished")
{
model.CompleteTime = DateTime.Now;
}
list.Add(model);
}
else
{
//修改
modelOnly.Telecom = pds.Rows[i][0].ToString().Trim();
modelOnly.SystemName = pds.Rows[i][1].ToString().Trim();
modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim();
modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim();
DateTime t1, t2;
if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString()))
modelOnly.Test_Package_START = t1;
if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString()))
modelOnly.Test_Package_FINISH = t2;
modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim();
if (modelOnly.FINAL_Status.ToLower() == "finished")
{
modelOnly.CompleteTime = DateTime.Now;
}
Funs.DB.SubmitChanges();
}
}
}
if (list.Count > 0)

View File

@ -11,7 +11,8 @@
<FineUIPro DebugMode="false" Theme="Cupertino"/>
<appSettings>
<!--连接字符串-->
<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--<add key="ConnectionString" value="Server=.;Database=SGGLDB_WH;Integrated Security=False;User ID=sa;Password=1111;MultipleActiveResultSets=true;Connect Timeout=1200"/>-->
<add key="ConnectionString" value="Server=DESKTOP-1QITK9E\MSSQLSERVER2;Database=SGGLDB;Integrated Security=False;User ID=sa;Password=123;MultipleActiveResultSets=true;Connect Timeout=1200"/>
<!--系统名称-->
<add key="SystemName" value="智慧施工管理信息系统V1.0"/>
<add key="ChartImageHandler" value="storage=file;timeout=20;url=~/Images/;"/>

View File

@ -13,4 +13,8 @@
<TreeNode id="95295BF7-FB51-480D-9902-6ADA4E8427FC" Text="Plumbing" NavigateUrl="Transfer/Plumbing.aspx"></TreeNode>
<TreeNode id="05442049-1310-45B1-9D3D-CAAE759D8F3E" Text="HVAC" NavigateUrl="Transfer/HVAC.aspx"></TreeNode>
<TreeNode id="016903B1-3B86-4CF5-AFF8-FF8BE389BEE5" Text="Punchlist from" NavigateUrl="Transfer/PunchlistFrom.aspx"></TreeNode>
<TreeNode id="3517DBE2-9728-4BA0-9EA5-AE2147DB883B" Text="移交图表" NavigateUrl=""><TreeNode id="E6F5125D-DD94-4978-B7EB-D9C26694D86D" Text="全厂移交统计表" NavigateUrl="Transfer/Chart/Instrumentation.aspx"></TreeNode>
<TreeNode id="F97BCF55-E450-4007-AD84-AB64B3496204" Text="全厂移交统计递增表" NavigateUrl="Transfer/Chart/TransferChart.aspx"></TreeNode>
<TreeNode id="C2DD3E9E-DB18-466F-8FA0-19AD6E21EEF0" Text="Punchlist from" NavigateUrl="Transfer/Chart/PunchlistFrom.aspx"></TreeNode>
</TreeNode>
</Tree>

View File

@ -100,7 +100,7 @@ namespace FineUIPro.Web.common
//质量培训人员
DateTime date = DateTime.Now.AddDays(-1);
int CqmsPxNum = (from x in Funs.DB.Comprehensive_InspectionPerson
where x.IsTrain == true && x.CompileDate.Value.Year == date.Year && x.CompileDate.Value.Month == date.Month && x.CompileDate.Value.Day == date.Day
where x.IsTrain == true && x.ProjectId == ProjectId
select x).Count();
divCqmsPxNum.InnerHtml = CqmsPxNum.ToString();

Some files were not shown because too many files have changed in this diff Show More