From 47e63fb70641a9fc5819ac727ba77be71f2417ee Mon Sep 17 00:00:00 2001 From: "754998852@qq.com" <754998852@qq.com> Date: Fri, 26 Jul 2024 09:38:28 +0800 Subject: [PATCH] =?UTF-8?q?=E7=A7=BB=E4=BA=A4=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_WH_V2024-07-26-phf.sql | 26 ++ .../Excel/DataIn/Firefighting导入模板.xls | Bin 22016 -> 21504 bytes .../File/Excel/DataIn/Plumbing导入模板.xls | Bin 22016 -> 21504 bytes .../File/Excel/DataIn/Telecom导入模板.xls | Bin 22016 -> 21504 bytes SGGL/FineUIPro.Web/Transfer/Firefighting.aspx | 26 +- .../Transfer/Firefighting.aspx.cs | 25 +- .../Transfer/Firefighting.aspx.designer.cs | 22 +- .../Transfer/FirefightingDataIn.aspx.cs | 132 +++++----- SGGL/FineUIPro.Web/Transfer/Plumbing.aspx | 28 +- SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs | 17 +- .../Transfer/Plumbing.aspx.designer.cs | 22 +- .../Transfer/PlumbingDataIn.aspx.cs | 142 ++++++----- SGGL/FineUIPro.Web/Transfer/Telecom.aspx | 29 ++- SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs | 24 +- .../Transfer/Telecom.aspx.designer.cs | 22 +- .../Transfer/TelecomDataIn.aspx.cs | 151 ++++++----- SGGL/Model/Model.cs | 240 ++++++++++++++++++ 17 files changed, 597 insertions(+), 309 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_WH_V2024-07-26-phf.sql diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-07-26-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-07-26-phf.sql new file mode 100644 index 00000000..a4a87d11 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-07-26-phf.sql @@ -0,0 +1,26 @@ +ALTER TABLE Transfer_Firefighting ADD Installation nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Firefighting ADD Debugging nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Firefighting ADD Acceptancecheck nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Telecom ADD Installation nvarchar(50) NULL +GO +ALTER TABLE Transfer_Telecom ADD Communication nvarchar(50) NULL +GO +ALTER TABLE Transfer_Telecom ADD CableLaying nvarchar(50) NULL +GO +ALTER TABLE Transfer_Telecom ADD FunctionTest nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Plumbing ADD Ndt nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Plumbing ADD Flushing nvarchar(50) NULL +GO + +ALTER TABLE Transfer_Plumbing ADD RunningTest nvarchar(50) NULL +GO diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Firefighting导入模板.xls index 7163bb6a76a3e5e5838a2977662634760b6b699f..d79f250d0d87126573c33de1125ac1b1dc0e3eb8 100644 GIT binary patch delta 1796 zcmaJ?TTGl)5dO~3zZaIvvdflIs_ar)q*M#l0@_fzun3e8vQ!#l)s#zHY^2msG^JJ- zqR~FqJ($+pi`s-HUQ*X*p-B^cGCtr96Qha7>%)>rqD@=;=KQ-$6N%^KT;`iOGxN{P zIsf!~YI;tcZ&6#X?EO@!yR^%Cx#-sF>Z*(y0JW*NtP%Cfpq;eGiUzNo53GE@q_&X} z)l+uDx){^f?dR37o^n0w@)1t!e_Zv&Zm2OF#W+sl8JyG&?qPk=-C}<*n6A~|xIfqD zJeB&I=Z@4ZPpd0+u;_;J<@4;yY6+gK-W54Cjb?C>3_LUmUGCi(?)6}os?hDFhadCM%NdKo zJ{<^}99mAgT*Lu-{`VG1W+WROFHt4<=|EK$KkE(QtT1w|6KBT1TuxmI)fA_ytEaBe&ZsuPyP%?+Q@^z5S)QFr zirJ@^JHC3f5Nbb5`4lEGgfaFZ?vAsx$B_@!!8#wt(->txPH2>+NOdFZNAZ+7Gj8?~ z&QA~t<*LhJKi#$Q9B7{Xv*I<{BBxp3 z=n5a&T)Bq2z@Tnkqup@hSHDBUDy9)90DvULYsrm~{UZ_)#>H8bASL<})1 zxk*e_)8m5L5jDo-=@ L?dC1I+VkDNalTHw delta 1880 zcmaJ?ZA@EL7=F&}z5ReeKVfBjv_;q$NZJi#E+V-Nl#dQd2V};X44I0WFhaJOz(iYP zjQ-Gs@RE$pKU@4WbtYg(d7k%u z-t(UKz2`Q4Nu)1}xpq;%{N!~Z8c0*#uBZd>AeYO@xrf(#3wZhPGh$wyDEZ;s$rJU- zU&L-Uq-jP?DPMKbJ@s{Qo@TUHwPL1M=pQZYus}@VC5(fj)~6_Gby zt>1WhL?sn_N9(Md+Zzg(a@tcXTLQ&w#s(j%rDNXmJw{K~&32Xva7CtTWv_yT(%9)u zZzxr3hRXNVVfe}|-0sc3k_VXo+wFRoU*g!z&u--l{;qZZS-TIjGMV+y05X;q^?c@A z@9t8{hCEsqn*=S@lo=>ypkJ%YGQWk=0p)X@CZiqdd#wsGe?%>c?F->#4=3I0ydgXk z@2YW(Ac`T3z{{xWXgB(h;5m$5?0_&~6#WP?bsA$lU%@GqKy;!R1L)+@j2PMwK`YN@ z?BmNMhVeA}kFa3?qfED92VLy)waQggUZW8t4LZt-2wEi7jh8XW^Az9J7x<3lPy{FL zc2HBSvB<(%*V}-%I%zbP6hT^weHi*E;DiDdugO$-Trb_g3R@nhGu?q>RW%!|1`Vh* zF_cmc3dqm^$A(?u+i9#{REz}|OLF{zVEciGI0JWl`tNJ16L#w)$S6I2bvJyXYP@VH{;H{6-h2BWYVH`y8*1WQu;|RCy ztNBBMqiOh5c#Pw*oIm`g&dF+C5fNB~?1{WZ8&jrUCEqR_NeArVJAI{PRwR%2Y=a=P_e>Adkazj}UiK$)j ziwDbxKNj=-<+e%X=3hVF7|2xjhZM(JF2_#U+!}=w0cuNlt(;_*B|V9Q6jAMzPDI2K zEhn1XX?B!R-{r~o9*gvQBHSpO9mNz*@-sgHCBhK8{8~7gQTcyOuG3@RP1Gmp$Y3K) vB^qdPuwg!V+A6Q`B|#Va;+bp7c0t)eoz@brjBBV=*dF5>xE~SPH~jv;G2?5Z diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Plumbing导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Plumbing导入模板.xls index 766efdd1ba145a70f52807a9cc7c4fd2a5f4d07d..59b1372ade231ee24b1e4e92456f1d3edffdcbbf 100644 GIT binary patch delta 881 zcmYLIT}YEr7=F*UZ{Mf3%}qz9m4En`U8I#imD=3a)HT+oLm`MvTUw}#T#-d;1l3Js zdkZ2AqHYu-tM4)@F9M^B=q3z<=%Q`{K`#?(J!g{R@Sby?=RNOp&i9=2O+FQqGh(Vq zl)Y$P5TcUJ$_?w^WHKqEf{3b&hf2S=)2k-bA?x!ep|!PdOQIYJ7mukE$^kd8spF!L z$IO?_S)f<=w|SRMBQZo#8lf0npcvO^eSBYQQlIs%RPh(>Bj3~u`Ha5J_^!8@jRtE# zv*@V3s^kz|bmZ{c+%iiB2tfssDB&Z{0?kL4Mn10^F=vI%ST3C`Qa-eB%-y2Y{W9j< zW<@s%xql|V@-7@SkqDBPB9uYGM?-X;Mrn{v<3IysA<+q91Z|xt#=0mL#3@Nxlu56f zdC*s#r9iD5$7*clX#Q@I6jJGmltFuMOJfC@?(8%+k%_wV(^y5_R$go? za@?}7v!vLt36a8jdnL^Gw0D?1W{K)v3(gg)wjb4hJl)l77xcQ{O_(lxVH6g!K-b6auFwZN6 z!L68haK*!P79K}oV3baR>wvYz;Lag8fL@wA3O)!NM<%Ze!wDqfAf+y>R&fsFl>dR? zNB+Z!K-muY05>6PL0AzIXJfP@90)uW%0)Pha9}R=K!cn0dWG&i?)MqngCzJfFchicH*(>`iMmdGW$ zyGIQ*v?NkY}T7=C8FyLLaD*`Pb+A3;Y zAR=IMp%*}rr-z9CfznneVQ)wT9}u}AZXnb{5Xu1wZXEb1HP5V_nj#MDXlD0$=KY%Y zeP^rJMfH|gnGpNepV|~+M49qR?=XP7jYdPygZzGE2d^J}Uet_p9idYTH%E)#iv!%K zswJZ$-%G1MjCVv$Etzkb50Ktcznk%0K8QuUg0oOb>!d1LA+>5v7`IN`epr2HeI3{m zz%Hx^wc_s%+@@Be;(;!A%Rg!M^cyj(Apmh6alFL2#PK8?x36Q?8n!6^u8aV0Mur^Q zu_5dB7P`>p2Zz+DXt#u|UXKn}Ov(%FrTkD+9!>dx$7?&`uxIBVJV5@paOi%1jdsW{ z|C^^FPd;={emT&EW$ggy@Kzv?KYx1Tr2AF$Kv2~OBW9YsP;31$4^4UKhrXEm^I&yA zUUbxjl>Qr{llwvSS!z>6RCl_+QbH2*C?N__!Wmpb88(V|0Wab;t}m0b zkwFdx&SS`84@46t8Hr7*OtCU9Q?&ykg)z(`#W98{j3a>~oMU*5WfI5mEagkwn8j(* z}4!adx^75cjvvGq%K>Dk!Z0bEhKPQQyIL93!InO6=zt}26iKejY(BckM8#I zaQpp0F{OS@7lo~+ran&I=<0-ofwy(&9Gk&5mfShs*~UKjaJ;vT4eISv@ytN@!%&lj z4AKeUQ>QZrW47=Bvl@^g+5-G+mMfWDCCyV>_>0kL5yum2BEfX(K$}Ps8TXKnNVi#Y z&!C=e#wId}c(xX@FwJx{k@lNqf_IQWZk~>Jpk(FrjnZZ$UFVnx;B$7GPRk7J+_p0V zXMWo;TQU}&@!IWMYB-F4gkdeH)b!Jp9|PO1BZ0amJ{1u!d>Z7#>)y~u+Ykx(gig1< zG3}`X-S;3Dde%diL%%JK4RQECb#&YJ(ny|Ws@WlNRjar3wC?}VlhymxSY`L2>_?(D zGu)%oq<>R7CEAs)uEuIY_K3UdM{kN+zT1CR?)~DMLwUC^KPbf=6)y~^@j}#MSapg{ z7oJdy1xKu@^}?g!YRl65eDjiHRsB+kkLt=Lv51T8-E)u$Le`Vd)#qG;e?t9Tos03W ys7}m{(%gtzog1kY%a*>e*M&-EXWTD~6GGMJ9CfDkty$z4kXiEdB2Q diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/Telecom导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/Telecom导入模板.xls index b118a026357e82947168f38d50f0bd933e11790c..963b2b7b586184c0f91080cd48c2b4967a9188d0 100644 GIT binary patch delta 1674 zcmaJ?ZD?Cn7=F&py}4bwG))@2v}%*+)_qiIhTFQ8TGM1}x>7<~>n4J(S-Z)kYs;2N ztJ8D{Qy9Y5Q`npeV=(AY{JQ>j6($OT_@kg!kO`YV_G=TTICSwj_vQ;N=5TV)^Sqz; zecznSzAt7M#OW@v_T$ID6k@$JwAa1&3Wb8&tpGMy?`oss%!odxk9$8__@(uapO(cs z3gU7`&ud*tc~^f`ydYnZPF!n2CDcMA2uZ!+m?l_z|mhT1a4XpwjXSd{a=ZgU9)@sRw% z*Pd@A8M%faXj!x`E8D!k#LxTvXKT;aLT|VEKox%_d?gHhmCZL)@s7U32h04ygN}X& z_47g8R}w5?glRRG5@KdfLQBZTBe774UsK{gEhegOvIA4W(J%9l+I-W0_%@qoAl#8H z{$!JVQl%?fh8zv~l0UVA)G0u-T>f8aXJ94U#-iu*D@q?JO78|zqFE*y_BENz@`T1> zPx}LQ4>hMGj?es@&&h3=AhPncLo9QCY)*i13;f(M3~TQ_AulDmwXHX;8wo=*F9saj_3HfbrMucQEb-Cwq z&<71VUcqYCN#Lux3f3sum~7}8p2P~sxKxc2DL`$`eGA-#G1aDm}oSnF__9@U$iD_EbD(}W&vyCocx*jzwf`D z^Ph7jHz#rz#dL?*wy^)I5Iaay-l%Q@uvRD(q};>bJB#|l!N1IA6jidiwb9BiA40?V-#R3OAbe=nH8w_why`Va1T74dMYMT=$ zvI$>mSZaV;;@}mVaMxbqJr$^2C&tHJhkcF%S5PeINiL|Sn0U(ue$0v`1V{e+Y7^%?*@w4&Z@%&Gb`vanzmKs~M9+`^1sjbW> z;<*Op1B))%oywc-`Cn~KG3G>&`2ekTeI>$lq`SUk6gGx2iU@0UQ@uzc%`$?1+y&vP zHU781fQJ(N)fYHI-|Tg1qOXqr$0Eykfu? zys_l^9Y8F(Y8`+zylQEljm}%3oNc~m4~y&H!DWq6cYk8P;Y>$xA^auY<_OpQtKKBR z(KK8VVP`_@&JSP91-X2SA^{&Q^hX+Hv32tDU|%_8@8nzOu_*SqR!uT{HD?~+?VXE@ zS!wSXO5=6I`b~z)ZHC-+s!RStndGZ8sivr05c!*slb2qy;Zmm#B`Vey4t^|V2C9rR zik&<8>0o~AK%+wGwBM1=bkuv7>0Hz@I}N3GQ9?B-mrjUzT1dBqa$ekX{Fb-!1-g-L zYnC0eF@a}zZ=ZsaVAb6XvybIf{x4aq=Wh7;A4P|Un%$5?)=Xwnmq&L_key8BuVgv| YEe~1rciPOG!vSI3$0u($63o8)4{@+%7ytkO diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx index 110128f9..d5b7e303 100644 --- a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx @@ -26,13 +26,20 @@ - + + + + + + + <%-- - + --%> @@ -64,10 +71,17 @@ - - + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs index c18a64d4..5bc6a4b7 100644 --- a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.cs @@ -40,22 +40,27 @@ namespace FineUIPro.Web.Transfer strSql += " AND Firefighting like @Firefighting"; listStr.Add(new SqlParameter("@Firefighting", "%" + this.txtFirefighting.Text.Trim() + "%")); } - if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) - { - strSql += " AND Test_Package_START >= @InspectionDateA"; - listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); - } - if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) - { - strSql += " AND Test_Package_START <= @InspectionDateZ"; - listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); - } + //if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + //{ + // strSql += " AND Test_Package_START >= @InspectionDateA"; + // listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + //} + //if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + //{ + // strSql += " AND Test_Package_START <= @InspectionDateZ"; + // listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + //} if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim())) { strSql += " AND SystemName like @SystemName"; listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%")); } + if (!string.IsNullOrEmpty(ddStatus.SelectedValue)) + { + strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' "; + } + strSql += " order by Firefighting "; SqlParameter[] parameter = listStr.ToArray(); diff --git a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs index fe469cc9..7328b1f3 100644 --- a/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Firefighting.aspx.designer.cs @@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer protected global::FineUIPro.TextBox txtSystem; /// - /// txtStarTime 控件。 + /// ddStatus 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtStarTime; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtEndTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndTime; + protected global::FineUIPro.DropDownList ddStatus; /// /// btnSearch 控件。 diff --git a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs index c43a1635..2434908f 100644 --- a/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/FirefightingDataIn.aspx.cs @@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer { for (int i = 1; i < ir; i++) { - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) + string row4 = pds.Rows[i][0].ToString(); + if (string.IsNullOrEmpty(row4)) { - try - { - DateTime date = Convert.ToDateTime(row4.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; - } - } - string row5 = pds.Rows[i][5].ToString(); - if (!string.IsNullOrEmpty(row5)) - { - try - { - DateTime date = Convert.ToDateTime(row5.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; - } + result += (i + 2).ToString() + "," + "Firefighting" + "," + "不能为空!" + "|"; } + } if (!string.IsNullOrEmpty(result)) { @@ -331,10 +313,10 @@ namespace FineUIPro.Web.Transfer { if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { - //查询第一列,没查到的情况下作导入处理 - var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId); - if (modelOnly == null) - { + ////查询第一列,没查到的情况下作导入处理 + //var modelOnly = Funs.DB.Transfer_Firefighting.FirstOrDefault(x => x.Firefighting == pds.Rows[i][0].ToString().Trim() && x.ProjectId == CurrUser.LoginProjectId); + //if (modelOnly == null) + //{ Model.Transfer_Firefighting model = new Model.Transfer_Firefighting(); model.Id = Guid.NewGuid().ToString(); model.ProjectId = CurrUser.LoginProjectId; @@ -342,44 +324,72 @@ namespace FineUIPro.Web.Transfer model.SystemName = pds.Rows[i][1].ToString().Trim(); model.Subsystem = pds.Rows[i][2].ToString().Trim(); model.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - model.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - model.Test_Package_FINISH = t2; - model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - if (model.FINAL_Status.ToLower() == "finished") - { - model.CompleteTime = DateTime.Now; - } - list.Add(model); - } - else + var obj1 = model.Installation = pds.Rows[i][4].ToString().Trim(); + var obj2 = model.Debugging = pds.Rows[i][5].ToString().Trim(); + var obj3 = model.Acceptancecheck = pds.Rows[i][6].ToString().Trim(); + #region 判断状态 + var listObj = new List(); + listObj.Add(obj1); + listObj.Add(obj2); + listObj.Add(obj3); + //全是NA或Completed 状态是Completed + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3) { - //修改 - modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim(); - modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); - modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); - modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - modelOnly.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - modelOnly.Test_Package_FINISH = t2; - - //更改前不是finished,更改后是finished的,才修改实际完成时间 - if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") - { - modelOnly.CompleteTime = DateTime.Now; - } - modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - //if (modelOnly.FINAL_Status.ToLower() == "finished") - //{ - // modelOnly.CompleteTime = DateTime.Now; - //} - Funs.DB.SubmitChanges(); + model.FINAL_Status = "Completed"; + list.Add(model); + continue; } + + + //如果全是Not Start 就是 Not Start + if (listObj.Where(x => x == "Not Start").ToList().Count == 3) + { + model.FINAL_Status = "Not Start"; + list.Add(model); + continue; + } + + //如果其中有一项是In progress 或Not Start 是 In progress + if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1) + { + model.FINAL_Status = "In progress"; + list.Add(model); + continue; + } + + model.FINAL_Status = "Not Start"; + list.Add(model); + + #endregion + + list.Add(model); + //} + //else + //{ + // //修改 + // modelOnly.Firefighting = pds.Rows[i][0].ToString().Trim(); + // modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + // modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + // modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + // DateTime t1, t2; + // if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + // modelOnly.Test_Package_START = t1; + // if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + // modelOnly.Test_Package_FINISH = t2; + + // //更改前不是finished,更改后是finished的,才修改实际完成时间 + // if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") + // { + // modelOnly.CompleteTime = DateTime.Now; + // } + // modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + // //if (modelOnly.FINAL_Status.ToLower() == "finished") + // //{ + // // modelOnly.CompleteTime = DateTime.Now; + // //} + // Funs.DB.SubmitChanges(); + //} } } if (list.Count > 0) diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx index 08a9ed31..89826672 100644 --- a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx @@ -26,13 +26,12 @@ - - - - - - + + + + + + @@ -64,10 +63,17 @@ - - + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs index cd19d616..9f5225f7 100644 --- a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.cs @@ -41,22 +41,19 @@ namespace FineUIPro.Web.Transfer strSql += " AND Plumbing like @Plumbing"; listStr.Add(new SqlParameter("@Plumbing", "%" + this.txtPlumbing.Text.Trim() + "%")); } - if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) - { - strSql += " AND Test_Package_START >= @InspectionDateA"; - listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); - } - if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) - { - strSql += " AND Test_Package_START <= @InspectionDateZ"; - listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); - } + if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim())) { strSql += " AND SystemName like @SystemName"; listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%")); } + if (!string.IsNullOrEmpty(ddStatus.SelectedValue)) + { + strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' "; + } + + strSql += " order by Plumbing "; SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); diff --git a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs index ae747e36..2a065db0 100644 --- a/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Plumbing.aspx.designer.cs @@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer protected global::FineUIPro.TextBox txtSystem; /// - /// txtStarTime 控件。 + /// ddStatus 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtStarTime; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtEndTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndTime; + protected global::FineUIPro.DropDownList ddStatus; /// /// btnSearch 控件。 diff --git a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs index 2f93eb19..da73af0e 100644 --- a/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PlumbingDataIn.aspx.cs @@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer { for (int i = 1; i < ir; i++) { - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) + string row4 = pds.Rows[i][0].ToString(); + if (string.IsNullOrEmpty(row4)) { - try - { - DateTime date = Convert.ToDateTime(row4.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; - } - } - string row5 = pds.Rows[i][5].ToString(); - if (!string.IsNullOrEmpty(row5)) - { - try - { - DateTime date = Convert.ToDateTime(row5.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; - } + result += (i + 2).ToString() + "," + "Plumbing" + "," + "不能为空!" + "|"; } + } if (!string.IsNullOrEmpty(result)) { @@ -332,55 +314,83 @@ namespace FineUIPro.Web.Transfer if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { //查询第一列,没查到的情况下作导入处理 - var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim() - && x.ProjectId == CurrUser.LoginProjectId); - if (modelOnly == null) + // var modelOnly = Funs.DB.Transfer_Plumbing.FirstOrDefault(x => x.Plumbing == pds.Rows[i][0].ToString().Trim() + //&& x.ProjectId == CurrUser.LoginProjectId); + // if (modelOnly == null) + // { + Model.Transfer_Plumbing model = new Model.Transfer_Plumbing(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Plumbing = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + var obj1 = model.Ndt = pds.Rows[i][4].ToString().Trim(); + var obj2 = model.Flushing = pds.Rows[i][5].ToString().Trim(); + var obj3 = model.RunningTest = pds.Rows[i][6].ToString().Trim(); + #region 判断状态 + var listObj = new List(); + listObj.Add(obj1); + listObj.Add(obj2); + listObj.Add(obj3); + //全是NA或Completed 状态是Completed + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 3) { - Model.Transfer_Plumbing model = new Model.Transfer_Plumbing(); - model.Id = Guid.NewGuid().ToString(); - model.ProjectId = CurrUser.LoginProjectId; - model.Plumbing = pds.Rows[i][0].ToString().Trim(); - model.SystemName = pds.Rows[i][1].ToString().Trim(); - model.Subsystem = pds.Rows[i][2].ToString().Trim(); - model.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - model.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - model.Test_Package_FINISH = t2; - - model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - if (model.FINAL_Status.ToLower() == "finished") - { - model.CompleteTime = DateTime.Now; - } + model.FINAL_Status = "Completed"; list.Add(model); + continue; } - else - { - //修改 - modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim(); - modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); - modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); - modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - modelOnly.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - modelOnly.Test_Package_FINISH = t2; - //更改前不是finished,更改后是finished的,才修改实际完成时间 - if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") - { - modelOnly.CompleteTime = DateTime.Now; - } - modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - //if (modelOnly.FINAL_Status.ToLower() == "finished") - //{ - // modelOnly.CompleteTime = DateTime.Now; - //} - Funs.DB.SubmitChanges(); + + //如果全是Not Start 就是 Not Start + if (listObj.Where(x => x == "Not Start").ToList().Count == 3) + { + model.FINAL_Status = "Not Start"; + list.Add(model); + continue; } + + //如果其中有一项是In progress 或Not Start 是 In progress + if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1) + { + model.FINAL_Status = "In progress"; + list.Add(model); + continue; + } + + model.FINAL_Status = "Not Start"; + list.Add(model); + + #endregion + + + list.Add(model); + //} + //else + //{ + // //修改 + // modelOnly.Plumbing = pds.Rows[i][0].ToString().Trim(); + // modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + // modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + // modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + // DateTime t1, t2; + // if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + // modelOnly.Test_Package_START = t1; + // if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + // modelOnly.Test_Package_FINISH = t2; + + // //更改前不是finished,更改后是finished的,才修改实际完成时间 + // if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") + // { + // modelOnly.CompleteTime = DateTime.Now; + // } + // modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + // //if (modelOnly.FINAL_Status.ToLower() == "finished") + // //{ + // // modelOnly.CompleteTime = DateTime.Now; + // //} + // Funs.DB.SubmitChanges(); + //} } } if (list.Count > 0) diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx index 4868ebb4..9304dda6 100644 --- a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx @@ -26,13 +26,19 @@ - + + + + + + <%-- - + --%> @@ -64,10 +70,21 @@ - - + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs index 2043236e..0ba55acc 100644 --- a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.cs @@ -41,21 +41,25 @@ namespace FineUIPro.Web.Transfer strSql += " AND Telecom like @Telecom"; listStr.Add(new SqlParameter("@Telecom", "%" + this.txtTelecom.Text.Trim() + "%")); } - if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) - { - strSql += " AND Test_Package_START >= @InspectionDateA"; - listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); - } - if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) - { - strSql += " AND Test_Package_START <= @InspectionDateZ"; - listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); - } + //if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) + //{ + // strSql += " AND Test_Package_START >= @InspectionDateA"; + // listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + //} + //if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) + //{ + // strSql += " AND Test_Package_START <= @InspectionDateZ"; + // listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + //} if (!string.IsNullOrEmpty(this.txtSystem.Text.Trim())) { strSql += " AND SystemName like @SystemName"; listStr.Add(new SqlParameter("@SystemName", "%" + this.txtSystem.Text.Trim() + "%")); } + if (!string.IsNullOrEmpty(ddStatus.SelectedValue)) + { + strSql += " And FINAL_Status='" + ddStatus.SelectedValue + "' "; + } strSql += " order by Telecom "; diff --git a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs index 4518bcf3..965ca7b5 100644 --- a/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/Telecom.aspx.designer.cs @@ -78,31 +78,13 @@ namespace FineUIPro.Web.Transfer protected global::FineUIPro.TextBox txtSystem; /// - /// txtStarTime 控件。 + /// ddStatus 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.DatePicker txtStarTime; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtEndTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndTime; + protected global::FineUIPro.DropDownList ddStatus; /// /// btnSearch 控件。 diff --git a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs index d6aa2dea..9c540145 100644 --- a/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/TelecomDataIn.aspx.cs @@ -130,7 +130,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 7); + AddDatasetToSQL(ds.Tables[0], 8); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -168,30 +168,12 @@ namespace FineUIPro.Web.Transfer { for (int i = 1; i < ir; i++) { - string row4 = pds.Rows[i][4].ToString(); - if (!string.IsNullOrEmpty(row4)) + string row4 = pds.Rows[i][0].ToString(); + if (string.IsNullOrEmpty(row4)) { - try - { - DateTime date = Convert.ToDateTime(row4.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package START" + "," + "[" + row4 + "]错误!不是日期格式!" + "|"; - } - } - string row5 = pds.Rows[i][5].ToString(); - if (!string.IsNullOrEmpty(row5)) - { - try - { - DateTime date = Convert.ToDateTime(row5.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "Test Package FINISH" + "," + "[" + row5 + "]错误!不是日期格式!" + "|"; - } + result += (i + 2).ToString() + "," + "Telecom" + "," + "不能为空!" + "|"; } + } if (!string.IsNullOrEmpty(result)) { @@ -298,7 +280,7 @@ namespace FineUIPro.Web.Transfer oleDBConn.Close(); oleDBConn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 7); + AddDatasetToSQL2(ds.Tables[0], 8); } catch (Exception ex) { @@ -331,56 +313,87 @@ namespace FineUIPro.Web.Transfer { if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { - //查询第一列,没查到的情况下作导入处理 - var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim() - && x.ProjectId == CurrUser.LoginProjectId); - if (modelOnly == null) + // //查询第一列,没查到的情况下作导入处理 + // var modelOnly = Funs.DB.Transfer_Telecom.FirstOrDefault(x => x.Telecom == pds.Rows[i][0].ToString().Trim() + //&& x.ProjectId == CurrUser.LoginProjectId); + // if (modelOnly == null) + // { + Model.Transfer_Telecom model = new Model.Transfer_Telecom(); + model.Id = Guid.NewGuid().ToString(); + model.ProjectId = CurrUser.LoginProjectId; + model.Telecom = pds.Rows[i][0].ToString().Trim(); + model.SystemName = pds.Rows[i][1].ToString().Trim(); + model.Subsystem = pds.Rows[i][2].ToString().Trim(); + model.Test_Package = pds.Rows[i][3].ToString().Trim(); + var obj1 = model.Installation = pds.Rows[i][4].ToString().Trim(); + var obj2 = model.Communication = pds.Rows[i][5].ToString().Trim(); + var obj3 = model.CableLaying = pds.Rows[i][6].ToString().Trim(); + var obj4 = model.FunctionTest = pds.Rows[i][7].ToString().Trim(); + #region 判断状态 + var listObj = new List(); + listObj.Add(obj1); + listObj.Add(obj2); + listObj.Add(obj3); + listObj.Add(obj4); + //全是NA或Completed 状态是Completed + if (listObj.Where(x => x == "NA" || x == "Completed").ToList().Count == 4) { - Model.Transfer_Telecom model = new Model.Transfer_Telecom(); - model.Id = Guid.NewGuid().ToString(); - model.ProjectId = CurrUser.LoginProjectId; - model.Telecom = pds.Rows[i][0].ToString().Trim(); - model.SystemName = pds.Rows[i][1].ToString().Trim(); - model.Subsystem = pds.Rows[i][2].ToString().Trim(); - model.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - model.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - model.Test_Package_FINISH = t2; - - model.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - if (model.FINAL_Status.ToLower() == "finished") - { - model.CompleteTime = DateTime.Now; - } + model.FINAL_Status = "Completed"; list.Add(model); + continue; } - else - { - //修改 - modelOnly.Telecom = pds.Rows[i][0].ToString().Trim(); - modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); - modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); - modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); - DateTime t1, t2; - if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) - modelOnly.Test_Package_START = t1; - if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) - modelOnly.Test_Package_FINISH = t2; - //更改前不是finished,更改后是finished的,才修改实际完成时间 - if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") - { - modelOnly.CompleteTime = DateTime.Now; - } - modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); - //if (modelOnly.FINAL_Status.ToLower() == "finished") - //{ - // modelOnly.CompleteTime = DateTime.Now; - //} - Funs.DB.SubmitChanges(); + + //如果全是Not Start 就是 Not Start + if (listObj.Where(x => x == "Not Start").ToList().Count == 4) + { + model.FINAL_Status = "Not Start"; + list.Add(model); + continue; } + + //如果其中有一项是In progress 或Not Start 是 In progress + if (listObj.Where(x => x == "In progress" || x == "Not Start").ToList().Count >= 1) + { + model.FINAL_Status = "In progress"; + list.Add(model); + continue; + } + + model.FINAL_Status = "Not Start"; + list.Add(model); + + #endregion + + + + list.Add(model); + //} + //else + //{ + // //修改 + // modelOnly.Telecom = pds.Rows[i][0].ToString().Trim(); + // modelOnly.SystemName = pds.Rows[i][1].ToString().Trim(); + // modelOnly.Subsystem = pds.Rows[i][2].ToString().Trim(); + // modelOnly.Test_Package = pds.Rows[i][3].ToString().Trim(); + // DateTime t1, t2; + // if (DateTime.TryParse(pds.Rows[i][4].ToString(), out t1) && !string.IsNullOrEmpty(pds.Rows[i][4].ToString())) + // modelOnly.Test_Package_START = t1; + // if (DateTime.TryParse(pds.Rows[i][5].ToString(), out t2) && !string.IsNullOrEmpty(pds.Rows[i][5].ToString())) + // modelOnly.Test_Package_FINISH = t2; + + // //更改前不是finished,更改后是finished的,才修改实际完成时间 + // if (modelOnly.FINAL_Status.ToLower() != "finished" && pds.Rows[i][6].ToString().Trim() == "finished") + // { + // modelOnly.CompleteTime = DateTime.Now; + // } + // modelOnly.FINAL_Status = pds.Rows[i][6].ToString().Trim(); + // //if (modelOnly.FINAL_Status.ToLower() == "finished") + // //{ + // // modelOnly.CompleteTime = DateTime.Now; + // //} + // Funs.DB.SubmitChanges(); + //} } } if (list.Count > 0) diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 62773263..91bd026b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -391581,6 +391581,12 @@ namespace Model private System.Nullable _CompleteTime; + private string _Installation; + + private string _Debugging; + + private string _Acceptancecheck; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -391605,6 +391611,12 @@ namespace Model partial void OnFINAL_StatusChanged(); partial void OnCompleteTimeChanging(System.Nullable value); partial void OnCompleteTimeChanged(); + partial void OnInstallationChanging(string value); + partial void OnInstallationChanged(); + partial void OnDebuggingChanging(string value); + partial void OnDebuggingChanged(); + partial void OnAcceptancecheckChanging(string value); + partial void OnAcceptancecheckChanged(); #endregion public Transfer_Firefighting() @@ -391812,6 +391824,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Installation", DbType="NVarChar(50)")] + public string Installation + { + get + { + return this._Installation; + } + set + { + if ((this._Installation != value)) + { + this.OnInstallationChanging(value); + this.SendPropertyChanging(); + this._Installation = value; + this.SendPropertyChanged("Installation"); + this.OnInstallationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Debugging", DbType="NVarChar(50)")] + public string Debugging + { + get + { + return this._Debugging; + } + set + { + if ((this._Debugging != value)) + { + this.OnDebuggingChanging(value); + this.SendPropertyChanging(); + this._Debugging = value; + this.SendPropertyChanged("Debugging"); + this.OnDebuggingChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Acceptancecheck", DbType="NVarChar(50)")] + public string Acceptancecheck + { + get + { + return this._Acceptancecheck; + } + set + { + if ((this._Acceptancecheck != value)) + { + this.OnAcceptancecheckChanging(value); + this.SendPropertyChanging(); + this._Acceptancecheck = value; + this.SendPropertyChanged("Acceptancecheck"); + this.OnAcceptancecheckChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -393451,6 +393523,12 @@ namespace Model private System.Nullable _CompleteTime; + private string _Ndt; + + private string _Flushing; + + private string _RunningTest; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -393475,6 +393553,12 @@ namespace Model partial void OnFINAL_StatusChanged(); partial void OnCompleteTimeChanging(System.Nullable value); partial void OnCompleteTimeChanged(); + partial void OnNdtChanging(string value); + partial void OnNdtChanged(); + partial void OnFlushingChanging(string value); + partial void OnFlushingChanged(); + partial void OnRunningTestChanging(string value); + partial void OnRunningTestChanged(); #endregion public Transfer_Plumbing() @@ -393682,6 +393766,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Ndt", DbType="NVarChar(50)")] + public string Ndt + { + get + { + return this._Ndt; + } + set + { + if ((this._Ndt != value)) + { + this.OnNdtChanging(value); + this.SendPropertyChanging(); + this._Ndt = value; + this.SendPropertyChanged("Ndt"); + this.OnNdtChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Flushing", DbType="NVarChar(50)")] + public string Flushing + { + get + { + return this._Flushing; + } + set + { + if ((this._Flushing != value)) + { + this.OnFlushingChanging(value); + this.SendPropertyChanging(); + this._Flushing = value; + this.SendPropertyChanged("Flushing"); + this.OnFlushingChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RunningTest", DbType="NVarChar(50)")] + public string RunningTest + { + get + { + return this._RunningTest; + } + set + { + if ((this._RunningTest != value)) + { + this.OnRunningTestChanging(value); + this.SendPropertyChanging(); + this._RunningTest = value; + this.SendPropertyChanged("RunningTest"); + this.OnRunningTestChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -395801,6 +395945,14 @@ namespace Model private System.Nullable _CompleteTime; + private string _Installation; + + private string _Communication; + + private string _CableLaying; + + private string _FunctionTest; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -395825,6 +395977,14 @@ namespace Model partial void OnFINAL_StatusChanged(); partial void OnCompleteTimeChanging(System.Nullable value); partial void OnCompleteTimeChanged(); + partial void OnInstallationChanging(string value); + partial void OnInstallationChanged(); + partial void OnCommunicationChanging(string value); + partial void OnCommunicationChanged(); + partial void OnCableLayingChanging(string value); + partial void OnCableLayingChanged(); + partial void OnFunctionTestChanging(string value); + partial void OnFunctionTestChanged(); #endregion public Transfer_Telecom() @@ -396032,6 +396192,86 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Installation", DbType="NVarChar(50)")] + public string Installation + { + get + { + return this._Installation; + } + set + { + if ((this._Installation != value)) + { + this.OnInstallationChanging(value); + this.SendPropertyChanging(); + this._Installation = value; + this.SendPropertyChanged("Installation"); + this.OnInstallationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Communication", DbType="NVarChar(50)")] + public string Communication + { + get + { + return this._Communication; + } + set + { + if ((this._Communication != value)) + { + this.OnCommunicationChanging(value); + this.SendPropertyChanging(); + this._Communication = value; + this.SendPropertyChanged("Communication"); + this.OnCommunicationChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CableLaying", DbType="NVarChar(50)")] + public string CableLaying + { + get + { + return this._CableLaying; + } + set + { + if ((this._CableLaying != value)) + { + this.OnCableLayingChanging(value); + this.SendPropertyChanging(); + this._CableLaying = value; + this.SendPropertyChanged("CableLaying"); + this.OnCableLayingChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_FunctionTest", DbType="NVarChar(50)")] + public string FunctionTest + { + get + { + return this._FunctionTest; + } + set + { + if ((this._FunctionTest != value)) + { + this.OnFunctionTestChanging(value); + this.SendPropertyChanging(); + this._FunctionTest = value; + this.SendPropertyChanged("FunctionTest"); + this.OnFunctionTestChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged;