From 60e16772546af20847bab0689d205f99d6e7a74e Mon Sep 17 00:00:00 2001 From: fly-l <1420031550@qq.com> Date: Mon, 11 Mar 2024 23:25:08 +0800 Subject: [PATCH] =?UTF-8?q?2024-03-11=20=E5=90=88=E5=90=8C=E5=8F=91?= =?UTF-8?q?=E7=A5=A8=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vs/SGGL_SeDin/v17/.wsuo | Bin 264192 -> 266752 bytes DataBase/版本日志/SGGLDB_V2024-03-11.sql | 185 ++++ SGGL/BLL/BLL.csproj | 6 +- SGGL/BLL/Common/Const.cs | 15 + SGGL/BLL/Common/Funs.cs | 2 + .../ActionPlanReviewService.cs | 1 + .../BidApproveUserReviewService.cs | 1 + .../BidDocumentsReviewService.cs | 1 + .../BiddingManagement/SetSubReviewService.cs | 1 + .../ContractCompile/ContractReviewService.cs | 1 + .../ContractCompile/PHTGL_ApproveService.cs | 157 ++-- .../PhtglContracttrackService .cs | 107 --- .../InvoiceManage/PhtglInvoiceService .cs | 587 ++++++++++++ .../PhtglInvoicedetailService.cs | 165 ++++ .../File/Excel/DataIn/发票导入模版.xlsx | Bin 0 -> 9188 bytes SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 52 +- .../PhysicalExaminationEdit.aspx.cs | 2 - .../SitePerson/SitePersonNowStatistic.aspx.cs | 3 - .../ActionPlanReviewDetail.aspx.cs | 1 + .../ActionPlanReviewEdit.aspx.cs | 1 + .../ApproveUserReviewDetail.aspx.cs | 1 + .../ApproveUserReviewEdit.aspx.cs | 1 + .../BidDocumentsReviewDetail.aspx.cs | 1 + .../BidDocumentsReviewEdit.aspx.cs | 1 + .../SetSubReviewDetail.aspx.cs | 1 + .../ContractReviewDetail.aspx.cs | 3 +- .../PHTGL/InvoiceManage/InvoiceDataIn.aspx | 35 + .../PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs | 147 +++ .../InvoiceDataIn.aspx.designer.cs | 98 ++ .../PHTGL/InvoiceManage/InvoiceOrder.aspx | 128 +++ .../PHTGL/InvoiceManage/InvoiceOrder.aspx.cs | 215 +++++ .../InvoiceOrder.aspx.designer.cs | 116 +++ .../InvoiceManage/InvoiceOrderDetail.aspx | 182 ++++ .../InvoiceManage/InvoiceOrderDetail.aspx.cs | 216 +++++ .../InvoiceOrderDetail.aspx.designer.cs | 323 +++++++ .../InvoiceManage/InvoiceOrderReviewEdit.aspx | 107 +++ .../InvoiceOrderReviewEdit.aspx.cs | 161 ++++ .../InvoiceOrderReviewEdit.aspx.designer.cs | 215 +++++ .../InvoiceManage/InvoiceStandingBook.aspx | 154 ++++ .../InvoiceManage/InvoiceStandingBook.aspx.cs | 277 ++++++ .../InvoiceStandingBook.aspx.designer.cs | 179 ++++ .../InvoiceStandingBookEdit.aspx | 87 ++ .../InvoiceStandingBookEdit.aspx.cs | 88 ++ .../InvoiceStandingBookEdit.aspx.designer.cs | 179 ++++ .../Person/ProjectPerson.aspx.cs | 1 - SGGL/FineUIPro.Web/common/Menu_DigData.xml | 63 +- SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_HTGL.xml | 6 +- SGGL/FineUIPro.Web/common/Menu_JDGL.xml | 6 +- SGGL/FineUIPro.Web/common/Menu_PHTGL.xml | 5 +- SGGL/FineUIPro.Web/common/Menu_ZHGL.xml | 42 - SGGL/Model/Model.cs | 868 +++++++++++++++++- SGGL/Model/Model.csproj | 12 + SGGL/Model/PHTGL/ApproveManModel.cs | 22 + SGGL/Model/PHTGL/PHTGL_ContractTrackDtoIn.cs | 110 +++ .../PHTGL/PHTGL_InvoiceApproveManEntity.cs | 59 ++ SGGL/Model/PHTGL/PHTGL_InvoiceDtoIn.cs | 82 ++ SGGL/Model/PHTGL/PrintModel.cs | 38 + SGGL/SGGL.sln | 14 + 59 files changed, 5276 insertions(+), 257 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2024-03-11.sql create mode 100644 SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs create mode 100644 SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs create mode 100644 SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs create mode 100644 SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs create mode 100644 SGGL/Model/PHTGL/ApproveManModel.cs create mode 100644 SGGL/Model/PHTGL/PHTGL_ContractTrackDtoIn.cs create mode 100644 SGGL/Model/PHTGL/PHTGL_InvoiceApproveManEntity.cs create mode 100644 SGGL/Model/PHTGL/PHTGL_InvoiceDtoIn.cs create mode 100644 SGGL/Model/PHTGL/PrintModel.cs diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index ccd69612a306072d8c150f2a6da1cdbebf3b4e2a..918d4df6b64b9adaeea5a7d7312f8472fca23d67 100644 GIT binary patch delta 3404 zcmchZdrVu`9mnrE_Zl2>0}hz*Op6mjOo9{Jm`7*`1_DiZQ`m;KEQteV$;vB$fdHu; zN|UUSHt?^@P1P4-5vo#c)9PxTG_Cd8Xxbx7r)pZK?2lDj)wOEZWgXr|n!>)vV3kEl zv`lJ`^ttDE&iS2le&=_8=i!?&_%0fznhd8TN!kEXK|Bbsycy0bBaKmWS3?;6{V zI;WXN`6!#AFmF_2P_eXN2`jmfMJhnK5EOx8Py$5# z1ITxSvX!!^b3(3MRgU43RE2Uico6IZ`^9={Ador9*Y+@kF3=5nKriS6$3Z_B0E55- zhQKfw0VlvH7z5+rBzOdPfe-k3SA5?S_w4-Gt*UUoaI$dxv@3O=f;l{d%;EJeo34{$Kr`d`sWY)bH-k%I{($On^thB(b;@En8u2IuUS-fm3mhvNd;Z zRsX?RZore!!u0p8I74g=nveIfT=FEGBVW3K4CW5jL!SG*tee7SFRLR@?m544uPSzd zys97HE76eg5q6fs#zr-JrA7Rj$c8&Zo@B4?G0}+@)<36ig%mMUC|pb&OpOL?w6b>65g7vEvj@Z&)X-fszOm=r3E=N1g{- z^xIcg^-?&)%Tmab>17)zoY|rm+9E~Pl1!eBOP_iLzJXWnKbIwA|1GO6Eh&(NEh5E2 zPQ&;(rru(7ydzA{9IhqjmXJU3!sqP>Q>|WXF=19@EvEyXP3M?DXP#}LaE_Oyk!Nee zIwso1aTV3miKEs*3mIddx@DV}2~XU8-6^+QcN=4p#DNSHpaU@=7U;nm5C`IcFd>=} zP&R<|AQ2>iWFXq#K@JZ;&kSc?-#=7&aroIkJSopRUVZOSz)<)$Q*`(Xk&D9m7ihi< z-UIIg(fb4Be+3_czk%!E@8DxF?aIzwL@x9q39^LIZkc{?ym#wPYI`qi|{?T~4;LQSziUs^a2` z?rJfcPVB@9S}--lc zk%4Q-Q|)E@DU7d~JP&$xIhdr57OH9^%5f+~tq2TO`&gu1p@l6U|Nk3cb3Gi{jmxwj z7iBB*UR<&*k*^2tJ_f0Wo^ozv4l3VX#AH}nOP9-c(~N2F>ioqz&KM)PzSLizO0Etw z`RbiarJvT9QK;UbwhxxK4<767*;KNr$=_h4uI#*kuOYC0G;Ac}NS=S>h2&qXf zdhPRX&YXH^@kf^;UX}bOLKGS?r_@RPw`-^JuN4FwJy&G^s8hR?&dq6eP{a=^AKhuV z)hu$3)@&{)Eber<3M~b@+{G40k+svZ%Ua~H6uS!T4%?C9BA25**qzBaH|}exI#7MA z$Nh!)Bsyy=Cg&+VtJB65r6>?OSsw9Fpl;|TMoycVCeEjd z15r}xdsz+3YQ;gOC@D;v&?y^dCr0NK#%FKpwP!z&`?ahWcah7Fwx?RNu?RLAxUC`mMINFa`Eyeau ztEI@^QMfC=z~1gCv@Lr;ysRsvX1s7)@Zvpy7cV1bD--XLh#%Ts7aJXgv$hd3OtflE zd*njx zjM`h9@a718lo;IowtSgsUryqQ!Nh;dA2Pp|qg}np)S!J)zRKnlMR`fN#_8LphjEY` k24A6y#e>?xoAUVT%HVT4#l`(uKcJggg<6A7aX^^-561$DQUCw| delta 3879 zcmeI!drTb19S888*~LEWGaMN3fdTU}4+reyVa&_024iD_;q0>=lK8lB-Lq+}_gm$59jBhtcj zk%7j=M4+1yE|x`($f=pQD|*p&@m_L(=Hq$|qCnV#0&%45Fqdd+`@vi6zk7CppbAf%Gd@)UWIdCO-m5q@j*2zZ6 z7yIIu*Uj=@(#DwPioz8ap z`#FVG=mU1yp8D{glXtW`rnR+X+xhA|%Ym}OGE>=*tpHywy*-+eA$liXb}+RTeSVus z+}8ZYDp5|m$5P|(-&HN`lj#=}rydQh zfpz#F@f3n724%r~Tp+&=M?1nnn1NHDE!}r#J z%wA}OCNRT3*bf#s00-d^JO$10G&}>(!eKZ9N8uQ>fEA8IE1ZCnV1utg8??hII4%CL z13IA#y1@=-pa;%EFF2qN&Otv6z#t64Fr0@A-~<|8{Y(=t36;eJ84l=q6I=G>*r4Xfywx#$U=b7T?GJej3xA^!mpw z&r8)VMo%5wNv}3k%v8J*5`$7hUcY}I=Z`^Q{uo5J%3t%}I*4%97^s8@6((ZzA-Yxb zq(A-}}=$g$JOc9RdkndGQ-t`OH1iIz7mKN=+5xAulJ zs&0xSV^g+XEarGp{zUpyMdWHy5lDX7R7I*ehK{u7K6uM-ZAEUE*~?iijU21e7ap>R z#Yw8Iv6$(6dk#X>YPWh^wWaY%M%dn!nY0+*<0+8?i9AdcljIz8zfKk;oTgr3d0} z;2r)4ahJSfI;tBhLHyNzn8cgsCI=T*Fx`T}xc2cp+oYLt z4Lo-iMI){){)fr8aIHFlSGv`af3UA+_p*@5b=0!h>*;-6{w7=4%(+&OAwNSY?(xevZ-X3yIqFJF@C&dtbg1PP4yC_9XvPzRtAiLODkJ<0kC!yvxy^iaYYF zOj}~CK>Oaia1n*Di}tEn5f-t+Bcxr0%GH~Od1%HNrGZG@wh&*W*Q zRqNPM?WkTE)~-+Rdd(#(*;>PG`KmUjSBgEwTzQRYEq`Sl8g5VaOzIRf59@MtbX3w? aJoV9Ct$EByncVou1?^9IFalse ..\Lib\Microsoft.SQLServer.ManagedDTS.dll - - ..\packages\MiniExcel.1.29.0\lib\net45\MiniExcel.dll + + ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll ..\packages\Newtonsoft.Json.12.0.3\lib\net45\Newtonsoft.Json.dll @@ -632,6 +632,8 @@ + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 2b19d5af..dc2d0a0c 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -3242,6 +3242,17 @@ namespace BLL /// 进度检测 /// public const string PHTGL_ContractTrackProgressDetectionMenuId = "F545E899-B3B5-4B49-A741-DE19356553D5"; + /// + /// 发票台账 + /// + public const string PHTGL_InvoiceStandingBookMenuId = "B451C8DE-71B9-433E-ACB9-4465FB7E3C5C"; + /// + /// 出入库单 + /// + public const string PHTGL_InvoiceOrderMenuId = "DD38AD86-513B-4BBC-AF64-0F52F56784BE"; + + + #endregion @@ -3445,6 +3456,10 @@ namespace BLL /// public const string TemContractTrackTemplateUrl = "File\\Excel\\DataIn\\合同价格信息导入模板.xlsx"; /// + /// 合同发票信息导入模板 + /// + public const string InvoiceTemplateUrl = "File\\Excel\\DataIn\\发票导入模版.xlsx"; + /// /// 施工日志模板文件原始虚拟路径 /// public const string ConstructionLogTemplateUrl = "File\\Excel\\ConstructionLog\\施工日志.xlsx"; diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index adfb9664..bc002863 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -1498,6 +1498,8 @@ namespace BLL return splitLists; } + + } } diff --git a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs index 1e3b9951..1dedc0da 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/ActionPlanReviewService.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using System.Linq; +using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs index 46ffd521..849de380 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidApproveUserReviewService.cs @@ -5,6 +5,7 @@ using System.Data; using System.Data.SqlClient; using System.IO; using System.Linq; +using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs index 1f0fbaab..d54bc8a0 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/BidDocumentsReviewService.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; +using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs index b01da437..eb6e6882 100644 --- a/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs +++ b/SGGL/BLL/PHTGL/BiddingManagement/SetSubReviewService.cs @@ -7,6 +7,7 @@ using System.Data.SqlClient; using System.IO; using System.Linq; using System.Web.UI.WebControls; +using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs index caa74bde..aa41388b 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/ContractReviewService.cs @@ -10,6 +10,7 @@ using System.Drawing; using System.IO; using System.Linq; using System.Reflection; +using Model; namespace BLL { diff --git a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs index c2175632..3562d8f2 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PHTGL_ApproveService.cs @@ -1,4 +1,7 @@ -using System.Collections.Generic; +using Model; +using System; +using System.Collections; +using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Linq; @@ -21,12 +24,18 @@ namespace BLL return Funs.DB.PHTGL_Approve.FirstOrDefault(e => e.ApproveId == ApproveId); } + /// + /// 获取未审批记录 + /// + /// + /// public static List GetPHTGL_ApproveByContractId(string contractId) { var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.State == 0 select x).ToList(); return q; } + /// ///获取当前人员的所有审批信息 /// @@ -80,6 +89,22 @@ namespace BLL return IsExit; } /// + /// 判断当前人员是否正在审批 + /// + /// + /// + /// + public static bool IsApprovingMan(string contractId, string approveMan) + { + bool IsExit = false; + var q = (from x in Funs.DB.PHTGL_Approve where x.ContractId == contractId && x.ApproveMan == approveMan && x.State==0 select x).ToList(); + if (q.Count>0) + { + IsExit = true; + } + return IsExit; + } + /// /// 添加审批人员记录 /// /// @@ -207,23 +232,70 @@ namespace BLL /// /// /// - public static DataTable GetAllApproveData(string ContractId) + //public static DataTable GetAllApproveData(string ContractId) + //{ + // string strSql = @" select u.PersonName as ApproveMan, + // App.ApproveDate, + // (CASE App.IsAgree WHEN '1' THEN '不同意' + // WHEN '2' THEN '同意' END) AS IsAgree, + // App.ApproveIdea, + // App.ApproveId, + // App.ApproveType + // from PHTGL_Approve as App" + // + @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) "; + // List listStr = new List(); + // listStr.Add(new SqlParameter("@ContractId", ContractId)); + // SqlParameter[] parameter = listStr.ToArray(); + // DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + // return tb; + //} + public static IEnumerable GetAllApproveData(string contractId) { - string strSql = @" select u.PersonName as ApproveMan, - App.ApproveDate, - (CASE App.IsAgree WHEN '1' THEN '不同意' - WHEN '2' THEN '同意' END) AS IsAgree, - App.ApproveIdea, - App.ApproveId, - App.ApproveType - from PHTGL_Approve as App" - + @" left join Person_Persons AS U ON U.PersonId = App.ApproveMan WHERE 1=1 and App.IsAgree <>0 and app.ContractId= @ContractId order by convert(datetime ,App.ApproveDate) "; - List listStr = new List(); - listStr.Add(new SqlParameter("@ContractId", ContractId)); - SqlParameter[] parameter = listStr.ToArray(); - DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - return tb; + var result = (from x in Funs.DB.PHTGL_Approve + join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId + where x.IsAgree != 0 && x.ContractId == contractId + orderby x.ApproveDate + select new + { + ApproveMan = u.PersonName, + x.ApproveDate, + IsAgree = x.IsAgree == 1 ? "不同意" : "同意", + x.ApproveIdea, + x.ApproveId, + x.ApproveType, + x.ApproveForm + } + + ).ToList(); + + return result; } + public static IEnumerable GetAllApproveData(string contractId,string aproveForm) + { + var result = (from x in Funs.DB.PHTGL_Approve + join u in Funs.DB.Person_Persons on x.ApproveMan equals u.PersonId + where x.IsAgree != 0 && x.ContractId == contractId + orderby x.ApproveDate + select new + { + ApproveMan = u.PersonName, + x.ApproveDate, + IsAgree = x.IsAgree == 1 ? "不同意" : "同意", + x.ApproveIdea, + x.ApproveId, + x.ApproveType, + x.ApproveForm + } + + ).ToList(); + if (!string.IsNullOrEmpty(aproveForm)) + { + result = result.Where(x => x.ApproveForm == aproveForm).ToList(); + } + + return result; + } + /// /// 获取最后拒绝的人员 /// @@ -243,57 +315,4 @@ namespace BLL return tb; } } - public class ApproveManModel - { - public int Number - { - get; - set; - } - public string userid - { - get; - set; - } - public string Rolename - { - get; - set; - } - - } - public class PrintModel - { - public int Number - { - get; - set; - } - public string Rolename - { - get; - set; - } - public string UserName - { - get; - set; - } - public string Image - { - get; - set; - } - public string ApproveIdea - { - get; - set; - } - public string ApproveDate - { - get; - set; - } - - } } diff --git a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs index 6e2ae0f6..afbbe131 100644 --- a/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs +++ b/SGGL/BLL/PHTGL/ContractCompile/PhtglContracttrackService .cs @@ -217,8 +217,6 @@ namespace BLL db.SubmitChanges(); } - - public static void UpdatePHTGL_ContractTrack(PHTGL_ContractTrack newtable) { var table = Funs.DB.PHTGL_ContractTrack.FirstOrDefault(x => x.Id == newtable.Id); @@ -1341,110 +1339,5 @@ namespace BLL } } - - } - public class PHTGL_ContractTrackDtoIn - { - /// - /// 序号 - /// - [ExcelColumnIndex("A")] public string SerialNumber { get; set; } - /// - /// 主项号 - /// - [ExcelColumnIndex("B")] public string MainItemCode { get; set; } - /// - /// 主项名称 - /// - [ExcelColumnIndex("C")] public string MainItemName { get; set; } - /// - /// 专业代码 - /// - [ExcelColumnIndex("D")] public string MajorCode { get; set; } - /// - /// 专业工程名称 - /// - [ExcelColumnIndex("E")] public string MajorName { get; set; } - /// - /// 分部工程 - /// - [ExcelColumnIndex("F")] public string SubProject { get; set; } - /// - /// 分项工程 - /// - [ExcelColumnIndex("G")] public string SubItemProject { get; set; } - /// - /// 项目编码 - /// - [ExcelColumnIndex("H")] public string ProjectCode { get; set; } - /// - /// 项目名称 - /// - [ExcelColumnIndex("I")] public string ProjectName { get; set; } - /// - /// 项目特征描述 - /// - [ExcelColumnIndex("J")] public string ProjectDescription { get; set; } - /// - /// 计量单位 - /// - [ExcelColumnIndex("K")] public string UnitOfMeasurement { get; set; } - /// - /// 工程量 - /// - [ExcelColumnIndex("L")] public string Quantity { get; set; } - /// - /// 全费用固定综合单价 - /// - [ExcelColumnIndex("M")] public decimal TotalCostFixedComprehensiveUnitPrice { get; set; } - /// - /// 其中:主材费 - /// - [ExcelColumnIndex("N")] public decimal MainMaterialCost { get; set; } - /// - /// 合价/元 - /// - [ExcelColumnIndex("O")] public decimal TotalPrice { get; set; } - /// - /// 计算规则 - /// - [ExcelColumnIndex("P")] public string CalculationRule { get; set; } - /// - /// 工作内容 - /// - [ExcelColumnIndex("Q")] public string WorkContent { get; set; } - /// - /// 备注 - /// - [ExcelColumnIndex("R")] public string Remarks { get; set; } - /// - /// 施工分包商 - /// - [ExcelColumnIndex("S")] public string ConstructionSubcontractor { get; set; } - /// - /// 主材供应方 - /// - [ExcelColumnIndex("T")] public string MaterialSupplier { get; set; } - /// - /// 是否总包合同范围内 - /// - [ExcelColumnIndex("U")] - public string IsWithinGeneralContractScope { get; set; } - /// - /// 概算工程量 - /// - [ExcelColumnIndex("V")] public string EstimatedQuantity { get; set; } - /// - /// 概算金额 - /// - [ExcelColumnIndex("W")] public decimal EstimatedAmount { get; set; } - /// - /// 预算工程量 - /// - [ExcelColumnIndex("X")] public string SettledQuantity { get; set; } - /// - /// 预算金额 - /// - [ExcelColumnIndex("Y")] public decimal SettledAmount { get; set; } } } \ No newline at end of file diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs new file mode 100644 index 00000000..7d65e020 --- /dev/null +++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoiceService .cs @@ -0,0 +1,587 @@ +using EmitMapper; +using FineUIPro; +using MiniExcelLibs; +using MiniExcelLibs.Attributes; +using Model; +using NPOI.SS.Formula.Functions; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Diagnostics.Contracts; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Text; +using WIA; + + +namespace BLL +{ + + public static class PhtglInvoiceService + { + /// + /// 已导入 + /// + public static int StateDataIn = -1; + /// + /// 已创建入库订单 + /// + public static int StateCreate = 0; + /// + /// 入库审核 + /// + public static int StateInPutApprove = 1; + /// + /// 入库审核拒绝 + /// + public static int StateInPutApproveRefuse = 2; + /// + /// 入库审核成功 + /// + public static int StateInPutApproveSuccess = 3; + /// + /// 出库审核中 + /// + public static int StateOutPutApprove = 4; + /// + /// 出库审核拒绝 + /// + public static int StateOutPutApproveRefuse = 5; + /// + /// 出库审核成功 + /// + public static int StateOutPutApproveSuccess = 6; + + public static string GetState(object invoiceId) + { + string result = ""; + if (invoiceId!=null && !string.IsNullOrEmpty(invoiceId.ToString()) ) + { + var InvoiceId=invoiceId.ToString(); + + var model = GetPHTGL_InvoiceById(InvoiceId); + var approveModel = PHTGL_ApproveService.GetPHTGL_ApproveByContractId(InvoiceId); + + switch (model.State) + { + case -1: + result = "已导入"; + break; + case 0: + result = "已创建入库订单"; + break; + case 1: + result = "入库审核中"+",当前节点-"+BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",",approveModel.Select(x => x.ApproveMan))); + break; + case 2: + result = "入库审核拒绝"; + break; + case 3: + result = "入库审核成功"; + break; + case 4: + result = "出库审核中" + ",当前节点-" + BLL.Person_PersonsService.getPersonsNamesPersonIds(string.Join(",", approveModel.Select(x => x.ApproveMan))); + break; + case 5: + result = "出库审核拒绝"; + break; + case 6: + result = "出库审核成功"; + break; + } + } + return result; + } + + #region 获取列表 + /// + /// 记录数 + /// + public static int Count + { + get; + set; + } + public static IEnumerable GetPHTGL_InvoiceByModle(Model.PHTGL_Invoice table) + { + var q = from x in Funs.DB.PHTGL_Invoice + where + (string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) && + (string.IsNullOrEmpty(table.ProjectId) || x.ProjectId.Contains(table.ProjectId)) && + (string.IsNullOrEmpty(table.ContractId) || x.ProjectId.Contains(table.ContractId)) && + (string.IsNullOrEmpty(table.InvoiceCode) || x.InvoiceCode.Contains(table.InvoiceCode)) && + (string.IsNullOrEmpty(table.InvoiceNumber) || x.InvoiceNumber.Contains(table.InvoiceNumber)) && + (string.IsNullOrEmpty(table.SellerName) || x.SellerName.Contains(table.SellerName)) && + (string.IsNullOrEmpty(table.InvoiceDate) || x.InvoiceDate.Contains(table.InvoiceDate)) && + (string.IsNullOrEmpty(table.Remark) || x.Remark.Contains(table.Remark)) && + (string.IsNullOrEmpty(table.ImagePath) || x.ImagePath.Contains(table.ImagePath)) && + (string.IsNullOrEmpty(table.SellerTaxNumber) || x.SellerTaxNumber.Contains(table.SellerTaxNumber)) && + (string.IsNullOrEmpty(table.ApproveManJson) || x.ApproveManJson.Contains(table.ApproveManJson)) && + (string.IsNullOrEmpty(table.CreateUser) || x.CreateUser.Contains(table.CreateUser)) && + (table.State==null ||x.State==table.State) + select x + ; + + return q.ToList(); + } + + /// + /// 获取分页列表 + /// + /// + /// + /// + public static IEnumerable GetListData(Model.PHTGL_Invoice table, Grid grid1) + { + var q = GetPHTGL_InvoiceByModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return (from x in q + join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g + from c in g.DefaultIfEmpty() + select new + { + c?.ContractName, + c?.ContractNum, + c?.Parties, + c?.ContractAmount, + x.InvoiceId, + x.ProjectId, + x.ContractId, + x.State, + x.InvoiceCode, + x.InvoiceNumber, + x.SellerName, + x.InvoiceDate, + x.AmountExcludingTax, + x.TotalTax, + x.Remark, + x.ImagePath, + x.SellerTaxNumber, + x.InvoiceAmount, + x.ApproveManJson, + x.CreateDate, + x.CreateUser, + x.OrderInDate, + x.OrderOutDate, + x.OrderCode, + x.MaterialRequisitionUnit + }); + } + + public static IEnumerable GetOrderInListData(Model.PHTGL_Invoice table, Grid grid1) + { + var q = GetPHTGL_InvoiceByModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return (from x in q + join y in Funs.DB.PHTGL_Contract on x.ContractId equals y.ContractId into g + from c in g.DefaultIfEmpty() + where x.State>StateDataIn + select new + { + c?.ContractName, + c?.ContractNum, + c?.Parties, + c?.ContractAmount, + x.InvoiceId, + x.ProjectId, + x.ContractId, + x.State, + x.InvoiceCode, + x.InvoiceNumber, + x.SellerName, + x.InvoiceDate, + x.AmountExcludingTax, + x.TotalTax, + x.Remark, + x.ImagePath, + x.SellerTaxNumber, + x.InvoiceAmount, + x.ApproveManJson, + x.CreateDate, + x.CreateUser, + x.OrderInDate, + x.OrderOutDate, + x.OrderCode, + x.MaterialRequisitionUnit + }).ToList(); + } + #endregion + + public static Model.PHTGL_Invoice GetPHTGL_InvoiceById(string InvoiceId) + { + return Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId); + } + + /// + /// 添加实体 + /// + /// + public static void AddPHTGL_Invoice(Model.PHTGL_Invoice newtable) + { + + Model.PHTGL_Invoice table = new Model.PHTGL_Invoice + { + InvoiceId = newtable.InvoiceId, + ProjectId = newtable.ProjectId, + ContractId = newtable.ContractId, + State = newtable.State, + InvoiceCode = newtable.InvoiceCode, + InvoiceNumber = newtable.InvoiceNumber, + SellerName = newtable.SellerName, + InvoiceDate = newtable.InvoiceDate, + AmountExcludingTax = newtable.AmountExcludingTax, + TotalTax = newtable.TotalTax, + Remark = newtable.Remark, + ImagePath = newtable.ImagePath, + SellerTaxNumber = newtable.SellerTaxNumber, + InvoiceAmount = newtable.InvoiceAmount, + ApproveManJson = newtable.ApproveManJson, + CreateDate = newtable.CreateDate, + CreateUser = newtable.CreateUser, + OrderInDate = newtable.OrderInDate, + OrderCode = newtable.OrderCode, + OrderOutDate = newtable.OrderOutDate, + MaterialRequisitionUnit = newtable.MaterialRequisitionUnit, + }; + Funs.DB.PHTGL_Invoice.InsertOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改实体 + /// + /// + public static void UpdatePHTGL_Invoice(Model.PHTGL_Invoice newtable) + { + + Model.PHTGL_Invoice table = Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == newtable.InvoiceId); + if (table != null) + { + table.InvoiceId = newtable.InvoiceId; + table.ProjectId = newtable.ProjectId; + table.ContractId = newtable.ContractId; + table.State = newtable.State; + table.InvoiceCode = newtable.InvoiceCode; + table.InvoiceNumber = newtable.InvoiceNumber; + table.SellerName = newtable.SellerName; + table.InvoiceDate = newtable.InvoiceDate; + table.AmountExcludingTax = newtable.AmountExcludingTax; + table.TotalTax = newtable.TotalTax; + table.Remark = newtable.Remark; + table.ImagePath = newtable.ImagePath; + table.SellerTaxNumber = newtable.SellerTaxNumber; + table.InvoiceAmount = newtable.InvoiceAmount; + table.ApproveManJson = newtable.ApproveManJson; + table.CreateDate = newtable.CreateDate; + table.CreateUser = newtable.CreateUser; + table.OrderInDate = newtable.OrderInDate; + table.OrderCode = newtable.OrderCode; + table.OrderOutDate = newtable.OrderOutDate; + table.MaterialRequisitionUnit = newtable.MaterialRequisitionUnit; + Funs.DB.SubmitChanges(); + } + + } + /// + /// 删除实体 + /// + /// + public static void DeletePHTGL_InvoiceById(string InvoiceId) + { + + Model.PHTGL_Invoice table = Funs.DB.PHTGL_Invoice.FirstOrDefault(x => x.InvoiceId == InvoiceId); + if (table != null) + { + Funs.DB.PHTGL_Invoice.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + } + /// + /// 根据主键获取审批人实体 + /// + /// + /// + public static Model.PHTGL_InvoiceApproveManEntity GetInvoiceApproveManEntity(string InvoiceId) + { + Model.PHTGL_InvoiceApproveManEntity list = new Model.PHTGL_InvoiceApproveManEntity(); + Model.PHTGL_Invoice data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == InvoiceId); + if (data != null && !string .IsNullOrEmpty(data.ApproveManJson)) + { + list = Newtonsoft.Json.JsonConvert.DeserializeObject(data.ApproveManJson); + } + return list; + } + /// + /// 将状态改为已创建 + /// + /// + public static void ChangeStateToCreate(string invoiceId) + { + var model = GetPHTGL_InvoiceById(invoiceId); + model.State = StateCreate; + UpdatePHTGL_Invoice(model); + } + + /// + /// 保存入库审批人实体 + /// + /// + /// + public static void SaveInputApproveManEntity(string invoiceId, Inputapproveman inputapproveman) + { + var table = GetInvoiceApproveManEntity(invoiceId); + table.InputApproveMan = inputapproveman; + var json = Newtonsoft.Json.JsonConvert.SerializeObject(table); + var data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == invoiceId); + if (data != null) + { + data.ApproveManJson = json; + Funs.DB.SubmitChanges(); + } + + } + /// + /// 保存出库审批人实体 + /// + /// + /// + public static void SaveOutputApproveManEntity(string invoiceId, Outputapproveman outputapproveman) + { + var table = GetInvoiceApproveManEntity(invoiceId); + table.OutputApproveMan = outputapproveman; + var json = Newtonsoft.Json.JsonConvert.SerializeObject(table); + var data = Funs.DB.PHTGL_Invoice.FirstOrDefault(e => e.InvoiceId == invoiceId); + if (data != null) + { + data.ApproveManJson = json; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 导入数据 + /// + /// 文件地址 + /// 项目id + /// 创建人id + /// + public static ResponeData ImportData(string path, string projectid, string creatUserId) + { + var responeData = new ResponeData(); + List temeplateDtoIns; + try + { + temeplateDtoIns = MiniExcel.Query(path, startCell: "A2").ToList(); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = "模板错误:" + ex.ToString(); + return responeData; + } + //数据校验 + if (temeplateDtoIns.Count == 0) + { + responeData.code = 0; + responeData.message = "导入数据为空!"; + return responeData; + } + + var invoiceCodeList = temeplateDtoIns.Select(x => x.InvoiceCode).Distinct().ToList(); //获取所有发票代码 + //根据发票代码分组插入数据 + foreach (var invoiceCode in invoiceCodeList) + { + var invoiceCodeDtoIns = temeplateDtoIns.Where(x => x.InvoiceCode == invoiceCode).ToList(); + + var mapper = + ObjectMapperManager.DefaultInstance.GetMapper, List>(); + var mapperDetail = + ObjectMapperManager.DefaultInstance.GetMapper, List>(); + //通过映射实体赋值 + var invoiceModel = mapper.Map(invoiceCodeDtoIns).FirstOrDefault(); + var invoceDetailList = mapperDetail.Map(invoiceCodeDtoIns.Where(x => !string.IsNullOrEmpty(x.GoodsOrServicesName) && !string.IsNullOrEmpty(x.SpecificationModel)).ToList()); + + var queryModel = new PHTGL_Invoice + { + InvoiceCode = invoiceCode, + ProjectId = projectid + }; + var queryresult = GetPHTGL_InvoiceByModle(queryModel).FirstOrDefault();//查询该发票代码是否存在 + if (queryresult != null) + { + if (queryresult.State != StateDataIn) + { + continue; + } + invoiceModel.State = StateDataIn; + invoiceModel.ProjectId = projectid; + invoiceModel.InvoiceId = queryresult.InvoiceId; + invoiceModel.CreateUser = creatUserId; + invoiceModel.CreateDate = DateTime.Now; + UpdatePHTGL_Invoice(invoiceModel); + } + else + { + invoiceModel.InvoiceId = SQLHelper.GetNewID(); + invoiceModel.State = StateDataIn; + invoiceModel.ProjectId = projectid; + invoiceModel.CreateUser = creatUserId; + invoiceModel.CreateDate = DateTime.Now; + AddPHTGL_Invoice(invoiceModel); + + } + PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailByInvoiceId(invoiceModel.InvoiceId); + PhtglInvoicedetailService.BatchAddPHTGL_InvoiveDetail(invoceDetailList, invoiceModel.InvoiceId); //插入发票明细 + + } + return responeData; + + } + + /// + /// 获取审批人员 + /// + /// 主键id + /// 0 入库 1出库 + /// + public static List GetApproveManModels(string invoiceId ,int type) + { + List approveManModels = new List(); + var table = GetInvoiceApproveManEntity(invoiceId); + + if (type==0) //入库 + { + approveManModels.Add(new ApproveManModel { Number = 1, userid = table.InputApproveMan.ProfessionalEngineer, Rolename = "专业工程师" }); + approveManModels.Add(new ApproveManModel { Number = 2, userid = table.InputApproveMan.ConstructionManager, Rolename = "施工经理" }); + approveManModels.Add(new ApproveManModel { Number = 3, userid = table.InputApproveMan.ControlManager, Rolename = "控制经理" }); + approveManModels.Add(new ApproveManModel { Number = 4, userid = table.InputApproveMan.ProjectManager, Rolename = "项目经理" }); } + else { + approveManModels.Add(new ApproveManModel { Number = 5, userid = table.OutputApproveMan.PurchasingMan, Rolename = "采购员" }); + approveManModels.Add(new ApproveManModel { Number = 6, userid = table.OutputApproveMan.ControlManager, Rolename = "控制经理" }); + approveManModels.Add(new ApproveManModel { Number = 7, userid = table.OutputApproveMan.ProjectManager, Rolename = "项目经理" }); + approveManModels.Add(new ApproveManModel { Number = 8, userid = table.OutputApproveMan.ConUnitMaterialOfficer, Rolename = "施工单位材料经理" }); + approveManModels.Add(new ApproveManModel { Number = 9, userid = table.OutputApproveMan.ConUnitProjectManager, Rolename = "施工单位项目经理" }); + } + + + return approveManModels; + } + + /// + /// 开启审批流程 + /// + /// + public static void StartApprovalProcess(string invoiceId ) + { + + var model = GetPHTGL_InvoiceById(invoiceId); + if (model.State ==StateCreate || model.State == StateInPutApproveRefuse) + { + CreateFirstApprove(invoiceId, 0); + model.State = StateInPutApprove; + UpdatePHTGL_Invoice(model); + } + else if (model.State == StateInPutApproveSuccess || model.State == StateOutPutApproveRefuse) + { + CreateFirstApprove(invoiceId, 1); + model.State = StateOutPutApprove; + UpdatePHTGL_Invoice(model); + } + } + + /// + /// 创建第一个审批流程 + /// + /// 主键 + /// 0 入库 1出库 + public static void CreateFirstApprove(string invoiceId, int type) + { + var approveManModels = GetApproveManModels(invoiceId, type).OrderBy(x=>x.Number).FirstOrDefault(); + Model.PHTGL_Approve _Approve = new Model.PHTGL_Approve(); + _Approve.ApproveId = SQLHelper.GetNewID(typeof(Model.PHTGL_Approve)); + _Approve.ContractId = invoiceId; + _Approve.ApproveMan = approveManModels.userid; + _Approve.ApproveDate = ""; + _Approve.State = 0; + _Approve.IsAgree = 0; + _Approve.ApproveIdea = ""; + _Approve.ApproveType = approveManModels.Rolename; + _Approve.ApproveForm =(type==0? "Invoice_Input": "Invoice_Output"); + BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve); + } + + /// + /// 审批 + /// + /// + /// + /// + /// + /// 0 入库 1出库 + public static void Approve(string invoiceId, int type, string userid, bool isAgree, string idea) + { + var approveManModels = GetApproveManModels(invoiceId, type); //获取审批人员 + var thisApprovemodel = PHTGL_ApproveService.GetPHTGL_ApproveByUserId(invoiceId, userid);//获取当前人员正在审批的信息 + if (thisApprovemodel == null) { return; } + var thisApproveTypeNumber = approveManModels.Find(x => x.userid == userid && x.Rolename == thisApprovemodel.ApproveType).Number; //当前审批人员序号 + int nextApproveTypeNumber = thisApproveTypeNumber + 1; //下一个审批人员序号 + int maxApproveTypeNumber = approveManModels.Max(x => x.Number); //最大审批人员序号 + + + thisApprovemodel.ApproveDate = Funs.GetNewDateTimeOrNow("").ToString(); + thisApprovemodel.IsAgree = isAgree ? 2 : 1; + thisApprovemodel.ApproveIdea = idea; + thisApprovemodel.State = 1; + PHTGL_ApproveService.UpdatePHTGL_Approve(thisApprovemodel); + if (isAgree) + { + if (PHTGL_ApproveService.GetPHTGL_ApproveByContractId(invoiceId).Count==0) //当前节点是否全部审批结束 + { + if (thisApproveTypeNumber < maxApproveTypeNumber) //是否最末节点 + { + Model.PHTGL_Approve _Approve = new Model.PHTGL_Approve(); + _Approve.ContractId = thisApprovemodel.ContractId; + _Approve.ApproveMan = approveManModels.Find(e => e.Number == nextApproveTypeNumber).userid; + _Approve.ApproveDate = ""; + _Approve.State = 0; + _Approve.IsAgree = 0; + _Approve.ApproveIdea = ""; + _Approve.ApproveType = approveManModels.Find(e => e.Number == nextApproveTypeNumber).Rolename; + _Approve.IsPushOa = 0; + _Approve.ApproveForm = (type == 0 ? "Invoice_Input" : "Invoice_Output"); + _Approve.ApproveId = SQLHelper.GetNewID(typeof(Model.PHTGL_Approve)); + BLL.PHTGL_ApproveService.AddPHTGL_Approve(_Approve); + } + else + { + //流程走完结束 + var model = GetPHTGL_InvoiceById(invoiceId); + model.State = (type == 0 ? StateInPutApproveSuccess:StateOutPutApproveSuccess); + UpdatePHTGL_Invoice(model); + } + } + } + else + { //审批拒绝-流程结束 + var model = GetPHTGL_InvoiceById(invoiceId); + model.State = (type == 0 ? StateInPutApproveRefuse : StateOutPutApproveRefuse); + UpdatePHTGL_Invoice(model); + } + } + + } + +} \ No newline at end of file diff --git a/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs new file mode 100644 index 00000000..7c34c5a1 --- /dev/null +++ b/SGGL/BLL/PHTGL/InvoiceManage/PhtglInvoicedetailService.cs @@ -0,0 +1,165 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; +using System.Text; + + +namespace BLL +{ + + public static class PhtglInvoicedetailService + { + + + + #region 获取列表 + /// + /// 记录数 + /// + public static int Count + { + get; + set; + } + public static IEnumerable GetPHTGL_InvoiceDetailByModle(Model.PHTGL_InvoiceDetail table) + { + var q = from x in Funs.DB.PHTGL_InvoiceDetail + where + (string.IsNullOrEmpty(table.InvoiceDetailId) || x.InvoiceDetailId.Contains(table.InvoiceDetailId)) && + (string.IsNullOrEmpty(table.InvoiceId) || x.InvoiceId.Contains(table.InvoiceId)) && + (string.IsNullOrEmpty(table.GoodsOrServicesName) || x.GoodsOrServicesName.Contains(table.GoodsOrServicesName)) && + (string.IsNullOrEmpty(table.SpecificationModel) || x.SpecificationModel.Contains(table.SpecificationModel)) && + (string.IsNullOrEmpty(table.Unit) || x.Unit.Contains(table.Unit)) && + (string.IsNullOrEmpty(table.TaxRate) || x.TaxRate.Contains(table.TaxRate)) + select x + ; + + return q.ToList(); + } + + /// + /// 获取分页列表 + /// + /// + /// + /// + public static IEnumerable GetListData(Model.PHTGL_InvoiceDetail table, Grid grid1) + { + var q = GetPHTGL_InvoiceDetailByModle(table); + Count = q.Count(); + if (Count == 0) + { + return null; + } + q = q.Skip(grid1.PageSize * grid1.PageIndex).Take(grid1.PageSize).ToList(); + // q = SortConditionHelper.SortingAndPaging(q, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in q + select new + { + x.InvoiceDetailId, + x.InvoiceId, + x.GoodsOrServicesName, + x.SpecificationModel, + x.Unit, + x.Quantity, + x.UnitPrice, + x.Amount, + x.TaxRate, + x.Tax, + + }; + } + #endregion + + public static Model.PHTGL_InvoiceDetail GetPHTGL_InvoiceDetailById(string InvoiceDetailId) + { + return Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == InvoiceDetailId); + } + public static List GetPHTGL_InvoiceDetailByInvoiceId(string InvoiceId) + { + var list = Funs.DB.PHTGL_InvoiceDetail.Where(x => x.InvoiceId == InvoiceId).ToList(); + return list; + } + public static void AddPHTGL_InvoiceDetail(Model.PHTGL_InvoiceDetail newtable) + { + if (string.IsNullOrEmpty(newtable.InvoiceDetailId)) + { + newtable.InvoiceDetailId = SQLHelper.GetNewID(); + } + Model.PHTGL_InvoiceDetail table = new Model.PHTGL_InvoiceDetail + { + InvoiceDetailId = newtable.InvoiceDetailId, + InvoiceId = newtable.InvoiceId, + GoodsOrServicesName = newtable.GoodsOrServicesName, + SpecificationModel = newtable.SpecificationModel, + Unit = newtable.Unit, + Quantity = newtable.Quantity, + UnitPrice = newtable.UnitPrice, + Amount = newtable.Amount, + TaxRate = newtable.TaxRate, + Tax = newtable.Tax, + }; + Funs.DB.PHTGL_InvoiceDetail.InsertOnSubmit(table); + Funs.DB.SubmitChanges(); + } + public static void UpdatePHTGL_InvoiceDetail(Model.PHTGL_InvoiceDetail newtable) + { + + Model.PHTGL_InvoiceDetail table = Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == newtable.InvoiceDetailId); + if (table != null) + { + table.InvoiceDetailId = newtable.InvoiceDetailId; + table.InvoiceId = newtable.InvoiceId; + table.GoodsOrServicesName = newtable.GoodsOrServicesName; + table.SpecificationModel = newtable.SpecificationModel; + table.Unit = newtable.Unit; + table.Quantity = newtable.Quantity; + table.UnitPrice = newtable.UnitPrice; + table.Amount = newtable.Amount; + table.TaxRate = newtable.TaxRate; + table.Tax = newtable.Tax; + Funs.DB.SubmitChanges(); + } + + } + public static void DeletePHTGL_InvoiceDetailById(string InvoiceDetailId) + { + + Model.PHTGL_InvoiceDetail table = Funs.DB.PHTGL_InvoiceDetail.FirstOrDefault(x => x.InvoiceDetailId == InvoiceDetailId); + if (table != null) + { + Funs.DB.PHTGL_InvoiceDetail.DeleteOnSubmit(table); + Funs.DB.SubmitChanges(); + } + + } + + public static void DeletePHTGL_InvoiceDetailByInvoiceId(string InvoiceId) + { + var list = Funs.DB.PHTGL_InvoiceDetail.Where(x => x.InvoiceId == InvoiceId); + if (list != null) + { + Funs.DB.PHTGL_InvoiceDetail.DeleteAllOnSubmit(list); + Funs.DB.SubmitChanges(); + } + + } + public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list, string invoiceId ) + { + foreach (var item in list) + { + item.InvoiceId= invoiceId; + AddPHTGL_InvoiceDetail(item); + } + } + public static void BatchAddPHTGL_InvoiveDetail(IEnumerable list) + { + foreach (var item in list) + { + AddPHTGL_InvoiceDetail(item); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataIn/发票导入模版.xlsx new file mode 100644 index 0000000000000000000000000000000000000000..2916650c5dc9ba74b47a399a401ae17add81a21a GIT binary patch literal 9188 zcmeHN1zQ~1(jMGlaEA;QY#7|#9fAc35Znh35S$~40yUvO{FGkvC|YP!4Lx9U_?YpNh269G^G=l}o!1Ta6yvNb^f0OFAW073vd zqLGX<)WZtuVXEWfV&!hk;qB!3ARif#ITwHkKmUKrfAJHjOdeM6;RMQEDBj3yfRz{D zNuu-ZhYS#~J`(TjP3kYVFv_;GyU%`g4V2C!wil=+7+dt^J|3}s2X%TM^0L203p*-! zuv6EBQUKC7u*cXzN}lLuXmFTIL@CKdZfY81oe4;DZS2wFm0gumuB5OfCJ_%>&zc|5 z!(Zu#VV4`03JorFeNoq2#upqan*^>;5Kh_KvG|&NUk588N74B%k~}jh(gf*ivzTka z+^$kp+TEF(c&49PATD!;$G71wjjo`!v+pNx_q>BSHtJOK zs+phI))Z`%Eg1|7`7{gAbcm`asp5u?`S(f?7pM*&bw60TW?Utt>Rq9|Q;Atb;W5>PVup-He)W8Z?x4_Z8dwt*~nc~5kXzuo-3QyTc86U5*jvHxXo zTf}#7eADQ~!EwrVAom?A0C0bg1kn5&EgN(>=}+NUQ-!k*3ri-jghf>0Bx32ohW%;=%jTEW2-DKq`&HpJjRLtlNn@FT zGbzQ}I1(>~RQEom6A!wZ+ssw_4LX9(eo*LY+X~s$m}k2Q)A^WMI(B}S&Fmn&^#iNF z8PuZVCAj1sQy5^(Jqt9f=RF?I^63@8=&2Yy`VbODTe=L7Q2!)Juy}InclZ-&hLeN> zfR5np2>G2SUe0a~=FZLzKcm-wID-HWVQ?+~-AkpGno2Jxunp@jg3~MW88QBx2ZU}< zcNY)+Lp{p^6No3^bcK?&*;xOx3IxeH+~;s);MoNq?iv!|Sr=PrBmwesLdQc96z7re zBS`4x`&Bd{3MhmGdpo-o`&hUc?u0P$#6k9KBEheh%#7p_1;uo-r?5}qy!NAM(LG%CkiH&b=~y^nA3i;_ z-uN&uy#lxNKOyr>8MC_*4i`MQ*TsXM0f)?A!BVKx0$t!FTEaS|ML&p@ozo)*xy9>a z*yn;n_~ZH{B~|L>^yzdHBdL)MuspUGC77GNcJFy_qfL}k2nSR$(D_Xt3yW?o%N*=O zqNt3yieNOx=kvCpmF@s zXcn1)38j9_axcpd$g;&+#8aI*BUHw$^4eKk){%?HPiDL@hfttE=`$j1p{$e8KJGG1 zCRL<-eRZ7i8FGkclpcddFk5NHW2=V=au`6uYfP9ygopz$kpv zlw1U_2E`vg;S$vU0vX2yt4Rw_Je;yD)$$3ASiMwzal-`?yND5pP0yw@h@~Y>u}5i_7~WZtOX zhTMgbX8Rm$Jmwa8gqqs4>V~Z`z)$()4VvXnCZXcA7(v6r{oR%8#o1QQ;mSckU~ts@ za+PNymsZ}AQjC@sY3;3Go)02TW0wC!)r);&@k_LS1GX?eb=y<8e|rfBH_`9FcDFTi zv$E9oaI=Hjxc_v8j#^8~h*D&2c+VrO4%{oFUd|drLb7vdp1M9XcCm4?iEgd~>cyO) zO@+LhA`r+Yz^>%Y>7UDKv}JfXyEH7c<+nwJOJA&h_QoYdHJ@A`G4mAz5U5UB9?nA` zC_1|`i-4GisrUL#a02ou5P`+VUyUIY^M-^F!;)p>P+IYmK_MH1*#`dCj|pZwn420r zNJ`7Hk;?DTABmwgCVp@#Wuriqo@ahK>w5?z|re){UDSrNa%L#ztMLNqKx?uZK-hU>q=8dHfNwR;6FC z*Kz*XgEw5v@Syh@*6Wz#E7Wh^jnJ>D&3DRF!_?puQOUczU$>deHH zC1aAfo2-HY_gL{Pq2|lcthDC}X;|HfDW>h3Ct`1+XVVxaQv%%unR)#*6qBRztuUZJ zu-I?B-me7g(#2vraV#|jCfwsC>= zl#2|xXRmK3Ac1~oM~!&m;SzzqLJB$Evag8jpUVDd&ppX_Qt!#l0s^2M6(+iJC(Iastogf+BsKZ`(-{j8r#l_RG;p1c(PbFnJae^_@3ML z3}7HxVL#W>e(3h>tRyh-IQU`<&-Cu>OP$Bgq_^2x zj^Fh}Qcj?M#&dnwgUErL!26AXLt2TOjW}l-!TLraVa`<<0*h7SzJX;Nk{(3r^L3;< zbAldpd=*5w+=aYm2tAg!XK*RjOxJrXXV<6Xq(`4_-dpVk^ll{zTDKGQk+{Th&6_Q5 z2eH|6^z`)jaC>TuZZRF8N-I>uT9|7Q7jwpfOkSy233R8V&#)*nWUL{pX!sA{ay_d& z@Rw%qI7q;^2~jJ&5I+`vDQL{ifTl;cDJ{Yf-o*X{Rk{?svbS_19Nnz9)T6*p@E#=} zcReD_5ZW60m7tH~wG5H==Qoty_X zhZAy+^e~19j;xlKT!eEL5liTOJS8IxuT=M1)___>J~QbaT^DI>GE+Rg2#l0H{!vfa z7RQ)EG9{~vm3%@L~qeA9f(6iS8H%$?T-(h_KuNfmzX>c=kJ-^F6RS{um-7*IFj8 zX;`UI8CJ=gB;~gg6L}b|%DI@Key+ls831Z|w+jKgHX6|Gp4M1*)>|xS-=WVr+1~I1 zq!}WG+EIfIymr5~ep$*VmCY%Gj1nFNmFmR|n##(6E`h|9M9NMuv{%u7j6 z8UQxHH>XETacjWL zVU%t>J25l(4svuQO~Fh|+T*<<&>s!<=&5Y*jGVOFWh!UxPmil zh!Zw{c2_v~r~L*BVPU zw9`ZGsCHj%iu+i1raY3icSSaEDo$jk-mw-zZ`HwW)eammT!LvIWzqF1|5&6hPH@gg zZZ(5e^`6MOxJOv z5-3=r^-Z%oi%&uGv`8SH#i^47MqfvPFYe>6Zg{t(HH+K)y2gl^uR8!#idrO1@Aw#N zpR+RM+6*?et8>uRMOV;7Ror-v)YP3DwRd0=_jYMzVAv=Fi=Kouy*&qF-*a~B4_j;Q zpe@hzS)rE{_HuYFRX4vkg*jsHtBL+ROFnO|$`iBAuyL94wArjcsAW7WV6nGCTGxMsrM(EJz z-BeKQoONUvZ?xFJFN3R=k(~-y$_y(Qyn$h>yueT;-UsZmKb$3zCnWYLI&|_u;Z@`| z)+-hujpQf+$}(O9cg}_$E|xZ24bKhFE5%PL607)?Q{}o1FoZ?PX+E~?lCPsLd?bf> z2p&k_VLX%~GZytN$$3SDmLbl)E1q1^kXU@C+>pd1Ga(gUvLClhzxu@_Iz;rf?6_H= zilC8$by%=2HDGjWD|JBP?szxiqQk&I4SD?cf24yXpfi$c;AnZ^*Hif2boZ+lJeiYuBfG#Ycvy2H9?g zlr<)GBcB5(r#rU{$&ujKK}=7{h|&0VtJHP6wH-vMF+cu|s`rVJHSC(;HwPV?fQxp!jW6z6;_G$~!p-~Z{QPm>F_96^SAq=pg zQ5|iq^;wW=ed`nAT%>_$tkF%@M(GT2xKXz#KHH;PsEzU%;5dPAc<<4z)02|Z3YG11 zaErSo94ACYN09eSzP)O<3*~p6iZb!YFUkH?*OQLz?{{%9wh~B=U*#1|$#h?gh4Qgn z&3VlCdIJkAO*MFV`$B38UY zR9e+1bLu=(3Fp!NLBd2Lw#3>H`EOyE9$bO<(DybsN{-C0X*h}Kq$yd3%MPQwW!&kW zR~Di?z*rYbI2xL1XBJ{)qfWL7AVa2?cxV^Q8qN}kgQk+mTRg+Q{Ix!w7^8$dA--d_ zu&8wIBl1@ES2C3thHv^4cchSqssjWcG8htqG2*)#_Qlz2d*Z8Q=$@iHd# zwcr=8F};;o`*716s~Er>_DnOGA!R$(WP&|v+#g*Ia`)}g6c6^QfJNHanYTc5F>O<0 zKE|B&Ny5Iwq(@r<=TXgvqYOpv9M|_3lKP5@$+8U?*=t;d1Z=yEX&}YUYbedf8|r8h z+8R8jaHqYYUTMk}{@V5!f8N^Qn5DGY@qY32*};DC%vo5>QpW6Te|y?&Z$HWBMI)^5 z(}+fF?l!?yML(>As~TX9ouAi4^`AO;wi`Wl@Sy=8HHnK8$!k-OJ5W#8YFg_Gmp@SR z`c};0WfiOWtqHGr>9vrw|A7DOe)UIu3c-T{DEvVD0V>fA{`caG1x4wN5@d}|PsCKLcn?O|&^i!YxSRjoS0aB85Yd*XSF;q!A0KE??9ImVb} z?qn+zaU;KXz|9#qSlIO+OT?wr>M4%cRddcmKzE%E&#F}##w|mRP<#lHaT6&dpk`hG zJ#UdHg@)Mz2;4pKaF+Jtl`nhB%+BgTt<+i#e44_q$cGj{5ucwG;o)rW$CtOsJiZ^j|Pm8Lp+BXXX1 z@XYm})HEV>DFDMu3H$IbKD?}I>1?6t=Ir7Qv2b>?`lBKEziKMnXE`RQ{cMPZT_`Ss zPQ+ak^R*0=SP^z2l@*bLXARDI8(vZm^A`%Cp_xsyfntM`!Zia@KKp(j$=q^;C3zkp z_D9NZGQTn>3NptbEgzaNhGCL2*Tk}_@5)QX3fI^gyvepyCHzd*#1(_Ojy&6$l+38Q zWxM-^iOlFdijva?^-xr1zv9l#q>jG!xhz|!9o1MZvVxE&(M6}GhAc0gP-gtq+!Rs} z4>q5o=I9!O@=@bVaKiaYu#}LS@~ZH@GsQYhosh`OBww38OUDI%dm9<-9EmQx-Q9)N zDb3P$Hq_E@*JWj%4yK#(fR1mGakqE3`+PltucPZglnDhQN4tZd#Z(W8mR8osrHbpP z?9r2)S*gb%3|kCpG(0zyn%E8j0h-4c|Aw*V8kgEUIKGhJAprPSjG4K({10MqZ2hsk zN$gOk;sW;jGAx^IW`C!7rRi}(AqSMjPfj|>^=hs2A`$ns!mALWc|d^U8Oh56REm=g z_Rc)o;^J;$ixtbw&rEkd{joJhvhY1!jTL>uJGC|dVuc~N@4n7NE<$zam zMRgL4>yDf%)BcD9$6!~m^r)>EHp6EsN&!(uOj&a`Ff1Vc1l|mu=u$9!dSX@Gg}F?O zG7%%0gZu(39dp^KPmv8v#F8D$iXQz=6nLGxGafz^$}AW50+aVDUe;Z?*6H0wOQhzy zWu;aZb3~}_+Xgl51#a_ruNl&NXrS2L9lhZ8ekDsw#nQZA@~w4nh8x}5?+*T!GM^ZJ}zY2I?sj@~Wbiv~9RIF5V=6Ue$)3w_&9J<#K}=SAGD9aJI1 zl~E25vTDcn76M);8`m^^7}bGcY-otQ4ZDKH%}ao%YHG@gFn(XZ)A9D>PO9uHf&T-~R~y98=+3`AZ-8SHZt`!~QDR3U7A&|Glwa z_59i*`BT#&{FRYk8YaIA|5}FrQ+N>TH{pL2rGM4%YuWTq4TkWv4gUAP7Eymy@N1&? zr-E&GVH~dD&$RDX(O)N}e~Nm;=cs?&`ah;C|RnbZCN literal 0 HcmV?d00001 diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 9f1f55da..a93aabd1 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -114,8 +114,8 @@ False - - ..\packages\MiniExcel.1.29.0\lib\net45\MiniExcel.dll + + ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll @@ -1300,6 +1300,12 @@ + + + + + + @@ -12690,6 +12696,48 @@ SetSubFile.aspx + + InvoiceDataIn.aspx + ASPXCodeBehind + + + InvoiceDataIn.aspx + + + InvoiceOrder.aspx + ASPXCodeBehind + + + InvoiceOrder.aspx + + + InvoiceOrderDetail.aspx + ASPXCodeBehind + + + InvoiceOrderDetail.aspx + + + InvoiceOrderReviewEdit.aspx + ASPXCodeBehind + + + InvoiceOrderReviewEdit.aspx + + + InvoiceStandingBook.aspx + ASPXCodeBehind + + + InvoiceStandingBook.aspx + + + InvoiceStandingBookEdit.aspx + ASPXCodeBehind + + + InvoiceStandingBookEdit.aspx + LongListNetApplication.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs index d0fc1195..93f7c868 100644 --- a/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/OccupationHealth/PhysicalExaminationEdit.aspx.cs @@ -1,7 +1,5 @@ using BLL; -using Microsoft.Office.Core; using System; -using System.Web; namespace FineUIPro.Web.HSSE.OccupationHealth { diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs index 887a9b85..a5437129 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/SitePersonNowStatistic.aspx.cs @@ -1,8 +1,5 @@ using BLL; -using Microsoft.Office.Core; -using Newtonsoft.Json.Linq; using System; -using System.Linq; namespace FineUIPro.Web.HSSE.SitePerson { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs index 7ad805ae..a62e29e1 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewDetail.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs index 8cdf8354..01b3878a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ActionPlanReviewEdit.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs index 1e44985d..8d3f8fd5 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewDetail.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs index ec388773..45f54a4c 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/ApproveUserReviewEdit.aspx.cs @@ -5,6 +5,7 @@ using System.Collections.Generic; using System.Data; using System.Data.SqlClient; using System.Web.DynamicData; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs index dcebd218..4df03d02 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewDetail.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs index c660429e..64005fd4 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/BidDocumentsReviewEdit.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs index 6e6c2043..1bd7ac6a 100644 --- a/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/BiddingManagement/SetSubReviewDetail.aspx.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using Model; namespace FineUIPro.Web.PHTGL.BiddingManagement { diff --git a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs index 8ad9849e..698bc82f 100644 --- a/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs +++ b/SGGL/FineUIPro.Web/PHTGL/ContractCompile/ContractReviewDetail.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using Model; using System; using System.Collections.Generic; using System.Data; @@ -182,7 +183,7 @@ namespace FineUIPro.Web.PHTGL.ContractCompile } - DataTable tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); + var tb = BLL.PHTGL_ApproveService.GetAllApproveData(ContractReviewId); Grid1.DataSource = tb; Grid1.DataBind(); } diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx new file mode 100644 index 00000000..f069854d --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx @@ -0,0 +1,35 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceDataIn.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceDataIn" %> + + + + + + + 导入 + + +
+ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs new file mode 100644 index 00000000..275c0fde --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.cs @@ -0,0 +1,147 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceDataIn : PageBase + { + #region 加载 + + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + + } + } + + #endregion + + #region 导入 + + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + var message = string.Empty; + errorInfos = string.Empty; + if (fuAttachUrl.HasFile == false) + { + ShowNotify("请选择Excel文件!", MessageBoxIcon.Warning); + return; + } + + var IsXls = Path.GetExtension(fuAttachUrl.FileName).Trim().ToLower(); + if (IsXls != ".xlsx") + { + ShowNotify("只能选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(errorInfos)) errorInfos = string.Empty; + var rootPath = Server.MapPath("~/"); + var initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) Directory.CreateDirectory(initFullPath); + //指定上传文件名称 + hdFileName.Text = Funs.GetNewFileName() + IsXls; + //上传文件路径 + var filePath = initFullPath + hdFileName.Text; + //文件上传服务器 + fuAttachUrl.PostedFile.SaveAs(filePath); + //文件上传服务器后的名称 + var fileName = rootPath + initPath + hdFileName.Text; + + ResponeData responeData; + responeData = PhtglInvoiceService.ImportData(fileName, this.CurrUser.LoginProjectId,this.CurrUser.PersonId); + + + if (responeData.code == 1) + { + ShowNotify("数据导入成功!", MessageBoxIcon.Success); + + } + else + { + ShowNotify(responeData.message, MessageBoxIcon.Error); + + + } + + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + #endregion + + #region 定义项 + + /// + /// 上传预设的虚拟路径 + /// + private readonly string initPath = Const.ExcelUrl; //"File\\Excel\\DataIn\\"; + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + #endregion + + #region 模板下载 + + /// + /// 模板下载 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定要下载模板吗?", string.Empty, + MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), + PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + var rootPath = Server.MapPath("~/"); + var uploadfilepath = rootPath + Const.InvoiceTemplateUrl; + var filePath = Const.InvoiceTemplateUrl; + var fileName = Path.GetFileName(filePath); + var info = new FileInfo(uploadfilepath); + var fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", + "attachment;filename=" + HttpUtility.UrlEncode(fileName, Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs new file mode 100644 index 00000000..5a1f703c --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceDataIn.aspx.designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceDataIn + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx new file mode 100644 index 00000000..6a77951a --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx @@ -0,0 +1,128 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrder.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrder" %> + + + + + + + + + + + + + +
+ + + + + + + + <%-- + + + --%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + +<%-- + + --%> + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs new file mode 100644 index 00000000..161810fe --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.cs @@ -0,0 +1,215 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceOrder : PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); + table.ProjectId = this.CurrUser.LoginProjectId; + var tb = BLL.PhtglInvoiceService.GetOrderInListData(table, Grid1); + Grid1.RecordCount = PhtglInvoiceService.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + Grid1.DataSource = tb; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + // this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + //this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + // this.btnMenuDelete.Hidden = false; + } + } + } + #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 = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + + + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + if (e.CommandName== "OrderInDetail") + { + Window1.Title = "入库单详情"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "0", "编辑 - "))); + } + else if(e.CommandName== "OrderOutDetail") + { + Window1.Title = "出库单详情"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderDetail.aspx?InvoiceId={0}&&Type={1}", e.RowID, "1", "编辑 - "))); + } + } + + protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) + { + var id = e.RowID; + var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(id); + if (model.State> PhtglInvoiceService.StateDataIn) + { + Grid1.FindColumn("btnOrderInDetail").Hidden = false; + } + if (model.State >= PhtglInvoiceService.StateInPutApproveSuccess) + { + Grid1.FindColumn("btnOrderOutDetail").Hidden = false; + } + + } + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs new file mode 100644 index 00000000..e23153ae --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrder.aspx.designer.cs @@ -0,0 +1,116 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceOrder + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx new file mode 100644 index 00000000..dedf505e --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx @@ -0,0 +1,182 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderDetail.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderDetail" %> + + + + + + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ +
+ + diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs new file mode 100644 index 00000000..b3a33de7 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.cs @@ -0,0 +1,216 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceOrderDetail : PageBase + { + public string InvoiceId { + get + { + return (string)ViewState["InvoiceId"]; + } + set + { + ViewState["InvoiceId"] = value; + } + } + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + InvoiceId = Request.QueryString["InvoiceId"]; + Type = Request.QueryString["Type"]; + + Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); + table.ProjectId = this.CurrUser.LoginProjectId; + table.InvoiceId=InvoiceId; + var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); + var ContractModel = BLL.ContractService.GetContractById(invoiceModel.ContractId); + + if (invoiceModel != null) + { + txtProjectName.Text=ProjectService.GetProjectNameByProjectId(invoiceModel.ProjectId); + txtContractNum.Text= ContractModel?.ContractNum; + txtSellerName.Text=invoiceModel.SellerName; + txtOrderInDate.SelectedDate=invoiceModel.OrderInDate; + txtInvoiceDate.Text=invoiceModel.InvoiceDate; + txtOrderCode.Text=invoiceModel.OrderCode; + txtInvoiceNumber.Text=invoiceModel.InvoiceNumber; + txtOrderOutDate.SelectedDate=invoiceModel.OrderOutDate; + txtMaterialRequisitionUnit.Text=invoiceModel.MaterialRequisitionUnit; + } + + BindGrid(); + BindApproveData(); + if (Type=="0") + { + Grid1.Title = "入库单列表"; + PanelOrderIn.Hidden = false; + } + else if (Type=="1") + { + PanelOrderOut.Hidden = false; + Grid1.Title = "出库单列表"; + } + + if (invoiceModel.CreateUser== this.CurrUser.PersonId) //创建人 + { + TbCreate.Hidden = false; + if (invoiceModel.State> PhtglInvoiceService.StateCreate) + { + Form_approve.Hidden = false; + } + } + + if (PHTGL_ApproveService.IsApprovingMan(InvoiceId, this.CurrUser.PersonId)) //判断当前人是否审批人 + { + TbApprove.Hidden = false; + Form_approve.Hidden = false; + + } + } + } + + public void BindApproveData() + { + var approveModel = PHTGL_ApproveService.GetAllApproveData(InvoiceId, Type=="0"? "Invoice_Input" : "Invoice_Output"); + if (approveModel != null) + { + Grid2.DataSource = approveModel; + Grid2.DataBind(); + } + } + public void BindGrid() + { + var invoiceDetail = PhtglInvoicedetailService.GetPHTGL_InvoiceDetailByInvoiceId(InvoiceId); + Grid1.DataSource = invoiceDetail; + Grid1.DataBind(); + txtSumUnitPrice.Text= invoiceDetail.Sum(p=>p.UnitPrice).ToString(); + txtSumTax.Text=invoiceDetail.Sum(p=>p.Tax).ToString(); + txtSumAmount.Text=invoiceDetail.Sum(p=>p.Amount).ToString(); + txtAmountInWords.Text = Funs.NumericCapitalization(invoiceDetail.Sum(p => p.Amount)??0); + } + + + protected void Grid1_OnRowCommand(object sender, GridCommandEventArgs e) + { + if (e.CommandName=="delete") + { + PhtglInvoicedetailService.DeletePHTGL_InvoiceDetailById(e.RowID); + BindGrid(); + } + } + + protected void Grid1_RowDataBound(object sender, GridRowEventArgs e) + { + if (Type=="1") + { + Grid1.FindColumn("btnDelete").Hidden = true; + } + } + + protected string GetTaxRate(object eval) + { + string result=""; + if (eval!=null) + { + decimal taxRate = Convert.ToDecimal(eval); + string percentage = string.Format("{0:P0}", taxRate); + result= percentage.Replace("%", ""); + } + return result; + } + + protected string GetNoTaxPrice(object amount, object tax) + { + //获取amount-tax 的值 + string result=""; + if (amount != null && tax != null) + { + decimal amountValue = Convert.ToDecimal(amount); + decimal taxValue = Convert.ToDecimal(tax); + decimal noTaxPrice = amountValue - taxValue; + result= noTaxPrice.ToString(); + } + return result; + } + + protected void btnSave_Click(object sender, EventArgs e) + { + var invoiceModel = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); + invoiceModel.OrderInDate=txtOrderInDate.SelectedDate; + invoiceModel.OrderOutDate=txtOrderOutDate.SelectedDate; + invoiceModel.OrderCode=txtOrderCode.Text; + invoiceModel.MaterialRequisitionUnit=txtMaterialRequisitionUnit.Text; + BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(invoiceModel); + ShowNotify("保存成功!" ,MessageBoxIcon.Success); + } + + protected void btnEditProcess_Click(object sender, EventArgs e) + { + if (Type == "0") + { + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "0", "编辑 - "))); + } + else if (Type == "1") + { + + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceOrderReviewEdit.aspx?InvoiceId={0}&&Type={1}", InvoiceId, "1", "编辑 - "))); + } + } + + protected void btnAgree_Click(object sender, EventArgs e) + { + PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type),this.CurrUser.PersonId,true, txtApproveIdea.Text); + ShowNotify("审批成功!", MessageBoxIcon.Success); + if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) + { + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + PageContext.RegisterStartupScript("closeActiveTab();"); + + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + + } + + } + + protected void btnDisgree_Click(object sender, EventArgs e) + { + PhtglInvoiceService.Approve(InvoiceId, int.Parse(Type), this.CurrUser.PersonId, false, txtApproveIdea.Text); + ShowNotify("审批成功!", MessageBoxIcon.Success); + if (!string.IsNullOrEmpty(Request.Params["PHTUrl"])) + { + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + PageContext.RegisterStartupScript("closeActiveTab();"); + + } + else + { + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + + } + + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs new file mode 100644 index 00000000..13c8cd0b --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderDetail.aspx.designer.cs @@ -0,0 +1,323 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceOrderDetail + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// TbCreate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar TbCreate; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnEditProcess 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEditProcess; + + /// + /// TbApprove 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar TbApprove; + + /// + /// btnAgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAgree; + + /// + /// btnDisgree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDisgree; + + /// + /// Panel4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel4; + + /// + /// txtProjectName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectName; + + /// + /// txtContractNum 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtContractNum; + + /// + /// txtSellerName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSellerName; + + /// + /// PanelOrderIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel PanelOrderIn; + + /// + /// txtOrderInDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtOrderInDate; + + /// + /// txtInvoiceDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceDate; + + /// + /// txtOrderCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtOrderCode; + + /// + /// PanelOrderOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel PanelOrderOut; + + /// + /// txtOrderOutDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtOrderOutDate; + + /// + /// txtMaterialRequisitionUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMaterialRequisitionUnit; + + /// + /// txtInvoiceNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceNumber; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// txtSumUnitPrice 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSumUnitPrice; + + /// + /// txtSumTax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSumTax; + + /// + /// txtSumAmount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSumAmount; + + /// + /// txtAmountInWords 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAmountInWords; + + /// + /// Form_approve 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form_approve; + + /// + /// txtApproveIdea 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtApproveIdea; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx new file mode 100644 index 00000000..cdbbb019 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx @@ -0,0 +1,107 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceOrderReviewEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceOrderReviewEdit" %> + + + + + + + + 编辑合同基本信息 + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs new file mode 100644 index 00000000..05187dc3 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.cs @@ -0,0 +1,161 @@ +using BLL; +using Model; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceOrderReviewEdit : PageBase + { + public string InvoiceId + { + get + { + return (string)ViewState["InvoiceId"]; + } + set + { + ViewState["InvoiceId"] = value; + } + } + public string Type + { + get + { + return (string)ViewState["Type"]; + } + set + { + ViewState["Type"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + InvoiceId = Request.QueryString["InvoiceId"]; + Type = Request.QueryString["Type"]; + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + var model= PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); + int[] arr = new Int32[] { PhtglInvoiceService.StateCreate, PhtglInvoiceService.StateInPutApproveRefuse, PhtglInvoiceService.StateInPutApproveSuccess, PhtglInvoiceService.StateOutPutApproveRefuse, }; + if (arr.ToList().Contains(model.State.Value)) + { + if (model.State== PhtglInvoiceService.StateInPutApproveRefuse|| model.State == PhtglInvoiceService.StateOutPutApproveRefuse) + { + btnSubmit.Text="重新发起流程"; + } + btnSubmit.Hidden = false; + } + if (Type=="0") + { + Panel_OrderIn.Hidden = false; + + } + else if (Type == "1") + { + Panel_OrderOut.Hidden = false; + } + //入库下拉框 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProfessionalEngineer, null, Const.UnitId_SEDIN, null, true);//专业工程师 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConstructionManager, null, Const.UnitId_SEDIN, null, true);//施工经理 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_In, null, Const.UnitId_SEDIN, null, true);//控制经理 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_In, null, Const.UnitId_SEDIN, null, true);//项目经理 + //出库下拉框 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropPurchasingMan, null, Const.UnitId_SEDIN, null, true);//采购员 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropControlManager_Out, null, Const.UnitId_SEDIN, null, true);//控制经理 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropProjectManager_Out, null, Const.UnitId_SEDIN, null, true);//项目经理 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitMaterialOfficer, null, Const.UnitId_SEDIN, null, true);//施工单位材料经理 + BLL.Person_PersonsService.InitUserProjectIdUnitIdRoleIdDropDownList(DropConUnitProjectManager, null, Const.UnitId_SEDIN, null, true);//施工单位项目经理 + + var invoiceApproveManEntity= PhtglInvoiceService.GetInvoiceApproveManEntity(InvoiceId); + //入库下拉框初始化值 + DropProfessionalEngineer.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager; + DropConstructionManager.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ConstructionManager; + DropControlManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ControlManager; + DropProjectManager_In.SelectedValue= invoiceApproveManEntity.InputApproveMan?.ProjectManager; + //出库下拉框初始化值 + DropPurchasingMan.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.PurchasingMan; + DropControlManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ControlManager; + DropProjectManager_Out.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ProjectManager; + DropConUnitMaterialOfficer.SelectedValue = invoiceApproveManEntity.OutputApproveMan?.ConUnitMaterialOfficer; + DropConUnitProjectManager.SelectedValue= invoiceApproveManEntity.OutputApproveMan?.ConUnitProjectManager; + + + } + } + private bool DropIsNull(Control c) + { + bool IsOk = true; + //遍历控件 + //myDictionary.Clear(); + foreach (Control childControl in c.Controls) + { + if (childControl is DropDownList) + { + DropDownList tb = (DropDownList)childControl; + if (tb.SelectedValue == Const._Null) + { + IsOk = false; + ShowNotify("请选择要审批的" + tb.Label, MessageBoxIcon.Warning); + return IsOk; + } + } + + } + return IsOk; + + } + protected void Save() + { + if (!DropIsNull(SimpleForm1)) + { + return; + } + var model_In = new Inputapproveman() + { + ProfessionalEngineer= DropProfessionalEngineer.SelectedValue, + ConstructionManager= DropConstructionManager.SelectedValue, + ControlManager= DropControlManager_In.SelectedValue, + ProjectManager= DropProjectManager_In.SelectedValue + }; + var model_Out = new Outputapproveman() + { + PurchasingMan = DropPurchasingMan.SelectedValue, + ControlManager = DropControlManager_Out.SelectedValue, + ProjectManager = DropProjectManager_Out.SelectedValue, + ConUnitMaterialOfficer = DropConUnitMaterialOfficer.SelectedValue, + ConUnitProjectManager = DropConUnitProjectManager.SelectedValue + }; + if (Type == "0") + { + PhtglInvoiceService.SaveInputApproveManEntity(InvoiceId, model_In); + + } + else if (Type == "1") + { + PhtglInvoiceService.SaveOutputApproveManEntity(InvoiceId, model_Out); + } + + + } + + protected void btnSubmit_Click(object sender, EventArgs e) + { + Save(); + PhtglInvoiceService.StartApprovalProcess(InvoiceId); + + ShowNotify("提交成功!",MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideReference()); + } + + protected void btnSave_Click(object sender, EventArgs e) + { + Save(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs new file mode 100644 index 00000000..b6f28b78 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceOrderReviewEdit.aspx.designer.cs @@ -0,0 +1,215 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceOrderReviewEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Panel_OrderIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel Panel_OrderIn; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// DropProfessionalEngineer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropProfessionalEngineer; + + /// + /// DropConstructionManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropConstructionManager; + + /// + /// DropControlManager_In 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropControlManager_In; + + /// + /// DropProjectManager_In 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropProjectManager_In; + + /// + /// Panel_OrderOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel Panel_OrderOut; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// DropPurchasingMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropPurchasingMan; + + /// + /// DropControlManager_Out 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropControlManager_Out; + + /// + /// DropProjectManager_Out 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropProjectManager_Out; + + /// + /// DropConUnitMaterialOfficer 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropConUnitMaterialOfficer; + + /// + /// DropConUnitProjectManager 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropConUnitProjectManager; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSubmit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSubmit; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx new file mode 100644 index 00000000..3792aad3 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx @@ -0,0 +1,154 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBook.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBook" %> + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs new file mode 100644 index 00000000..d263b701 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.cs @@ -0,0 +1,277 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceStandingBook :PageBase + { + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.GetButtonPower(); + this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); + // 绑定表格 + this.BindGrid(); + } + } + + #region 绑定数据 + /// + /// 绑定数据 + /// + private void BindGrid() + { + Model.PHTGL_Invoice table = new Model.PHTGL_Invoice(); + table.ProjectId=this.CurrUser.LoginProjectId; + table.State = PhtglInvoiceService.StateDataIn; + var tb = BLL.PhtglInvoiceService.GetListData(table, Grid1); + Grid1.RecordCount = PhtglInvoiceService.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + Grid1.DataSource = tb; + Grid1.DataBind(); + } + #endregion + + #region GV 数据操作 + /// + /// 过滤表头 + /// + /// + /// + //protected void Grid1_FilterChange(object sender, EventArgs e) + //{ + // this.BindGrid(); + //} + + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + this.Grid1.PageIndex = e.NewPageIndex; + this.BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + this.Grid1.SortDirection = e.SortDirection; + this.Grid1.SortField = e.SortField; + this.BindGrid(); + } + + /// + /// 分页显示条数下拉框 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + this.BindGrid(); + } + #endregion + + #region 数据编辑事件 + /// + /// 新增 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", string.Empty, "增加 - "))); + } + + /// + /// 编辑按钮 + /// + /// + /// + protected void btnEdit_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID); + if (model != null) ///已上报时不能删除 + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("InvoiceStandingBookEdit.aspx?InvoiceId={0}", ID, "编辑 - "))); + } + } + + /// + /// Grid行双击事件 + /// + /// + /// + protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) + { + this.btnEdit_Click(null, null); + } + + /// + /// 批量删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(rowID); + if (model != null) + { + BLL.PhtglInvoiceService.DeletePHTGL_InvoiceById(rowID); + } + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + #endregion + + #region 关闭弹出窗 + /// + /// 关闭弹出窗 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 获取权限按钮 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PHTGL_InvoiceStandingBookMenuId); + if (buttonList.Count > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + // this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnMenuDelete.Hidden = false; + this.btnDelete.Hidden = false; + } + } + } + #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 = System.Text.Encoding.UTF8; + this.Grid1.PageSize = 500; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + + /// + /// 导出方法 + /// + /// + /// + private string GetGridTableHtml(Grid grid) + { + StringBuilder sb = new StringBuilder(); + sb.Append(""); + sb.Append(""); + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + sb.AppendFormat("", column.HeaderText); + } + sb.Append(""); + foreach (GridRow row in grid.Rows) + { + sb.Append(""); + foreach (GridColumn column in grid.Columns) + { + string html = row.Values[column.ColumnIndex].ToString(); + if (column.ColumnID == "tfNumber") + { + html = (row.FindControl("lblNumber") as System.Web.UI.WebControls.Label).Text; + } + sb.AppendFormat("", html); + } + + sb.Append(""); + } + + sb.Append("
{0}
{0}
"); + + return sb.ToString(); + } + #endregion + + protected void btnImport_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript( + Window1.GetShowReference(string.Format("InvoiceDataIn.aspx?", "导入 - "))); + } + + protected void btnOrderIn_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string ID = Grid1.SelectedRowID; + var model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(ID); + if (model != null && !string.IsNullOrEmpty(model.ContractId)) + { + PhtglInvoiceService.ChangeStateToCreate(model.InvoiceId); + ShowNotify("操作成功!", MessageBoxIcon.Success); + } + else + { + ShowNotify("请先关联合同!", MessageBoxIcon.Question); + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs new file mode 100644 index 00000000..d7484921 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBook.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceStandingBook + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// btnEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnEdit; + + /// + /// btnOrderIn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOrderIn; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx new file mode 100644 index 00000000..88a62baf --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx @@ -0,0 +1,87 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoiceStandingBookEdit.aspx.cs" Inherits="FineUIPro.Web.PHTGL.InvoiceManage.InvoiceStandingBookEdit" %> + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs new file mode 100644 index 00000000..da04f886 --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.cs @@ -0,0 +1,88 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + public partial class InvoiceStandingBookEdit : PageBase + { + #region + /// + /// 主键 + /// + public string InvoiceId + { + get + { + return (string)ViewState["InvoiceId"]; + } + set + { + ViewState["InvoiceId"] = value; + } + } + #endregion + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); + + this.InvoiceId = Request.Params["InvoiceId"]; + + this.DropContractCode.DataTextField = "ContractNum"; + this.DropContractCode.DataValueField = "ContractId"; + this.DropContractCode.DataSource = BLL.PHTGL_ContractReviewService.GetContractReview_CompleteData(this.CurrUser.LoginProjectId); + this.DropContractCode.DataBind(); + if (!string.IsNullOrEmpty(this.InvoiceId)) + { + Model.PHTGL_Invoice model = BLL.PhtglInvoiceService.GetPHTGL_InvoiceById(this.InvoiceId); + if (model != null) + { + + this.txtInvoiceCode.Text = model.InvoiceCode; + this.txtInvoiceNumber.Text = model.InvoiceNumber; + this.txtSellerName.Text = model.SellerName; + this.txtInvoiceDate.Text = model.InvoiceDate; + this.txtAmountExcludingTax.Text = model.AmountExcludingTax.ToString(); + this.txtTotalTax.Text = model.TotalTax.ToString(); + this.txtRemark.Text = model.Remark; + this.txtImagePath.Text = model.ImagePath; + this.txtSellerTaxNumber.Text = model.SellerTaxNumber; + this.txtInvoiceAmount.Text = model.InvoiceAmount.ToString(); + DropContractCode.SelectedValue = model.ContractId; + + } + } + } + } + + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + + if (string.IsNullOrEmpty(this.InvoiceId)) + { + ShowNotify("暂不支持新增",MessageBoxIcon.Warning); + + } + else + { + var model = PhtglInvoiceService.GetPHTGL_InvoiceById(InvoiceId); + model.ContractId= DropContractCode.SelectedValue; + BLL.PhtglInvoiceService.UpdatePHTGL_Invoice(model); + } + PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); + } + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs new file mode 100644 index 00000000..194b45cc --- /dev/null +++ b/SGGL/FineUIPro.Web/PHTGL/InvoiceManage/InvoiceStandingBookEdit.aspx.designer.cs @@ -0,0 +1,179 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.PHTGL.InvoiceManage +{ + + + public partial class InvoiceStandingBookEdit + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// DropContractCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList DropContractCode; + + /// + /// txtInvoiceCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceCode; + + /// + /// txtInvoiceNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceNumber; + + /// + /// txtSellerName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSellerName; + + /// + /// txtInvoiceDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceDate; + + /// + /// txtAmountExcludingTax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtAmountExcludingTax; + + /// + /// txtTotalTax 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTotalTax; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + + /// + /// txtImagePath 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtImagePath; + + /// + /// txtSellerTaxNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtSellerTaxNumber; + + /// + /// txtInvoiceAmount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtInvoiceAmount; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnClose 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnClose; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs index bd486a7c..883e3665 100644 --- a/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/Person/ProjectPerson.aspx.cs @@ -1,5 +1,4 @@ using BLL; -using Microsoft.Office.Core; using System; using System.Linq; diff --git a/SGGL/FineUIPro.Web/common/Menu_DigData.xml b/SGGL/FineUIPro.Web/common/Menu_DigData.xml index b532a9bb..bb7a7a34 100644 --- a/SGGL/FineUIPro.Web/common/Menu_DigData.xml +++ b/SGGL/FineUIPro.Web/common/Menu_DigData.xml @@ -1,9 +1,51 @@  - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -16,12 +58,15 @@ + + + - - - - - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml index b428bd9e..89357168 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HJGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HJGL.xml @@ -14,7 +14,7 @@ - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml index 95eeab91..129ab5fd 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HTGL.xml @@ -1,8 +1,8 @@  - - - + + + diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index 8d4aa005..fd6a0762 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -1,7 +1,11 @@  - + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml index e9a16e96..5fcd6c9d 100644 --- a/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_PHTGL.xml @@ -4,10 +4,10 @@ - + @@ -37,4 +37,7 @@ + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index ac07e539..2e2dc1ed 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -48,49 +48,7 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 738f10eb..b7167cbe 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1142,6 +1142,12 @@ namespace Model partial void InsertPHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance); partial void UpdatePHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance); partial void DeletePHTGL_ContractTrackProgress(PHTGL_ContractTrackProgress instance); + partial void InsertPHTGL_Invoice(PHTGL_Invoice instance); + partial void UpdatePHTGL_Invoice(PHTGL_Invoice instance); + partial void DeletePHTGL_Invoice(PHTGL_Invoice instance); + partial void InsertPHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance); + partial void UpdatePHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance); + partial void DeletePHTGL_InvoiceDetail(PHTGL_InvoiceDetail instance); partial void InsertPHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance); partial void UpdatePHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance); partial void DeletePHTGL_MainProjectQuantity(PHTGL_MainProjectQuantity instance); @@ -4791,6 +4797,22 @@ namespace Model } } + public System.Data.Linq.Table PHTGL_Invoice + { + get + { + return this.GetTable(); + } + } + + public System.Data.Linq.Table PHTGL_InvoiceDetail + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table PHTGL_MainProjectQuantity { get @@ -11801,7 +11823,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(2000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveIdea", DbType="NVarChar(200)")] public string ApproveIdea { get @@ -151489,7 +151511,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(3000)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AttentPerson", DbType="NVarChar(500)")] public string AttentPerson { get @@ -182448,7 +182470,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectDescription", DbType="VarChar(255)")] public string ProjectDescription { get @@ -182568,7 +182590,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(MAX)", UpdateCheck=UpdateCheck.Never)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CalculationRule", DbType="VarChar(255)")] public string CalculationRule { get @@ -182628,7 +182650,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(100)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConstructionSubcontractor", DbType="VarChar(50)")] public string ConstructionSubcontractor { get @@ -183012,7 +183034,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,3)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_WorkPackageEstimate", DbType="Decimal(18,2)")] public System.Nullable WorkPackageEstimate { get @@ -183307,6 +183329,826 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.PHTGL_Invoice")] + public partial class PHTGL_Invoice : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InvoiceId; + + private string _ProjectId; + + private System.Nullable _State; + + private string _InvoiceCode; + + private string _InvoiceNumber; + + private string _SellerName; + + private string _InvoiceDate; + + private System.Nullable _AmountExcludingTax; + + private System.Nullable _TotalTax; + + private string _Remark; + + private string _ImagePath; + + private string _SellerTaxNumber; + + private System.Nullable _InvoiceAmount; + + private string _ApproveManJson; + + private System.Nullable _CreateDate; + + private string _CreateUser; + + private string _ContractId; + + private System.Nullable _OrderInDate; + + private string _OrderCode; + + private System.Nullable _OrderOutDate; + + private string _MaterialRequisitionUnit; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInvoiceIdChanging(string value); + partial void OnInvoiceIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnStateChanging(System.Nullable value); + partial void OnStateChanged(); + partial void OnInvoiceCodeChanging(string value); + partial void OnInvoiceCodeChanged(); + partial void OnInvoiceNumberChanging(string value); + partial void OnInvoiceNumberChanged(); + partial void OnSellerNameChanging(string value); + partial void OnSellerNameChanged(); + partial void OnInvoiceDateChanging(string value); + partial void OnInvoiceDateChanged(); + partial void OnAmountExcludingTaxChanging(System.Nullable value); + partial void OnAmountExcludingTaxChanged(); + partial void OnTotalTaxChanging(System.Nullable value); + partial void OnTotalTaxChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnImagePathChanging(string value); + partial void OnImagePathChanged(); + partial void OnSellerTaxNumberChanging(string value); + partial void OnSellerTaxNumberChanged(); + partial void OnInvoiceAmountChanging(System.Nullable value); + partial void OnInvoiceAmountChanged(); + partial void OnApproveManJsonChanging(string value); + partial void OnApproveManJsonChanged(); + partial void OnCreateDateChanging(System.Nullable value); + partial void OnCreateDateChanged(); + partial void OnCreateUserChanging(string value); + partial void OnCreateUserChanged(); + partial void OnContractIdChanging(string value); + partial void OnContractIdChanged(); + partial void OnOrderInDateChanging(System.Nullable value); + partial void OnOrderInDateChanged(); + partial void OnOrderCodeChanging(string value); + partial void OnOrderCodeChanged(); + partial void OnOrderOutDateChanging(System.Nullable value); + partial void OnOrderOutDateChanged(); + partial void OnMaterialRequisitionUnitChanging(string value); + partial void OnMaterialRequisitionUnitChanged(); + #endregion + + public PHTGL_Invoice() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InvoiceId + { + get + { + return this._InvoiceId; + } + set + { + if ((this._InvoiceId != value)) + { + this.OnInvoiceIdChanging(value); + this.SendPropertyChanging(); + this._InvoiceId = value; + this.SendPropertyChanged("InvoiceId"); + this.OnInvoiceIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="Int")] + public System.Nullable State + { + get + { + return this._State; + } + set + { + if ((this._State != value)) + { + this.OnStateChanging(value); + this.SendPropertyChanging(); + this._State = value; + this.SendPropertyChanged("State"); + this.OnStateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceCode", DbType="NVarChar(50)")] + public string InvoiceCode + { + get + { + return this._InvoiceCode; + } + set + { + if ((this._InvoiceCode != value)) + { + this.OnInvoiceCodeChanging(value); + this.SendPropertyChanging(); + this._InvoiceCode = value; + this.SendPropertyChanged("InvoiceCode"); + this.OnInvoiceCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceNumber", DbType="NVarChar(50)")] + public string InvoiceNumber + { + get + { + return this._InvoiceNumber; + } + set + { + if ((this._InvoiceNumber != value)) + { + this.OnInvoiceNumberChanging(value); + this.SendPropertyChanging(); + this._InvoiceNumber = value; + this.SendPropertyChanged("InvoiceNumber"); + this.OnInvoiceNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SellerName", DbType="NVarChar(100)")] + public string SellerName + { + get + { + return this._SellerName; + } + set + { + if ((this._SellerName != value)) + { + this.OnSellerNameChanging(value); + this.SendPropertyChanging(); + this._SellerName = value; + this.SendPropertyChanged("SellerName"); + this.OnSellerNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceDate", DbType="NVarChar(50)")] + public string InvoiceDate + { + get + { + return this._InvoiceDate; + } + set + { + if ((this._InvoiceDate != value)) + { + this.OnInvoiceDateChanging(value); + this.SendPropertyChanging(); + this._InvoiceDate = value; + this.SendPropertyChanged("InvoiceDate"); + this.OnInvoiceDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_AmountExcludingTax", DbType="Decimal(18,2)")] + public System.Nullable AmountExcludingTax + { + get + { + return this._AmountExcludingTax; + } + set + { + if ((this._AmountExcludingTax != value)) + { + this.OnAmountExcludingTaxChanging(value); + this.SendPropertyChanging(); + this._AmountExcludingTax = value; + this.SendPropertyChanged("AmountExcludingTax"); + this.OnAmountExcludingTaxChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalTax", DbType="Decimal(18,2)")] + public System.Nullable TotalTax + { + get + { + return this._TotalTax; + } + set + { + if ((this._TotalTax != value)) + { + this.OnTotalTaxChanging(value); + this.SendPropertyChanging(); + this._TotalTax = value; + this.SendPropertyChanged("TotalTax"); + this.OnTotalTaxChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(500)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ImagePath", DbType="NVarChar(500)")] + public string ImagePath + { + get + { + return this._ImagePath; + } + set + { + if ((this._ImagePath != value)) + { + this.OnImagePathChanging(value); + this.SendPropertyChanging(); + this._ImagePath = value; + this.SendPropertyChanged("ImagePath"); + this.OnImagePathChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SellerTaxNumber", DbType="NVarChar(50)")] + public string SellerTaxNumber + { + get + { + return this._SellerTaxNumber; + } + set + { + if ((this._SellerTaxNumber != value)) + { + this.OnSellerTaxNumberChanging(value); + this.SendPropertyChanging(); + this._SellerTaxNumber = value; + this.SendPropertyChanged("SellerTaxNumber"); + this.OnSellerTaxNumberChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceAmount", DbType="Decimal(18,2)")] + public System.Nullable InvoiceAmount + { + get + { + return this._InvoiceAmount; + } + set + { + if ((this._InvoiceAmount != value)) + { + this.OnInvoiceAmountChanging(value); + this.SendPropertyChanging(); + this._InvoiceAmount = value; + this.SendPropertyChanged("InvoiceAmount"); + this.OnInvoiceAmountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ApproveManJson", DbType="NVarChar(2000)")] + public string ApproveManJson + { + get + { + return this._ApproveManJson; + } + set + { + if ((this._ApproveManJson != value)) + { + this.OnApproveManJsonChanging(value); + this.SendPropertyChanging(); + this._ApproveManJson = value; + this.SendPropertyChanged("ApproveManJson"); + this.OnApproveManJsonChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateDate", DbType="DateTime")] + public System.Nullable CreateDate + { + get + { + return this._CreateDate; + } + set + { + if ((this._CreateDate != value)) + { + this.OnCreateDateChanging(value); + this.SendPropertyChanging(); + this._CreateDate = value; + this.SendPropertyChanged("CreateDate"); + this.OnCreateDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CreateUser", DbType="NVarChar(50)")] + public string CreateUser + { + get + { + return this._CreateUser; + } + set + { + if ((this._CreateUser != value)) + { + this.OnCreateUserChanging(value); + this.SendPropertyChanging(); + this._CreateUser = value; + this.SendPropertyChanged("CreateUser"); + this.OnCreateUserChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractId", DbType="NVarChar(50)")] + public string ContractId + { + get + { + return this._ContractId; + } + set + { + if ((this._ContractId != value)) + { + this.OnContractIdChanging(value); + this.SendPropertyChanging(); + this._ContractId = value; + this.SendPropertyChanged("ContractId"); + this.OnContractIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderInDate", DbType="Date")] + public System.Nullable OrderInDate + { + get + { + return this._OrderInDate; + } + set + { + if ((this._OrderInDate != value)) + { + this.OnOrderInDateChanging(value); + this.SendPropertyChanging(); + this._OrderInDate = value; + this.SendPropertyChanged("OrderInDate"); + this.OnOrderInDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderCode", DbType="NVarChar(50)")] + public string OrderCode + { + get + { + return this._OrderCode; + } + set + { + if ((this._OrderCode != value)) + { + this.OnOrderCodeChanging(value); + this.SendPropertyChanging(); + this._OrderCode = value; + this.SendPropertyChanged("OrderCode"); + this.OnOrderCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_OrderOutDate", DbType="Date")] + public System.Nullable OrderOutDate + { + get + { + return this._OrderOutDate; + } + set + { + if ((this._OrderOutDate != value)) + { + this.OnOrderOutDateChanging(value); + this.SendPropertyChanging(); + this._OrderOutDate = value; + this.SendPropertyChanged("OrderOutDate"); + this.OnOrderOutDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MaterialRequisitionUnit", DbType="NVarChar(100)")] + public string MaterialRequisitionUnit + { + get + { + return this._MaterialRequisitionUnit; + } + set + { + if ((this._MaterialRequisitionUnit != value)) + { + this.OnMaterialRequisitionUnitChanging(value); + this.SendPropertyChanging(); + this._MaterialRequisitionUnit = value; + this.SendPropertyChanged("MaterialRequisitionUnit"); + this.OnMaterialRequisitionUnitChanged(); + } + } + } + + 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.PHTGL_InvoiceDetail")] + public partial class PHTGL_InvoiceDetail : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _InvoiceDetailId; + + private string _InvoiceId; + + private string _GoodsOrServicesName; + + private string _SpecificationModel; + + private string _Unit; + + private System.Nullable _Quantity; + + private System.Nullable _UnitPrice; + + private System.Nullable _Amount; + + private string _TaxRate; + + private System.Nullable _Tax; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnInvoiceDetailIdChanging(string value); + partial void OnInvoiceDetailIdChanged(); + partial void OnInvoiceIdChanging(string value); + partial void OnInvoiceIdChanged(); + partial void OnGoodsOrServicesNameChanging(string value); + partial void OnGoodsOrServicesNameChanged(); + partial void OnSpecificationModelChanging(string value); + partial void OnSpecificationModelChanged(); + partial void OnUnitChanging(string value); + partial void OnUnitChanged(); + partial void OnQuantityChanging(System.Nullable value); + partial void OnQuantityChanged(); + partial void OnUnitPriceChanging(System.Nullable value); + partial void OnUnitPriceChanged(); + partial void OnAmountChanging(System.Nullable value); + partial void OnAmountChanged(); + partial void OnTaxRateChanging(string value); + partial void OnTaxRateChanged(); + partial void OnTaxChanging(System.Nullable value); + partial void OnTaxChanged(); + #endregion + + public PHTGL_InvoiceDetail() + { + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceDetailId", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string InvoiceDetailId + { + get + { + return this._InvoiceDetailId; + } + set + { + if ((this._InvoiceDetailId != value)) + { + this.OnInvoiceDetailIdChanging(value); + this.SendPropertyChanging(); + this._InvoiceDetailId = value; + this.SendPropertyChanged("InvoiceDetailId"); + this.OnInvoiceDetailIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_InvoiceId", DbType="NVarChar(50)")] + public string InvoiceId + { + get + { + return this._InvoiceId; + } + set + { + if ((this._InvoiceId != value)) + { + this.OnInvoiceIdChanging(value); + this.SendPropertyChanging(); + this._InvoiceId = value; + this.SendPropertyChanged("InvoiceId"); + this.OnInvoiceIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_GoodsOrServicesName", DbType="NVarChar(100)")] + public string GoodsOrServicesName + { + get + { + return this._GoodsOrServicesName; + } + set + { + if ((this._GoodsOrServicesName != value)) + { + this.OnGoodsOrServicesNameChanging(value); + this.SendPropertyChanging(); + this._GoodsOrServicesName = value; + this.SendPropertyChanged("GoodsOrServicesName"); + this.OnGoodsOrServicesNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_SpecificationModel", DbType="NVarChar(100)")] + public string SpecificationModel + { + get + { + return this._SpecificationModel; + } + set + { + if ((this._SpecificationModel != value)) + { + this.OnSpecificationModelChanging(value); + this.SendPropertyChanging(); + this._SpecificationModel = value; + this.SendPropertyChanged("SpecificationModel"); + this.OnSpecificationModelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Unit", DbType="NVarChar(50)")] + public string Unit + { + get + { + return this._Unit; + } + set + { + if ((this._Unit != value)) + { + this.OnUnitChanging(value); + this.SendPropertyChanging(); + this._Unit = value; + this.SendPropertyChanged("Unit"); + this.OnUnitChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Quantity", DbType="Decimal(18,2)")] + public System.Nullable Quantity + { + get + { + return this._Quantity; + } + set + { + if ((this._Quantity != value)) + { + this.OnQuantityChanging(value); + this.SendPropertyChanging(); + this._Quantity = value; + this.SendPropertyChanged("Quantity"); + this.OnQuantityChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitPrice", DbType="Decimal(18,2)")] + public System.Nullable UnitPrice + { + get + { + return this._UnitPrice; + } + set + { + if ((this._UnitPrice != value)) + { + this.OnUnitPriceChanging(value); + this.SendPropertyChanging(); + this._UnitPrice = value; + this.SendPropertyChanged("UnitPrice"); + this.OnUnitPriceChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Amount", DbType="Decimal(18,2)")] + public System.Nullable Amount + { + get + { + return this._Amount; + } + set + { + if ((this._Amount != value)) + { + this.OnAmountChanging(value); + this.SendPropertyChanging(); + this._Amount = value; + this.SendPropertyChanged("Amount"); + this.OnAmountChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TaxRate", DbType="NVarChar(50)")] + public string TaxRate + { + get + { + return this._TaxRate; + } + set + { + if ((this._TaxRate != value)) + { + this.OnTaxRateChanging(value); + this.SendPropertyChanging(); + this._TaxRate = value; + this.SendPropertyChanged("TaxRate"); + this.OnTaxRateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Tax", DbType="Decimal(18,2)")] + public System.Nullable Tax + { + get + { + return this._Tax; + } + set + { + if ((this._Tax != value)) + { + this.OnTaxChanging(value); + this.SendPropertyChanging(); + this._Tax = value; + this.SendPropertyChanged("Tax"); + this.OnTaxChanged(); + } + } + } + + 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.PHTGL_MainProjectQuantity")] public partial class PHTGL_MainProjectQuantity : INotifyPropertyChanging, INotifyPropertyChanged { @@ -295160,7 +296002,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")] public string Name { get @@ -295737,7 +296579,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -295928,7 +296770,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -301215,7 +302057,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -302687,7 +303529,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(200)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PackageContent", DbType="NVarChar(50)")] public string PackageContent { get @@ -312238,7 +313080,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ContractNo", DbType="NVarChar(500)")] public string ContractNo { get @@ -312258,7 +313100,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(1500)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorks", DbType="NVarChar(500)")] public string UnitWorks { get diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index d2e43c95..81b1185d 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -45,12 +45,16 @@ ..\packages\EmitMapper.1.0.0\lib\EmitMapper.dll + + ..\packages\MiniExcel.1.31.3\lib\net45\MiniExcel.dll + ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll + @@ -205,6 +209,11 @@ + + + + + @@ -218,6 +227,9 @@ + + +