From 03c6364f4779916604346b9bf24c81d6f81c30ae Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Fri, 28 Apr 2023 17:46:41 +0800 Subject: [PATCH] =?UTF-8?q?2023-04-28=20=E5=A4=A9=E8=BE=B0=E8=B4=A8?= =?UTF-8?q?=E9=87=8F=E6=8A=A5=E9=AA=8C=E7=A7=BB=E6=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_CWCEC/v17/.wsuo | Bin 0 -> 107008 bytes .vs/VSWorkspaceState.json | 7 + .../版本日志/SGGLDB_WH_2023-04-28-lpf.sql | 402 ++ SGGL/BLL/BLL.csproj | 13 + .../DataDistributionApproveService.cs | 145 + .../Comprehensive/DataDistributionService.cs | 4 +- .../DataReceivingApproveService.cs | 145 + .../Comprehensive/DataReceivingService.cs | 4 +- .../DesignChangeOrderApproveService.cs | 145 + .../Comprehensive/DesignChangeOrderService.cs | 4 +- .../DesignDetailsApproveService.cs | 152 + .../Comprehensive/DesignDetailsService.cs | 7 + .../DesignDrawingsApproveService.cs | 145 + .../Comprehensive/DesignDrawingsService.cs | 3 + .../InspectionEquipmentApproveService.cs | 145 + .../InspectionEquipmentService.cs | 7 +- .../InspectionMachineApproveService.cs | 145 + .../Comprehensive/InspectionMachineService.cs | 4 +- .../InspectionPersonApproveService.cs | 145 + .../Comprehensive/InspectionPersonService.cs | 2 + .../NCRManagementApproveService.cs | 145 + .../Comprehensive/NCRManagementService.cs | 2 + .../PressurePipeApproveService.cs | 145 + .../CQMS/Comprehensive/PressurePipeService.cs | 4 +- .../QualityAccidentApproveService.cs | 145 + .../Comprehensive/QualityAccidentService.cs | 2 + .../SiteVisaManagementApproveService.cs | 145 + .../SiteVisaManagementService.cs | 4 +- .../SpecialEquipmentApproveService.cs | 145 + .../Comprehensive/SpecialEquipmentService.cs | 4 +- SGGL/BLL/Common/Const.cs | 320 ++ .../CQMS/Comprehensive/DataDistribution.aspx | 28 +- .../Comprehensive/DataDistribution.aspx.cs | 56 +- .../DataDistribution.aspx.designer.cs | 81 +- .../DataDistributionApprove.aspx | 56 + .../DataDistributionApprove.aspx.cs | 79 + .../DataDistributionApprove.aspx.designer.cs | 80 + .../DataDistributionDataIn.aspx.cs | 232 +- .../Comprehensive/DataDistributionEdit.aspx | 36 +- .../DataDistributionEdit.aspx.cs | 385 +- .../DataDistributionEdit.aspx.designer.cs | 104 +- .../CQMS/Comprehensive/DataReceiving.aspx | 26 +- .../CQMS/Comprehensive/DataReceiving.aspx.cs | 57 +- .../DataReceiving.aspx.designer.cs | 81 +- .../Comprehensive/DataReceivingApprove.aspx | 56 + .../DataReceivingApprove.aspx.cs | 79 + .../DataReceivingApprove.aspx.designer.cs | 80 + .../Comprehensive/DataReceivingDataIn.aspx.cs | 59 +- .../CQMS/Comprehensive/DataReceivingEdit.aspx | 38 +- .../Comprehensive/DataReceivingEdit.aspx.cs | 286 +- .../DataReceivingEdit.aspx.designer.cs | 106 +- .../CQMS/Comprehensive/DesignChangeOrder.aspx | 26 +- .../Comprehensive/DesignChangeOrder.aspx.cs | 48 +- .../DesignChangeOrder.aspx.designer.cs | 93 +- .../DesignChangeOrderApprove.aspx | 56 + .../DesignChangeOrderApprove.aspx.cs | 79 + .../DesignChangeOrderApprove.aspx.designer.cs | 80 + .../DesignChangeOrderDataIn.aspx.cs | 59 +- .../Comprehensive/DesignChangeOrderEdit.aspx | 36 +- .../DesignChangeOrderEdit.aspx.cs | 320 +- .../DesignChangeOrderEdit.aspx.designer.cs | 104 +- .../CQMS/Comprehensive/DesignDetails.aspx | 24 +- .../CQMS/Comprehensive/DesignDetails.aspx.cs | 46 +- .../DesignDetails.aspx.designer.cs | 81 +- .../Comprehensive/DesignDetailsApprove.aspx | 56 + .../DesignDetailsApprove.aspx.cs | 79 + .../DesignDetailsApprove.aspx.designer.cs | 80 + .../CQMS/Comprehensive/DesignDetailsEdit.aspx | 35 +- .../Comprehensive/DesignDetailsEdit.aspx.cs | 314 +- .../DesignDetailsEdit.aspx.designer.cs | 96 +- .../CQMS/Comprehensive/DesignDrawings.aspx | 28 +- .../CQMS/Comprehensive/DesignDrawings.aspx.cs | 58 +- .../DesignDrawings.aspx.designer.cs | 89 +- .../Comprehensive/DesignDrawingsApprove.aspx | 56 + .../DesignDrawingsApprove.aspx.cs | 79 + .../DesignDrawingsApprove.aspx.designer.cs | 80 + .../DesignDrawingsDataIn.aspx.cs | 71 +- .../Comprehensive/DesignDrawingsEdit.aspx | 37 +- .../Comprehensive/DesignDrawingsEdit.aspx.cs | 442 +- .../DesignDrawingsEdit.aspx.designer.cs | 108 +- .../Comprehensive/GeneralPlanApproval.aspx | 16 +- .../Comprehensive/GeneralPlanApproval.aspx.cs | 20 - .../GeneralPlanApproval.aspx.designer.cs | 22 +- .../GeneralPlanApprovalEdit.aspx | 10 +- .../GeneralPlanApprovalEdit.aspx.cs | 16 +- .../GeneralPlanApprovalEdit.aspx.designer.cs | 22 +- .../Comprehensive/InspectionEquipment.aspx | 48 +- .../Comprehensive/InspectionEquipment.aspx.cs | 88 +- .../InspectionEquipment.aspx.designer.cs | 81 +- .../InspectionEquipmentApprove.aspx | 57 + .../InspectionEquipmentApprove.aspx.cs | 79 + ...nspectionEquipmentApprove.aspx.designer.cs | 80 + .../InspectionEquipmentDataIn.aspx.cs | 154 +- .../InspectionEquipmentEdit.aspx | 47 +- .../InspectionEquipmentEdit.aspx.cs | 434 +- .../InspectionEquipmentEdit.aspx.designer.cs | 128 +- .../CQMS/Comprehensive/InspectionMachine.aspx | 22 +- .../Comprehensive/InspectionMachine.aspx.cs | 46 +- .../InspectionMachine.aspx.designer.cs | 77 +- .../InspectionMachineApprove.aspx | 56 + .../InspectionMachineApprove.aspx.cs | 79 + .../InspectionMachineApprove.aspx.designer.cs | 80 + .../InspectionMachineDataIn.aspx.cs | 91 +- .../Comprehensive/InspectionMachineEdit.aspx | 37 +- .../InspectionMachineEdit.aspx.cs | 314 +- .../InspectionMachineEdit.aspx.designer.cs | 110 +- .../CQMS/Comprehensive/InspectionPerson.aspx | 26 +- .../Comprehensive/InspectionPerson.aspx.cs | 53 +- .../InspectionPerson.aspx.designer.cs | 85 +- .../InspectionPersonApprove.aspx | 56 + .../InspectionPersonApprove.aspx.cs | 79 + .../InspectionPersonApprove.aspx.designer.cs | 80 + .../InspectionPersonDataIn.aspx.cs | 181 +- .../Comprehensive/InspectionPersonEdit.aspx | 46 +- .../InspectionPersonEdit.aspx.cs | 482 +- .../InspectionPersonEdit.aspx.designer.cs | 119 +- .../CQMS/Comprehensive/MajorPlanApproval.aspx | 16 +- .../Comprehensive/MajorPlanApproval.aspx.cs | 20 - .../MajorPlanApproval.aspx.designer.cs | 22 +- .../Comprehensive/MajorPlanApprovalEdit.aspx | 12 +- .../MajorPlanApprovalEdit.aspx.cs | 16 +- .../MajorPlanApprovalEdit.aspx.designer.cs | 22 +- .../CQMS/Comprehensive/NCRManagement.aspx | 32 +- .../CQMS/Comprehensive/NCRManagement.aspx.cs | 48 +- .../NCRManagement.aspx.designer.cs | 89 +- .../Comprehensive/NCRManagementApprove.aspx | 56 + .../NCRManagementApprove.aspx.cs | 79 + .../NCRManagementApprove.aspx.designer.cs | 80 + .../Comprehensive/NCRManagementDataIn.aspx.cs | 59 +- .../CQMS/Comprehensive/NCRManagementEdit.aspx | 37 +- .../Comprehensive/NCRManagementEdit.aspx.cs | 329 +- .../NCRManagementEdit.aspx.designer.cs | 106 +- .../CQMS/Comprehensive/PressurePipe.aspx | 18 +- .../CQMS/Comprehensive/PressurePipe.aspx.cs | 45 +- .../PressurePipe.aspx.designer.cs | 69 +- .../Comprehensive/PressurePipeApprove.aspx | 56 + .../Comprehensive/PressurePipeApprove.aspx.cs | 79 + .../PressurePipeApprove.aspx.designer.cs | 80 + .../CQMS/Comprehensive/PressurePipeEdit.aspx | 35 +- .../Comprehensive/PressurePipeEdit.aspx.cs | 306 +- .../PressurePipeEdit.aspx.designer.cs | 98 +- .../CQMS/Comprehensive/QualityAccident.aspx | 22 +- .../Comprehensive/QualityAccident.aspx.cs | 45 +- .../QualityAccident.aspx.designer.cs | 71 +- .../Comprehensive/QualityAccidentApprove.aspx | 56 + .../QualityAccidentApprove.aspx.cs | 79 + .../QualityAccidentApprove.aspx.designer.cs | 80 + .../Comprehensive/QualityAccidentEdit.aspx | 36 +- .../Comprehensive/QualityAccidentEdit.aspx.cs | 298 +- .../QualityAccidentEdit.aspx.designer.cs | 102 +- .../Comprehensive/SiteVisaManagement.aspx | 22 +- .../Comprehensive/SiteVisaManagement.aspx.cs | 61 +- .../SiteVisaManagement.aspx.designer.cs | 81 +- .../SiteVisaManagementApprove.aspx | 56 + .../SiteVisaManagementApprove.aspx.cs | 79 + ...SiteVisaManagementApprove.aspx.designer.cs | 80 + .../SiteVisaManagementDataIn.aspx.cs | 127 +- .../Comprehensive/SiteVisaManagementEdit.aspx | 36 +- .../SiteVisaManagementEdit.aspx.cs | 291 +- .../SiteVisaManagementEdit.aspx.designer.cs | 104 +- .../CQMS/Comprehensive/SpecialEquipment.aspx | 18 +- .../Comprehensive/SpecialEquipment.aspx.cs | 45 +- .../SpecialEquipment.aspx.designer.cs | 71 +- .../SpecialEquipmentApprove.aspx | 56 + .../SpecialEquipmentApprove.aspx.cs | 79 + .../SpecialEquipmentApprove.aspx.designer.cs | 80 + .../Comprehensive/SpecialEquipmentEdit.aspx | 36 +- .../SpecialEquipmentEdit.aspx.cs | 300 +- .../SpecialEquipmentEdit.aspx.designer.cs | 96 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 107 +- SGGL/Model/Model.cs | 4025 ++++++++++++++++- 171 files changed, 17248 insertions(+), 2071 deletions(-) create mode 100644 .vs/SGGL_CWCEC/v17/.wsuo create mode 100644 .vs/VSWorkspaceState.json create mode 100644 DataBase/版本日志/SGGLDB_WH_2023-04-28-lpf.sql create mode 100644 SGGL/BLL/CQMS/Comprehensive/DataDistributionApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/DataReceivingApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/DesignDetailsApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/DesignDrawingsApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/InspectionMachineApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/InspectionPersonApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/NCRManagementApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/PressurePipeApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/QualityAccidentApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementApproveService.cs create mode 100644 SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentApproveService.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementApprove.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.cs create mode 100644 SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.designer.cs diff --git a/.vs/SGGL_CWCEC/v17/.wsuo b/.vs/SGGL_CWCEC/v17/.wsuo new file mode 100644 index 0000000000000000000000000000000000000000..f2ca5eea378a32fe5096b1c87a66697ca888ee9b GIT binary patch literal 107008 zcmeI5d%Rv*S>Ja8!&T7%M8JU_zqxyV&f90u@;LMbiPwpLqeYi-fCfAmvZq`&We&dT0vueILyefBZ0@OebJb! z{`#Yzd&8se{G(M5*Z1yyuzh)tFrKdNsJ09HQT?{Hx@!!S_~XY^tIy+yZB-GsOB{Gi5G`7=9a%#`f+KsdR2R=OW$k1|Bd?N-OF$6uAV0>C#&O{ zKjT;n^A^3c(7rJ9JNO@{_tDKs=l^(pH|X{6==ZO*C!pUyvkZ&3(e3d12EG4V%b$Id ze!|0xH6E$)D2+#Je2d0oG`>~iu^Nxl0N=N1T%z#=4fy|$G^RAZU1N>LcW7Ly@tqn^ z(zs0H$r|6K@f3}xYFw_dR%4yU(=^s=T%oZ+<4TQ<8dqstt#OUUwHnuHT(9xn8c)~w z9*t*c{9}!2jTwzi8k;q?Xl&Kkrg4MDjT+lEZqj(B#tx008oM-hYwXc@md0Lj`Saht~XX?(xNb2JWW9MU+faYSQQ19>~DaZKZOjpG`3Xq?bE zsc}kUUgNaJ8I9*^AR~(!OB&D9c)rG+8fX&Q`~r<1(0HN7Kh^j_jUUoDr}4Ga|9dw# z`hV_z)PH0U+2!^ByZ#5=ewcWH9YEh7q~BSd-`3!B-oHq{2mR+eU)TSC82Zmzmc~Q0 z=DE)vq4!z;_GexD-~KH3yU>39^>=^+TjWWO$ZMRE=OO;PrH(>o_3oXrji=>Tj_cjy z`fa}UF&8~$Mo((9fR2?5!&;AT(0;BTTbi& zJI{YG;um6;^~;~{miN6wUj3MG8E#@eII$={P6RRfwMO`{i^Q~(;)h;h8eW?<`$NJ7 zw&TKlXF`R2uk^p-zZ!24rPBA>@1u|5?=8Z4Se!nlf5g4F)Eqye*kdlc-r>6NbE*e^ z_{Dnh>f+xd8sZBvR(Y-0Y^l^nUPZ8Q1T?< z54@igKlby_Pn!bd@S6nAii+7f9~wo^)jjaz>#^;;y7;%%JfBrOd%D&?aF2R1f969@ zGwJ*vs_&N8zrlZ2HtBF}9me2aQTgAg`JNJ1^5C{DB)-nQWPjZFiLLf81MBiXFaK>y zVk$QFz)yS^)<5T)!+RIf|AXV}ult_^FOn?0SmTE^enjI(HGWLv$2ERJ<0myowk>@kWg|Y5cUt&uF|^<1HF@Yy7OnTQ%OM z@pBqKukm(`cWAs*;}rt#@6~vp#``sXMdJe+AJq7e#)maN zqVZ9UU)A_EjgM*ky2fv4d|cxGGfG^480)#oDzyB_}wJo2GQ@qeqn3(dTUH}Llh%XHxXPU`Q)^OcD?QM6Qy3a{^B z|B+wAZaF>c*Y`y%H{^O^;UU)(M{s=u8GFb@mJnfy>{1o7jKg;-=KdxRBPR=SPos@T-RXR zc!u&HpKxA=Z_*zCWL%QNzE1hwqO8l4BKJ3%m>+T$KxLO z8z+G8fwy-8cw1DZqi^B3^wjzltb%peEu&=du}0leXJRL`A5CAxow8DUg$@23mv+qQ z@BNahL&AJQ@6fxDzGM5V)bq(|sCFTRXpvdB7t~byt=kUe$Ov&w{?TpK^P%{~~YQZzIhhuviJH-hiJ-qY28h36z)+uVH652?> zPOTPyBXi~JJTgwrXc+xrb|zuOu3f5go^+dLVprs9>>^69HPdOVKySq`db`x^ulawf zmP*rLA4PXfK+%kJ6uBqD=OCSqcBFsr?T4{OmV19nh ziRbBm_=X1IA*c}%YudYqYumP8u`hL_MVJ0Atmx`()e5t6ZF)W2Tk1_scYS9>193C< zq= zTNyi?#u}q%M?{I=KP0bj{?xOs)6O}1V9$<)O@uTns>!>k{}RnK@|kLM`4_N8QA)CUs8UN{nGX8jYlFLvgp6} zd)sSWv@WcEHYn$N47zz~;%{b#7dP2o(kzH3O%tiQA5s)?qrTIp!f|VHc0T+bIX^fO zC%uJMGdrs}w`&uNiVn$k@jdANotpcCb2Ufvdpz#VwQOOLu)WwHUtO=vZ~QE_oUXc{ z%jDY6)k?!%DrQ8;ejlI9KuyLr3m-LQtc=xSf(6T25%bOV$#Lmfs37?%dSOulx)cSU zceq~jxvX_tIl8tK>AF#zUy|(MZ*Q+xYPPnzK3lSXEPO23bG6QB{P3*$>0|MYkK@)% zr*Yhdv2Z>1KnN1wYw{Vm9#?EUuv2}v3M9SB$bQf#>}&oLv$}Nnh3|UszaW`g9!nX2 z+b&qg@hRB{{8)eeJ2;rC?ZQtd`19lmefx81#^L3NhyTN8I-?olXR!D_ZBHZm{jwdz zCV1+$&0SRNXcB;Dqo>Mt`ewyn;(4EsNhA76@nU_grVUo#Y!7E-DxK}-W$Q^@*&>+u z9b#!}?q2L^T|GBvdey0C-dNAmEV#{izSi$e!n<2mo=DnDL0av}QP6&`U&PoK4-)Lr zoHSBt)80sLv&Ps2v}8g5sQ3Fd#y_`4J4``&5w*Of;`eniH}?zO%ykWbdcu}8jraSlzJvRw2vt6gVknJ}QU(;TU1~N4TGEb^23w2c- znS{e$Js5?B>if!I*_B8onzf*sgyqy0*;#gN-nZ|1r1BAC>h7M#c_!a&zq3n!9}}O6 zH=Ej*XBE?oZwNiqS_79@9W0^OJDwb~7Na>t6##v*?6}LXuN`N=M86pN%^gqiy6xAR zozQ!}3Vd2`E3XyRR=Poh1wopr$&O&O{60T*}=c#ZBI(t`TMEozu{TGVKl}3iD}*> zIVTR{f8S0`+L=-2Q~U{j10RO|_oof4|@E$vST3zSQ(~6vR>9GgnvjiU> zeds&}e1g|6rWsFpj@|mdN3uLKv)wC;9b>!X!RV2jom#0=s(Y>s=Cq1i=4rs}nVE-| zG5`AR(xkhSMGveFBplL$+Hk?X2#H1^9Uk zY3^UfK*lpGD<5`qZSSMsK4RLLRK{!d?p&3(-96oK*=u!Ho|dK#FksR@f}_nNeiH?^KS@*4-zz`{r5csiyik3&syX&hL|G! zJ(6}r|C964d%a!jPlic6wIoR}?od;LJ9&8|!{oJQI;}{iJr=CWg`oo)@>Jw2HC-x* zuBqJ67eJ&C{_^lWpX0`u*yE=&mre^#`LRkYSi}8k?QiT8O~Gl;`e@CNZXq|_id^N{I&nRj=l;nMUmy*V=H?bj_W!*;B|4*HSt`xI1#IPqN>mFM2 zQC&=n>5lEWkX89A^!Yq0#$a8t!#Y>;xkZepYe7AnN_U95(AJ&ri4FOn>9fBJC)MBX z-CE|M^LP4`Kl98t)n5+{ajp}3g&IlrXE|xVMwcF}d*}wSt|@XXB-ZY`Jyh3)n_UK~ zMf+rZx9I<-+s0R!J(u`|m89wh(T{I1Kj5tzrxH7!Hj^Ez)_9~PjbO*)>aN#*`Rh}f zt$){Te~(q@V)x88-GT4U7Wuc@H7C#nuG;RF$=z023lGk;!tTd;sP4g?kvt($XH}20 z`I4d+r!m(>BFlA`Uk?~= zUpA{-YNtz&$NPJmT{xA4bM^5|Vb9*I+MSZd#)h2H=T;^0$3SV6++B_F^u$+i7vHFC zTuwxeo*hnnO_W<`^>o8#ZJ1#e=VvWz+I(iDLxJTY;qfqP8`kPwjHf-Zv~t; zOG#Es5FMK(Ytjy`nn$?;H-cIx6g*@Y-mfbFCkfqOpam+oHS!Jm^%?k0h^O*P8y zNN7iUWRUnYG9>FnHxIW%bWthnyCOMh$kDT3xEE^dOUv;kcjyt3qBlq{y~4i!qMT(I zhubVPJ#qacFwLx3&6NM``Fhqjt^4QU=iUtwOt`zugEueN>AYgyiZ!2Dii*Wi@fKMu z;m_T3nby~HGwkYiH>dGn%=y>cN}9yrKe>~&z0*$>#w?1(9VP5*rc*0ADfZ2^{iMcs zN_LC8JHW-s)@V*!lRemTIYMsksU^pjH9n1gtL8*$8E3uLOsBI=cjZFW7`Ea|%*c}Xjm0b3VO z`)?11bmanu&|5@5OZXj~u#ThlyB>V0Zx8tFr`=U~qTXXXD$MM6HXa@PCbb@%X>8@g zISFMRdQvS7^k9YQ2&86rN)mKNo}fAR2hVA{adg09mwd9D-kH-EuV=PTPwZ+Ls|RlC z6$0FF-yXGUyKfTCHTN}ou&ggqZ<_6amF^M*im_gFbA@}W4@e5w2WceVgJ)Bb=D-iK z12UFSdG$cQx(FRROAj*A>4BK;zY_n2j_cqT+waZkIc9zQZ@T}A#-)4h+w~s&Sr8Vo znK-k>s^d*;)u;`yW4BP-EUqG^?7McaO}LwOU#qHLk9q!xjzQ-!@>_W@qt?F)- zi;!n{*6!~6k>1podniwD*WA50=Tpy$ekxQ3w4k-u{IGi6wMY^w;?=4m+qt}}0mG-IdBaTy7x>waJCowhHCo)ZstPb;A zaD;sz&Kd|A@$TBI?p7{oy)5iOdMFw$vt5dIi6ZQ_hl=4Aq)UYd`%sOcZq!sDOnds> zA#|5CDc=9^$!M1n+Xqf}nmpVY78&R2GtU>l$RF^p)ImJd42v&vIV62^(qq8(&E zbeBO-)4lFlgS7v}V;wlDjq^FsQqDbOufV5`!#o(h@qc$}J6&o#>oANDU_u7qKHf6y zRJ7w24>jq%CmyNTA`5BHXSn|~B$mh_bo}5TU$$9VVJ8{V{};!Amb3Jaw}$zTHf2L8 zdC4Fi&4@4Uys0^HH0^L0V)fH*VvkhM)UhZ#9PRkH-GAWGuwmIIwb>A%BUSXUvBQc5 zpk_;Tm)O}u(T)k%Fvl|wo&yu&K_^U z5POyO>1|gPjpw~`zqCCc%z8ZxSD(`>(>0875Szm*?hI(wY{;zAh|Mr=7oN}wg6A{I zCqk#%LihKm&pm5d;;VU@Gqv_LI~VJ!XN%)>ta@;y-844KkQ;koJtNVx0E-pjd`r4f zkP7daQ{6eUXT_#Rgg=&Gl)~DjxO8IAv;Xd1&&zP^e}zC zb`0!3T?=W?neivk+qb{EBy(HE?^#L5(ON(8Q)JMd6-|4#jN+AvHE$~Lm>mbG#oJPI z2q${+imx7HfLFz6Bd><=RQ<&5f(Py2VU|W_erm8X#4W@xcqRN{+?nd(&x9M`&t5!VLm2k#gtV90yL#}ixuely7AU0dXRGO1yEKy?Mo*t}6Nj%* zTT+JFo8kJ^<={|?(i&J7L)!x8^b5N~$JIV*5%+-kvV^oB;s#kb?rpIcsQt9fb`TuU;XbAHiKT{T^Uzas zs)xR$^~nCTb)(y1GL-IVtQ=*Y)mu4f;)yeMmo`1w{NCrxxHtEbrcmPpZ^}pNIQIOL zZMD2}mn<=Fuoy<`u=RY!1)>JU=3tw6i6075gT# zY0fVlD$)Jzg`d`8lKc~2L$3B+`4@hTX(VfDY5+p6*P7|Hb2P1DrQRt>QghZBnlgTs z*YyNmhCMcl>8k9h4ll z`xw^M(GdGP^I93QKcvj^AhI9U#4@$5b<9TY#@+wnoFWew?wS~PgDYSsKjqX(BC&Pi zJ#ieg*gjnN)V}SZDcx&_>p6ZjI47gYa?7S$7Pvgssn2uD^HyRds2manoV#G_xm|0^ zUMCUktRxhB(L8%(61$pKV^(TiJ<^r#m6xa>Vn?1$=j=3(?t320Ig5iwq7ruYe5TAP zYxD$n`!MYJz?MsxgxpY528G`K;ap|LLrGT_(rZ0@Nvo4vG^5G+lKZv?e=eIIia+E_ ztSvUuLr+eJ{q$gq!yd{WNfY`Sx{czqzC5(0Jv6}*kgxNs_|TbWb=3Ad9z6RqcFZi! zC_Loa^nCD5Up*}C_ZUB~aIc9~=ehINGsAuusf^klHamnqxk}HT8b3$RjB=KB+?r9- zp~`R173n*(ZDXZ{dmO@nO6}H6sFxj9%+>tv zfu8m-w4u)m@{t<0{pNw3i;02+>=6IwWg*rrpKUj%zlm_4so9*Z_mATazgRNp!(OaU z0zN4n_i5U$5o^~_wMB5-UUzPpGSB=+NlAk#Jky8%EsH0(=bIScx34s69f3=~IuQ){ zgs)30?G|YyDNL)ln8Oc#$U3B;#JH=s;%=&US(5j_|C{D7~_3Gcheseh7Ok z9_XX(D{&;NactQ`TE^mmKg!DO73@2g>xV>V`!x^CYCIU8K0;GMKDS%YPfBAwa7RTA zX`QS8v%E%e2uTed+jbJ*nAeAnvL$g;WfhcDS_itS%*uIqHVRW5e*^W5u(VIVxG8!3*GvDAm`5(f4_J(QZ(4t@U-L)LYSXfxvQrX}G@@*u4cIth?Zf;$T$&yMZ>XFe zOkf8;ot~Ly`wZ=Su+w)u^SaH2o3%$Dk!E{7Tl;Sh-ZL(|=8Z$o$l~&yKh~c?M?Geu2?_n zQdE`~&v&4DWGb~}qqtZ8%!4znCY9mRYsM^(*0~7vbNoTroewdfZ(reM*)`%mRxnwG zyxnbwMW-WxT!_q+*f#&fD`=&nLv86)@=dPu@G0$w0{*0QrkJ=I8)Q4##zV0}uQk)@ z9$Q)~@L(rG0M7~GZr`5i3m@R`vBTQEs8KK7I>CId{opK`G?HEl@^C?mj zq&4hz+Zoq(Zz|Naza26HyN}w(wUwgM&h^23|ZE{n1UJUy>E2MJW}5XV(%w?EZ%J8F~%6 zKQ3CAz-s$1&z#fBi)k?N+K_utpOR3xxAr(ET$VreFWucy)BIsid`~5R$jq-zX1=?Q zd%53~^CHO6s4{w1DXmtgl~~IV@kYe;J{y?sPPDs4t@DPQXweNhm9J3OCAW@ukxCrN zJ*g_Sfh!>iDIW~#@Dnbl6R8M3izo$qh;_lIAJ%Wa>@de;{9#)nLOxOA@fs2MnNQul z<@4(|Ouy#9mmm9=Gar6xx)acJ^c|5lQ_ETjuBY_J)p@kW&V%+z^(1in@H>^gm|k|q z(Lx`!IjGIN`}(vz)G+J5P*Z7+qr^hjN*gE4ID3p^$rS&6&$+fj9DQ$2L2c0Z;Y zZA4={Fw-asnA|(fIT1v_p--Z(XG!;UOBkS=Iu11)s~9zrf@e;7*`Zc;mm&_J_dlaH zjf<>8>W|{n)oiqS<+LW{DVZJjk&-=oxVon5)-XI*r*Z}z?1G=wZo%oAo?z?Ys6Wd} z&#OuI-)@nH;0fEYhi4Y)nr)F4KDq3p`q7=*PokmFmApy(dA3%H4A?_yYU9GLnt2k- zjHogXkK{uAX-@jJRNp&5M~FQ^+(UC34Oo0JuemR2$DzqQttZwh-*!@}2T#fy&bs1M zQM8zfRbQP>qiE_U_>q-)?tGe&0w0OKz0M-Bn@3!7lImr*;xp7@rt;mz5aM;u8m1Xl z7pezZs@M6hYY)tvEYQi_mfE&VkJ7`{vc28dIjt(qNOp-@I48hgAxphx+Y23#WU-^u z>~?r~@kG&2WHMV_uYYs06S=#unB_-4_sHu{-uJnSKe(xS>!mk6;qzqqa4BRLQ-X53 znyT+AAwwXmnG#QT=wDS`wW_)oC|8}j;k#G8{qq;!^M&f(-EUg;+{^V|<8P)~9%pLV zc2CthZ(gUWt}DQ~RB(2S!?WUs?Na2gzqWAwZMuGcy<0VS5>BsORsTl!$Vh-aTreGh2Z8p3Yd}T zJ8q60G##=IE5wb z)gWQ?lGz?El2KK^P@reN17{p3tTQRZACvK>y}DKP&H^RoZ-^}I)HQlftopH_zJ})f zJLVH&BI?hql)YA;OZoINeZo>kUZF{A+9XXkoK zwrR8CrWyUl&eb*g8TOw{v#?l1fJhIV6@7)-v*&V|zF}H=nILs-$ja05t^zGj7A?fG zi{cFXH^iD|C+rLzEDRDB_@0wbyxewO*|s{YEWO$A1}#B);$5n$`lSL*M+I-QXj;&< zoGZkY*qLsn&@?gFTYAh>ERAJO&l;<$dkPffW`rL@hMFh7PgPIWYGbRYh<=x-{^bHZ zBB3sa^6*Sb4cfa4(53}#uP~Y?GX69^KiE`TPqS^<^3%1IU>EZ>oHFP-|*l^6DwjiqbtMsrPvyGH5rVdYdOfP*&?z4 zILb}{D_K<^D9nv0^+2r!bQu{ZrfLeg&b*by1ZJ^H@PDNM|HU=$8f(v*p!Z>A%}UQ! zYelJbl6SdB{i*TMVHJ(vlg|D_1?ui`tnA#FmBpT4*fsoMVHS627P%N1%K@j&cA5>d zxGMOauAE-4Z^t^6MgSivQ1M7n(LNpgS+Yv@%K1~X!^9_HMS12Q9@`@NE@kLV&=a$} z^O70!9!L~XRFK}b)>PGp3-nT#%yA95N0ak(Ov0gGEnqCI6P9k}*Xg4LD&AR`H{KL~ zimrBb@T{^nH1=$5=cl9zW-}~)GR>IP`k1DM6^*?jRt1S%(7JVPOT5~q@m2M)!VF3) zH+}}=Wc$|&7!QhPdlH+D)o z#K|=|jr+)OyYXwRDZgHzfWCsu>KWmIaxo>gug%-4`pp6?DlK_f_M|p^9uXOo#!^yM zA1}aMBbYOh^qQySdU7qxTrR2}eD2CjZak%{+xw!qtmh{Sn78TLc8!u%ZG2tuae1$g zwL?RAo=jD}w19z%L%MFMRenj~`YBz%PZ)?TEow=xeffxM+pC)6%qt7mQnv}#p&Q4f z6uhDUg_Yeao?@4Fi~hah_AMINXY`1BH0_nk9iRaVAIlM%VUj@}M}%XU_Nxmt+$1R7 z_!|62#nrWS{loMb4+Pv0iM1smL_JmYssa{fx=FH6jm_qk-6J3W|M9SsY z6|R1Xa0d&+36f-KfiqaDS@GJuVK)NB9*xRt+jj`z;fPl)R>o&w4Z~mXkm#wZEodv40Tu|;^F^LfXF^VSNh=}dKvsIyfcmMa-ypKeE}|Y z<1VHAeMWHcU7U1|mVqOzWRSqB`i}*ux%tQ0&RN0E&HqaUh~6i^j=AAfToX&z#9tZf#v7iB*MFLre0{TH!c&*zbN3F)@Q?Hu&OQ+jGSZ4f)X|+SQIif@WF0-1Y{k zp~c@hC2Fi*kk8Ghs;;l7s{cA-*89&_=wi!hcA!m5sFqgMUlri((yY@+&GI#JRO}2o zWtFb5cSFBD@kZCu5V3r@fa#4B^0!_60^d|oW8iedi(n1odZf+ZusBwRQ&s=HK=Ye> z)7-5i9uTkW6e};)Wk^-^*9E%o=}ouYSxKaRr)1X7?Lx0if2_BHQz`9^BYQH;d|fwg zubcU}rdDG65$))($z-bPe->u(t_f#h(OFU4T5vn#Z;481APE zaLMyW^MXt`Un7e#{B{8Y`^uv+dtt3~q z=u-Rp1#02ycpT|&&+irB5si+AHzlsbwd+{M{-6LI8QUh#aqlp39Wm5etxdR_U`mzB zeOj+6)jMsU<+wg2b|E^z&sZhpL#y*$qrjhp`f=9rGX?t5!oKvg({6Jjvie|Q2Ky(P zL3cfg-mD4~OBeesWZ+fx*}{y_qB6(qYGUBh4&NUZ;KC{3vS!3<2H}wY?pA$HOS4Ax zFaEOvhMYaQtdHuvE-_3@sW19X#Dy`IX zErb6;0Vb;w&&WEYsJbIpWD4|^gxt8PJajQv)fWpm(76}~@lMRSfXDK(v==SqZB_lt z0zN!Uj4#HOQvOE;Na=dV-04DMy;B{D*SyQgs`^(2?Bin+a%$^9A@@Z48+*`beO3MI z0)|_~sgM7TH5&qo~%4qvRL*Q zo7r1M`gY0gtg!vt0wo7Cl#qQLts{`7>S>X+Be$nF8A_VYEGV-oZ*Co`>faP_PYd_B zXwc&Mc+aA}s{gJ4J7)zK#S8Wk*y#y70VUZ9dt!f5fd53%PF`iZy7(Ter*cX&xo}l| zrOL+-+MF5V-&0txF2Ev^8XYUJHjP9=r=7pp?D(krpa7j}^l0do=~G8;=KWIzXzY26 zhDIeS@RNEoJ7(mAuPH!WqtDPHyocQxkz0q?6|QD>-K)9(gL^EA#j*M9f8haMAPi*V zRrT5ev}t`t4iN7m?vo_MJ*m3|6}wEt6rNdVIe-A@wfbDTyN)g2Bm71ikt(yrKCrrR z{SKh%RGk(cgCCe*!mOE2vH=beI#eb1j1GF5%QAn?jn!pB1=lQx;jotHQo`YvJ3 z)83V6^Lwm>RV34O8I1{_lfy(#&AO5CjXObPGzKD$JO(Nmlb-r98b@h0kom?Uz$+xk z%cGkLGl-!Rows9gFBW!Rb9@RN#kMQ#g^F*;K`q^t;)Rc8$-yr@^=tGx?kPeG)d4CA zOUvCc*e=_L#zJ^0FL7qGta0ch;rZU!X|Svm{PvzP`&6Mn(+huEyc+Feh=Pf;7i8tI z!flU8{#8{kFW64vMDCIgoft$(OR9LYU$w5fRnU0C@w&Q;YC(RBj*RAgJ5Q6SBAt@} z>yu}_({vn@n)7UBBL)W$S9ST(eh8kFsC?$IE%f1ve2;KT~)6vz?~iocYNgZiURB% zf}N9J>q}dZj97ov5z#zf=L_xJgGjzz-O(L!tMZ+qPZl1cD0)rdr1_4fD}p;ojOSJL zL)EG59pm`arYcLF!R~Gdbj5p#Q`vdxUbO;+YXp6#AVQnfBe7JhQk%9PEYS8aUHyE0 zpKdC9A!*%ig%|3*ZTe1tZ=FluU{_Lcwb@eWJNQQ z#N64QbRi?B^t;U{B8OJ25wBdlOpF>=x5lj#l|0MfyVZ=qnK+yNaA6j#V4fGqaOfoY zXyIz?OkcW9pDkeUXNqoK;K`#TDFr-XNh){PZxXFZm?HTU}FR`W5f zYvCerEHBgt**y_FgO86v)`{apx&|pL~S<4YUHEYB?s+0H2`g=rrAvymC;;&F|2+$P3m}^;#4ddNPY(XgT8E~?s0|$t%ZWg_99F>e%HcVn_kDP%3y`ZJS)n4~Sp%}n9LD{E zYfp3L*$tc}Z8-yx0hm?-$G#dCwG_Oq&7@t?M#7lgR$&Zw5zgf#0DaEQ1D}B2-6aVn zzUFRuW-zZf3_n7a!gIR1RT=Q)*9gyW$7a1lS2<03J1)7Q3FG`B0V z9tS9AmV9yZLQ+vnb*Mr5A%5N-=U`_)SB6` zv+TiQyUFKRTE9GQX4M~8$%^E0wRe+<`}?dQwd0(0<}uO>Yp1u(D=WnJQ)wZx^{ghl z5DiXj26?tc%0&4-zex40fyQ02zh&O7S?GD-H# zHICC_>Qcy?YrP5Qj)gpAa#@`WTe~8&R~Ye7bZ8K}d*;R-Sea|qSMS&L*iXkCi?gSY zpLu8=1s%JA+*@87_98scTg3Y%1&N zoCB3;3cDWd*hClTmE&I=y#;B(N7-}uZq_Qy)_?iDOYHseO%~Od)Un4pFFJE}WArn# zb90EJHxDlMPLcfbGjwwJ4vUv<{&(jV?r2RbOL*1xo#lP>JC1eI*_N;yU;AL(G-kg0 zB+c<%{T^wa9s`{$8Q(&+#~U$?lR{v3d$49CseK~CIHph6rCo^|GN-t9IvUT6EX}dn zvfBNdr(AYs+{y%r>Qk?z+h~*y8Enq4VJC;0aOisQ$kx>pVevp5CsDCyw;qwU#(Qve zqoS^ziE;Vu<~TbR!%t;t*zCs1@eNvY+rOYbx3BgUwnI(a;^AZ0$94HgmlzU86y$+B zPCtlY*umo|se6@Gd0>yTCT-Y;rQg0mH%jgDCdFg>GPl#SXXMWv?d~&>; z?af}M-y6_HFv{knb8T07?D@9zW1P^smOHI-5yMc-rfKXLvXkuL^U;BGwix|;HRGk$ zihC#+I(KlL(aeb!eOw=BtH-UkXO;&C@|j4K96EFhcyPzN!f8Z6g@W3St>tcYu$x`= z;27tx0}gugu%rF3jPnTr3o+W{Ph-mMK#!Xb7?2NkH?0yto?)=7haNX-Sx6WWp$A`V4N`pFnB265y#?zbypXtt?7ze{*mPbt4|+oAe(}sAwksvb zL{FBMsU;m2|uVjB;JadI4}Zp-Zu*@`2>bVfOR?48pO z;F;IBmC51pz>njC$>u>0f~;ZJOwO#+$=Bf&S18Mvzc$!X{W0li_D?-r9XGcW+xFU) zQkU{a@#AFQ{2Bgkw%${+nqu&H)=B1>-8dWG#y3=VrSyaFrEKQEiXhgN9rDTc7F^X_PT#Xf1KB8M`l}u z6Uw}qL4IxNT_TQwn|2=%`%T@s*qu}1TOR4nb2NvQUMe^k_R<1Q;$Q0(@!-wdgf3oU zxVYmA-)J3P9&D5GHtvcF^E1xx5+zjoJXqt*AxLX?jzscSHwd$}osy>B8}>$}hI-{P zhrG>8F_|niD`vQf!h9Kg-sTxTd)5|bd9RawwLLxhl+cP<>4g_pymuILv5kw}n^ZGq zgmbpGdSp%e<)PWV^sM42+3DiPy3%cWvfg**K9V+e57vWP>837Jp7lQ22YO-bY&`Dz zwtFba*G^V9Xy)V!z9?&y+_q=DS2&1z`mb$1-b&?Y_wqhIoiW%TlcL~F!@U|F{>D32 zW&WD?uv(Ml+;G+`p0DyVDOcMVn>*P(a~oyT+v^9W`SUs&+x76h3x_vI&v3kxN)hvo z*U-9h`pfU6T8h^)AIUyAJp@DtJYRdiWEsEW@2#0sf@7~noJ%bO3HH{5BV1z$W!PD=X8ZVu@fC@a^qfV~A9ZiUdpeVwv*T zsL6TS^gW}e>3VvwP8u)8U7*+q{|@S;Gc4T)+pMc+hVkB6*`LPsi&%2K8PlX(jdAw# zsgp`+$ON(R{r$?do#-#*emu21?wg#vpR`+%4=~&JAEL+X0{E*S-HLn;`i-*2RLMPZ zHJ#oIbwc0)zw3B zp0`9vdo{=^=EU98RiAZxMwYiB!(|3`2Nh4E_jMuUb>l`+yQIj9sM6m(w=qj?Y@Ixu zU6+Ly?!ERviuH>8hx~b6eU>kM96UA3o~eZt5a$rzjIS8PJ*sWESO7bdauPVP4Q}A% zv+>dOn^v6SS1~m>BevEzJMez!p&ArXzxf4ro7n4!Hs2*9X@-_Qd;~~eA5kqe7 z1D}NRv2|!5g&K$DkE_wj5d7E$>8+CU~?qwdgXddN>bK7yMTHr9KGGZ zWZ}dyX+w)uv@N|vAORS z-{Rqand;_L1UP|3WM{wwyJTVT1)*ahhCQCkWll6OseVvb@=;roh&Hut$irxD;sHF) z(faOsY$P;~haC52HCnSvusN{nLWE&m=abM|@|gI_&@XEH zGt_{OX}7eIxDY{jC@)C~mMg7%dLXYaXn6yfZhSJU@v9i;z|ATGi_Dbh8lTxOJ}pHJ zqo9wcIo^AYXLgJUzcksrf8tY5#e|#m@cef197uti}U_DPm`D&X`>TxJnWKwv|(HC zx<}?pzL;#7S|k!f4dzVb^(Ub>u9!CVh`j`A3{<2-U1$94OSP?b3}x2SXZzz?eVa;X zA~wS&td#E@H47x+_PWvuUwrq>$9Kszvmi#9uh+4OQtYnY;Hk;c@s~51Z+hhDj)LUp zDac_9k>rqG@&kjZ@M?T{MGv3X9rn-LG4mwa6T?MM+8t6e=g*w=?t{hpZg6i_g=AZO zYADfD%z??X;MgMs$hkf%d=m24r^74GS`CZsavc%noB)AD`*O?J%LJHB|0})|YtVFK zcr+uolGMV2^&=k%XCDlQ+dPSeD3Tf#^(PP995>9%+Kyin8-<##2YT#tjn@X9xDlRE zEA&8&BQJxvUDZYpjH$?Ov|)_*OgW9hXEaZ=XrKJ+p(-aiG33Vgd*GHRPIGTBA9ECk zZkHjE+EX&?vsG)n&9%zY87P*ME-c5#R;O=vepnb&O^i;-@ zwEA57R2_Cey7^gi8a(&Ev~7l-l)EZ_t~~3zuf}Y-j6Exell2d2Cx$1IHTMScL@(r> zm?1!~s^=bB{8KWN?z4S~=|XpN?quqQ+M|ML6*C>OU!ap}Os9>Ov|vkPPu zRrSdNtOb2W2eDPCfJD~A6U;b8-k#pf>a=rTo{xrQx2G00`kFq~4xSOU+BqSo1eMxP zRoz#h1{)eqDzSU8@kvv%^E>p9)AQj?Gp}amZN7cF0DX<1n>N|AZ{hSYN!^srK6{>K zgcq->Zx!QnYxn|vc0k`C_XrkzO4kvS!x1F5bbda$3cENBy=fP9c#hdkf&@?7PoSu( z-z&@s{fX->Q+4ER`G-B19yvt@o=}+C6Kfc4%iGM;)=OW=p3ja~iY;r{vqLZFBDP(d z)9TYXE*e5r6nM(z&!xJIro<450E0wQRX$SdTzh{TSb6%8rx;rId7SYc1K$M)v5-}q z!&&ROC-xFk#n5LoV54~o!4 zt7G%bk;Z~Ps2~B;HCC=WUat~%m~(fgYMV?R2S<2jAo|SH0$5q@HwydnJnK78(_;jC zufA=%&$^+(XZ0?x9AA-voE>gvV$TJ|?_vv(v8tMv?alE74FNwhfciQ0+CYQNsU7?3 zi+bgxl0C%u+49&~pv>2H!>q2=wXvY^>ZtfmRhK6{hG$aDY3H1~%NvhWRo_`yla~qS zjNqqhl0tzW+!4uXYFOLgk(w1FqP6qas4=m!_B=f1&^(u>p(|c_yu_0VbmD!DH+z*2 zP02H1A?^8>Ciz&~Mg~`{e#msrzINg4*ELW_4~X?L#c);^;9$+n%Exg}W5l_=P#dxnPT#f!Tc(DwY9dReFNlv&Ix6<9g3fhS&n_X`c9l4gx8}Bi%@)sxB&Ez*5?-c!+X{PQuQ3RXw-25*gsEvX&zAxt-7^8R$vL|_RrSyUB3-&nYgOa_ef&)uafIDceO*YRYB zeX?h_DiVMi?64>IqDnFvuIW77?tc&JjtQ~gPtbZ!zYD!7p4s5xM$g6rjVLTYyR*7d zl&zB-V3XE~|J+BgL%jDur0=Z+5j$eO9LQVG|K)+-o`09(Ez--KE^4t*u`XNmODw}P zt?-NFZs^w|3Ua$qpAicXtyu>#D~y&}^i1u|d>V2a+xc7!BX6mwV~_laMG9u6EM|Zb z%g~5h9{*r@BmL~ga`?kg-)iy)(?pBUkiI6T5{z>>I7o-Vq0`uU)nePaLu+l8bX&dZ zrsuj$uiV_=_szo1HI_kP%hL7dc}u*Y>VN&wmo9nt-+Xz~2loE>SN_lG5Bvc94p|-4 zSj=McYM+EVRj*2@PU_i8tMb_y-jP1))1n0Wc^(d)#;$~t&4rb}RG;n9ir6VVmaUR6 zS&Ru~W+}H7u3w|;)4dsRH&xZDntEV9I>tj_5s49>7WvtBt)U%RJhMOt9GI!)%DWa^ z8ED8y7CQMC!s9(pYtLlN(rl;-OfBh9#uD^c$^*?aM6<5!0*l^v3 zwR2ZqGrM-<6-Q>*9$J6RHEZV%A3AdA$i^er9yzk{pDtgp!F$1#-U~KPe8D$pKCq|9 zD=?$SrS&Dq(Baz35FafpXByad{1f|cc>A~yq>bxpS)T{#jc?KTs$T8SO1~?+*239~ z+CA|K@(dO*oA);#NaYB+uo8>%v&2bDEx^}St5=aFJWgX${D0e`vz>L4&yX<~CpiBf z4`=xt&*HO=*gtNB zRP$o}fhV&$F@9A*&#OCLy`8IuOmOkM^|TsH;|1^q4Ogz0{)M%lbpCDmf01Z;vBnQ; z{D{VnYW$eSk8Avd#!qUzMB}9zFVoO7pQ~4B==rzRt2AD%@fwYv(s-@L>oi`k@dk}I zYP?C~r!{^?f{(bgi7oBBx&NQkL;h8#KW~3?Fum`!Wx#vw zN_>9^{!#wt7OgN|*zS-qKiH*rgX|x+^idkn(fvI4_iDZQ&C4H*!oOMahs2R-H>bda zeLk~+&(QimUa+vKlj2{c?@r=>+xRW_u_*UUY=2ihSn$5hfnQ%ekKdzz_Ecaz0lRb- z1u=i``a>&g#w(5gLJf*|Yy4}f2Yz@T;*TzVtP2t03He~2&>efbl%6LGKRL)FH6~sE zhwHn+i+Aytv+NW%@5uhRF4ad>)It#ipegizjf-+;?ms0jSGFRKXLML zKXl@M_rKmj>IL~~SN`$3$R7Tmrvg}2uZ$Y`N1ne?V^aMiRxjy)ga53o{$WvZvW#4x z1pULOPl~@C|90nZyWwOYXQSLK*1CqI%X{cQ{$l?!h%WxT{cC&41~|uY2y}qvh V#>b)hk1w;_ud4dkpZnW>{67m9#^L|~ literal 0 HcmV?d00001 diff --git a/.vs/VSWorkspaceState.json b/.vs/VSWorkspaceState.json new file mode 100644 index 00000000..75b31f26 --- /dev/null +++ b/.vs/VSWorkspaceState.json @@ -0,0 +1,7 @@ +{ + "ExpandedNodes": [ + "" + ], + "SelectedNode": "\\SGGL.sln", + "PreviewInSolutionExplorer": false +} \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_2023-04-28-lpf.sql b/DataBase/版本日志/SGGLDB_WH_2023-04-28-lpf.sql new file mode 100644 index 00000000..65ca1b00 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2023-04-28-lpf.sql @@ -0,0 +1,402 @@ +insert into Sys_Role values('6574633f-4a55-4ce4-bd48-58d7d03b2eb4','רҵʦ',267,'Ŀ',0,0,null,null) +go +alter table Comprehensive_DataReceiving add Status nvarchar(2) +go +alter table Comprehensive_DataReceiving add AuditMan nvarchar(50) +go +alter table Comprehensive_DataDistribution add Status nvarchar(2) +go +alter table Comprehensive_DataDistribution add AuditMan nvarchar(50) +go +alter table Comprehensive_DesignChangeOrder add Status nvarchar(2) +go +alter table Comprehensive_DesignChangeOrder add AuditMan nvarchar(50) +go +alter table Comprehensive_DesignDetails add AuditMan nvarchar(50) +go +alter table Comprehensive_DesignDrawings add Status nvarchar(2) +go +alter table Comprehensive_DesignDrawings add AuditMan nvarchar(50) +go +alter table Comprehensive_DesignDrawings add CompileMan nvarchar(50) +go +alter table Comprehensive_InspectionEquipment add Status nvarchar(2) +go +alter table Comprehensive_InspectionEquipment add AuditMan nvarchar(50) +go +alter table Comprehensive_InspectionPerson add AuditMan nvarchar(50) +go +alter table Comprehensive_InspectionMachine add AuditMan nvarchar(50) +go +alter table Comprehensive_NCRManagement add Status nvarchar(2) +go + alter table Comprehensive_NCRManagement add AuditMan nvarchar(50) +go +alter table Comprehensive_PressurePipe add Status nvarchar(2) +go + alter table Comprehensive_PressurePipe add AuditMan nvarchar(50) +go +alter table Comprehensive_QualityAccident add Status nvarchar(2) +go + alter table Comprehensive_QualityAccident add AuditMan nvarchar(50) +go +alter table Comprehensive_SiteVisaManagement add Status nvarchar(2) +go +alter table Comprehensive_SpecialEquipment add Status nvarchar(2) +go + alter table Comprehensive_SpecialEquipment add AuditMan nvarchar(50) +go + +/****** Object: Table [dbo].[Comprehensive_DataDistributionApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_DataDistributionApprove]( + [DataDistributionApproveId] [nvarchar](50) NOT NULL, + [DataDistributionId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DataDistributionApprove] PRIMARY KEY CLUSTERED +( + [DataDistributionApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_DataReceivingApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_DataReceivingApprove]( + [DataReceivingApproveId] [nvarchar](50) NOT NULL, + [DataReceivingId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DataReceivingApprove] PRIMARY KEY CLUSTERED +( + [DataReceivingApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_DesignChangeOrderApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_DesignChangeOrderApprove]( + [DesignChangeOrderApproveId] [nvarchar](50) NOT NULL, + [DesignChangeOrderId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DesignChangeOrderApprove] PRIMARY KEY CLUSTERED +( + [DesignChangeOrderApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_DesignDetailsApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_DesignDetailsApprove]( + [DesignDetailsApproveId] [nvarchar](50) NOT NULL, + [DesignDetailsId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DesignDetailsApprove] PRIMARY KEY CLUSTERED +( + [DesignDetailsApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_DesignDrawingsApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_DesignDrawingsApprove]( + [DesignDrawingsApproveId] [nvarchar](50) NOT NULL, + [DesignDrawingsId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_DesignDrawingsApprove] PRIMARY KEY CLUSTERED +( + [DesignDrawingsApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_InspectionEquipmentApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_InspectionEquipmentApprove]( + [InspectionEquipmentApprove] [nvarchar](50) NOT NULL, + [InspectionEquipmentId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_InspectionEquipmentApprove] PRIMARY KEY CLUSTERED +( + [InspectionEquipmentApprove] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_InspectionMachineApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_InspectionMachineApprove]( + [InspectionMachineApproveId] [nvarchar](50) NOT NULL, + [InspectionMachineId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_InspectionMachineApprove] PRIMARY KEY CLUSTERED +( + [InspectionMachineApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_InspectionPersonApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_InspectionPersonApprove]( + [InspectionPersonApproveId] [nvarchar](50) NOT NULL, + [InspectionPersonId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_InspectionPersonApprove] PRIMARY KEY CLUSTERED +( + [InspectionPersonApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_NCRManagementApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_NCRManagementApprove]( + [NCRManagementApproveId] [nvarchar](50) NOT NULL, + [NCRManagementId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_NCRManagementApprove] PRIMARY KEY CLUSTERED +( + [NCRManagementApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_PressurePipeApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_PressurePipeApprove]( + [PressurePipeApproveId] [nvarchar](50) NOT NULL, + [PressurePipeId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_PressurePipeApprove] PRIMARY KEY CLUSTERED +( + [PressurePipeApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_QualityAccidentApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_QualityAccidentApprove]( + [QualityAccidentApproveId] [nvarchar](50) NOT NULL, + [QualityAccidentId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_QualityAccidentApprove] PRIMARY KEY CLUSTERED +( + [QualityAccidentApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_SiteVisaManagementApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_SiteVisaManagementApprove]( + [SiteVisaManagementApproveId] [nvarchar](50) NOT NULL, + [VisaId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_SiteVisaManagementApprove] PRIMARY KEY CLUSTERED +( + [SiteVisaManagementApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +/****** Object: Table [dbo].[Comprehensive_SpecialEquipmentApprove] Script Date: 2023/4/27 17:11:04 ******/ +SET ANSI_NULLS ON +GO +SET QUOTED_IDENTIFIER ON +GO +SET ANSI_PADDING ON +GO +CREATE TABLE [dbo].[Comprehensive_SpecialEquipmentApprove]( + [SpecialEquipmentApproveId] [nvarchar](50) NOT NULL, + [SpecialEquipmentId] [nvarchar](50) NULL, + [ApproveMan] [nvarchar](50) NULL, + [ApproveDate] [datetime] NULL, + [IsAgree] [bit] NULL, + [ApproveType] [varchar](2) NULL, + [ApproveIdea] [nvarchar](255) NULL, + [Edition] [int] NULL, + [CreateTime] [datetime] NULL, + CONSTRAINT [PK_Comprehensive_SpecialEquipmentApprove] PRIMARY KEY CLUSTERED +( + [SpecialEquipmentApproveId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO +SET ANSI_PADDING OFF +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'豸ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'InspectionEquipmentId' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'ApproveMan' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'ApproveDate' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ƿͬ ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'IsAgree' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'ApproveType' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'ApproveIdea' +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Comprehensive_InspectionEquipmentApprove', @level2type=N'COLUMN',@level2name=N'CreateTime' +GO + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index f3898136..47d6d46e 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -201,24 +201,37 @@ + + + + + + + + + + + + + diff --git a/SGGL/BLL/CQMS/Comprehensive/DataDistributionApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/DataDistributionApproveService.cs new file mode 100644 index 00000000..898d2f70 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/DataDistributionApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class DataDistributionApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_DataDistributionApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_DataDistributionApprove newApprove = new Model.Comprehensive_DataDistributionApprove(); + + if (string.IsNullOrWhiteSpace(approve.DataDistributionApproveId)) + { //新增 + newApprove.DataDistributionApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistributionApprove)); + newApprove.DataDistributionId = approve.DataDistributionId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_DataDistributionApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_DataDistributionApprove editApprove = db.Comprehensive_DataDistributionApprove.FirstOrDefault(e => e.DataDistributionApproveId == approve.DataDistributionApproveId); + if (editApprove != null) + { + editApprove.DataDistributionId = approve.DataDistributionId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_DataDistributionApprove GetCurrentApprove(string DataDistributionId) + { + var q = from x in Funs.DB.Comprehensive_DataDistributionApprove + where x.DataDistributionId == DataDistributionId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_DataDistributionApprove GetState(string DataDistributionId) + { + var q = from x in Funs.DB.Comprehensive_DataDistributionApprove + where x.DataDistributionId == DataDistributionId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_DataDistributionApprove GetApproveByApproveMan(string DataDistributionId, string approveMan) + { + return Funs.DB.Comprehensive_DataDistributionApprove.FirstOrDefault(x => x.DataDistributionId == DataDistributionId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string DataDistributionId, string approveMan) + { + return Funs.DB.Comprehensive_DataDistributionApprove.Where(x => x.DataDistributionId == DataDistributionId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string DataDistributionId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_DataDistributionApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(DataDistributionId)) + { + strSql += "where i.DataDistributionId= @DataDistributionId "; + listStr.Add(new SqlParameter("@DataDistributionId", DataDistributionId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs b/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs index f4e07667..fcd5ab7f 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DataDistributionService.cs @@ -129,7 +129,7 @@ namespace BLL newDataDistribution.AttachUrl = DataDistribution.AttachUrl; newDataDistribution.CompileMan = DataDistribution.CompileMan; newDataDistribution.CompileDate = DataDistribution.CompileDate; - + newDataDistribution.Status = DataDistribution.Status; db.Comprehensive_DataDistribution.InsertOnSubmit(newDataDistribution); db.SubmitChanges(); } @@ -159,7 +159,7 @@ namespace BLL newDataDistribution.ReplyDate = DataDistribution.ReplyDate; newDataDistribution.Remark = DataDistribution.Remark; newDataDistribution.AttachUrl = DataDistribution.AttachUrl; - + newDataDistribution.Status = DataDistribution.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/DataReceivingApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/DataReceivingApproveService.cs new file mode 100644 index 00000000..abd887e1 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/DataReceivingApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class DataReceivingApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_DataReceivingApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_DataReceivingApprove newApprove = new Model.Comprehensive_DataReceivingApprove(); + + if (string.IsNullOrWhiteSpace(approve.DataReceivingApproveId)) + { //新增 + newApprove.DataReceivingApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceivingApprove)); + newApprove.DataReceivingId = approve.DataReceivingId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_DataReceivingApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_DataReceivingApprove editApprove = db.Comprehensive_DataReceivingApprove.FirstOrDefault(e => e.DataReceivingApproveId == approve.DataReceivingApproveId); + if (editApprove != null) + { + editApprove.DataReceivingId = approve.DataReceivingId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_DataReceivingApprove GetCurrentApprove(string DataReceivingId) + { + var q = from x in Funs.DB.Comprehensive_DataReceivingApprove + where x.DataReceivingId == DataReceivingId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_DataReceivingApprove GetState(string DataReceivingId) + { + var q = from x in Funs.DB.Comprehensive_DataReceivingApprove + where x.DataReceivingId == DataReceivingId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_DataReceivingApprove GetApproveByApproveMan(string DataReceivingId, string approveMan) + { + return Funs.DB.Comprehensive_DataReceivingApprove.FirstOrDefault(x => x.DataReceivingId == DataReceivingId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string DataReceivingId, string approveMan) + { + return Funs.DB.Comprehensive_DataReceivingApprove.Where(x => x.DataReceivingId == DataReceivingId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string DataReceivingId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_DataReceivingApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(DataReceivingId)) + { + strSql += "where i.DataReceivingId= @DataReceivingId "; + listStr.Add(new SqlParameter("@DataReceivingId", DataReceivingId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs b/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs index 4064747c..9686737e 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DataReceivingService.cs @@ -123,7 +123,7 @@ namespace BLL newDataReceiving.AttachUrl = DataReceiving.AttachUrl; newDataReceiving.CompileMan = DataReceiving.CompileMan; newDataReceiving.CompileDate = DataReceiving.CompileDate; - + newDataReceiving.Status = DataReceiving.Status; db.Comprehensive_DataReceiving.InsertOnSubmit(newDataReceiving); db.SubmitChanges(); } @@ -153,7 +153,7 @@ namespace BLL newDataReceiving.ReplyDate = DataReceiving.ReplyDate; newDataReceiving.Remark = DataReceiving.Remark; newDataReceiving.AttachUrl = DataReceiving.AttachUrl; - + newDataReceiving.Status = DataReceiving.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderApproveService.cs new file mode 100644 index 00000000..ee3a6a3e --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class DesignChangeOrderApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_DesignChangeOrderApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove(); + + if (string.IsNullOrWhiteSpace(approve.DesignChangeOrderApproveId)) + { //新增 + newApprove.DesignChangeOrderApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrderApprove)); + newApprove.DesignChangeOrderId = approve.DesignChangeOrderId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_DesignChangeOrderApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_DesignChangeOrderApprove editApprove = db.Comprehensive_DesignChangeOrderApprove.FirstOrDefault(e => e.DesignChangeOrderApproveId == approve.DesignChangeOrderApproveId); + if (editApprove != null) + { + editApprove.DesignChangeOrderId = approve.DesignChangeOrderId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_DesignChangeOrderApprove GetCurrentApprove(string DesignChangeOrderId) + { + var q = from x in Funs.DB.Comprehensive_DesignChangeOrderApprove + where x.DesignChangeOrderId == DesignChangeOrderId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_DesignChangeOrderApprove GetState(string DesignChangeOrderId) + { + var q = from x in Funs.DB.Comprehensive_DesignChangeOrderApprove + where x.DesignChangeOrderId == DesignChangeOrderId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_DesignChangeOrderApprove GetApproveByApproveMan(string DesignChangeOrderId, string approveMan) + { + return Funs.DB.Comprehensive_DesignChangeOrderApprove.FirstOrDefault(x => x.DesignChangeOrderId == DesignChangeOrderId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string DesignChangeOrderId, string approveMan) + { + return Funs.DB.Comprehensive_DesignChangeOrderApprove.Where(x => x.DesignChangeOrderId == DesignChangeOrderId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string DesignChangeOrderId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_DesignChangeOrderApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(DesignChangeOrderId)) + { + strSql += "where i.DesignChangeOrderId= @DesignChangeOrderId "; + listStr.Add(new SqlParameter("@DesignChangeOrderId", DesignChangeOrderId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs index 430d2e71..d53ea1f7 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignChangeOrderService.cs @@ -196,7 +196,7 @@ namespace BLL newDesignChangeOrder.CompileMan = desginChangeOrder.CompileMan; newDesignChangeOrder.CompileDate = desginChangeOrder.CompileDate; newDesignChangeOrder.CompleteDate = desginChangeOrder.CompleteDate; - + newDesignChangeOrder.Status = desginChangeOrder.Status; db.Comprehensive_DesignChangeOrder.InsertOnSubmit(newDesignChangeOrder); db.SubmitChanges(); } @@ -224,7 +224,7 @@ namespace BLL newDesignChangeOrder.AttachUrl = desginChangeOrder.AttachUrl; newDesignChangeOrder.ImplementationFrontState = desginChangeOrder.ImplementationFrontState; newDesignChangeOrder.CompleteDate = desginChangeOrder.CompleteDate; - + newDesignChangeOrder.Status = desginChangeOrder.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsApproveService.cs new file mode 100644 index 00000000..002c64b1 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsApproveService.cs @@ -0,0 +1,152 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class DesignDetailsApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_DesignDetailsApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove(); + + if (string.IsNullOrWhiteSpace(approve.DesignDetailsApproveId)) + { //新增 + newApprove.DesignDetailsApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetailsApprove)); + newApprove.DesignDetailsId = approve.DesignDetailsId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_DesignDetailsApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_DesignDetailsApprove editApprove = db.Comprehensive_DesignDetailsApprove.FirstOrDefault(e => e.DesignDetailsApproveId == approve.DesignDetailsApproveId); + if (editApprove != null) + { + editApprove.DesignDetailsId = approve.DesignDetailsId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_DesignDetailsApprove GetCurrentApprove(string DesignDetailsId) + { + var q = from x in Funs.DB.Comprehensive_DesignDetailsApprove + where x.DesignDetailsId == DesignDetailsId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + public static Model.Comprehensive_DesignDetailsApprove GetAuditApprove(string DesignDetailsId,string approveType) + { + var q = from x in Funs.DB.Comprehensive_DesignDetailsApprove + where x.DesignDetailsId == DesignDetailsId && x.ApproveType != "S" && x.ApproveDate == null && x.ApproveType == approveType + select x; + return q.FirstOrDefault(); + + } + public static Model.Comprehensive_DesignDetailsApprove GetState(string DesignDetailsId) + { + var q = from x in Funs.DB.Comprehensive_DesignDetailsApprove + where x.DesignDetailsId == DesignDetailsId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_DesignDetailsApprove GetApproveByApproveMan(string DesignDetailsId, string approveMan) + { + return Funs.DB.Comprehensive_DesignDetailsApprove.FirstOrDefault(x => x.DesignDetailsId == DesignDetailsId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string DesignDetailsId, string approveMan) + { + return Funs.DB.Comprehensive_DesignDetailsApprove.Where(x => x.DesignDetailsId == DesignDetailsId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string DesignDetailsId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_DesignDetailsApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(DesignDetailsId)) + { + strSql += "where i.DesignDetailsId= @DesignDetailsId "; + listStr.Add(new SqlParameter("@DesignDetailsId", DesignDetailsId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs index f3e9a4c8..21f89224 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDetailsService.cs @@ -138,6 +138,10 @@ namespace BLL newDesignDetails.AttachUrl = designDetails.AttachUrl; newDesignDetails.CompileMan = designDetails.CompileMan; newDesignDetails.CompileDate = designDetails.CompileDate; + newDesignDetails.Status = designDetails.Status; + newDesignDetails.AuditMan = designDetails.AuditMan; + + db.Comprehensive_DesignDetails.InsertOnSubmit(newDesignDetails); db.SubmitChanges(); } @@ -160,6 +164,9 @@ namespace BLL newDesignDetails.UnitWorkId = designDetails.UnitWorkId; newDesignDetails.UnitName = designDetails.UnitName; newDesignDetails.AttachUrl = designDetails.AttachUrl; + newDesignDetails.Status = designDetails.Status; + newDesignDetails.AuditMan = designDetails.AuditMan; + db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsApproveService.cs new file mode 100644 index 00000000..8266dce3 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class DesignDrawingsApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_DesignDrawingsApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove(); + + if (string.IsNullOrWhiteSpace(approve.DesignDrawingsApproveId)) + { //新增 + newApprove.DesignDrawingsApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawingsApprove)); + newApprove.DesignDrawingsId = approve.DesignDrawingsId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_DesignDrawingsApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_DesignDrawingsApprove editApprove = db.Comprehensive_DesignDrawingsApprove.FirstOrDefault(e => e.DesignDrawingsApproveId == approve.DesignDrawingsApproveId); + if (editApprove != null) + { + editApprove.DesignDrawingsId = approve.DesignDrawingsId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_DesignDrawingsApprove GetCurrentApprove(string DesignDrawingsId) + { + var q = from x in Funs.DB.Comprehensive_DesignDrawingsApprove + where x.DesignDrawingsId == DesignDrawingsId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_DesignDrawingsApprove GetState(string DesignDrawingsId) + { + var q = from x in Funs.DB.Comprehensive_DesignDrawingsApprove + where x.DesignDrawingsId == DesignDrawingsId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_DesignDrawingsApprove GetApproveByApproveMan(string DesignDrawingsId, string approveMan) + { + return Funs.DB.Comprehensive_DesignDrawingsApprove.FirstOrDefault(x => x.DesignDrawingsId == DesignDrawingsId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string DesignDrawingsId, string approveMan) + { + return Funs.DB.Comprehensive_DesignDrawingsApprove.Where(x => x.DesignDrawingsId == DesignDrawingsId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string DesignDrawingsId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_DesignDrawingsApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(DesignDrawingsId)) + { + strSql += "where i.DesignDrawingsId= @DesignDrawingsId "; + listStr.Add(new SqlParameter("@DesignDrawingsId", DesignDrawingsId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs index b7c1fc2d..7289c9c1 100644 --- a/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/DesignDrawingsService.cs @@ -122,6 +122,8 @@ namespace BLL newDesignDrawings.Remark = designDrawings.Remark; newDesignDrawings.RemarkCode = designDrawings.RemarkCode; newDesignDrawings.UnitWorkId = designDrawings.UnitWorkId; + newDesignDrawings.CompileMan = designDrawings.CompileMan; + newDesignDrawings.Status = designDrawings.Status; db.Comprehensive_DesignDrawings.InsertOnSubmit(newDesignDrawings); db.SubmitChanges(); } @@ -149,6 +151,7 @@ namespace BLL newDesignDrawings.Remark = designDrawings.Remark; newDesignDrawings.RemarkCode = designDrawings.RemarkCode; newDesignDrawings.UnitWorkId = designDrawings.UnitWorkId; + newDesignDrawings.Status = designDrawings.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentApproveService.cs new file mode 100644 index 00000000..112566ae --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class InspectionEquipmentApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_InspectionEquipmentApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove(); + + if (string.IsNullOrWhiteSpace(approve.InspectionEquipmentApprove)) + { //新增 + newApprove.InspectionEquipmentApprove = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipmentApprove)); + newApprove.InspectionEquipmentId = approve.InspectionEquipmentId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_InspectionEquipmentApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_InspectionEquipmentApprove editApprove = db.Comprehensive_InspectionEquipmentApprove.FirstOrDefault(e => e.InspectionEquipmentApprove == approve.InspectionEquipmentApprove); + if (editApprove != null) + { + editApprove.InspectionEquipmentId = approve.InspectionEquipmentId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_InspectionEquipmentApprove GetCurrentApprove(string InspectionEquipmentId) + { + var q = from x in Funs.DB.Comprehensive_InspectionEquipmentApprove + where x.InspectionEquipmentId == InspectionEquipmentId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_InspectionEquipmentApprove GetState(string InspectionEquipmentId) + { + var q = from x in Funs.DB.Comprehensive_InspectionEquipmentApprove + where x.InspectionEquipmentId == InspectionEquipmentId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_InspectionEquipmentApprove GetApproveByApproveMan(string InspectionEquipmentId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionEquipmentApprove.FirstOrDefault(x => x.InspectionEquipmentId == InspectionEquipmentId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string InspectionEquipmentId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionEquipmentApprove.Where(x => x.InspectionEquipmentId == InspectionEquipmentId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string InspectionEquipmentId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_InspectionEquipmentApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(InspectionEquipmentId)) + { + strSql += "where i.InspectionEquipmentId= @InspectionEquipmentId "; + listStr.Add(new SqlParameter("@InspectionEquipmentId", InspectionEquipmentId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs index 735e3129..9b1a20aa 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionEquipmentService.cs @@ -124,7 +124,6 @@ namespace BLL newInspectionEquipment.UnitId = inspectionEquipment.UnitId; newInspectionEquipment.InspectionCode = inspectionEquipment.InspectionCode; newInspectionEquipment.CNProfessionalId = inspectionEquipment.CNProfessionalId; - newInspectionEquipment.EquipmentOrMatail = inspectionEquipment.EquipmentOrMatail; newInspectionEquipment.InspectionName = inspectionEquipment.InspectionName; newInspectionEquipment.Specifications = inspectionEquipment.Specifications; newInspectionEquipment.Supplier = inspectionEquipment.Supplier; @@ -139,6 +138,9 @@ namespace BLL newInspectionEquipment.RemarkCode = inspectionEquipment.RemarkCode; newInspectionEquipment.UsedPlace = inspectionEquipment.UsedPlace; newInspectionEquipment.Attribute = inspectionEquipment.Attribute; + newInspectionEquipment.AuditMan = inspectionEquipment.AuditMan; + + newInspectionEquipment.Status = inspectionEquipment.Status; db.Comprehensive_InspectionEquipment.InsertOnSubmit(newInspectionEquipment); db.SubmitChanges(); } @@ -159,7 +161,6 @@ namespace BLL newInspectionEquipment.CNProfessionalId = inspectionEquipment.CNProfessionalId; newInspectionEquipment.InspectionName = inspectionEquipment.InspectionName; newInspectionEquipment.Specifications = inspectionEquipment.Specifications; - newInspectionEquipment.EquipmentOrMatail = inspectionEquipment.EquipmentOrMatail; newInspectionEquipment.Supplier = inspectionEquipment.Supplier; newInspectionEquipment.Counts = inspectionEquipment.Counts; newInspectionEquipment.SamplingCount = inspectionEquipment.SamplingCount; @@ -170,6 +171,8 @@ namespace BLL newInspectionEquipment.RemarkCode = inspectionEquipment.RemarkCode; newInspectionEquipment.UsedPlace = inspectionEquipment.UsedPlace; newInspectionEquipment.Attribute = inspectionEquipment.Attribute; + newInspectionEquipment.AuditMan = inspectionEquipment.AuditMan; + newInspectionEquipment.Status = inspectionEquipment.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineApproveService.cs new file mode 100644 index 00000000..3ada2caf --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class InspectionMachineApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_InspectionMachineApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove(); + + if (string.IsNullOrWhiteSpace(approve.InspectionMachineApproveId)) + { //新增 + newApprove.InspectionMachineApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachineApprove)); + newApprove.InspectionMachineId = approve.InspectionMachineId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_InspectionMachineApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_InspectionMachineApprove editApprove = db.Comprehensive_InspectionMachineApprove.FirstOrDefault(e => e.InspectionMachineApproveId == approve.InspectionMachineApproveId); + if (editApprove != null) + { + editApprove.InspectionMachineId = approve.InspectionMachineId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_InspectionMachineApprove GetCurrentApprove(string InspectionMachineId) + { + var q = from x in Funs.DB.Comprehensive_InspectionMachineApprove + where x.InspectionMachineId == InspectionMachineId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_InspectionMachineApprove GetState(string InspectionMachineId) + { + var q = from x in Funs.DB.Comprehensive_InspectionMachineApprove + where x.InspectionMachineId == InspectionMachineId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_InspectionMachineApprove GetApproveByApproveMan(string InspectionMachineId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionMachineApprove.FirstOrDefault(x => x.InspectionMachineId == InspectionMachineId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string InspectionMachineId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionMachineApprove.Where(x => x.InspectionMachineId == InspectionMachineId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string InspectionMachineId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_InspectionMachineApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(InspectionMachineId)) + { + strSql += "where i.InspectionMachineId= @InspectionMachineId "; + listStr.Add(new SqlParameter("@InspectionMachineId", InspectionMachineId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs index 0d624856..2c42cf4b 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionMachineService.cs @@ -127,7 +127,7 @@ namespace BLL newInspectionMachine.IsOnSite = inspectionMachine.IsOnSite; newInspectionMachine.UnitsCount = inspectionMachine.UnitsCount; newInspectionMachine.LeaveDate = inspectionMachine.LeaveDate; - + newInspectionMachine.Status = inspectionMachine.Status; db.Comprehensive_InspectionMachine.InsertOnSubmit(newInspectionMachine); db.SubmitChanges(); } @@ -158,7 +158,7 @@ namespace BLL newInspectionMachine.IsOnSite = inspectionMachine.IsOnSite; newInspectionMachine.UnitsCount = inspectionMachine.UnitsCount; newInspectionMachine.LeaveDate = inspectionMachine.LeaveDate; - + newInspectionMachine.Status = inspectionMachine.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonApproveService.cs new file mode 100644 index 00000000..2a29ee03 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class InspectionPersonApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_InspectionPersonApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove(); + + if (string.IsNullOrWhiteSpace(approve.InspectionPersonApproveId)) + { //新增 + newApprove.InspectionPersonApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPersonApprove)); + newApprove.InspectionPersonId = approve.InspectionPersonId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_InspectionPersonApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_InspectionPersonApprove editApprove = db.Comprehensive_InspectionPersonApprove.FirstOrDefault(e => e.InspectionPersonApproveId == approve.InspectionPersonApproveId); + if (editApprove != null) + { + editApprove.InspectionPersonId = approve.InspectionPersonId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_InspectionPersonApprove GetCurrentApprove(string InspectionPersonId) + { + var q = from x in Funs.DB.Comprehensive_InspectionPersonApprove + where x.InspectionPersonId == InspectionPersonId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_InspectionPersonApprove GetState(string InspectionPersonId) + { + var q = from x in Funs.DB.Comprehensive_InspectionPersonApprove + where x.InspectionPersonId == InspectionPersonId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_InspectionPersonApprove GetApproveByApproveMan(string InspectionPersonId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionPersonApprove.FirstOrDefault(x => x.InspectionPersonId == InspectionPersonId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string InspectionPersonId, string approveMan) + { + return Funs.DB.Comprehensive_InspectionPersonApprove.Where(x => x.InspectionPersonId == InspectionPersonId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string InspectionPersonId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_InspectionPersonApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(InspectionPersonId)) + { + strSql += "where i.InspectionPersonId= @InspectionPersonId "; + listStr.Add(new SqlParameter("@InspectionPersonId", InspectionPersonId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs index a0f2be1b..d629bfa4 100644 --- a/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/InspectionPersonService.cs @@ -59,6 +59,7 @@ namespace BLL newInspectionPerson.CompileDate = inspectionPerson.CompileDate; newInspectionPerson.IsOnSite = inspectionPerson.IsOnSite; newInspectionPerson.UnitWorkId = inspectionPerson.UnitWorkId; + newInspectionPerson.Status = inspectionPerson.Status; db.Comprehensive_InspectionPerson.InsertOnSubmit(newInspectionPerson); db.SubmitChanges(); } @@ -88,6 +89,7 @@ namespace BLL newInspectionPerson.CNProfessionalId = inspectionPerson.CNProfessionalId; newInspectionPerson.IsOnSite = inspectionPerson.IsOnSite; newInspectionPerson.UnitWorkId = inspectionPerson.UnitWorkId; + newInspectionPerson.Status = inspectionPerson.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/NCRManagementApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/NCRManagementApproveService.cs new file mode 100644 index 00000000..6bb1ff1a --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/NCRManagementApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class NCRManagementApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_NCRManagementApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove(); + + if (string.IsNullOrWhiteSpace(approve.NCRManagementApproveId)) + { //新增 + newApprove.NCRManagementApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagementApprove)); + newApprove.NCRManagementId = approve.NCRManagementId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_NCRManagementApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_NCRManagementApprove editApprove = db.Comprehensive_NCRManagementApprove.FirstOrDefault(e => e.NCRManagementApproveId == approve.NCRManagementApproveId); + if (editApprove != null) + { + editApprove.NCRManagementId = approve.NCRManagementId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_NCRManagementApprove GetCurrentApprove(string NCRManagementId) + { + var q = from x in Funs.DB.Comprehensive_NCRManagementApprove + where x.NCRManagementId == NCRManagementId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_NCRManagementApprove GetState(string NCRManagementId) + { + var q = from x in Funs.DB.Comprehensive_NCRManagementApprove + where x.NCRManagementId == NCRManagementId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_NCRManagementApprove GetApproveByApproveMan(string NCRManagementId, string approveMan) + { + return Funs.DB.Comprehensive_NCRManagementApprove.FirstOrDefault(x => x.NCRManagementId == NCRManagementId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string NCRManagementId, string approveMan) + { + return Funs.DB.Comprehensive_NCRManagementApprove.Where(x => x.NCRManagementId == NCRManagementId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string NCRManagementId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_NCRManagementApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(NCRManagementId)) + { + strSql += "where i.NCRManagementId= @NCRManagementId "; + listStr.Add(new SqlParameter("@NCRManagementId", NCRManagementId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs index d3c04606..fbf7b803 100644 --- a/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/NCRManagementService.cs @@ -115,6 +115,7 @@ namespace BLL newNCRManagement.ImplementationFrontState = nCRManagement.ImplementationFrontState; newNCRManagement.CompileMan = nCRManagement.CompileMan; newNCRManagement.UnitWorkId = nCRManagement.UnitWorkId; + newNCRManagement.Status = nCRManagement.Status; db.Comprehensive_NCRManagement.InsertOnSubmit(newNCRManagement); db.SubmitChanges(); } @@ -142,6 +143,7 @@ namespace BLL newNCRManagement.AttachUrl = nCRManagement.AttachUrl; newNCRManagement.ImplementationFrontState = nCRManagement.ImplementationFrontState; newNCRManagement.UnitWorkId = nCRManagement.UnitWorkId; + newNCRManagement.Status = nCRManagement.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/PressurePipeApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/PressurePipeApproveService.cs new file mode 100644 index 00000000..43e0e6a4 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/PressurePipeApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class PressurePipeApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_PressurePipeApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove(); + + if (string.IsNullOrWhiteSpace(approve.PressurePipeApproveId)) + { //新增 + newApprove.PressurePipeApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipeApprove)); + newApprove.PressurePipeId = approve.PressurePipeId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_PressurePipeApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_PressurePipeApprove editApprove = db.Comprehensive_PressurePipeApprove.FirstOrDefault(e => e.PressurePipeApproveId == approve.PressurePipeApproveId); + if (editApprove != null) + { + editApprove.PressurePipeId = approve.PressurePipeId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_PressurePipeApprove GetCurrentApprove(string PressurePipeId) + { + var q = from x in Funs.DB.Comprehensive_PressurePipeApprove + where x.PressurePipeId == PressurePipeId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_PressurePipeApprove GetState(string PressurePipeId) + { + var q = from x in Funs.DB.Comprehensive_PressurePipeApprove + where x.PressurePipeId == PressurePipeId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_PressurePipeApprove GetApproveByApproveMan(string PressurePipeId, string approveMan) + { + return Funs.DB.Comprehensive_PressurePipeApprove.FirstOrDefault(x => x.PressurePipeId == PressurePipeId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string PressurePipeId, string approveMan) + { + return Funs.DB.Comprehensive_PressurePipeApprove.Where(x => x.PressurePipeId == PressurePipeId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string PressurePipeId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_PressurePipeApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(PressurePipeId)) + { + strSql += "where i.PressurePipeId= @PressurePipeId "; + listStr.Add(new SqlParameter("@PressurePipeId", PressurePipeId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs index 24a32765..f0707b19 100644 --- a/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/PressurePipeService.cs @@ -100,7 +100,7 @@ namespace BLL newPressurePipe.PressurePipeNumber = PressurePipe.PressurePipeNumber; newPressurePipe.IssuedReportNumber = PressurePipe.IssuedReportNumber; newPressurePipe.CompileMan = PressurePipe.CompileMan; - + newPressurePipe.Status = PressurePipe.Status; db.Comprehensive_PressurePipe.InsertOnSubmit(newPressurePipe); db.SubmitChanges(); } @@ -123,7 +123,7 @@ namespace BLL newPressurePipe.CompletePackageNumber = PressurePipe.CompletePackageNumber; newPressurePipe.PressurePipeNumber = PressurePipe.PressurePipeNumber; newPressurePipe.IssuedReportNumber = PressurePipe.IssuedReportNumber; - + newPressurePipe.Status = PressurePipe.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentApproveService.cs new file mode 100644 index 00000000..58c529e3 --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class QualityAccidentApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_QualityAccidentApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove(); + + if (string.IsNullOrWhiteSpace(approve.QualityAccidentApproveId)) + { //新增 + newApprove.QualityAccidentApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccidentApprove)); + newApprove.QualityAccidentId = approve.QualityAccidentId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_QualityAccidentApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_QualityAccidentApprove editApprove = db.Comprehensive_QualityAccidentApprove.FirstOrDefault(e => e.QualityAccidentApproveId == approve.QualityAccidentApproveId); + if (editApprove != null) + { + editApprove.QualityAccidentId = approve.QualityAccidentId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_QualityAccidentApprove GetCurrentApprove(string QualityAccidentId) + { + var q = from x in Funs.DB.Comprehensive_QualityAccidentApprove + where x.QualityAccidentId == QualityAccidentId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_QualityAccidentApprove GetState(string QualityAccidentId) + { + var q = from x in Funs.DB.Comprehensive_QualityAccidentApprove + where x.QualityAccidentId == QualityAccidentId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_QualityAccidentApprove GetApproveByApproveMan(string QualityAccidentId, string approveMan) + { + return Funs.DB.Comprehensive_QualityAccidentApprove.FirstOrDefault(x => x.QualityAccidentId == QualityAccidentId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string QualityAccidentId, string approveMan) + { + return Funs.DB.Comprehensive_QualityAccidentApprove.Where(x => x.QualityAccidentId == QualityAccidentId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string QualityAccidentId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_QualityAccidentApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(QualityAccidentId)) + { + strSql += "where i.QualityAccidentId= @QualityAccidentId "; + listStr.Add(new SqlParameter("@QualityAccidentId", QualityAccidentId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs index f1cd8e4d..1ccae107 100644 --- a/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/QualityAccidentService.cs @@ -100,6 +100,7 @@ namespace BLL newQualityAccident.CompileMan = QualityAccident.CompileMan; newQualityAccident.CompileDate = QualityAccident.CompileDate; newQualityAccident.UnitWorkId = QualityAccident.UnitWorkId; + newQualityAccident.Status = QualityAccident.Status; db.Comprehensive_QualityAccident.InsertOnSubmit(newQualityAccident); db.SubmitChanges(); } @@ -124,6 +125,7 @@ namespace BLL newQualityAccident.CorrectiveActions = QualityAccident.CorrectiveActions; newQualityAccident.AttachUrl = QualityAccident.AttachUrl; newQualityAccident.UnitWorkId = QualityAccident.UnitWorkId; + newQualityAccident.Status = QualityAccident.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementApproveService.cs new file mode 100644 index 00000000..f4d0b92c --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class SiteVisaManagementApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_SiteVisaManagementApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_SiteVisaManagementApprove newApprove = new Model.Comprehensive_SiteVisaManagementApprove(); + + if (string.IsNullOrWhiteSpace(approve.SiteVisaManagementApproveId)) + { //新增 + newApprove.SiteVisaManagementApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SiteVisaManagementApprove)); + newApprove.VisaId = approve.VisaId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_SiteVisaManagementApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_SiteVisaManagementApprove editApprove = db.Comprehensive_SiteVisaManagementApprove.FirstOrDefault(e => e.SiteVisaManagementApproveId == approve.SiteVisaManagementApproveId); + if (editApprove != null) + { + editApprove.VisaId = approve.VisaId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_SiteVisaManagementApprove GetCurrentApprove(string SiteVisaManagementId) + { + var q = from x in Funs.DB.Comprehensive_SiteVisaManagementApprove + where x.VisaId == SiteVisaManagementId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_SiteVisaManagementApprove GetState(string SiteVisaManagementId) + { + var q = from x in Funs.DB.Comprehensive_SiteVisaManagementApprove + where x.VisaId == SiteVisaManagementId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_SiteVisaManagementApprove GetApproveByApproveMan(string SiteVisaManagementId, string approveMan) + { + return Funs.DB.Comprehensive_SiteVisaManagementApprove.FirstOrDefault(x => x.VisaId == SiteVisaManagementId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string SiteVisaManagementId, string approveMan) + { + return Funs.DB.Comprehensive_SiteVisaManagementApprove.Where(x => x.VisaId == SiteVisaManagementId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string SiteVisaManagementId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_SiteVisaManagementApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(SiteVisaManagementId)) + { + strSql += "where i.VisaId= @VisaId "; + listStr.Add(new SqlParameter("@VisaId", SiteVisaManagementId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs index 79a79740..e30fe577 100644 --- a/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/SiteVisaManagementService.cs @@ -134,7 +134,7 @@ namespace BLL newSiteVisaManagement.SignMan = siteVisaMangement.SignMan; newSiteVisaManagement.AuditMan = siteVisaMangement.AuditMan; newSiteVisaManagement.Remark = siteVisaMangement.Remark; - + newSiteVisaManagement.Status = siteVisaMangement.Status; db.Comprehensive_SiteVisaManagement.InsertOnSubmit(newSiteVisaManagement); db.SubmitChanges(); } @@ -167,7 +167,7 @@ namespace BLL newSiteVisaManagement.SignMan = siteVisaMangement.SignMan; newSiteVisaManagement.AuditMan = siteVisaMangement.AuditMan; newSiteVisaManagement.Remark = siteVisaMangement.Remark; - + newSiteVisaManagement.Status = siteVisaMangement.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentApproveService.cs b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentApproveService.cs new file mode 100644 index 00000000..62ebd79f --- /dev/null +++ b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentApproveService.cs @@ -0,0 +1,145 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace BLL.CQMS.Comprehensive +{ + public class SpecialEquipmentApproveService + { + + /// + /// 增加施工方案审批信息 + /// + /// 施工方案审批实体 + public static void EditApprove(Model.Comprehensive_SpecialEquipmentApprove approve) + { + var db = Funs.DB; + Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove(); + + if (string.IsNullOrWhiteSpace(approve.SpecialEquipmentApproveId)) + { //新增 + newApprove.SpecialEquipmentApproveId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipmentApprove)); + newApprove.SpecialEquipmentId = approve.SpecialEquipmentId; + newApprove.ApproveMan = approve.ApproveMan; + newApprove.ApproveDate = approve.ApproveDate; + newApprove.ApproveIdea = approve.ApproveIdea; + newApprove.IsAgree = approve.IsAgree; + newApprove.ApproveType = approve.ApproveType; + newApprove.Edition = approve.Edition; + db.Comprehensive_SpecialEquipmentApprove.InsertOnSubmit(newApprove); + db.SubmitChanges(); + } + else + { //修改 + Model.Comprehensive_SpecialEquipmentApprove editApprove = db.Comprehensive_SpecialEquipmentApprove.FirstOrDefault(e => e.SpecialEquipmentApproveId == approve.SpecialEquipmentApproveId); + if (editApprove != null) + { + editApprove.SpecialEquipmentId = approve.SpecialEquipmentId; + editApprove.ApproveMan = approve.ApproveMan; + editApprove.ApproveDate = approve.ApproveDate; + editApprove.ApproveIdea = approve.ApproveIdea; + editApprove.IsAgree = approve.IsAgree; + editApprove.ApproveType = approve.ApproveType; + editApprove.Edition = approve.Edition; + db.SubmitChanges(); + } + } + } + + + public static Model.Comprehensive_SpecialEquipmentApprove GetCurrentApprove(string SpecialEquipmentId) + { + var q = from x in Funs.DB.Comprehensive_SpecialEquipmentApprove + where x.SpecialEquipmentId == SpecialEquipmentId && x.ApproveType != "S" && x.ApproveDate == null + select x; + return q.FirstOrDefault(); + + } + + public static Model.Comprehensive_SpecialEquipmentApprove GetState(string SpecialEquipmentId) + { + var q = from x in Funs.DB.Comprehensive_SpecialEquipmentApprove + where x.SpecialEquipmentId == SpecialEquipmentId && x.ApproveType != "S" + orderby x.ApproveDate descending + select x; + var res = q.ToList(); + if (res != null && res.Count > 0) + { + var q1 = res.Where(x => x.ApproveDate == null); + var res1 = q1.FirstOrDefault(); + if (res1 != null) + { + return res1; + } + else + { + var q2 = res.Where(x => x.ApproveDate != null); + var res2 = q2.FirstOrDefault(); + if (res2 != null) + { + return res2; + } + else + { + return null; + } + } + } + else + { + return null; + } + + } + + /// + /// 获取当前用户的审核信息 + /// + /// + /// + /// + public static Model.Comprehensive_SpecialEquipmentApprove GetApproveByApproveMan(string SpecialEquipmentId, string approveMan) + { + return Funs.DB.Comprehensive_SpecialEquipmentApprove.FirstOrDefault(x => x.SpecialEquipmentId == SpecialEquipmentId && x.ApproveMan == approveMan && x.ApproveDate==null ); + } + + /// + /// 根据id 和当前用户获取审核列表 + /// + /// + /// + /// + public static List GetApproveByApproveManList(string SpecialEquipmentId, string approveMan) + { + return Funs.DB.Comprehensive_SpecialEquipmentApprove.Where(x => x.SpecialEquipmentId == SpecialEquipmentId && x.ApproveMan == approveMan).ToList(); + } + + + /// + /// 根据设备材料ID查询 审核记录 + /// + /// + /// + public static DataTable GetProjectQualityList(string SpecialEquipmentId) + { + string strSql = @"select i.* ,Sys_User.UserName from Comprehensive_SpecialEquipmentApprove as i left join Sys_User on( i.ApproveMan = Sys_User.UserId)"; + List listStr = new List(); + if (!string.IsNullOrEmpty(SpecialEquipmentId)) + { + strSql += "where i.SpecialEquipmentId= @SpecialEquipmentId "; + listStr.Add(new SqlParameter("@SpecialEquipmentId", SpecialEquipmentId)); + } + + strSql += " order by i.ApproveDate "; + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + } + +} diff --git a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs index 5b36708d..6d0f4537 100644 --- a/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/SpecialEquipmentService.cs @@ -104,7 +104,7 @@ namespace BLL newEquipment.SubmitDataNumber = SpecialEquipment.SubmitDataNumber; newEquipment.MonitoringReportNumber = SpecialEquipment.MonitoringReportNumber; newEquipment.CompileMan = SpecialEquipment.CompileMan; - + newEquipment.Status = SpecialEquipment.Status; db.Comprehensive_SpecialEquipment.InsertOnSubmit(newEquipment); db.SubmitChanges(); } @@ -126,7 +126,7 @@ namespace BLL newEquipment.InformNumber = SpecialEquipment.InformNumber; newEquipment.SubmitDataNumber = SpecialEquipment.SubmitDataNumber; newEquipment.MonitoringReportNumber = SpecialEquipment.MonitoringReportNumber; - + newEquipment.Status = SpecialEquipment.Status; db.SubmitChanges(); } } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 0bcfdab6..14ffea30 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -4235,6 +4235,326 @@ namespace BLL #endregion + #region 质量流程定义 + + #region 施工方案及审查流程定义 + + /// + /// 重报 + /// + public const string InspectionManagement_ReCompile = "0"; + + /// + /// 编制 + /// + public static string InspectionManagement_Compile = "1"; + + /// + /// 专业工程师审核 + /// + public static string InspectionManagement_Audit = "2"; + + /// + /// 审批完成 + /// + public static string InspectionManagement_Complete = "3"; + + #endregion + + #region 综合管理审核流程 + + /// + /// 重报 + /// + public const string Comprehensive_ReCompile = "0"; + + /// + /// 驳回 + /// + public const string Comprehensive_ReJect = "-1"; + + /// + /// 编制 + /// + public static string Comprehensive_Compile = "1"; + + /// + /// 专业工程师审核 + /// + public static string Comprehensive_Audit = "2"; + + /// + /// 审批完成 + /// + public static string Comprehensive_Complete = "3"; + + #endregion + + #region 现场联系单审查流程定义 + /// + /// 重报 + /// + public const string ContactForm_ReCompile = "0"; + + /// + /// 编制 + /// + public static string ContactForm_Compile = "1"; + + /// + /// 分包技术负责人审核 + /// + public static string ContactForm_Audit1 = "2"; + + /// + /// 专业工程师审核 + /// + public static string ContactForm_Audit2 = "3"; + + /// + /// 施工经理/技术质量经理审核 + /// + public static string ContactForm_Audit3 = "4"; + + /// + /// 项目费控工程师审核 + /// + public static string ContactForm_Audit4 = "5"; + + /// + /// 项目费控经理审核 + /// + public static string ContactForm_Audit5 = "6"; + + /// + /// 现场负责人/项目经理审核 + /// + public static string ContactForm_Audit6 = "7"; + + /// + ///QA/QC经理审核 + /// + public static string ContactForm_Audit7 = "8"; + + /// + /// 文控分发审核 + /// + public static string ContactForm_Audit8 = "9"; + + /// + /// 审批完成 + /// + public static string ContactForm_AuditCompleted = "P"; + #endregion + + #region 工程联络单审查流程定义 + /// + /// 重报 + /// + public const string ContactSheet_ReCompile = "0"; + + /// + /// 编制 + /// + public static string ContactSheet_Compile = "1"; + + /// + /// 分包技术负责人审核 + /// + public static string ContactSheet_Audit1 = "2"; + + /// + /// 专业工程师审核 + /// + public static string ContactSheet_Audit2 = "3"; + + /// + /// 施工经理审核 + /// + public static string ContactSheet_Audit3 = "4"; + + /// + /// QA/QC经理确认 + /// + public static string ContactSheet_Audit4 = "5"; + + /// + /// 文件上传签字盖章 + /// + public static string ContactSheet_Audit5 = "6"; + + /// + /// 费控经理 + /// + public static string ContactSheet_Audit6 = "7"; + + /// + /// 设计审批 + /// + public static string ContactSheet_Audit7 = "8"; + + /// + /// 审批完成 + /// + public static string ContactSheet_AuditCompleted = "9"; + #endregion + + #region 现场指令单审查流程定义 + /// + /// 重报 + /// + public const string InstructionSheet_ReCompile = "0"; + + /// + /// 编制 + /// + public static string InstructionSheet_Compile = "1"; + + /// + /// 施工经理审核 + /// + public static string InstructionSheet_Audit1 = "2"; + + /// + /// 项目费控经理/费控工程师审核 + /// + public static string InstructionSheet_Audit2 = "3"; + + /// + /// 控制经理审核 + /// + public static string InstructionSheet_Audit3 = "4"; + + /// + /// 现场负责人/项目经理审核 + /// + public static string InstructionSheet_Audit4 = "5"; + + /// + /// 建造部审核 + /// + public static string InstructionSheet_Audit5 = "6"; + + /// + /// 造价费控部审核 + /// + public static string InstructionSheet_Audit6 = "7"; + + /// + /// 审计部审核 + /// + public static string InstructionSheet_Audit7 = "8"; + /// + /// 总经理审核 + /// + public static string InstructionSheet_Audit8 = "9"; + /// + /// 分管副总经理审核 + /// + public static string InstructionSheet_Audit9 = "10"; + /// + /// QA/QC经理确认 + /// + public static string InstructionSheet_Audit10 = "11"; + /// + /// 文控分发 + /// + public static string InstructionSheet_Audit11 = "12"; + + /// + /// 审批完成 + /// + public static string InstructionSheet_AuditCompleted = "13"; + #endregion + + #region 分包工程签证确认单审查流程定义 + /// + /// 重报 + /// + public const string ConfirmForm_ReCompile = "0"; + + /// + /// 编制 + /// + public static string ConfirmForm_Compile = "1"; + + /// + /// 分包技术负责人审核 + /// + public static string ConfirmForm_Audit1 = "2"; + + /// + /// 专业工程师确认 + /// + public static string ConfirmForm_Audit2 = "3"; + + /// + /// 施工经理审核 + /// + public static string ConfirmForm_Audit3 = "4"; + + /// + /// 费用工程师审核 + /// + public static string ConfirmForm_Audit4 = "5"; + + /// + /// 费控经理审核 + /// + public static string ConfirmForm_Audit5 = "6"; + + /// + /// 项目经理审核 + /// + public static string ConfirmForm_Audit6 = "7"; + + /// + /// 公司主管副总经理 + /// + public static string ConfirmForm_Audit7 = "8"; + /// + /// 建造部审核 + /// + public static string ConfirmForm_Audit8 = "9"; + /// + /// 造价费控部审核 + /// + public static string ConfirmForm_Audit9 = "10"; + /// + /// 审计部审核 + /// + public static string ConfirmForm_Audit10 = "11"; + + /// + /// 公司总经理审核 + /// + public static string ConfirmForm_Audit11 = "12"; + + /// + /// 现场经理或项目经理审核 + /// + public static string ConfirmForm_Audit12 = "13"; + + /// + /// QA/QC经理确认 + /// + public static string ConfirmForm_Audit13 = "14"; + /// + /// 文控分发 + /// + public static string ConfirmForm_Audit14 = "15"; + + + /// + /// 审批完成 + /// + public static string ConfirmForm_AuditCompleted = "16"; + #endregion + + + #endregion + + #region 施工综合 #region 菜单Id /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx index b2bf2a51..204cbfb5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx @@ -33,9 +33,6 @@ - - @@ -46,7 +43,7 @@ - - + - - + - + + + + + + + @@ -97,7 +101,7 @@ - + @@ -116,6 +120,10 @@ Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Width="700px" Height="560px"> + - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("资料发放登记" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs index 61f8e0ef..33d51d44 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistribution.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class DataDistribution { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class DataDistribution + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// stxtFileCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtFileCode; - + /// /// stxtFileName 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtFileName; - + /// /// btnSearch 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -101,16 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -119,16 +112,25 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -173,7 +175,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx new file mode 100644 index 00000000..ad0ddf16 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataDistributionApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataDistributionApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.cs new file mode 100644 index 00000000..dda224ac --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class DataDistributionApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string DataDistributionId = Request.Params["Id"]; + var list = DataDistributionApproveService.GetProjectQualityList(DataDistributionId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.designer.cs new file mode 100644 index 00000000..90bbb6bf --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DataDistributionApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs index d7f3d856..2ebd1b03 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionDataIn.aspx.cs @@ -18,7 +18,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// 上传预设的虚拟路径 /// private string initPath = Const.ExcelUrl; - + /// /// 错误集合 @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 13); + AddDatasetToSQL(ds.Tables[0], 10); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -165,106 +171,84 @@ namespace FineUIPro.Web.CQMS.Comprehensive select x; var cns = from x in Funs.DB.Base_CNProfessional select x; - var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; + var installations = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; for (int i = 0; i < ir; i++) { string row0 = pds.Rows[i][0].ToString().Trim(); - if (string.IsNullOrEmpty(row0)) + if (!string.IsNullOrEmpty(row0)) { - result += (i + 2).ToString() + "," + "文件编号,为必填项!" + "|"; + var cn = cns.Where(x => x.ProfessionalName == row0.Trim()).FirstOrDefault(); + if (cn == null) + { + result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row0 + "]不存在!" + "|"; + } } - - string row1 = pds.Rows[i][1].ToString().Trim(); - if (string.IsNullOrEmpty(row1)) + string row1 = pds.Rows[i][1].ToString(); + if (!string.IsNullOrEmpty(row1)) { - result += (i + 2).ToString() + "," + "文件名称,为必填项!" + "|"; + var ins = installations.Where(x => x.UnitWorkName == row1.Trim()).FirstOrDefault(); + if (ins == null) + { + result += (i + 2).ToString() + "," + "装置/单元名称" + "," + "[" + row1 + "]不存在!" + "|"; + } } string row2 = pds.Rows[i][2].ToString(); - if (!string.IsNullOrEmpty(row2)) + if (string.IsNullOrEmpty(row2)) + { + result += (i + 2).ToString() + "," + "变更单号" + "," + "此项为必填项!" + "|"; + } + + + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row5)) { try { - DateTime date = Convert.ToDateTime(row2.Trim()); + DateTime date = Convert.ToDateTime(row5.Trim()); } catch (Exception) { - result += (i + 2).ToString() + "," + "发放日期" + "," + "[" + row2 + "]错误!" + "|"; - } - } - else - { - result += (i + 2).ToString() + "," + "发放日期,为必填项!" + "|"; - } - - string row3 = pds.Rows[i][3].ToString().Trim(); - if (!string.IsNullOrEmpty(row3)) - { - var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); - if (cn == null) - { - result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; + result += (i + 2).ToString() + "," + "下发日期" + "," + "[" + row5 + "]错误!" + "|"; } } - string row5 = pds.Rows[i][5].ToString().Trim(); - if (!string.IsNullOrEmpty(row5)) + string row6 = pds.Rows[i][6].ToString(); + if (!string.IsNullOrEmpty(row6)) { - string[] reunit = row5.Split(','); - foreach (string unit in reunit) + try { - var u = units.Where(x => x.UnitName == unit).FirstOrDefault(); - if (u == null) - { - result += (i + 2).ToString() + "," + "发件单位" + "," + "[" + unit + "]不存在!" + "|"; - } + DateTime date = Convert.ToDateTime(row6.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "业主批准时间" + "," + "[" + row6 + "]错误!" + "|"; } } string row7 = pds.Rows[i][7].ToString().Trim(); if (!string.IsNullOrEmpty(row7)) { - if (row7 != "纸质" && row7 != "电子") + string[] reunit = row7.Split(','); + foreach (string unit in reunit) { - result += (i + 2).ToString() + "," + "文件形式" + "," + "[" + row7 + "]错误!" + "|"; + var u = units.Where(x => x.UnitName == unit).FirstOrDefault(); + if (u == null) + { + result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + unit + "]不存在!" + "|"; + } } } - - string row8 = pds.Rows[i][8].ToString().Trim(); - if (!string.IsNullOrEmpty(row8)) - { - try - { - int a = Convert.ToInt32(row8.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "份数" + "," + "[" + row8 + "]错误!" + "|"; - } - } - string row9 = pds.Rows[i][9].ToString().Trim(); if (!string.IsNullOrEmpty(row9)) { - if (row9 != "是" && row9 != "否") + if (row9 != "未实施" && row9 != "进行中" && row9 != "已完成") { - result += (i + 2).ToString() + "," + "是否需回复" + "," + "[" + row9 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "处理状态" + "," + "[" + row9 + "]错误!" + "|"; } } - string row11 = pds.Rows[i][11].ToString(); - if (!string.IsNullOrEmpty(row11)) - { - try - { - DateTime date = Convert.ToDateTime(row11.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "回复日期" + "," + "[" + row11 + "]错误!" + "|"; - } - } } if (!string.IsNullOrEmpty(result)) { @@ -319,7 +303,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -339,21 +322,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -363,13 +346,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 13); + AddDatasetToSQL2(ds.Tables[0], 4); } catch (Exception ex) { @@ -412,50 +395,63 @@ namespace FineUIPro.Web.CQMS.Comprehensive var oldViewInfo = oldViewInfos.Where(x => x.ChangeOrderCode == pds.Rows[i][2].ToString().Trim()).FirstOrDefault(); if (oldViewInfo == null) { - Model.Comprehensive_DataDistribution Ins = new Model.Comprehensive_DataDistribution(); - Ins.FileCode = pds.Rows[i][0].ToString().Trim(); - Ins.FileName = pds.Rows[i][1].ToString().Trim(); - Ins.SendDate = Funs.GetNewDateTime(pds.Rows[i][2].ToString().Trim()); + Model.Comprehensive_DesignChangeOrder Ins = new Model.Comprehensive_DesignChangeOrder(); Ins.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][0].ToString().Trim())) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][0].ToString().Trim()).CNProfessionalId; } - Ins.SendMan = pds.Rows[i][4].ToString().Trim(); + + if (!string.IsNullOrEmpty(pds.Rows[i][1].ToString().Trim())) + { + Ins.UnitWorkId = Funs.DB.WBS_UnitWork.First(e => e.UnitWorkName == pds.Rows[i][1].ToString().Trim()).UnitWorkId; + } + + Ins.ChangeOrderCode = pds.Rows[i][2].ToString().Trim(); + Ins.ChangeReason = pds.Rows[i][3].ToString().Trim(); + Ins.Contents = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - Ins.ReceivingUnit = BLL.UnitService.GetUnitIds(pds.Rows[i][5].ToString().Trim()); + Ins.IssuedDate = Convert.ToDateTime(pds.Rows[i][5].ToString().Trim()); } - Ins.ReceivingMan = pds.Rows[i][6].ToString().Trim(); - string row7 = pds.Rows[i][7].ToString().Trim(); - if (!string.IsNullOrEmpty(row7)) + + if (!string.IsNullOrEmpty(pds.Rows[i][6].ToString().Trim())) { - Ins.FileType = row7 == "纸质" ? "1" : "2"; + Ins.ApprovalDate = Convert.ToDateTime(pds.Rows[i][6].ToString().Trim()); } - string row8 = pds.Rows[i][8].ToString().Trim(); - if (!string.IsNullOrEmpty(row8)) + + if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) { - Ins.CopiesCount = Funs.GetNewInt(row8); + Ins.UnitId = BLL.UnitService.GetUnitIds(pds.Rows[i][7].ToString().Trim()); } + + Ins.ImplementationFrontState = pds.Rows[i][8].ToString().Trim(); + string row9 = pds.Rows[i][9].ToString().Trim(); if (!string.IsNullOrEmpty(row9)) { - Ins.IsReply = row9 == "是" ? true : false; + if (row9 == "未实施") + { + Ins.HandleState = "1"; + } + if (row9 == "进行中") + { + Ins.HandleState = "2"; + } + if (row9 == "已完成") + { + Ins.HandleState = "3"; + } } - Ins.ReplyCode = pds.Rows[i][10].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) - { - Ins.ReplyDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); - } - Ins.Remark = pds.Rows[i][12].ToString().Trim(); - Ins.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); + Ins.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; - BLL.DataDistributionService.AddDataDistribution(Ins); + BLL.DesignChangeOrderService.AddDesignChangeOrder(Ins); } } - + } else { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx index c7726af7..314e0c4a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx @@ -23,7 +23,7 @@ - + @@ -60,7 +60,7 @@ - @@ -69,13 +69,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.cs index b0b4094d..546fe270 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.cs @@ -1,5 +1,7 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; +using System.Linq; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -22,6 +24,50 @@ namespace FineUIPro.Web.CQMS.Comprehensive } #endregion + + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtCopiesCount.Readonly = true; + this.txtFileCode.Readonly = true; + this.txtFileName.Readonly = true; + this.txtReceivingMan.Readonly = true; + this.txtRemark.Readonly = true; + this.txtSendDate.Readonly = true; + this.txtSendMan.Readonly = true; + this.drpAudit.Readonly = true; + this.drpFileType.Readonly = true; + this.drpUnitIds.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + //this.btnAttach.Enabled = false; + + + } + #region 加载 /// /// 加载页面 @@ -33,9 +79,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (!IsPostBack) { GetButtonPower(); - BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); - + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.DataDistributionId = Request.Params["DataDistributionId"]; Model.Comprehensive_DataDistribution dataDistribution = BLL.DataDistributionService.GetDataDistributionById(this.DataDistributionId); if (dataDistribution != null) @@ -75,16 +126,50 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.rblIsReply.SelectedValue = "false"; } this.txtRemark.Text = dataDistribution.Remark; + + + + var currApprove = DataDistributionApproveService.GetCurrentApprove(dataDistribution.DataDistributionId); + if (currApprove != null) + { //重新编制 编制人 可以 显示 提交 保存按钮 + this.drpAudit.SelectedValue = currApprove.ApproveMan; + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && dataDistribution.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (dataDistribution.Status == BLL.Const.Comprehensive_Compile && dataDistribution.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + } else { this.txtSendDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } #endregion - #region 保存 + /// /// 保存按钮 /// @@ -92,69 +177,247 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// protected void btnSave_Click(object sender, EventArgs e) { - SaveData(); - } - - /// - /// 保存方法 - /// - private void SaveData() - { - if (drpCNProfessionalId.SelectedValue != BLL.Const._Null) + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) { - Model.Comprehensive_DataDistribution dataDistribution = new Model.Comprehensive_DataDistribution(); - dataDistribution.ProjectId = this.CurrUser.LoginProjectId; - dataDistribution.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); - dataDistribution.FileCode = this.txtFileCode.Text.Trim(); - dataDistribution.FileName = this.txtFileName.Text.Trim(); - dataDistribution.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; - dataDistribution.SendMan = this.txtSendMan.Text.Trim(); - dataDistribution.ReceivingMan = this.txtReceivingMan.Text.Trim(); - dataDistribution.FileType = this.drpFileType.SelectedValue; - dataDistribution.CopiesCount = Funs.GetNewInt(this.txtCopiesCount.Text.Trim()); - dataDistribution.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue); - string unitIds = string.Empty; - var unitList = this.drpUnitIds.SelectedValueArray; - foreach (var item in unitList) + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_DataDistribution dataDistribution = new Model.Comprehensive_DataDistribution(); + dataDistribution.ProjectId = this.CurrUser.LoginProjectId; + dataDistribution.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); + dataDistribution.FileCode = this.txtFileCode.Text.Trim(); + dataDistribution.FileName = this.txtFileName.Text.Trim(); + dataDistribution.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + dataDistribution.SendMan = this.txtSendMan.Text.Trim(); + dataDistribution.ReceivingMan = this.txtReceivingMan.Text.Trim(); + dataDistribution.FileType = this.drpFileType.SelectedValue; + dataDistribution.CopiesCount = Funs.GetNewInt(this.txtCopiesCount.Text.Trim()); + dataDistribution.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue); + string unitIds = string.Empty; + var unitList = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitList) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + dataDistribution.ReceivingUnit = unitIds; + dataDistribution.Remark = this.txtRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + dataDistribution.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (string.IsNullOrEmpty(this.DataDistributionId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) { - unitIds += item + ","; - } - if (!string.IsNullOrEmpty(unitIds)) - { - unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); - } - dataDistribution.ReceivingUnit = unitIds; - dataDistribution.Remark = this.txtRemark.Text.Trim(); - if (string.IsNullOrEmpty(this.DataDistributionId)) - { - if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) - { - dataDistribution.DataDistributionId = this.hdAttachUrl.Text; - } - else - { - dataDistribution.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); - this.hdAttachUrl.Text = dataDistribution.DataDistributionId; - } - dataDistribution.CompileMan = this.CurrUser.UserId; - dataDistribution.CompileDate = DateTime.Now; - dataDistribution.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); - BLL.DataDistributionService.AddDataDistribution(dataDistribution); + dataDistribution.DataDistributionId = this.hdAttachUrl.Text; } else { - dataDistribution.DataDistributionId = this.DataDistributionId; - BLL.DataDistributionService.UpdateDataDistribution(dataDistribution); + dataDistribution.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); + this.hdAttachUrl.Text = dataDistribution.DataDistributionId; } - ShowNotify("保存成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataDistribution.DataDistributionId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + dataDistribution.CompileMan = this.CurrUser.UserId; + dataDistribution.CompileDate = DateTime.Now; + dataDistribution.Status = BLL.Const.Comprehensive_Compile; + dataDistribution.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); + BLL.DataDistributionService.AddDataDistribution(dataDistribution); } else { - Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + dataDistribution.DataDistributionId = this.DataDistributionId; + + + var model = Funs.DB.Comprehensive_DataDistribution.Where(u => u.DataDistributionId == this.DataDistributionId).FirstOrDefault(); + if (model != null) + { + dataDistribution.Status = model.Status; + } + else + { + dataDistribution.Status = BLL.Const.Comprehensive_Compile; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataDistributionId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + BLL.DataDistributionService.UpdateDataDistribution(dataDistribution); } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } - #endregion + + protected void btnSubmit_Click(object sender, EventArgs e) + { + + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_DataDistribution dataDistribution = new Model.Comprehensive_DataDistribution(); + dataDistribution.ProjectId = this.CurrUser.LoginProjectId; + dataDistribution.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); + dataDistribution.FileCode = this.txtFileCode.Text.Trim(); + dataDistribution.FileName = this.txtFileName.Text.Trim(); + dataDistribution.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + dataDistribution.SendMan = this.txtSendMan.Text.Trim(); + dataDistribution.ReceivingMan = this.txtReceivingMan.Text.Trim(); + dataDistribution.FileType = this.drpFileType.SelectedValue; + dataDistribution.CopiesCount = Funs.GetNewInt(this.txtCopiesCount.Text.Trim()); + dataDistribution.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + dataDistribution.AuditMan = drpAudit.SelectedValue; + } //审核人 + string unitIds = string.Empty; + var unitList = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitList) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + dataDistribution.ReceivingUnit = unitIds; + dataDistribution.Remark = this.txtRemark.Text.Trim(); + if (string.IsNullOrEmpty(this.DataDistributionId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + dataDistribution.DataDistributionId = this.hdAttachUrl.Text; + } + else + { + dataDistribution.DataDistributionId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); + this.hdAttachUrl.Text = dataDistribution.DataDistributionId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataDistribution.DataDistributionId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + dataDistribution.CompileMan = this.CurrUser.UserId; + dataDistribution.CompileDate = DateTime.Now; + dataDistribution.Status = BLL.Const.Comprehensive_Audit; + BLL.DataDistributionService.AddDataDistribution(dataDistribution); + } + else + { + dataDistribution.DataDistributionId = this.DataDistributionId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataDistributionId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + var model = Funs.DB.Comprehensive_DataDistribution.Where(u => u.DataDistributionId == this.DataDistributionId).FirstOrDefault(); + + if (model.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + dataDistribution.Status = BLL.Const.Comprehensive_Audit; + } + else if (model.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + dataDistribution.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + dataDistribution.Status = BLL.Const.Comprehensive_Complete; + } + else + { + dataDistribution.Status = BLL.Const.Comprehensive_ReCompile; + } + } + BLL.DataDistributionService.UpdateDataDistribution(dataDistribution); + } + + + + #region 审核记录 + + var currApprove = DataDistributionApproveService.GetCurrentApprove(dataDistribution.DataDistributionId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_DataDistributionApprove(); + approve.DataDistributionId = dataDistribution.DataDistributionId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + DataDistributionApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_DataDistributionApprove newApprove = new Model.Comprehensive_DataDistributionApprove(); + newApprove.DataDistributionId = dataDistribution.DataDistributionId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DataDistributionApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + DataDistributionApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_DataDistributionApprove newApprove = new Model.Comprehensive_DataDistributionApprove(); + newApprove.DataDistributionId = dataDistribution.DataDistributionId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DataDistributionApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + DataDistributionApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_DataDistributionApprove reApprove = new Model.Comprehensive_DataDistributionApprove(); + reApprove.DataDistributionId = currApprove.DataDistributionId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + reApprove.ApproveIdea = txtidea.Text; + DataDistributionApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_DataDistributionApprove reApprove = new Model.Comprehensive_DataDistributionApprove(); + reApprove.DataDistributionId = currApprove.DataDistributionId; + reApprove.ApproveMan = dataDistribution.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + DataDistributionApproveService.EditApprove(reApprove); + } + } + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + + #endregion + + + } + + #region 附件上传 /// @@ -168,7 +431,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataDistribution)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataDistribution&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataDistributionMenuId))); + var dataDistribution = BLL.DataDistributionService.GetDataDistributionById(this.DataDistributionId); + + if (dataDistribution == null || ((dataDistribution.CompileMan == CurrUser.UserId && dataDistribution.Status == BLL.Const.Comprehensive_Compile) || (dataDistribution.CompileMan == CurrUser.UserId && dataDistribution.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataDistribution&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataDistributionMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DataDistribution&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataDistributionMenuId))); + + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.designer.cs index 30ceb140..02f60d43 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataDistributionEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class DataDistributionEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DataDistributionEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// SimpleForm1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtFileCode 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFileCode; - + /// /// txtFileName 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFileName; - + /// /// txtSendDate 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtSendDate; - + /// /// drpCNProfessionalId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// txtSendMan 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSendMan; - + /// /// drpUnitIds 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// txtReceivingMan 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtReceivingMan; - + /// /// drpFileType 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpFileType; - + /// /// txtCopiesCount 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCopiesCount; - + /// /// rblIsReply 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsReply; - + /// /// txtRemark 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// Panel2 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -155,7 +157,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -164,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -173,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -182,7 +229,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx index 0c3bf09a..38f88942 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx @@ -26,7 +26,7 @@ - @@ -34,9 +34,6 @@ - - @@ -47,7 +44,7 @@ - - + - + + + + + + - + @@ -111,11 +115,15 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs index d02c60ea..55738dc4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; + namespace FineUIPro.Web.Comprehensive { @@ -30,13 +30,24 @@ namespace FineUIPro.Web.Comprehensive /// public void BindGrid() { - string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan, + string strSql = @"select DataReceivingId, DataReceivingDate, FileCode, FileName, SendUnit, SendMan, Status, (CASE WHEN FileType='1' THEN '纸质' ELSE '电子' END)as FileType, CopiesCount, ReceivingMan, FileHandler, (CASE WHEN IsReply='true' THEN '是' ELSE '否' END)as IsReply, ReplyCode, ReplyDate, Remark, AttachUrl, CompileMan, CompileDate from Comprehensive_DataReceiving C where C.ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); + + if (!string.IsNullOrEmpty(this.stxtFileCode.Text.Trim())) + { + strSql += " AND C.FileCode LIKE @stxtFileCode"; + listStr.Add(new SqlParameter("@stxtFileCode", "%" + stxtFileCode.Text.Trim() + "%")); + } + if (!string.IsNullOrEmpty(this.stxtFileName.Text.Trim())) + { + strSql += " AND C.FileName LIKE @stxtFileName"; + listStr.Add(new SqlParameter("@stxtFileName", "%" + stxtFileName.Text.Trim() + "%")); + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -254,23 +265,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("资料接收登记" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs index 8b164818..bca8c9c8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceiving.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class DataReceiving { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class DataReceiving + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// stxtFileCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtFileCode; - + /// /// stxtFileName 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtFileName; - + /// /// btnSearch 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -101,16 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -119,16 +112,25 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitNames 控件。 + /// Label3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitNames; - + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -173,7 +175,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx new file mode 100644 index 00000000..19c32e04 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DataReceivingApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DataReceivingApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.cs new file mode 100644 index 00000000..7dba1605 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class DataReceivingApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string DataReceivingId = Request.Params["Id"]; + var list = DataReceivingApproveService.GetProjectQualityList(DataReceivingId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.designer.cs new file mode 100644 index 00000000..5ad883ec --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DataReceivingApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs index 22a009c5..836c2cd8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,11 +121,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL(ds.Tables[0], 13); hdCheckResult.Text = "1"; @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -318,7 +324,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -338,21 +343,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -362,11 +367,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 13); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx index 875ca1ac..360e9a3b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx @@ -61,7 +61,7 @@ - + @@ -69,13 +69,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.cs index 5ecfb1a9..a1732e92 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.cs @@ -1,5 +1,7 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; +using System.Linq; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -34,7 +36,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive { GetButtonPower(); this.DataReceivingId = Request.Params["DataReceivingId"]; - BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; Model.Comprehensive_DataReceiving dataReceiving = BLL.DataReceivingService.GetDataReceivingById(this.DataReceivingId); if (dataReceiving != null) { @@ -72,18 +80,95 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.rblIsReply.SelectedValue = "false"; } this.txtRemark.Text = dataReceiving.Remark; + + + var currApprove = DataReceivingApproveService.GetCurrentApprove(dataReceiving.DataReceivingId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && dataReceiving.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (dataReceiving.Status == BLL.Const.Comprehensive_Compile && dataReceiving.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + } + else { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } #endregion + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtCopiesCount.Readonly = true; + this.txtDataReceivingDate.Readonly = true; + + this.txtReceivingMan.Readonly = true; + this.txtRemark.Readonly = true; + this.txtSendMan.Readonly = true; + this.drpAudit.Readonly = true; + this.drpFileType.Readonly = true; + this.drpUnitIds.Readonly = true; + //this.btnAttach.Enabled = false; + + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #region 保存 /// /// 保存按钮 /// /// /// - protected void btnSave_Click(object sender, EventArgs e) + protected void btnSubmit_Click(object sender, EventArgs e) { Model.Comprehensive_DataReceiving dataReceiving = new Model.Comprehensive_DataReceiving(); dataReceiving.ProjectId = this.CurrUser.LoginProjectId; @@ -97,6 +182,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive dataReceiving.FileHandler = this.txtFileHandler.Text.Trim(); dataReceiving.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue); dataReceiving.Remark = this.txtRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + dataReceiving.AuditMan = drpAudit.SelectedValue; + } //审核人 string unitIds = string.Empty; var unitList = this.drpUnitIds.SelectedValueArray; foreach (var item in unitList) @@ -119,18 +208,199 @@ namespace FineUIPro.Web.CQMS.Comprehensive dataReceiving.DataReceivingId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceiving)); this.hdAttachUrl.Text = dataReceiving.DataReceivingId; } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceiving.DataReceivingId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } dataReceiving.CompileMan = this.CurrUser.UserId; - dataReceiving.CompileDate = DateTime.Now; + dataReceiving.CompileDate = DateTime.Now; + dataReceiving.Status = BLL.Const.Comprehensive_Audit; BLL.DataReceivingService.AddDataReceiving(dataReceiving); } else { dataReceiving.DataReceivingId = this.DataReceivingId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + dataReceiving.Status = BLL.Const.Comprehensive_Audit; + var model = Funs.DB.Comprehensive_DataReceiving.Where(u => u.DataReceivingId == this.DataReceivingId).FirstOrDefault(); + if (model.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + dataReceiving.Status = BLL.Const.Comprehensive_Audit; + } + else if (model.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + dataReceiving.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + dataReceiving.Status = BLL.Const.Comprehensive_Complete; + } + else + { + dataReceiving.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.DataReceivingService.UpdateDataReceiving(dataReceiving); } + + + #region 审核记录 + + var currApprove = DataReceivingApproveService.GetCurrentApprove(dataReceiving.DataReceivingId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_DataReceivingApprove(); + approve.DataReceivingId = dataReceiving.DataReceivingId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + DataReceivingApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_DataReceivingApprove newApprove = new Model.Comprehensive_DataReceivingApprove(); + newApprove.DataReceivingId = dataReceiving.DataReceivingId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DataReceivingApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + DataReceivingApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_DataReceivingApprove newApprove = new Model.Comprehensive_DataReceivingApprove(); + newApprove.DataReceivingId = dataReceiving.DataReceivingId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DataReceivingApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + DataReceivingApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_DataReceivingApprove reApprove = new Model.Comprehensive_DataReceivingApprove(); + reApprove.DataReceivingId = currApprove.DataReceivingId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + //reApprove.ApproveIdea = txtidea.Text; + DataReceivingApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_DataReceivingApprove reApprove = new Model.Comprehensive_DataReceivingApprove(); + reApprove.DataReceivingId = currApprove.DataReceivingId; + reApprove.ApproveMan = dataReceiving.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + DataReceivingApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + + + protected void btnSave_Click(object sender, EventArgs e) + { + Model.Comprehensive_DataReceiving dataReceiving = new Model.Comprehensive_DataReceiving(); + dataReceiving.ProjectId = this.CurrUser.LoginProjectId; + dataReceiving.FileCode = this.txtFileCode.Text.Trim(); + dataReceiving.FileName = this.txtFileName.Text.Trim(); + dataReceiving.DataReceivingDate = Funs.GetNewDateTime(this.txtDataReceivingDate.Text); + dataReceiving.SendMan = this.txtSendMan.Text.Trim(); + dataReceiving.FileType = this.drpFileType.SelectedValue; + dataReceiving.CopiesCount = Funs.GetNewInt(this.txtCopiesCount.Text.Trim()); + dataReceiving.ReceivingMan = this.txtReceivingMan.Text.Trim(); + dataReceiving.FileHandler = this.txtFileHandler.Text.Trim(); + dataReceiving.IsReply = Convert.ToBoolean(this.rblIsReply.SelectedValue); + dataReceiving.Remark = this.txtRemark.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + dataReceiving.AuditMan = drpAudit.SelectedValue; + } //审核人 + string unitIds = string.Empty; + var unitList = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitList) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + dataReceiving.SendUnit = unitIds; + if (string.IsNullOrEmpty(this.DataReceivingId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + dataReceiving.DataReceivingId = this.hdAttachUrl.Text; + } + else + { + dataReceiving.DataReceivingId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceiving)); + this.hdAttachUrl.Text = dataReceiving.DataReceivingId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == dataReceiving.DataReceivingId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + dataReceiving.CompileMan = this.CurrUser.UserId; + dataReceiving.CompileDate = DateTime.Now; + dataReceiving.Status = Const.Comprehensive_Compile; + BLL.DataReceivingService.AddDataReceiving(dataReceiving); + } + else + { + dataReceiving.DataReceivingId = this.DataReceivingId; + Model.Comprehensive_DataReceiving model = BLL.DataReceivingService.GetDataReceivingById(this.DataReceivingId); + if (model != null) + { + dataReceiving.Status = model.Status; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DataReceivingId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + BLL.DataReceivingService.UpdateDataReceiving(dataReceiving); + } + + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion #region 附件上传 @@ -145,7 +415,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DataReceiving)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataReceiving&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingMenuId))); + Model.Comprehensive_DataReceiving dataReceiving = BLL.DataReceivingService.GetDataReceivingById(this.DataReceivingId); + if (dataReceiving == null || ((dataReceiving.CompileMan == CurrUser.UserId && dataReceiving.Status == BLL.Const.Comprehensive_Compile) || (dataReceiving.CompileMan == CurrUser.UserId && dataReceiving.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DataReceiving&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DataReceiving&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DataReceivingMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.designer.cs index 7893bb1c..fc511306 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class DataReceivingEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DataReceivingEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtFileCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFileCode; - + /// /// txtFileName 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFileName; - + /// /// drpUnitIds 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// txtDataReceivingDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtDataReceivingDate; - + /// /// txtSendMan 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSendMan; - + /// /// drpFileType 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpFileType; - + /// /// txtCopiesCount 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCopiesCount; - + /// /// txtReceivingMan 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtReceivingMan; - + /// /// txtFileHandler 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtFileHandler; - + /// /// rblIsReply 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsReply; - + /// /// txtRemark 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// Panel2 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -164,7 +166,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -173,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -182,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -191,7 +238,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx index 19eb2027..683509cd 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx @@ -31,7 +31,7 @@ - @@ -39,9 +39,6 @@ - - @@ -56,7 +53,7 @@ - + - - - + - + + + + + +
- /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设计变更单管理" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs index bbd2e020..9393d37d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class DesignChangeOrder { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class DesignChangeOrder + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpCNProfessionalId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpCNProfessionalId; - + /// /// stxtContents 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtContents; - + /// /// txtStarTime 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStarTime; - + /// /// Label1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// txtEndTime 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndTime; - + /// /// btnSearch 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -128,16 +130,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -146,25 +139,34 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + /// - /// lbUnitName 控件。 + /// Label3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitName; - + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -200,7 +202,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -209,7 +211,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -218,7 +229,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -227,7 +238,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx new file mode 100644 index 00000000..397b9b91 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignChangeOrderApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignChangeOrderApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.cs new file mode 100644 index 00000000..e0a55fc7 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class DesignChangeOrderApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string DesignChangeOrderId = Request.Params["Id"]; + var list = DesignChangeOrderApproveService.GetProjectQualityList(DesignChangeOrderId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.designer.cs new file mode 100644 index 00000000..d40a8c7b --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignChangeOrderApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs index 30cd4cbd..4d7b35fc 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,11 +121,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL(ds.Tables[0], 12); hdCheckResult.Text = "1"; @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -297,7 +303,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -317,21 +322,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -341,11 +346,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 12); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx index ae9d1c4b..c75bf04a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx @@ -52,7 +52,7 @@ - + @@ -60,13 +60,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs index 03007cd7..c43dce51 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs @@ -1,5 +1,7 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; +using System.Linq; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -37,7 +39,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false); BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); - + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.DesignChangeOrderId = Request.Params["DesignChangeOrderId"]; Model.Comprehensive_DesignChangeOrder designChangeOrder = BLL.DesignChangeOrderService.GetDesignChangeOrderById(this.DesignChangeOrderId); if (designChangeOrder != null) @@ -72,15 +79,99 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", designChangeOrder.CompleteDate); } this.txtImplementationFrontState.Text = designChangeOrder.ImplementationFrontState; + + + + var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designChangeOrder.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (designChangeOrder.Status == BLL.Const.Comprehensive_Compile && designChangeOrder.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + + + + } else { this.txtIssuedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtApprovalDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtApprovalDate.Readonly = true; + txtChangeOrderCode.Readonly = true; + txtChangeReason.Readonly = true; + txtCompleteDate.Readonly = true; + txtContents.Readonly = true; + txtImplementationFrontState.Readonly = true; + txtIssuedDate.Readonly = true; + drpCNProfessionalId.Readonly = true; + drpUnitIds.Readonly = true; + drpUnitWorks.Readonly = true; + this.drpAudit.Readonly = true; + // this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + + #endregion #region 保存 @@ -109,6 +200,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive designChangeOrder.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text); designChangeOrder.CompleteDate = Funs.GetNewDateTime(this.txtCompleteDate.Text); designChangeOrder.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designChangeOrder.AuditMan = drpAudit.SelectedValue; + } //审核人 string unitWorks = string.Empty; var unitWorksList = this.drpUnitWorks.SelectedValueArray; foreach (var item in unitWorksList) @@ -143,18 +238,229 @@ namespace FineUIPro.Web.CQMS.Comprehensive designChangeOrder.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); this.hdAttachUrl.Text = designChangeOrder.DesignChangeOrderId; } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designChangeOrder.DesignChangeOrderId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + designChangeOrder.CompileMan = this.CurrUser.UserId; designChangeOrder.CompileDate = DateTime.Now; + designChangeOrder.Status = BLL.Const.Comprehensive_Compile; BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder); } else { designChangeOrder.DesignChangeOrderId = this.DesignChangeOrderId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designChangeOrder.DesignChangeOrderId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.Comprehensive_DesignChangeOrder.Where(u => u.DesignChangeOrderId == this.DesignChangeOrderId).FirstOrDefault(); + if (model != null) + { + designChangeOrder.Status = model.Status; + } BLL.DesignChangeOrderService.UpdateDesignChangeOrder(designChangeOrder); - } + } + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_DesignChangeOrder designChangeOrder = new Model.Comprehensive_DesignChangeOrder(); + designChangeOrder.ProjectId = this.CurrUser.LoginProjectId; + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + designChangeOrder.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + designChangeOrder.ChangeOrderCode = this.txtChangeOrderCode.Text.Trim(); + designChangeOrder.ChangeReason = this.txtChangeReason.Text.Trim(); + designChangeOrder.Contents = this.txtContents.Text.Trim(); + designChangeOrder.IssuedDate = Funs.GetNewDateTime(this.txtIssuedDate.Text); + designChangeOrder.ApprovalDate = Funs.GetNewDateTime(this.txtApprovalDate.Text); + designChangeOrder.CompleteDate = Funs.GetNewDateTime(this.txtCompleteDate.Text); + designChangeOrder.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designChangeOrder.AuditMan = drpAudit.SelectedValue; + } //审核人 + string unitWorks = string.Empty; + var unitWorksList = this.drpUnitWorks.SelectedValueArray; + foreach (var item in unitWorksList) + { + unitWorks += item + ","; + } + if (!string.IsNullOrEmpty(unitWorks)) + { + unitWorks = unitWorks.Substring(0, unitWorks.LastIndexOf(',')); + } + designChangeOrder.UnitWorkId = unitWorks; + + string unitIds = string.Empty; + var unitLists = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitLists) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(',')); + } + designChangeOrder.UnitId = unitIds; + if (string.IsNullOrEmpty(this.DesignChangeOrderId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + designChangeOrder.DesignChangeOrderId = this.hdAttachUrl.Text; + } + else + { + designChangeOrder.DesignChangeOrderId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); + this.hdAttachUrl.Text = designChangeOrder.DesignChangeOrderId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designChangeOrder.DesignChangeOrderId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + designChangeOrder.CompileMan = this.CurrUser.UserId; + designChangeOrder.CompileDate = DateTime.Now; + designChangeOrder.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder); + } + else + { + designChangeOrder.DesignChangeOrderId = this.DesignChangeOrderId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designChangeOrder.DesignChangeOrderId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + + var oldDesignChangeOrder = Funs.DB.Comprehensive_DesignChangeOrder.Where(u => u.DesignChangeOrderId == this.DesignChangeOrderId).FirstOrDefault(); + if (oldDesignChangeOrder == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + designChangeOrder.CompileMan = this.CurrUser.UserId; + designChangeOrder.CompileDate = DateTime.Now; + designChangeOrder.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignChangeOrderService.AddDesignChangeOrder(designChangeOrder); + } + else + { + designChangeOrder.CompileMan = oldDesignChangeOrder.CompileMan; + designChangeOrder.CompileDate = oldDesignChangeOrder.CompileDate; + if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + designChangeOrder.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldDesignChangeOrder.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + designChangeOrder.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + designChangeOrder.Status = BLL.Const.Comprehensive_Complete; + } + else + { + designChangeOrder.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.DesignChangeOrderService.UpdateDesignChangeOrder(designChangeOrder); + + } + + } + #region 审核记录 + + var currApprove = DesignChangeOrderApproveService.GetCurrentApprove(designChangeOrder.DesignChangeOrderId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_DesignChangeOrderApprove(); + approve.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + DesignChangeOrderApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove(); + newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + DesignChangeOrderApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_DesignChangeOrderApprove newApprove = new Model.Comprehensive_DesignChangeOrderApprove(); + newApprove.DesignChangeOrderId = designChangeOrder.DesignChangeOrderId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignChangeOrderApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + DesignChangeOrderApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove(); + reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + //reApprove.ApproveIdea = txtidea.Text; + DesignChangeOrderApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_DesignChangeOrderApprove reApprove = new Model.Comprehensive_DesignChangeOrderApprove(); + reApprove.DesignChangeOrderId = currApprove.DesignChangeOrderId; + reApprove.ApproveMan = designChangeOrder.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + DesignChangeOrderApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion #region 附件上传 @@ -169,7 +475,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignChangeOrder)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId))); + Model.Comprehensive_DesignChangeOrder designChangeOrder = BLL.DesignChangeOrderService.GetDesignChangeOrderById(this.DesignChangeOrderId); + if (designChangeOrder == null || ((designChangeOrder.CompileMan == CurrUser.UserId && designChangeOrder.Status == BLL.Const.Comprehensive_Compile) || (designChangeOrder.CompileMan == CurrUser.UserId && designChangeOrder.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/DesignChangeOrder&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignChangeOrderMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.designer.cs index 181c41ef..0bf36a10 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class DesignChangeOrderEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignChangeOrderEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpCNProfessionalId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// drpUnitWorks 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorks; - + /// /// drpUnitIds 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// txtChangeOrderCode 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtChangeOrderCode; - + /// /// txtChangeReason 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtChangeReason; - + /// /// txtContents 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtContents; - + /// /// txtIssuedDate 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtIssuedDate; - + /// /// txtApprovalDate 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtApprovalDate; - + /// /// txtImplementationFrontState 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtImplementationFrontState; - + /// /// txtCompleteDate 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtCompleteDate; - + /// /// Panel2 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -155,7 +157,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -164,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -173,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -182,7 +229,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx index 56eb37e0..a08d10cc 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx @@ -21,15 +21,12 @@ - - - @@ -48,19 +45,26 @@ - - + - + + + + + + + - + @@ -88,6 +92,10 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs index faa1c877..5f36ce1c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; - namespace FineUIPro.Web.Comprehensive { public partial class DesignDetails : PageBase @@ -27,7 +25,7 @@ namespace FineUIPro.Web.Comprehensive } public void BindGrid() { - string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId, + string strSql = @"select DesignDetailsId,DesignDetailsCode, DetailsMan, DetailsDate, UnitWorkId,Status, UnitName, AttachUrl, CompileMan, CN.ProfessionalName from Comprehensive_DesignDetails C left join Base_CNProfessional CN on C.CNProfessionalId=CN.CNProfessionalId @@ -270,23 +268,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设计交底管理" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs index 43aa169d..5e43fac6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class DesignDetails { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class DesignDetails + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpCNProfessionalId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpCNProfessionalId; - + /// /// btnSearch 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -83,16 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -101,25 +94,34 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + /// - /// lbUnitName 控件。 + /// Label1 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitName; - + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -155,7 +157,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx new file mode 100644 index 00000000..eb33113d --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDetailsApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignDetailsApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.cs new file mode 100644 index 00000000..f49c37a6 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class DesignDetailsApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string DesignDetailsId = Request.Params["Id"]; + var list = DesignDetailsApproveService.GetProjectQualityList(DesignDetailsId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.designer.cs new file mode 100644 index 00000000..a4ee13ec --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignDetailsApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx index 93ddc60a..1a93c431 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx @@ -49,13 +49,46 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs index 71fe2a32..e147d3fa 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs @@ -1,5 +1,7 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; +using System.Linq; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -35,6 +37,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorks, this.CurrUser.LoginProjectId, false); BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.DesignDetailsId = Request.Params["DesignDetailsId"]; Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId); if (designDetails != null) @@ -59,13 +67,94 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.drpUnitIds.SelectedValueArray = designDetails.UnitName.Split(','); } + var auditApprove = DesignDetailsApproveService.GetAuditApprove(designDetails.DesignDetailsId, BLL.Const.Comprehensive_Audit); + if (auditApprove!=null) + { + drpAudit.SelectedValue = auditApprove.ApproveMan; + + } + var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDetails.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (designDetails.Status == BLL.Const.Comprehensive_Compile && designDetails.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + } else { this.txtDetailsDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtDesignDetailsCode.Readonly = true; + this.txtDetailsDate.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtDetailsMan.Readonly = true; + this.drpUnitIds.Readonly = true; + this.drpUnitWorks.Readonly = true; + + this.drpAudit.Readonly = true; + + //this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #endregion #region 保存 @@ -83,6 +172,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive } Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails(); designDetails.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designDetails.AuditMan = drpAudit.SelectedValue; + } //审核人 if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) { designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; @@ -127,18 +220,226 @@ namespace FineUIPro.Web.CQMS.Comprehensive designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails)); this.hdAttachUrl.Text = designDetails.DesignDetailsId; } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDetails.DesignDetailsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } designDetails.CompileMan = this.CurrUser.UserId; designDetails.CompileDate = DateTime.Now; + designDetails.Status = BLL.Const.Comprehensive_Compile; BLL.DesignDetailsService.AddDesignDetails(designDetails); } else { designDetails.DesignDetailsId = this.DesignDetailsId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDetailsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault(); + if (model != null) + { + designDetails.Status = model.Status; + } BLL.DesignDetailsService.UpdateDesignDetails(designDetails); - } + } ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_DesignDetails designDetails = new Model.Comprehensive_DesignDetails(); + designDetails.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designDetails.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + designDetails.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + designDetails.DesignDetailsCode = this.txtDesignDetailsCode.Text.Trim(); + designDetails.DetailsMan = this.txtDetailsMan.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtDetailsDate.Text)) + { + designDetails.DetailsDate = Convert.ToDateTime(this.txtDetailsDate.Text); + } + string ids = string.Empty; + var lists = this.drpUnitWorks.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + designDetails.UnitWorkId = ids; + + string unitIds = string.Empty; + var units = this.drpUnitIds.SelectedValueArray; + foreach (var item in units) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + designDetails.UnitName = unitIds; + if (string.IsNullOrEmpty(this.DesignDetailsId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + designDetails.DesignDetailsId = this.hdAttachUrl.Text; + } + else + { + designDetails.DesignDetailsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails)); + this.hdAttachUrl.Text = designDetails.DesignDetailsId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDetails.DesignDetailsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + designDetails.CompileMan = this.CurrUser.UserId; + designDetails.CompileDate = DateTime.Now; + designDetails.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignDetailsService.AddDesignDetails(designDetails); + } + else + { + designDetails.DesignDetailsId = this.DesignDetailsId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDetailsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var oldDesignDetails = Funs.DB.Comprehensive_DesignDetails.Where(u => u.DesignDetailsId == this.DesignDetailsId).FirstOrDefault(); + if (oldDesignDetails == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + designDetails.CompileMan = this.CurrUser.UserId; + designDetails.CompileDate = DateTime.Now; + designDetails.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignDetailsService.AddDesignDetails(designDetails); + } + else + { + designDetails.CompileMan = oldDesignDetails.CompileMan; + designDetails.CompileDate = oldDesignDetails.CompileDate; + if (oldDesignDetails.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + designDetails.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldDesignDetails.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + designDetails.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + designDetails.Status = BLL.Const.Comprehensive_Complete; + } + else + { + designDetails.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.DesignDetailsService.UpdateDesignDetails(designDetails); + + } + + } + #region 审核记录 + + var currApprove = DesignDetailsApproveService.GetCurrentApprove(designDetails.DesignDetailsId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_DesignDetailsApprove(); + approve.DesignDetailsId = designDetails.DesignDetailsId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + DesignDetailsApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove(); + newApprove.DesignDetailsId = designDetails.DesignDetailsId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + DesignDetailsApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_DesignDetailsApprove newApprove = new Model.Comprehensive_DesignDetailsApprove(); + newApprove.DesignDetailsId = designDetails.DesignDetailsId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignDetailsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + DesignDetailsApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove(); + reApprove.DesignDetailsId = currApprove.DesignDetailsId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + // reApprove.ApproveIdea = txtidea.Text; + DesignDetailsApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_DesignDetailsApprove reApprove = new Model.Comprehensive_DesignDetailsApprove(); + reApprove.DesignDetailsId = currApprove.DesignDetailsId; + reApprove.ApproveMan = designDetails.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + DesignDetailsApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion #region 附件上传 @@ -153,7 +454,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDetails)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId))); + Model.Comprehensive_DesignDetails designDetails = BLL.DesignDetailsService.GetDesignDetailsById(this.DesignDetailsId); + if (designDetails == null || ((designDetails.CompileMan == CurrUser.UserId && designDetails.Status == BLL.Const.Comprehensive_Compile) || (designDetails.CompileMan == CurrUser.UserId && designDetails.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId))); + } + else + { + + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDetails&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDetailsMenuId))); + } } #endregion } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs index 773b8ba8..cd901ad5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class DesignDetailsEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignDetailsEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpCNProfessionalId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// txtDesignDetailsCode 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtDesignDetailsCode; - + /// /// txtDetailsMan 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtDetailsMan; - + /// /// txtDetailsDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtDetailsDate; - + /// /// drpUnitWorks 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorks; - + /// /// drpUnitIds 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// Panel2 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -119,7 +121,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -128,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -137,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -146,7 +193,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx index 0a82a214..a3b29823 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx @@ -35,9 +35,6 @@ - - @@ -53,7 +50,7 @@ - + - - - - + + + + + + + - + @@ -109,11 +113,15 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs index 0c1af645..c5e13e95 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -22,7 +21,7 @@ namespace FineUIPro.Web.Comprehensive if (!IsPostBack) { GetButtonPower(); - BLL.DesignProfessionalService.InitDesignProfessionalDownList(this.sdrpCNProfessionalId, true); + BLL.CNProfessionalService.InitCNProfessionalDownList(this.sdrpCNProfessionalId, true); BindGrid(); } } @@ -46,10 +45,11 @@ namespace FineUIPro.Web.Comprehensive C.Remark, C.RemarkCode, C.UnitWorkId, + C.Status, CN.ProfessionalName" + @" FROM Comprehensive_DesignDrawings C " - + @" LEFT JOIN Base_DesignProfessional CN ON C.CNProfessionalId=CN.DesignProfessionalId" - + @" WHERE C.ProjectId = @ProjectId"; + +@" LEFT JOIN Base_CNProfessional CN ON C.CNProfessionalId=CN.CNProfessionalId" + +@" WHERE C.ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); if (sdrpCNProfessionalId.SelectedValue != BLL.Const._Null) @@ -59,13 +59,13 @@ namespace FineUIPro.Web.Comprehensive } if (!string.IsNullOrEmpty(this.stxtReceiveDate.Text.Trim())) { - strSql += " AND C.ReceiveDate=@ReceiveDate"; - listStr.Add(new SqlParameter("@ReceiveDate", stxtReceiveDate.Text.Trim())); + strSql += " AND C.ReceiveDate='"+ stxtReceiveDate.Text.Trim()+"'"; + } if (!string.IsNullOrEmpty(this.stxtSendDate.Text.Trim())) { - strSql += " AND C.SendDate=@SendDate"; - listStr.Add(new SqlParameter("@SendDate", stxtSendDate.Text.Trim())); + strSql += " AND C.SendDate='"+stxtSendDate.Text.Trim()+"'"; + } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -314,23 +314,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("图纸收发记录" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs index 42448249..56749638 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class DesignDrawings { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class DesignDrawings + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpCNProfessionalId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpCNProfessionalId; - + /// /// stxtReceiveDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker stxtReceiveDate; - + /// /// stxtSendDate 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker stxtSendDate; - + /// /// btnSearch 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -110,16 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -128,25 +121,34 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + /// - /// lbUnitName 控件。 + /// Label3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitName; - + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -191,7 +193,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx new file mode 100644 index 00000000..ca1c8bb1 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DesignDrawingsApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.DesignDrawingsApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.cs new file mode 100644 index 00000000..8c35047a --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class DesignDrawingsApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string DesignDrawingsId = Request.Params["Id"]; + var list = DesignDrawingsApproveService.GetProjectQualityList(DesignDrawingsId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.designer.cs new file mode 100644 index 00000000..6f1db6c2 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignDrawingsApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs index cd949170..73be3523 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,11 +121,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL(ds.Tables[0], 11); hdCheckResult.Text = "1"; @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -168,7 +174,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive where y.ProjectId == this.CurrUser.LoginProjectId select x; - var cns = from x in Funs.DB.Base_DesignProfessional select x; + var cns = from x in Funs.DB.Base_CNProfessional select x; for (int i = 0; i < ir; i++) { @@ -315,7 +321,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -335,21 +340,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -359,11 +364,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 11); } @@ -402,7 +407,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive where y.ProjectId == this.CurrUser.LoginProjectId select x; - var cns = from x in Funs.DB.Base_DesignProfessional select x; + var cns = from x in Funs.DB.Base_CNProfessional select x; for (int i = 0; i < ir; i++) { @@ -416,7 +421,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Model.Comprehensive_DesignDrawings des = new Model.Comprehensive_DesignDrawings(); des.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); des.ProjectId = this.CurrUser.LoginProjectId; - des.CNProfessionalId = cn.DesignProfessionalId; + des.CNProfessionalId = cn.CNProfessionalId; des.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim(); des.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim(); des.Edition = pds.Rows[i][3].ToString().Trim(); @@ -443,7 +448,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } else { - oldViewInfo.CNProfessionalId = cn.DesignProfessionalId; + oldViewInfo.CNProfessionalId = cn.CNProfessionalId; oldViewInfo.DesignDrawingsCode = pds.Rows[i][1].ToString().Trim(); oldViewInfo.DesignDrawingsContent = pds.Rows[i][2].ToString().Trim(); oldViewInfo.Edition = pds.Rows[i][3].ToString().Trim(); @@ -502,8 +507,8 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (e.EventArgument == "Confirm_OK") { string rootPath = Server.MapPath("~/"); - string uploadfilepath = rootPath + Const.DesignDrawingsDataInUrl; - string filePath = Const.DesignDrawingsDataInUrl; + string uploadfilepath = rootPath + Const.DesignChangeOrderDataInUrl; + string filePath = Const.DesignChangeOrderDataInUrl; string fileName = Path.GetFileName(filePath); FileInfo info = new FileInfo(uploadfilepath); long fileSize = info.Length; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx index 8cd36034..0b9f4b4d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx @@ -14,7 +14,7 @@ - + @@ -62,7 +62,7 @@ - @@ -71,13 +71,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs index 71291acf..2d814166 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -34,9 +35,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (!IsPostBack) { GetButtonPower(); - BLL.DesignProfessionalService.InitDesignProfessionalDownList(this.drpCNProfessionalId, true); + BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false); - BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.DesignDrawingsId = Request.Params["DesignDrawingsId"]; Model.Comprehensive_DesignDrawings designDrawings = BLL.DesignDrawingsService.GetDesignDrawingsById(this.DesignDrawingsId); if (designDrawings != null) @@ -64,9 +71,91 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtReceiveMan.Text = designDrawings.ReceiveMan; this.txtRemark.Text = designDrawings.Remark; this.txtRemarkCode.Text = designDrawings.RemarkCode; + + + var currApprove = DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId); + if (currApprove != null) + { //重新编制 编制人 可以 显示 提交 保存按钮 + + this.drpAudit.SelectedValue = currApprove.ApproveMan; + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && designDrawings.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (designDrawings.Status == BLL.Const.Comprehensive_Compile && designDrawings.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + } + else + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtDesignDrawingsCode.Readonly = true; + this.txtDesignDrawingsContent.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtEdition.Readonly = true; + this.txtPageNumber.Readonly = true; + this.txtReceiveDate.Readonly = true; + this.txtReceiveMan.Readonly = true; + this.txtRemark.Readonly = true; + this.txtRemarkCode.Readonly = true; + this.txtSendDate.Readonly = true; + this.drpAudit.Readonly = true; + //this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + + + #endregion #region 保存 @@ -77,77 +166,286 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// protected void btnSave_Click(object sender, EventArgs e) { - SaveData(); + + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + + Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings(); + designDrawings.ProjectId = this.CurrUser.LoginProjectId; + designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + designDrawings.DesignDrawingsCode = this.txtDesignDrawingsCode.Text.Trim(); + designDrawings.DesignDrawingsContent = this.txtDesignDrawingsContent.Text.Trim(); + designDrawings.Edition = this.txtEdition.Text.Trim(); + designDrawings.PageNumber = Funs.GetNewInt(this.txtPageNumber.Text.Trim()); + designDrawings.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text); + designDrawings.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); + designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim(); + designDrawings.Remark = this.txtRemark.Text.Trim(); + designDrawings.CompileMan = this.CurrUser.UserId; + designDrawings.RemarkCode = this.txtRemarkCode.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designDrawings.AuditMan = drpAudit.SelectedValue; + } //审核人 + string ids = string.Empty; + var lists = this.drpUnitWorkIds.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + designDrawings.UnitWorkId = ids; + + string unitIds = string.Empty; + var unitLists = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitLists) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + designDrawings.ReceiveUnits = unitIds; + if (!string.IsNullOrEmpty(this.DesignDrawingsId)) + { + designDrawings.DesignDrawingsId = this.DesignDrawingsId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDrawingsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + var model = Funs.DB.Comprehensive_DesignDrawings.Where(u => u.DesignDrawingsId == this.DesignDrawingsId).FirstOrDefault(); + if (model != null) + { + + designDrawings.Status = model.Status; + } + BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings); + } + else + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + designDrawings.DesignDrawingsId = this.hdAttachUrl.Text; + } + else + { + designDrawings.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); + this.hdAttachUrl.Text = designDrawings.DesignDrawingsId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDrawings.DesignDrawingsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + designDrawings.Status = BLL.Const.Comprehensive_Compile; + BLL.DesignDrawingsService.AddDesignDrawings(designDrawings); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + + } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings(); + designDrawings.ProjectId = this.CurrUser.LoginProjectId; + designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + designDrawings.DesignDrawingsCode = this.txtDesignDrawingsCode.Text.Trim(); + designDrawings.DesignDrawingsContent = this.txtDesignDrawingsContent.Text.Trim(); + designDrawings.Edition = this.txtEdition.Text.Trim(); + designDrawings.PageNumber = Funs.GetNewInt(this.txtPageNumber.Text.Trim()); + designDrawings.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text); + designDrawings.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); + designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim(); + designDrawings.Remark = this.txtRemark.Text.Trim(); + designDrawings.CompileMan = this.CurrUser.UserId; + designDrawings.RemarkCode = this.txtRemarkCode.Text.Trim(); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + designDrawings.AuditMan = drpAudit.SelectedValue; + } //审核人 + string ids = string.Empty; + var lists = this.drpUnitWorkIds.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + designDrawings.UnitWorkId = ids; + + string unitIds = string.Empty; + var unitLists = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitLists) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + designDrawings.ReceiveUnits = unitIds; + if (!string.IsNullOrEmpty(this.DesignDrawingsId)) + { + designDrawings.DesignDrawingsId = this.DesignDrawingsId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.DesignDrawingsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + //BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings); + var oldDesignDrawings = Funs.DB.Comprehensive_DesignDrawings.Where(u => u.DesignDrawingsId == this.DesignDrawingsId).FirstOrDefault(); + if (oldDesignDrawings == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + designDrawings.CompileMan = this.CurrUser.UserId; + designDrawings.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignDrawingsService.AddDesignDrawings(designDrawings); + } + else + { + designDrawings.CompileMan = oldDesignDrawings.CompileMan; + if (oldDesignDrawings.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + designDrawings.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldDesignDrawings.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + designDrawings.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + designDrawings.Status = BLL.Const.Comprehensive_Complete; + } + else + { + designDrawings.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings); + + } + } + else + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + designDrawings.DesignDrawingsId = this.hdAttachUrl.Text; + } + else + { + designDrawings.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); + this.hdAttachUrl.Text = designDrawings.DesignDrawingsId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == designDrawings.DesignDrawingsId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + designDrawings.Status = BLL.Const.Comprehensive_Audit; + BLL.DesignDrawingsService.AddDesignDrawings(designDrawings); + } + + + + + + #region 审核记录 + + var currApprove =DesignDrawingsApproveService.GetCurrentApprove(designDrawings.DesignDrawingsId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_DesignDrawingsApprove(); + approve.DesignDrawingsId = designDrawings.DesignDrawingsId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + DesignDrawingsApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove(); + newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + DesignDrawingsApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_DesignDrawingsApprove newApprove = new Model.Comprehensive_DesignDrawingsApprove(); + newApprove.DesignDrawingsId = designDrawings.DesignDrawingsId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + DesignDrawingsApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + DesignDrawingsApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove(); + reApprove.DesignDrawingsId = currApprove.DesignDrawingsId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + // reApprove.ApproveIdea = txtidea.Text; + DesignDrawingsApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_DesignDrawingsApprove reApprove = new Model.Comprehensive_DesignDrawingsApprove(); + reApprove.DesignDrawingsId = currApprove.DesignDrawingsId; + reApprove.ApproveMan = designDrawings.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + DesignDrawingsApproveService.EditApprove(reApprove); + } + } + } + + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + + #endregion + + + } /// /// 保存方法 /// - private void SaveData() - { - if (drpCNProfessionalId.SelectedValue != BLL.Const._Null) - { - Model.Comprehensive_DesignDrawings designDrawings = new Model.Comprehensive_DesignDrawings(); - designDrawings.ProjectId = this.CurrUser.LoginProjectId; - designDrawings.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; - designDrawings.DesignDrawingsCode = this.txtDesignDrawingsCode.Text.Trim(); - designDrawings.DesignDrawingsContent = this.txtDesignDrawingsContent.Text.Trim(); - designDrawings.Edition = this.txtEdition.Text.Trim(); - designDrawings.PageNumber = Funs.GetNewInt(this.txtPageNumber.Text.Trim()); - designDrawings.ReceiveDate = Funs.GetNewDateTime(this.txtReceiveDate.Text); - designDrawings.SendDate = Funs.GetNewDateTime(this.txtSendDate.Text); - designDrawings.ReceiveMan = this.txtReceiveMan.Text.Trim(); - designDrawings.Remark = this.txtRemark.Text.Trim(); - designDrawings.RemarkCode = this.txtRemarkCode.Text.Trim(); - string ids = string.Empty; - var lists = this.drpUnitWorkIds.SelectedValueArray; - foreach (var item in lists) - { - ids += item + ","; - } - if (!string.IsNullOrEmpty(ids)) - { - ids = ids.Substring(0, ids.LastIndexOf(",")); - } - designDrawings.UnitWorkId = ids; - string unitIds = string.Empty; - var unitLists = this.drpUnitIds.SelectedValueArray; - foreach (var item in unitLists) - { - unitIds += item + ","; - } - if (!string.IsNullOrEmpty(unitIds)) - { - unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); - } - designDrawings.ReceiveUnits = unitIds; - if (!string.IsNullOrEmpty(this.DesignDrawingsId)) - { - designDrawings.DesignDrawingsId = this.DesignDrawingsId; - BLL.DesignDrawingsService.UpdateDesignDrawings(designDrawings); - } - else - { - if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) - { - designDrawings.DesignDrawingsId = this.hdAttachUrl.Text; - } - else - { - designDrawings.DesignDrawingsId = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); - this.hdAttachUrl.Text = designDrawings.DesignDrawingsId; - } - BLL.DesignDrawingsService.AddDesignDrawings(designDrawings); - } - ShowNotify("提交成功!", MessageBoxIcon.Success); - PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); - } - else - { - Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); - } - } #endregion #region 附件上传 @@ -162,7 +460,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_DesignDrawings)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/DesignDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId))); + Model.Comprehensive_DesignDrawings designDrawings = BLL.DesignDrawingsService.GetDesignDrawingsById(this.DesignDrawingsId); + if (designDrawings == null || ((designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_Compile) || (designDrawings.CompileMan == CurrUser.UserId && designDrawings.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/designDrawings&menuId={1}", this.hdAttachUrl.Text, BLL.Const.DesignDrawingsMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.designer.cs index d17141d8..0f444405 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class DesignDrawingsEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class DesignDrawingsEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpCNProfessionalId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// drpUnitWorkIds 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorkIds; - + /// /// txtDesignDrawingsCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtDesignDrawingsCode; - + /// /// txtEdition 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtEdition; - + /// /// txtDesignDrawingsContent 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtDesignDrawingsContent; - + /// /// txtRemarkCode 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRemarkCode; - + /// /// txtPageNumber 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtPageNumber; - + /// /// txtReceiveDate 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtReceiveDate; - + /// /// txtSendDate 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtSendDate; - + /// /// drpUnitIds 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// txtReceiveMan 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtReceiveMan; - + /// /// txtRemark 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// Panel2 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -173,7 +175,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -182,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -191,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -200,7 +247,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx index 3d484cb1..ac33c112 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx @@ -32,9 +32,6 @@ - -
@@ -52,7 +49,7 @@ - + - - - - - - + + - /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("施工组织设计及施工方案" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); - } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs index 7a426f68..47ead320 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.designer.cs @@ -102,15 +102,6 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - /// /// lblPageIndex 控件。 /// @@ -121,22 +112,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - - /// - /// LinkButton1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.LinkButton LinkButton1; + protected global::System.Web.UI.WebControls.Label Label2; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx index 22b732ca..9c396189 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx @@ -41,15 +41,7 @@ - - - - - - - - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs index da1387b8..7fde8d81 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs @@ -63,6 +63,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } this.txtAuditMan.Text = generalPlanApproval.AuditMan; this.txtApprovalMan.Text = generalPlanApproval.ApprovalMan; + this.txtImplementationDeviation.Text = generalPlanApproval.ImplementationDeviation; } else { @@ -107,6 +108,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } generalPlanApproval.AuditMan = this.txtAuditMan.Text.Trim(); generalPlanApproval.ApprovalMan = this.txtApprovalMan.Text.Trim(); + generalPlanApproval.ImplementationDeviation = this.txtImplementationDeviation.Text.Trim(); string ids = string.Empty; var lists = this.drpUnitWorkIds.SelectedValueArray; foreach (var item in lists) @@ -157,20 +159,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/GeneralPlanApproval&menuId={1}", this.hdAttachUrl.Text, BLL.Const.GeneralPlanApprovalMenuId))); } - - /// - /// 附件上传 - /// - /// - /// - protected void btnAttach2_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 - { - this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_GeneralPlanApproval)); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/GeneralPlanApproval&menuId={1}", this.hdAttachUrl.Text+"R", BLL.Const.GeneralPlanApprovalMenuId))); - } #endregion #region 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs index 6578b36d..0ca06991 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.designer.cs @@ -112,31 +112,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive { protected global::FineUIPro.TextBox txtApprovalMan; /// - /// Panel3 控件。 + /// txtImplementationDeviation 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// btnAttach2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAttach2; + protected global::FineUIPro.TextArea txtImplementationDeviation; /// /// Panel2 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx index 349a8bd2..5cffb821 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx @@ -9,14 +9,14 @@
- + @@ -39,9 +39,6 @@ - - @@ -51,20 +48,19 @@ - + - + + - - @@ -83,16 +79,26 @@ - - + + - + + + + + + + + + @@ -115,12 +121,16 @@ + + -
public void BindGrid() { - string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId, U.UnitName,InspectionCode,CN.ProfessionalName,EquipmentOrMatail,InspectionName,Specifications, + string strSql = @"select InspectionEquipmentId,ProjectId,C.UnitId,Status, U.UnitName,InspectionCode,CN.ProfessionalName,InspectionName,Specifications, Supplier,Counts,SamplingCount,(CASE WHEN SamplingResult=1 THEN '合格' WHEN SamplingResult=0 THEN '不合格' ELSE '' END) AS SamplingResult, InspectionDate,AttachUrl,Attribute,RemarkCode,UsedPlace,EquipmentNO from Comprehensive_InspectionEquipment C left join Base_Unit U on C.UnitId=U.UnitId @@ -51,13 +50,13 @@ namespace FineUIPro.Web.Comprehensive } if (!string.IsNullOrEmpty(txtStarTime.Text.Trim())) { - strSql += " AND InspectionDate >= @InspectionDate"; - listStr.Add(new SqlParameter("@InspectionDate", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); + strSql += " AND InspectionDate >= @InspectionDateA"; + listStr.Add(new SqlParameter("@InspectionDateA", Funs.GetNewDateTime(txtStarTime.Text.Trim()))); } if (!string.IsNullOrEmpty(txtEndTime.Text.Trim())) { - strSql += " AND InspectionDate <= @InspectionDate"; - listStr.Add(new SqlParameter("@InspectionDate", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); + strSql += " AND InspectionDate <= @InspectionDateZ"; + listStr.Add(new SqlParameter("@InspectionDateZ", Funs.GetNewDateTime(txtEndTime.Text.Trim()))); } SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); @@ -243,23 +242,64 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - ///
- /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("设备材料报验" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + + //public string ConvertState(object value) + //{ + // var status = 0; + // int.TryParse(value.ToString(), out status); + + // if (status == 0) + // { + // return "待审核"; + // } + // else if (status == 1) + // { + // return "合格"; + // } + // else if (status == 2) + // { + // return "驳回"; + // } + // else if (status == 3) + // { + // return "重报"; + // } + // return "待审核"; + //} + + + + public static string ConvertState(object Status) + { + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion + + + + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs index f81afb0d..594e3ac8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class InspectionEquipment { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class InspectionEquipment + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// stxtInspectionName 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtInspectionName; - + /// /// txtStarTime 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStarTime; - + /// /// Label1 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// txtEndTime 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndTime; - + /// /// btnSearch 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -128,16 +130,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -146,7 +139,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -191,7 +193,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx new file mode 100644 index 00000000..0257e462 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx @@ -0,0 +1,57 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionEquipmentApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.InspectionEquipmentApprove" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.cs new file mode 100644 index 00000000..0a72e3b8 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class InspectionEquipmentApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string InspectionEquipmentId = Request.Params["InspectionEquipmentId"]; + var list = InspectionEquipmentApproveService.GetProjectQualityList(InspectionEquipmentId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.designer.cs new file mode 100644 index 00000000..2974a8ed --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionEquipmentApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs index daa071e4..4f71c503 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,13 +121,14 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); - hdCheckResult.Text = "1"; + conn.Close(); + conn.Dispose(); + AddDatasetToSQL(ds.Tables[0], 12); + hdCheckResult.Text = "1"; } catch (Exception exc) { @@ -134,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -187,32 +194,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "报验编号" + "," + "此项为必填项!" + "|"; } - string row2 = pds.Rows[i][2].ToString(); - if (!string.IsNullOrEmpty(row2)) - { - var cn = cns.Where(x => x.ProfessionalName == row2.Trim()).FirstOrDefault(); - if (cn == null) - { - result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row2 + "]不存在!" + "|"; - } - } - else - { - result += (i + 2).ToString() + "," + "专业名称" + "," + "此项为必填项!" + "|"; - } - - string row3 = pds.Rows[i][3].ToString().Trim(); + string row3 = pds.Rows[i][3].ToString(); if (!string.IsNullOrEmpty(row3)) { - if (row3 != "设备" && row3 != "材料") + var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); + if (cn == null) { - result += (i + 2).ToString() + "," + "设备/材料" + "," + "[" + row2 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; } } - else - { - result += (i + 2).ToString() + "," + "设备/材料" + "," + "此项为必填项!" + "|"; - } string row9 = pds.Rows[i][9].ToString().Trim(); if (!string.IsNullOrEmpty(row9)) @@ -261,7 +251,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive errorInfos.Clear(); if (!string.IsNullOrEmpty(result)) { - string results = result; List errorInfoList = results.Split('|').ToList(); foreach (var item in errorInfoList) @@ -309,7 +298,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -329,21 +317,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -353,11 +341,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 12); } @@ -405,42 +393,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); if (unitInfo != null && !string.IsNullOrEmpty(row0)) { - //oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId - // && x.RemarkCode == pds.Rows[i][11].ToString().Trim() - // ).FirstOrDefault(); - //if (oldViewInfo == null) - //{ - Model.Comprehensive_InspectionEquipment Ins = new Model.Comprehensive_InspectionEquipment(); - Ins.ProjectId = this.CurrUser.LoginProjectId; - Ins.UnitId = unitInfo.UnitId; - Ins.InspectionCode = pds.Rows[i][1].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][2].ToString().Trim())) + oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId + && x.RemarkCode == pds.Rows[i][11].ToString().Trim() + ).FirstOrDefault(); + if (oldViewInfo == null) { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][2].ToString().Trim()).CNProfessionalId; - } - Ins.EquipmentOrMatail = pds.Rows[i][3].ToString().Trim(); - Ins.InspectionName = pds.Rows[i][4].ToString().Trim(); - Ins.Specifications = pds.Rows[i][5].ToString().Trim(); - Ins.Supplier = pds.Rows[i][6].ToString().Trim(); - Ins.Counts = pds.Rows[i][7].ToString().Trim(); - Ins.SamplingCount = pds.Rows[i][8].ToString().Trim(); - Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2"; + Model.Comprehensive_InspectionEquipment Ins = new Model.Comprehensive_InspectionEquipment(); + Ins.ProjectId = this.CurrUser.LoginProjectId; + Ins.UnitId = unitInfo.UnitId; + Ins.InspectionCode = pds.Rows[i][1].ToString().Trim(); + Ins.EquipmentNO = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) + { + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; + } + Ins.InspectionName = pds.Rows[i][4].ToString().Trim(); + Ins.Specifications = pds.Rows[i][5].ToString().Trim(); + Ins.Supplier = pds.Rows[i][6].ToString().Trim(); + Ins.Counts = pds.Rows[i][7].ToString().Trim(); + Ins.SamplingCount = pds.Rows[i][8].ToString().Trim(); + Ins.SamplingResult = pds.Rows[i][9].ToString().Trim() == "合格" ? "1" : "2"; - if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + { + Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + } + Ins.RemarkCode = pds.Rows[i][11].ToString().Trim(); + Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment)); + Ins.CompileMan = this.CurrUser.UserId; + Ins.CompileDate = DateTime.Now.Date; + BLL.InspectionEquipmentService.AddInspectionEquipment(Ins); + + } + else { - Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; } - Ins.RemarkCode = pds.Rows[i][11].ToString().Trim(); - Ins.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment)); - Ins.CompileMan = this.CurrUser.UserId; - Ins.CompileDate = DateTime.Now.Date; - BLL.InspectionEquipmentService.AddInspectionEquipment(Ins); - - //} - //else - //{ - // result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; - //} } else @@ -448,7 +436,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|"; } } - + } else { diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx index 4d2cd335..0f66f28d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx @@ -9,7 +9,7 @@
- + @@ -21,12 +21,8 @@ - - - - - - + + @@ -72,7 +68,7 @@ - @@ -81,13 +77,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index a60bfecb..b51f54a1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -35,15 +36,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive { GetButtonPower(); BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); + this.drpUnitId.SelectedValue = CurrUser.UnitId; BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); BLL.InspectionEquipmentService.InitAttributeDropDownList(this.drpAttribute, true); - Funs.FineUIPleaseSelect(this.drpEquipmentOrMatail); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.InspectionEquipmentId = Request.Params["InspectionEquipmentId"]; var inspectionEquipment = BLL.InspectionEquipmentService.GetInspectionEquipmentById(this.InspectionEquipmentId); if (inspectionEquipment != null) { this.InspectionEquipmentId = inspectionEquipment.InspectionEquipmentId; - this.hdAttachUrl.Text = this.InspectionEquipmentId; if (!string.IsNullOrEmpty(inspectionEquipment.UnitId)) { this.drpUnitId.SelectedValue = inspectionEquipment.UnitId; @@ -53,10 +58,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.drpCNProfessionalId.SelectedValue = inspectionEquipment.CNProfessionalId; } - if (!string.IsNullOrEmpty(inspectionEquipment.EquipmentOrMatail)) - { - this.drpEquipmentOrMatail.SelectedValue = inspectionEquipment.EquipmentOrMatail; - } this.txtInspectionName.Text = inspectionEquipment.InspectionName; this.txtSpecifications.Text = inspectionEquipment.Specifications; this.txtSupplier.Text = inspectionEquipment.Supplier; @@ -78,14 +79,151 @@ namespace FineUIPro.Web.CQMS.Comprehensive } this.txtInspectionDate.Text = inspectionEquipment.InspectionDate.HasValue ? string.Format("{0:yyyy-MM-dd}", inspectionEquipment.InspectionDate) : ""; this.txtRemarkCode.Text = inspectionEquipment.RemarkCode; + this.txtEquipmentNo.Text = inspectionEquipment.EquipmentNO; this.txtUsedPlace.Text = inspectionEquipment.UsedPlace; + var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(inspectionEquipment.InspectionEquipmentId); + if(currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionEquipment.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType== BLL.Const.Comprehensive_Audit&&currApprove.ApproveMan== CurrUser.UserId) + { + //审核状态不可编辑 + this.txtInspectionName.Readonly = true; + this.drpUnitId.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtSpecifications.Readonly = true; + this.txtSupplier.Readonly = true; + this.drpAttribute.Readonly = true; + this.drpSamplingResult.Readonly = true; + this.txtInspectionDate.Readonly = true; + this.txtRemarkCode.Readonly = true; + this.txtEquipmentNo.Readonly = true; + this.txtUsedPlace.Readonly = true; + this.drpAudit.Readonly = true; + this.txtSamplingCount.Readonly = true; + this.txtCounts.Readonly = true; + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if(inspectionEquipment.Status == BLL.Const.Comprehensive_Compile && inspectionEquipment.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + //var res = InspectionEquipmentApproveService.GetState(inspectionEquipment.InspectionEquipmentId); + + //if (inspectionEquipment.CompileMan != CurrUser.UserId) //不是创建用户禁止编辑 + //{ + // Readonly(); + //} + //if (res != null) + //{ + // if (res.ApproveType.Trim() == BLL.Const.Comprehensive_Audit) + // { + // this.txtInspectionName.Readonly = true; + // this.drpUnitId.Readonly = true; + // this.drpCNProfessionalId.Readonly = true; + // this.txtSpecifications.Readonly = true; + // this.txtSupplier.Readonly = true; + // this.drpAttribute.Readonly = true; + // this.drpSamplingResult.Readonly = true; + // this.txtInspectionDate.Readonly = true; + // this.txtRemarkCode.Readonly = true; + // this.txtEquipmentNo.Readonly = true; + // this.txtUsedPlace.Readonly = true; + // this.drpAudit.Readonly = true; + // this.txtSamplingCount.Readonly = true; + // this.txtCounts.Readonly = true; + // this.btnAttach.Enabled = false; + // this.btnSave.Enabled = false; + + // if (res.ApproveMan == CurrUser.UserId) + // { + // this.agree.Hidden = false; + // this.options.Hidden = false; + // this.drpAudit.Hidden = true; + // this.btnSubmit.Enabled = true; + // } + // } + // else if (res.ApproveType.Trim() == BLL.Const.Comprehensive_ReCompile) //重报 + // { + + // } + // else if (res.ApproveType.Trim() == BLL.Const.Comprehensive_Complete) //已完成 + // { + // Readonly(); + // } + + //} + } else { this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtInspectionName.Readonly = true; + this.drpUnitId.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtSpecifications.Readonly = true; + this.txtSupplier.Readonly = true; + this.drpAttribute.Readonly = true; + this.drpSamplingResult.Readonly = true; + this.txtInspectionDate.Readonly = true; + this.txtRemarkCode.Readonly = true; + this.txtEquipmentNo.Readonly = true; + this.txtUsedPlace.Readonly = true; + this.drpAudit.Readonly = true; + this.txtSamplingCount.Readonly = true; + this.txtCounts.Readonly = true; + //this.btnAttach.Enabled = false; + + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #endregion #region 保存 @@ -101,16 +239,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - if (this.drpCNProfessionalId.SelectedValue == BLL.Const._Null) - { - Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); - return; - } - if (this.drpEquipmentOrMatail.SelectedValue == BLL.Const._Null) - { - Alert.ShowInTop("请选择设备/材料!", MessageBoxIcon.Warning); - return; - } + Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment(); newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId; newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue; @@ -122,11 +251,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim(); newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim(); newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim(); - newInspectionEquipment.EquipmentOrMatail = this.drpEquipmentOrMatail.SelectedValue; + newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim(); newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim(); newInspectionEquipment.Counts = this.txtCounts.Text.Trim(); newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim(); + + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + newInspectionEquipment.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (this.drpAttribute.SelectedValue != BLL.Const._Null) { newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue; @@ -139,30 +274,265 @@ namespace FineUIPro.Web.CQMS.Comprehensive { newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text); } + if (string.IsNullOrEmpty(this.InspectionEquipmentId)) - { + { newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); newInspectionEquipment.CompileMan = this.CurrUser.UserId; newInspectionEquipment.CompileDate = DateTime.Now; - if (!string.IsNullOrEmpty(hdAttachUrl.Text)) + newInspectionEquipment.Status = BLL.Const.Comprehensive_Compile; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == newInspectionEquipment.InspectionEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) { - newInspectionEquipment.InspectionEquipmentId = hdAttachUrl.Text; - } - else - { - newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; } + BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); } else { newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId; - BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment); + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault(); + if (oldInspectionEquipment == null) + { + newInspectionEquipment.CompileMan = this.CurrUser.UserId; + newInspectionEquipment.CompileDate = DateTime.Now; + newInspectionEquipment.Status = BLL.Const.Comprehensive_Compile; + BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); + } + else + { + newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan; + newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate; + newInspectionEquipment.Status = oldInspectionEquipment.Status; + BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment); + + } } + //else + //{ + // newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId; + // var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionEquipmentId); + // if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + // { + // Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + // return; + // } + // BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment); + //} + + + //#region 审核记录 + + //var approve = InspectionEquipmentApproveService.GetApproveByApproveMan(newInspectionEquipment.InspectionEquipmentId, CurrUser.UserId); + //if (approve == null) //未添加审核信息时 + //{ + // approve = new Model.Comprehensive_InspectionEquipmentApprove(); + // approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; + // approve.ApproveMan = this.CurrUser.UserId; + // approve.ApproveType = Const.Comprehensive_Compile; + // approve.ApproveDate = DateTime.Now; + // InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录 + //} + //else + //{ + // approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + // approve.ApproveIdea = txtidea.Text.Trim(); + //} + + //#endregion + + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } #endregion + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); + return; + } + + Model.Comprehensive_InspectionEquipment newInspectionEquipment = new Model.Comprehensive_InspectionEquipment(); + newInspectionEquipment.ProjectId = this.CurrUser.LoginProjectId; + newInspectionEquipment.UnitId = this.drpUnitId.SelectedValue; + newInspectionEquipment.InspectionCode = this.txtInspectionCode.Text.Trim(); + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + newInspectionEquipment.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + newInspectionEquipment.InspectionName = this.txtInspectionName.Text.Trim(); + newInspectionEquipment.Specifications = this.txtSpecifications.Text.Trim(); + newInspectionEquipment.Supplier = this.txtSupplier.Text.Trim(); + newInspectionEquipment.EquipmentNO = this.txtEquipmentNo.Text.Trim(); + newInspectionEquipment.RemarkCode = this.txtRemarkCode.Text.Trim(); + newInspectionEquipment.Counts = this.txtCounts.Text.Trim(); + newInspectionEquipment.SamplingCount = this.txtSamplingCount.Text.Trim(); + newInspectionEquipment.UsedPlace = this.txtUsedPlace.Text.Trim(); + + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + newInspectionEquipment.AuditMan = drpAudit.SelectedValue; + } //审核人 + + if (this.drpAttribute.SelectedValue != BLL.Const._Null) + { + newInspectionEquipment.Attribute = this.drpAttribute.SelectedValue; + } + if (this.drpSamplingResult.SelectedValue != BLL.Const._Null) + { + newInspectionEquipment.SamplingResult = this.drpSamplingResult.SelectedValue; + } + if (!string.IsNullOrEmpty(this.txtInspectionDate.Text)) + { + newInspectionEquipment.InspectionDate = Convert.ToDateTime(this.txtInspectionDate.Text); + } + + + if (string.IsNullOrEmpty(this.InspectionEquipmentId)) + { + newInspectionEquipment.CompileMan = this.CurrUser.UserId; + newInspectionEquipment.CompileDate = DateTime.Now; + newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; + newInspectionEquipment.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == newInspectionEquipment.InspectionEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); + } + else + { + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + newInspectionEquipment.InspectionEquipmentId = this.InspectionEquipmentId; + var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault(); + if (oldInspectionEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + newInspectionEquipment.CompileMan = this.CurrUser.UserId; + newInspectionEquipment.CompileDate = DateTime.Now; + newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; + BLL.InspectionEquipmentService.AddInspectionEquipment(newInspectionEquipment); + } + else + { + newInspectionEquipment.CompileMan = oldInspectionEquipment.CompileMan; + newInspectionEquipment.CompileDate = oldInspectionEquipment.CompileDate; + if(oldInspectionEquipment.Status==BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + newInspectionEquipment.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + newInspectionEquipment.Status = BLL.Const.Comprehensive_Complete; + } + else + { + newInspectionEquipment.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.InspectionEquipmentService.UpdateInspectionEquipment(newInspectionEquipment); + + } + + + } + + + #region 审核记录 + + var currApprove = InspectionEquipmentApproveService.GetCurrentApprove(newInspectionEquipment.InspectionEquipmentId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_InspectionEquipmentApprove(); + approve.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + InspectionEquipmentApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove(); + newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + }else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + InspectionEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_InspectionEquipmentApprove newApprove = new Model.Comprehensive_InspectionEquipmentApprove(); + newApprove.InspectionEquipmentId = newInspectionEquipment.InspectionEquipmentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + InspectionEquipmentApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove(); + reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + //reApprove.ApproveIdea = txtidea.Text; + InspectionEquipmentApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_InspectionEquipmentApprove reApprove = new Model.Comprehensive_InspectionEquipmentApprove(); + reApprove.InspectionEquipmentId = currApprove.InspectionEquipmentId; + reApprove.ApproveMan = newInspectionEquipment.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + InspectionEquipmentApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + #region 附件上传 /// /// 附件上传 @@ -171,11 +541,19 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// protected void btnAttach_Click(object sender, EventArgs e) { - if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 + if (string.IsNullOrEmpty(this.InspectionEquipmentId)) //新增记录 { - this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment)); + this.InspectionEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionEquipment)); + } + var oldInspectionEquipment = Funs.DB.Comprehensive_InspectionEquipment.Where(u => u.InspectionEquipmentId == this.InspectionEquipmentId).FirstOrDefault(); + + if (oldInspectionEquipment == null || ((oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_Compile) || (oldInspectionEquipment.CompileMan == CurrUser.UserId && oldInspectionEquipment.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId))); + } + else + { PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.InspectionEquipmentId, BLL.Const.InspectionEquipmentMenuId))); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionEquipmentMenuId))); } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs index 42db8341..58934b6d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class InspectionEquipmentEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionEquipmentEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtInspectionCode 控件。 /// @@ -56,7 +58,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionCode; - + + /// + /// txtEquipmentNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEquipmentNo; + /// /// drpCNProfessionalId 控件。 /// @@ -65,16 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - - /// - /// drpEquipmentOrMatail 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpEquipmentOrMatail; - + /// /// txtInspectionName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionName; - + /// /// txtSpecifications 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSpecifications; - + /// /// txtSupplier 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSupplier; - + /// /// txtCounts 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCounts; - + /// /// txtSamplingCount 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSamplingCount; - + /// /// drpSamplingResult 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSamplingResult; - + /// /// drpAttribute 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpAttribute; - + /// /// txtInspectionDate 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtInspectionDate; - + /// /// txtRemarkCode 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRemarkCode; - + /// /// txtUsedPlace 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtUsedPlace; - + /// /// Panel2 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -191,7 +193,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -200,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -209,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -218,7 +265,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx index f1f60b8a..89433ef5 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx @@ -16,7 +16,7 @@ + EnableRowDoubleClickEvent="true" OnRowDoubleClick="Grid1_RowDoubleClick" EnableTextSelection="True"> @@ -37,9 +37,6 @@ - - @@ -67,7 +64,7 @@ - - - + + + + + + public void BindGrid() { - string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName , + string strSql = @"select InspectionMachineId, InspectionMachineCode, U.UnitName,CN.ProfessionalName ,Status, InspectionMachineName, SpecificationModel, NextTestDate, TestCycle, C.InspectionDate, InspectionDate CompileDate, (CASE WHEN IsVerification=1 THEN '是' WHEN IsVerification=0 THEN '否' ELSE '' END) AS IsVerification, InspectionType, LeaveDate, UnitsCount from Comprehensive_InspectionMachine C @@ -242,23 +240,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("机具报验" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs index d1af5708..fcd8cd5f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class InspectionMachine { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class InspectionMachine + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// sdrpCNProfessional 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpCNProfessional; - + /// /// sdrpType 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpType; - + /// /// btnSearch 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -110,16 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -128,7 +121,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -173,7 +175,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -182,7 +193,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -191,7 +202,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx new file mode 100644 index 00000000..45c78c34 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionMachineApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.InspectionMachineApprove" %> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.cs new file mode 100644 index 00000000..c9082d7e --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class InspectionMachineApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string InspectionMachineId = Request.Params["Id"]; + var list = InspectionMachineApproveService.GetProjectQualityList(InspectionMachineId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.designer.cs new file mode 100644 index 00000000..eac44428 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionMachineApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs index 637f875d..4ac6d47a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,11 +121,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL(ds.Tables[0], 13); hdCheckResult.Text = "1"; @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -346,7 +352,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -366,21 +371,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -390,11 +395,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 13); } @@ -442,11 +447,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive var unitInfo = units.Where(y => y.UnitName == row0).FirstOrDefault(); if (unitInfo != null && !string.IsNullOrEmpty(row0)) { - //oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId && x.ProjectId == this.CurrUser.LoginProjectId - // && x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim() && x.InspectionMachineName == pds.Rows[i][2].ToString().Trim() - // ).FirstOrDefault(); - //if (oldViewInfo == null) - //{ + oldViewInfo = oldViewInfos.Where(x => x.UnitId == unitInfo.UnitId + && x.InspectionMachineCode == pds.Rows[i][1].ToString().Trim() && x.InspectionMachineName == pds.Rows[i][2].ToString().Trim() + ).FirstOrDefault(); + if (oldViewInfo == null) + { Model.Comprehensive_InspectionMachine Ins = new Model.Comprehensive_InspectionMachine(); Ins.ProjectId = this.CurrUser.LoginProjectId; Ins.UnitId = unitInfo.UnitId; @@ -482,13 +487,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive Ins.InspectionDate = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); } Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + { + Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][10].ToString().Trim()); + } if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) { - Ins.UnitsCount = Convert.ToInt32(pds.Rows[i][11].ToString().Trim()); - } - if (!string.IsNullOrEmpty(pds.Rows[i][12].ToString().Trim())) - { - Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][12].ToString().Trim()); + Ins.LeaveDate = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); } Ins.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); @@ -496,11 +501,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive Ins.CompileDate = DateTime.Now.Date; BLL.InspectionMachineService.AddInspectionMachine(Ins); - //} - //else - //{ - // result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; - //} + } + else + { + result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位报验编号已存在!" + "|"; + } } else @@ -508,7 +513,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|"; } } - + } else diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx index 15155d8d..1b57943c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx @@ -70,7 +70,7 @@ - @@ -79,14 +79,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index b23f3b0e..c3919c01 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -1,5 +1,7 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; +using System.Linq; namespace FineUIPro.Web.CQMS.Comprehensive { @@ -34,8 +36,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive { GetButtonPower(); BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); - BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); + if (CurrUser.UnitId == null || CurrUser.UserId == Const.sysglyId||CurrUser.UnitId== Const.UnitId_CWCEC) + { + this.drpUnitId.Enabled = true; + } + else + { + drpUnitId.SelectedValue = CurrUser.UnitId; + this.drpUnitId.Enabled = false; + } + BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.InspectionMachineId = Request.Params["InspectionMachineId"]; Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId); if (inspectionMachine != null) @@ -73,13 +90,93 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.txtUnitsCount.Text = inspectionMachine.UnitsCount.ToString(); } + if (!string.IsNullOrEmpty(inspectionMachine.AuditMan)) + { + drpAudit.SelectedValue = inspectionMachine.AuditMan; + } + var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachine.InspectionMachineId); + if (currApprove != null) + { //重新编制 编制人 可以 显示 提交 保存按钮 + this.drpAudit.SelectedValue = currApprove.ApproveMan; + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionMachine.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (inspectionMachine.Status == BLL.Const.Comprehensive_Compile && inspectionMachine.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + } else { this.txtInspectionDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtInspectionDate.Readonly = true; + this.drpUnitId.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtInspectionMachineCode.Readonly = true; + this.txtInspectionMachineName.Readonly = true; + this.txtLeaveDate.Readonly = true; + this.txtNextTestDate.Readonly = true; + this.txtInspectionDate.Readonly = true; + this.txtSpecificationModel.Readonly = true; + this.txtTestCycle.Readonly = true; + this.txtUnitsCount.Readonly = true; + this.drpAudit.Readonly = true; + //this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #endregion #region 保存 @@ -116,6 +213,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionMachone.IsOnSite = this.rblIsOnSite.SelectedValue == "true" ? true : false; inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text); inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim()); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + inspectionMachone.AuditMan = drpAudit.SelectedValue; + } //审核人 if (string.IsNullOrEmpty(this.InspectionMachineId)) { if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) @@ -127,18 +228,217 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionMachone.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); this.hdAttachUrl.Text = inspectionMachone.InspectionMachineId; } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionMachone.InspectionMachineId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } inspectionMachone.CompileMan = this.CurrUser.UserId; inspectionMachone.CompileDate = DateTime.Now; + inspectionMachone.Status = BLL.Const.Comprehensive_Compile; BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone); } else { inspectionMachone.InspectionMachineId = this.InspectionMachineId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionMachineId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + var model = Funs.DB.Comprehensive_InspectionMachine.Where(u => u.InspectionMachineId == this.InspectionMachineId).FirstOrDefault(); + if (model != null) + { + + inspectionMachone.Status = model.Status; + } + BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone); - } + } ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_InspectionMachine inspectionMachone = new Model.Comprehensive_InspectionMachine(); + inspectionMachone.ProjectId = this.CurrUser.LoginProjectId; + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + inspectionMachone.UnitId = this.drpUnitId.SelectedValue; + } + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + inspectionMachone.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + inspectionMachone.InspectionType = this.rblInspectionType.SelectedValue; + inspectionMachone.InspectionMachineCode = this.txtInspectionMachineCode.Text.Trim(); + inspectionMachone.InspectionMachineName = this.txtInspectionMachineName.Text.Trim(); + inspectionMachone.SpecificationModel = this.txtSpecificationModel.Text.Trim(); + inspectionMachone.NextTestDate = Funs.GetNewDateTime(this.txtNextTestDate.Text); + inspectionMachone.TestCycle = this.txtTestCycle.Text.Trim(); + inspectionMachone.IsVerification = this.rblIsVerification.SelectedValue == "true" ? true : false; + inspectionMachone.InspectionDate = Funs.GetNewDateTime(this.txtInspectionDate.Text); + inspectionMachone.IsOnSite = this.rblIsOnSite.SelectedValue == "true" ? true : false; + inspectionMachone.LeaveDate = Funs.GetNewDateTime(this.txtLeaveDate.Text); + inspectionMachone.UnitsCount = Funs.GetNewInt(this.txtUnitsCount.Text.Trim()); + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + inspectionMachone.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (string.IsNullOrEmpty(this.InspectionMachineId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + inspectionMachone.InspectionMachineId = this.hdAttachUrl.Text; + } + else + { + inspectionMachone.InspectionMachineId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); + this.hdAttachUrl.Text = inspectionMachone.InspectionMachineId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionMachone.InspectionMachineId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + inspectionMachone.CompileMan = this.CurrUser.UserId; + inspectionMachone.CompileDate = DateTime.Now; + inspectionMachone.Status = BLL.Const.Comprehensive_Audit; + BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone); + } + else + { + inspectionMachone.InspectionMachineId = this.InspectionMachineId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionMachineId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + //BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone); + + var oldInspectionMachine = Funs.DB.Comprehensive_InspectionMachine.Where(u => u.InspectionMachineId == this.InspectionMachineId).FirstOrDefault(); + if (oldInspectionMachine == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + inspectionMachone.CompileMan = this.CurrUser.UserId; + inspectionMachone.CompileDate = DateTime.Now; + inspectionMachone.Status = BLL.Const.Comprehensive_Audit; + BLL.InspectionMachineService.AddInspectionMachine(inspectionMachone); + } + else + { + inspectionMachone.CompileMan = oldInspectionMachine.CompileMan; + inspectionMachone.CompileDate = oldInspectionMachine.CompileDate; + if (oldInspectionMachine.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + inspectionMachone.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldInspectionMachine.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + inspectionMachone.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + inspectionMachone.Status = BLL.Const.Comprehensive_Complete; + } + else + { + inspectionMachone.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.InspectionMachineService.UpdateInspectionMachine(inspectionMachone); + + } + + } + #region 审核记录 + + var currApprove = InspectionMachineApproveService.GetCurrentApprove(inspectionMachone.InspectionMachineId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_InspectionMachineApprove(); + approve.InspectionMachineId = inspectionMachone.InspectionMachineId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + InspectionMachineApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove(); + newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + InspectionMachineApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_InspectionMachineApprove newApprove = new Model.Comprehensive_InspectionMachineApprove(); + newApprove.InspectionMachineId = inspectionMachone.InspectionMachineId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionMachineApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + InspectionMachineApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove(); + reApprove.InspectionMachineId = currApprove.InspectionMachineId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + // reApprove.ApproveIdea = txtidea.Text; + InspectionMachineApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_InspectionMachineApprove reApprove = new Model.Comprehensive_InspectionMachineApprove(); + reApprove.InspectionMachineId = currApprove.InspectionMachineId; + reApprove.ApproveMan = inspectionMachone.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + InspectionMachineApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion #region 附件上传 @@ -153,7 +453,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionMachine)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionMachine&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId))); + Model.Comprehensive_InspectionMachine inspectionMachine = BLL.InspectionMachineService.GetInspectionMachineById(this.InspectionMachineId); + if (inspectionMachine == null || ((inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_Compile) || (inspectionMachine.CompileMan == CurrUser.UserId && inspectionMachine.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionMachone&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionMachineMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs index 78de456c..fedf6cd1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class InspectionMachineEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionMachineEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtInspectionMachineCode 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionMachineCode; - + /// /// txtInspectionMachineName 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionMachineName; - + /// /// drpCNProfessionalId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// rblInspectionType 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblInspectionType; - + /// /// txtSpecificationModel 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtSpecificationModel; - + /// /// txtNextTestDate 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtNextTestDate; - + /// /// txtTestCycle 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtTestCycle; - + /// /// rblIsVerification 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsVerification; - + /// /// txtUnitsCount 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtUnitsCount; - + /// /// txtInspectionDate 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtInspectionDate; - + /// /// txtLeaveDate 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtLeaveDate; - + /// /// rblIsOnSite 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsOnSite; - + /// /// Panel2 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -182,7 +184,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -191,7 +238,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -200,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -209,7 +256,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx index b51ae9a4..1516968c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx @@ -34,9 +34,6 @@ - - @@ -57,7 +54,7 @@ - + - - - + + + + + + - + @@ -109,7 +113,7 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs index f9b7a7ce..74436717 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs @@ -4,8 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; - namespace FineUIPro.Web.Comprehensive { public partial class InspectionPerson : PageBase @@ -32,7 +30,7 @@ namespace FineUIPro.Web.Comprehensive /// public void BindGrid() { - string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, + string strSql = @"select InspectionPersonId, InspectionPersonCode, PersonName, Status, CertificateNumber, QualifiedProjectCode, ValidityDate, ApprovalTime, DepartureTime, AttachUrl,CompileMan, CompileDate, IsOnSite, UnitWorkId,U.UnitName,CN.ProfessionalName ,P.PostName @@ -292,7 +290,7 @@ namespace FineUIPro.Web.Comprehensive { lbfAction1.Enabled = true; } - else + else { lbfAction1.Enabled = false; } @@ -311,29 +309,34 @@ namespace FineUIPro.Web.Comprehensive } } - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("人员报验" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); - } - #endregion - protected void ddlPageSize_SelectedIndexChanged1(object sender, EventArgs e) + public static string ConvertState(object Status) { - this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); - BindGrid(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs index d308202d..1929163a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class InspectionPerson { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class InspectionPerson + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// sdrpPost 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpPost; - + /// /// stxtPersonName 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox stxtPersonName; - + /// /// btnSearch 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -110,16 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -128,16 +121,25 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -191,7 +193,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx new file mode 100644 index 00000000..1219f1a1 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InspectionPersonApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.InspectionPersonApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.cs new file mode 100644 index 00000000..3922d7e5 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class InspectionPersonApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string InspectionPersonId = Request.Params["Id"]; + var list = InspectionPersonApproveService.GetProjectQualityList(InspectionPersonId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.designer.cs new file mode 100644 index 00000000..bf2ad946 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionPersonApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs index dc88e18a..aeac50ca 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,13 +121,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); - AddDatasetToSQL(ds.Tables[0], 12); + AddDatasetToSQL(ds.Tables[0], 13); hdCheckResult.Text = "1"; } catch (Exception exc) @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -196,36 +202,23 @@ namespace FineUIPro.Web.CQMS.Comprehensive result += (i + 2).ToString() + "," + "姓名" + "," + "此项为必填项!" + "|"; } - string row3 = pds.Rows[i][3].ToString(); - if (!string.IsNullOrEmpty(row3)) - { - var cn = cns.Where(x => x.ProfessionalName == row3.Trim()).FirstOrDefault(); - if (cn == null) - { - result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row3 + "]不存在!" + "|"; - } - } - string row4 = pds.Rows[i][4].ToString(); if (!string.IsNullOrEmpty(row4)) { - var post = posts.Where(x => x.PostName == row4.Trim()).FirstOrDefault(); - if (post == null) + var cn = cns.Where(x => x.ProfessionalName == row4.Trim()).FirstOrDefault(); + if (cn == null) { - result += (i + 2).ToString() + "," + "工种" + "," + "[" + row4 + "]不存在!" + "|"; + result += (i + 2).ToString() + "," + "专业名称" + "," + "[" + row4 + "]不存在!" + "|"; } } - string row7 = pds.Rows[i][7].ToString(); - if (!string.IsNullOrEmpty(row7)) + string row5 = pds.Rows[i][5].ToString(); + if (!string.IsNullOrEmpty(row5)) { - try + var post = posts.Where(x => x.PostName == row5.Trim()).FirstOrDefault(); + if (post == null) { - DateTime date = Convert.ToDateTime(row7.Trim()); - } - catch (Exception) - { - result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row7 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "工种" + "," + "[" + row5 + "]不存在!" + "|"; } } @@ -238,29 +231,42 @@ namespace FineUIPro.Web.CQMS.Comprehensive } catch (Exception) { - result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row8 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "有效期" + "," + "[" + row8 + "]错误!" + "|"; } } - string row9 = pds.Rows[i][9].ToString().Trim(); + string row9 = pds.Rows[i][9].ToString(); if (!string.IsNullOrEmpty(row9)) - { - if (row9 != "是" && row9 != "否") - { - result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row9 + "]错误!" + "|"; - } - } - - string row10 = pds.Rows[i][10].ToString(); - if (!string.IsNullOrEmpty(row10)) { try { - DateTime date = Convert.ToDateTime(row10.Trim()); + DateTime date = Convert.ToDateTime(row9.Trim()); } catch (Exception) { - result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row10 + "]错误!" + "|"; + result += (i + 2).ToString() + "," + "批准时间" + "," + "[" + row9 + "]错误!" + "|"; + } + } + + string row10 = pds.Rows[i][10].ToString().Trim(); + if (!string.IsNullOrEmpty(row10)) + { + if (row10 != "是" && row10 != "否") + { + result += (i + 2).ToString() + "," + "是否在场" + "," + "[" + row10 + "]错误!" + "|"; + } + } + + string row11 = pds.Rows[i][11].ToString(); + if (!string.IsNullOrEmpty(row11)) + { + try + { + DateTime date = Convert.ToDateTime(row11.Trim()); + } + catch (Exception) + { + result += (i + 2).ToString() + "," + "离场时间" + "," + "[" + row11 + "]错误!" + "|"; } } @@ -330,7 +336,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -350,21 +355,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -374,13 +379,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); - AddDatasetToSQL2(ds.Tables[0], 12); + AddDatasetToSQL2(ds.Tables[0], 13); } catch (Exception ex) { @@ -432,52 +437,68 @@ namespace FineUIPro.Web.CQMS.Comprehensive ).FirstOrDefault(); if (oldViewInfo == null) { + Model.Comprehensive_InspectionPerson Ins = new Model.Comprehensive_InspectionPerson(); Ins.ProjectId = this.CurrUser.LoginProjectId; Ins.UnitId = unitInfo.UnitId; Ins.InspectionPersonCode = pds.Rows[i][1].ToString().Trim(); Ins.PersonName = pds.Rows[i][2].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][3].ToString().Trim())) - { - Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][3].ToString().Trim()).CNProfessionalId; - } - if (!string.IsNullOrEmpty(pds.Rows[i][4].ToString().Trim())) { - Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][4].ToString().Trim()).PostId; + Ins.CNProfessionalId = Funs.DB.Base_CNProfessional.First(e => e.ProfessionalName == pds.Rows[i][4].ToString().Trim()).CNProfessionalId; } - Ins.CertificateNumber = pds.Rows[i][5].ToString().Trim(); - Ins.QualifiedProjectCode = pds.Rows[i][6].ToString().Trim(); - if (!string.IsNullOrEmpty(pds.Rows[i][7].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][5].ToString().Trim())) { - Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][7].ToString().Trim()); + Ins.PostId = Funs.DB.Base_Post.First(e => e.PostName == pds.Rows[i][5].ToString().Trim()).PostId; } + Ins.CertificateNumber = pds.Rows[i][6].ToString().Trim(); + Ins.QualifiedProjectCode = pds.Rows[i][7].ToString().Trim(); if (!string.IsNullOrEmpty(pds.Rows[i][8].ToString().Trim())) { - Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); + Ins.ValidityDate = Convert.ToDateTime(pds.Rows[i][8].ToString().Trim()); } - Ins.IsOnSite = pds.Rows[i][9].ToString().Trim() == "是" ? true : false; - if (!string.IsNullOrEmpty(pds.Rows[i][10].ToString().Trim())) + if (!string.IsNullOrEmpty(pds.Rows[i][9].ToString().Trim())) { - Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][10].ToString().Trim()); + Ins.ApprovalTime = Convert.ToDateTime(pds.Rows[i][9].ToString().Trim()); } - Ins.Remark = pds.Rows[i][11].ToString().Trim(); + Ins.IsOnSite = pds.Rows[i][10].ToString().Trim() == "是" ? true : false; + + if (!string.IsNullOrEmpty(pds.Rows[i][11].ToString().Trim())) + { + Ins.DepartureTime = Convert.ToDateTime(pds.Rows[i][11].ToString().Trim()); + } + Ins.Remark = pds.Rows[i][12].ToString().Trim(); Ins.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); Ins.CompileMan = this.CurrUser.UserId; Ins.CompileDate = DateTime.Now.Date; BLL.InspectionPersonService.AddInspectionPerson(Ins); - + if (pds.Rows[i][4].ToString().Trim() == "焊工") + { + Model.BS_Welder welder = new Model.BS_Welder(); + welder.WED_Unit = Ins.UnitId; + welder.WED_Name = Ins.PersonName; + welder.WED_Code = pds.Rows[i][3].ToString().Trim(); + welder.LimitDate = Ins.ValidityDate; + welder.LeaveDate = Ins.DepartureTime; // Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); + welder.PostDate = Ins.ApprovalTime;// Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); + welder.WED_WorkCode = Ins.CertificateNumber;// this.txtCertificateNumber.Text.Trim(); + welder.WED_Class = Ins.QualifiedProjectCode;// this.txtQualifiedProjectCode.Text.Trim(); + welder.WED_IfOnGuard = Ins.IsOnSite; + welder.WED_Remark = Ins.Remark; + welder.ProjectId = this.CurrUser.LoginProjectId; + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } } else { result += (i + 2).ToString() + "," + "报验编号" + "," + "该单位人员报验编号已存在!" + "|"; } } - else { result += (i + 2).ToString() + "," + "单位名称" + "," + "[" + row0 + "]不存在!" + "|"; diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx index 097d4f1c..4b9aa5c0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx @@ -27,10 +27,16 @@ - + + + + + + + @@ -69,7 +75,7 @@ - @@ -78,13 +84,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index eda3be29..abfe0ff6 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -21,6 +22,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive ViewState["InspectionPersonId"] = value; } } + public string welderId + { + get + { + return (string)ViewState["welderId"]; + } + set + { + ViewState["welderId"] = value; + } + } #endregion #region 加载 @@ -38,7 +50,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.UnitService.InitUnitDownList(this.drpUnitId, this.CurrUser.LoginProjectId, true); BLL.PostService.InitPostDownList(this.drpPostId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); - + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.InspectionPersonId = Request.Params["InspectionPersonId"]; Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId); if (inspectionPerson != null) @@ -57,6 +74,17 @@ namespace FineUIPro.Web.CQMS.Comprehensive if (!string.IsNullOrEmpty(inspectionPerson.PostId)) { this.drpPostId.SelectedValue = inspectionPerson.PostId; + + if (this.drpPostId.SelectedText == "焊工") + { + var welder = Funs.DB.BS_Welder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.WED_Name == inspectionPerson.PersonName); + if (welder != null) + { + welderId = welder.WED_ID; + txtWelderCode.Text = welder.WED_Code; + txtWelderCode.Hidden = false; + } + } } this.txtPersonName.Text = inspectionPerson.PersonName; this.txtCertificateNumber.Text = inspectionPerson.CertificateNumber; @@ -79,15 +107,100 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.drpUnitWorkIds.SelectedValueArray = inspectionPerson.UnitWorkId.Split(','); } this.txtRemark.Text = inspectionPerson.Remark; + + + var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && inspectionPerson.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (inspectionPerson.Status == BLL.Const.Comprehensive_Compile && inspectionPerson.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + } else { this.txtValidityDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtApprovalTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtDepartureTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtApprovalTime.Readonly = true; + this.drpUnitId.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtCertificateNumber.Readonly = true; + this.txtDepartureTime.Readonly = true; + this.txtInspectionCode.Readonly = true; + this.txtPersonName.Readonly = true; + this.txtQualifiedProjectCode.Readonly = true; + this.txtRemark.Readonly = true; + this.txtValidityDate.Readonly = true; + this.drpPostId.Readonly = true; + this.drpAudit.Readonly = true; + this.drpUnitWorkIds.Readonly = true; + //this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + + + #endregion #region 保存 @@ -103,13 +216,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } + if (this.drpPostId.SelectedText == "焊工") + { + if (string.IsNullOrEmpty(txtWelderCode.Text.Trim())) + { + Alert.ShowInTop("焊工编号必填!", MessageBoxIcon.Warning); + return; + } + } // 焊工部分 Model.BS_Welder welder = new Model.BS_Welder(); if (this.drpUnitId.SelectedValue != BLL.Const._Null) { welder.WED_Unit = this.drpUnitId.SelectedValue; } - welder.WED_Code = this.txtInspectionCode.Text.Trim(); + welder.WED_Code = this.txtWelderCode.Text.Trim(); welder.WED_Name = this.txtPersonName.Text.Trim(); if (!String.IsNullOrEmpty(this.txtValidityDate.Text.ToString())) { @@ -138,6 +259,194 @@ namespace FineUIPro.Web.CQMS.Comprehensive //人员报验 Model.Comprehensive_InspectionPerson inspectionPerson = new Model.Comprehensive_InspectionPerson(); inspectionPerson.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + inspectionPerson.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + inspectionPerson.UnitId = this.drpUnitId.SelectedValue; + } + inspectionPerson.InspectionPersonCode = this.txtInspectionCode.Text.Trim(); + if (this.drpPostId.SelectedValue != BLL.Const._Null) + { + inspectionPerson.PostId = this.drpPostId.SelectedValue; + } + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + inspectionPerson.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + inspectionPerson.PersonName = this.txtPersonName.Text.Trim(); + inspectionPerson.CertificateNumber = this.txtCertificateNumber.Text.Trim(); + inspectionPerson.QualifiedProjectCode = this.txtQualifiedProjectCode.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtValidityDate.Text.ToString())) + { + inspectionPerson.ValidityDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString()); + } + if (!string.IsNullOrEmpty(this.txtApprovalTime.Text.ToString())) + { + inspectionPerson.ApprovalTime = Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); + } + if (this.rblIsOnSite.SelectedValue == "true") + { + inspectionPerson.IsOnSite = true; + } + else + { + inspectionPerson.IsOnSite = false; + } + + if (!string.IsNullOrEmpty(this.txtDepartureTime.Text.ToString())) + { + inspectionPerson.DepartureTime = Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); + } + inspectionPerson.Remark = this.txtRemark.Text.Trim(); + string ids = string.Empty; + var lists = this.drpUnitWorkIds.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + inspectionPerson.UnitWorkId = ids; + if (string.IsNullOrEmpty(this.InspectionPersonId)) + { + inspectionPerson.CompileMan = this.CurrUser.UserId; + inspectionPerson.CompileDate = DateTime.Now; + inspectionPerson.Status = BLL.Const.Comprehensive_Compile; + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + inspectionPerson.InspectionPersonId = this.hdAttachUrl.Text; + } + else + { + inspectionPerson.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); + this.hdAttachUrl.Text = inspectionPerson.InspectionPersonId; + } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionPerson.InspectionPersonId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + // 人员报验 + BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson); + + if (this.drpPostId.SelectedText == "焊工") + { + if (string.IsNullOrEmpty(welderId)) + { + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } + else + { + welder.WED_ID = welderId; + BLL.PersonManageService.UpdateBSWelder(welder); + } + + + } + } + else + { + inspectionPerson.Status = BLL.Const.Comprehensive_Compile; + inspectionPerson.InspectionPersonId = this.InspectionPersonId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionPersonId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.Comprehensive_InspectionPerson.Where(u => u.InspectionPersonId == this.InspectionPersonId).FirstOrDefault(); + if (model != null) + { + + inspectionPerson.Status = model.Status; + } + BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson); + if (this.drpPostId.SelectedText == "焊工") + { + if (string.IsNullOrEmpty(welderId)) + { + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } + else + { + welder.WED_ID = welderId; + BLL.PersonManageService.UpdateBSWelder(welder); + } + + + } + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpUnitId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); + return; + } + + if (this.drpPostId.SelectedText == "焊工") + { + if (string.IsNullOrEmpty(txtWelderCode.Text.Trim())) + { + Alert.ShowInTop("焊工编号必填!", MessageBoxIcon.Warning); + return; + } + } + // 焊工部分 + Model.BS_Welder welder = new Model.BS_Welder(); + if (this.drpUnitId.SelectedValue != BLL.Const._Null) + { + welder.WED_Unit = this.drpUnitId.SelectedValue; + } + //welder.WED_Code = this.txtInspectionCode.Text.Trim(); + welder.WED_Name = this.txtPersonName.Text.Trim(); + if (!String.IsNullOrEmpty(this.txtValidityDate.Text.ToString())) + { + welder.LimitDate = Convert.ToDateTime(this.txtValidityDate.Text.ToString()); + } + if (!String.IsNullOrEmpty(this.txtDepartureTime.Text.ToString())) + { + welder.LeaveDate = Convert.ToDateTime(this.txtDepartureTime.Text.ToString()); + } + if (!String.IsNullOrEmpty(this.txtApprovalTime.Text.ToString())) + { + welder.PostDate = Convert.ToDateTime(this.txtApprovalTime.Text.ToString()); + } + welder.WED_WorkCode = this.txtCertificateNumber.Text.Trim(); + welder.WED_Class = this.txtQualifiedProjectCode.Text.Trim(); + if (this.rblIsOnSite.SelectedValue == "true") + { + welder.WED_IfOnGuard = true; + } + else + { + welder.WED_IfOnGuard = false; + } + welder.WED_Code = txtWelderCode.Text.Trim(); + welder.WED_Remark = this.txtRemark.Text.Trim(); + welder.ProjectId = this.CurrUser.LoginProjectId; + //人员报验 + Model.Comprehensive_InspectionPerson inspectionPerson = new Model.Comprehensive_InspectionPerson(); + inspectionPerson.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + inspectionPerson.AuditMan = drpAudit.SelectedValue; + } //审核人 if (this.drpUnitId.SelectedValue != BLL.Const._Null) { inspectionPerson.UnitId = this.drpUnitId.SelectedValue; @@ -200,34 +509,162 @@ namespace FineUIPro.Web.CQMS.Comprehensive inspectionPerson.InspectionPersonId = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); this.hdAttachUrl.Text = inspectionPerson.InspectionPersonId; } + + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == inspectionPerson.InspectionPersonId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + inspectionPerson.Status = BLL.Const.Comprehensive_Audit; // 人员报验 BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson); - if (this.drpPostId.SelectedItem.Text == "焊工") + if (this.drpPostId.SelectedText == "焊工") { // 焊工部分 - BLL.PersonManageService.AddBSWelder(welder); + if (string.IsNullOrEmpty(welderId)) + { + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } + else + { + welder.WED_ID = welderId; + BLL.PersonManageService.UpdateBSWelder(welder); + } } } else { inspectionPerson.InspectionPersonId = this.InspectionPersonId; - BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson); - // 焊工部分 - var oldWelder = BLL.PersonManageService.GetBSWelderByProjectIdUnitIdAndWED_Code(welder.ProjectId, welder.WED_Unit, welder.WED_Code); - if (oldWelder != null) + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.InspectionPersonId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) { - welder.WED_ID = oldWelder.WED_ID; - BLL.PersonManageService.UpdateBSWelder(welder); + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + // BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson); + var oldInspectionPerson = Funs.DB.Comprehensive_InspectionPerson.Where(u => u.InspectionPersonId == this.InspectionPersonId).FirstOrDefault(); + if (oldInspectionPerson == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + inspectionPerson.CompileMan = this.CurrUser.UserId; + inspectionPerson.CompileDate = DateTime.Now; + inspectionPerson.Status = BLL.Const.Comprehensive_Audit; + BLL.InspectionPersonService.AddInspectionPerson(inspectionPerson); } else { - BLL.PersonManageService.AddBSWelder(welder); + inspectionPerson.CompileMan = oldInspectionPerson.CompileMan; + inspectionPerson.CompileDate = oldInspectionPerson.CompileDate; + if (oldInspectionPerson.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + inspectionPerson.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldInspectionPerson.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + inspectionPerson.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + inspectionPerson.Status = BLL.Const.Comprehensive_Complete; + } + else + { + inspectionPerson.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.InspectionPersonService.UpdateInspectionPerson(inspectionPerson); + if (this.drpPostId.SelectedText == "焊工") + { + // 焊工部分 + if (string.IsNullOrEmpty(welderId)) + { + // 焊工部分 + BLL.PersonManageService.AddBSWelder(welder); + } + else + { + welder.WED_ID = welderId; + BLL.PersonManageService.UpdateBSWelder(welder); + } + } + + } + + } + #region 审核记录 + + var currApprove = InspectionPersonApproveService.GetCurrentApprove(inspectionPerson.InspectionPersonId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_InspectionPersonApprove(); + approve.InspectionPersonId = inspectionPerson.InspectionPersonId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + InspectionPersonApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove(); + newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + InspectionPersonApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_InspectionPersonApprove newApprove = new Model.Comprehensive_InspectionPersonApprove(); + newApprove.InspectionPersonId = inspectionPerson.InspectionPersonId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + InspectionPersonApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + InspectionPersonApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove(); + reApprove.InspectionPersonId = currApprove.InspectionPersonId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + reApprove.ApproveIdea = txtidea.Text; + InspectionPersonApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_InspectionPersonApprove reApprove = new Model.Comprehensive_InspectionPersonApprove(); + reApprove.InspectionPersonId = currApprove.InspectionPersonId; + reApprove.ApproveMan = inspectionPerson.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + InspectionPersonApproveService.EditApprove(reApprove); + } } } + + + #endregion + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + #endregion #region 附件上传 @@ -242,7 +679,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_InspectionPerson)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/InspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId))); + Model.Comprehensive_InspectionPerson inspectionPerson = BLL.InspectionPersonService.GetInspectionPersonById(this.InspectionPersonId); + if (inspectionPerson == null || ((inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_Compile) || (inspectionPerson.CompileMan == CurrUser.UserId && inspectionPerson.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/inspectionPerson&menuId={1}", this.hdAttachUrl.Text, BLL.Const.InspectionPersonMenuId))); + } } #endregion @@ -268,5 +713,18 @@ namespace FineUIPro.Web.CQMS.Comprehensive } } #endregion + + protected void drpPostId_SelectedIndexChanged(object sender, EventArgs e) + { + if (drpPostId.SelectedText=="焊工") + { + txtWelderCode.Hidden = false; + } + else + { + txtWelderCode.Hidden = true; + + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs index 838bdafe..182ee54e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class InspectionPersonEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class InspectionPersonEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnitId 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitId; - + /// /// txtInspectionCode 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtInspectionCode; - + /// /// drpCNProfessionalId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// drpUnitWorkIds 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorkIds; - + /// /// drpPostId 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpPostId; - + /// /// txtPersonName 控件。 /// @@ -92,7 +94,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPersonName; - + + /// + /// txtWelderCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWelderCode; + /// /// txtCertificateNumber 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCertificateNumber; - + /// /// txtQualifiedProjectCode 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtQualifiedProjectCode; - + /// /// txtApprovalTime 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtApprovalTime; - + /// /// txtValidityDate 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtValidityDate; - + /// /// txtDepartureTime 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtDepartureTime; - + /// /// rblIsOnSite 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rblIsOnSite; - + /// /// txtRemark 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtRemark; - + /// /// Panel2 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -173,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -182,7 +193,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -191,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -200,7 +256,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -209,7 +265,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx index 96415a82..270a35d1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx @@ -32,9 +32,6 @@ - -
@@ -53,7 +50,7 @@ - + - - - - - - + + - /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("超过一定规模的危大施工方案" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); - } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs index c374e8d4..83e202b4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.designer.cs @@ -102,15 +102,6 @@ namespace FineUIPro.Web.Comprehensive { /// protected global::FineUIPro.Button btnNew; - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - /// /// lblPageIndex 控件。 /// @@ -121,22 +112,13 @@ namespace FineUIPro.Web.Comprehensive { protected global::System.Web.UI.WebControls.Label lblPageIndex; /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - - /// - /// LinkButton1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.LinkButton LinkButton1; + protected global::System.Web.UI.WebControls.Label Label2; /// /// lbtnFileUrl 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx index f066ec6b..693e1215 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx @@ -48,15 +48,7 @@ - - - - - - - - + @@ -78,7 +70,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs index b8337fca..089581da 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs @@ -64,6 +64,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } this.txtAuditMan.Text = majorPlanApproval.AuditMan; this.txtApprovalMan.Text = majorPlanApproval.ApprovalMan; + this.txtImplementationDeviation.Text = majorPlanApproval.ImplementationDeviation; } else { @@ -105,6 +106,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive } majorPlanApproval.AuditMan = this.txtAuditMan.Text.Trim(); majorPlanApproval.ApprovalMan = this.txtApprovalMan.Text.Trim(); + majorPlanApproval.ImplementationDeviation = this.txtImplementationDeviation.Text.Trim(); string ids = string.Empty; var lists = this.drpUnitWorkIds.SelectedValueArray; foreach (var item in lists) @@ -155,20 +157,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive } PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", this.hdAttachUrl.Text, BLL.Const.MajorPlanApprovalMenuId))); } - - /// - /// 附件上传 - /// - /// - /// - protected void btnAttach2_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.hdAttachUrl.Text)) //新增记录 - { - this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_MajorPlanApproval)); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", this.hdAttachUrl.Text+"R", BLL.Const.MajorPlanApprovalMenuId))); - } #endregion #region 获取按钮权限 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs index 6e47bde9..28996232 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.designer.cs @@ -130,31 +130,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive { protected global::FineUIPro.Label Label13; /// - /// Panel3 控件。 + /// txtImplementationDeviation 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Panel Panel3; - - /// - /// Label2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label2; - - /// - /// btnAttach2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAttach2; + protected global::FineUIPro.TextArea txtImplementationDeviation; /// /// Panel2 控件。 diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx index 3677b354..9503b3a8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx @@ -22,7 +22,7 @@ - + @@ -34,9 +34,6 @@ - - @@ -47,7 +44,7 @@ - - + - - + - - + + + + + + - + @@ -110,11 +114,15 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs index d372e92e..35d34990 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs @@ -4,7 +4,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; + namespace FineUIPro.Web.Comprehensive { @@ -21,14 +21,14 @@ namespace FineUIPro.Web.Comprehensive if (!IsPostBack) { GetButtonPower(); - BLL.UnitService.GetUnit(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); + BLL.UnitService.InitUnitDownList(this.sdrpUnitId, this.CurrUser.LoginProjectId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpProfessionalId, true); BindGrid(); } } public void BindGrid() { - string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents, IssuedDate, ReceiveUnit, + string strSql = @"select NCRManagementId, ProjectId, SendUnit, NCRCode, Contents, IssuedDate, ReceiveUnit,Status, ClosedDate, CompleteDate, ResponsibleMan, AttachUrl, ImplementationFrontState, CompileMan, UnitWorkId,CN.ProfessionalName,C.CNProfessionalId,u.UnitName from Comprehensive_NCRManagement C @@ -299,23 +299,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("NCR管理" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs index af765984..dab173ea 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class NCRManagement { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class NCRManagement + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// drpProfessionalId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProfessionalId; - + /// /// txtNCRCode 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtNCRCode; - + /// /// btnSearch 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnImport 控件。 /// @@ -110,16 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -128,25 +121,34 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + /// - /// lbUnitNames 控件。 + /// Label3 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitNames; - + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -191,7 +193,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -200,7 +211,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -209,7 +220,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx new file mode 100644 index 00000000..0126341f --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="NCRManagementApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.NCRManagementApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.cs new file mode 100644 index 00000000..94b01955 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class NCRManagementApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string NCRManagementId = Request.Params["Id"]; + var list = NCRManagementApproveService.GetProjectQualityList(NCRManagementId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.designer.cs new file mode 100644 index 00000000..3971d9d2 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class NCRManagementApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs index fecdef85..896e5a8e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementDataIn.aspx.cs @@ -96,21 +96,22 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -120,11 +121,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL(ds.Tables[0], 10); hdCheckResult.Text = "1"; @@ -135,6 +136,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive //return null; // return dt; } + finally + { + conn.Close(); + conn.Dispose(); + } } #endregion @@ -312,7 +318,6 @@ namespace FineUIPro.Web.CQMS.Comprehensive string rootPath = Server.MapPath("~/"); ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); hdCheckResult.Text = string.Empty; - ShowNotify("导入成功!", MessageBoxIcon.Success); } else { @@ -332,21 +337,21 @@ namespace FineUIPro.Web.CQMS.Comprehensive /// Excel文件路径名 private void ImportXlsToData2(string fileName) { + //支持.xls和.xlsx,即包括office2010等版本的 HDR=Yes代表第一行是标题,不是数据; + string cmdText = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties='Excel 12.0; HDR=Yes; IMEX=1'"; + //建立连接 + OleDbConnection conn = new OleDbConnection(string.Format(cmdText, 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; + //打开连接 + if (conn.State == ConnectionState.Broken || conn.State == ConnectionState.Closed) + { + conn.Open(); + } 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); + m_tableName = conn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); if (m_tableName != null && m_tableName.Rows.Count > 0) { @@ -356,11 +361,11 @@ namespace FineUIPro.Web.CQMS.Comprehensive } string sqlMaster; sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; - oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster = new OleDbDataAdapter(sqlMaster, conn); oleAdMaster.Fill(ds, "m_tableName"); oleAdMaster.Dispose(); - oleDBConn.Close(); - oleDBConn.Dispose(); + conn.Close(); + conn.Dispose(); AddDatasetToSQL2(ds.Tables[0], 10); } diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx index 70adf78e..715392b9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx @@ -62,7 +62,7 @@ - @@ -71,13 +71,46 @@
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index b2b8bf11..82e3fe7a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -35,9 +36,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { GetButtonPower(); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkIds, this.CurrUser.LoginProjectId, false); - BLL.UnitService.GetUnit(this.drpUnitIds, this.CurrUser.LoginProjectId, false); - BLL.UnitService.GetUnit(this.drpSendUnit, this.CurrUser.LoginProjectId, true); + BLL.UnitService.InitUnitDownList(this.drpUnitIds, this.CurrUser.LoginProjectId, false); + BLL.UnitService.InitUnitDownList(this.drpSendUnit, this.CurrUser.LoginProjectId, true); BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.NCRManagementId = Request.Params["NCRManagementId"]; Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId); if (nCRManagement != null) @@ -76,15 +83,96 @@ namespace FineUIPro.Web.CQMS.Comprehensive } this.txtResponsibleMan.Text = nCRManagement.ResponsibleMan; this.txtImplementationFrontState.Text = nCRManagement.ImplementationFrontState; + + + var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && nCRManagement.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (nCRManagement.Status == BLL.Const.Comprehensive_Compile && nCRManagement.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + } else { this.txtIssuedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtClosedDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtCompleteDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtClosedDate.Readonly = true; + this.txtCompleteDate.Readonly = true; + this.drpCNProfessionalId.Readonly = true; + this.txtContents.Readonly = true; + this.txtImplementationFrontState.Readonly = true; + this.txtIssuedDate.Readonly = true; + this.txtNCRCode.Readonly = true; + this.txtResponsibleMan.Readonly = true; + this.drpSendUnit.Readonly = true; + this.drpUnitIds.Readonly = true; + this.drpUnitWorkIds.Readonly = true; + this.drpAudit.Readonly = true; + //this.btnAttach.Enabled = false; + + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + + #endregion #region 保存 @@ -107,6 +195,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive } Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement(); nCRManagement.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + nCRManagement.AuditMan = drpAudit.SelectedValue; + } //审核人 if (this.drpSendUnit.SelectedValue != BLL.Const._Null) { nCRManagement.SendUnit = this.drpSendUnit.SelectedValue; @@ -166,14 +258,237 @@ namespace FineUIPro.Web.CQMS.Comprehensive nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement)); this.hdAttachUrl.Text = nCRManagement.NCRManagementId; } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } nCRManagement.CompileMan = this.CurrUser.UserId; + nCRManagement.Status = BLL.Const.Comprehensive_Compile; BLL.NCRManagementService.AddNCRManagement(nCRManagement); } else { nCRManagement.NCRManagementId = this.NCRManagementId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault(); + if (model != null) + { + nCRManagement.Status = model.Status; + } BLL.NCRManagementService.UpdateNCRManagement(nCRManagement); } + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (this.drpSendUnit.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择发出单位!", MessageBoxIcon.Warning); + return; + } + if (drpCNProfessionalId.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_NCRManagement nCRManagement = new Model.Comprehensive_NCRManagement(); + nCRManagement.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + nCRManagement.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (this.drpSendUnit.SelectedValue != BLL.Const._Null) + { + nCRManagement.SendUnit = this.drpSendUnit.SelectedValue; + } + if (this.drpCNProfessionalId.SelectedValue != BLL.Const._Null) + { + nCRManagement.CNProfessionalId = this.drpCNProfessionalId.SelectedValue; + } + nCRManagement.NCRCode = this.txtNCRCode.Text.Trim(); + nCRManagement.Contents = this.txtContents.Text.Trim(); + if (!string.IsNullOrEmpty(this.txtIssuedDate.Text)) + { + nCRManagement.IssuedDate = Convert.ToDateTime(this.txtIssuedDate.Text); + } + + if (!string.IsNullOrEmpty(this.txtClosedDate.Text)) + { + nCRManagement.ClosedDate = Convert.ToDateTime(this.txtClosedDate.Text); + } + if (!string.IsNullOrEmpty(this.txtCompleteDate.Text)) + { + nCRManagement.CompleteDate = Convert.ToDateTime(this.txtCompleteDate.Text); + } + nCRManagement.ResponsibleMan = this.txtResponsibleMan.Text.Trim(); + nCRManagement.ImplementationFrontState = this.txtImplementationFrontState.Text.Trim(); + string ids = string.Empty; + var lists = this.drpUnitWorkIds.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + nCRManagement.UnitWorkId = ids; + + string unitIds = string.Empty; + var unitList = this.drpUnitIds.SelectedValueArray; + foreach (var item in unitList) + { + unitIds += item + ","; + } + if (!string.IsNullOrEmpty(unitIds)) + { + unitIds = unitIds.Substring(0, unitIds.LastIndexOf(",")); + } + nCRManagement.ReceiveUnit = unitIds; + if (string.IsNullOrEmpty(this.NCRManagementId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + nCRManagement.NCRManagementId = this.hdAttachUrl.Text; + } + else + { + nCRManagement.NCRManagementId = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement)); + this.hdAttachUrl.Text = nCRManagement.NCRManagementId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == nCRManagement.NCRManagementId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + nCRManagement.CompileMan = this.CurrUser.UserId; + nCRManagement.Status = BLL.Const.Comprehensive_Audit; + BLL.NCRManagementService.AddNCRManagement(nCRManagement); + } + else + { + nCRManagement.NCRManagementId = this.NCRManagementId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.NCRManagementId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + //BLL.NCRManagementService.UpdateNCRManagement(nCRManagement); + var oldNCRManagement = Funs.DB.Comprehensive_NCRManagement.Where(u => u.NCRManagementId == this.NCRManagementId).FirstOrDefault(); + if (oldNCRManagement == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + nCRManagement.CompileMan = this.CurrUser.UserId; + nCRManagement.Status = BLL.Const.Comprehensive_Audit; + BLL.NCRManagementService.AddNCRManagement(nCRManagement); + } + else + { + nCRManagement.CompileMan = oldNCRManagement.CompileMan; + if (oldNCRManagement.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + nCRManagement.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldNCRManagement.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + nCRManagement.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + nCRManagement.Status = BLL.Const.Comprehensive_Complete; + } + else + { + nCRManagement.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.NCRManagementService.UpdateNCRManagement(nCRManagement); + + } + + } + #region 审核记录 + + var currApprove = NCRManagementApproveService.GetCurrentApprove(nCRManagement.NCRManagementId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_NCRManagementApprove(); + approve.NCRManagementId = nCRManagement.NCRManagementId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + NCRManagementApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove(); + newApprove.NCRManagementId = nCRManagement.NCRManagementId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + NCRManagementApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_NCRManagementApprove newApprove = new Model.Comprehensive_NCRManagementApprove(); + newApprove.NCRManagementId = nCRManagement.NCRManagementId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + NCRManagementApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + NCRManagementApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove(); + reApprove.NCRManagementId = currApprove.NCRManagementId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + // reApprove.ApproveIdea = txtidea.Text; + NCRManagementApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_NCRManagementApprove reApprove = new Model.Comprehensive_NCRManagementApprove(); + reApprove.NCRManagementId = currApprove.NCRManagementId; + reApprove.ApproveMan = nCRManagement.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + NCRManagementApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } @@ -191,7 +506,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_NCRManagement)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/NCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId))); + Model.Comprehensive_NCRManagement nCRManagement = BLL.NCRManagementService.GetNCRManagementById(this.NCRManagementId); + if (nCRManagement == null || ((nCRManagement.CompileMan == CurrUser.UserId && nCRManagement.Status == BLL.Const.Comprehensive_Compile) || (nCRManagement.CompileMan == CurrUser.UserId && nCRManagement.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/nCRManagement&menuId={1}", this.hdAttachUrl.Text, BLL.Const.NCRManagementMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs index 29324056..750d2e35 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class NCRManagementEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class NCRManagementEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpSendUnit 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpSendUnit; - + /// /// drpCNProfessionalId 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessionalId; - + /// /// txtNCRCode 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtNCRCode; - + /// /// txtIssuedDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtIssuedDate; - + /// /// txtContents 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtContents; - + /// /// drpUnitWorkIds 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorkIds; - + /// /// drpUnitIds 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitIds; - + /// /// txtImplementationFrontState 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtImplementationFrontState; - + /// /// txtResponsibleMan 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtResponsibleMan; - + /// /// txtClosedDate 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtClosedDate; - + /// /// txtCompleteDate 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtCompleteDate; - + /// /// Panel2 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -164,7 +166,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -173,7 +220,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -182,7 +229,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -191,7 +238,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx index 35e9194a..ce707619 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx @@ -30,9 +30,6 @@ - - @@ -43,7 +40,7 @@ - + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs index 1a4d7624..505f3b6b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -48,7 +47,7 @@ namespace FineUIPro.Web.Comprehensive ///
public void BindGrid() { - string strSql = @"select PressurePipeId, EstimateNumber, ActualNumber, PackageNumber, + string strSql = @"select PressurePipeId, EstimateNumber, ActualNumber, PackageNumber, Status, CompletePackageNumber, PressurePipeNumber, IssuedReportNumber, CompileMan,U.UnitName from Comprehensive_PressurePipe C left join Base_Unit U on C.UnitId=U.UnitId @@ -229,23 +228,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("压力管道管理" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs index a0c12997..42ac2ca8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class PressurePipe { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class PressurePipe + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// btnSearch 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -83,16 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -101,7 +94,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -137,7 +139,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx new file mode 100644 index 00000000..212bf8ca --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PressurePipeApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.PressurePipeApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.cs new file mode 100644 index 00000000..94f37143 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class PressurePipeApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string PressurePipeId = Request.Params["Id"]; + var list = PressurePipeApproveService.GetProjectQualityList(PressurePipeId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.designer.cs new file mode 100644 index 00000000..82558769 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class PressurePipeApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx index 9953392f..b05676cd 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx @@ -42,7 +42,7 @@ - @@ -51,13 +51,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs index 409d52b9..ee3f7e5e 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -35,6 +36,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive { GetButtonPower(); BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true); + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; this.PressurePipeId = Request.Params["PressurePipeId"]; Model.Comprehensive_PressurePipe pressurePipe = BLL.PressurePipeService.GetPressurePipeById(this.PressurePipeId); if (pressurePipe != null) @@ -51,9 +58,90 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtCompletePackageNumber.Text = pressurePipe.CompletePackageNumber.HasValue ? pressurePipe.CompletePackageNumber.ToString() : ""; this.txtPressurePipeNumber.Text = pressurePipe.PressurePipeNumber.HasValue ? pressurePipe.PressurePipeNumber.ToString() : ""; this.txtIssuedReportNumber.Text = pressurePipe.IssuedReportNumber.HasValue ? pressurePipe.IssuedReportNumber.ToString() : ""; + + + var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + + } + else + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtActualNumber.Readonly = true; + this.txtCompletePackageNumber.Readonly = true; + this.txtEstimateNumber.Readonly = true; + this.txtIssuedReportNumber.Readonly = true; + this.txtPackageNumber.Readonly = true; + this.txtPressurePipeNumber.Readonly = true; + this.drpUnit.Readonly = true; + + this.drpAudit.Readonly = true; + + //this.btnAttach.Enabled = false; + + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #endregion #region 保存 @@ -71,6 +159,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive } Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe(); pressurePipe.Projctid = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + pressurePipe.AuditMan = drpAudit.SelectedValue; + } //审核人 if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text)) { pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text); @@ -110,17 +202,219 @@ namespace FineUIPro.Web.CQMS.Comprehensive pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe)); this.hdAttachUrl.Text = pressurePipe.PressurePipeId; } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.PressurePipeId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } pressurePipe.CompileMan = this.CurrUser.UserId; + pressurePipe.Status = BLL.Const.Comprehensive_Compile; + BLL.PressurePipeService.AddPressurePipe(pressurePipe); } else { pressurePipe.PressurePipeId = this.PressurePipeId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.PressurePipeId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + var model = Funs.DB.Comprehensive_PressurePipe.Where(u => u.PressurePipeId == this.PressurePipeId).FirstOrDefault(); + if (model != null) + { + pressurePipe.Status = model.Status; + } + BLL.PressurePipeService.UpdatePressurePipe(pressurePipe); - } + } ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpUnit.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_PressurePipe pressurePipe = new Model.Comprehensive_PressurePipe(); + pressurePipe.Projctid = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + pressurePipe.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (!string.IsNullOrEmpty(this.txtEstimateNumber.Text)) + { + pressurePipe.EstimateNumber = Convert.ToInt32(this.txtEstimateNumber.Text); + } + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + pressurePipe.UnitId = this.drpUnit.SelectedValue; + } + if (!string.IsNullOrEmpty(this.txtActualNumber.Text)) + { + pressurePipe.ActualNumber = Convert.ToInt32(this.txtActualNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtPackageNumber.Text)) + { + pressurePipe.PackageNumber = Convert.ToInt32(this.txtPackageNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtCompletePackageNumber.Text)) + { + pressurePipe.CompletePackageNumber = Convert.ToInt32(this.txtCompletePackageNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtPressurePipeNumber.Text)) + { + pressurePipe.PressurePipeNumber = Convert.ToInt32(this.txtPressurePipeNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtIssuedReportNumber.Text)) + { + pressurePipe.IssuedReportNumber = Convert.ToInt32(this.txtIssuedReportNumber.Text); + } + if (string.IsNullOrEmpty(this.PressurePipeId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + pressurePipe.PressurePipeId = this.hdAttachUrl.Text; + } + else + { + pressurePipe.PressurePipeId = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe)); + this.hdAttachUrl.Text = pressurePipe.PressurePipeId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.PressurePipeId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + pressurePipe.CompileMan = this.CurrUser.UserId; + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + BLL.PressurePipeService.AddPressurePipe(pressurePipe); + } + else + { + pressurePipe.PressurePipeId = this.PressurePipeId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.PressurePipeId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + // BLL.PressurePipeService.UpdatePressurePipe(pressurePipe); + var oldPressurePipe = Funs.DB.Comprehensive_PressurePipe.Where(u => u.PressurePipeId == this.PressurePipeId).FirstOrDefault(); + if (oldPressurePipe == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + pressurePipe.CompileMan = this.CurrUser.UserId; + //pressurePipe.CompileDate = DateTime.Now; + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + BLL.PressurePipeService.AddPressurePipe(pressurePipe); + } + else + { + pressurePipe.CompileMan = oldPressurePipe.CompileMan; + //pressurePipe.CompileDate = oldPressurePipe.CompileDate; + if (oldPressurePipe.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldPressurePipe.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + pressurePipe.Status = BLL.Const.Comprehensive_Complete; + } + else + { + pressurePipe.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.PressurePipeService.UpdatePressurePipe(pressurePipe); + + } + + } + #region 审核记录 + + var currApprove = PressurePipeApproveService.GetCurrentApprove(pressurePipe.PressurePipeId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_PressurePipeApprove(); + approve.PressurePipeId = pressurePipe.PressurePipeId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + PressurePipeApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove(); + newApprove.PressurePipeId = pressurePipe.PressurePipeId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + PressurePipeApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_PressurePipeApprove newApprove = new Model.Comprehensive_PressurePipeApprove(); + newApprove.PressurePipeId = pressurePipe.PressurePipeId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + PressurePipeApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + PressurePipeApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove(); + reApprove.PressurePipeId = currApprove.PressurePipeId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + // reApprove.ApproveIdea = txtidea.Text; + PressurePipeApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_PressurePipeApprove reApprove = new Model.Comprehensive_PressurePipeApprove(); + reApprove.PressurePipeId = currApprove.PressurePipeId; + reApprove.ApproveMan = pressurePipe.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + PressurePipeApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + #endregion #region 附件上传 @@ -135,7 +429,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_PressurePipe)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/PressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.PressurePipeMenuId))); + Model.Comprehensive_PressurePipe pressurePipe = BLL.PressurePipeService.GetPressurePipeById(this.PressurePipeId); + if (pressurePipe == null || ((pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_Compile) || (pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.PressurePipeMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.PressurePipeMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs index 7dbc471d..b88bc8b1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class PressurePipeEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class PressurePipeEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnit 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// txtEstimateNumber 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtEstimateNumber; - + /// /// txtActualNumber 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtActualNumber; - + /// /// txtPackageNumber 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtPackageNumber; - + /// /// txtCompletePackageNumber 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtCompletePackageNumber; - + /// /// txtPressurePipeNumber 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtPressurePipeNumber; - + /// /// txtIssuedReportNumber 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtIssuedReportNumber; - + /// /// Panel2 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -128,7 +130,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -137,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -146,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -155,7 +202,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx index e5c4bda1..50c1f667 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx @@ -25,9 +25,6 @@ - - @@ -38,15 +35,15 @@
- - - + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs index 1e4ccbf6..6802938b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -30,7 +29,7 @@ namespace FineUIPro.Web.Comprehensive /// public void BindGrid() { - string strSql = @"select QualityAccidentId, time, Place, DirectEconomicLoss, RemedialMeasures, + string strSql = @"select QualityAccidentId, time, Place, DirectEconomicLoss, RemedialMeasures,Status, ResponsibilityDetermination, CorrectiveActions, AttachUrl, CompileMan, CompileDate, UnitWorkId,U.UnitName from Comprehensive_QualityAccident C @@ -239,23 +238,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("质量事故处理记录" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs index 8dffecce..72dc9381 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class QualityAccident { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class QualityAccident + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// btnNew 控件。 /// @@ -65,16 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -83,16 +76,25 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// - /// lbUnitWorkName 控件。 + /// Label2 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::System.Web.UI.WebControls.Label lbUnitWorkName; - + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -128,7 +130,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx new file mode 100644 index 00000000..5dedd012 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="QualityAccidentApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.QualityAccidentApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.cs new file mode 100644 index 00000000..5588289c --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class QualityAccidentApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string QualityAccidentId = Request.Params["Id"]; + var list = QualityAccidentApproveService.GetProjectQualityList(QualityAccidentId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("True")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("False")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.designer.cs new file mode 100644 index 00000000..3050730b --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class QualityAccidentApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx index 700552fc..c90a35b8 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx @@ -51,7 +51,7 @@ - @@ -60,6 +60,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -71,7 +100,10 @@ -
diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs index 575c7e25..3034876b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -36,7 +37,12 @@ namespace FineUIPro.Web.CQMS.Comprehensive GetButtonPower(); BLL.UnitWorkService.InitUnitWorkDownList(this.drpUnitWorkId, this.CurrUser.LoginProjectId, false); BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true); - + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; + this.QualityAccidentId = Request.Params["QualityAccidentId"]; Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId); if (pressurePipe != null) @@ -54,13 +60,85 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.drpUnitWorkId.SelectedValueArray = pressurePipe.UnitWorkId.Split(','); } + + var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && pressurePipe.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (pressurePipe.Status == BLL.Const.Comprehensive_Compile && pressurePipe.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + } else { this.txtTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; } } } + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtCorrectiveActions.Readonly = true; + this.txtDirectEconomicLoss.Readonly = true; + this.txtPlace.Readonly = true; + this.txtRemedialMeasures.Readonly = true; + this.txtResponsibilityDetermination.Readonly = true; + this.txtTime.Readonly = true; + this.drpUnit.Readonly = true; + this.drpUnitWorkId.Readonly = true; + this.drpAudit.Readonly = true; + //this.btnAttach.Enabled = false; + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } #endregion #region 保存 @@ -75,6 +153,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive { Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident(); pressurePipe.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + pressurePipe.AuditMan = drpAudit.SelectedValue; + } //审核人 if (!string.IsNullOrEmpty(this.txtTime.Text)) { pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text); @@ -111,15 +193,35 @@ namespace FineUIPro.Web.CQMS.Comprehensive pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident)); this.hdAttachUrl.Text = pressurePipe.QualityAccidentId; } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.QualityAccidentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } pressurePipe.CompileMan = this.CurrUser.UserId; pressurePipe.CompileDate = DateTime.Now; + pressurePipe.Status = BLL.Const.Comprehensive_Compile; BLL.QualityAccidentService.AddQualityAccident(pressurePipe); } else { pressurePipe.QualityAccidentId = this.QualityAccidentId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.QualityAccidentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + + var model = Funs.DB.Comprehensive_QualityAccident.Where(u => u.QualityAccidentId == this.QualityAccidentId).FirstOrDefault(); + if (model != null) + { + pressurePipe.Status = model.Status; + } + BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe); - } + } ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } @@ -128,6 +230,188 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); } } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpUnit.SelectedValue != BLL.Const._Null) + { + Model.Comprehensive_QualityAccident pressurePipe = new Model.Comprehensive_QualityAccident(); + pressurePipe.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + pressurePipe.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (!string.IsNullOrEmpty(this.txtTime.Text)) + { + pressurePipe.Time = Convert.ToDateTime(this.txtTime.Text); + } + else + { + pressurePipe.Time = DateTime.Now; + } + pressurePipe.Place = this.txtPlace.Text; + pressurePipe.DirectEconomicLoss = this.txtDirectEconomicLoss.Text; + pressurePipe.RemedialMeasures = this.txtRemedialMeasures.Text; + pressurePipe.ResponsibilityDetermination = this.txtResponsibilityDetermination.Text; + pressurePipe.CorrectiveActions = this.txtCorrectiveActions.Text; + pressurePipe.UnitId = this.drpUnit.SelectedValue; + string ids = string.Empty; + var lists = this.drpUnitWorkId.SelectedValueArray; + foreach (var item in lists) + { + ids += item + ","; + } + if (!string.IsNullOrEmpty(ids)) + { + ids = ids.Substring(0, ids.LastIndexOf(",")); + } + pressurePipe.UnitWorkId = ids; + if (string.IsNullOrEmpty(this.QualityAccidentId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + pressurePipe.QualityAccidentId = this.hdAttachUrl.Text; + } + else + { + pressurePipe.QualityAccidentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident)); + this.hdAttachUrl.Text = pressurePipe.QualityAccidentId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == pressurePipe.QualityAccidentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + pressurePipe.CompileMan = this.CurrUser.UserId; + pressurePipe.CompileDate = DateTime.Now; + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + BLL.QualityAccidentService.AddQualityAccident(pressurePipe); + } + else + { + pressurePipe.QualityAccidentId = this.QualityAccidentId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.QualityAccidentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + // BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe); + + var oldQualityAccident = Funs.DB.Comprehensive_QualityAccident.Where(u => u.QualityAccidentId == this.QualityAccidentId).FirstOrDefault(); + if (oldQualityAccident == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + pressurePipe.CompileMan = this.CurrUser.UserId; + pressurePipe.CompileDate = DateTime.Now; + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + BLL.QualityAccidentService.AddQualityAccident(pressurePipe); + } + else + { + pressurePipe.CompileMan = oldQualityAccident.CompileMan; + pressurePipe.CompileDate = oldQualityAccident.CompileDate; + if (oldQualityAccident.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldQualityAccident.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + pressurePipe.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + pressurePipe.Status = BLL.Const.Comprehensive_Complete; + } + else + { + pressurePipe.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.QualityAccidentService.UpdateQualityAccident(pressurePipe); + + } + + } + #region 审核记录 + + var currApprove = QualityAccidentApproveService.GetCurrentApprove(pressurePipe.QualityAccidentId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_QualityAccidentApprove(); + approve.QualityAccidentId = pressurePipe.QualityAccidentId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + QualityAccidentApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove(); + newApprove.QualityAccidentId = pressurePipe.QualityAccidentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + QualityAccidentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_QualityAccidentApprove newApprove = new Model.Comprehensive_QualityAccidentApprove(); + newApprove.QualityAccidentId = pressurePipe.QualityAccidentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + QualityAccidentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + QualityAccidentApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove(); + reApprove.QualityAccidentId = currApprove.QualityAccidentId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + reApprove.ApproveIdea = txtidea.Text; + QualityAccidentApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_QualityAccidentApprove reApprove = new Model.Comprehensive_QualityAccidentApprove(); + reApprove.QualityAccidentId = currApprove.QualityAccidentId; + reApprove.ApproveMan = pressurePipe.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + QualityAccidentApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); + } + } + #endregion #region 附件上传 @@ -142,7 +426,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_QualityAccident)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/QualityAccident&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId))); + Model.Comprehensive_QualityAccident pressurePipe = BLL.QualityAccidentService.GetQualityAccidentById(this.QualityAccidentId); + if (pressurePipe == null || ((pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_Compile) || (pressurePipe.CompileMan == CurrUser.UserId && pressurePipe.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/pressurePipe&menuId={1}", this.hdAttachUrl.Text, BLL.Const.QualityAccidentMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs index a2c12bd8..ff9a189a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class QualityAccidentEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class QualityAccidentEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnit 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// drpUnitWorkId 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWorkId; - + /// /// txtTime 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtTime; - + /// /// txtPlace 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtPlace; - + /// /// txtDirectEconomicLoss 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtDirectEconomicLoss; - + /// /// txtRemedialMeasures 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemedialMeasures; - + /// /// txtResponsibilityDetermination 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtResponsibilityDetermination; - + /// /// txtCorrectiveActions 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtCorrectiveActions; - + /// /// Panel2 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -137,7 +139,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -146,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// ToolbarFill1 控件。 /// @@ -155,7 +202,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// hdAttachUrl 控件。 /// @@ -164,7 +211,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -173,7 +220,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx index dcfd07f0..4cc67c08 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx @@ -25,14 +25,14 @@ - - @@ -40,9 +40,6 @@ - - @@ -70,7 +67,7 @@ - + + + + + + + @@ -63,6 +60,13 @@ + + + + + + - + @@ -89,7 +93,11 @@ + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs index cf872437..81356dcf 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs @@ -4,7 +4,6 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; -using System.Text; namespace FineUIPro.Web.Comprehensive { @@ -32,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive /// public void BindGrid() { - string strSql = @"select C.SpecialEquipmentId, ProjectId,C.EquipmentId, SunNumber, + string strSql = @"select C.SpecialEquipmentId, ProjectId,C.EquipmentId, SunNumber, Status, InformNumber, SubmitDataNumber, MonitoringReportNumber, CompileMan,U.UnitName,eq.SpecialEquipmentName from Comprehensive_SpecialEquipment C left join Base_Unit U on C.UnitId=U.UnitId @@ -219,23 +218,33 @@ namespace FineUIPro.Web.Comprehensive } #endregion - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) + public static string ConvertState(object Status) { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("特种设备管理" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = Encoding.UTF8; - this.Grid1.PageSize = Grid1.RecordCount; - this.BindGrid(); - Response.Write(GetGridTableHtml2(Grid1)); - Response.End(); + if (Status != null) + { + if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (Status.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + + return "编制"; } - #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs index ec6ca567..00bc76c1 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.Comprehensive { - - - public partial class SpecialEquipment { - +namespace FineUIPro.Web.Comprehensive +{ + + + public partial class SpecialEquipment + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// sdrpUnitId 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList sdrpUnitId; - + /// /// drpEquipmentId 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpEquipmentId; - + /// /// btnSearch 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -92,16 +94,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - - /// - /// btnOut 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -110,7 +103,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + + /// + /// txtStatus 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label txtStatus; + /// /// lbtnFileUrl 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -146,7 +148,16 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + + /// + /// WindowAtt 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window WindowAtt; + /// /// Menu1 控件。 /// @@ -155,7 +166,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -164,7 +175,7 @@ namespace FineUIPro.Web.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - + /// /// btnMenuDel 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx new file mode 100644 index 00000000..e3559b32 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx @@ -0,0 +1,56 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SpecialEquipmentApprove.aspx.cs" Inherits="FineUIPro.Web.CQMS.Comprehensive.SpecialEquipmentApprove" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.cs new file mode 100644 index 00000000..7654bff9 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.cs @@ -0,0 +1,79 @@ +using BLL.CQMS.Comprehensive; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + public partial class SpecialEquipmentApprove : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + + string SpecialEquipmentId = Request.Params["Id"]; + var list = SpecialEquipmentApproveService.GetProjectQualityList(SpecialEquipmentId); + gvApprove.DataSource = list; + gvApprove.DataBind(); + + } + } + #endregion + + + public static string ConvertAgree(object IsAgree) + { + if (IsAgree != null) + { + if (IsAgree.ToString().Contains("true")) + { + return "同意"; + } + else if (IsAgree.ToString().Contains("false")) + { + return "不同意"; + } + } + return ""; + } + + public static string ConvertState(object state) + { + if (state != null) + { + if (state.ToString().Trim() == BLL.Const.Comprehensive_ReCompile) + { + return "重报"; + } + else if (state.ToString().Trim().Trim() == BLL.Const.Comprehensive_ReJect) + { + return "驳回"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Compile) + { + return "编制"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Audit) + { + return "待审批"; + } + else if (state.ToString().Trim() == BLL.Const.Comprehensive_Complete) + { + return "审批完成"; + } + } + return ""; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.designer.cs new file mode 100644 index 00000000..7822d2c3 --- /dev/null +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentApprove.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class SpecialEquipmentApprove + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// plApprove2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow plApprove2; + + /// + /// gvApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid gvApprove; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + } +} diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx index 8e29f796..683ffd57 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx @@ -35,7 +35,7 @@ - @@ -44,13 +44,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs index 1d02a809..f8741790 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using BLL.CQMS.Comprehensive; using System; using System.Linq; @@ -37,6 +38,13 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.SpecialEquipmentId = Request.Params["SpecialEquipmentId"]; BLL.UnitService.InitUnitDownList(this.drpUnit, this.CurrUser.LoginProjectId, true); BLL.SpecialEquipmentService.InitSpecialEquipmentDropDownList(this.drpEquipmentId, true, true); + + LoadAuditSelect(); + this.agree.Hidden = true; + this.options.Hidden = true; + + this.btnSave.Hidden = true; + this.btnSubmit.Hidden = true; Model.Comprehensive_SpecialEquipment specialEquipment = BLL.SpecialEquipmentServices.GetEquipmentById(this.SpecialEquipmentId); if (specialEquipment != null) { @@ -53,9 +61,92 @@ namespace FineUIPro.Web.CQMS.Comprehensive this.txtMonitoringReportNumber.Text = specialEquipment.MonitoringReportNumber.HasValue ? specialEquipment.MonitoringReportNumber.ToString() : ""; this.txtSubmitDataNumber.Text = specialEquipment.SubmitDataNumber.HasValue ? specialEquipment.SubmitDataNumber.ToString() : ""; this.txtSunNumber.Text = specialEquipment.SunNumber.HasValue ? specialEquipment.SunNumber.ToString() : ""; + + + + var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId); + if (currApprove != null) + { + this.drpAudit.SelectedValue = currApprove.ApproveMan; + //重新编制 编制人 可以 显示 提交 保存按钮 + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile && specialEquipment.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + }//审核状态 审核人 可以显示 提交 保存按钮 + else if (currApprove.ApproveType == BLL.Const.Comprehensive_Audit && currApprove.ApproveMan == CurrUser.UserId) + { + //审核状态不可编辑 + Readonly(); + + this.agree.Hidden = false; + this.options.Hidden = false; + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + }//没有当前审核人,已完成状态 或者 待提交状态 + else + { + if (specialEquipment.Status == BLL.Const.Comprehensive_Compile && specialEquipment.CompileMan == CurrUser.UserId) + { + this.btnSubmit.Hidden = false; + this.btnSave.Hidden = false; + } + } + + + } + else + { + this.btnSave.Hidden = false; + this.btnSubmit.Hidden = false; + } } } + + + + /// + /// 禁止编辑 + /// + public void Readonly() + { + this.txtInformNumber.Readonly = true; + this.txtMonitoringReportNumber.Readonly = true; + this.txtSubmitDataNumber.Readonly = true; + this.txtSunNumber.Readonly = true; + this.drpEquipmentId.Readonly = true; + this.drpUnit.Readonly = true; + + this.drpAudit.Readonly = true; + + // this.btnAttach.Enabled = false; + + + } + + /// + /// 加载专业工程师 + /// + public void LoadAuditSelect() + { + + var db = Funs.DB; + var userList = from x in db.Sys_User + join y in db.Project_ProjectUnit + on x.UnitId equals y.UnitId + join p in db.Project_ProjectUser + on x.UserId equals p.UserId + where y.UnitId == Const.UnitId_CWCEC && p.ProjectId == CurrUser.LoginProjectId && y.ProjectId == CurrUser.LoginProjectId + where p.RoleId.Contains(Const.ZBCNEngineer) + select new { UserId = x.UserId, UserName = x.UserName }; + drpAudit.DataValueField = "UserId"; + drpAudit.DataTextField = "UserName"; + this.drpAudit.DataSource = userList.ToList(); + this.drpAudit.DataBind(); + } + #endregion #region 保存 @@ -73,6 +164,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive } Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment(); specialEquipment.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + specialEquipment.AuditMan = drpAudit.SelectedValue; + } //审核人 if (!string.IsNullOrEmpty(this.txtSunNumber.Text)) { specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text); @@ -108,14 +203,209 @@ namespace FineUIPro.Web.CQMS.Comprehensive specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment)); this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId; } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == specialEquipment.SpecialEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } specialEquipment.CompileMan = this.CurrUser.UserId; + specialEquipment.Status = BLL.Const.Comprehensive_Compile; BLL.SpecialEquipmentServices.AddEquipment(specialEquipment); } else { specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.SpecialEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + var model = Funs.DB.Comprehensive_SpecialEquipment.Where(u => u.SpecialEquipmentId == this.SpecialEquipmentId).FirstOrDefault(); + if (model != null) + { + specialEquipment.Status = model.Status; + } BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment); } + + + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + + protected void btnSubmit_Click(object sender, EventArgs e) + { + if (drpUnit.SelectedValue == BLL.Const._Null) + { + Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); + return; + } + Model.Comprehensive_SpecialEquipment specialEquipment = new Model.Comprehensive_SpecialEquipment(); + specialEquipment.ProjectId = this.CurrUser.LoginProjectId; + if (!string.IsNullOrEmpty(this.drpAudit.SelectedValue)) + { + specialEquipment.AuditMan = drpAudit.SelectedValue; + } //审核人 + if (!string.IsNullOrEmpty(this.txtSunNumber.Text)) + { + specialEquipment.SunNumber = Convert.ToInt32(this.txtSunNumber.Text); + } + if (this.drpUnit.SelectedValue != BLL.Const._Null) + { + specialEquipment.UnitId = this.drpUnit.SelectedValue; + } + if (this.drpEquipmentId.SelectedValue != BLL.Const._Null) + { + specialEquipment.EquipmentId = this.drpEquipmentId.SelectedValue; + } + if (!string.IsNullOrEmpty(this.txtSubmitDataNumber.Text)) + { + specialEquipment.SubmitDataNumber = Convert.ToInt32(this.txtSubmitDataNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtMonitoringReportNumber.Text)) + { + specialEquipment.MonitoringReportNumber = Convert.ToInt32(this.txtMonitoringReportNumber.Text); + } + if (!string.IsNullOrEmpty(this.txtInformNumber.Text)) + { + specialEquipment.InformNumber = Convert.ToInt32(this.txtInformNumber.Text); + } + if (string.IsNullOrEmpty(this.SpecialEquipmentId)) + { + if (!string.IsNullOrEmpty(this.hdAttachUrl.Text)) + { + specialEquipment.SpecialEquipmentId = this.hdAttachUrl.Text; + } + else + { + specialEquipment.SpecialEquipmentId = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment)); + this.hdAttachUrl.Text = specialEquipment.SpecialEquipmentId; + } + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == specialEquipment.SpecialEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + specialEquipment.CompileMan = this.CurrUser.UserId; + specialEquipment.Status = BLL.Const.Comprehensive_Audit; + BLL.SpecialEquipmentServices.AddEquipment(specialEquipment); + } + else + { + specialEquipment.SpecialEquipmentId = this.SpecialEquipmentId; + var sour = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == this.SpecialEquipmentId); + if (sour == null || string.IsNullOrEmpty(sour.AttachUrl)) + { + Alert.ShowInTop("请上传附件!", MessageBoxIcon.Warning); + return; + } + // BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment); + var oldSpecialEquipment = Funs.DB.Comprehensive_SpecialEquipment.Where(u => u.SpecialEquipmentId == this.SpecialEquipmentId).FirstOrDefault(); + if (oldSpecialEquipment == null) //数据库没有记录 直接点提交 当前状态为 审核状态 + { + specialEquipment.CompileMan = this.CurrUser.UserId; + //specialEquipment.CompileDate = DateTime.Now; + specialEquipment.Status = BLL.Const.Comprehensive_Audit; + BLL.SpecialEquipmentServices.AddEquipment(specialEquipment); + } + else + { + specialEquipment.CompileMan = oldSpecialEquipment.CompileMan; + //specialEquipment.CompileDate = oldSpecialEquipment.CompileDate; + if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_Compile)//编制状态提交变审核 + { + specialEquipment.Status = BLL.Const.Comprehensive_Audit; + } + else if (oldSpecialEquipment.Status == BLL.Const.Comprehensive_ReCompile)//重新编制状态提交变审核 + { + specialEquipment.Status = BLL.Const.Comprehensive_Audit; + } + else //审核状态 提交 变 完成 或者 重新编制 + { + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) + { + specialEquipment.Status = BLL.Const.Comprehensive_Complete; + } + else + { + specialEquipment.Status = BLL.Const.Comprehensive_ReCompile; + } + } + + BLL.SpecialEquipmentServices.UpdateEquipment(specialEquipment); + + } + + } + #region 审核记录 + + var currApprove = SpecialEquipmentApproveService.GetCurrentApprove(specialEquipment.SpecialEquipmentId); + if (currApprove == null) //为获取到为 当前编制状态 直接提交 + { + var approve = new Model.Comprehensive_SpecialEquipmentApprove(); + approve.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; + approve.ApproveMan = this.CurrUser.UserId; + approve.ApproveType = Const.Comprehensive_Compile; + approve.ApproveDate = DateTime.Now; + SpecialEquipmentApproveService.EditApprove(approve); //新增编制记录 + + + Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove(); + newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + + } + else if (currApprove.ApproveMan == CurrUser.UserId) + { + if (currApprove.ApproveType == BLL.Const.Comprehensive_ReCompile) + { + currApprove.ApproveDate = DateTime.Now; + //currApprove.IsAgree = true; + SpecialEquipmentApproveService.EditApprove(currApprove); //新增专业工程师审核记录 + Model.Comprehensive_SpecialEquipmentApprove newApprove = new Model.Comprehensive_SpecialEquipmentApprove(); + newApprove.SpecialEquipmentId = specialEquipment.SpecialEquipmentId; + newApprove.ApproveMan = this.drpAudit.SelectedValue; + newApprove.ApproveType = Const.InspectionManagement_Audit; + SpecialEquipmentApproveService.EditApprove(newApprove); //新增专业工程师审核记录 + } + else + { + currApprove.ApproveDate = DateTime.Now; //更新审核时间 + currApprove.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); + currApprove.ApproveIdea = this.txtidea.Text; + SpecialEquipmentApproveService.EditApprove(currApprove); + + if (Convert.ToBoolean(rblIsAgree.SelectedValue)) //同意时 审批完成 + { + Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove(); + reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId; + reApprove.ApproveDate = DateTime.Now.AddSeconds(10); + reApprove.ApproveMan = CurrUser.UserId; + reApprove.ApproveType = Const.Comprehensive_Complete; + reApprove.ApproveIdea = txtidea.Text; + SpecialEquipmentApproveService.EditApprove(reApprove); + } + else + { + Model.Comprehensive_SpecialEquipmentApprove reApprove = new Model.Comprehensive_SpecialEquipmentApprove(); + reApprove.SpecialEquipmentId = currApprove.SpecialEquipmentId; + reApprove.ApproveMan = specialEquipment.CompileMan; + reApprove.ApproveType = Const.Comprehensive_ReCompile; + SpecialEquipmentApproveService.EditApprove(reApprove); + } + } + } + + + #endregion + + ShowNotify("保存成功!", MessageBoxIcon.Success); PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); } @@ -133,7 +423,15 @@ namespace FineUIPro.Web.CQMS.Comprehensive { this.hdAttachUrl.Text = SQLHelper.GetNewID(typeof(Model.Comprehensive_SpecialEquipment)); } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/SpecialEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SpecialEquipmentMenuId))); + Model.Comprehensive_SpecialEquipment specialEquipment = BLL.SpecialEquipmentServices.GetEquipmentById(this.SpecialEquipmentId); + if (specialEquipment == null || ((specialEquipment.CompileMan == CurrUser.UserId && specialEquipment.Status == BLL.Const.Comprehensive_Compile) || (specialEquipment.CompileMan == CurrUser.UserId && specialEquipment.Status == BLL.Const.Comprehensive_ReCompile))) + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/specialEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SpecialEquipmentMenuId))); + } + else + { + PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?type=-1&toKeyId={0}&path=FileUpload/CQMS/specialEquipment&menuId={1}", this.hdAttachUrl.Text, BLL.Const.SpecialEquipmentMenuId))); + } } #endregion diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs index 4dda0690..5ad26ed9 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.Comprehensive { - - - public partial class SpecialEquipmentEdit { - +namespace FineUIPro.Web.CQMS.Comprehensive +{ + + + public partial class SpecialEquipmentEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// drpUnit 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnit; - + /// /// drpEquipmentId 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpEquipmentId; - + /// /// txtSunNumber 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSunNumber; - + /// /// txtInformNumber 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtInformNumber; - + /// /// txtSubmitDataNumber 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtSubmitDataNumber; - + /// /// txtMonitoringReportNumber 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.NumberBox txtMonitoringReportNumber; - + /// /// Panel2 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel2; - + /// /// Label1 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// btnAttach 控件。 /// @@ -119,7 +121,52 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttach; - + + /// + /// drpAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpAudit; + + /// + /// agree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow agree; + + /// + /// rblIsAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList rblIsAgree; + + /// + /// options 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FormRow options; + + /// + /// txtidea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtidea; + /// /// Toolbar1 控件。 /// @@ -128,7 +175,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// hdAttachUrl 控件。 /// @@ -137,7 +184,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdAttachUrl; - + /// /// btnSave 控件。 /// @@ -146,7 +193,16 @@ namespace FineUIPro.Web.CQMS.Comprehensive { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index d9ea3da0..e66f56e5 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -89,7 +89,8 @@ ..\FineUIPro\Reference BLL\Interop.WIA.dll - + + ..\packages\Microsoft.Office.Interop.Excel.15.0.4795.1001\lib\net20\Microsoft.Office.Interop.Excel.dll True @@ -359,44 +360,57 @@ + + + + + + + + + + + + + @@ -6851,6 +6865,13 @@ DataDistribution.aspx + + DataDistributionApprove.aspx + ASPXCodeBehind + + + DataDistributionApprove.aspx + DataDistributionDataIn.aspx ASPXCodeBehind @@ -6872,6 +6893,13 @@ DataReceiving.aspx + + DataReceivingApprove.aspx + ASPXCodeBehind + + + DataReceivingApprove.aspx + DataReceivingDataIn.aspx ASPXCodeBehind @@ -6893,6 +6921,13 @@ DesignChangeOrder.aspx + + DesignChangeOrderApprove.aspx + ASPXCodeBehind + + + DesignChangeOrderApprove.aspx + DesignChangeOrderDataIn.aspx ASPXCodeBehind @@ -6914,6 +6949,13 @@ DesignDetails.aspx + + DesignDetailsApprove.aspx + ASPXCodeBehind + + + DesignDetailsApprove.aspx + DesignDetailsEdit.aspx ASPXCodeBehind @@ -6928,6 +6970,13 @@ DesignDrawings.aspx + + DesignDrawingsApprove.aspx + ASPXCodeBehind + + + DesignDrawingsApprove.aspx + DesignDrawingsDataIn.aspx ASPXCodeBehind @@ -6963,6 +7012,13 @@ InspectionEquipment.aspx + + InspectionEquipmentApprove.aspx + ASPXCodeBehind + + + InspectionEquipmentApprove.aspx + InspectionEquipmentDataIn.aspx ASPXCodeBehind @@ -6984,6 +7040,13 @@ InspectionMachine.aspx + + InspectionMachineApprove.aspx + ASPXCodeBehind + + + InspectionMachineApprove.aspx + InspectionMachineDataIn.aspx ASPXCodeBehind @@ -7005,6 +7068,13 @@ InspectionPerson.aspx + + InspectionPersonApprove.aspx + ASPXCodeBehind + + + InspectionPersonApprove.aspx + InspectionPersonDataIn.aspx ASPXCodeBehind @@ -7040,6 +7110,13 @@ NCRManagement.aspx + + NCRManagementApprove.aspx + ASPXCodeBehind + + + NCRManagementApprove.aspx + NCRManagementDataIn.aspx ASPXCodeBehind @@ -7068,6 +7145,13 @@ PressurePipe.aspx + + PressurePipeApprove.aspx + ASPXCodeBehind + + + PressurePipeApprove.aspx + PressurePipeEdit.aspx ASPXCodeBehind @@ -7082,6 +7166,13 @@ QualityAccident.aspx + + QualityAccidentApprove.aspx + ASPXCodeBehind + + + QualityAccidentApprove.aspx + QualityAccidentEdit.aspx ASPXCodeBehind @@ -7096,6 +7187,13 @@ SiteVisaManagement.aspx + + SiteVisaManagementApprove.aspx + ASPXCodeBehind + + + SiteVisaManagementApprove.aspx + SiteVisaManagementDataIn.aspx ASPXCodeBehind @@ -7117,6 +7215,13 @@ SpecialEquipment.aspx + + SpecialEquipmentApprove.aspx + ASPXCodeBehind + + + SpecialEquipmentApprove.aspx + SpecialEquipmentEdit.aspx ASPXCodeBehind diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 70539265..acdf810b 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -494,18 +494,33 @@ namespace Model partial void InsertComprehensive_DataDistribution(Comprehensive_DataDistribution instance); partial void UpdateComprehensive_DataDistribution(Comprehensive_DataDistribution instance); partial void DeleteComprehensive_DataDistribution(Comprehensive_DataDistribution instance); + partial void InsertComprehensive_DataDistributionApprove(Comprehensive_DataDistributionApprove instance); + partial void UpdateComprehensive_DataDistributionApprove(Comprehensive_DataDistributionApprove instance); + partial void DeleteComprehensive_DataDistributionApprove(Comprehensive_DataDistributionApprove instance); partial void InsertComprehensive_DataReceiving(Comprehensive_DataReceiving instance); partial void UpdateComprehensive_DataReceiving(Comprehensive_DataReceiving instance); partial void DeleteComprehensive_DataReceiving(Comprehensive_DataReceiving instance); + partial void InsertComprehensive_DataReceivingApprove(Comprehensive_DataReceivingApprove instance); + partial void UpdateComprehensive_DataReceivingApprove(Comprehensive_DataReceivingApprove instance); + partial void DeleteComprehensive_DataReceivingApprove(Comprehensive_DataReceivingApprove instance); partial void InsertComprehensive_DesignChangeOrder(Comprehensive_DesignChangeOrder instance); partial void UpdateComprehensive_DesignChangeOrder(Comprehensive_DesignChangeOrder instance); partial void DeleteComprehensive_DesignChangeOrder(Comprehensive_DesignChangeOrder instance); + partial void InsertComprehensive_DesignChangeOrderApprove(Comprehensive_DesignChangeOrderApprove instance); + partial void UpdateComprehensive_DesignChangeOrderApprove(Comprehensive_DesignChangeOrderApprove instance); + partial void DeleteComprehensive_DesignChangeOrderApprove(Comprehensive_DesignChangeOrderApprove instance); partial void InsertComprehensive_DesignDetails(Comprehensive_DesignDetails instance); partial void UpdateComprehensive_DesignDetails(Comprehensive_DesignDetails instance); partial void DeleteComprehensive_DesignDetails(Comprehensive_DesignDetails instance); + partial void InsertComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); + partial void UpdateComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); + partial void DeleteComprehensive_DesignDetailsApprove(Comprehensive_DesignDetailsApprove instance); partial void InsertComprehensive_DesignDrawings(Comprehensive_DesignDrawings instance); partial void UpdateComprehensive_DesignDrawings(Comprehensive_DesignDrawings instance); partial void DeleteComprehensive_DesignDrawings(Comprehensive_DesignDrawings instance); + partial void InsertComprehensive_DesignDrawingsApprove(Comprehensive_DesignDrawingsApprove instance); + partial void UpdateComprehensive_DesignDrawingsApprove(Comprehensive_DesignDrawingsApprove instance); + partial void DeleteComprehensive_DesignDrawingsApprove(Comprehensive_DesignDrawingsApprove instance); partial void InsertComprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval instance); partial void UpdateComprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval instance); partial void DeleteComprehensive_GeneralPlanApproval(Comprehensive_GeneralPlanApproval instance); @@ -515,12 +530,21 @@ namespace Model partial void InsertComprehensive_InspectionEquipment(Comprehensive_InspectionEquipment instance); partial void UpdateComprehensive_InspectionEquipment(Comprehensive_InspectionEquipment instance); partial void DeleteComprehensive_InspectionEquipment(Comprehensive_InspectionEquipment instance); + partial void InsertComprehensive_InspectionEquipmentApprove(Comprehensive_InspectionEquipmentApprove instance); + partial void UpdateComprehensive_InspectionEquipmentApprove(Comprehensive_InspectionEquipmentApprove instance); + partial void DeleteComprehensive_InspectionEquipmentApprove(Comprehensive_InspectionEquipmentApprove instance); partial void InsertComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); partial void UpdateComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); partial void DeleteComprehensive_InspectionMachine(Comprehensive_InspectionMachine instance); + partial void InsertComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); + partial void UpdateComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); + partial void DeleteComprehensive_InspectionMachineApprove(Comprehensive_InspectionMachineApprove instance); partial void InsertComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); partial void UpdateComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); partial void DeleteComprehensive_InspectionPerson(Comprehensive_InspectionPerson instance); + partial void InsertComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); + partial void UpdateComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); + partial void DeleteComprehensive_InspectionPersonApprove(Comprehensive_InspectionPersonApprove instance); partial void InsertComprehensive_InspectionPersonSteel(Comprehensive_InspectionPersonSteel instance); partial void UpdateComprehensive_InspectionPersonSteel(Comprehensive_InspectionPersonSteel instance); partial void DeleteComprehensive_InspectionPersonSteel(Comprehensive_InspectionPersonSteel instance); @@ -536,18 +560,33 @@ namespace Model partial void InsertComprehensive_NCRManagement(Comprehensive_NCRManagement instance); partial void UpdateComprehensive_NCRManagement(Comprehensive_NCRManagement instance); partial void DeleteComprehensive_NCRManagement(Comprehensive_NCRManagement instance); + partial void InsertComprehensive_NCRManagementApprove(Comprehensive_NCRManagementApprove instance); + partial void UpdateComprehensive_NCRManagementApprove(Comprehensive_NCRManagementApprove instance); + partial void DeleteComprehensive_NCRManagementApprove(Comprehensive_NCRManagementApprove instance); partial void InsertComprehensive_PressurePipe(Comprehensive_PressurePipe instance); partial void UpdateComprehensive_PressurePipe(Comprehensive_PressurePipe instance); partial void DeleteComprehensive_PressurePipe(Comprehensive_PressurePipe instance); + partial void InsertComprehensive_PressurePipeApprove(Comprehensive_PressurePipeApprove instance); + partial void UpdateComprehensive_PressurePipeApprove(Comprehensive_PressurePipeApprove instance); + partial void DeleteComprehensive_PressurePipeApprove(Comprehensive_PressurePipeApprove instance); partial void InsertComprehensive_QualityAccident(Comprehensive_QualityAccident instance); partial void UpdateComprehensive_QualityAccident(Comprehensive_QualityAccident instance); partial void DeleteComprehensive_QualityAccident(Comprehensive_QualityAccident instance); + partial void InsertComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); + partial void UpdateComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); + partial void DeleteComprehensive_QualityAccidentApprove(Comprehensive_QualityAccidentApprove instance); partial void InsertComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); partial void UpdateComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); partial void DeleteComprehensive_SiteVisaManagement(Comprehensive_SiteVisaManagement instance); + partial void InsertComprehensive_SiteVisaManagementApprove(Comprehensive_SiteVisaManagementApprove instance); + partial void UpdateComprehensive_SiteVisaManagementApprove(Comprehensive_SiteVisaManagementApprove instance); + partial void DeleteComprehensive_SiteVisaManagementApprove(Comprehensive_SiteVisaManagementApprove instance); partial void InsertComprehensive_SpecialEquipment(Comprehensive_SpecialEquipment instance); partial void UpdateComprehensive_SpecialEquipment(Comprehensive_SpecialEquipment instance); partial void DeleteComprehensive_SpecialEquipment(Comprehensive_SpecialEquipment instance); + partial void InsertComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); + partial void UpdateComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); + partial void DeleteComprehensive_SpecialEquipmentApprove(Comprehensive_SpecialEquipmentApprove instance); partial void InsertCostGoods_CostManage(CostGoods_CostManage instance); partial void UpdateCostGoods_CostManage(CostGoods_CostManage instance); partial void DeleteCostGoods_CostManage(CostGoods_CostManage instance); @@ -3518,6 +3557,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DataDistributionApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_DataReceiving { get @@ -3526,6 +3573,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DataReceivingApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_DesignChangeOrder { get @@ -3534,6 +3589,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DesignChangeOrderApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_DesignDetails { get @@ -3542,6 +3605,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DesignDetailsApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_DesignDrawings { get @@ -3550,6 +3621,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_DesignDrawingsApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_GeneralPlanApproval { get @@ -3574,6 +3653,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_InspectionEquipmentApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_InspectionMachine { get @@ -3582,6 +3669,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_InspectionMachineApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_InspectionPerson { get @@ -3590,6 +3685,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_InspectionPersonApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_InspectionPersonSteel { get @@ -3630,6 +3733,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_NCRManagementApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_PressurePipe { get @@ -3638,6 +3749,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_PressurePipeApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_QualityAccident { get @@ -3646,6 +3765,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_QualityAccidentApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_SiteVisaManagement { get @@ -3654,6 +3781,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_SiteVisaManagementApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Comprehensive_SpecialEquipment { get @@ -3662,6 +3797,14 @@ namespace Model } } + public System.Data.Linq.Table Comprehensive_SpecialEquipmentApprove + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table CostGoods_CostManage { get @@ -16803,7 +16946,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_CNProfessional", Storage="_Base_DesignProfessional", ThisKey="CNProfessionalId", OtherKey="ToCN", DeleteRule="NO ACTION")] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_DesignProfessional", Storage="_Base_DesignProfessional", ThisKey="CNProfessionalId", OtherKey="ToCN", DeleteRule="NO ACTION")] public EntitySet Base_DesignProfessional { get @@ -18308,7 +18451,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="ToCN", OtherKey="CNProfessionalId", IsForeignKey=true)] + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Base_DesignProfessional_Base_DesignProfessional", Storage="_Base_CNProfessional", ThisKey="ToCN", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { get @@ -41928,6 +42071,8 @@ namespace Model private string _Template; + private System.Nullable _IsCQMS; + private EntitySet _Check_ViolationPerson; private EntitySet _HSSESystem_HSSEMainDuty; @@ -41968,6 +42113,8 @@ namespace Model partial void OnCNCodesChanged(); partial void OnTemplateChanging(string value); partial void OnTemplateChanged(); + partial void OnIsCQMSChanging(System.Nullable value); + partial void OnIsCQMSChanged(); #endregion public Base_WorkPost() @@ -42145,6 +42292,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsCQMS", DbType="Bit")] + public System.Nullable IsCQMS + { + get + { + return this._IsCQMS; + } + set + { + if ((this._IsCQMS != value)) + { + this.OnIsCQMSChanging(value); + this.SendPropertyChanging(); + this._IsCQMS = value; + this.SendPropertyChanged("IsCQMS"); + this.OnIsCQMSChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ViolationPerson_Base_WorkPost", Storage="_Check_ViolationPerson", ThisKey="WorkPostId", OtherKey="WorkPostId", DeleteRule="NO ACTION")] public EntitySet Check_ViolationPerson { @@ -82885,6 +83052,10 @@ namespace Model private System.Nullable _CompileDate; + private string _Status; + + private string _AuditMan; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -82931,6 +83102,10 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_DataDistribution() @@ -83313,6 +83488,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DataDistribution_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -83436,6 +83651,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DataDistributionApprove")] + public partial class Comprehensive_DataDistributionApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DataDistributionApproveId; + + private string _DataDistributionId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDataDistributionApproveIdChanging(string value); + partial void OnDataDistributionApproveIdChanged(); + partial void OnDataDistributionIdChanging(string value); + partial void OnDataDistributionIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DataDistributionApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataDistributionApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DataDistributionApproveId + { + get + { + return this._DataDistributionApproveId; + } + set + { + if ((this._DataDistributionApproveId != value)) + { + this.OnDataDistributionApproveIdChanging(value); + this.SendPropertyChanging(); + this._DataDistributionApproveId = value; + this.SendPropertyChanged("DataDistributionApproveId"); + this.OnDataDistributionApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataDistributionId", DbType="NVarChar(50)")] + public string DataDistributionId + { + get + { + return this._DataDistributionId; + } + set + { + if ((this._DataDistributionId != value)) + { + this.OnDataDistributionIdChanging(value); + this.SendPropertyChanging(); + this._DataDistributionId = value; + this.SendPropertyChanged("DataDistributionId"); + this.OnDataDistributionIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_DataReceiving")] public partial class Comprehensive_DataReceiving : INotifyPropertyChanging, INotifyPropertyChanged { @@ -83478,6 +83947,10 @@ namespace Model private System.Nullable _CompileDate; + private string _Status; + + private string _AuditMan; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -83522,6 +83995,10 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_DataReceiving() @@ -83899,6 +84376,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DataReceiving_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -83988,6 +84505,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DataReceivingApprove")] + public partial class Comprehensive_DataReceivingApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DataReceivingApproveId; + + private string _DataReceivingId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDataReceivingApproveIdChanging(string value); + partial void OnDataReceivingApproveIdChanged(); + partial void OnDataReceivingIdChanging(string value); + partial void OnDataReceivingIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DataReceivingApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataReceivingApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DataReceivingApproveId + { + get + { + return this._DataReceivingApproveId; + } + set + { + if ((this._DataReceivingApproveId != value)) + { + this.OnDataReceivingApproveIdChanging(value); + this.SendPropertyChanging(); + this._DataReceivingApproveId = value; + this.SendPropertyChanged("DataReceivingApproveId"); + this.OnDataReceivingApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DataReceivingId", DbType="NVarChar(50)")] + public string DataReceivingId + { + get + { + return this._DataReceivingId; + } + set + { + if ((this._DataReceivingId != value)) + { + this.OnDataReceivingIdChanging(value); + this.SendPropertyChanging(); + this._DataReceivingId = value; + this.SendPropertyChanged("DataReceivingId"); + this.OnDataReceivingIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_DesignChangeOrder")] public partial class Comprehensive_DesignChangeOrder : INotifyPropertyChanging, INotifyPropertyChanged { @@ -84026,6 +84797,10 @@ namespace Model private System.Nullable _CompleteDate; + private string _Status; + + private string _AuditMan; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -84068,6 +84843,10 @@ namespace Model partial void OnCompileDateChanged(); partial void OnCompleteDateChanging(System.Nullable value); partial void OnCompleteDateChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_DesignChangeOrder() @@ -84410,6 +85189,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignChangeOrder_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -84533,6 +85352,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DesignChangeOrderApprove")] + public partial class Comprehensive_DesignChangeOrderApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DesignChangeOrderApproveId; + + private string _DesignChangeOrderId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDesignChangeOrderApproveIdChanging(string value); + partial void OnDesignChangeOrderApproveIdChanged(); + partial void OnDesignChangeOrderIdChanging(string value); + partial void OnDesignChangeOrderIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DesignChangeOrderApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignChangeOrderApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DesignChangeOrderApproveId + { + get + { + return this._DesignChangeOrderApproveId; + } + set + { + if ((this._DesignChangeOrderApproveId != value)) + { + this.OnDesignChangeOrderApproveIdChanging(value); + this.SendPropertyChanging(); + this._DesignChangeOrderApproveId = value; + this.SendPropertyChanged("DesignChangeOrderApproveId"); + this.OnDesignChangeOrderApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignChangeOrderId", DbType="NVarChar(50)")] + public string DesignChangeOrderId + { + get + { + return this._DesignChangeOrderId; + } + set + { + if ((this._DesignChangeOrderId != value)) + { + this.OnDesignChangeOrderIdChanging(value); + this.SendPropertyChanging(); + this._DesignChangeOrderId = value; + this.SendPropertyChanged("DesignChangeOrderId"); + this.OnDesignChangeOrderIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_DesignDetails")] public partial class Comprehensive_DesignDetails : INotifyPropertyChanging, INotifyPropertyChanged { @@ -84565,6 +85638,8 @@ namespace Model private string _Status; + private string _AuditMan; + private EntityRef _Base_Project; private EntityRef _Sys_User; @@ -84599,6 +85674,8 @@ namespace Model partial void OnJoinPersonNumChanged(); partial void OnStatusChanging(string value); partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_DesignDetails() @@ -84876,6 +85953,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDetails_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -84965,6 +86062,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DesignDetailsApprove")] + public partial class Comprehensive_DesignDetailsApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DesignDetailsApproveId; + + private string _DesignDetailsId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDesignDetailsApproveIdChanging(string value); + partial void OnDesignDetailsApproveIdChanged(); + partial void OnDesignDetailsIdChanging(string value); + partial void OnDesignDetailsIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DesignDetailsApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DesignDetailsApproveId + { + get + { + return this._DesignDetailsApproveId; + } + set + { + if ((this._DesignDetailsApproveId != value)) + { + this.OnDesignDetailsApproveIdChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsApproveId = value; + this.SendPropertyChanged("DesignDetailsApproveId"); + this.OnDesignDetailsApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDetailsId", DbType="NVarChar(50)")] + public string DesignDetailsId + { + get + { + return this._DesignDetailsId; + } + set + { + if ((this._DesignDetailsId != value)) + { + this.OnDesignDetailsIdChanging(value); + this.SendPropertyChanging(); + this._DesignDetailsId = value; + this.SendPropertyChanged("DesignDetailsId"); + this.OnDesignDetailsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_DesignDrawings")] public partial class Comprehensive_DesignDrawings : INotifyPropertyChanging, INotifyPropertyChanged { @@ -84999,6 +86350,12 @@ namespace Model private string _UnitWorkId; + private string _Status; + + private string _AuditMan; + + private string _CompileMan; + private EntityRef _Base_Project; #region 可扩展性方法定义 @@ -85033,6 +86390,12 @@ namespace Model partial void OnRemarkCodeChanged(); partial void OnUnitWorkIdChanging(string value); partial void OnUnitWorkIdChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); #endregion public Comprehensive_DesignDrawings() @@ -85325,6 +86688,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_DesignDrawings_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -85380,6 +86803,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_DesignDrawingsApprove")] + public partial class Comprehensive_DesignDrawingsApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _DesignDrawingsApproveId; + + private string _DesignDrawingsId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnDesignDrawingsApproveIdChanging(string value); + partial void OnDesignDrawingsApproveIdChanged(); + partial void OnDesignDrawingsIdChanging(string value); + partial void OnDesignDrawingsIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_DesignDrawingsApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDrawingsApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string DesignDrawingsApproveId + { + get + { + return this._DesignDrawingsApproveId; + } + set + { + if ((this._DesignDrawingsApproveId != value)) + { + this.OnDesignDrawingsApproveIdChanging(value); + this.SendPropertyChanging(); + this._DesignDrawingsApproveId = value; + this.SendPropertyChanged("DesignDrawingsApproveId"); + this.OnDesignDrawingsApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_DesignDrawingsId", DbType="NVarChar(50)")] + public string DesignDrawingsId + { + get + { + return this._DesignDrawingsId; + } + set + { + if ((this._DesignDrawingsId != value)) + { + this.OnDesignDrawingsIdChanging(value); + this.SendPropertyChanging(); + this._DesignDrawingsId = value; + this.SendPropertyChanged("DesignDrawingsId"); + this.OnDesignDrawingsIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_GeneralPlanApproval")] public partial class Comprehensive_GeneralPlanApproval : INotifyPropertyChanging, INotifyPropertyChanged { @@ -86263,6 +87940,10 @@ namespace Model private string _EquipmentOrMatail; + private string _Status; + + private string _AuditMan; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -86313,6 +87994,10 @@ namespace Model partial void OnAttributeChanged(); partial void OnEquipmentOrMatailChanging(string value); partial void OnEquipmentOrMatailChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_InspectionEquipment() @@ -86735,6 +88420,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionEquipment_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -86858,6 +88583,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionEquipmentApprove")] + public partial class Comprehensive_InspectionEquipmentApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionEquipmentApprove; + + private string _InspectionEquipmentId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionEquipmentApproveChanging(string value); + partial void OnInspectionEquipmentApproveChanged(); + partial void OnInspectionEquipmentIdChanging(string value); + partial void OnInspectionEquipmentIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_InspectionEquipmentApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionEquipmentApprove", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionEquipmentApprove + { + get + { + return this._InspectionEquipmentApprove; + } + set + { + if ((this._InspectionEquipmentApprove != value)) + { + this.OnInspectionEquipmentApproveChanging(value); + this.SendPropertyChanging(); + this._InspectionEquipmentApprove = value; + this.SendPropertyChanged("InspectionEquipmentApprove"); + this.OnInspectionEquipmentApproveChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionEquipmentId", DbType="NVarChar(50)")] + public string InspectionEquipmentId + { + get + { + return this._InspectionEquipmentId; + } + set + { + if ((this._InspectionEquipmentId != value)) + { + this.OnInspectionEquipmentIdChanging(value); + this.SendPropertyChanging(); + this._InspectionEquipmentId = value; + this.SendPropertyChanged("InspectionEquipmentId"); + this.OnInspectionEquipmentIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_InspectionMachine")] public partial class Comprehensive_InspectionMachine : INotifyPropertyChanging, INotifyPropertyChanged { @@ -86904,6 +88883,8 @@ namespace Model private string _Status; + private string _AuditMan; + private EntityRef _Base_CNProfessional; private EntityRef _Base_Project; @@ -86954,6 +88935,8 @@ namespace Model partial void OnIsCheckOKChanged(); partial void OnStatusChanging(string value); partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_InspectionMachine() @@ -87376,6 +89359,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_InspectionMachine_Base_CNProfessional", Storage="_Base_CNProfessional", ThisKey="CNProfessionalId", OtherKey="CNProfessionalId", IsForeignKey=true)] public Base_CNProfessional Base_CNProfessional { @@ -87499,6 +89502,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionMachineApprove")] + public partial class Comprehensive_InspectionMachineApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionMachineApproveId; + + private string _InspectionMachineId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionMachineApproveIdChanging(string value); + partial void OnInspectionMachineApproveIdChanged(); + partial void OnInspectionMachineIdChanging(string value); + partial void OnInspectionMachineIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_InspectionMachineApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionMachineApproveId + { + get + { + return this._InspectionMachineApproveId; + } + set + { + if ((this._InspectionMachineApproveId != value)) + { + this.OnInspectionMachineApproveIdChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineApproveId = value; + this.SendPropertyChanged("InspectionMachineApproveId"); + this.OnInspectionMachineApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionMachineId", DbType="NVarChar(50)")] + public string InspectionMachineId + { + get + { + return this._InspectionMachineId; + } + set + { + if ((this._InspectionMachineId != value)) + { + this.OnInspectionMachineIdChanging(value); + this.SendPropertyChanging(); + this._InspectionMachineId = value; + this.SendPropertyChanged("InspectionMachineId"); + this.OnInspectionMachineIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_InspectionPerson")] public partial class Comprehensive_InspectionPerson : INotifyPropertyChanging, INotifyPropertyChanged { @@ -87545,6 +89802,8 @@ namespace Model private string _Status; + private string _AuditMan; + private EntityRef _Base_Post; private EntityRef _Base_Project; @@ -87603,6 +89862,8 @@ namespace Model partial void OnIsTrainChanged(); partial void OnStatusChanging(string value); partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_InspectionPerson() @@ -88033,6 +90294,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_InspectionPerson_Base_Post", Storage="_Base_Post", ThisKey="PostId", OtherKey="PostId", IsForeignKey=true)] public Base_Post Base_Post { @@ -88265,6 +90546,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_InspectionPersonApprove")] + public partial class Comprehensive_InspectionPersonApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InspectionPersonApproveId; + + private string _InspectionPersonId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInspectionPersonApproveIdChanging(string value); + partial void OnInspectionPersonApproveIdChanged(); + partial void OnInspectionPersonIdChanging(string value); + partial void OnInspectionPersonIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_InspectionPersonApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InspectionPersonApproveId + { + get + { + return this._InspectionPersonApproveId; + } + set + { + if ((this._InspectionPersonApproveId != value)) + { + this.OnInspectionPersonApproveIdChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonApproveId = value; + this.SendPropertyChanged("InspectionPersonApproveId"); + this.OnInspectionPersonApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InspectionPersonId", DbType="NVarChar(50)")] + public string InspectionPersonId + { + get + { + return this._InspectionPersonId; + } + set + { + if ((this._InspectionPersonId != value)) + { + this.OnInspectionPersonIdChanging(value); + this.SendPropertyChanging(); + this._InspectionPersonId = value; + this.SendPropertyChanged("InspectionPersonId"); + this.OnInspectionPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_InspectionPersonSteel")] public partial class Comprehensive_InspectionPersonSteel : INotifyPropertyChanging, INotifyPropertyChanged { @@ -89690,6 +92225,10 @@ namespace Model private string _UnitWorkId; + private string _Status; + + private string _AuditMan; + private EntityRef _Sys_User; private EntityRef _Base_CNProfessional; @@ -89732,6 +92271,10 @@ namespace Model partial void OnCompileManChanged(); partial void OnUnitWorkIdChanging(string value); partial void OnUnitWorkIdChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_NCRManagement() @@ -90059,6 +92602,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_NCRManagement_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -90216,6 +92799,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_NCRManagementApprove")] + public partial class Comprehensive_NCRManagementApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _NCRManagementApproveId; + + private string _NCRManagementId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnNCRManagementApproveIdChanging(string value); + partial void OnNCRManagementApproveIdChanged(); + partial void OnNCRManagementIdChanging(string value); + partial void OnNCRManagementIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_NCRManagementApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NCRManagementApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string NCRManagementApproveId + { + get + { + return this._NCRManagementApproveId; + } + set + { + if ((this._NCRManagementApproveId != value)) + { + this.OnNCRManagementApproveIdChanging(value); + this.SendPropertyChanging(); + this._NCRManagementApproveId = value; + this.SendPropertyChanged("NCRManagementApproveId"); + this.OnNCRManagementApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_NCRManagementId", DbType="NVarChar(50)")] + public string NCRManagementId + { + get + { + return this._NCRManagementId; + } + set + { + if ((this._NCRManagementId != value)) + { + this.OnNCRManagementIdChanging(value); + this.SendPropertyChanging(); + this._NCRManagementId = value; + this.SendPropertyChanged("NCRManagementId"); + this.OnNCRManagementIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_PressurePipe")] public partial class Comprehensive_PressurePipe : INotifyPropertyChanging, INotifyPropertyChanged { @@ -90242,6 +93079,10 @@ namespace Model private string _CompileMan; + private string _Status; + + private string _AuditMan; + private EntityRef _Sys_User; private EntityRef _Base_Project; @@ -90272,6 +93113,10 @@ namespace Model partial void OnIssuedReportNumberChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_PressurePipe() @@ -90494,6 +93339,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_PressurePipe_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -90617,6 +93502,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_PressurePipeApprove")] + public partial class Comprehensive_PressurePipeApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _PressurePipeApproveId; + + private string _PressurePipeId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnPressurePipeApproveIdChanging(string value); + partial void OnPressurePipeApproveIdChanged(); + partial void OnPressurePipeIdChanging(string value); + partial void OnPressurePipeIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_PressurePipeApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressurePipeApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string PressurePipeApproveId + { + get + { + return this._PressurePipeApproveId; + } + set + { + if ((this._PressurePipeApproveId != value)) + { + this.OnPressurePipeApproveIdChanging(value); + this.SendPropertyChanging(); + this._PressurePipeApproveId = value; + this.SendPropertyChanged("PressurePipeApproveId"); + this.OnPressurePipeApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PressurePipeId", DbType="NVarChar(50)")] + public string PressurePipeId + { + get + { + return this._PressurePipeId; + } + set + { + if ((this._PressurePipeId != value)) + { + this.OnPressurePipeIdChanging(value); + this.SendPropertyChanging(); + this._PressurePipeId = value; + this.SendPropertyChanged("PressurePipeId"); + this.OnPressurePipeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_QualityAccident")] public partial class Comprehensive_QualityAccident : INotifyPropertyChanging, INotifyPropertyChanged { @@ -90649,6 +93788,10 @@ namespace Model private string _UnitWorkId; + private string _Status; + + private string _AuditMan; + private EntityRef _Base_Project; private EntityRef _Base_Unit; @@ -90685,6 +93828,10 @@ namespace Model partial void OnCompileDateChanged(); partial void OnUnitWorkIdChanging(string value); partial void OnUnitWorkIdChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_QualityAccident() @@ -90967,6 +94114,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Comprehensive_QualityAccident_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -91090,6 +94277,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_QualityAccidentApprove")] + public partial class Comprehensive_QualityAccidentApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _QualityAccidentApproveId; + + private string _QualityAccidentId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnQualityAccidentApproveIdChanging(string value); + partial void OnQualityAccidentApproveIdChanged(); + partial void OnQualityAccidentIdChanging(string value); + partial void OnQualityAccidentIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_QualityAccidentApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAccidentApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string QualityAccidentApproveId + { + get + { + return this._QualityAccidentApproveId; + } + set + { + if ((this._QualityAccidentApproveId != value)) + { + this.OnQualityAccidentApproveIdChanging(value); + this.SendPropertyChanging(); + this._QualityAccidentApproveId = value; + this.SendPropertyChanged("QualityAccidentApproveId"); + this.OnQualityAccidentApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_QualityAccidentId", DbType="NVarChar(50)")] + public string QualityAccidentId + { + get + { + return this._QualityAccidentId; + } + set + { + if ((this._QualityAccidentId != value)) + { + this.OnQualityAccidentIdChanging(value); + this.SendPropertyChanging(); + this._QualityAccidentId = value; + this.SendPropertyChanged("QualityAccidentId"); + this.OnQualityAccidentIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_SiteVisaManagement")] public partial class Comprehensive_SiteVisaManagement : INotifyPropertyChanging, INotifyPropertyChanged { @@ -91136,6 +94577,8 @@ namespace Model private string _Remark; + private string _Status; + private EntityRef _Sys_User; private EntityRef _Base_CNProfessional; @@ -91190,6 +94633,8 @@ namespace Model partial void OnAuditManChanged(); partial void OnRemarkChanging(string value); partial void OnRemarkChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); #endregion public Comprehensive_SiteVisaManagement() @@ -91622,6 +95067,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_SiteVisaManagement_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -91813,6 +95278,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_SiteVisaManagementApprove")] + public partial class Comprehensive_SiteVisaManagementApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SiteVisaManagementApproveId; + + private string _VisaId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSiteVisaManagementApproveIdChanging(string value); + partial void OnSiteVisaManagementApproveIdChanged(); + partial void OnVisaIdChanging(string value); + partial void OnVisaIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_SiteVisaManagementApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SiteVisaManagementApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SiteVisaManagementApproveId + { + get + { + return this._SiteVisaManagementApproveId; + } + set + { + if ((this._SiteVisaManagementApproveId != value)) + { + this.OnSiteVisaManagementApproveIdChanging(value); + this.SendPropertyChanging(); + this._SiteVisaManagementApproveId = value; + this.SendPropertyChanged("SiteVisaManagementApproveId"); + this.OnSiteVisaManagementApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_VisaId", DbType="NVarChar(50)")] + public string VisaId + { + get + { + return this._VisaId; + } + set + { + if ((this._VisaId != value)) + { + this.OnVisaIdChanging(value); + this.SendPropertyChanging(); + this._VisaId = value; + this.SendPropertyChanged("VisaId"); + this.OnVisaIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.Comprehensive_SpecialEquipment")] public partial class Comprehensive_SpecialEquipment : INotifyPropertyChanging, INotifyPropertyChanged { @@ -91837,6 +95556,10 @@ namespace Model private string _CompileMan; + private string _Status; + + private string _AuditMan; + private EntityRef _Sys_User; private EntityRef _Base_Project; @@ -91865,6 +95588,10 @@ namespace Model partial void OnMonitoringReportNumberChanged(); partial void OnCompileManChanging(string value); partial void OnCompileManChanged(); + partial void OnStatusChanging(string value); + partial void OnStatusChanged(); + partial void OnAuditManChanging(string value); + partial void OnAuditManChanged(); #endregion public Comprehensive_SpecialEquipment() @@ -92067,6 +95794,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="NVarChar(2)")] + public string Status + { + get + { + return this._Status; + } + set + { + if ((this._Status != value)) + { + this.OnStatusChanging(value); + this.SendPropertyChanging(); + this._Status = value; + this.SendPropertyChanged("Status"); + this.OnStatusChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AuditMan", DbType="NVarChar(50)")] + public string AuditMan + { + get + { + return this._AuditMan; + } + set + { + if ((this._AuditMan != value)) + { + this.OnAuditManChanging(value); + this.SendPropertyChanging(); + this._AuditMan = value; + this.SendPropertyChanged("AuditMan"); + this.OnAuditManChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Comprehensive_SpecialEquipment_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] public Sys_User Sys_User { @@ -92190,6 +95957,260 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Comprehensive_SpecialEquipmentApprove")] + public partial class Comprehensive_SpecialEquipmentApprove : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _SpecialEquipmentApproveId; + + private string _SpecialEquipmentId; + + private string _ApproveMan; + + private System.Nullable _ApproveDate; + + private System.Nullable _IsAgree; + + private string _ApproveType; + + private string _ApproveIdea; + + private System.Nullable _Edition; + + private System.Nullable _CreateTime; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnSpecialEquipmentApproveIdChanging(string value); + partial void OnSpecialEquipmentApproveIdChanged(); + partial void OnSpecialEquipmentIdChanging(string value); + partial void OnSpecialEquipmentIdChanged(); + partial void OnApproveManChanging(string value); + partial void OnApproveManChanged(); + partial void OnApproveDateChanging(System.Nullable value); + partial void OnApproveDateChanged(); + partial void OnIsAgreeChanging(System.Nullable value); + partial void OnIsAgreeChanged(); + partial void OnApproveTypeChanging(string value); + partial void OnApproveTypeChanged(); + partial void OnApproveIdeaChanging(string value); + partial void OnApproveIdeaChanged(); + partial void OnEditionChanging(System.Nullable value); + partial void OnEditionChanged(); + partial void OnCreateTimeChanging(System.Nullable value); + partial void OnCreateTimeChanged(); + #endregion + + public Comprehensive_SpecialEquipmentApprove() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialEquipmentApproveId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string SpecialEquipmentApproveId + { + get + { + return this._SpecialEquipmentApproveId; + } + set + { + if ((this._SpecialEquipmentApproveId != value)) + { + this.OnSpecialEquipmentApproveIdChanging(value); + this.SendPropertyChanging(); + this._SpecialEquipmentApproveId = value; + this.SendPropertyChanged("SpecialEquipmentApproveId"); + this.OnSpecialEquipmentApproveIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecialEquipmentId", DbType="NVarChar(50)")] + public string SpecialEquipmentId + { + get + { + return this._SpecialEquipmentId; + } + set + { + if ((this._SpecialEquipmentId != value)) + { + this.OnSpecialEquipmentIdChanging(value); + this.SendPropertyChanging(); + this._SpecialEquipmentId = value; + this.SendPropertyChanged("SpecialEquipmentId"); + this.OnSpecialEquipmentIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveMan", DbType="NVarChar(50)")] + public string ApproveMan + { + get + { + return this._ApproveMan; + } + set + { + if ((this._ApproveMan != value)) + { + this.OnApproveManChanging(value); + this.SendPropertyChanging(); + this._ApproveMan = value; + this.SendPropertyChanged("ApproveMan"); + this.OnApproveManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveDate", DbType="DateTime")] + public System.Nullable ApproveDate + { + get + { + return this._ApproveDate; + } + set + { + if ((this._ApproveDate != value)) + { + this.OnApproveDateChanging(value); + this.SendPropertyChanging(); + this._ApproveDate = value; + this.SendPropertyChanged("ApproveDate"); + this.OnApproveDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsAgree", DbType="Bit")] + public System.Nullable IsAgree + { + get + { + return this._IsAgree; + } + set + { + if ((this._IsAgree != value)) + { + this.OnIsAgreeChanging(value); + this.SendPropertyChanging(); + this._IsAgree = value; + this.SendPropertyChanged("IsAgree"); + this.OnIsAgreeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveType", DbType="VarChar(2)")] + public string ApproveType + { + get + { + return this._ApproveType; + } + set + { + if ((this._ApproveType != value)) + { + this.OnApproveTypeChanging(value); + this.SendPropertyChanging(); + this._ApproveType = value; + this.SendPropertyChanged("ApproveType"); + this.OnApproveTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(255)")] + public string ApproveIdea + { + get + { + return this._ApproveIdea; + } + set + { + if ((this._ApproveIdea != value)) + { + this.OnApproveIdeaChanging(value); + this.SendPropertyChanging(); + this._ApproveIdea = value; + this.SendPropertyChanged("ApproveIdea"); + this.OnApproveIdeaChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Edition", DbType="Int")] + public System.Nullable Edition + { + get + { + return this._Edition; + } + set + { + if ((this._Edition != value)) + { + this.OnEditionChanging(value); + this.SendPropertyChanging(); + this._Edition = value; + this.SendPropertyChanged("Edition"); + this.OnEditionChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateTime", DbType="DateTime")] + public System.Nullable CreateTime + { + get + { + return this._CreateTime; + } + set + { + if ((this._CreateTime != value)) + { + this.OnCreateTimeChanging(value); + this.SendPropertyChanging(); + this._CreateTime = value; + this.SendPropertyChanged("CreateTime"); + this.OnCreateTimeChanged(); + } + } + } + + 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.CostGoods_CostManage")] public partial class CostGoods_CostManage : INotifyPropertyChanging, INotifyPropertyChanged {