From 36fdd9cfa6a87950084f48166c8b387f3bfdb3fe Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Fri, 26 Jan 2024 17:15:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_2024-01-26-gaofei.sql | 46 ++ SGGL/BLL/BLL.csproj | 2 + SGGL/BLL/Transfer/RotatingEquipmentService.cs | 79 +++ SGGL/BLL/Transfer/StaticEquipmentService.cs | 79 +++ .../File/Excel/DataIn/Piping导入模板.xls | Bin 0 -> 22016 bytes .../DataIn/RotatingEquipment导入模板.xls | Bin 0 -> 21504 bytes .../Excel/DataIn/StaticEquipment导入模板.xls | Bin 0 -> 21504 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 40 ++ SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user | 2 +- SGGL/FineUIPro.Web/Transfer/Piping.aspx | 44 +- SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs | 25 +- .../Transfer/Piping.aspx.designer.cs | 54 ++ SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx | 68 +++ .../Transfer/PipingDataIn.aspx.cs | 421 ++++++++++++++ .../Transfer/PipingDataIn.aspx.designer.cs | 123 ++++ .../Transfer/RotatingEquipment.aspx | 135 +++++ .../Transfer/RotatingEquipment.aspx.cs | 223 ++++++++ .../RotatingEquipment.aspx.designer.cs | 222 ++++++++ .../Transfer/RotatingEquipmentDataIn.aspx | 68 +++ .../Transfer/RotatingEquipmentDataIn.aspx.cs | 417 ++++++++++++++ .../RotatingEquipmentDataIn.aspx.designer.cs | 123 ++++ .../Transfer/StaticEquipment.aspx | 135 +++++ .../Transfer/StaticEquipment.aspx.cs | 223 ++++++++ .../Transfer/StaticEquipment.aspx.designer.cs | 222 ++++++++ .../Transfer/StaticEquipmentDataIn.aspx | 68 +++ .../Transfer/StaticEquipmentDataIn.aspx.cs | 417 ++++++++++++++ .../StaticEquipmentDataIn.aspx.designer.cs | 123 ++++ SGGL/FineUIPro.Web/Web.config | 2 +- SGGL/Model/Model.cs | 530 ++++++++++++++++++ SGGL/WebAPI/WebAPI.csproj.user | 2 +- 30 files changed, 3871 insertions(+), 22 deletions(-) create mode 100644 SGGL/BLL/Transfer/RotatingEquipmentService.cs create mode 100644 SGGL/BLL/Transfer/StaticEquipmentService.cs create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/StaticEquipment导入模板.xls create mode 100644 SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.designer.cs diff --git a/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql index 8bb9d8be..cadd0a7f 100644 --- a/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql +++ b/DataBase/版本日志/SGGLDB_WH_2024-01-26-gaofei.sql @@ -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]( diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 541c99ef..3a175126 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -769,6 +769,8 @@ + + diff --git a/SGGL/BLL/Transfer/RotatingEquipmentService.cs b/SGGL/BLL/Transfer/RotatingEquipmentService.cs new file mode 100644 index 00000000..b20f390b --- /dev/null +++ b/SGGL/BLL/Transfer/RotatingEquipmentService.cs @@ -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 + { + /// + /// 根据主键获取设备材料报验信息 + /// + /// + /// + public static Model.Transfer_RotatingEquipment GetRotatingEquipmentById(string Id) + { + return Funs.DB.Transfer_RotatingEquipment.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 添加设备材料报验 + /// + /// + 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(); + } + + /// + /// 修改设备材料报验 + /// + /// + 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(); + } + } + + /// + /// 根据主键删除设备材料报验 + /// + /// + 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(); + } + } + } +} diff --git a/SGGL/BLL/Transfer/StaticEquipmentService.cs b/SGGL/BLL/Transfer/StaticEquipmentService.cs new file mode 100644 index 00000000..bdeed534 --- /dev/null +++ b/SGGL/BLL/Transfer/StaticEquipmentService.cs @@ -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 + { + /// + /// 根据主键获取设备材料报验信息 + /// + /// + /// + public static Model.Transfer_StaticEquipment GetStaticEquipmentById(string Id) + { + return Funs.DB.Transfer_StaticEquipment.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 添加设备材料报验 + /// + /// + 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(); + } + + /// + /// 修改设备材料报验 + /// + /// + 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(); + } + } + + /// + /// 根据主键删除设备材料报验 + /// + /// + 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(); + } + } + } +} diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Piping导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..26f8263cd3aeef16c15e11395d5dbac067b61c56 GIT binary patch literal 22016 zcmeG^2Urxz(!I+9i%OCp0?HC3Ne*Hph^Qz@z<{C%vIvTzh#V@M7&tw}6UBfY=QCo? zXGG5|a-xR{a%M2+bmmj`ubSB~I~#ty_rCYP`@h%w^~`j2byanBb#-;`>{kC~Sifqg zc>`f3f1*JeMLI-_0q4LoW-1vF!i5JcH;P0e8b}B{{x|)NH1Gvvbrg>w5AIHoam=+L z^C9a%ZU(tI6}M@ zAmHPbkfYR<^u*iLw=G^dMP20#KVNds1MV6C%h#k41_Jj?GMXe&a*U>dUvX_oxEv%U zQF>FFB7S5DjTu5>q31c!^ByD-u8B<{z`!vE{v0S{pHK!ymDz{Qu}K8}E8?|LOZ@%CX7x4rR(NRNc|TG%cZGw76nt$Y_GYT3_&w*B>KO4K^>} zllBg~uXq5g6tXsCtPg~YKC3rmj8$SGV=R&k8Do`P$QZB8hK%vaBFM;T12{X3L9i_* ze8%=+!m%0I8FU$AoA9&|nHdu@QnCagIU|JW6hE@e((B-pa!w%BlS!V#oW<)I7XM08 z)qj+eTYIjy)Xl=6cq#PX<>R&<0Mlf_%s>$}0LM5DbrJ;`ee)p57=xiM(08Xp#y(|1 zMqQw8FiykyPqZ}2Myqq$mH8Z^1xjfEE$!ePqjYr}aN@~00&4=T9>KpSb*E%VwaA)XgAnAcZ%Ny4p}z zJ-B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L~^STua#hkwmS{fPqUJCRO*gux=nOE@Jf8AF@X;*`qgU0f@*5e~O042iDfT z-}#Jci|vyk(>w_gz%!Z)#!lFzm$;12c)r{>CNe5BBYEP8tnL%j(vt@WGv&H~!|mna z>*ea{>E`L?;pXY#>5X5}Qi%h9DW(CdH|mi6--Wh-A^Q)g$dr_{5kmT}pafnX9^L}6 k$hdfSPfJPZ2;b@uLj6^g8`X8Uj^s_JUE?V}|EZV%0rB!>wEzGB literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/RotatingEquipment导入模板.xls new file mode 100644 index 0000000000000000000000000000000000000000..251118300589667a055036939787b9bc0e77d4f4 GIT binary patch literal 21504 zcmeG^2Urxz(!I+9i;92*kswQuBsqu~5HXSj3@8SKMNkw)^ibi%!09QTDCXllBj$WY z^voiP9xBS2!JN}6hEw*hn%OWrJG(#Ld*A!--uL%@Ju_WhT~%FOU0vNfyA{6~Rj=G( zQA1d%Bheyt5m(8h4I~5}|3CeMH1Gvvb&`&u0PfC^am;lg z3nA-4ZUDI<02xex7(s3V*%-13WK+mykefm_hujRZ1!POeR*PoucZQJ>P;Q>+Ccq@8%O~Jbsz;d-|gucK%gNz_UDLF>az^}MAA$%T^k}1AE zO%Z=|2#py^Vxi|*(DTkD0j>%4A;7>f0scHFW1mn4MwQ0L{Qq$N7)< z|4;u64d@9C2~UR@EaP8BmrwcpKMgwa9d}#Bbw!H;134nK>i_f|<&gy()$j=X>rfO* z4m4a$(t9;LB3yQ7!=YNa9bKmAVO=#{#zz{D`(9^5!)13_JC(9jPMN&2y9{4;m$j4K zW$^!_yJEbnrTwSxpDD+t&^weVyHIyW4^zK{iqYXqogt$M4r_JZ&u>0PrWkITCnPPM zc3t%XSP^7h$XFi)8GTka$QY}{LdIAm2{Ohi*^n__nF$%=lLe5G(|T}r7=vJ2O!$oL z!^ES~$EVX}jBUbG6Eo7srYC2L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6 +16398,34 @@ ProjectSetupDataIn.aspx + + RotatingEquipment.aspx + ASPXCodeBehind + + + RotatingEquipment.aspx + + + RotatingEquipmentDataIn.aspx + ASPXCodeBehind + + + RotatingEquipmentDataIn.aspx + + + StaticEquipment.aspx + ASPXCodeBehind + + + StaticEquipment.aspx + + + StaticEquipmentDataIn.aspx + ASPXCodeBehind + + + StaticEquipmentDataIn.aspx + Video.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index c78536b4..5c318055 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true false diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx b/SGGL/FineUIPro.Web/Transfer/Piping.aspx index f80d2b82..e0049131 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx @@ -16,12 +16,24 @@ + + + + + + + + + + + @@ -38,43 +50,47 @@ + HeaderTextAlign="Center" Width="170px"> + HeaderTextAlign="Center" Width="120px"> + HeaderTextAlign="Center" Width="120px"> + HeaderTextAlign="Center" Width="120px"> - + - - - + + HeaderTextAlign="Center" Width="130px"> + HeaderTextAlign="Center" Width="170px"> + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs index 09da90ac..dc32495c 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.cs @@ -30,10 +30,25 @@ namespace FineUIPro.Web.Transfer /// public void BindGrid() { - string strSql = @"select * from Transfer_ProjectSetup C + string strSql = @"select * from Transfer_Piping C where C.ProjectId = @ProjectId"; List listStr = new List(); 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()))); + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -154,10 +169,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 +189,7 @@ namespace FineUIPro.Web.Transfer /// 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 +205,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)) diff --git a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs index d7ce9219..9ddaec3f 100644 --- a/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Piping.aspx.designer.cs @@ -57,6 +57,51 @@ namespace FineUIPro.Web.Transfer { /// protected global::FineUIPro.Toolbar ToolSearch; + /// + /// txtPIPINGLINENUMBER 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPIPINGLINENUMBER; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + /// /// btnImport 控件。 /// @@ -111,6 +156,15 @@ namespace FineUIPro.Web.Transfer { /// protected global::FineUIPro.GroupField g4; + /// + /// g5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g5; + /// /// ToolbarText1 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx new file mode 100644 index 00000000..0fb8ea7f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PipingDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.PipingDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs new file mode 100644 index 00000000..6288b651 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.cs @@ -0,0 +1,421 @@ +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 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + 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 审核 + /// + /// 审核 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + 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 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 导入 + /// + /// 导入 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + 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 list = new List(); + 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(); + 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(); + 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 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + 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"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.designer.cs new file mode 100644 index 00000000..fdc5b39c --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/PipingDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class PipingDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx new file mode 100644 index 00000000..e37b9a0e --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx @@ -0,0 +1,135 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RotatingEquipment.aspx.cs" Inherits="FineUIPro.Web.Transfer.RotatingEquipment" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.cs new file mode 100644 index 00000000..806cdd01 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.cs @@ -0,0 +1,223 @@ +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 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from Transfer_RotatingEquipment C + where C.ProjectId = @ProjectId"; + List listStr = new List(); + 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()))); + } + 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 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + 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, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("RotatingEquipmentDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.designer.cs new file mode 100644 index 00000000..ca6bd24d --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipment.aspx.designer.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class RotatingEquipment { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtRotatingEquipment 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRotatingEquipment; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// g1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g1; + + /// + /// g2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g2; + + /// + /// g3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g3; + + /// + /// g5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g5; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx new file mode 100644 index 00000000..ccec8b03 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RotatingEquipmentDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.RotatingEquipmentDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs new file mode 100644 index 00000000..bdc66334 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.cs @@ -0,0 +1,417 @@ +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 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + 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 审核 + /// + /// 审核 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + 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 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 导入 + /// + /// 导入 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + 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 list = new List(); + 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(); + 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(); + 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 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + 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"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.designer.cs new file mode 100644 index 00000000..bb3f6d2f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/RotatingEquipmentDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class RotatingEquipmentDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx new file mode 100644 index 00000000..3c49f100 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx @@ -0,0 +1,135 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaticEquipment.aspx.cs" Inherits="FineUIPro.Web.Transfer.StaticEquipment" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.cs b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.cs new file mode 100644 index 00000000..e774e6bc --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.cs @@ -0,0 +1,223 @@ +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 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + BindGrid(); + } + } + + /// + /// 数据绑定 + /// + public void BindGrid() + { + string strSql = @"select * from Transfer_StaticEquipment C + where C.ProjectId = @ProjectId"; + List listStr = new List(); + 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()))); + } + 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 分页、排序 + /// + /// 分页下拉 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 分页索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + Grid1.SortDirection = e.SortDirection; + Grid1.SortField = e.SortField; + BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void btnSearch_Click(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 关闭弹出窗口 + /// + /// 关闭弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 增加 + /// + /// 新增按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InspectionEquipmentEdit.aspx", "编辑 - "))); + } + #endregion + + #region 编辑 + /// + /// 右键编辑 + /// + /// + /// + 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, "编辑 - "))); + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnMenuModify_Click(sender, e); + } + #endregion + + #region 删除 + /// + /// 右键删除 + /// + /// + /// + 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 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("StaticEquipmentDataIn.aspx", "导入 - "))); + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.designer.cs new file mode 100644 index 00000000..e428de06 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipment.aspx.designer.cs @@ -0,0 +1,222 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class StaticEquipment { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar ToolSearch; + + /// + /// txtStaticEquipment 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtStaticEquipment; + + /// + /// txtStarTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStarTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// g1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g1; + + /// + /// g2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g2; + + /// + /// g3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g3; + + /// + /// g5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupField g5; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Window2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window2; + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx new file mode 100644 index 00000000..22fc0d7a --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx @@ -0,0 +1,68 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StaticEquipmentDataIn.aspx.cs" Inherits="FineUIPro.Web.Transfer.StaticEquipmentDataIn" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs new file mode 100644 index 00000000..f6476672 --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.cs @@ -0,0 +1,417 @@ +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 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + + /// + /// 错误集合 + /// + public static List errorInfos = new List(); + #endregion + + #region 加载 + /// + /// 加载页面 + /// + /// + /// + 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 审核 + /// + /// 审核 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + 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 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 导入 + /// + /// 导入 + /// + /// + /// + 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提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + 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的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + 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 list = new List(); + 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(); + 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(); + 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 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + 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"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + 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 + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.designer.cs new file mode 100644 index 00000000..30d4244f --- /dev/null +++ b/SGGL/FineUIPro.Web/Transfer/StaticEquipmentDataIn.aspx.designer.cs @@ -0,0 +1,123 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.Transfer { + + + public partial class StaticEquipmentDataIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// gvErrorInfo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvErrorInfo; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index f2c2e849..37de607d 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -76,7 +76,7 @@ - + diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 1c236fe9..0801de76 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -2360,6 +2360,12 @@ namespace Model partial void InsertTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); partial void UpdateTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); partial void DeleteTransfer_PunchlistFrom(Transfer_PunchlistFrom instance); + partial void InsertTransfer_RotatingEquipment(Transfer_RotatingEquipment instance); + partial void UpdateTransfer_RotatingEquipment(Transfer_RotatingEquipment instance); + partial void DeleteTransfer_RotatingEquipment(Transfer_RotatingEquipment instance); + partial void InsertTransfer_StaticEquipment(Transfer_StaticEquipment instance); + partial void UpdateTransfer_StaticEquipment(Transfer_StaticEquipment instance); + partial void DeleteTransfer_StaticEquipment(Transfer_StaticEquipment instance); partial void InsertTransfer_Telecom(Transfer_Telecom instance); partial void UpdateTransfer_Telecom(Transfer_Telecom instance); partial void DeleteTransfer_Telecom(Transfer_Telecom instance); @@ -8774,6 +8780,22 @@ namespace Model } } + public System.Data.Linq.Table Transfer_RotatingEquipment + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table Transfer_StaticEquipment + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Transfer_Telecom { get @@ -370477,6 +370499,514 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_RotatingEquipment")] + public partial class Transfer_RotatingEquipment : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _RotatingEquipment; + + private string _SYSTEM; + + private string _Subsystem; + + private string _TestPackage; + + private System.Nullable _TestPackageSTART; + + private System.Nullable _TestPackageFINISH; + + private string _MechanicalFINALStatus; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnRotatingEquipmentChanging(string value); + partial void OnRotatingEquipmentChanged(); + partial void OnSYSTEMChanging(string value); + partial void OnSYSTEMChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTestPackageChanging(string value); + partial void OnTestPackageChanged(); + partial void OnTestPackageSTARTChanging(System.Nullable value); + partial void OnTestPackageSTARTChanged(); + partial void OnTestPackageFINISHChanging(System.Nullable value); + partial void OnTestPackageFINISHChanged(); + partial void OnMechanicalFINALStatusChanging(string value); + partial void OnMechanicalFINALStatusChanged(); + #endregion + + public Transfer_RotatingEquipment() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RotatingEquipment", DbType="NVarChar(50)")] + public string RotatingEquipment + { + get + { + return this._RotatingEquipment; + } + set + { + if ((this._RotatingEquipment != value)) + { + this.OnRotatingEquipmentChanging(value); + this.SendPropertyChanging(); + this._RotatingEquipment = value; + this.SendPropertyChanged("RotatingEquipment"); + this.OnRotatingEquipmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SYSTEM", DbType="NVarChar(50)")] + public string SYSTEM + { + get + { + return this._SYSTEM; + } + set + { + if ((this._SYSTEM != value)) + { + this.OnSYSTEMChanging(value); + this.SendPropertyChanging(); + this._SYSTEM = value; + this.SendPropertyChanged("SYSTEM"); + this.OnSYSTEMChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackage", DbType="NVarChar(50)")] + public string TestPackage + { + get + { + return this._TestPackage; + } + set + { + if ((this._TestPackage != value)) + { + this.OnTestPackageChanging(value); + this.SendPropertyChanging(); + this._TestPackage = value; + this.SendPropertyChanged("TestPackage"); + this.OnTestPackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageSTART", DbType="DateTime")] + public System.Nullable TestPackageSTART + { + get + { + return this._TestPackageSTART; + } + set + { + if ((this._TestPackageSTART != value)) + { + this.OnTestPackageSTARTChanging(value); + this.SendPropertyChanging(); + this._TestPackageSTART = value; + this.SendPropertyChanged("TestPackageSTART"); + this.OnTestPackageSTARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageFINISH", DbType="DateTime")] + public System.Nullable TestPackageFINISH + { + get + { + return this._TestPackageFINISH; + } + set + { + if ((this._TestPackageFINISH != value)) + { + this.OnTestPackageFINISHChanging(value); + this.SendPropertyChanging(); + this._TestPackageFINISH = value; + this.SendPropertyChanged("TestPackageFINISH"); + this.OnTestPackageFINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MechanicalFINALStatus", DbType="NVarChar(50)")] + public string MechanicalFINALStatus + { + get + { + return this._MechanicalFINALStatus; + } + set + { + if ((this._MechanicalFINALStatus != value)) + { + this.OnMechanicalFINALStatusChanging(value); + this.SendPropertyChanging(); + this._MechanicalFINALStatus = value; + this.SendPropertyChanged("MechanicalFINALStatus"); + this.OnMechanicalFINALStatusChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_StaticEquipment")] + public partial class Transfer_StaticEquipment : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _StaticEquipment; + + private string _SYSTEM; + + private string _Subsystem; + + private string _TestPackage; + + private System.Nullable _TestPackageSTART; + + private System.Nullable _TestPackageFINISH; + + private string _MechanicalFINALStatus; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnStaticEquipmentChanging(string value); + partial void OnStaticEquipmentChanged(); + partial void OnSYSTEMChanging(string value); + partial void OnSYSTEMChanged(); + partial void OnSubsystemChanging(string value); + partial void OnSubsystemChanged(); + partial void OnTestPackageChanging(string value); + partial void OnTestPackageChanged(); + partial void OnTestPackageSTARTChanging(System.Nullable value); + partial void OnTestPackageSTARTChanged(); + partial void OnTestPackageFINISHChanging(System.Nullable value); + partial void OnTestPackageFINISHChanged(); + partial void OnMechanicalFINALStatusChanging(string value); + partial void OnMechanicalFINALStatusChanged(); + #endregion + + public Transfer_StaticEquipment() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StaticEquipment", DbType="NVarChar(50)")] + public string StaticEquipment + { + get + { + return this._StaticEquipment; + } + set + { + if ((this._StaticEquipment != value)) + { + this.OnStaticEquipmentChanging(value); + this.SendPropertyChanging(); + this._StaticEquipment = value; + this.SendPropertyChanged("StaticEquipment"); + this.OnStaticEquipmentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SYSTEM", DbType="NVarChar(50)")] + public string SYSTEM + { + get + { + return this._SYSTEM; + } + set + { + if ((this._SYSTEM != value)) + { + this.OnSYSTEMChanging(value); + this.SendPropertyChanging(); + this._SYSTEM = value; + this.SendPropertyChanged("SYSTEM"); + this.OnSYSTEMChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Subsystem", DbType="NVarChar(50)")] + public string Subsystem + { + get + { + return this._Subsystem; + } + set + { + if ((this._Subsystem != value)) + { + this.OnSubsystemChanging(value); + this.SendPropertyChanging(); + this._Subsystem = value; + this.SendPropertyChanged("Subsystem"); + this.OnSubsystemChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackage", DbType="NVarChar(50)")] + public string TestPackage + { + get + { + return this._TestPackage; + } + set + { + if ((this._TestPackage != value)) + { + this.OnTestPackageChanging(value); + this.SendPropertyChanging(); + this._TestPackage = value; + this.SendPropertyChanged("TestPackage"); + this.OnTestPackageChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageSTART", DbType="DateTime")] + public System.Nullable TestPackageSTART + { + get + { + return this._TestPackageSTART; + } + set + { + if ((this._TestPackageSTART != value)) + { + this.OnTestPackageSTARTChanging(value); + this.SendPropertyChanging(); + this._TestPackageSTART = value; + this.SendPropertyChanged("TestPackageSTART"); + this.OnTestPackageSTARTChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TestPackageFINISH", DbType="DateTime")] + public System.Nullable TestPackageFINISH + { + get + { + return this._TestPackageFINISH; + } + set + { + if ((this._TestPackageFINISH != value)) + { + this.OnTestPackageFINISHChanging(value); + this.SendPropertyChanging(); + this._TestPackageFINISH = value; + this.SendPropertyChanged("TestPackageFINISH"); + this.OnTestPackageFINISHChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MechanicalFINALStatus", DbType="NVarChar(50)")] + public string MechanicalFINALStatus + { + get + { + return this._MechanicalFINALStatus; + } + set + { + if ((this._MechanicalFINALStatus != value)) + { + this.OnMechanicalFINALStatusChanging(value); + this.SendPropertyChanging(); + this._MechanicalFINALStatus = value; + this.SendPropertyChanged("MechanicalFINALStatus"); + this.OnMechanicalFINALStatusChanged(); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Transfer_Telecom")] public partial class Transfer_Telecom : INotifyPropertyChanging, INotifyPropertyChanged { diff --git a/SGGL/WebAPI/WebAPI.csproj.user b/SGGL/WebAPI/WebAPI.csproj.user index 4edb5e0f..6bc24ada 100644 --- a/SGGL/WebAPI/WebAPI.csproj.user +++ b/SGGL/WebAPI/WebAPI.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true