diff --git a/TSHotelManagerSystem.sln b/EOM.Client.TopSkyHotelManagerSystem.sln similarity index 81% rename from TSHotelManagerSystem.sln rename to EOM.Client.TopSkyHotelManagerSystem.sln index 127d7f7d7f89110c8deb6b591c5538d59711c344..b84723af9dfc3e9fac7f3aa3667587134b6b8381 100644 --- a/TSHotelManagerSystem.sln +++ b/EOM.Client.TopSkyHotelManagerSystem.sln @@ -1,14 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio Version 16 -VisualStudioVersion = 16.0.31205.134 +# Visual Studio Version 17 +VisualStudioVersion = 17.4.33213.308 MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.FormUI", "SYS.FormUI\SYS.FormUI.csproj", "{8854DCB7-F2D7-4276-8D10-C7A124436145}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Core", "SYS.Core\SYS.Core.csproj", "{CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Application", "SYS.Application\SYS.Application.csproj", "{600F4CC8-4323-4237-A55C-BFEF4B67D57C}" -EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Library", "SYS.Library\SYS.Library.csproj", "{BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}" EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SYS.Common", "SYS.Common\SYS.Common.csproj", "{65501AF6-C629-448A-847E-1BCD60665865}" @@ -27,10 +25,6 @@ Global {CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Debug|Any CPU.Build.0 = Debug|Any CPU {CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Release|Any CPU.ActiveCfg = Release|Any CPU {CD039D0F-BD50-4FBF-B9CD-CDFAB25C7DFA}.Release|Any CPU.Build.0 = Release|Any CPU - {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {600F4CC8-4323-4237-A55C-BFEF4B67D57C}.Release|Any CPU.Build.0 = Release|Any CPU {BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Debug|Any CPU.Build.0 = Debug|Any CPU {BCEA3E3C-E6D2-4210-95DD-42B461D5F22A}.Release|Any CPU.ActiveCfg = Release|Any CPU diff --git a/SYS.Application/.gitignore b/SYS.Application/.gitignore deleted file mode 100644 index 6d5679c87e25eb547ff425a90a1da36fffca93ea..0000000000000000000000000000000000000000 --- a/SYS.Application/.gitignore +++ /dev/null @@ -1,365 +0,0 @@ -.vs -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates -*.cache - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -packages/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd \ No newline at end of file diff --git a/SYS.Application/Business/Cash/CashService.cs b/SYS.Application/Business/Cash/CashService.cs deleted file mode 100644 index 4c689ea700b886b317132ba54116e4b465293037..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Cash/CashService.cs +++ /dev/null @@ -1,75 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 资产信息接口实现类 - /// - public class CashService:Repository, ICashService - { - /// - /// 添加资产信息 - /// - /// - /// - public bool AddCashInfo(Cash cash) - { - return base.Insert(cash); - } - - /// - /// 查询资产信息 - /// - /// - public List SelectCashInfoAll() - { - //查询所有部门信息 - List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); - //查询所有员工信息 - List workers = new List(); - workers = base.Change().GetList(a => a.delete_mk != 1); - List cs = new List(); - cs = base.GetList(a => a.delete_mk != 1); - cs.ForEach(source => - { - var dept = depts.FirstOrDefault(a => a.dept_no.Equals(source.CashClub)); - source.DeptName = dept == null ? "" : dept.dept_name; - var worker = workers.FirstOrDefault(a => a.WorkerId.Equals(source.CashPerson)); - source.PersonName = worker == null ? "" : worker.WorkerName; - - source.CashPriceStr = source.CashPrice == 0 ? "" : Decimal.Parse(source.CashPrice.ToString()).ToString("#,##0.00").ToString(); - - }); - return cs; - } - } -} diff --git a/SYS.Application/Business/Cash/ICashService.cs b/SYS.Application/Business/Cash/ICashService.cs deleted file mode 100644 index 8720e5e73b34a06eb2c5d6b9f192a54e4d6e3a87..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Cash/ICashService.cs +++ /dev/null @@ -1,47 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 资产信息接口 - /// - public interface ICashService - { - /// - /// 添加资产信息 - /// - /// - /// - bool AddCashInfo(Cash cash); - - /// - /// 查询资产信息 - /// - /// - List SelectCashInfoAll(); - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Customer/CustoService.cs b/SYS.Application/Business/Customer/CustoService.cs deleted file mode 100644 index dca18a426e8b2425b12df138a453ba028cc845f9..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Customer/CustoService.cs +++ /dev/null @@ -1,254 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using jvncorelib_fr.EncryptorLib; -using jvncorelib_fr.EntityLib; -using MySql.Data.MySqlClient; -using Npgsql; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 客户信息接口实现类 - /// - public class CustoService:Repository, ICustoService - { - EncryptLib encryptLib = new EncryptLib(); - - #region 添加客户信息 - /// - /// 添加客户信息 - /// - /// - /// - public bool InsertCustomerInfo(Custo custo) - { - string NewID = encryptLib.Encryption(custo.CustoID); - string NewTel = encryptLib.Encryption(custo.CustoTel); - custo.CustoID = NewID; - custo.CustoTel = NewTel; - return base.Insert(custo); - } - #endregion - - /// - /// 更新客户信息 - /// - /// - /// - public bool UpdCustomerInfoByCustoNo(Custo custo) - { - string NewID = encryptLib.Encryption(custo.CustoID); - string NewTel = encryptLib.Encryption(custo.CustoTel); - custo.CustoID = NewID; - custo.CustoTel = NewTel; - return base.Update(a => new Custo() - { - CustoName = custo.CustoName, - CustoSex = custo.CustoSex, - CustoType = custo.CustoType, - CustoBirth = custo.CustoBirth, - CustoAdress = custo.CustoAdress, - CustoID = custo.CustoID, - CustoTel = custo.CustoTel, - PassportType = custo.PassportType, - datachg_usr = custo.datachg_usr, - datachg_date = DateTime.Now - },a => a.CustoNo == custo.CustoNo); - } - - /// - /// 更新客户类型(即会员等级) - /// - /// - /// - /// - public bool UpdCustomerTypeByCustoNo(string custoNo,int userType) - { - return base.Update(a => new Custo() - { - CustoType = userType - }, a => a.CustoNo.Equals(custoNo)); - } - - /// - /// 查询酒店盈利情况 - /// - /// - public List SelectAllMoney() - { - List custoSpends = new List(); - var listSource = base.Change().GetList(a => a.MoneyState.Equals(SpendConsts.Settled)).OrderBy(a => a.SpendTime).ToList(); - var listDates = new List(); - listSource.ForEach(source => - { - var year = source.SpendTime.ToString("yyyy"); - if (!custoSpends.Select(a => a.Years).ToList().Contains(year)) - { - var startDate = new DateTime(source.SpendTime.Year, 1, 1, 0, 0, 0); - var endDate = new DateTime(source.SpendTime.Year, 12, 31, 23, 59, 59); - custoSpends.Add(new CustoSpend - { - Years = year, - Money = listSource.Where(a => a.SpendTime >= startDate && a.SpendTime <= endDate).Sum(a => a.SpendMoney) - }); - } - }); - - custoSpends = custoSpends.OrderBy(a => a.Years).ToList(); - return custoSpends; - } - - /// - /// 查询所有客户信息 - /// - /// - public List SelectCustoAll(ref int count,int? pageIndex,int? pageSize) - { - - //查询出所有性别类型 - List sexTypes = new List(); - sexTypes = base.Change().GetList(); - //查询出所有证件类型 - List passPortTypes = new List(); - passPortTypes = base.Change().GetList(); - //查询出所有客户类型 - List custoTypes = new List(); - custoTypes = base.Change().GetList(); - //查询出所有客户信息 - List custos = new List(); - - if (!pageIndex.IsNullOrEmpty() && !pageSize.IsNullOrEmpty()) - { - custos = base.AsQueryable().ToPageList((int)pageIndex, (int)pageSize, ref count).OrderBy(a => a.CustoNo).ToList(); - } - else - { - custos = base.AsQueryable().OrderBy(a => a.CustoNo).ToList(); - } - - custos.ForEach(source => - { - //解密身份证号码 - var sourceStr = source.CustoID.Contains("·") ? encryptLib.Decryption(source.CustoID) : source.CustoID; - source.CustoID = sourceStr; - //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel; - source.CustoTel = sourceTelStr; - //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); - source.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; - //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); - source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; - }); - return custos; - } - - /// - /// 查询指定客户信息 - /// - /// - public List SelectCustoByInfo(Custo custo) - { - //查询出所有性别类型 - List sexTypes = new List(); - sexTypes = base.Change().GetList(); - //查询出所有证件类型 - List passPortTypes = new List(); - passPortTypes = base.Change().GetList(); - //查询出所有客户类型 - List custoTypes = new List(); - custoTypes = base.Change().GetList(); - //查询出所有客户信息 - List custos = new List(); - if (!custo.CustoNo.IsNullOrEmpty()) - { - custos = base.GetList(a => a.CustoNo.Contains(custo.CustoNo)).OrderBy(a => a.CustoNo).ToList(); - } - if (!custo.CustoName.IsNullOrEmpty()) - { - custos = base.GetList(a => a.CustoName.Contains(custo.CustoName)).OrderBy(a => a.CustoNo).ToList(); - } - custos.ForEach(source => - { - //解密身份证号码 - var sourceStr = source.CustoID.Contains("·") ? encryptLib.Decryption(source.CustoID) : source.CustoID; - source.CustoID = sourceStr; - //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel; - source.CustoTel = sourceTelStr; - //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.CustoSex); - source.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //证件类型 - var passPortType = passPortTypes.FirstOrDefault(a => a.PassportId == source.PassportType); - source.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; - //客户类型 - var custoType = custoTypes.FirstOrDefault(a => a.UserType == source.CustoType); - source.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; - }); - return custos; - } - - /// - /// 根据客户编号查询客户信息 - /// - /// - /// - public Custo SelectCardInfoByCustoNo(string CustoNo) - { - Custo c = base.GetSingle(a => a.CustoNo.Contains(CustoNo)); - if (c.IsNullOrEmpty()) - { - return null; - } - //性别类型 - var sexType = base.Change().GetSingle(a => a.sexId == c.CustoSex); - c.SexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //证件类型 - var passPortType = base.Change().GetSingle(a => a.PassportId == c.PassportType); - c.PassportName = string.IsNullOrEmpty(passPortType.PassportName) ? "" : passPortType.PassportName; - //客户类型 - var custoType = base.Change().GetSingle(a => a.UserType == c.CustoType); - c.typeName = string.IsNullOrEmpty(custoType.TypeName) ? "" : custoType.TypeName; - //解密身份证号码 - var sourceStr = c.CustoID.Contains("·") ? encryptLib.Decryption(c.CustoID) : c.CustoID; - c.CustoID = sourceStr; - //解密联系方式 - var sourceTelStr = c.CustoTel.Contains("·") ? encryptLib.Decryption(c.CustoTel) : c.CustoTel; - c.CustoTel = sourceTelStr; - return c; - } - - } -} diff --git a/SYS.Application/Business/Customer/ICustoService.cs b/SYS.Application/Business/Customer/ICustoService.cs deleted file mode 100644 index 6affffabab2da9ca8a8d2222875cb8011dfde182..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Customer/ICustoService.cs +++ /dev/null @@ -1,85 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 客户信息接口 - /// - public interface ICustoService - { - #region 添加客户信息 - /// - /// 添加客户信息 - /// - /// - /// - bool InsertCustomerInfo(Custo custo); - #endregion - - /// - /// 更新客户信息 - /// - /// - /// - bool UpdCustomerInfoByCustoNo(Custo custo); - - /// - /// 更新客户类型(即会员等级) - /// - /// - /// - /// - bool UpdCustomerTypeByCustoNo(string custoNo, int userType); - - /// - /// 查询酒店盈利情况 - /// - /// - List SelectAllMoney(); - - /// - /// 查询所有客户信息 - /// - /// - List SelectCustoAll(ref int count, int? pageIndex, int? pageSize); - - /// - /// 查询指定客户信息 - /// - /// - List SelectCustoByInfo(Custo custo); - - /// - /// 根据客户编号查询客户信息 - /// - /// - /// - Custo SelectCardInfoByCustoNo(string CustoNo); - - - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Fonts/FontsService.cs b/SYS.Application/Business/Fonts/FontsService.cs deleted file mode 100644 index 7a46f1986f3601485c537abad774ee10a5800c4e..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Fonts/FontsService.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 酒店宣传联动内容接口实现类 - /// - public class FontsService:Repository,IFontsService - { - /// - /// 查询所有宣传联动内容(跑马灯) - /// - /// - public List SelectFontAll() - { - List fonts = new List(); - fonts = base.GetList(); - return fonts; - } - } -} diff --git a/SYS.Application/Business/Fonts/IFontsService.cs b/SYS.Application/Business/Fonts/IFontsService.cs deleted file mode 100644 index badc1955a78477e59936167aac38a990357e2631..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Fonts/IFontsService.cs +++ /dev/null @@ -1,40 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 酒店宣传联动内容接口 - /// - public interface IFontsService - { - /// - /// 查询所有宣传联动内容(跑马灯) - /// - /// - List SelectFontAll(); - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Reser/IReserService.cs b/SYS.Application/Business/Reser/IReserService.cs deleted file mode 100644 index 6a246ed1c552a6148c766d32a2000315af6b219d..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Reser/IReserService.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 预约信息接口 - /// - public interface IReserService - { - - /// - /// 获取所有预约信息 - /// - /// - List SelectReserAll(); - - /// - /// 根据房间编号获取预约信息 - /// - /// - /// - Reser SelectReserInfoByRoomNo(string no); - - /// - /// 删除预约信息 - /// - /// - /// - bool DeleteReserInfo(string rid); - - /// - /// 添加预约信息 - /// - /// - /// - bool InserReserInfo(Reser r); - - - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Reser/ReserService.cs b/SYS.Application/Business/Reser/ReserService.cs deleted file mode 100644 index ec8598e31ad39e4a6902f05b79f2c0e5bf40924c..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Reser/ReserService.cs +++ /dev/null @@ -1,101 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using jvncorelib_fr.EncryptorLib; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 预约信息接口实现类 - /// - public class ReserService:Repository,IReserService - { - EncryptLib encryptLib = new EncryptLib(); - /// - /// 获取所有预约信息 - /// - /// - public List SelectReserAll() - { - List rss = new List(); - rss = base.GetList(a => a.delete_mk == 0); - rss.ForEach(source => - { - //解密联系方式 - var sourceTelStr = source.CustoTel.Contains("·") ? encryptLib.Decryption(source.CustoTel) : source.CustoTel; - source.CustoTel = sourceTelStr; - }); - return rss; - } - - /// - /// 根据房间编号获取预约信息 - /// - /// - /// - public Reser SelectReserInfoByRoomNo(string no) - { - Reser res = null; - res = base.GetSingle(a => a.ReserRoom == no && a.delete_mk != 1); - //解密联系方式 - var sourceTelStr = res.CustoTel.Contains("·") ? encryptLib.Decryption(res.CustoTel) : res.CustoTel; - res.CustoTel = sourceTelStr; - return res; - } - - /// - /// 删除预约信息 - /// - /// - /// - public bool DeleteReserInfo(string rid) - { - return base.Update(a => new Reser() - { - delete_mk = 1, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.ReserId == rid); - - } - - /// - /// 添加预约信息 - /// - /// - /// - public bool InserReserInfo(Reser r) - { - var cryStr = encryptLib.Encryption(r.CustoTel); - r.CustoTel = cryStr; - return base.Insert(r); - } - - - } -} diff --git a/SYS.Application/Business/Room/IRoomService.cs b/SYS.Application/Business/Room/IRoomService.cs deleted file mode 100644 index 773a724011ca55d4b63ead2eaac39b5821bd39a1..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Room/IRoomService.cs +++ /dev/null @@ -1,206 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 房间信息接口 - /// - public interface IRoomService - { - #region 根据房间状态获取相应状态的房间信息 - /// - /// 根据房间状态获取相应状态的房间信息 - /// - /// - /// - List SelectRoomByRoomState(int stateid); - #endregion - - - #region 根据房间状态来查询可使用的房间 - /// - /// 根据房间状态来查询可使用的房间 - /// - /// - List SelectCanUseRoomAll(); - #endregion - - - #region 获取所有房间信息 - /// - /// 获取所有房间信息 - /// - /// - List SelectRoomAll(); - #endregion - - #region 获取房间分区的信息 - /// - /// 获取房间分区的信息 - /// - /// - List SelectRoomByTypeName(string TypeName); - #endregion - - #region 根据房间编号查询房间信息 - /// - /// 根据房间编号查询房间信息 - /// - /// - /// - Room SelectRoomByRoomNo(string no); - #endregion - - #region 根据房间编号退房(退房) - /// - /// 根据房间编号退房(退房) - /// - /// - /// - bool UpdateRoomByRoomNo(string room); - #endregion - - #region 根据房间编号查询截止到今天住了多少天 - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - object DayByRoomNo(string roomno); - #endregion - - #region 根据房间编号修改房间信息(入住) - /// - /// 根据房间编号修改房间信息(入住) - /// - /// - /// - bool UpdateRoomInfo(Room r); - #endregion - - #region 根据房间编号修改房间信息(预约) - /// - /// 根据房间编号修改房间信息(预约) - /// - /// - /// - bool UpdateRoomInfoWithReser(Room r); - #endregion - - #region 查询可入住房间数量 - /// - /// 查询可入住房间数量 - /// - /// - object SelectCanUseRoomAllByRoomState(); - #endregion - - #region 查询已入住房间数量 - /// - /// 查询已入住房间数量 - /// - /// - object SelectNotUseRoomAllByRoomState(); - #endregion - - #region 根据房间编号查询房间价格 - /// - /// 根据房间编号查询房间价格 - /// - /// - object SelectRoomByRoomPrice(string r); - #endregion - - #region 查询脏房数量 - /// - /// 查询脏房数量 - /// - /// - object SelectNotClearRoomAllByRoomState(); - #endregion - - #region 查询维修房数量 - /// - /// 查询维修房数量 - /// - /// - object SelectFixingRoomAllByRoomState(); - #endregion - - #region 查询预约房数量 - /// - /// 查询预约房数量 - /// - /// - object SelectReseredRoomAllByRoomState(); - #endregion - - #region 根据房间编号更改房间状态 - /// - /// 根据房间编号更改房间状态 - /// - /// - /// - /// - bool UpdateRoomStateByRoomNo(string roomno, int stateid); - #endregion - - #region 添加房间 - /// - /// 添加房间 - /// - /// - /// - bool InsertRoom(Room rn); - #endregion - - #region 查询所有可消费(已住)房间 - /// - /// 查询所有可消费(已住)房间 - /// - /// - List SelectRoomByStateAll(); - #endregion - - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - List SelectRoomStateAll(); - #endregion - - #region 根据房间编号查询房间状态编号 - /// - /// 根据房间编号查询房间状态编号 - /// - /// - /// - object SelectRoomStateIdByRoomNo(string roomno); - #endregion - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Room/IRoomTypeService.cs b/SYS.Application/Business/Room/IRoomTypeService.cs deleted file mode 100644 index a82497eb18c4086ffb04e5763718ffd9896f7fcf..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Room/IRoomTypeService.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 客房信息接口 - /// - public interface IRoomTypeService - { - #region 获取所有房间类型 - /// - /// 获取所有房间类型 - /// - /// - List SelectRoomTypesAll(); - #endregion - - #region 根据房间编号查询房间类型名称 - /// - /// 根据房间编号查询房间类型名称 - /// - /// - /// - RoomType SelectRoomTypeByRoomNo(string no); - #endregion - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Room/RoomService.cs b/SYS.Application/Business/Room/RoomService.cs deleted file mode 100644 index 701051e796ec039e60bed1c010a39d3dfa87aced..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Room/RoomService.cs +++ /dev/null @@ -1,391 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using jvncorelib_fr.EntityLib; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 客房信息接口实现类 - /// - public class RoomService:Repository, IRoomService - { - #region 根据房间状态获取相应状态的房间信息 - /// - /// 根据房间状态获取相应状态的房间信息 - /// - /// - /// - public List SelectRoomByRoomState(int stateid) - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == stateid).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion - - - #region 根据房间状态来查询可使用的房间 - /// - /// 根据房间状态来查询可使用的房间 - /// - /// - public List SelectCanUseRoomAll() - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 0).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion - - - #region 获取所有房间信息 - /// - /// 获取所有房间信息 - /// - /// - public List SelectRoomAll() - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1).OrderBy(a => a.RoomNo).ToList(); - var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList(); - List custos = new List(); - custos = base.Change().GetList(a => listCustoNo.Contains(a.CustoNo)); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - - var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; - - //把入住时间格式化 - source.CheckTimeFormat = string.IsNullOrEmpty(source.CheckTime + "") ? "" - : Convert.ToDateTime(source.CheckTime).ToString("yyyy-MM-dd HH:mm"); - - }); - return rooms; - } - #endregion - - #region 获取房间分区的信息 - /// - /// 获取房间分区的信息 - /// - /// - public List SelectRoomByTypeName(string TypeName) - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1 && a.RoomName == TypeName); - var listTypes = roomTypes.Select(a => a.Roomtype).Distinct().ToList(); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && listTypes.Contains(a.RoomType)).OrderBy(a => a.RoomNo).ToList(); - var listCustoNo = rooms.Select(a => a.CustoNo).Distinct().ToList(); - List custos = new List(); - custos = base.Change().GetList(a => listCustoNo.Contains(a.CustoNo)); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - - var custo = custos.FirstOrDefault(a => a.CustoNo.Equals(source.CustoNo)); - source.CustoName = custo.IsNullOrEmpty() ? "" : custo.CustoName; - - }); - return rooms; - } - #endregion - - #region 根据房间编号查询房间信息 - /// - /// 根据房间编号查询房间信息 - /// - /// - /// - public Room SelectRoomByRoomNo(string no) - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - Room room = new Room(); - room = base.GetSingle(a => a.delete_mk != 1 && a.RoomNo == no); - var roomSate = roomStates.FirstOrDefault(a => a.RoomStateId == room.RoomStateId); - room.RoomState = string.IsNullOrEmpty(roomSate.RoomStateName) ? "" : roomSate.RoomStateName; - return room; - } - #endregion - - #region 根据房间编号退房(退房) - /// - /// 根据房间编号退房(退房) - /// - /// - /// - public bool UpdateRoomByRoomNo(string room) - { - return base.Update(a => new Room() - { - CustoNo = null, - CheckTime = null, - CheckOutTime = DateTime.Now, - RoomStateId = 3 - },a => a.RoomNo == room); - } - #endregion - - #region 根据房间编号查询截止到今天住了多少天 - /// - /// 根据房间编号查询截止到今天住了多少天 - /// - /// - /// - public object DayByRoomNo(string roomno) - { - return Math.Abs(((TimeSpan)(base.GetSingle(a => a.RoomNo == roomno).CheckTime - DateTime.Now)).Days); - } - #endregion - - #region 根据房间编号修改房间信息(入住) - /// - /// 根据房间编号修改房间信息(入住) - /// - /// - /// - public bool UpdateRoomInfo(Room r) - { - return base.Update(a => new Room() - { - CheckTime = r.CheckTime, - RoomStateId = r.RoomStateId, - CustoNo = r.CustoNo - },a => a.RoomNo == r.RoomNo); - } - #endregion - - #region 根据房间编号修改房间信息(预约) - /// - /// 根据房间编号修改房间信息(预约) - /// - /// - /// - public bool UpdateRoomInfoWithReser(Room r) - { - return base.Update(a => new Room() - { - RoomStateId = r.RoomStateId, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.RoomNo == r.RoomNo); - } - #endregion - - #region 查询可入住房间数量 - /// - /// 查询可入住房间数量 - /// - /// - public object SelectCanUseRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 0 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion - - #region 查询已入住房间数量 - /// - /// 查询已入住房间数量 - /// - /// - public object SelectNotUseRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 1 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion - - #region 根据房间编号查询房间价格 - /// - /// 根据房间编号查询房间价格 - /// - /// - public object SelectRoomByRoomPrice(string r) - { - return base.GetSingle(a => a.RoomNo == r).RoomMoney; - } - #endregion - - #region 查询脏房数量 - /// - /// 查询脏房数量 - /// - /// - public object SelectNotClearRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 3 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion - - #region 查询维修房数量 - /// - /// 查询维修房数量 - /// - /// - public object SelectFixingRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 2 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion - - #region 查询预约房数量 - /// - /// 查询预约房数量 - /// - /// - public object SelectReseredRoomAllByRoomState() - { - return base.GetList(a => a.RoomStateId == 4 && a.delete_mk != 1).OrderBy(a => a.RoomNo).Count(); - } - #endregion - - #region 根据房间编号更改房间状态 - /// - /// 根据房间编号更改房间状态 - /// - /// - /// - /// - public bool UpdateRoomStateByRoomNo(string roomno, int stateid) - { - return base.Update(a => new Room() - { - RoomStateId = stateid, - datains_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.RoomNo == roomno); - } - #endregion - - #region 添加房间 - /// - /// 添加房间 - /// - /// - /// - public bool InsertRoom(Room rn) - { - try - { - return base.Insert(rn); - } - catch (Exception) - { - return false; - } - } - #endregion - - #region 查询所有可消费(已住)房间 - /// - /// 查询所有可消费(已住)房间 - /// - /// - public List SelectRoomByStateAll() - { - List roomStates = new List(); - roomStates = base.Change().GetList(a => a.delete_mk != 1); - List roomTypes = new List(); - roomTypes = base.Change().GetList(a => a.delete_mk != 1); - List rooms = new List(); - rooms = base.GetList(a => a.delete_mk != 1 && a.RoomStateId == 1).OrderBy(a => a.RoomNo).ToList(); - rooms.ForEach(source => - { - var roomState = roomStates.FirstOrDefault(a => a.RoomStateId == source.RoomStateId); - source.RoomState = string.IsNullOrEmpty(roomState.RoomStateName) ? "" : roomState.RoomStateName; - var roomType = roomTypes.FirstOrDefault(a => a.Roomtype == source.RoomType); - source.RoomName = string.IsNullOrEmpty(roomType.RoomName) ? "" : roomType.RoomName; - }); - return rooms; - } - #endregion - - #region 获取所有房间状态 - /// - /// 获取所有房间状态 - /// - /// - public List SelectRoomStateAll() - { - List rs = new List(); - rs = base.Change().GetList(a => a.delete_mk != 1); - return rs; - } - #endregion - - #region 根据房间编号查询房间状态编号 - /// - /// 根据房间编号查询房间状态编号 - /// - /// - /// - public object SelectRoomStateIdByRoomNo(string roomno) - { - return base.GetSingle(a => a.RoomNo == roomno).RoomStateId; - } - #endregion - } -} diff --git a/SYS.Application/Business/Room/RoomTypeService.cs b/SYS.Application/Business/Room/RoomTypeService.cs deleted file mode 100644 index f51711ee5e078d9a878397ac15ba41fca6285fb5..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Room/RoomTypeService.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 房间类型接口实现类 - /// - public class RoomTypeService:Repository, IRoomTypeService - { - #region 获取所有房间类型 - /// - /// 获取所有房间类型 - /// - /// - public List SelectRoomTypesAll() - { - List types = new List(); - types = base.GetList(a => a.delete_mk != 1); - return types; - } - #endregion - - #region 根据房间编号查询房间类型名称 - /// - /// 根据房间编号查询房间类型名称 - /// - /// - /// - public RoomType SelectRoomTypeByRoomNo(string no) - { - RoomType roomtype = new RoomType(); - Room room = new Room(); - room = base.Change().GetSingle(a => a.RoomNo == no && a.delete_mk != 1); - roomtype.RoomName = base.GetSingle(a => a.Roomtype == room.RoomStateId).RoomName; - return roomtype; - } - #endregion - } -} diff --git a/SYS.Application/Business/Sellthing/ISellService.cs b/SYS.Application/Business/Sellthing/ISellService.cs deleted file mode 100644 index ee032dd23ffb965159b1c9be318c453da8f95b22..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Sellthing/ISellService.cs +++ /dev/null @@ -1,97 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 商品接口 - /// - public interface ISellService - { - /// - /// 查询所有商品 - /// - /// - List SelectSellThingAll(SellThing sellThing = null); - - /// - /// 修改商品 - /// - /// - /// - /// - bool UpdateSellThing(string stock, string sellNo); - - /// - /// 修改商品信息 - /// - /// - /// - bool UpdateSellthingInfo(SellThing sellThing); - - /// - /// 撤回客户消费信息 - /// - /// - /// - /// - /// - bool DeleteSellThing(string roomNo, string custoNo, string sellName); - - /// - /// 根据商品编号删除商品信息 - /// - /// - /// - bool DeleteSellThingBySellNo(string sellNo); - - /// - /// 根据商品名称和价格查询商品编号 - /// - /// - /// - /// - SellThing SelectSellThingByNameAndPrice(string name, string price); - - - /// - /// 根据商品编号查询商品信息 - /// - /// - /// - SellThing SelectSellInfoBySellNo(string SellNo); - - #region 添加商品 - /// - /// 添加商品 - /// - /// - /// - bool InsertSellThing(SellThing st); - #endregion - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Sellthing/SellService.cs b/SYS.Application/Business/Sellthing/SellService.cs deleted file mode 100644 index d22cd24b646861322f3d77daa025ee337701f70d..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Sellthing/SellService.cs +++ /dev/null @@ -1,180 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using jvncorelib_fr.EntityLib; -using MySql.Data.MySqlClient; -using SqlSugar; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 商品信息接口实现类 - /// - public class SellService:Repository,ISellService - { - /// - /// 查询所有商品 - /// - /// - public List SelectSellThingAll(SellThing sellThing = null) - { - List sellThings = new List(); - var exp = Expressionable.Create().And(a => a.delete_mk == 0); - if (sellThing.IsNullOrEmpty()) - { - sellThings = base.GetList(exp.ToExpression()); - sellThings.ForEach(_sellThing => - { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); - }); - } - else - { - //商品编号 - if (!sellThing.SellNo.IsNullOrEmpty()) - { - exp = exp.And(a => a.SellNo.Contains(sellThing.SellNo)); - } - //商品名称 - if (!sellThing.SellName.IsNullOrEmpty()) - { - exp = exp.Or(a => a.SellName.Contains(sellThing.SellName)); - } - sellThings = base.GetList(exp.ToExpression()); - sellThings.ForEach(_sellThing => - { - _sellThing.SellPriceStr = Decimal.Parse(_sellThing.SellPrice.ToString()).ToString("#,##0.00").ToString(); - }); - } - return sellThings; - } - - /// - /// 更新商品数量 - /// - /// - /// - /// - public bool UpdateSellThing(string stock, string sellNo) - { - return base.Update(a => new SellThing() - { - Stock = Convert.ToInt32(stock), - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.SellNo == sellNo); - } - - /// - /// 修改商品信息 - /// - /// - /// - public bool UpdateSellthingInfo(SellThing sellThing) - { - return base.Update(a => new SellThing() - { - SellName = sellThing.SellName, - SellPrice = sellThing.SellPrice, - Stock = sellThing.Stock, - format = sellThing.format, - },a => a.SellNo == sellThing.SellNo); - } - - /// - /// 撤回客户消费信息 - /// - /// - /// - /// - /// - public bool DeleteSellThing(string roomNo, string custoNo, string sellName) - { - return base.Change().Update(a => new Spend() - { - delete_mk = 1, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.MoneyState.Equals(SpendConsts.UnSettle) && a.RoomNo == roomNo && a.CustoNo == custoNo - && a.SpendName == sellName); - - } - - /// - /// 根据商品编号删除商品信息 - /// - /// - /// - public bool DeleteSellThingBySellNo(string sellNo) - { - return base.Update(a => new SellThing() - { - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.SellNo == sellNo); - } - - /// - /// 根据商品名称和价格查询商品编号 - /// - /// - /// - /// - public SellThing SelectSellThingByNameAndPrice(string name,string price) - { - SellThing sellThing = null; - sellThing = base.GetSingle(a => a.SellName == name && a.SellPrice == Convert.ToDecimal(price)); - return sellThing; - } - - - /// - /// 根据商品编号查询商品信息 - /// - /// - /// - public SellThing SelectSellInfoBySellNo(string SellNo) - { - SellThing st = null; - st = base.GetSingle(a => a.SellNo == SellNo && a.delete_mk != 1); - return st; - } - - #region 添加商品 - /// - /// 添加商品 - /// - /// - /// - public bool InsertSellThing(SellThing st) - { - return base.Insert(st); - } - #endregion - } -} diff --git a/SYS.Application/Business/Spend/ISpendService.cs b/SYS.Application/Business/Spend/ISpendService.cs deleted file mode 100644 index 9368d7d063268a2ff159d9ef18fa75c3f5f0e043..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Spend/ISpendService.cs +++ /dev/null @@ -1,124 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 消费信息接口 - /// - public interface ISpendService - { - #region 添加消费信息 - /// - /// 添加消费信息 - /// - /// - /// - bool InsertSpendInfo(Spend s); - #endregion - - #region 根据客户编号查询消费信息 - /// - /// 根据客户编号查询消费信息 - /// - /// - /// - List SelectSpendByCustoNo(string No); - #endregion - - #region 根据房间编号查询消费信息 - /// - /// 根据房间编号查询消费信息 - /// - /// - /// - List SelectSpendByRoomNo(string No); - #endregion - - #region 根据客户编号查询历史消费信息 - /// - /// 根据客户编号查询历史消费信息 - /// - /// - /// - List SeletHistorySpendInfoAll(string custoNo); - #endregion - - #region 查询消费的所有信息 - /// - /// 查询消费的所有信息 - /// - /// - List SelectSpendInfoAll(); - #endregion - - #region 根据房间号查询消费的所有信息 - /// - /// 根据房间号查询消费的所有信息 - /// - /// - List SelectSpendInfoRoomNo(string RoomNo); - #endregion - - #region 根据房间编号、入住时间到当前时间查询消费总金额 - /// - /// 根据房间编号、入住时间到当前时间查询消费总金额 - /// - /// - /// - /// - object SelectMoneyByRoomNoAndTime(string roomno, string custono); - #endregion - - #region 根据房间编号、入住时间和当前时间修改结算状态 - /// - /// 根据房间编号、入住时间和当前时间修改结算状态 - /// - /// - /// - /// - bool UpdateMoneyState(string roomno, string checktime); - #endregion - - #region 将转房前的未结算记录一同转移到新房间 - /// - /// 将转房前的未结算记录一同转移到新房间 - /// - /// - /// - /// - /// - bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo); - #endregion - - /// - /// 更新消费信息 - /// - /// - /// - bool UpdSpenInfo(Spend spend); - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Spend/SpendService.cs b/SYS.Application/Business/Spend/SpendService.cs deleted file mode 100644 index 5996ec0f26c9bfd936dd177a5f6d77a68aa416ce..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Spend/SpendService.cs +++ /dev/null @@ -1,249 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 商品消费接口实现类 - /// - public class SpendService:Repository, ISpendService - { - #region 添加消费信息 - /// - /// 添加消费信息 - /// - /// - /// - public bool InsertSpendInfo(Spend s) - { - return base.Insert(s); - } - #endregion - - #region 根据客户编号查询消费信息 - /// - /// 根据客户编号查询消费信息 - /// - /// - /// - public List SelectSpendByCustoNo(string No) - { - List ls = new List(); - ls = base.GetList(a => a.CustoNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); - ls.ForEach(source => - { - source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - - source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); - - source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); - }); - return ls; - } - #endregion - - #region 根据客户编号查询历史消费信息 - /// - /// 根据客户编号查询历史消费信息 - /// - /// - /// - public List SeletHistorySpendInfoAll(string custoNo) - { - List ls = new List(); - ls = base.GetList(a => a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.Settled) && a.delete_mk != 1); - ls.ForEach(source => - { - source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - - source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); - - source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); - }); - return ls; - } - #endregion - - #region 根据房间编号查询消费信息 - /// - /// 根据房间编号查询消费信息 - /// - /// - /// - public List SelectSpendByRoomNo(string No) - { - List ls = new List(); - ls = base.GetList(a => a.RoomNo == No && a.MoneyState.Equals(SpendConsts.UnSettle) && a.delete_mk != 1); - ls.ForEach(source => - { - source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - - source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); - - source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); - }); - return ls; - } - #endregion - - #region 查询消费的所有信息 - /// - /// 查询消费的所有信息 - /// - /// - public List SelectSpendInfoAll() - { - List ls = new List(); - ls = base.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.SpendTime).ToList(); - ls.ForEach(source => - { - source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - - source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); - - source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); - }); - return ls; - } - #endregion - - - - #region 根据房间号查询消费的所有信息 - /// - /// 根据房间号查询消费的所有信息 - /// - /// - public List SelectSpendInfoRoomNo(string RoomNo) - { - List ls = new List(); - ls = base.GetList(a => a.RoomNo == RoomNo && a.delete_mk != 1 && a.MoneyState.Equals(SpendConsts.UnSettle)); - ls.ForEach(source => - { - source.SpendStateNm = string.IsNullOrEmpty(source.MoneyState) ? "" - : source.MoneyState.Equals(SpendConsts.Settled) ? "已结算" : "未结算"; - - source.SpendPriceStr = string.IsNullOrEmpty(source.SpendPrice + "") ? "" - : Decimal.Parse(source.SpendPrice.ToString()).ToString("#,##0.00").ToString(); - - source.SpendMoneyStr = string.IsNullOrEmpty(source.SpendMoney + "") ? "" - : Decimal.Parse(source.SpendMoney.ToString()).ToString("#,##0.00").ToString(); - }); - return ls; - } - #endregion - - #region 根据房间编号、入住时间到当前时间查询消费总金额 - /// - /// 根据房间编号、入住时间到当前时间查询消费总金额 - /// - /// - /// - /// - public object SelectMoneyByRoomNoAndTime(string roomno,string custono) - { - return base.GetList(a => a.RoomNo == roomno && a.CustoNo == custono && a.MoneyState.Equals(SpendConsts.UnSettle)).Sum(a => a.SpendMoney); - } - #endregion - - #region 根据房间编号、入住时间和当前时间修改结算状态 - /// - /// 根据房间编号、入住时间和当前时间修改结算状态 - /// - /// - /// - /// - public bool UpdateMoneyState(string roomno, string checktime) - { - return base.Update(a => new Spend() - { - MoneyState = SpendConsts.Settled, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.RoomNo == roomno && a.SpendTime >= Convert.ToDateTime(checktime) && a.SpendTime <= DateTime.Now); - } - #endregion - - #region 将转房前的未结算记录一同转移到新房间 - /// - /// 将转房前的未结算记录一同转移到新房间 - /// - /// - /// - /// - /// - public bool UpdateSpendInfoByRoomNo(List spends, string newRoom, string custoNo) - { - var listSpendId = spends.Select(a => a.SpendName).Distinct().ToList(); - - return base.Update(a => new Spend() - { - RoomNo = newRoom, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => listSpendId.Contains(a.RoomNo) && a.CustoNo == custoNo && a.MoneyState.Equals(SpendConsts.UnSettle) && a.SpendTime >= DateTime.Now - && a.SpendTime <= DateTime.Now); - - - } - #endregion - - /// - /// 更新消费信息 - /// - /// - /// - public bool UpdSpenInfo(Spend spend) - { - return base.Update(a => new Spend() - { - SpendAmount = spend.SpendAmount, - SpendMoney = spend.SpendMoney, - - }, a => a.MoneyState.Equals(SpendConsts.UnSettle) - && a.RoomNo.Equals(spend.RoomNo) - && a.CustoNo.Equals(spend.CustoNo) - && a.SpendName.Equals(spend.SpendName)); - } - - } -} diff --git a/SYS.Application/Business/Wti/IWtiService.cs b/SYS.Application/Business/Wti/IWtiService.cs deleted file mode 100644 index 83b2729ffa7370e80b99514f5517d0f25194fd5e..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Wti/IWtiService.cs +++ /dev/null @@ -1,117 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 水电信息接口 - /// - public interface IWtiService - { - #region 根据房间编号查询水电费信息 - /// - /// 根据房间编号查询水电费信息 - /// - /// - /// - Wti SelectWtiInfoByRoomNo(string roomNo); - #endregion - - #region 根据房间编号、使用时间查询水电费信息 - /// - /// 根据房间编号、使用时间查询水电费信息 - /// - /// - /// - /// - /// - Wti SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate); - #endregion - - #region 获取所有水电费信息 - /// - /// 获取所有水电费信息 - /// - /// - List SelectWtiInfoAll(); - #endregion - - #region 添加水电费信息 - /// - /// 添加水电费信息 - /// - /// - /// - bool InsertWtiInfo(Wti w); - #endregion - - #region 修改水电费信息(根据房间编号) - /// - /// 修改水电费信息(根据房间编号) - /// - /// - /// - bool UpdateWtiInfo(Wti w); - #endregion - - #region 根据房间信息、使用时间修改水电费 - /// - /// 根据房间信息、使用时间修改水电费 - /// - /// - /// - bool UpdateWtiInfoByRoomNoAndDateTime(Wti w); - #endregion - - #region 删除水电费信息:根据房间编号 - /// - /// 删除水电费信息:根据房间编号 - /// - /// - /// - //bool DeleteWtiInfo(string roomno); - #endregion - - #region 根据房间编号、使用时间删除水电费信息 - /// - /// 根据房间编号、使用时间删除水电费信息 - /// - /// - /// - /// - /// - bool DeleteWtiInfoByRoomNoAndDateTime(string roomno, string usedate, string enddate); - #endregion - - #region 根据房间编号获取该房间所有水电费信息 - /// - /// 获取所有水电费信息 - /// - /// - List ListWtiInfoByRoomNo(string roomno); - #endregion - } -} \ No newline at end of file diff --git a/SYS.Application/Business/Wti/WtiService.cs b/SYS.Application/Business/Wti/WtiService.cs deleted file mode 100644 index eec4cdf857fedce8e003564c9e62fac8f106563f..0000000000000000000000000000000000000000 --- a/SYS.Application/Business/Wti/WtiService.cs +++ /dev/null @@ -1,188 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 水电信息接口实现类 - /// - public class WtiService:Repository, IWtiService - { - #region 根据房间编号查询水电费信息 - /// - /// 根据房间编号查询水电费信息 - /// - /// - /// - public Wti SelectWtiInfoByRoomNo(string roomNo) - { - Wti w = new Wti(); - w = base.GetSingle(a => a.RoomNo.Contains(roomNo) && a.delete_mk != 1); - return w; - } - #endregion - - #region 根据房间编号、使用时间查询水电费信息 - /// - /// 根据房间编号、使用时间查询水电费信息 - /// - /// - /// - /// - /// - public Wti SelectWtiInfoByRoomNoAndTime(string roomno, string usedate, string enddate) - { - Wti w = null; - string sql = "select * from WTINFO where RoomNo='" + roomno + - "' and UseDate='" + usedate + "' and EndDate='" + enddate + "'"; - w = base.GetSingle(a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate)); - return w; - } - #endregion - - #region 获取所有水电费信息 - /// - /// 获取所有水电费信息 - /// - /// - public List SelectWtiInfoAll() - { - List wti = new List(); - wti = base.GetList(a => a.delete_mk != 1); - return wti; - } - #endregion - - - #region 根据房间编号获取该房间所有水电费信息 - /// - /// 获取所有水电费信息 - /// - /// - public List ListWtiInfoByRoomNo(string roomno) - { - List wti = new List(); - wti = base.GetList(a => a.delete_mk != 1 && a.RoomNo.Equals(roomno)); - return wti; - } - #endregion - - #region 添加水电费信息 - /// - /// 添加水电费信息 - /// - /// - /// - public bool InsertWtiInfo(Wti w) - { - return base.Insert(w); - } - #endregion - - #region 修改水电费信息(根据房间编号) - /// - /// 修改水电费信息(根据房间编号) - /// - /// - /// - public bool UpdateWtiInfo(Wti w) - { - return base.Update(a => new Wti() - { - UseDate = w.UseDate, - EndDate = w.EndDate, - WaterUse = w.WaterUse, - PowerUse = w.PowerUse, - Record = w.Record, - CustoNo = w.CustoNo, - datachg_usr = w.datachg_usr, - datachg_date = w.datachg_date, - RoomNo = w.RoomNo - },a => a.WtiNo == w.WtiNo); - - } - #endregion - - #region 根据房间信息、使用时间修改水电费 - /// - /// 根据房间信息、使用时间修改水电费 - /// - /// - /// - public bool UpdateWtiInfoByRoomNoAndDateTime(Wti w) - { - return base.Update(a => new Wti() - { - WaterUse = w.WaterUse, - PowerUse = w.PowerUse, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now, - },a => a.RoomNo == w.RoomNo && a.UseDate >= w.UseDate && a.EndDate >= w.EndDate); - } - #endregion - - #region 删除水电费信息:根据房间编号 - /// - /// 删除水电费信息:根据房间编号 - /// - /// - /// - //public bool DeleteWtiInfo(string roomno) - //{ - // return base.Update(a => new Wti() - // { - // delete_mk = 1, - // datachg_usr = LoginInfo.WorkerNo, - // datachg_date = DateTime.Now - // }, a => a.WtiNo == roomno); - //} - #endregion - - #region 根据房间编号、使用时间删除水电费信息 - /// - /// 根据房间编号、使用时间删除水电费信息 - /// - /// - /// - /// - /// - public bool DeleteWtiInfoByRoomNoAndDateTime(string roomno, string usedate, string enddate) - { - string sql = "delete from WTINFO where RoomNo='{0}' and UseDate='{1}' and EndDate='{2}'"; - sql = string.Format(sql, roomno, usedate, enddate); - return base.Update(a => new Wti() - { - delete_mk = 1, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.RoomNo == roomno && a.UseDate >= Convert.ToDateTime(usedate) && a.EndDate >= Convert.ToDateTime(enddate)); - } - #endregion - } -} diff --git a/SYS.Application/Properties/AssemblyInfo.cs b/SYS.Application/Properties/AssemblyInfo.cs deleted file mode 100644 index b8374f0c03528f8822b360befa79537efb3e959e..0000000000000000000000000000000000000000 --- a/SYS.Application/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// 有关程序集的一般信息由以下 -// 控制。更改这些特性值可修改 -// 与程序集关联的信息。 -[assembly: AssemblyTitle("SYS.Application")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("java-and-net")] -[assembly: AssemblyProduct("SYS.Application")] -[assembly: AssemblyCopyright("Copyright © 2020 java-and-net")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// 将 ComVisible 设置为 false 会使此程序集中的类型 -//对 COM 组件不可见。如果需要从 COM 访问此程序集中的类型 -//请将此类型的 ComVisible 特性设置为 true。 -[assembly: ComVisible(false)] - -// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID -[assembly: Guid("600f4cc8-4323-4237-a55c-bfef4b67d57c")] - -// 程序集的版本信息由下列四个值组成: -// -// 主版本 -// 次版本 -// 生成号 -// 修订号 -// -// 可以指定所有值,也可以使用以下所示的 "*" 预置版本号和修订号 -//通过使用 "*",如下所示: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.4.0.0")] -[assembly: AssemblyFileVersion("1.4.0.0")] diff --git a/SYS.Application/SYS.Application.csproj b/SYS.Application/SYS.Application.csproj deleted file mode 100644 index e57f2f1ee431c6096959f78c46f3f6a7f8a8b9cc..0000000000000000000000000000000000000000 --- a/SYS.Application/SYS.Application.csproj +++ /dev/null @@ -1,158 +0,0 @@ - - - - - Debug - AnyCPU - {600F4CC8-4323-4237-A55C-BFEF4B67D57C} - Library - Properties - SYS.Application - SYS.Application - v4.7.1 - 512 - true - SAK - SAK - SAK - SAK - - - - true - full - false - bin\Debug\ - DEBUG;TRACE - prompt - 4 - x64 - bin\Debug\SYS.Application.xml - - - pdbonly - true - bin\Release\ - TRACE - prompt - 4 - - - bitbug_favicon %281%29.ico - - - - ..\packages\jvncorelib.1.0.1.7\lib\net461\jvncorelib-fr.dll - - - False - ..\SYS.Library\MySql.Data.dll - - - False - ..\SYS.Library\MySql.Data.EntityFramework.dll - - - False - ..\SYS.Library\MySql.Web.dll - - - ..\packages\Npgsql.4.0.10\lib\net451\Npgsql.dll - - - ..\packages\SqlSugar.5.0.2\lib\SqlSugar.dll - - - - ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll - - - - - ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll - - - - ..\packages\System.Numerics.Vectors.4.4.0\lib\net46\System.Numerics.Vectors.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll - - - ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {65501af6-c629-448a-847e-1bcd60665865} - SYS.Common - - - {cd039d0f-bd50-4fbf-b9cd-cdfab25c7dfa} - SYS.Core - False - - - - - - - - - - - - \ No newline at end of file diff --git a/SYS.Application/Worker/IWorkerCheckService.cs b/SYS.Application/Worker/IWorkerCheckService.cs deleted file mode 100644 index a67ac0db7d4dbf887471db9f77473211a69f4a0c..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/IWorkerCheckService.cs +++ /dev/null @@ -1,64 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 员工打卡接口 - /// - public interface IWorkerCheckService - { - /// - /// 根据员工编号查询其所有的打卡记录 - /// - /// - /// - List SelectCheckInfoByWorkerNo(string wid); - - - /// - /// 查询员工签到天数 - /// - /// - /// - object SelectWorkerCheckDaySumByWorkerNo(string wkn); - - - /// - /// 查询今天员工是否已签到 - /// - /// - /// - object SelectToDayCheckInfoByWorkerNo(string wkn); - - /// - /// 添加员工打卡数据 - /// - /// - /// - bool AddCheckInfo(WorkerCheck workerCheck); - } -} \ No newline at end of file diff --git a/SYS.Application/Worker/IWorkerGoodBadService.cs b/SYS.Application/Worker/IWorkerGoodBadService.cs deleted file mode 100644 index d709da1959a239e5c2a8f10605270af217cbba6c..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/IWorkerGoodBadService.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 员工奖惩信息接口 - /// - public interface IWorkerGoodBadService - { - /// - /// 添加员工奖惩记录 - /// - /// - /// - bool AddGoodBad(WorkerGoodBad goodBad); - - /// - /// 根据工号查找所有的奖惩记录信息 - /// - /// - /// - List SelectAllGoodBadByWorkNo(string wn); - } -} \ No newline at end of file diff --git a/SYS.Application/Worker/IWorkerHistoryService.cs b/SYS.Application/Worker/IWorkerHistoryService.cs deleted file mode 100644 index 55f84e6ca4736e586f2f71b30f01da37f8bb00f7..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/IWorkerHistoryService.cs +++ /dev/null @@ -1,48 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 员工履历信息接口 - /// - public interface IWorkerHistoryService - { - /// - /// 根据工号添加员工履历 - /// - /// - /// - bool AddHistoryByWorkerId(WorkerHistory workerHistory); - - /// - /// 根据工号查询履历信息 - /// - /// - /// - List SelectHistoryByWorkerId(string wid); - } -} \ No newline at end of file diff --git a/SYS.Application/Worker/IWorkerPicService.cs b/SYS.Application/Worker/IWorkerPicService.cs deleted file mode 100644 index 0738f6b0be3d3d79831920e1fd80331dce5404e3..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/IWorkerPicService.cs +++ /dev/null @@ -1,40 +0,0 @@ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 员工照片模块接口 - /// - public interface IWorkerPicService - { - /// - /// 查询员工照片 - /// - /// - /// - WorkerPic WorkerPic(WorkerPic workerPic); - /// - /// 添加员工照片 - /// - /// - /// - bool InsertWorkerPic(WorkerPic workerPic); - /// - /// 删除员工照片 - /// - /// - /// - bool DeleteWorkerPic(WorkerPic workerPic); - /// - /// 更新员工照片 - /// - /// - /// - bool UpdateWorkerPic(WorkerPic workerPic); - } -} diff --git a/SYS.Application/Worker/IWorkerService.cs b/SYS.Application/Worker/IWorkerService.cs deleted file mode 100644 index 1a3acae389d148937073e340f64c2fcdc43cfdb4..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/IWorkerService.cs +++ /dev/null @@ -1,102 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 员工信息接口 - /// - public interface IWorkerService - { - #region 修改员工信息 - /// - /// 修改员工信息 - /// - /// - /// - bool UpdateWorker(Worker worker); - #endregion - - /// - /// 员工账号禁/启用 - /// - /// - /// - bool ManagerWorkerAccount(Worker worker); - - /// - /// 更新员工职位和部门 - /// - /// - /// - - bool UpdateWorkerPositionAndClub(Worker worker); - - #region 添加员工信息 - /// - /// 添加员工信息 - /// - /// - /// - bool AddWorker(Worker worker); - #endregion - - #region 获取所有工作人员信息 - /// - /// 获取所有工作人员信息 - /// - /// - List SelectWorkerAll(); - #endregion - - #region 根据登录名称查询员工信息 - /// - /// 根据登录名称查询员工信息 - /// - /// - /// - Worker SelectWorkerInfoByWorkerId(string workerId); - #endregion - - #region 根据登录名称、密码查询员工信息 - /// - /// 根据登录名称、密码查询员工信息 - /// - /// - /// - Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker); - #endregion - - - /// - /// 根据员工编号和密码修改密码 - /// - /// - /// - /// - bool UpdWorkerPwdByWorkNo(string workId, string workPwd); - } -} \ No newline at end of file diff --git a/SYS.Application/Worker/WorkerCheckService.cs b/SYS.Application/Worker/WorkerCheckService.cs deleted file mode 100644 index 9aad694aebeb576ab14b28cf0c95bc8e67f26764..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/WorkerCheckService.cs +++ /dev/null @@ -1,89 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 员工打卡接口实现类 - /// - public class WorkerCheckService:Repository, IWorkerCheckService - { - /// - /// 根据员工编号查询其所有的打卡记录 - /// - /// - /// - public List SelectCheckInfoByWorkerNo(string wid) - { - List workerChecks = new List(); - workerChecks = base.GetList(a => a.WorkerNo == wid && a.delete_mk != 1); - workerChecks.ForEach(source => - { - source.CheckStateNm = source.CheckState == 0 ? "打卡成功" : "打卡失败"; - }); - return workerChecks; - } - - - /// - /// 查询员工签到天数 - /// - /// - /// - public object SelectWorkerCheckDaySumByWorkerNo(string wkn) - { - return base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1).Count; - } - - - /// - /// 查询今天员工是否已签到 - /// - /// - /// - public object SelectToDayCheckInfoByWorkerNo(string wkn) - { - //string sql = "select Count(*) from WORKERCHECK where WorkerNo = '"+wkn+ "' and DATEDIFF(CURRENT_DATE(),workercheck.CheckTime)"; - var listCheckInfo = base.GetList(a => a.WorkerNo == wkn && a.delete_mk != 1); - var count = listCheckInfo.Where(a => a.CheckTime.ToShortDateString() == DateTime.Now.ToShortDateString()).Count() > 0 ? 1:0; - return count; - } - - /// - /// 添加员工打卡数据 - /// - /// - /// - public bool AddCheckInfo(WorkerCheck workerCheck) - { - return base.Insert(workerCheck); - } - } -} diff --git a/SYS.Application/Worker/WorkerGoodBadService.cs b/SYS.Application/Worker/WorkerGoodBadService.cs deleted file mode 100644 index 13797d2b4d8804ea041c64d17cb4787c20e7ace4..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/WorkerGoodBadService.cs +++ /dev/null @@ -1,77 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using SYS.Core; -using SYS.Common; - -namespace SYS.Application -{ - /// - /// 员工奖惩记录接口实现类 - /// - public class WorkerGoodBadService:Repository, IWorkerGoodBadService - { - /// - /// 添加员工奖惩记录 - /// - /// - /// - public bool AddGoodBad(WorkerGoodBad goodBad) - { - return base.Insert(goodBad); - } - - /// - /// 根据工号查找所有的奖惩记录信息 - /// - /// - /// - public List SelectAllGoodBadByWorkNo(string wn) - { - //查询所有超级管理员 - List admins = new List(); - admins = base.Change().GetList(a => a.DeleteMk != 1); - List gBTypes = new List(); - gBTypes = base.Change().GetList(a => a.delete_mk != 1); - List gb = new List(); - gb = base.GetList(a => a.WorkNo == wn); - gb.ForEach(source => - { - //奖惩类型 - var gbType = gBTypes.FirstOrDefault(a => a.GBTypeId == source.GBType); - source.TypeName = string.IsNullOrEmpty(gbType.GBName) ? "" : gbType.GBName; - - //操作人 - var admin = admins.FirstOrDefault(a => a.AdminAccount == source.GBOperation); - source.OperationName = string.IsNullOrEmpty(admin.AdminName) ? "" : admin.AdminName; - }); - return gb; - } - } -} diff --git a/SYS.Application/Worker/WorkerHistoryService.cs b/SYS.Application/Worker/WorkerHistoryService.cs deleted file mode 100644 index 617ede6750eaa280dc16a65d30704b72553aea58..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/WorkerHistoryService.cs +++ /dev/null @@ -1,59 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 员工履历接口实现类 - /// - public class WorkerHistoryService:Repository, IWorkerHistoryService - { - /// - /// 根据工号添加员工履历 - /// - /// - /// - public bool AddHistoryByWorkerId(WorkerHistory workerHistory) - { - return base.Insert(workerHistory); - } - - /// - /// 根据工号查询履历信息 - /// - /// - /// - public List SelectHistoryByWorkerId(string wid) - { - List why = new List(); - why = base.GetList(a => a.delete_mk != 1 && a.WorkerId == wid); - return why; - } - } -} diff --git a/SYS.Application/Worker/WorkerPicService.cs b/SYS.Application/Worker/WorkerPicService.cs deleted file mode 100644 index 22fb49c9de0d04700218da378df372fcea544061..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/WorkerPicService.cs +++ /dev/null @@ -1,75 +0,0 @@ -using jvncorelib_fr.EncryptorLib; -using SYS.Common; -using SYS.Core; -using SYS.Core.Util; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 员工照片接口实现类 - /// - public class WorkerPicService:Repository,IWorkerPicService - { - EncryptLib encryptLib = new EncryptLib(); - /// - /// 查询员工照片 - /// - /// - /// - public WorkerPic WorkerPic(WorkerPic workerPic) - { - var workerPicSource = new WorkerPic(); - - workerPicSource = base.GetSingle(a => a.WorkerId.Equals(workerPic.WorkerId)); - - if (workerPicSource != null) - { - workerPicSource.Pic = workerPicSource == null || string.IsNullOrEmpty(workerPicSource.Pic) ? "" : encryptLib.Decryption(HttpHelper.baseUrl) + workerPicSource.Pic; - } - - return workerPicSource; - } - /// - /// 添加员工照片 - /// - /// - /// - public bool InsertWorkerPic(WorkerPic workerPic) - { - return base.Insert(new WorkerPic - { - WorkerId = workerPic.WorkerId, - Pic = workerPic.Pic - }); - } - - /// - /// 删除员工照片 - /// - /// - /// - public bool DeleteWorkerPic(WorkerPic workerPic) - { - return base.Delete(a => a.WorkerId.Equals(workerPic.WorkerId)); - } - - /// - /// 更新员工照片 - /// - /// - /// - public bool UpdateWorkerPic(WorkerPic workerPic) - { - return base.Update(a=> new WorkerPic - { - Pic = workerPic.Pic - },a => a.WorkerId.Equals(workerPic.WorkerId)); - } - } -} diff --git a/SYS.Application/Worker/WorkerService.cs b/SYS.Application/Worker/WorkerService.cs deleted file mode 100644 index 476e564a5fe86399299c0158700f0bea46f09c1e..0000000000000000000000000000000000000000 --- a/SYS.Application/Worker/WorkerService.cs +++ /dev/null @@ -1,276 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Linq; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; -using jvncorelib_fr.EncryptorLib; - -namespace SYS.Application -{ - /// - /// 员工信息接口实现类 - /// - public class WorkerService:Repository,IWorkerService - { - /// - /// 实例化信息加密插件 - /// - EncryptLib encryptLib = new EncryptLib(); - - #region 修改员工信息 - /// - /// 修改员工信息 - /// - /// - /// - public bool UpdateWorker(Worker worker) - { - //加密联系方式 - var sourceTelStr = string.Empty; - if (!string.IsNullOrEmpty(worker.WorkerTel)) - { - sourceTelStr = encryptLib.Encryption(worker.WorkerTel); - } - //加密身份证 - var sourceIdStr = string.Empty; - if (!string.IsNullOrEmpty(worker.CardId)) - { - sourceIdStr = encryptLib.Encryption(worker.CardId); - } - worker.WorkerTel = sourceTelStr; - worker.CardId = sourceIdStr; - return base.Update(a => new Worker() - { - WorkerName = worker.WorkerName, - WorkerTel = worker.WorkerTel, - WorkerAddress = worker.WorkerAddress, - WorkerFace = worker.WorkerFace, - WorkerEducation = worker.WorkerEducation, - WorkerNation = worker.WorkerNation, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - },a => a.WorkerId.Equals(worker.WorkerId)); - - } - #endregion - - /// - /// 员工账号禁/启用 - /// - /// - /// - public bool ManagerWorkerAccount(Worker worker) - { - return new WorkerService().Update(a => new Worker() - { - delete_mk = worker.delete_mk - }, a => a.WorkerId == worker.WorkerId); - } - - /// - /// 更新员工职位和部门 - /// - /// - /// - - public bool UpdateWorkerPositionAndClub(Worker worker) - { - return base.Update(a => new Worker() - { - WorkerClub = worker.WorkerClub, - WorkerPosition = worker.WorkerPosition, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.WorkerId == worker.WorkerId); - } - - #region 添加员工信息 - /// - /// 添加员工信息 - /// - /// - /// - public bool AddWorker(Worker worker) - { - string NewID = encryptLib.Encryption(worker.CardId); - string NewTel = encryptLib.Encryption(worker.WorkerTel); - worker.CardId = NewID; - worker.WorkerTel = NewTel; - return base.Insert(worker); - } - #endregion - - #region 获取所有工作人员信息 - /// - /// 获取所有工作人员信息 - /// - /// - public List SelectWorkerAll() - { - //查询所有教育程度信息 - List educations = new List(); - educations = base.Change().GetList(a => a.delete_mk != 1); - //查询所有性别类型信息 - List sexTypes = new List(); - sexTypes = base.Change().GetList(a => a.delete_mk != 1); - //查询所有民族类型信息 - List nations = new List(); - nations = base.Change().GetList(a => a.delete_mk != 1); - //查询所有部门信息 - List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); - //查询所有职位信息 - List positions = new List(); - positions = base.Change().GetList(a => a.delete_mk != 1); - //查询所有员工信息 - List workers = new List(); - workers = base.Change().GetList(); - workers.ForEach(source => - { - //解密身份证号码 - var sourceStr = source.CardId.Contains("·") ? encryptLib.Decryption(source.CardId) : source.CardId; - source.CardId = sourceStr; - //解密联系方式 - var sourceTelStr = source.WorkerTel.Contains("·") ? encryptLib.Decryption(source.WorkerTel) : source.WorkerTel; - source.WorkerTel = sourceTelStr; - //性别类型 - var sexType = sexTypes.FirstOrDefault(a => a.sexId == source.WorkerSex); - source.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //教育程度 - var eduction = educations.FirstOrDefault(a => a.education_no == source.WorkerEducation); - source.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; - //民族类型 - var nation = nations.FirstOrDefault(a => a.nation_no == source.WorkerNation); - source.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; - //部门 - var dept = depts.FirstOrDefault(a => a.dept_no == source.WorkerClub); - source.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; - //职位 - var position = positions.FirstOrDefault(a => a.position_no == source.WorkerPosition); - source.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; - }); - - return workers; - } - #endregion - - #region 根据登录名称查询员工信息 - /// - /// 根据登录名称查询员工信息 - /// - /// - /// - public Worker SelectWorkerInfoByWorkerId(string workerId) - { - Worker w = new Worker(); - w = base.Change().GetSingle(a => a.WorkerId == workerId); - //解密身份证号码 - var sourceStr = w.CardId.Contains("·") ? encryptLib.Decryption(w.CardId) : w.CardId; - w.CardId = sourceStr; - //解密联系方式 - var sourceTelStr = w.WorkerTel.Contains("·") ? encryptLib.Decryption(w.WorkerTel) : w.WorkerTel; - w.WorkerTel = sourceTelStr; - //性别类型 - var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); - w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //教育程度 - var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); - w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; - //民族类型 - var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); - w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; - //部门 - var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); - w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; - //职位 - var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); - w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; - return w; - } - #endregion - - #region 根据登录名称、密码查询员工信息 - /// - /// 根据登录名称、密码查询员工信息 - /// - /// - /// - public Worker SelectWorkerInfoByWorkerIdAndWorkerPwd(Worker worker) - { - Worker w = new Worker(); - w = base.GetSingle(a => a.WorkerId == worker.WorkerId); - if (w == null) - { - w = null; - return w; - } - - var sourceStr = w.WorkerPwd.Contains("·") ? encryptLib.Decryption(w.WorkerPwd) : w.WorkerPwd; - if (sourceStr != worker.WorkerPwd) - { - w = null; - return w; - } - - //性别类型 - var sexType = base.Change().GetSingle(a => a.sexId == w.WorkerSex); - w.WorkerSexName = string.IsNullOrEmpty(sexType.sexName) ? "" : sexType.sexName; - //教育程度 - var eduction = base.Change().GetSingle(a => a.education_no == w.WorkerEducation); - w.EducationName = string.IsNullOrEmpty(eduction.education_name) ? "" : eduction.education_name; - //民族类型 - var nation = base.Change().GetSingle(a => a.nation_no == w.WorkerNation); - w.NationName = string.IsNullOrEmpty(nation.nation_name) ? "" : nation.nation_name; - //部门 - var dept = base.Change().GetSingle(a => a.dept_no == w.WorkerClub); - w.ClubName = string.IsNullOrEmpty(dept.dept_name) ? "" : dept.dept_name; - //职位 - var position = base.Change().GetSingle(a => a.position_no == w.WorkerPosition); - w.PositionName = string.IsNullOrEmpty(position.position_name) ? "" : position.position_name; - return w; - } - #endregion - - /// - /// 根据员工编号和密码修改密码 - /// - /// - /// - /// - public bool UpdWorkerPwdByWorkNo(string workId,string workPwd) - { - string NewPwd = encryptLib.Decryption(workPwd); - return base.Update(a => new Worker() - { - WorkerPwd = NewPwd, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.WorkerId == workId); - } - - } -} diff --git a/SYS.Application/Zero/AdminModuleZeroService.cs b/SYS.Application/Zero/AdminModuleZeroService.cs deleted file mode 100644 index 7565cf971afbb11593eb095a6a08f455a902980f..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/AdminModuleZeroService.cs +++ /dev/null @@ -1,138 +0,0 @@ -using SYS.Common; -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 管理员模块权限管理接口实现类 - /// - public class AdminModuleZeroService:Repository, IAdminModuleZeroService - { - /// - /// 获取所有模块 - /// - /// - public List GetAllModule() - { - List modules = base.Change().GetList(); - modules.ForEach(source => - { - switch (source.module_name) - { - case ModuleConsts.BaseInfo: - source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; - break; - case ModuleConsts.CashInfo: - source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; - break; - case ModuleConsts.WtiInfo: - source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; - break; - case ModuleConsts.CheckInfo: - source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; - break; - case ModuleConsts.RoomManager: - source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; - break; - case ModuleConsts.CustomerManager: - source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; - break; - case ModuleConsts.HumanResourcesManager: - source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; - break; - case ModuleConsts.MaterialManager: - source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; - break; - case ModuleConsts.OperationLogManager: - source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; - break; - case ModuleConsts.AdminManager: - source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; - break; - } - }); - return modules; - } - - /// - /// 根据账号获取对应模块 - /// - /// - /// - public List GetAllModuleByAdmin(Admin admin) - { - List moduleZeros = base.GetList(a => a.admin_account.Equals(admin.AdminAccount) - && a.module_enable == 1); - moduleZeros.ForEach(source => - { - switch (source.module_name) - { - case ModuleConsts.BaseInfo: - source.module_name = ModuleConsts.BaseInfo + "||" + "基础信息"; - break; - case ModuleConsts.CashInfo: - source.module_name = ModuleConsts.CashInfo + "||" + "财务信息"; - break; - case ModuleConsts.WtiInfo: - source.module_name = ModuleConsts.WtiInfo + "||" + "水电管理"; - break; - case ModuleConsts.CheckInfo: - source.module_name = ModuleConsts.CheckInfo + "||" + "监管统计"; - break; - case ModuleConsts.RoomManager: - source.module_name = ModuleConsts.RoomManager + "||" + "客房管理"; - break; - case ModuleConsts.CustomerManager: - source.module_name = ModuleConsts.CustomerManager + "||" + "客户管理"; - break; - case ModuleConsts.HumanResourcesManager: - source.module_name = ModuleConsts.HumanResourcesManager + "||" + "人事管理"; - break; - case ModuleConsts.MaterialManager: - source.module_name = ModuleConsts.MaterialManager + "||" + "物资管理"; - break; - case ModuleConsts.OperationLogManager: - source.module_name = ModuleConsts.OperationLogManager + "||" + "员工操作日志"; - break; - case ModuleConsts.AdminManager: - source.module_name = ModuleConsts.AdminManager + "||" + "系统管理"; - break; - } - }); - return moduleZeros; - } - - /// - /// 批量添加模块 - /// - /// - /// - public bool AddModuleZeroList(List moduleZeros) - { - moduleZeros.ForEach(moduleZero => - { - moduleZero.module_name = moduleZero.module_name.Split('|','|').FirstOrDefault().ToString(); - }); - var result = base.InsertRange(moduleZeros); - return result; - } - - /// - /// 批量删除模块 - /// - /// - /// - public bool DelModuleZeroList(ModuleZero moduleZero) - { - var result = base.Delete(a => a.admin_account.Equals(moduleZero.admin_account)); - return result; - } - - - } -} diff --git a/SYS.Application/Zero/AdminService.cs b/SYS.Application/Zero/AdminService.cs deleted file mode 100644 index d4da24d0322cc581f5faaf4f2faeb3ac33cc054e..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/AdminService.cs +++ /dev/null @@ -1,183 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using jvncorelib_fr.EncryptorLib; -using SYS.Common; -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; - -namespace SYS.Application -{ - /// - /// 管理员数据访问层 - /// - public class AdminService:Repository, IAdminService - { - EncryptLib encryptLib = new EncryptLib(); - - #region 根据超管密码查询员工类型和权限 - /// - /// 根据超管密码查询员工类型和权限 - /// - /// - /// - public Admin SelectMangerByPass(Admin admin) - { - Admin admins = new Admin(); - admins = base.GetSingle(a => a.AdminAccount == admin.AdminAccount && a.AdminPassword == admin.AdminPassword); - //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; - return admins; - } - #endregion - - #region 根据超管账号查询对应的密码 - /// - /// 根据超管账号查询对应的密码 - /// - /// - /// - public Admin SelectAdminPwdByAccount(string account) - { - Admin admin = new Admin(); - admin = base.GetSingle(a => a.AdminAccount == account); - //admin.AdminPassword = admin.AdminPassword.Contains(":") ? encrypt.DeEncryptStr(admin.AdminPassword) : admin.AdminPassword; - return admin; - } - #endregion - - /// - /// 获取所有管理员列表 - /// - /// - public List GetAllAdminList() - { - var listAdmins = base.GetList(); - var listAdminType = base.Change().GetList(a => a.delete_mk != 1); - listAdmins.ForEach(admins => - { - var isAdminType = admins.IsAdmin == 1 ? "是" : "否"; - admins.IsAdminNm = isAdminType; - - var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admins.AdminType)); - admins.TypeName = adminType == null ? "" : adminType.type_name; - - var adminDelete = admins.DeleteMk == 1 ? "是" : "否"; - admins.DeleteNm = adminDelete; - - }); - - return listAdmins; - } - - /// - /// 修改密码 - /// - /// - /// - public bool UpdateNewPwdByOldPwd(Admin admin) - { - //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - return base.Update(a => new Admin() - { - AdminPassword = admin.AdminPassword, - datachg_usr = AdminInfo.Account, - datachg_time = DateTime.Now - },a => a.AdminAccount == admin.AdminAccount); - } - - /// - /// 获取管理员列表(已启用) - /// - /// - public List GetAllAdmin() - { - var listAdmin = base.GetList(a => a.DeleteMk != 1); - var listAdminType = base.Change().GetList(a => a.delete_mk != 1); - listAdmin.ForEach(admin => - { - var isAdminType = admin.IsAdmin == 1 ? "是" : "否"; - admin.IsAdminNm = isAdminType; - - var adminType = listAdminType.FirstOrDefault(a => a.type_id.Equals(admin.AdminType)); - admin.TypeName = adminType == null ? "" : adminType.type_name; - }); - return listAdmin; - } - - /// - /// 添加管理员 - /// - /// - /// - public bool AddAdmin(Admin admin) - { - //admin.AdminPassword = encrypt.EncryptStr(admin.AdminPassword); - bool result = base.Insert(admin); - return result; - } - - /// - /// 获取管理员信息 - /// - /// - /// - public Admin GetAdminInfoByAdminAccount(Admin admin) - { - var adminInfo = base.GetSingle(a => a.AdminAccount.Equals(admin.AdminAccount)); - if (adminInfo != null) - { - var adminType = base.Change().GetSingle(a => a.type_id.Equals(adminInfo.AdminType)); - adminInfo.TypeName = adminType.type_name; - } - return adminInfo; - } - - /// - /// 获取所有管理员类型 - /// - /// - public List GetAllAdminTypes() - { - var listAdminTypes = base.Change().GetList(a => a.delete_mk != 1); - return listAdminTypes; - } - - /// - /// 更新管理员账户 - /// - /// - /// - public bool UpdAccount(Admin admins) - { - admins.DeleteMk = admins.DeleteMk == 0 ? 1 : 0; - return base.Update(a => new Admin() - { - DeleteMk = admins.DeleteMk - },a => a.Id == admins.Id); - } - - - } -} diff --git a/SYS.Application/Zero/BaseService.cs b/SYS.Application/Zero/BaseService.cs deleted file mode 100644 index 3c01f2f53f3cab452d6e1a5d06e3bd04cf4fb78e..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/BaseService.cs +++ /dev/null @@ -1,685 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using jvncorelib_fr.EntityLib; -using MySql.Data.MySqlClient; -using SqlSugar; -using SYS.Common; -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Linq.Expressions; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 基础信息接口实现类 - /// - public class BaseService: Repository,IBaseService - { - - #region 性别模块 - - /// - /// 查询所有性别类型 - /// - /// - public List SelectSexTypeAll(SexType sexType = null) - { - var where = Expressionable.Create(); - if (sexType != null && sexType.sexName.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == sexType.delete_mk); - } - if (sexType != null && !sexType.sexName.IsNullOrEmpty()) - { - where = where.And(a => a.sexName.Contains(sexType.sexName)); - } - return base.Change().GetList(where.ToExpression()); - } - - /// - /// 查询性别类型 - /// - /// - public SexType SelectSexType(SexType sexType) - { - SexType sexTypes = new SexType(); - sexTypes = base.GetSingle(a => a.sexId == sexType.sexId); - return sexTypes; - } - - /// - /// 添加性别类型 - /// - /// - /// - public bool AddSexType(SexType sexType) - { - return base.Insert(sexType); - } - - /// - /// 删除性别类型 - /// - /// - /// - public bool DelSexType(SexType sexType) - { - return base.Update(a => new SexType() - { - delete_mk = sexType.delete_mk, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.sexId == sexType.sexId); - } - - /// - /// 更新性别类型 - /// - /// - /// - public bool UpdSexType(SexType sexType) - { - return base.Update(a => new SexType() - { - sexName = sexType.sexName, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.sexId == sexType.sexId); - } - - #endregion - - #region 职位模块 - - /// - /// 查询所有职位类型 - /// - /// - public List SelectPositionAll(Position position = null) - { - var where = Expressionable.Create(); - if (position != null && position.position_name.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == position.delete_mk); - } - if (position != null && !position.position_name.IsNullOrEmpty()) - { - where = where.And(a => a.position_name.Contains(position.position_name)); - } - return base.Change().GetList(where.ToExpression()); - } - - /// - /// 查询职位类型 - /// - /// - public Position SelectPosition(Position position) - { - Position position1 = new Position(); - position1 = base.Change().GetSingle(a => a.position_no == position.position_no); - return position1; - } - - /// - /// 添加职位类型 - /// - /// - /// - public bool AddPosition(Position position) - { - return base.Change().Insert(position); - } - - /// - /// 删除职位类型 - /// - /// - /// - public bool DelPosition(Position position) - { - return base.Change().Update(a => new Position() - { - delete_mk = position.delete_mk, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.position_no == position.position_no); - } - - /// - /// 更新职位类型 - /// - /// - /// - public bool UpdPosition(Position position) - { - return base.Change().Update(a => new Position() - { - position_name = position.position_name, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.position_no == position.position_no); - } - - #endregion - - #region 民族模块 - - /// - /// 查询所有民族类型 - /// - /// - public List SelectNationAll(Nation nation = null) - { - var where = Expressionable.Create(); - if (nation != null && nation.nation_name.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == nation.delete_mk); - } - if (nation != null && !nation.nation_name.IsNullOrEmpty()) - { - where = where.And(a => a.nation_name.Contains(nation.nation_name)); - } - return base.Change().GetList(where.ToExpression()); - } - - /// - /// 查询民族类型 - /// - /// - public Nation SelectNation(Nation nation) - { - Nation nation1 = new Nation(); - nation1 = base.Change().GetSingle(a => a.nation_no.Equals(nation.nation_no)); - return nation1; - } - - /// - /// 添加民族类型 - /// - /// - /// - public bool AddNation(Nation nation) - { - return base.Change().Insert(nation); - } - - /// - /// 删除民族类型 - /// - /// - /// - public bool DelNation(Nation nation) - { - return base.Change().Update(a => new Nation() - { - delete_mk = nation.delete_mk, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.nation_no.Equals(nation.nation_no)); - - } - - /// - /// 更新民族类型 - /// - /// - /// - public bool UpdNation(Nation nation) - { - return base.Change().Update(a => new Nation() - { - nation_name = nation.nation_name, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.nation_no.Equals(nation.nation_no)); - } - - #endregion - - #region 学历模块 - - /// - /// 查询所有学历类型 - /// - /// - public List SelectEducationAll(Education education = null) - { - var where = Expressionable.Create(); - if (education != null && education.education_name.IsNullOrEmpty()) - { - where = where.And(a => a.delete_mk == education.delete_mk); - } - if (education != null && !education.education_name.IsNullOrEmpty()) - { - where = where.And(a => a.education_name.Contains(education.education_name)); - } - return base.Change().GetList(where.ToExpression()); - } - - /// - /// 查询学历类型 - /// - /// - public Education SelectEducation(Education education) - { - Education education1 = new Education(); - education1 = base.Change().GetSingle(a => a.education_no == education.education_no); - return education1; - } - - /// - /// 添加学历类型 - /// - /// - /// - public bool AddEducation(Education education) - { - return base.Change().Insert(education); - } - - /// - /// 删除学历类型 - /// - /// - /// - public bool DelEducation(Education education) - { - return base.Change().Update(a => new Education() - { - delete_mk = education.delete_mk, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.education_no == education.education_no); - } - - /// - /// 更新学历类型 - /// - /// - /// - public bool UpdEducation(Education education) - { - return base.Change().Update(a => new Education() - { - education_name = education.education_name, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - }, a => a.education_no == education.education_no); - } - - #endregion - - #region 部门模块 - - /// - /// 查询所有部门类型(可用) - /// - /// - public List SelectDeptAllCanUse() - { - List workers = new List(); - workers = base.Change().GetList(a => a.delete_mk != 1); - List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); - depts.ForEach(source => - { - var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); - source.parent_name = dept == null || string.IsNullOrEmpty(dept.dept_name) ? "无" : dept.dept_name; - var leader = workers.FirstOrDefault(a => source.dept_leader != null && a.WorkerId == source.dept_leader); - source.leader_name = leader == null || string.IsNullOrEmpty(leader.WorkerName) ? "无" : leader.WorkerName; - - }); - return depts; - } - - /// - /// 查询所有部门类型 - /// - /// - public List SelectDeptAll() - { - List workers = new List(); - workers = base.Change().GetList(a => a.delete_mk != 1); - List depts = new List(); - depts = base.Change().GetList(a => a.delete_mk != 1); - depts.ForEach(source => - { - var dept = depts.FirstOrDefault(a => a.dept_no == source.dept_parent); - source.parent_name = dept == null ? "" : dept.dept_name; - var leader = workers.FirstOrDefault(a => source.dept_leader != null && a.WorkerId == source.dept_leader); - source.leader_name = leader == null ? "" : leader.WorkerName; - }); - return depts; - } - - /// - /// 查询部门类型 - /// - /// - public Dept SelectDept(Dept dept) - { - Dept dept1 = new Dept(); - dept1 = base.Change().GetSingle(a => a.dept_no.Equals(dept.dept_no)); - return dept1; - } - - /// - /// 添加部门类型 - /// - /// - /// - public bool AddDept(Dept dept) - { - return base.Change().Insert(dept); - } - - /// - /// 删除部门类型 - /// - /// - /// - public bool DelDept(Dept dept) - { - return base.Change().Update(a => new Dept() - { - delete_mk = 1, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.dept_no == dept.dept_no); - } - - /// - /// 更新部门类型 - /// - /// - /// - public bool UpdDept(Dept dept) - { - return base.Change().Update(a => new Dept() - { - dept_name = dept.dept_name, - dept_desc = dept.dept_desc, - dept_leader = dept.dept_leader, - dept_parent = dept.dept_parent, - datachg_usr = LoginInfo.WorkerNo, - datachg_date = DateTime.Now - },a => a.dept_no == dept.dept_no); - } - - #endregion - - #region 客户类型模块 - - /// - /// 查询所有客户类型(可用) - /// - /// - public List SelectCustoTypeAllCanUse() - { - List custoTypes = new List(); - custoTypes = base.Change().GetList(a => a.delete_mk != 1); - return custoTypes; - } - - /// - /// 查询所有客户类型 - /// - /// - public List SelectCustoTypeAll() - { - List custoTypes = new List(); - custoTypes = base.Change().GetList(); - return custoTypes; - } - - /// - /// 根据客户类型ID查询类型名称 - /// - /// - /// - public CustoType SelectCustoTypeByTypeId(CustoType custoType) - { - CustoType custoTypes = new CustoType(); - custoType = base.Change().GetSingle(a => a.UserType == custoType.UserType && a.delete_mk != 1); - return custoTypes; - } - - /// - /// 添加客户类型 - /// - /// - /// - public bool InsertCustoType(CustoType custoType) - { - return base.Change().Insert(custoType); - } - - /// - /// 删除客户类型 - /// - /// - /// - public bool DeleteCustoType(CustoType custoType) - { - return base.Change().Update(a => new CustoType() - { - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - },a => a.UserType == custoType.UserType); - } - - /// - /// 更新客户类型 - /// - /// - /// - public bool UpdateCustoType(CustoType custoType) - { - return base.Change().Update(a => new CustoType() - { - TypeName = custoType.TypeName, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - },a => a.UserType == custoType.UserType); - } - - #endregion - - #region 证件类型模块 - - /// - /// 查询所有证件类型(可用) - /// - /// - public List SelectPassPortTypeAllCanUse() - { - List passPortTypes = new List(); - passPortTypes = base.Change().GetList(a => a.delete_mk != 1); - return passPortTypes; - } - - /// - /// 查询所有证件类型 - /// - /// - public List SelectPassPortTypeAll() - { - List passPortTypes = new List(); - passPortTypes = base.Change().GetList(); - return passPortTypes; - } - - /// - /// 根据证件类型ID查询类型名称 - /// - /// - /// - public PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType) - { - PassPortType passPortType1 = new PassPortType(); - passPortType1 = base.Change().GetSingle(a => a.PassportId == passPortType.PassportId && a.delete_mk != 1); - return passPortType1; - } - - /// - /// 添加证件类型 - /// - /// - /// - public bool InsertPassPortType(PassPortType passPortType) - { - return base.Change().Insert(passPortType); - } - - /// - /// 删除证件类型 - /// - /// - /// - public bool DeletePassPortType(PassPortType portType) - { - return base.Change().Update(a => new PassPortType() - { - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.PassportId == portType.PassportId); - } - - /// - /// 更新证件类型 - /// - /// - /// - public bool UpdatePassPortType(PassPortType portType) - { - return base.Change().Update(a => new PassPortType() - { - PassportName = portType.PassportName, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.PassportId == portType.PassportId); - } - - #endregion - - #region 奖惩类型模块 - - /// - /// 查询所有奖惩类型(可用) - /// - /// - public List SelectGBTypeAllCanUse() - { - List gBTypes = new List(); - gBTypes = base.Change().GetList(a => a.delete_mk != 1); - return gBTypes; - } - - /// - /// 查询所有奖惩类型 - /// - /// - public List SelectGBTypeAll() - { - List gBTypes = new List(); - gBTypes = base.Change().GetList(); - return gBTypes; - } - - /// - /// 根据奖惩类型ID查询类型名称 - /// - /// - /// - public GBType SelectGBTypeByTypeId(GBType gBType) - { - GBType gBType1 = new GBType(); - gBType1 = base.Change().GetSingle(a => a.GBTypeId == gBType.GBTypeId && a.delete_mk != 1); - return gBType1; - } - - /// - /// 添加奖惩类型 - /// - /// - /// - public bool InsertGBType(GBType gBType) - { - return base.Change().Insert(gBType); - } - - /// - /// 删除奖惩类型 - /// - /// - /// - public bool DeleteGBType(GBType gBType) - { - return base.Change().Update(a => new GBType() - { - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.GBTypeId == gBType.GBTypeId); - } - - /// - /// 更新奖惩类型 - /// - /// - /// - public bool UpdateGBType(GBType gBType) - { - return base.Change().Update(a => new GBType() - { - GBName = gBType.GBName, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.GBTypeId == gBType.GBTypeId); - } - - #endregion - - #region URL模块 - /// - /// 基础URL - /// - /// - public Base GetBase() - { - var baseTemp = new Base(); - - baseTemp = base.Change().GetSingle(a => a.url_no == 1); - - return baseTemp; - } - #endregion - } -} diff --git a/SYS.Application/Zero/CheckInfoService.cs b/SYS.Application/Zero/CheckInfoService.cs deleted file mode 100644 index 34e406fcd8558391bcaf94ba20286c73b57ed52c..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/CheckInfoService.cs +++ /dev/null @@ -1,49 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Data.SqlClient; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 监管统计接口实现类 - /// - public class CheckInfoService:Repository, ICheckInfoService - { - /// - /// 查询所有监管统计信息 - /// - /// - public List SelectCheckInfoAll() - { - List cif = new List(); - cif = base.GetList(a => a.delete_mk != 1); - return cif; - } - } -} diff --git a/SYS.Application/Zero/IAdminModuleZeroService.cs b/SYS.Application/Zero/IAdminModuleZeroService.cs deleted file mode 100644 index 4db85921e510b0a7eb58de3787e968cfaf66b8af..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/IAdminModuleZeroService.cs +++ /dev/null @@ -1,43 +0,0 @@ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 管理员模块权限管理接口 - /// - public interface IAdminModuleZeroService - { - /// - /// 获取所有模块 - /// - /// - List GetAllModule(); - - /// - /// 根据账号获取对应模块 - /// - /// - /// - List GetAllModuleByAdmin(Admin admin); - - /// - /// 批量添加模块 - /// - /// - /// - bool AddModuleZeroList(List moduleZeros); - - /// - /// 批量删除模块 - /// - /// - /// - bool DelModuleZeroList(ModuleZero moduleZero); - - } -} diff --git a/SYS.Application/Zero/IAdminService.cs b/SYS.Application/Zero/IAdminService.cs deleted file mode 100644 index 4e62b3f5217e22d45f19a6610d88fa7f852ce02c..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/IAdminService.cs +++ /dev/null @@ -1,100 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 管理员数据访问接口 - /// - public interface IAdminService - { - - #region 根据超管密码查询员工类型和权限 - /// - /// 根据超管密码查询员工类型和权限 - /// - /// - /// - Admin SelectMangerByPass(Admin admin); - #endregion - - - #region 根据超管账号查询对应的密码 - /// - /// 根据超管账号查询对应的密码 - /// - /// - /// - Admin SelectAdminPwdByAccount(string account); - #endregion - - /// - /// 获取所有管理员列表 - /// - /// - List GetAllAdminList(); - - /// - /// 修改密码 - /// - /// - /// - bool UpdateNewPwdByOldPwd(Admin admin); - - /// - /// 获取管理员列表 - /// - /// - List GetAllAdmin(); - - /// - /// 添加管理员 - /// - /// - /// - bool AddAdmin(Admin admin); - - /// - /// 获取管理员信息 - /// - /// - /// - Admin GetAdminInfoByAdminAccount(Admin admin); - - /// - /// 获取所有管理员类型 - /// - /// - List GetAllAdminTypes(); - - /// - /// 批量更新管理员账户 - /// - /// - /// - bool UpdAccount(Admin admins); - } -} \ No newline at end of file diff --git a/SYS.Application/Zero/IBaseService.cs b/SYS.Application/Zero/IBaseService.cs deleted file mode 100644 index 02bb56af260c3f3723312127f05bbe0b1d2ce70c..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/IBaseService.cs +++ /dev/null @@ -1,369 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application -{ - /// - /// 基础信息接口 - /// - public interface IBaseService - { - #region 性别模块 - - /// - /// 查询所有性别类型 - /// - /// - List SelectSexTypeAll(SexType sexType = null); - - /// - /// 查询性别类型 - /// - /// - SexType SelectSexType(SexType sexType); - - /// - /// 添加性别类型 - /// - /// - /// - bool AddSexType(SexType sexType); - - /// - /// 删除性别类型 - /// - /// - /// - bool DelSexType(SexType sexType); - - /// - /// 更新性别类型 - /// - /// - /// - bool UpdSexType(SexType sexType); - - #endregion - - #region 职位模块 - - /// - /// 查询所有职位类型 - /// - /// - List SelectPositionAll(Position position = null); - - /// - /// 查询职位类型 - /// - /// - Position SelectPosition(Position position); - - /// - /// 添加职位类型 - /// - /// - /// - bool AddPosition(Position position); - - /// - /// 删除职位类型 - /// - /// - /// - bool DelPosition(Position position); - - /// - /// 更新职位类型 - /// - /// - /// - bool UpdPosition(Position position); - - #endregion - - #region 民族模块 - - /// - /// 查询所有民族类型 - /// - /// - List SelectNationAll(Nation nation = null); - - /// - /// 查询民族类型 - /// - /// - Nation SelectNation(Nation nation); - - /// - /// 添加民族类型 - /// - /// - /// - bool AddNation(Nation nation); - - /// - /// 删除民族类型 - /// - /// - /// - bool DelNation(Nation nation); - - /// - /// 更新民族类型 - /// - /// - /// - bool UpdNation(Nation nation); - - #endregion - - #region 学历模块 - - /// - /// 查询所有学历类型 - /// - /// - List SelectEducationAll(Education education = null); - - /// - /// 查询学历类型 - /// - /// - Education SelectEducation(Education education); - - /// - /// 添加学历类型 - /// - /// - /// - bool AddEducation(Education education); - - /// - /// 删除学历类型 - /// - /// - /// - bool DelEducation(Education education); - - /// - /// 更新学历类型 - /// - /// - /// - bool UpdEducation(Education education); - - #endregion - - #region 部门模块 - - /// - /// 查询所有部门类型(可用) - /// - /// - List SelectDeptAllCanUse(); - - /// - /// 查询所有部门类型 - /// - /// - List SelectDeptAll(); - - /// - /// 查询部门类型 - /// - /// - Dept SelectDept(Dept dept); - - /// - /// 添加部门类型 - /// - /// - /// - bool AddDept(Dept dept); - - /// - /// 删除部门类型 - /// - /// - /// - bool DelDept(Dept dept); - - /// - /// 更新部门类型 - /// - /// - /// - bool UpdDept(Dept dept); - - #endregion - - #region 客户类型模块 - - /// - /// 查询所有客户类型(可用) - /// - /// - List SelectCustoTypeAllCanUse(); - - /// - /// 查询所有客户类型 - /// - /// - List SelectCustoTypeAll(); - - /// - /// 根据客户类型ID查询类型名称 - /// - /// - /// - CustoType SelectCustoTypeByTypeId(CustoType custoType); - - /// - /// 添加客户类型 - /// - /// - /// - bool InsertCustoType(CustoType custoType); - - /// - /// 删除客户类型 - /// - /// - /// - bool DeleteCustoType(CustoType custoType); - - /// - /// 更新客户类型 - /// - /// - /// - bool UpdateCustoType(CustoType custoType); - - #endregion - - #region 证件类型模块 - - /// - /// 查询所有证件类型(可用) - /// - /// - List SelectPassPortTypeAllCanUse(); - - /// - /// 查询所有证件类型 - /// - /// - List SelectPassPortTypeAll(); - - /// - /// 根据证件类型ID查询类型名称 - /// - /// - /// - PassPortType SelectPassPortTypeByTypeId(PassPortType passPortType); - - /// - /// 添加证件类型 - /// - /// - /// - bool InsertPassPortType(PassPortType passPortType); - - /// - /// 删除证件类型 - /// - /// - /// - bool DeletePassPortType(PassPortType portType); - - /// - /// 更新证件类型 - /// - /// - /// - bool UpdatePassPortType(PassPortType portType); - - #endregion - - #region 奖惩类型模块 - - /// - /// 查询所有证件类型(可用) - /// - /// - List SelectGBTypeAllCanUse(); - - /// - /// 查询所有奖惩类型 - /// - /// - List SelectGBTypeAll(); - - /// - /// 根据奖惩类型ID查询类型名称 - /// - /// - /// - GBType SelectGBTypeByTypeId(GBType gBType); - - /// - /// 添加奖惩类型 - /// - /// - /// - bool InsertGBType(GBType gBType); - - /// - /// 删除奖惩类型 - /// - /// - /// - bool DeleteGBType(GBType gBType); - - /// - /// 更新奖惩类型 - /// - /// - /// - bool UpdateGBType(GBType gBType); - - #endregion - - #region URL模块 - /// - /// 基础URL - /// - /// - Base GetBase(); - #endregion - } -} diff --git a/SYS.Application/Zero/INoticeService.cs b/SYS.Application/Zero/INoticeService.cs deleted file mode 100644 index f1763298053a3a906a6e4910799eb947b43d9138..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/INoticeService.cs +++ /dev/null @@ -1,53 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System.Collections.Generic; - -namespace SYS.Application -{ - /// - /// 公告接口 - /// - public interface INoticeService - { - #region 获取所有公告信息 - /// - /// 获取所有公告信息 - /// - /// - List SelectNoticeAll(); - #endregion - - - #region 上传公告信息 - /// - /// 上传公告信息 - /// - /// - /// - bool InsertNotice(Notice notice); - - #endregion - } -} \ No newline at end of file diff --git a/SYS.Application/Zero/NoticeService.cs b/SYS.Application/Zero/NoticeService.cs deleted file mode 100644 index b0802e0a832d2da64954b0f70d53b2e8f72ffb38..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/NoticeService.cs +++ /dev/null @@ -1,97 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using SYS.Common; -using SYS.Core; - -namespace SYS.Application -{ - /// - /// 公告信息接口实现类 - /// - public class NoticeService:Repository, INoticeService - { - #region 获取所有公告信息 - /// - /// 获取所有公告信息 - /// - /// - public List SelectNoticeAll() - { - List ntc = new List(); - ntc = base.GetList(a => a.delete_mk != 1); - ntc.ForEach(source => - { - switch (source.NoticeType) - { - case "PersonnelChanges": - source.NoticeTypeName = "人事变动"; - break; - case "GeneralNotice": - source.NoticeTypeName = "普通公告"; - break; - } - }); - return ntc; - } - #endregion - - /// - /// 根据公告编号查找公告信息 - /// - /// - /// - public Notice SelectNoticeByNoticeNo(string NoticeNo) - { - Notice notice = new Notice(); - notice = base.GetSingle(a => a.NoticeNo == NoticeNo); - switch (notice.NoticeType) - { - case "PersonnelChanges": - notice.NoticeTypeName = "人事变动"; - break; - case "GeneralNotice": - notice.NoticeTypeName = "普通公告"; - break; - } - return notice; - } - - #region 上传公告信息 - /// - /// 上传公告信息 - /// - /// - /// - public bool InsertNotice(Notice notice) - { - return base.Insert(notice); - } - - #endregion - - } -} diff --git a/SYS.Application/Zero/OperationService.cs b/SYS.Application/Zero/OperationService.cs deleted file mode 100644 index 9d9feb8b2a933aa46c6b09106ccf7044d5d78e2b..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/OperationService.cs +++ /dev/null @@ -1,23 +0,0 @@ -using System.Data; -using MySql.Data.MySqlClient; -using SYS.Core; - -namespace SYS.Application -{ - public class OperationService - { - public static int InsertOperationLog(Operation opr) - { - int n = 0; - string sql = "insert OPERATIONLOG(OperationTime,OperationLog,OperationAccount) values(@OperationTime," + - "@OperationLog,@OperationAccount)"; - n = DBHelper.ExecuteNonQuery(sql, CommandType.Text, - new MySqlParameter[] { - new MySqlParameter("@OperationTime",opr.OperationTime), - new MySqlParameter("@OperationLog",opr.Operationlog), - new MySqlParameter("@OperationAccount",opr.OperationAccount), - }); - return n; - } - } -} diff --git a/SYS.Application/Zero/Operationlog.cs b/SYS.Application/Zero/Operationlog.cs deleted file mode 100644 index db8a08cc042e96a308ac0b29bf6cbb7d6973cad4..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/Operationlog.cs +++ /dev/null @@ -1,30 +0,0 @@ -using System; -using System.Collections.Generic; -using MySql.Data.MySqlClient; -using SYS.Core; - -namespace SYS.Application -{ - public class Operationlog - { - public static List SelectOperationlogAll() - { - List custos = new List(); - string sql = "select * from operationlog order by OperationTime desc"; - MySqlDataReader dr = DBHelper.ExecuteReader(sql); - while (dr.Read()) - { - OperationLog cso = new OperationLog(); - cso.OperationTime = DateTime.Parse(dr["OperationTime"].ToString()); - cso.Operationlog = dr["Operationlog"].ToString(); - cso.OperationAccount = (string)dr["OperationAccount"]; - custos.Add(cso); - } - dr.Close(); - DBHelper.Closecon(); - return custos; - } - - - } -} diff --git a/SYS.Application/Zero/VipRule/IVipRuleAppService.cs b/SYS.Application/Zero/VipRule/IVipRuleAppService.cs deleted file mode 100644 index e37547659998c40f5769e78f5dbb507fda77c50b..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/VipRule/IVipRuleAppService.cs +++ /dev/null @@ -1,73 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - *模块说明:会员等级规则功能模块接口 - */ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application.Zero -{ - /// - /// 会员等级规则功能模块接口 - /// - public interface IVipRuleAppService - { - /// - /// 查询会员等级规则列表 - /// - /// - List SelectVipRuleList(); - - /// - /// 查询会员等级规则 - /// - /// - /// - VipRule SelectVipRule(VipRule vipRule); - - /// - /// 添加会员等级规则 - /// - /// - /// - bool AddVipRule(VipRule vipRule); - - /// - /// 删除会员等级规则 - /// - /// - /// - bool DelVipRule(VipRule vipRule); - - /// - /// 更新会员等级规则 - /// - /// - /// - bool UpdVipRule(VipRule vipRule); - } -} diff --git a/SYS.Application/Zero/VipRule/VipRuleAppService.cs b/SYS.Application/Zero/VipRule/VipRuleAppService.cs deleted file mode 100644 index 77ba716b890ba3ed7fb47aeca84dcb27b26b7d15..0000000000000000000000000000000000000000 --- a/SYS.Application/Zero/VipRule/VipRuleAppService.cs +++ /dev/null @@ -1,109 +0,0 @@ -using SYS.Common; -using SYS.Core; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Application.Zero -{ - /// - /// 会员等级规则功能模块接口实现类 - /// - public class VipRuleAppService:Repository, IVipRuleAppService - { - /// - /// 查询会员等级规则列表 - /// - /// - public List SelectVipRuleList() - { - List vipRules = new List(); - - var listSource = base.GetList(a => a.delete_mk != 1); - - var listUserType = base.Change().GetList(a => a.delete_mk != 1); - - listSource.ForEach(source => - { - var userType = listUserType.FirstOrDefault(a => a.UserType == source.type_id); - source.type_name = userType == null ? "" : userType.TypeName; - }); - - vipRules = listSource; - - return vipRules; - } - - /// - /// 查询会员等级规则 - /// - /// - /// - public VipRule SelectVipRule(VipRule vipRule) - { - VipRule vipRule1 = new VipRule(); - - var source = base.GetSingle(a => a.rule_id.Equals(vipRule.rule_id)); - - var userType = base.Change().GetSingle(a => a.UserType == source.type_id); - source.type_name = userType == null ? "" : userType.TypeName; - - vipRule1 = source; - - return vipRule1; - } - - /// - /// 添加会员等级规则 - /// - /// - /// - public bool AddVipRule(VipRule vipRule) - { - return base.Insert(new VipRule() - { - rule_id = vipRule.rule_id, - rule_name = vipRule.rule_name, - rule_value = vipRule.rule_value, - type_id = vipRule.type_id, - delete_mk = 0, - datains_usr = AdminInfo.Account, - datains_date = DateTime.Now - }); - } - - /// - /// 删除会员等级规则 - /// - /// - /// - public bool DelVipRule(VipRule vipRule) - { - return base.Update(a => new VipRule - { - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - },a => a.rule_id == vipRule.rule_id); - } - - /// - /// 更新会员等级规则 - /// - /// - /// - public bool UpdVipRule(VipRule vipRule) - { - return base.Update(a => new VipRule - { - rule_name = vipRule.rule_name, - rule_value = vipRule.rule_value, - delete_mk = vipRule.delete_mk, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }, a => a.rule_id == vipRule.rule_id); - } - } -} diff --git a/SYS.Application/app.config b/SYS.Application/app.config deleted file mode 100644 index 98950b263850f99bfec78f76f10410545551624a..0000000000000000000000000000000000000000 --- a/SYS.Application/app.config +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SYS.Application/bitbug_favicon (1).ico b/SYS.Application/bitbug_favicon (1).ico deleted file mode 100644 index deaead31de45df54f39388e2b4727a00a4f99eca..0000000000000000000000000000000000000000 Binary files a/SYS.Application/bitbug_favicon (1).ico and /dev/null differ diff --git a/SYS.Application/packages.config b/SYS.Application/packages.config deleted file mode 100644 index aa44b2e962e0c0cfdd354ea830b7d5a98d8069de..0000000000000000000000000000000000000000 --- a/SYS.Application/packages.config +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git "a/SYS.Application/\345\237\272\347\241\200\346\240\270\345\277\203\347\261\273\345\272\223jvncorelib(\351\200\202\347\224\250\345\205\250\345\271\263\345\217\260).md" "b/SYS.Application/\345\237\272\347\241\200\346\240\270\345\277\203\347\261\273\345\272\223jvncorelib(\351\200\202\347\224\250\345\205\250\345\271\263\345\217\260).md" deleted file mode 100644 index 76261612e40c767b9fc87ebe7ce4db967f14d363..0000000000000000000000000000000000000000 --- "a/SYS.Application/\345\237\272\347\241\200\346\240\270\345\277\203\347\261\273\345\272\223jvncorelib(\351\200\202\347\224\250\345\205\250\345\271\263\345\217\260).md" +++ /dev/null @@ -1,122 +0,0 @@ -## 基础核心类库jvncorelib(适用全平台) - -### 一、安装部署 - -#### 1、打开管理Nu-get包命令行,输入如下代码: - -```C# -Install-Package jvncorelib -Version 1.0.1.7 -``` - -#### 2、安装完成后,在需要用到的地方写上如下代码: - -```C# -using jvncorelib; //.Net Core3.1+/.Net 5引用,默认加载所有类库,按需引入请查看“引用参照表” -using jvncorelib_fr; //.Net Framework 4.6+引用,默认加载所有类库,按需引入请查看“引用参照表” - -static void Main(string[] args) -{ - #region 加/解密 - EncryptLib encryptLib= new EncryptLib(); - var str = "需要加密的字符串!"; - //获得加密后的字符串 - var encryptedStr = encryptLib.Encryption(str); - Console.WriteLine(encryptedStr); - //解密加密后的字符串 - var deEncryptStr = encryptLib.Decryption(encryptedStr); - //对比密文 - var str1 = "需要加密的字符串!"; - var encryptedSt1r = encryptLib.Encryption(str1); - var result = encryptLib.Compare(encryptedStr,encryptedSt1r); - Console.WriteLine(deEncryptStr); - #endregion - - #region 流水号生成 - UniqueCode uniqueCode= new UniqueCode(); - //生成不带业务前缀的普通流水号 - List result = uniqueCode.GetListNewId(10); - //生成带业务前缀的业务流水号(多条) - result = uniqueCode.GetListNewId("JVN",10); - //生成带业务前缀的业务流水号(单条) - string _result = uniqueCode.GetNewId("JVN"); - Console.WriteLine(string.Join("\n",result)); - Console.WriteLine(result); - #endregion - - #region 实体扩展类库 - var value = string.Empty; - var result = value.IsNullOrEmpty() ? false : true; - #endregion - - #region 时间类库 - var result = "2021-5-6 12:00:59"; - var newResult = TimeExtend.StringFormat(result); - var result = DateTime.Now; - var newResult = TimeExtend.DateTimeFormat(result,TimeType); - Console.WriteLine(newResult); - var result1 = TimeExtend.GetFirstAndLastDate(DateClass.Month,new DateTime(2021,4,15)); - Console.WriteLine(result1.StartDate + "-" + result1.EndDate); - var listDateTime = TimeExtend.GetDateRange(startDate,endDate,RangeType.Month); - #endregion - - #region GUID扩展类库 - var result = new List(); - for (int i = 0; i < 2000; i++) - { - result.Add(new GuidExtend().GetGUID(Word.UpperCase,true)); - result.Add(new GuidExtend().GetGUID(Word.LowCase,"AA-")); - } - Console.WriteLine(string.Join("\n",result)); - #endregion -} - -#region Http请求工具类 -RequestUtil util = new RequestUtil(); -Dictionary keyValuePairs = new Dictionary(); -keyValuePairs.Add("id", "1"); -var checkInfo = new CheckInfo -{ - WorkerNo = "WK010", - CheckTime = DateTime.Now.ToLocalTime(), - CheckWay = "系统界面2333333333333333", - CheckState = 0 -}; -var finalJSON = util.ObjectToJson(checkInfo); -var result = util.DoGet("http://localhost:33610/api/Base/Base", keyValuePairs); -var postResult = util.DoPost("http://localhost:36101/api/WorkerCheck/AddCheckInfo", finalJSON); -Console.WriteLine(string.Join("\n",result)); -#endregion -``` - -### 二、引用参照表(仅针对1.0.1.1之后版本) - -| 类库名称 | 命名空间(.Net Core 3.1+/.Net 5) | 命名空间(.Net Framework 4.6+) | -| :------------: | :-----------------------------: | :-------------------------------: | -| 流水号生成类库 | using jvncorelib.CodeLib; | using jvncorelib_fr.CodeLib; | -| 信息加密类库 | using jvncorelib. EncryptorLib; | using jvncorelib_fr.EncryptorLib; | -| 实体扩展类库 | using jvncorelib. EntityLib; | using jvncorelib_fr.EntityLib; | -| 时间类库 | using jvncorelib. TimeLib; | using jvncorelib_fr.TimeLib; | -| GUID扩展类库 | using jvncorelib. GuidLib; | using jvncorelib_fr.GuidLib; | -| Http请求工具类 | using jvncorelib.HttpLib; | using jvncorelib_fr.HttpLib; | - -### 三、历史版本参照表(倒序) - -| 包名 | 版本号 | 更新日志 | 命令行 | -| :--------: | :-----: | :------------------------------------------------: | :-----------------------------------------: | -| jvncorelib | 1.0.1.7 | 加密类库新增加密级别枚举,新增“增强”加密级别的加密 | Install-Package jvncorelib -Version 1.0.1.7 | -| jvncorelib | 1.0.1.6 | 加密类库新增密文对比方法 | Install-Package jvncorelib -Version 1.0.1.6 | -| jvncorelib | 1.0.1.5 | 新增Http请求工具类;时间类库优化扩展; | Install-Package jvncorelib -Version 1.0.1.5 | -| jvncorelib | 1.0.1.4 | 新增实体扩展类库、时间类库;新增GUID扩展类库; | Install-Package jvncorelib -Version 1.0.1.4 | -| jvncorelib | 1.0.1.2 | 类库支持按需引入 | Install-Package jvncorelib -Version 1.0.1.2 | -| jvncorelib | 1.0.1.1 | 整合加密类库;完善优化流水号类库; | Install-Package jvncorelib -Version 1.0.1.1 | -| jvncorelib | 1.0.0.1 | 初始化项目;新增流水号类库; | Install-Package jvncorelib -Version 1.0.0.1 | -| jvncorelib | 1.0.0 | 初始化项目; | Install-Package jvncorelib -Version 1.0.0 | - - - -### 四、说明: - -### 1、如有任何疑问,请点击右侧链接【[Contact owners](https://www.nuget.org/packages/jvncorelib/1.0.1.7/ContactOwners)】联系作者! - -### 2、想查看更详细的更新内容,请浏览[CHANGELOG.md](https://gitee.com/java-and-net/encrypt-tools/blob/master/CHANGELOG.md)! - diff --git a/SYS.Common/RecordHelper/AdminInfo.cs b/SYS.Common/AdminInfo.cs similarity index 97% rename from SYS.Common/RecordHelper/AdminInfo.cs rename to SYS.Common/AdminInfo.cs index 82ca19f9650a325da38f137b2e7002f71aff8fdf..cb06f6959d91fa1697c3a23c66f44882c1eac081 100644 --- a/SYS.Common/RecordHelper/AdminInfo.cs +++ b/SYS.Common/AdminInfo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *Copyright (c) 2021 易开元(Easy-Open-Meta) *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal diff --git a/SYS.Common/RecordHelper/LoginInfo.cs b/SYS.Common/LoginInfo.cs similarity index 97% rename from SYS.Common/RecordHelper/LoginInfo.cs rename to SYS.Common/LoginInfo.cs index 4a5559ced807e896d9107679a5c1a7d78992fd34..44877553e253d082781624ddfddb1fec94be866f 100644 --- a/SYS.Common/RecordHelper/LoginInfo.cs +++ b/SYS.Common/LoginInfo.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *Copyright (c) 2021 易开元(Easy-Open-Meta) *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal diff --git a/SYS.Common/RecordHelper/OperationLog.cs b/SYS.Common/OperationLog.cs similarity index 80% rename from SYS.Common/RecordHelper/OperationLog.cs rename to SYS.Common/OperationLog.cs index c4418f51253ef2ca4a2e125576538ef913610845..bfd7c182b1b06823e0ddbf2ecc286f5101e88a1f 100644 --- a/SYS.Common/RecordHelper/OperationLog.cs +++ b/SYS.Common/OperationLog.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *Copyright (c) 2021 易开元(Easy-Open-Meta) *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal @@ -50,43 +50,35 @@ namespace SYS.Common /// /// 操作日志 /// - [SqlSugar.SugarTable("operationlog")] public class OperationLog { /// /// 操作时间 /// - [SqlSugar.SugarColumn(ColumnName = "OperationTime")] - public DateTime OperationTime { get; set; } + public DateTime? OperationTime { get; set; } /// /// 操作信息 /// - [SqlSugar.SugarColumn(ColumnName = "LogContent")] public string LogContent { get; set; } /// /// 操作账号 /// - [SqlSugar.SugarColumn(ColumnName = "OperationAccount")] public string OperationAccount { get; set; } /// /// 日志等级 /// - [SqlSugar.SugarColumn(ColumnName = "OperationLevel")] public RecordLevel OperationLevel { get; set; } /// /// 删除标记 /// - [SqlSugar.SugarColumn(ColumnName = "delete_mk")] public int delete_mk { get; set; } /// /// 软件版本 /// - [SqlSugar.SugarColumn(ColumnName = "SoftwareVersion")] public string SoftwareVersion { get; set; } /// /// 登录IP /// - [SqlSugar.SugarColumn(ColumnName = "login_ip")] public string login_ip { get; set; } /// 资料创建人 /// @@ -94,7 +86,7 @@ namespace SYS.Common /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -102,12 +94,11 @@ namespace SYS.Common /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 日志等级 /// - [SqlSugar.SugarColumn(IsIgnore = true)] public string OperationLevelNm { get; set; } } diff --git a/SYS.Common/RecordHelper/RecordHelper.cs b/SYS.Common/RecordHelper.cs similarity index 79% rename from SYS.Common/RecordHelper/RecordHelper.cs rename to SYS.Common/RecordHelper.cs index 27fb291139fd10e6b1bb74aa9d2b2a001eec4708..88cdffe2c6f63a25329d30c32419276a6e5224e7 100644 --- a/SYS.Common/RecordHelper/RecordHelper.cs +++ b/SYS.Common/RecordHelper.cs @@ -10,20 +10,20 @@ namespace SYS.Common /// /// 日志记录助手 /// - public static class RecordHelper + public class RecordHelper { - /// /// 记录信息集合 /// /// /// - public static void Record(string OperationLog, int level) + public static void Record(string operationLog, int level) { + string api = "App/AddLog"; var logDetail = new OperationLog { OperationTime = DateTime.Now, - LogContent = OperationLog, + LogContent = operationLog, OperationAccount = LoginInfo.WorkerNo + AdminInfo.Account, OperationLevel = level == 1 ? RecordLevel.Normal : level == 2 ? RecordLevel.Warning : RecordLevel.Danger, SoftwareVersion = AdminInfo.SoftwareVersion + LoginInfo.SoftwareVersion, @@ -31,7 +31,7 @@ namespace SYS.Common datains_usr = AdminInfo.Account + LoginInfo.WorkerNo, datains_date = DateTime.Now }; - new OperationlogService().InsertOperationLog(logDetail); + HttpHelper.Request(api, HttpHelper.ModelToJson(logDetail)); } } diff --git a/SYS.Common/RecordHelper/IOperationlogService.cs b/SYS.Common/RecordHelper/IOperationlogService.cs deleted file mode 100644 index fc1693501766c7221df44b3ccc2792c55ff1e182..0000000000000000000000000000000000000000 --- a/SYS.Common/RecordHelper/IOperationlogService.cs +++ /dev/null @@ -1,46 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System.Collections.Generic; - -namespace SYS.Common -{ - /// - /// 操作日志数据访问层 - /// - public interface IOperationlogService - { - /// - /// 添加操作日志 - /// - /// - /// - bool InsertOperationLog(OperationLog opr); - - /// - /// 查询所有操作日志 - /// - /// - List SelectOperationlogAll(); - } -} \ No newline at end of file diff --git a/SYS.Common/RecordHelper/OperationlogService.cs b/SYS.Common/RecordHelper/OperationlogService.cs deleted file mode 100644 index 3126cfe5d0c1cc28dc6d9b376805e08172bd4ef4..0000000000000000000000000000000000000000 --- a/SYS.Common/RecordHelper/OperationlogService.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using System; -using System.Collections.Generic; -using System.Data; -using System.Linq; -using System.Net; -using SYS.Common; - -namespace SYS.Common -{ - /// - /// 操作日志数据访问层 - /// - public class OperationlogService:Repository, IOperationlogService - { - /// - /// 添加操作日志 - /// - /// - /// - public bool InsertOperationLog(OperationLog opr) - { - return base.Insert(opr); - } - - /// - /// 查询所有操作日志 - /// - /// - public List SelectOperationlogAll() - { - List operationLogs = new List(); - operationLogs = base.GetList(a => a.delete_mk != 1).OrderByDescending(a => a.OperationTime).ToList(); - operationLogs.ForEach(source => - { - source.OperationLevelNm = source.OperationLevel == RecordLevel.Normal ? "常规操作" : source.OperationLevel == RecordLevel.Warning ? "敏感操作" : "严重操作"; - }); - return operationLogs; - } - - - } -} diff --git a/SYS.Common/Repository/MysqlRepository.cs b/SYS.Common/Repository/MysqlRepository.cs deleted file mode 100644 index e56d3b640a149c40f491268abc8ce5320cec7b59..0000000000000000000000000000000000000000 --- a/SYS.Common/Repository/MysqlRepository.cs +++ /dev/null @@ -1,33 +0,0 @@ -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Common -{ - public class MysqlRepository : SimpleClient where T : class, new() - { - public MysqlRepository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null - { - if (context == null) - { - base.Context = new SqlSugarClient(new ConnectionConfig() - { - DbType = SqlSugar.DbType.MySql, - InitKeyType = InitKeyType.Attribute, - IsAutoCloseConnection = true, - ConnectionString = HttpHelper.mysqlString - }); - - base.Context.Aop.OnError = (ex) => - { - RecordHelper.Record(ex.ToString(), 3); - }; - } - } - - } -} diff --git a/SYS.Common/Repository/Repository.cs b/SYS.Common/Repository/Repository.cs deleted file mode 100644 index 4d001136ad17c95da96e8ac851b03fcdfa27e7e0..0000000000000000000000000000000000000000 --- a/SYS.Common/Repository/Repository.cs +++ /dev/null @@ -1,43 +0,0 @@ -using jvncorelib_fr.EncryptorLib; -using SqlSugar; -using System; -using System.Collections.Generic; -using System.Configuration; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Common -{ - public class Repository : SimpleClient where T : class, new() - { - public Repository(ISqlSugarClient context = null) : base(context)//注意这里要有默认值等于null - { - /// - /// 实例化信息加密插件 - /// - EncryptLib encryptLib = new EncryptLib(); - - if (context == null) - { - base.Context = new SqlSugarClient(new ConnectionConfig() - { - DbType = SqlSugar.DbType.PostgreSQL, - InitKeyType = InitKeyType.Attribute, - IsAutoCloseConnection = true, - MoreSettings = new ConnMoreSettings() - { - PgSqlIsAutoToLower = false //数据库存在大写字段的 ,需要把这个设为false ,并且实体和字段名称要一样 - }, - ConnectionString = encryptLib.Decryption(HttpHelper.pgsqlString) - }); - - base.Context.Aop.OnError = (ex) => - { - RecordHelper.Record(ex.ToString(), 3); - }; - } - } - - } -} diff --git a/SYS.Common/ResponseMsg.cs b/SYS.Common/ResponseMsg.cs new file mode 100644 index 0000000000000000000000000000000000000000..c0827f89f552a1abe51679281ced75b692da5acc --- /dev/null +++ b/SYS.Common/ResponseMsg.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace SYS.Common +{ + public class ResponseMsg + { + /// + /// 状态码 + /// + public int statusCode { get; set; } + /// + /// 错误信息 + /// + public string message { get; set; } + } +} diff --git a/SYS.Common/SYS.Common.csproj b/SYS.Common/SYS.Common.csproj index 7d65e24241a0e52f368c9656579c6b1fc84f7c2e..5a01803c26f4c865980aa4728bb604242f5c2877 100644 --- a/SYS.Common/SYS.Common.csproj +++ b/SYS.Common/SYS.Common.csproj @@ -1,6 +1,5 @@  - Debug @@ -43,20 +42,12 @@ bitbug_favicon %281%29.ico - - ..\packages\EntityFramework.6.3.0\lib\net45\EntityFramework.dll - - - ..\packages\GeoAPI.Core.1.7.5\lib\net45\GeoAPI.dll - ..\packages\jvncorelib.1.0.1.7\lib\net461\jvncorelib-fr.dll - - ..\packages\Npgsql.4.0.10\lib\net451\Npgsql.dll - - - ..\packages\SqlSugar.5.0.3.5\lib\SqlSugar.dll + + False + ..\SYS.Library\Newtonsoft.Json.dll @@ -75,12 +66,15 @@ ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll + ..\packages\System.Threading.Tasks.Extensions.4.5.2\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll ..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll + + @@ -89,16 +83,14 @@ + + + - - - - - - - - + + + @@ -113,8 +105,5 @@ 这台计算机上缺少此项目引用的 NuGet 程序包。使用“NuGet 程序包还原”可下载这些程序包。有关更多信息,请参见 http://go.microsoft.com/fwlink/?LinkID=322105。缺少的文件是 {0}。 - - - \ No newline at end of file diff --git a/SYS.Common/Util/Util.cs b/SYS.Common/Util/Util.cs new file mode 100644 index 0000000000000000000000000000000000000000..157ddcb2dfc56811776ba75f718203080f3e41cd --- /dev/null +++ b/SYS.Common/Util/Util.cs @@ -0,0 +1,132 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +namespace SYS.Common +{ + /// + /// 静态工具 + /// + public static class Util + { + //锁对象 + private static readonly object lockTimeCode = new object(); + + private static Dictionary dic = new Dictionary(); + + public static card searchCode(string code) + { + Dictionary dic = new Dictionary(); + dic.Add("identityCard", code.Substring(0,6)); + ResponseMsg result = HttpHelper.Request("App/SelectCardCode", null, dic); + if (result.statusCode != 200) + { + return new card { message = "SelectCardCode+接口服务异常,请提交Issue!" }; + } + var addrResult = result.message; + var address = addrResult.Replace(",", "").ToString(); + var birthday = code.Substring(6, 4) + "-" + code.Substring(10, 2) + "-" + code.Substring(12, 2); + var sex = code.Substring(14, 3); + //性别代码为偶数是女性奇数为男性 + if (int.Parse(sex) % 2 == 0) + { + sex = "女"; + } + else + { + sex = "男"; + } + return new card { message = string.Empty, sex = sex, address = address, birthday = birthday }; + } + + /// + /// 批量获取流水号 + /// + /// 流水号前缀 + /// 填充位数,e.g 3为 000 + /// 流水号数量 + /// 分隔符 + /// 流水号集合 + public static List GetListNewId(string preCode = null, int fillCount = 0, int pCount = 1, string separatorChar = null) + { + List list = new List(); + int num = 1; + StringBuilder sb = new StringBuilder(); + for (int i = 0; i < pCount; i++) + { + sb.Clear(); + sb.Append(preCode); + DateTime now = DateTime.Now; + string text = now.ToString("yyyyMMdd"); + sb.Append(text); + sb.Append(separatorChar); + lock (lockTimeCode) + { + if (!dic.ContainsKey(text)) + { + if (dic.Count > 10) + { + dic.Clear(); + } + num++; + dic.Add(text, 1); + } + else + { + if (dic[text] > 8998) + { + while (true) + { + string a = text; + now = DateTime.Now; + if (a == now.ToString("yyyyMMdd")) + { + Thread.Sleep(0); + continue; + } + break; + } + goto end_IL_004e; + } + Dictionary dictionary = dic; + string key = text; + dictionary[key]++; + num = dic[text]; + } + string value = num.ToString().PadLeft(fillCount, '0'); + sb.Append(value); + list.Add(sb.ToString()); + end_IL_004e:; + } + } + return list; + } + + } + + /// + /// 身份证实体类 + /// + public class card + { + /// + /// 消息 + /// + public string message { get; set; } + /// + /// 性别 + /// + public string sex { get; set; } + /// + /// 出生日期 + /// + public string birthday { get; set; } + /// + /// 地址 + /// + public string address { get; set; } + } +} diff --git a/SYS.Common/packages.config b/SYS.Common/packages.config index fdd9dd8d302e904c36a63f1a711a4d5621abd8d2..f1e044719b131c12be1d1f4c59d7088b4e6e960a 100644 --- a/SYS.Common/packages.config +++ b/SYS.Common/packages.config @@ -1,6 +1,6 @@  - + + + + \ No newline at end of file diff --git a/SYS.Core/App.config b/SYS.Core/App.config index e92ec794d9fad0ad8e108a83964758b046000588..e00ad3947df312f356834e3a15044ab530ecbf3c 100644 --- a/SYS.Core/App.config +++ b/SYS.Core/App.config @@ -32,6 +32,10 @@ + + + + \ No newline at end of file diff --git a/SYS.Core/Business/Cash/Cash.cs b/SYS.Core/Business/Cash/Cash.cs index 434ceeeb7b1d04da342584b560ddabebf8958d54..fd41f554d87672478214a86d3fd664301236b2ed 100644 --- a/SYS.Core/Business/Cash/Cash.cs +++ b/SYS.Core/Business/Cash/Cash.cs @@ -60,7 +60,7 @@ namespace SYS.Core /// /// 入库时间 /// - public DateTime CashTime { get; set; } + public DateTime? CashTime { get; set; } /// /// 资产来源 /// diff --git a/SYS.Core/Business/Customer/Custo.cs b/SYS.Core/Business/Customer/Custo.cs index 25ae38922f1a809ca2a15439da782e433c94a98f..11f6d0cfcb5b001547314b22f4d973b08a94f806 100644 --- a/SYS.Core/Business/Customer/Custo.cs +++ b/SYS.Core/Business/Customer/Custo.cs @@ -35,7 +35,7 @@ namespace SYS.Core /// /// 客户编号 /// - [SqlSugar.SugarColumn(ColumnName = "custo_no",IsPrimaryKey = true)] + [SqlSugar.SugarColumn(ColumnName = "custo_no", IsPrimaryKey = true)] public string CustoNo { get; set; } /// /// 客户名称 @@ -71,7 +71,7 @@ namespace SYS.Core /// 出生日期 /// [SqlSugar.SugarColumn(ColumnName = "custo_birth", IsNullable = true)] - public DateTime CustoBirth { get; set; } + public DateTime? CustoBirth { get; set; } /// /// 客户类型 /// @@ -103,7 +103,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -111,7 +111,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Customer/CustoType.cs b/SYS.Core/Business/Customer/CustoType.cs index d8cc1fbce2544005d5849415138edebf0c0091ee..1fe44e31869d3dfba85bd31bde7f2b24528e5bf2 100644 --- a/SYS.Core/Business/Customer/CustoType.cs +++ b/SYS.Core/Business/Customer/CustoType.cs @@ -51,7 +51,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -59,6 +59,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Application/Zero/ICheckInfoService.cs b/SYS.Core/Business/Customer/OSelectCustoAllDto.cs similarity index 78% rename from SYS.Application/Zero/ICheckInfoService.cs rename to SYS.Core/Business/Customer/OSelectCustoAllDto.cs index d59f11874f3939aeaa61ab272c00d23ad801545c..ba2d410ceffd5f620407508600c3c0a26fe4150f 100644 --- a/SYS.Application/Zero/ICheckInfoService.cs +++ b/SYS.Core/Business/Customer/OSelectCustoAllDto.cs @@ -1,6 +1,6 @@ /* * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) + *Copyright (c) 2021 易开元(Easy-Open-Meta) *Permission is hereby granted, free of charge, to any person obtaining a copy *of this software and associated documentation files (the "Software"), to deal @@ -21,20 +21,24 @@ *SOFTWARE. * */ -using SYS.Core; using System.Collections.Generic; -namespace SYS.Application +namespace SYS.Core { /// - /// 监管统计接口 + /// 查询所有客户信息 + /// 输出DTO /// - public interface ICheckInfoService + public class OSelectCustoAllDto { /// - /// 查询所有监管统计信息 + /// 数据源 /// - /// - List SelectCheckInfoAll(); + public List listSource { get; set; } + + /// + /// 总数 + /// + public int total { get; set; } } } \ No newline at end of file diff --git a/SYS.Core/Business/Customer/PassPortType.cs b/SYS.Core/Business/Customer/PassPortType.cs index d30d2c6fbc089aa325af4c76c633e4fc85a6cb82..3ba5679bcf997b3d23534072f09605873671eab5 100644 --- a/SYS.Core/Business/Customer/PassPortType.cs +++ b/SYS.Core/Business/Customer/PassPortType.cs @@ -56,7 +56,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -64,6 +64,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Customer/SexType.cs b/SYS.Core/Business/Customer/SexType.cs index c85e89b53363670f0ad72f7df08d03e1f0ddcca9..2fc2e72d38d24b5202110c74132ec4e33f142ec0 100644 --- a/SYS.Core/Business/Customer/SexType.cs +++ b/SYS.Core/Business/Customer/SexType.cs @@ -57,7 +57,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -65,6 +65,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Reser/Reser.cs b/SYS.Core/Business/Reser/Reser.cs index be7b5f25ec48f99c78fcf94edafcfdd9ff69d2a7..02cc7bdc5e4041689b9ad118f897f9c78cdb157d 100644 --- a/SYS.Core/Business/Reser/Reser.cs +++ b/SYS.Core/Business/Reser/Reser.cs @@ -55,11 +55,11 @@ namespace SYS.Core /// /// 预约起始 /// - public DateTime ReserDate { get; set; } + public DateTime? ReserDate { get; set; } /// /// 预约止日 /// - public DateTime ReserEndDay { get; set; } + public DateTime? ReserEndDay { get; set; } /// /// 删除标记 /// @@ -71,7 +71,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -79,7 +79,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Room/Room.cs b/SYS.Core/Business/Room/Room.cs index 9939b7b6d14803510a5a20059899801b8357395f..1fc34d268ea61a2db00632eb158f32d7a6d97494 100644 --- a/SYS.Core/Business/Room/Room.cs +++ b/SYS.Core/Business/Room/Room.cs @@ -114,7 +114,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -122,7 +122,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Room/RoomState.cs b/SYS.Core/Business/Room/RoomState.cs index 52d077111eac414235e6c398e1e2e1eec3deb30c..759282920d57ee110318ae42b5c7caa04e2744fd 100644 --- a/SYS.Core/Business/Room/RoomState.cs +++ b/SYS.Core/Business/Room/RoomState.cs @@ -52,7 +52,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -60,6 +60,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Room/RoomType.cs b/SYS.Core/Business/Room/RoomType.cs index f8f7aebab40bd7b5df23d7ee10a57ae1fa0f7d8d..ca7ed2b39671c2cfeb2536dc391e7d4fb24fd227 100644 --- a/SYS.Core/Business/Room/RoomType.cs +++ b/SYS.Core/Business/Room/RoomType.cs @@ -53,7 +53,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -61,6 +61,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Sellthing/SellThing.cs b/SYS.Core/Business/Sellthing/SellThing.cs index be11449697ff5362a3629acaa00be021eeea88c1..d354cb4ad62d62eb8d6295224703ea90705fd7c3 100644 --- a/SYS.Core/Business/Sellthing/SellThing.cs +++ b/SYS.Core/Business/Sellthing/SellThing.cs @@ -69,7 +69,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -77,6 +77,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Business/Spend/Spend.cs b/SYS.Core/Business/Spend/Spend.cs index 2b79e734fd109f6f64bb681a86f3b97803482dba..1bcf30a235b70742fa231cb7dd80421731afd413 100644 --- a/SYS.Core/Business/Spend/Spend.cs +++ b/SYS.Core/Business/Spend/Spend.cs @@ -69,7 +69,7 @@ namespace SYS.Core /// /// 消费时间 /// - public DateTime SpendTime { get; set; } + public DateTime? SpendTime { get; set; } /// /// 结算状态 /// @@ -85,7 +85,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -93,7 +93,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 结算状态描述 diff --git a/SYS.Core/Business/Wti/Wti.cs b/SYS.Core/Business/Wti/Wti.cs index 92a851dd47ed0d2a97f1e72ba6aaf14b19042a90..a6a476761c8b42c555c42700c3b52add37cbd720 100644 --- a/SYS.Core/Business/Wti/Wti.cs +++ b/SYS.Core/Business/Wti/Wti.cs @@ -46,12 +46,12 @@ namespace SYS.Core /// 开始使用时间 /// [SqlSugar.SugarColumn(ColumnName = "UseDate")] - public DateTime UseDate { get; set; } + public DateTime? UseDate { get; set; } /// /// 结束使用时间 /// [SqlSugar.SugarColumn(ColumnName = "EndDate")] - public DateTime EndDate { get; set; } + public DateTime? EndDate { get; set; } /// /// 水费 /// @@ -84,7 +84,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -92,7 +92,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } diff --git a/SYS.Core/SYS.Core.csproj b/SYS.Core/SYS.Core.csproj index d20226e0a3d61c211d5b0477cea4c5fb50bd52fe..acaa36f28a3fa654a2d4b1b1232a0f3aafff0082 100644 --- a/SYS.Core/SYS.Core.csproj +++ b/SYS.Core/SYS.Core.csproj @@ -51,9 +51,6 @@ False ..\..\..\..\JVN.TopSkyHotelManagerSystem\SYS.Library\MySql.Data.dll - - ..\packages\Npgsql.4.0.10\lib\net451\Npgsql.dll - False ..\packages\SqlSugar.5.0.2\lib\SqlSugar.dll @@ -90,16 +87,13 @@ + - - - - - Always - + + diff --git a/SYS.Core/Sys/NavBar/NavBar.cs b/SYS.Core/Sys/NavBar/NavBar.cs index ba568b8b63db355d7215297fc2dbd23b8e9ed169..89b9f0f4958444794d32fea8aab0a711a9d7d80b 100644 --- a/SYS.Core/Sys/NavBar/NavBar.cs +++ b/SYS.Core/Sys/NavBar/NavBar.cs @@ -48,7 +48,7 @@ namespace SYS.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -56,6 +56,6 @@ namespace SYS.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Application/Sys/NavBar/NavBarService.cs b/SYS.Core/Util/ApplicationVersion.cs similarity index 30% rename from SYS.Application/Sys/NavBar/NavBarService.cs rename to SYS.Core/Util/ApplicationVersion.cs index a88b018e747f9e8995b5a1833409745a6954dbab..28146d3a6f8993ab144fe1c2fe38631d7f9b1683 100644 --- a/SYS.Application/Sys/NavBar/NavBarService.cs +++ b/SYS.Core/Util/ApplicationVersion.cs @@ -1,27 +1,28 @@ -using SYS.Common; -using SYS.Core; +using SqlSugar; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace SYS.Application +namespace SYS.Core { /// - /// 导航控件模块 + /// 应用版本 /// - public class NavBarService:Repository + [SqlSugar.SugarTable("applicationversion")] + public class Applicationversion { /// - /// 导航控件列表 + /// 流水号 /// - /// - public List NavBarList() - { - var navBarList = base.GetList(a => a.delete_mk != 1); + [SugarColumn(ColumnName = "base_versionId")]//数据库是自增才配自增 + public int base_versionId { get; set; } - return navBarList; - } + /// + /// 版本号 + /// + [SugarColumn(ColumnName = "base_version")]//数据库是自增才配自增 + public string base_version { get; set; } } } diff --git a/SYS.Core/Util/ApplicationVersionUtil.cs b/SYS.Core/Util/ApplicationVersionUtil.cs deleted file mode 100644 index e3da9bd69f0f0ebdffd05f1ac4b32f5077562112..0000000000000000000000000000000000000000 --- a/SYS.Core/Util/ApplicationVersionUtil.cs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - *模块说明:检测软件版本 - */ -using SqlSugar; -using SYS.Common; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Core -{ - /// - /// 程序版本号检测 - /// - public class ApplicationVersionUtil:Repository - { - /// - /// 检测版本号 - /// - /// - public applicationversion CheckBaseVersion() - { - return base.GetSingle(a => a.base_versionId == 1); - } - } - - [SqlSugar.SugarTable("applicationversion")] - public class applicationversion - { - /// - /// 流水号 - /// - [SugarColumn(ColumnName = "base_versionId")]//数据库是自增才配自增 - public int base_versionId { get; set; } - - /// - /// 版本号 - /// - [SugarColumn(ColumnName = "base_version")]//数据库是自增才配自增 - public string base_version { get; set; } - } -} diff --git a/SYS.Core/Util/IDCardUtil.cs b/SYS.Core/Util/Cardcodes.cs similarity index 37% rename from SYS.Core/Util/IDCardUtil.cs rename to SYS.Core/Util/Cardcodes.cs index 80007cf5783bb86586cc739eabec499bf90b6632..580713873247fdcbe26db835973be55d64b2574f 100644 --- a/SYS.Core/Util/IDCardUtil.cs +++ b/SYS.Core/Util/Cardcodes.cs @@ -1,67 +1,21 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - *模块说明:身份证号码工具类 - */ -using SYS.Common; -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; -namespace SYS.Core.Util +namespace SYS.Core { /// - /// 身份证号码工具类 + /// 卡片代码 /// - public class IDCardUtil:Repository + [SqlSugar.SugarTable("cardcodes")] + public class Cardcodes { /// - /// 查询地区码 + /// 卡片代码 /// - /// - /// - public string SelectCardCode(string identityCard) - { - var cardid = identityCard.Substring(0, 6).ToString(); - cardcodes cardcodes = new cardcodes(); - var pcd = string.Empty; - cardcodes = base.GetSingle(a => a.bm == cardid); - pcd = cardcodes == null ? "" : string.Join(",", cardcodes.Province + cardcodes.City + cardcodes.District); - return pcd; - } - - } - - /// - /// - /// - public class cardcodes - { - /// - /// - /// - public cardcodes() + public Cardcodes() { } @@ -94,7 +48,5 @@ namespace SYS.Core.Util /// 地区识别码 /// public System.String bm { get { return this._bm; } set { this._bm = value; } } - } - } diff --git a/SYS.Core/Util/CounterHelper.cs b/SYS.Core/Util/CounterHelper.cs deleted file mode 100644 index 988efa2bfaf68d068d4ca7f02654d4525b4ff693..0000000000000000000000000000000000000000 --- a/SYS.Core/Util/CounterHelper.cs +++ /dev/null @@ -1,145 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - *模块说明:流水号规则 - */ -using SYS.Common; -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Core -{ - /// - /// 流水号规则 - /// - public class CounterHelper:Repository - { - /// - /// 获取生成编号 - /// - /// - /// - public string GetNewId(string str) - { - var count = 0; - var Str = string.Empty; - counterrule counterrule = new counterrule(); - counterrule = base.GetSingle(a => a.rule_name == str); - Str = counterrule.prefix_name + counterrule.separating_char + DateTime.Now.ToString(counterrule.custo_format) - + counterrule.number_format + counterrule.now_id; - count++; - var exe2 = base.Update(a => new counterrule() - { - now_id = counterrule.now_id + count - },a => a.rule_name == str); - return Str; - } - } - - /// - /// - /// - public class counterrule - { - /// - /// - /// - public counterrule() - { - } - - private System.Int32 _rule_id; - /// - /// 规则编号 - /// - public System.Int32 rule_id { get { return this._rule_id; } set { this._rule_id = value; } } - - private System.String _rule_name; - /// - /// 规格名称 - /// - public System.String rule_name { get { return this._rule_name; } set { this._rule_name = value; } } - - private System.String _rule_desc; - /// - /// 规则描述 - /// - public System.String rule_desc { get { return this._rule_desc; } set { this._rule_desc = value; } } - - private System.Int32? _now_id; - /// - /// 当前ID - /// - public System.Int32? now_id { get { return this._now_id; } set { this._now_id = value; } } - - private System.String _prefix_name; - /// - /// 规则简写 - /// - public System.String prefix_name { get { return this._prefix_name; } set { this._prefix_name = value; } } - - private System.String _custo_format; - /// - /// 规则格式 - /// - public System.String custo_format { get { return this._custo_format; } set { this._custo_format = value; } } - - private System.String _number_format; - /// - /// 编号前缀 - /// - public System.String number_format { get { return this._number_format; } set { this._number_format = value; } } - - private System.String _separating_char; - /// - /// 规则分割符 - /// - public System.String separating_char { get { return this._separating_char; } set { this._separating_char = value; } } - - private System.String _datains_usrid; - /// - /// 资料新增人 - /// - public System.String datains_usrid { get { return this._datains_usrid; } set { this._datains_usrid = value; } } - - private System.DateTime? _datains_time; - /// - /// 资料新增时间 - /// - public System.DateTime? datains_time { get { return this._datains_time; } set { this._datains_time = value; } } - - private System.String _datachg_usrid; - /// - /// 资料更新人 - /// - public System.String datachg_usrid { get { return this._datachg_usrid; } set { this._datachg_usrid = value; } } - - private System.DateTime? _datachg_time; - /// - /// 资料更新时间 - /// - public System.DateTime? datachg_time { get { return this._datachg_time; } set { this._datachg_time = value; } } - } -} diff --git a/SYS.Core/Util/CounterRuleConsts.cs b/SYS.Core/Util/CounterRuleConsts.cs deleted file mode 100644 index 71297aa7cae0dc3da64ce3630873b619d031d7a4..0000000000000000000000000000000000000000 --- a/SYS.Core/Util/CounterRuleConsts.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.Core -{ - /// - /// 流水号规则常量 - /// - public class CounterRuleConsts - { - /// - /// 员工工号流水号规则 - /// - public const string WorkerId = "WorkerId"; - - /// - /// 民族类型编号 - /// - public const string NationId = "NationId"; - - /// - /// 客户类型编号 - /// - public const string CustoId = "CustoId"; - - /// - /// 预约编号 - /// - public const string ReserId = "ReserId"; - - /// - /// 商品编号 - /// - public const string SellId = "SellId"; - - /// - /// 公告编号 - /// - public const string NoticeId = "NoticeId"; - - /// - /// 资产编号 - /// - public const string CashInfo = "CashInfo"; - - /// - /// 部门编号 - /// - public const string DeptInfo = "DeptInfo"; - - /// - /// 学历编号 - /// - public const string EducationId = "EducationId"; - - /// - /// 职位编号 - /// - public const string PositionId = "PositionId"; - - /// - /// 会员等级类型编号 - /// - public const string VipRuleId = "VipRuleId"; - } -} diff --git a/SYS.Core/Worker/Worker.cs b/SYS.Core/Worker/Worker.cs index f5e16d5d85722d207c2ced245d1564d31cf4f279..2977c57a92b9104c5c12efaa76a565703f45bf10 100644 --- a/SYS.Core/Worker/Worker.cs +++ b/SYS.Core/Worker/Worker.cs @@ -46,7 +46,7 @@ namespace SYS.Core /// 出生日期 /// [SqlSugar.SugarColumn(ColumnName = "WorkerBirthday")] - public DateTime WorkerBirthday { get; set; } + public DateTime? WorkerBirthday { get; set; } /// /// 员工性别 /// @@ -110,7 +110,7 @@ namespace SYS.Core /// /// 员工入职时间 /// - public DateTime WorkerTime { get; set; } + public DateTime? WorkerTime { get; set; } /// /// 员工面貌 /// diff --git a/SYS.Core/Worker/WorkerCheck.cs b/SYS.Core/Worker/WorkerCheck.cs index 6d34d1478535dbcb2d6f0ca577006bfa3404ad98..4654d48cc7b1e71512e77b4b3beb11f343d6577f 100644 --- a/SYS.Core/Worker/WorkerCheck.cs +++ b/SYS.Core/Worker/WorkerCheck.cs @@ -44,7 +44,7 @@ namespace SYS.Core /// /// 打卡时间 /// - public DateTime CheckTime { get; set; } + public DateTime? CheckTime { get; set; } /// /// 打卡方式 /// @@ -70,7 +70,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -78,7 +78,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Worker/WorkerGoodBad.cs b/SYS.Core/Worker/WorkerGoodBad.cs index 6dd6f2d2a1667f484496572f80e944b0ecbe85d4..1199a2be0d7802bd4cae5bdc1138eb7d7a35058c 100644 --- a/SYS.Core/Worker/WorkerGoodBad.cs +++ b/SYS.Core/Worker/WorkerGoodBad.cs @@ -65,7 +65,7 @@ namespace SYS.Core /// /// 奖惩时间 /// - public DateTime GBTime { get; set; } + public DateTime? GBTime { get; set; } /// /// 类型名称 /// @@ -82,7 +82,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -90,6 +90,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Worker/WorkerHistory.cs b/SYS.Core/Worker/WorkerHistory.cs index c925d091d90a359b14ec998d41e721970101dac4..d978bfcaae1e15c1093b7ce9c9abcfd1a1ad86cd 100644 --- a/SYS.Core/Worker/WorkerHistory.cs +++ b/SYS.Core/Worker/WorkerHistory.cs @@ -44,11 +44,11 @@ namespace SYS.Core /// /// 开始时间 /// - public DateTime StartDate { get; set; } + public DateTime? StartDate { get; set; } /// /// 结束时间 /// - public DateTime EndDate { get; set; } + public DateTime? EndDate { get; set; } /// /// 职位 /// @@ -68,7 +68,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -76,6 +76,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/AdminType.cs b/SYS.Core/Zero/AdminType.cs index 7d9908296b2626593cf5a79deb899d8480910c3b..067125480985b5189dfd22afa8c8b0ef53130ec3 100644 --- a/SYS.Core/Zero/AdminType.cs +++ b/SYS.Core/Zero/AdminType.cs @@ -63,7 +63,7 @@ namespace SYS.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -71,6 +71,6 @@ namespace SYS.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/CheckInfo.cs b/SYS.Core/Zero/CheckInfo.cs index ccb602911fbca014a7546700fc377d4b7b94b1e6..1972e3b7241cd29e64c6b9b00b1b16fd7d2deee7 100644 --- a/SYS.Core/Zero/CheckInfo.cs +++ b/SYS.Core/Zero/CheckInfo.cs @@ -72,7 +72,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -80,6 +80,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/Dept.cs b/SYS.Core/Zero/Dept.cs index db3682cffec167f73832c321973bf1cc9899c9a9..80a12e5431d0153d76a153d147b249ba3b464d92 100644 --- a/SYS.Core/Zero/Dept.cs +++ b/SYS.Core/Zero/Dept.cs @@ -51,7 +51,7 @@ namespace SYS.Core /// /// 创建时间(部门) /// - public DateTime dept_date { get; set; } + public DateTime? dept_date { get; set; } /// /// 部门主管 /// @@ -81,7 +81,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -89,7 +89,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/Education.cs b/SYS.Core/Zero/Education.cs index 783b74da94667c88bfc3e4dae4a528b68b7e12ce..80c34d9192885d4d11c370ec138c548d0880295f 100644 --- a/SYS.Core/Zero/Education.cs +++ b/SYS.Core/Zero/Education.cs @@ -55,7 +55,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -63,7 +63,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/Module.cs b/SYS.Core/Zero/Module.cs index adb36556cb5fcca323ff63e91a7dba38796533a2..e7cb194079271507782836d2ada6f3c54520e28f 100644 --- a/SYS.Core/Zero/Module.cs +++ b/SYS.Core/Zero/Module.cs @@ -40,7 +40,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_time { get; set; } + public DateTime? datains_time { get; set; } /// /// 资料更新人 @@ -50,6 +50,6 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_time { get; set; } + public DateTime? datachg_time { get; set; } } } diff --git a/SYS.Core/Zero/Notice.cs b/SYS.Core/Zero/Notice.cs index 3524c0221011dc44ce3aba5c05f6fa2f6e2dd399..032a8ea184169e8a86fb7d6e5ac83221d74da6d2 100644 --- a/SYS.Core/Zero/Notice.cs +++ b/SYS.Core/Zero/Notice.cs @@ -56,7 +56,7 @@ namespace SYS.Core /// 公告时间 /// [SqlSugar.SugarColumn(ColumnName = "NoticeTime")] - public DateTime NoticeTime { get; set; } + public DateTime? NoticeTime { get; set; } /// /// 公告正文 /// @@ -79,7 +79,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -87,7 +87,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/Zero/VipRule.cs b/SYS.Core/Zero/VipRule.cs index 6b31a957bb3d4fb9fdb98d8de82ce8ed47d6bcd0..d97b673edfd9c9d6aa81668162b5df896b845729 100644 --- a/SYS.Core/Zero/VipRule.cs +++ b/SYS.Core/Zero/VipRule.cs @@ -73,7 +73,7 @@ namespace SYS.Core /// /// 新增时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 修改人 /// @@ -81,7 +81,7 @@ namespace SYS.Core /// /// 修改时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } /// /// 会员等级描述 diff --git a/SYS.Core/Zero/position.cs b/SYS.Core/Zero/position.cs index 8f40af44e03a84c5f9d7b4ddd3c7f24675d76d36..e9d0b0419a2f1ca6e6a15c3a1baed0307758707c 100644 --- a/SYS.Core/Zero/position.cs +++ b/SYS.Core/Zero/position.cs @@ -55,7 +55,7 @@ namespace SYS.Core /// /// 资料创建时间 /// - public DateTime datains_date { get; set; } + public DateTime? datains_date { get; set; } /// /// 资料更新人 /// @@ -63,7 +63,7 @@ namespace SYS.Core /// /// 资料更新时间 /// - public DateTime datachg_date { get; set; } + public DateTime? datachg_date { get; set; } } } diff --git a/SYS.Core/packages.config b/SYS.Core/packages.config index 8b39cf666686bd1e57b05622ddfee5102825e06b..1da35bd79c9075bd01f7de1b23d3c2fcbe33ab14 100644 --- a/SYS.Core/packages.config +++ b/SYS.Core/packages.config @@ -1,6 +1,5 @@  - diff --git a/SYS.FormUI/App.config b/SYS.FormUI/App.config index 152fadbf690611090766868c23e1da641c67fda9..d1d1b2948befaac397e7eabef6c9dabc999fd289 100644 --- a/SYS.FormUI/App.config +++ b/SYS.FormUI/App.config @@ -25,7 +25,7 @@ - + diff --git a/SYS.FormUI/AppFunction/FrmAddAdmin.cs b/SYS.FormUI/AppFunction/FrmAddAdmin.cs index 2ec60cfc2cfd5db4253c384e613e22d51ae2631c..cba01a883caa4e65a7d3451ca79b1f86a488ed7c 100644 --- a/SYS.FormUI/AppFunction/FrmAddAdmin.cs +++ b/SYS.FormUI/AppFunction/FrmAddAdmin.cs @@ -21,6 +21,9 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmAddAdmin_Load(object sender, EventArgs e) { LoadAdminType(); @@ -28,10 +31,16 @@ namespace SYS.FormUI LoadAdminList(); } - public void LoadAdminList() + public void LoadAdminList() { + result = HttpHelper.Request("Admin/GetAllAdmin"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllAdmin+接口服务异常,请提交Issue!"); + return; + } dgvAdminList.AutoGenerateColumns = false; - dgvAdminList.DataSource = new AdminService().GetAllAdmin(); + dgvAdminList.DataSource = HttpHelper.JsonToList(result.message); } private void btnAdd_Click(object sender, EventArgs e) @@ -47,23 +56,33 @@ namespace SYS.FormUI datains_usr = AdminInfo.Account, datains_time = DateTime.Now }; - if (CheckInputs(admin) == true) + if (CheckInputs(admin)) { - bool result = new AdminService().AddAdmin(admin); - if (result == true) + result = HttpHelper.Request("Admin​/AddAdmin", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("AddAdmin+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (tf) { UIMessageBox.ShowSuccess("添加管理员成功!"); LoadAdminList(); return; - - } } } public void LoadAdminType() { - cbAccountType.DataSource = new AdminService().GetAllAdminTypes(); + result = HttpHelper.Request("Admin/GetAllAdminTypes"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllAdminTypes+接口服务异常,请提交Issue!"); + return; + } + cbAccountType.DataSource = HttpHelper.JsonToList(result.message); cbAccountType.ValueMember = "type_id"; cbAccountType.DisplayMember = "type_name"; } diff --git a/SYS.FormUI/AppFunction/FrmAddRoom.cs b/SYS.FormUI/AppFunction/FrmAddRoom.cs index 252556b5a94d6db09358f7b39c0a79027af23025..b0b0b3ec8403e3427d958577bcd9c5519345e702 100644 --- a/SYS.FormUI/AppFunction/FrmAddRoom.cs +++ b/SYS.FormUI/AppFunction/FrmAddRoom.cs @@ -23,7 +23,7 @@ */ using System; using System.Data; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using SYS.Application; @@ -42,6 +42,9 @@ namespace SYS.FormUI Room rn; + ResponseMsg result = null; + Dictionary dic = null; + private void btnAddRoom_Click(object sender, EventArgs e) { if (!string.IsNullOrWhiteSpace(txtRoomNo.Text)) @@ -57,18 +60,27 @@ namespace SYS.FormUI datains_usr = AdminInfo.Account, datains_date = DateTime.Now }; - new RoomService().InsertRoom(rn); - UIMessageBox.Show("添加房间成功!"); - LoadRoom(); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + AdminInfo.Name + "于" + DateTime.Now + "新增了房间,房间号为:" + txtRoomNo.Text + ",房间类型为:" + cboRoomType.Text, 2); - #endregion + result = HttpHelper.Request("Room​/InsertRoom", HttpHelper.ModelToJson(rn)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertRoom+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (tf) + { + UIMessageBox.Show("添加房间成功!"); + LoadRoom(); + #region 获取添加操作日志所需的信息 + RecordHelper.Record(AdminInfo.Account + AdminInfo.Name + "于" + DateTime.Now + "新增了房间,房间号为:" + txtRoomNo.Text + ",房间类型为:" + cboRoomType.Text, 2); + #endregion + return; + } } else { UIMessageBox.Show("房间信息不完整,请重试!"); } - } @@ -76,7 +88,13 @@ namespace SYS.FormUI private void FrmAddRoom_Load(object sender, EventArgs e) { LoadRoom(); - cboRoomType.DataSource = new RoomTypeService().SelectRoomTypesAll(); + result = HttpHelper.Request("RoomType/SelectRoomTypesAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomTypesAll+接口服务异常,请提交Issue!"); + return; + } + cboRoomType.DataSource = HttpHelper.JsonToList(result.message); cboRoomType.DisplayMember = "RoomName"; cboRoomType.ValueMember = "RoomType"; cboRoomType.SelectedIndex = 0; @@ -84,7 +102,13 @@ namespace SYS.FormUI public void LoadRoom() { - List rooms = new RoomService().SelectCanUseRoomAll(); + result = HttpHelper.Request("Room/SelectCanUseRoomAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCanUseRoomAll+接口服务异常,请提交Issue!"); + return; + } + List rooms = HttpHelper.JsonToList(result.message); flpRoom.Controls.Clear(); for (int i = 0; i < rooms.Count; i++) { @@ -144,8 +168,17 @@ namespace SYS.FormUI private bool CheckRoomExists(string RoomNo) { bool ret = false; - Room room = new Room(); - room = new RoomService().SelectRoomByRoomNo(RoomNo); + dic = new Dictionary + { + { "no", RoomNo } + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo",null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByRoomNo+接口服务异常,请提交Issue!"); + return ret; + } + var room = HttpHelper.JsonToModel(result.message); if (room != null) { ret = true; diff --git a/SYS.FormUI/AppFunction/FrmAddWorker.Designer.cs b/SYS.FormUI/AppFunction/FrmAddWorker.Designer.cs index d941806f7768daa268e733e80bb66838068bfa1c..9f1b6c8e2908e7ab7664c36e31b52c748bca476f 100644 --- a/SYS.FormUI/AppFunction/FrmAddWorker.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmAddWorker.Designer.cs @@ -426,10 +426,6 @@ this.cboWorkerFace.DropDownStyle = Sunny.UI.UIDropDownStyle.DropDownList; this.cboWorkerFace.FillColor = System.Drawing.Color.White; this.cboWorkerFace.Font = new System.Drawing.Font("微软雅黑", 15.75F); - this.cboWorkerFace.Items.AddRange(new object[] { - "群众", - "团员", - "党员"}); this.cboWorkerFace.Location = new System.Drawing.Point(433, 98); this.cboWorkerFace.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.cboWorkerFace.MinimumSize = new System.Drawing.Size(63, 0); diff --git a/SYS.FormUI/AppFunction/FrmAddWorker.cs b/SYS.FormUI/AppFunction/FrmAddWorker.cs index 876fe298d6a7d67be8cef82c6ee397078b91b7aa..0e0550d02ad1a29b6006bd65a75b4eabce240733 100644 --- a/SYS.FormUI/AppFunction/FrmAddWorker.cs +++ b/SYS.FormUI/AppFunction/FrmAddWorker.cs @@ -23,18 +23,18 @@ */ using System; using System.Collections.Generic; -using MySql.Data.MySqlClient; + using System.Drawing; using System.Windows.Forms; using SYS.Core; using Sunny.UI; using SYS.Application; -using SYS.Core.Util; using System.Net; using System.Configuration; using System.IO; using System.Text; using SYS.Common; +using System.Linq; using jvncorelib_fr.EncryptorLib; namespace SYS.FormUI @@ -58,26 +58,67 @@ namespace SYS.FormUI ucHistory ucHistory = null; private void FrmAddWorker_Load(object sender, EventArgs e) { + var result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } //加载部门信息 - cboClub.DataSource = new BaseService().SelectDeptAllCanUse(); + cboClub.DataSource = HttpHelper.JsonToList(result.message); cboClub.DisplayMember = "dept_name"; cboClub.ValueMember = "dept_no"; //加载民族信息 - cbWorkerNation.DataSource = new BaseService().SelectNationAll(new Nation { delete_mk = 0 }); + Dictionary dic = new Dictionary(); + dic.Add("delete_mk","0"); + result = HttpHelper.Request("Base/SelectNationAll",null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNationAll+接口服务异常,请提交Issue!"); + return; + } + cbWorkerNation.DataSource = HttpHelper.JsonToList(result.message); cbWorkerNation.DisplayMember = "nation_name"; cbWorkerNation.ValueMember = "nation_no"; //加载职位信息 - cboWorkerPosition.DataSource = new BaseService().SelectPositionAll(new Position { delete_mk = 0 }); + dic = new Dictionary(); + dic.Add("delete_mk", "0"); + result = HttpHelper.Request("Base/SelectPositionAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPositionAll+接口服务异常,请提交Issue!"); + return; + } + cboWorkerPosition.DataSource = HttpHelper.JsonToList(result.message); cboWorkerPosition.DisplayMember = "position_name"; cboWorkerPosition.ValueMember = "position_no"; //加载性别信息 - cboSex.DataSource = new BaseService().SelectSexTypeAll(new SexType {delete_mk = 0 }); + dic = new Dictionary(); + dic.Add("delete_mk", "0"); + result = HttpHelper.Request("Base/SelectSexTypeAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + cboSex.DataSource = HttpHelper.JsonToList(result.message); cboSex.DisplayMember = "sexName"; cboSex.ValueMember = "sexId"; //加载学历信息 - cboEducation.DataSource = new BaseService().SelectEducationAll(new Education { delete_mk = 0 }); + dic = new Dictionary(); + dic.Add("delete_mk", "0"); + result = HttpHelper.Request("Base/SelectEducationAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectEducationAll+接口服务异常,请提交Issue!"); + return; + } + cboEducation.DataSource = HttpHelper.JsonToList(result.message); cboEducation.DisplayMember = "education_name"; cboEducation.ValueMember = "education_no"; + //加载面貌信息 + cboWorkerFace.DataSource = new List() { "群众", "团员", "党员" }; + if (this.Text == "员工信息查看页") { @@ -112,23 +153,40 @@ namespace SYS.FormUI WorkerTel.Text = FrmChangeWorker.wk_WorkerTel; cboEducation.Text = FrmChangeWorker.wk_WorkerEducation; cboClub.Text = FrmChangeWorker.wk_WorkerClub; - var workerPicSource = new WorkerPicService().WorkerPic(new WorkerPic + + dic = new Dictionary { - WorkerId = WorkerNo.Text.Trim() - }); + { "WorkerId", WorkerNo.Text.Trim() } + }; + result = HttpHelper.Request("WorkerPicture/WorkerPic", null, dic); + //if (result.statusCode != 200) + //{ + // UIMessageBox.ShowError("WorkerPic+接口服务异常,请提交Issue!"); + // return; + //} + var workerPicSource = HttpHelper.JsonToModel(result.message); if (workerPicSource != null && !string.IsNullOrEmpty(workerPicSource.Pic)) { + EncryptLib encryptLib = new EncryptLib(); picWorkerPic.Enabled = false; picWorkerPic.BackgroundImage = null; - picWorkerPic.LoadAsync(workerPicSource.Pic); + picWorkerPic.LoadAsync(encryptLib.Decryption(HttpHelper.baseUrl) + workerPicSource.Pic); } this.WorkerID.Validated -= new EventHandler(WorkerID_Validated); - List workerHistories = new WorkerHistoryService().SelectHistoryByWorkerId(WorkerNo.Text); + dic = new Dictionary(); + dic.Add("wid", WorkerNo.Text.Trim()); + result = HttpHelper.Request("WorkerHistory/SelectHistoryByWorkerId", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectHistoryByWorkerId+接口服务异常,请提交Issue!"); + return; + } + List workerHistories = HttpHelper.JsonToList(result.message); for (int i = 0; i < workerHistories.Count; i++) { ucHistory = new ucHistory(); - ucHistory.dtpStartDate.Value = workerHistories[i].StartDate; - ucHistory.dtpEndDate.Value = workerHistories[i].EndDate; + ucHistory.dtpStartDate.Value = Convert.ToDateTime(workerHistories[i].StartDate); + ucHistory.dtpEndDate.Value = Convert.ToDateTime(workerHistories[i].EndDate); ucHistory.txtPosition.Text = workerHistories[i].Position; ucHistory.txtCompany.Text = workerHistories[i].Company; ucHistory.dtpStartDate.ReadOnly = true; @@ -140,23 +198,23 @@ namespace SYS.FormUI } else if (this.Text == "添加员工") { - WorkerNo.Text = new CounterHelper().GetNewId(CounterRuleConsts.WorkerId); + WorkerNo.Text = Util.GetListNewId("WK", 3, 1, "-").FirstOrDefault(); ucHistory = new ucHistory(); ucHistory.dtpStartDate.Enabled = true; ucHistory.dtpEndDate.Enabled = true; ucHistory.txtCompany.Enabled = true; ucHistory.txtPosition.Enabled = true; flpHistory.Controls.Add(ucHistory); - cboClub.SelectedIndex = 0; - cboEducation.SelectedIndex = 0; - cboSex.SelectedIndex = 0; - cboWorkerFace.SelectedIndex = 0; - cboWorkerPosition.SelectedIndex = 0; + //cboClub.SelectedIndex = 0; + //cboEducation.SelectedIndex = 0; + //cboSex.SelectedIndex = 0; + //cboWorkerFace.SelectedIndex = 0; + //cboWorkerPosition.SelectedIndex = 0; } else { bool dr = UIMessageBox.Show("修改操作仅能修改姓名、性别、电话号码、联系地址、民族、面貌以及最高学历,以上是否知晓?点击确定继续进行修改!", "修改提醒",UIStyle.Orange, UIMessageBoxButtons.OKCancel); - if (dr == true) + if (dr) { WorkerNo.Text = FrmChangeWorker.wk_WorkerNo; WorkerName.Text = FrmChangeWorker.wk_WorkerName; @@ -172,55 +230,81 @@ namespace SYS.FormUI cboEducation.Text = FrmChangeWorker.wk_WorkerEducation; cboClub.Text = FrmChangeWorker.wk_WorkerClub; - var workerPicSource = new WorkerPicService().WorkerPic(new WorkerPic + dic = new Dictionary(); + dic.Add("WorkerId", WorkerNo.Text.Trim()); + result = HttpHelper.Request("WorkerPicture/WorkerPic", null, dic); + if (result.statusCode != 200) { - WorkerId = WorkerNo.Text.Trim() - }); + UIMessageBox.ShowError("WorkerPic+接口服务异常,请提交Issue!"); + return; + } + var workerPicSource = HttpHelper.JsonToModel(result.message); if (workerPicSource!=null &&!string.IsNullOrEmpty(workerPicSource.Pic)) { picWorkerPic.BackgroundImage = null; picWorkerPic.LoadAsync(workerPicSource.Pic); } - this.WorkerID.Validated -= new EventHandler(WorkerID_Validated); + //this.WorkerID.Validated -= new EventHandler(WorkerID_Validated); btnOK.Text = "修改"; this.ButtonOkClick -= new EventHandler(FrmAddWorker_ButtonOkClick); this.ButtonOkClick += new EventHandler(btnUpd_Click); WorkerTel.ReadOnly = false; txtAddress.ReadOnly = false; - List workerHistories = new WorkerHistoryService().SelectHistoryByWorkerId(WorkerNo.Text); + cboWorkerFace.ReadOnly = false; + dic = new Dictionary(); + dic.Add("wid", WorkerNo.Text.Trim()); + result = HttpHelper.Request("WorkerHistory/SelectHistoryByWorkerId", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectHistoryByWorkerId+接口服务异常,请提交Issue!"); + return; + } + List workerHistories = HttpHelper.JsonToList(result.message); for (int i = 0; i < workerHistories.Count; i++) { ucHistory = new ucHistory(); - ucHistory.dtpStartDate.Value = workerHistories[i].StartDate; - ucHistory.dtpEndDate.Value = workerHistories[i].EndDate; + ucHistory.dtpStartDate.Value = Convert.ToDateTime(workerHistories[i].StartDate); + ucHistory.dtpEndDate.Value = Convert.ToDateTime(workerHistories[i].EndDate); ucHistory.txtPosition.Text = workerHistories[i].Position; ucHistory.txtCompany.Text = workerHistories[i].Company; flpHistory.Controls.Add(ucHistory); } } + else + { + return; + } } } private void btnUpd_Click(object sender, EventArgs e) { bool dr = UIMessageBox.Show("是否确认修改员工信息?", "修改提醒", UIStyle.Green,UIMessageBoxButtons.OKCancel); - if (dr == true) + if (dr) { #region 员工信息代码块 Worker worker = new Worker { WorkerId = WorkerNo.Text.Trim(), WorkerName = WorkerName.Text.Trim(), - WorkerNation = cbWorkerNation.SelectedValue == null ? "N-00001" : cbWorkerNation.SelectedValue.ToString(), + WorkerNation = cbWorkerNation.SelectedValue.ToString(), WorkerTel = WorkerTel.Text.Trim(), + CardId = WorkerID.Text.Trim(), WorkerAddress = txtAddress.Text.Trim(), - WorkerFace = cboWorkerFace.Text.Trim(), - WorkerEducation = cboEducation.SelectedValue.ToString() == null ? "E-00001" : cboEducation.SelectedValue.ToString(), + WorkerFace = cboWorkerFace.SelectedValue.ToString(), + WorkerEducation = cboEducation.SelectedValue.ToString(), + WorkerBirthday = dtpBirthday.Value, datachg_usr = AdminInfo.Account, datachg_date = DateTime.Now }; - bool i = new WorkerService().UpdateWorker(worker); - if (i == true) + var result = HttpHelper.Request("Worker/UpdateWorker", HttpHelper.ModelToJson(worker)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateWorker+接口服务异常,请提交Issue!"); + return; + } + bool i = result.message.ToString().Equals("true") ? true:false; /*new WorkerService().UpdateWorker(worker);*/ + if (i) { UIMessageBox.ShowSuccess("信息修改成功!"); #region 获取添加操作日志所需的信息 @@ -249,14 +333,14 @@ namespace SYS.FormUI { //获取得到输入的身份证号码 string identityCard = WorkerID.Text.Trim(); + if (string.IsNullOrEmpty(identityCard)) { //身份证号码不能为空,如果为空返回 - UIMessageBox.ShowWarning("身份证号码不能为空!"); + UIMessageBox.ShowError("身份证号码不能为空!"); if (WorkerID.CanFocus) { WorkerID.Focus();//设置当前输入焦点为txtCardID_identityCard - } return; } @@ -269,42 +353,34 @@ namespace SYS.FormUI if (WorkerID.CanFocus) { WorkerID.Focus(); - } return; } } - string birthday = ""; - string sex = ""; + if (identityCard.Length == 18) { - var result = new IDCardUtil().SelectCardCode(identityCard); - var address = result.Replace(",", "").ToString(); - birthday = identityCard.Substring(6, 4) + "-" + identityCard.Substring(10, 2) + "-" + identityCard.Substring(12, 2); - sex = identityCard.Substring(14, 3); - txtAddress.Text = address; - //性别代码为偶数是女性奇数为男性 - if (int.Parse(sex) % 2 == 0) + var result = Util.searchCode(identityCard); + if (result.message.IsNullOrEmpty()) //如果没有错误消息输出,则代表成功 { - cboSex.SelectedIndex = 0; + try + { + cboSex.Text = result.sex; + txtAddress.Text = result.address; + dtpBirthday.Value = Convert.ToDateTime(result.birthday); + } + catch + { + UIMessageBox.ShowError("请正确输入证件号码!"); + return; + } } else { - cboSex.SelectedIndex = 1; + UIMessageBox.ShowError(result.message); + return; } } - try - { - dtpBirthday.Value = Convert.ToDateTime(birthday); - } - catch - { - UIMessageBox.ShowError("请正确输入证件号码!"); - return; - } - - dtpBirthday.Value = Convert.ToDateTime(birthday); - return; } @@ -323,7 +399,13 @@ namespace SYS.FormUI WorkerId = WorkerNo.Text.Trim(), Pic = result.Trim(), }; - new WorkerPicService().InsertWorkerPic(workerPic); + + var response = HttpHelper.Request("WorkerPicture/InsertWorkerPic", HttpHelper.ModelToJson(workerPic)); + if (response.statusCode != 200) + { + UIMessageBox.ShowError("InsertWorkerPic+接口服务异常,请提交Issue!"); + return; + } picWorkerPic.BackgroundImage = null; @@ -353,7 +435,13 @@ namespace SYS.FormUI try { #region 员工信息添加代码块 - bool n = new WorkerService().AddWorker(worker); + var response = HttpHelper.Request("Worker/AddWorker", HttpHelper.ModelToJson(worker)); + if (response.statusCode != 200) + { + UIMessageBox.ShowError("AddWorker+接口服务异常,请提交Issue!"); + return; + } + bool n = response.message.ToString().Equals("true")?true:false; #endregion if (ucHistory.txtCompany != null && ucHistory.txtPosition != null && ucHistory.dtpStartDate.Value != null && ucHistory.dtpEndDate.Value != null) @@ -367,7 +455,14 @@ namespace SYS.FormUI Company = ucHistory.txtCompany.Text, WorkerId = WorkerNo.Text.Trim() }; - bool j = new WorkerHistoryService().AddHistoryByWorkerId(workerHistory); + + response = HttpHelper.Request("WorkerHistory/AddHistoryByWorkerId", HttpHelper.ModelToJson(workerHistory)); + if (response.statusCode != 200) + { + UIMessageBox.ShowError("AddHistoryByWorkerId+接口服务异常,请提交Issue!"); + return; + } + bool j = response.message.ToString().Equals("true") ? true : false; #endregion #region 判断履历和信息代码块 diff --git a/SYS.FormUI/AppFunction/FrmAdminManager.cs b/SYS.FormUI/AppFunction/FrmAdminManager.cs index 44bfc1a69eb7123f9a62ab70874a8048b81be37b..fa5501e0b165bf28b214de9a184db7e7d0eaab4c 100644 --- a/SYS.FormUI/AppFunction/FrmAdminManager.cs +++ b/SYS.FormUI/AppFunction/FrmAdminManager.cs @@ -1,4 +1,5 @@ -using Sunny.UI; + +using Sunny.UI; using SYS.Application; using SYS.Common; using SYS.Core; @@ -21,6 +22,9 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmAdminManager_Load(object sender, EventArgs e) { LoadAdminList(); @@ -28,8 +32,14 @@ namespace SYS.FormUI public void LoadAdminList() { - dgvAdminList.DataSource = new AdminService().GetAllAdminList(); + result = HttpHelper.Request("Admin/GetAllAdminList"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllAdminList+接口服务异常,请提交Issue!"); + return; + } dgvAdminList.AutoGenerateColumns = false; + dgvAdminList.DataSource =HttpHelper.JsonToList(result.message); } private void btnAuthority_Click(object sender, EventArgs e) @@ -41,8 +51,14 @@ namespace SYS.FormUI Id = Convert.ToInt32(dgvAdminList.SelectedRows[0].Cells["clId"].Value), DeleteMk = Convert.ToInt32(dgvAdminList.SelectedRows[0].Cells["Column1"].Value) }; - bool result = new AdminService().UpdAccount(admin); - if (result == true) + result = HttpHelper.Request("Admin/UpdAccount",HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdAccount+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (tf) { UIMessageBox.ShowSuccess("操作成功!"); #region 获取添加操作日志所需的信息 diff --git a/SYS.FormUI/AppFunction/FrmAuthority.cs b/SYS.FormUI/AppFunction/FrmAuthority.cs index bc8485c1ced0a29daf73744e50668fac793a9703..386f9f0a27c8c51bd5ccf7388f3d05c4bda26f29 100644 --- a/SYS.FormUI/AppFunction/FrmAuthority.cs +++ b/SYS.FormUI/AppFunction/FrmAuthority.cs @@ -1,5 +1,7 @@ -using Sunny.UI; +using jvncorelib_fr.EntityLib; +using Sunny.UI; using SYS.Application; +using SYS.Common; using SYS.Core; using System; using System.Collections.Generic; @@ -20,6 +22,9 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmAuthority_Load(object sender, EventArgs e) { @@ -27,9 +32,18 @@ namespace SYS.FormUI public void LoadAdminInfo() { - Admin admin = new Admin() { AdminAccount = txtAccount.Text.Trim() }; - var adminInfo = new AdminService().GetAdminInfoByAdminAccount(admin); - if (adminInfo == null) + dic = new Dictionary() + { + { "AdminAccount",txtAccount.Text.Trim() } + }; + result = HttpHelper.Request("Admin/GetAdminInfoByAdminAccount", null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAdminInfoByAdminAccount+接口服务异常,请提交Issue!"); + return; + } + var adminInfo = HttpHelper.JsonToModel(result.message); + if (adminInfo.IsNullOrEmpty()) { UIMessageTip.ShowError("找不到对应的管理员,请检查是否输入有误!"); cbAccountType.Text = ""; @@ -45,13 +59,29 @@ namespace SYS.FormUI public void LoadAllMyModule() { tfModuleZero.ItemsLeft.Clear(); - Admin admin = new Admin() { AdminAccount = txtAccount.Text.Trim() }; - var listMyModule = new AdminModuleZeroService().GetAllModuleByAdmin(admin); + var admin = new Admin + { + AdminAccount = txtAccount.Text.Trim(), + }; + + result = HttpHelper.Request("Module/GetAllModuleByAdmin", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllModuleByAdmin+接口服务异常,请提交Issue!"); + return; + } + var listMyModule = HttpHelper.JsonToList(result.message); listMyModule.ForEach(myModule => { tfModuleZero.ItemsRight.Add(myModule.module_name); }); - var listModules = new AdminModuleZeroService().GetAllModule(); + result = HttpHelper.Request("Module/GetAllModule"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllModule+接口服务异常,请提交Issue!"); + return; + } + var listModules = HttpHelper.JsonToList(result.message); listModules.ForEach(module => { var myModule = listMyModule.FirstOrDefault(a => a.module_name.Equals(module.module_name)); @@ -76,27 +106,48 @@ namespace SYS.FormUI UIMessageTip.ShowError("账号不能为空,请检查!"); return; } - Admin admin = new Admin() { AdminAccount = txtAccount.Text.Trim() }; - var listExsitModule = new AdminModuleZeroService().GetAllModuleByAdmin(admin); + dic = new Dictionary() + { + { "AdminAccount",txtAccount.Text.Trim() } + }; + result = HttpHelper.Request("Module/GetAllModuleByAdmin", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("GetAllModuleByAdmin+接口服务异常,请提交Issue!"); + return; + } + var listExsitModule = HttpHelper.JsonToList(result.message); var listAddModule = new List(); if (listExsitModule != null) { ModuleZero moduleZero = new ModuleZero() { admin_account = txtAccount.Text.Trim() }; - new AdminModuleZeroService().DelModuleZeroList(moduleZero); + result = HttpHelper.Request("Module/DelModuleZeroList", HttpHelper.ModelToJson(moduleZero)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DelModuleZeroList+接口服务异常,请提交Issue!"); + return; + } for (int i = 0; i < tfModuleZero.ItemsRight.Count; i++) { var newModule = tfModuleZero.ItemsRight[i].ToString(); listAddModule.Add(new ModuleZero() { admin_account = txtAccount.Text.Trim(), module_name = newModule, module_enable = 1 }); } } - - bool result = new AdminModuleZeroService().AddModuleZeroList(listAddModule); - if (result == true) + if (!listAddModule.IsNullOrEmpty()) { - UIMessageBox.ShowSuccess("批量授权成功!"); - return; + result = HttpHelper.Request("Module/AddModuleZeroList", HttpHelper.ModelToJson(listAddModule)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("AddModuleZeroList+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (tf) + { + UIMessageBox.ShowSuccess("批量授权成功!"); + return; + } } - } } } diff --git a/SYS.FormUI/AppFunction/FrmCash.cs b/SYS.FormUI/AppFunction/FrmCash.cs index 51b62d570f623288dcb36c8ab2f1433e6595c8f0..e202edf96c37c17271beb282f52653ec27927a01 100644 --- a/SYS.FormUI/AppFunction/FrmCash.cs +++ b/SYS.FormUI/AppFunction/FrmCash.cs @@ -22,6 +22,7 @@ * */ using System; +using System.Linq; using System.Windows.Forms; using Sunny.UI; using SYS.Application; @@ -37,22 +38,34 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = new ResponseMsg(); private void FrmCash_Load(object sender, EventArgs e) { //获取所有部门信息 - cboClub.DataSource = new BaseService().SelectDeptAll(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + cboClub.DataSource = HttpHelper.JsonToList(result.message); cboClub.DisplayMember = "dept_name"; cboClub.ValueMember = "dept_no"; //获取所有员工信息 - cboCashPerson.DataSource = new WorkerService().SelectWorkerAll(); + result = HttpHelper.Request("Worker/SelectWorkerAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectWorkerAll+接口服务异常,请提交Issue!"); + return; + } + cboCashPerson.DataSource = HttpHelper.JsonToList(result.message); cboCashPerson.DisplayMember = "WorkerName"; cboCashPerson.ValueMember = "WorkerId"; - dgvCashList.AutoGenerateColumns = false; - dgvCashList.DataSource = new CashService().SelectCashInfoAll(); - txtCashNo.Text = new CounterHelper().GetNewId(CounterRuleConsts.CashInfo); + LoadCashInfo(); + txtCashNo.Text = Util.GetListNewId("CN",3,1,"-").FirstOrDefault(); if (AdminInfo.Type != "GeneralManager" && AdminInfo.Type != "FinanceManager" && AdminInfo.isAdmin == false) { btnOK.Enabled = false; @@ -61,6 +74,18 @@ namespace SYS.FormUI } + private void LoadCashInfo() + { + dgvCashList.AutoGenerateColumns = false; + result = HttpHelper.Request("Cash/SelectCashInfoAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCashInfoAll+接口服务异常,请提交Issue!"); + return; + } + dgvCashList.DataSource = HttpHelper.JsonToList(result.message); + } + public bool CheckInput(Cash cash) { if (string.IsNullOrWhiteSpace(cash.CashNo)) @@ -109,16 +134,20 @@ namespace SYS.FormUI bool dr = UIMessageBox.Show("请确认信息没有错误,一旦录入则无法修改!", "警告提醒",UIStyle.Orange, UIMessageBoxButtons.OKCancel); if (dr == true) { - - bool n = new CashService().AddCashInfo(cash); - if (n == true) + result = HttpHelper.Request("Cash/AddCashInfo",HttpHelper.ModelToJson(cash)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("AddCashInfo+接口服务异常,请提交Issue!"); + return; + } + bool n = result.message.ToString().Equals("true")?true:false; + if (n) { - UIMessageBox.Show("录入成功!","系统提示",UIStyle.Green,UIMessageBoxButtons.OKCancel); - dgvCashList.AutoGenerateColumns = false; - dgvCashList.DataSource = new CashService().SelectCashInfoAll(); + UIMessageBox.Show("录入成功!","系统提示",UIStyle.Green,UIMessageBoxButtons.OK); + LoadCashInfo(); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + AdminInfo.Name + "于" + DateTime.Now + "进行资产录入,资产编号为:" + txtCashNo.Text.Trim(), 3); - txtCashNo.Text = new CounterHelper().GetNewId("CashInfo"); + txtCashNo.Text = Util.GetListNewId("CN", 3, 1, "-").FirstOrDefault(); #endregion } else diff --git a/SYS.FormUI/AppFunction/FrmChangeAdminPwd.cs b/SYS.FormUI/AppFunction/FrmChangeAdminPwd.cs index 03439599f33389cceb0e5156475a2b4995d4421f..689463c715eec7b10d7b706502736594cbb24c3d 100644 --- a/SYS.FormUI/AppFunction/FrmChangeAdminPwd.cs +++ b/SYS.FormUI/AppFunction/FrmChangeAdminPwd.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ +using jvncorelib_fr.EntityLib; using Sunny.UI; using SYS.Application; using SYS.Common; @@ -45,6 +46,9 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmChangeAdminPwd_Load(object sender, EventArgs e) { @@ -53,8 +57,14 @@ namespace SYS.FormUI private void btnUpdPwd_Click(object sender, EventArgs e) { Admin admin = new Admin() { AdminAccount = AdminInfo.Account, AdminPassword = txtNewPwd.Text.Trim() }; - bool tf = new AdminService().UpdateNewPwdByOldPwd(admin); - if (tf == false) + result = HttpHelper.Request("Admin​/UpdateNewPwdByOldPwd", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateNewPwdByOldPwd+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (!tf) { UIMessageBox.Show("服务器繁忙,修改失败!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; @@ -78,8 +88,14 @@ namespace SYS.FormUI { //校验旧密码是否正确 Admin admin = new Admin() { AdminAccount = AdminInfo.Account, AdminPassword = txtOldPwd.Text.Trim() }; - var result = new AdminService().SelectMangerByPass(admin); - if (result != null) + result = HttpHelper.Request("Admin​/SelectMangerByPass", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectMangerByPass+接口服务异常,请提交Issue!"); + return; + } + var source = HttpHelper.JsonToModel(result.message); + if (!source.IsNullOrEmpty()) { lgCheckOldPwd.Visible = true; lgCheckOldPwd.OnColor = Color.Green; diff --git a/SYS.FormUI/AppFunction/FrmChangePosition.cs b/SYS.FormUI/AppFunction/FrmChangePosition.cs index 87d4044ef06638c4914bb40d879312ae0d3671b9..3a8df183ddddbb1c5f04e5a6d9bef000565f3141 100644 --- a/SYS.FormUI/AppFunction/FrmChangePosition.cs +++ b/SYS.FormUI/AppFunction/FrmChangePosition.cs @@ -22,12 +22,13 @@ * */ using System; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using Sunny.UI; using SYS.Application; using SYS.Common; +using System.Collections.Generic; namespace SYS.FormUI { @@ -42,6 +43,9 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmChangePosition_Load(object sender, EventArgs e) { txtworkerId.Text = FrmChangeWorker.wk_WorkerNo; @@ -49,11 +53,27 @@ namespace SYS.FormUI txtClub.Text = FrmChangeWorker.wk_WorkerClub; txtPosition.Text = FrmChangeWorker.wk_WorkerPosition; //获取所有职位信息 - cboNewPosition.DataSource = new BaseService().SelectPositionAll(new Position { delete_mk = 0 }); + dic= new Dictionary() + { + { "delete_mk","0"} + }; + result = HttpHelper.Request("Base/SelectPositionAll",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPositionAll+接口服务异常,请提交Issue!"); + return; + } + cboNewPosition.DataSource = HttpHelper.JsonToList(result.message); cboNewPosition.DisplayMember = "position_name"; cboNewPosition.ValueMember = "position_no"; //获取所有部门信息 - cboNewClub.DataSource = new BaseService().SelectDeptAllCanUse(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + cboNewClub.DataSource = HttpHelper.JsonToList(result.message); cboNewClub.DisplayMember = "dept_name"; cboNewClub.ValueMember = "dept_no"; } @@ -77,8 +97,14 @@ namespace SYS.FormUI WorkerPosition = cboNewPosition.SelectedValue.ToString(), WorkerId = txtworkerId.Text }; - bool n = new WorkerService().UpdateWorkerPositionAndClub(worker); - if (n == true) + result = HttpHelper.Request("Worker​/UpdateWorkerPositionAndClub", HttpHelper.ModelToJson(worker)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateWorkerPositionAndClub+接口服务异常,请提交Issue!"); + return; + } + bool n = result.message.ToString().Equals("true"); + if (n) { UIMessageBox.ShowSuccess("任命已生效!"); #region 获取添加操作日志所需的信息 @@ -87,8 +113,6 @@ namespace SYS.FormUI FrmWorkerManager.Reload(); this.Close(); } - - } } diff --git a/SYS.FormUI/AppFunction/FrmChangeRoom.cs b/SYS.FormUI/AppFunction/FrmChangeRoom.cs index d3079b572e82635dd33053b8a74870e640bfd4de..c2b6a42d0f9611bccce58aff07c44f84dacc22a9 100644 --- a/SYS.FormUI/AppFunction/FrmChangeRoom.cs +++ b/SYS.FormUI/AppFunction/FrmChangeRoom.cs @@ -39,14 +39,21 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + Dictionary dic = null; + private void FrmChangeRoom_Load(object sender, EventArgs e) { - string rno = cboRoomList.Text; - cboRoomList.DataSource = new RoomService().SelectCanUseRoomAll(); + //string rno = cboRoomList.Text; + result = HttpHelper.Request("Room/SelectCanUseRoomAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCanUseRoomAll+接口服务异常,请提交Issue!"); + return; + } + cboRoomList.DataSource = HttpHelper.JsonToList(result.message); cboRoomList.ValueMember = "RoomNo"; cboRoomList.DisplayMember = "RoomNo"; - - } private void btnChangeRoom_Click(object sender, EventArgs e) @@ -66,54 +73,102 @@ namespace SYS.FormUI datains_usr = LoginInfo.WorkerNo, datains_date = DateTime.Now }; - - if (rno.Contains("BD")) + dic = new Dictionary() + { + { "roomno",rno} + }; + result = HttpHelper.Request("Room/DayByRoomNo",null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DayByRoomNo+接口服务异常,请提交Issue!"); + return; + } + if (rno.StartsWith("BD")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 300); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 300); } - if (rno.Contains("BS")) + if (rno.StartsWith("BS")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 425); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 425); } - if (rno.Contains("HD")) + if (rno.StartsWith("HD")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 625); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 625); } - if (rno.Contains("HS")) + if (rno.StartsWith("HS")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 660); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 660); } - if (rno.Contains("QL")) + if (rno.StartsWith("QL")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 845); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 845); } - if (rno.Contains("ZT")) + if (rno.StartsWith("ZT")) { - sum = Convert.ToDouble(Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) * 1080); + sum = Convert.ToDouble(Convert.ToInt32(result.message) * 1080); } Spend s = new Spend() { RoomNo = cboRoomList.Text, - SpendName = "居住" + rno + "共" + Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()) + "天", - SpendAmount = Convert.ToInt32(new RoomService().DayByRoomNo(rno).ToString()), + SpendName = "居住" + rno + "共" + Convert.ToInt32(result.message) + "天", + SpendAmount = Convert.ToInt32(result.message), CustoNo = ucRoomList.CustoNo, SpendPrice = Convert.ToDecimal(sum), SpendMoney = Convert.ToDecimal(sum), SpendTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")), - MoneyState = "未结算", + MoneyState = SpendConsts.UnSettle, }; - bool result1 = new RoomService().UpdateRoomInfo(checkInRoom); - bool result2 = new RoomService().UpdateRoomByRoomNo(rno); - var result3 = new SpendService().SelectSpendByCustoNo(rno); + result = HttpHelper.Request("Room​/UpdateRoomInfo",HttpHelper.ModelToJson(checkInRoom), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateRoomInfo+接口服务异常,请提交Issue!"); + return; + } + bool result1 = result.message.ToString().Equals("true"); + dic = new Dictionary() + { + { "room",rno} + }; + result = HttpHelper.Request("Room​/UpdateRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateRoomByRoomNo+接口服务异常,请提交Issue!"); + return; + } + bool result2 = result.message.ToString().Equals("true"); + dic = new Dictionary() + { + { "No",rno} + }; + result = HttpHelper.Request("Spend​/SelectSpendByCustoNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSpendByCustoNo+接口服务异常,请提交Issue!"); + return; + } + var result3 = HttpHelper.JsonToList(result.message); if (result3.Count != 0) { - bool result4 = new SpendService().UpdateSpendInfoByRoomNo(result3, nrno, ucRoomList.CustoNo); + Spend spend = new Spend() { RoomNo = nrno, CustoNo = ucRoomList.CustoNo }; + result = HttpHelper.Request("Spend​/UpdateSpendInfoByRoomNo", HttpHelper.ModelToJson(spend)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSpendInfoByRoomNo+接口服务异常,请提交Issue!"); + return; + } + bool result4 = result.message.ToString().Equals("true"); } - if (result1 == true && result2 == true) + if (result1&& result2) { UIMessageBox.ShowSuccess("转房成功"); - bool m = new SpendService().InsertSpendInfo(s); + result = HttpHelper.Request("Spend​/InsertSpendInfo", HttpHelper.ModelToJson(s)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertSpendInfo+接口服务异常,请提交Issue!"); + return; + } + bool m = result.message.ToString().Equals("true"); FrmRoomManager.Reload(""); #region 获取添加操作日志所需的信息 RecordHelper.Record(LoginInfo.WorkerNo + "-" + LoginInfo.WorkerName + "在" + DateTime.Now + "位于" + LoginInfo.SoftwareVersion + "执行:" +ucRoomList.CustoNo + "于" + DateTime.Now + "进行了换房!", 2); diff --git a/SYS.FormUI/AppFunction/FrmChangeWorker.cs b/SYS.FormUI/AppFunction/FrmChangeWorker.cs index 6bef31247e8ba07d38fd5b7b1e053c91c10a8394..156fa05d985a1e2abf614a0094bbd1eca4ce2d50 100644 --- a/SYS.FormUI/AppFunction/FrmChangeWorker.cs +++ b/SYS.FormUI/AppFunction/FrmChangeWorker.cs @@ -22,6 +22,7 @@ * */ using System; +using System.Collections.Generic; using System.Drawing; using System.Windows.Forms; using Sunny.UI; @@ -57,6 +58,10 @@ namespace SYS.FormUI { InitializeComponent(); } + + ResponseMsg result = null; + Dictionary dic = null; + private void FrmChangeWorker_Load(object sender, EventArgs e) { if (AdminInfo.isAdmin == false && AdminInfo.Type != "GeneralManager" && AdminInfo.Type != "HRManager") @@ -260,7 +265,12 @@ namespace SYS.FormUI WorkerId = wk_WorkerNo, delete_mk = 0 }; - new WorkerService().ManagerWorkerAccount(worker); + result = HttpHelper.Request("Worker​/ManagerWorkerAccount", HttpHelper.ModelToJson(worker)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("ManagerWorkerAccount+接口服务异常,请提交Issue!"); + return; + } #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "启用员工账号操作!新增值为:" + worker.WorkerId, 2); #endregion @@ -274,7 +284,12 @@ namespace SYS.FormUI WorkerId = wk_WorkerNo, delete_mk = 1 }; - new WorkerService().ManagerWorkerAccount(worker); + result = HttpHelper.Request("Worker​/ManagerWorkerAccount", HttpHelper.ModelToJson(worker)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("ManagerWorkerAccount+接口服务异常,请提交Issue!"); + return; + } #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "禁用员工账号操作!新增值为:" + worker.WorkerId, 2); #endregion diff --git a/SYS.FormUI/AppFunction/FrmChart.cs b/SYS.FormUI/AppFunction/FrmChart.cs index 02387900376e92ce2ec07092030324879415613a..b2af4703469fd27f1a354eba15053539bd8ccbc4 100644 --- a/SYS.FormUI/AppFunction/FrmChart.cs +++ b/SYS.FormUI/AppFunction/FrmChart.cs @@ -27,6 +27,7 @@ using System.Drawing; using System.Windows.Forms; using Sunny.UI; using SYS.Application; +using SYS.Common; using SYS.Core; namespace SYS.FormUI @@ -38,13 +39,21 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = null; + private void FrmChart_Load(object sender, EventArgs e) { System.Windows.Forms.DataVisualization.Charting.Series series = new System.Windows.Forms.DataVisualization.Charting.Series("商品销售额(/元)"); series.ChartType = System.Windows.Forms.DataVisualization.Charting.SeriesChartType.Line; //series.BorderWidth = 2; series.IsValueShownAsLabel = true; - var listHotelMoney = new CustoService().SelectAllMoney(); + result = HttpHelper.Request("Custo/SelectAllMoney"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectAllMoney+接口服务异常,请提交Issue!"); + return; + } + var listHotelMoney = HttpHelper.JsonToList(result.message); listHotelMoney.ForEach(source => { series.Points.AddXY(Convert.ToDouble(source.Years.ToString()), Convert.ToDouble(Convert.ToDouble(source.Money.ToString()))); diff --git a/SYS.FormUI/AppFunction/FrmCheckIn.cs b/SYS.FormUI/AppFunction/FrmCheckIn.cs index 34df48ef890faa6ea56c4e54ab4f0ce78ed2d5a7..ce020ea2e28858e94e6d7a353494395d9d930357 100644 --- a/SYS.FormUI/AppFunction/FrmCheckIn.cs +++ b/SYS.FormUI/AppFunction/FrmCheckIn.cs @@ -28,7 +28,6 @@ using SYS.Core; using Sunny.UI; using SYS.Application; using System.Transactions; -using SYS.Application.Zero; using System.Linq; using SYS.Common; @@ -48,21 +47,44 @@ namespace SYS.FormUI && CheckEmpty(txtCustoTel, "输入11位手机号码"); } int count = 0; + + ResponseMsg result = new ResponseMsg(); + #region 窗体加载事件方法 private void FrmCheckIn_Load(object sender, EventArgs e) { txtRoomNo.Text = ucRoomList.rm_RoomNo; - Room r = new RoomService().SelectRoomByRoomNo(txtRoomNo.Text); - RoomType t = new RoomTypeService().SelectRoomTypeByRoomNo(txtRoomNo.Text); + Dictionary pairs = new Dictionary(); + pairs.Add("no", txtRoomNo.Text.Trim()); + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, pairs); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectRoomByRoomNo+接口服务异常,请提交issue"); + return; + } + Room r = HttpHelper.JsonToModel(result.message); + result = HttpHelper.Request("RoomType/SelectRoomTypeByRoomNo", null, pairs); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectRoomTypeByRoomNo+接口服务异常,请提交issue"); + return; + } + RoomType t = HttpHelper.JsonToModel(result.message); txtType.Text = t.RoomName; txtMoney.Text = r.RoomMoney.ToString(); txtRoomPosition.Text = r.RoomPosition; txtState.Text = r.RoomState; txtDeposit.Text = r.RoomDeposit.ToString(); - List ctos = new CustoService().SelectCustoAll(ref count, null,null); + result = HttpHelper.Request("Custo/SelectCustoAll", null, null); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectCustoAll+接口服务异常,请提交issue"); + return; + } + var ctos = HttpHelper.JsonToList(result.message).Select(a => a.CustoNo).ToArray(); //List roms = new RoomService().SelectCanUseRoomAll(); - txtCustoNo.AutoCompleteCustomSource.AddRange(ctos.Select(a => a.CustoNo).ToArray()); + txtCustoNo.AutoCompleteCustomSource.AddRange(ctos); try { txtCustoNo.Text = ""; @@ -98,11 +120,25 @@ namespace SYS.FormUI private void txtCustoNo_Validated(object sender, EventArgs e) { + result = HttpHelper.Request("VipRule/SelectVipRuleList", null, null); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectVipRuleList+接口服务异常,请提交issue"); + return; + } //在每次完成输入验证之后,对该用户的会员等级进行初始化或升级以及降级操作 - var listVipRule = new VipRuleAppService().SelectVipRuleList().OrderBy(a => a.rule_value).Distinct().ToList(); + var listVipRule = HttpHelper.JsonToList(result.message).OrderBy(a => a.rule_value).Distinct().ToList(); var new_type = 0; //查询该用户以往的消费记录总额是否达到指定金额,不为空则为老客户 - var listCustoSpend = new SpendService().SeletHistorySpendInfoAll(txtCustoNo.Text.Trim()); + Dictionary user = new Dictionary(); + user.Add("custoNo", txtCustoNo.Text.Trim()); + result = HttpHelper.Request("Spend/SeletHistorySpendInfoAll", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SeletHistorySpendInfoAll+接口服务异常,请提交issue"); + return; + } + var listCustoSpend = HttpHelper.JsonToList(result.message); if (!listCustoSpend.IsNullOrEmpty()) { var spendAmount = listCustoSpend.Sum(a => a.SpendMoney); @@ -117,19 +153,35 @@ namespace SYS.FormUI //不等于0即会员等级有变,需进行及时会员等级 if (new_type != 0) { - new CustoService().UpdCustomerTypeByCustoNo(txtCustoNo.Text.Trim(), new_type); + user = new Dictionary(); + user.Add("custoNo", txtCustoNo.Text.Trim()); + user.Add("userType", new_type.ToString()); + result = HttpHelper.Request("Custo/UpdCustomerTypeByCustoNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("UpdCustomerTypeByCustoNo+接口服务异常,请提交issue"); + return; + } } } - try { if (string.IsNullOrEmpty(txtCustoNo.Text)) { return; } - Custo c = new CustoService().SelectCardInfoByCustoNo(txtCustoNo.Text); + user = new Dictionary(); + user.Add("CustoNo", txtCustoNo.Text.Trim()); + result = HttpHelper.Request("Custo/SelectCardInfoByCustoNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectCardInfoByCustoNo+接口服务异常,请提交issue"); + return; + } + + Custo c = HttpHelper.JsonToModel(result.message); txtCustoName.Text = c.CustoName; txtCustoTel.Text = c.CustoTel; txtCustoType.Text = c.typeName; @@ -144,7 +196,15 @@ namespace SYS.FormUI private void FrmCheckIn_ButtonOkClick(object sender, EventArgs e) { - if (new CustoService().SelectCardInfoByCustoNo(txtCustoNo.Text) != null) + Dictionary user = new Dictionary(); + user.Add("CustoNo", txtCustoNo.Text.Trim()); + result = HttpHelper.Request("Custo/SelectCardInfoByCustoNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectCardInfoByCustoNo+接口服务异常,请提交issue"); + return; + } + if (!result.message.IsNullOrEmpty()) { using (TransactionScope scope = new TransactionScope()) { @@ -157,8 +217,13 @@ namespace SYS.FormUI datachg_usr = LoginInfo.WorkerNo, datachg_date = DateTime.Now, }; - - bool n = new RoomService().UpdateRoomInfo(r); + result = HttpHelper.Request("Room/UpdateRoomInfo", HttpHelper.ModelToJson(r), null); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("UpdateRoomInfo+接口服务异常,请提交issue"); + return; + } + bool n = result.message.Equals("true") ? true : false; if (n) { UIMessageBox.Show("登记入住成功!", "登记提示", UIStyle.Green); diff --git a/SYS.FormUI/AppFunction/FrmCheckList.cs b/SYS.FormUI/AppFunction/FrmCheckList.cs index 0da5640c26f3481c9c9cc7988fd54aca159c9ac6..ee96a098bb825c62a600659d19cd2e946d8dfc9d 100644 --- a/SYS.FormUI/AppFunction/FrmCheckList.cs +++ b/SYS.FormUI/AppFunction/FrmCheckList.cs @@ -21,8 +21,11 @@ *SOFTWARE. * */ + using Sunny.UI; using SYS.Application; +using SYS.Common; +using SYS.Core; using System; using System.Windows.Forms; @@ -38,9 +41,14 @@ namespace SYS.FormUI private void FrmCashList_Load(object sender, EventArgs e) { - + var result = HttpHelper.Request("CheckInfo/SelectCheckInfoAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCheckInfoAll+接口服务异常,请提交Issue!"); + return; + } dgvCheckInfo.AutoGenerateColumns = false; - dgvCheckInfo.DataSource = new CheckInfoService().SelectCheckInfoAll(); + dgvCheckInfo.DataSource = HttpHelper.JsonToList(result.message); } } } diff --git a/SYS.FormUI/AppFunction/FrmCheckOutForm.cs b/SYS.FormUI/AppFunction/FrmCheckOutForm.cs index 74876f2c8675d97e8ba6f9ffb6a2b9ab31b03e66..7026a346e9833db17c0d5e791d30fbf34ae647ef 100644 --- a/SYS.FormUI/AppFunction/FrmCheckOutForm.cs +++ b/SYS.FormUI/AppFunction/FrmCheckOutForm.cs @@ -53,7 +53,8 @@ namespace SYS.FormUI InitializeComponent(); } - + ResponseMsg result = null; + Dictionary dic = null; #region 记录鼠标和窗体坐标的方法 private Point mouseOld;//鼠标旧坐标 @@ -85,7 +86,13 @@ namespace SYS.FormUI private void FrmCheckOutForm_Load(object sender, EventArgs e) { #region 加载客户类型信息 - List lstSourceGrid = new BaseService().SelectCustoTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectCustoTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List lstSourceGrid = HttpHelper.JsonToList(result.message); this.cboCustoType.DataSource = lstSourceGrid; this.cboCustoType.DisplayMember = "TypeName"; this.cboCustoType.ValueMember = "UserType"; @@ -94,7 +101,13 @@ namespace SYS.FormUI #endregion #region 加载证件类型信息 - List passPorts = new BaseService().SelectPassPortTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectPassPortTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPassPortTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List passPorts = HttpHelper.JsonToList(result.message); this.cboPassportType.DataSource = passPorts; this.cboPassportType.DisplayMember = "PassportName"; this.cboPassportType.ValueMember = "PassportId"; @@ -102,7 +115,13 @@ namespace SYS.FormUI #endregion #region 加载性别信息 - List listSexType = new BaseService().SelectSexTypeAll(new SexType { delete_mk = 0 }); + result = HttpHelper.Request("Base/SelectSexTypeAll?delete_mk=0"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + List listSexType = HttpHelper.JsonToList(result.message); this.cboCustoSex.DataSource = listSexType; this.cboCustoSex.DisplayMember = "sexName"; this.cboCustoSex.ValueMember = "sexId"; @@ -124,44 +143,64 @@ namespace SYS.FormUI { dtpCheckTime.Text = Convert.ToDateTime(ucRoomList.co_CheckTime).ToString("yyyy年MM月dd日"); } + dic = new Dictionary() + { + { "roomno",txtRoomNo.Text} + }; + result = HttpHelper.Request("Room/DayByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DayByRoomNo+接口服务异常,请提交Issue!"); + return; + } if (rs == "BD") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 300)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 300)); } if (rs == "BS") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 425)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 425)); } if (rs == "HD") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 625)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 625)); } if (rs == "HS") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 660)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 660)); } if (rs == "QL") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 845)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 845)); } if (rs == "ZT") { - sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 1080)); + sum = Convert.ToDouble(Convert.ToString(Convert.ToInt32(result.message) * 1080)); } - lblDay.Text = Convert.ToString(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString())); + lblDay.Text = Convert.ToString(Convert.ToInt32(result.message)); w = new Wti() { CustoNo = txtCustoNo.Text, EndDate = Convert.ToDateTime(DateTime.Parse(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"))), - PowerUse = Convert.ToDecimal(Convert.ToInt32(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 3 * 1), - WaterUse = Convert.ToDecimal(Convert.ToDouble(new RoomService().DayByRoomNo(txtRoomNo.Text).ToString()) * 80 * 0.002), + PowerUse = Convert.ToDecimal(Convert.ToInt32(result.message) * 3 * 1), + WaterUse = Convert.ToDecimal(Convert.ToDouble(result.message) * 80 * 0.002), RoomNo = txtRoomNo.Text, Record = "admin", UseDate = Convert.ToDateTime(DateTime.Parse(dtpCheckTime.Text)), }; #region 加载客户信息 - Custo cto = new CustoService().SelectCardInfoByCustoNo(CustoNo.Text.ToString()); + dic = new Dictionary() + { + { "CustoNo",CustoNo.Text.ToString()} + }; + result = HttpHelper.Request("Custo​/SelectCardInfoByCustoNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCardInfoByCustoNo+接口服务异常,请提交Issue!"); + return; + } + Custo cto = HttpHelper.JsonToModel(result.message); try { CustoName.Text = cto.CustoName; @@ -170,7 +209,7 @@ namespace SYS.FormUI cboCustoSex.SelectedIndex = cto.CustoSex; cboCustoType.SelectedIndex = cto.CustoType; cboPassportType.SelectedIndex = cto.PassportType; - dtpBirth.Value = cto.CustoBirth; + dtpBirth.Value = Convert.ToDateTime(cto.CustoBirth); txtPassportNum.Text = cto.CustoID; } catch @@ -184,29 +223,60 @@ namespace SYS.FormUI #region 加载消费信息 string RoomNo = txtRoomNo.Text; + dic = new Dictionary() + { + { "RoomNo",RoomNo} + }; + result = HttpHelper.Request("Spend/SelectSpendInfoRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSpendInfoRoomNo+接口服务异常,请提交Issue!"); + return; + } dgvSpendList.AutoGenerateColumns = false; - dgvSpendList.DataSource = new SpendService().SelectSpendInfoRoomNo(RoomNo); - double result = 0; + dgvSpendList.DataSource = HttpHelper.JsonToList(result.message); + double total = 0; if (dgvSpendList.Rows.Count == 0) { - result = 0; + total = 0; } else { - result = Convert.ToDouble(new SpendService().SelectMoneyByRoomNoAndTime(RoomNo, CustoNo.Text.ToString())); + dic = new Dictionary() + { + { "roomno",RoomNo}, + { "custono",CustoNo.Text.ToString()} + }; + result = HttpHelper.Request("Spend/SelectMoneyByRoomNoAndTime", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectMoneyByRoomNoAndTime+接口服务异常,请提交Issue!"); + return; + } + total = Convert.ToDouble(result.message); } #endregion #region 加载水电费信息 - var listWti = new WtiService().ListWtiInfoByRoomNo(txtRoomNo.Text.Trim()); + dic = new Dictionary() + { + { "roomno",txtRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Wti/ListWtiInfoByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("ListWtiInfoByRoomNo+接口服务异常,请提交Issue!"); + return; + } + var listWti = HttpHelper.JsonToList(result.message); dgvWti.DataSource = listWti; dgvWti.AutoGenerateColumns = false; #endregion if (cboCustoType.Text == "钻石会员") { - double m = result + sum; + double m = total + sum; lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIPPrice.Text = Decimal.Parse((m * 0.80).ToString()).ToString("#,##0.00"); lblVIP.Text = "八折"; @@ -214,28 +284,28 @@ namespace SYS.FormUI else if (cboCustoType.Text == "白金会员") { - double m = result + sum; + double m = total + sum; lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIPPrice.Text = Decimal.Parse((m * 0.85).ToString()).ToString("#,##0.00"); lblVIP.Text = "八五折"; } else if (cboCustoType.Text == "黄金会员") { - double m = result + sum; + double m = total + sum; lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIPPrice.Text = Decimal.Parse((m * 0.90).ToString()).ToString("#,##0.00"); lblVIP.Text = "九折"; } else if (cboCustoType.Text == "普通会员") { - double m = result + sum; + double m = total + sum; lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIPPrice.Text = Decimal.Parse((m * 0.95).ToString()).ToString("#,##0.00"); lblVIP.Text = "九五折"; } else if (cboCustoType.Text == "普通用户") { - double m = result + sum; + double m = total + sum; lblGetReceipts.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIPPrice.Text = Decimal.Parse(m.ToString()).ToString("#,##0.00"); lblVIP.Text = "不 打 折"; @@ -287,14 +357,39 @@ namespace SYS.FormUI { using (TransactionScope scope = new TransactionScope()) { - Room r = new RoomService().SelectRoomByRoomNo(txtRoomNo.Text);//根据房间编号查询房间信息 + dic = new Dictionary() + { + { "no",txtRoomNo.Text} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByRoomNo+接口服务异常,请提交Issue!"); + return; + } + Room r = HttpHelper.JsonToModel(result.message);//根据房间编号查询房间信息 string checktime = r.CheckTime.ToString();//获取入住时间 if (dgvSpendList.Rows.Count == 0) { - bool n = new RoomService().UpdateRoomByRoomNo(txtRoomNo.Text); - if (n == true) + dic = new Dictionary() + { + { "room",txtRoomNo.Text} + }; + result = HttpHelper.Request("Room/UpdateRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateRoomByRoomNo+接口服务异常,请提交Issue!"); + return; + } + bool n = result.message.ToString().Equals("true"); + if (n) { - new WtiService().InsertWtiInfo(w);//添加水电费信息 + result = HttpHelper.Request("Wti​/InsertWtiInfo", HttpHelper.ModelToJson(w)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertWtiInfo+接口服务异常,请提交Issue!"); + return; + } this.Close(); } else @@ -311,12 +406,38 @@ namespace SYS.FormUI } else { - if (new SpendService().UpdateMoneyState(txtRoomNo.Text, checktime) == true) + dic = new Dictionary() + { + { "roomno",txtRoomNo.Text}, + { "checktime",checktime} + }; + result = HttpHelper.Request("Spend​/UpdateMoneyState", null, dic); + if (result.statusCode != 200) { - bool n = new RoomService().UpdateRoomByRoomNo(txtRoomNo.Text); - if (n == true) + UIMessageBox.ShowError("UpdateMoneyState+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) + { + dic = new Dictionary() + { + { "room",txtRoomNo.Text} + }; + result = HttpHelper.Request("Room/UpdateRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateMoneyState+接口服务异常,请提交Issue!"); + return; + } + bool n = result.message.ToString().Equals("true"); + if (n) { - new WtiService().InsertWtiInfo(w);//添加水电费信息 + result = HttpHelper.Request("Wti​/InsertWtiInfo", HttpHelper.ModelToJson(w)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertWtiInfo+接口服务异常,请提交Issue!"); + return; + } this.Close(); } else diff --git a/SYS.FormUI/AppFunction/FrmCustoManager.Designer.cs b/SYS.FormUI/AppFunction/FrmCustoManager.Designer.cs index 5230632b3c723a07c8ceb6da0951c1d82ec0b199..fb9a0779fb3013041097321f7af79cc00b3189d5 100644 --- a/SYS.FormUI/AppFunction/FrmCustoManager.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmCustoManager.Designer.cs @@ -47,6 +47,8 @@ this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cmsCustoManager = new Sunny.UI.UIContextMenuStrip(); + this.tsmiCustoNo = new System.Windows.Forms.ToolStripMenuItem(); this.btnSerach = new Sunny.UI.UIButton(); this.btnAddCusto = new Sunny.UI.UIButton(); this.btnExport = new Sunny.UI.UIButton(); @@ -57,7 +59,9 @@ this.txtCustoNo = new Sunny.UI.UITextBox(); this.label3 = new System.Windows.Forms.Label(); this.btnPg = new Sunny.UI.UIPagination(); + this.uiLine1 = new Sunny.UI.UILine(); ((System.ComponentModel.ISupportInitialize)(this.dgvCustomerList)).BeginInit(); + this.cmsCustoManager.SuspendLayout(); this.uiGroupBox1.SuspendLayout(); this.SuspendLayout(); // @@ -97,6 +101,7 @@ this.Column2, this.Column3, this.Column4}); + this.dgvCustomerList.ContextMenuStrip = this.cmsCustoManager; dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); @@ -128,6 +133,7 @@ this.dgvCustomerList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; this.dgvCustomerList.ShowRect = false; this.dgvCustomerList.Size = new System.Drawing.Size(999, 482); + this.dgvCustomerList.Style = Sunny.UI.UIStyle.Custom; this.dgvCustomerList.TabIndex = 111; // // CustoNo @@ -218,6 +224,23 @@ this.Column4.ReadOnly = true; this.Column4.Visible = false; // + // cmsCustoManager + // + this.cmsCustoManager.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(243)))), ((int)(((byte)(249)))), ((int)(((byte)(255))))); + this.cmsCustoManager.Font = new System.Drawing.Font("微软雅黑", 12F); + this.cmsCustoManager.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiCustoNo}); + this.cmsCustoManager.Name = "cmsCustoManager"; + this.cmsCustoManager.Size = new System.Drawing.Size(177, 30); + // + // tsmiCustoNo + // + this.tsmiCustoNo.Image = global::SYS.FormUI.Properties.Resources.复制; + this.tsmiCustoNo.Name = "tsmiCustoNo"; + this.tsmiCustoNo.Size = new System.Drawing.Size(176, 26); + this.tsmiCustoNo.Text = "复制用户编号"; + this.tsmiCustoNo.Click += new System.EventHandler(this.tsmiCustoNo_Click); + // // btnSerach // this.btnSerach.Cursor = System.Windows.Forms.Cursors.Hand; @@ -227,8 +250,10 @@ this.btnSerach.Name = "btnSerach"; this.btnSerach.Radius = 30; this.btnSerach.Size = new System.Drawing.Size(97, 41); + this.btnSerach.Style = Sunny.UI.UIStyle.Custom; this.btnSerach.TabIndex = 113; this.btnSerach.Text = "搜 索"; + this.btnSerach.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnSerach.Click += new System.EventHandler(this.picSearch_Click_1); // // btnAddCusto @@ -240,8 +265,10 @@ this.btnAddCusto.Name = "btnAddCusto"; this.btnAddCusto.Radius = 30; this.btnAddCusto.Size = new System.Drawing.Size(97, 41); + this.btnAddCusto.Style = Sunny.UI.UIStyle.Custom; this.btnAddCusto.TabIndex = 114; this.btnAddCusto.Text = "添加客户"; + this.btnAddCusto.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnAddCusto.Click += new System.EventHandler(this.picAddCusto_Click_1); // // btnExport @@ -253,8 +280,10 @@ this.btnExport.Name = "btnExport"; this.btnExport.Radius = 30; this.btnExport.Size = new System.Drawing.Size(97, 41); + this.btnExport.Style = Sunny.UI.UIStyle.Custom; this.btnExport.TabIndex = 115; this.btnExport.Text = "导出列表"; + this.btnExport.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnExport.Click += new System.EventHandler(this.picLoadOut_Click_1); // // btnUpdate @@ -266,8 +295,10 @@ this.btnUpdate.Name = "btnUpdate"; this.btnUpdate.Radius = 30; this.btnUpdate.Size = new System.Drawing.Size(97, 41); + this.btnUpdate.Style = Sunny.UI.UIStyle.Custom; this.btnUpdate.TabIndex = 116; this.btnUpdate.Text = "修改客户"; + this.btnUpdate.TipsFont = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); this.btnUpdate.Click += new System.EventHandler(this.picUpdateCusto_Click_1); // // uiGroupBox1 @@ -283,6 +314,7 @@ this.uiGroupBox1.Name = "uiGroupBox1"; this.uiGroupBox1.Padding = new System.Windows.Forms.Padding(0, 32, 0, 0); this.uiGroupBox1.Size = new System.Drawing.Size(572, 62); + this.uiGroupBox1.Style = Sunny.UI.UIStyle.Custom; this.uiGroupBox1.TabIndex = 117; this.uiGroupBox1.Text = "条件搜索"; this.uiGroupBox1.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; @@ -301,8 +333,10 @@ this.txtCustoName.Padding = new System.Windows.Forms.Padding(5); this.txtCustoName.Radius = 20; this.txtCustoName.Size = new System.Drawing.Size(173, 33); + this.txtCustoName.Style = Sunny.UI.UIStyle.Custom; this.txtCustoName.TabIndex = 98; this.txtCustoName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + this.txtCustoName.Watermark = ""; // // label1 // @@ -328,8 +362,10 @@ this.txtCustoNo.Padding = new System.Windows.Forms.Padding(5); this.txtCustoNo.Radius = 20; this.txtCustoNo.Size = new System.Drawing.Size(173, 33); + this.txtCustoNo.Style = Sunny.UI.UIStyle.Custom; this.txtCustoNo.TabIndex = 96; this.txtCustoNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + this.txtCustoNo.Watermark = ""; // // label3 // @@ -343,25 +379,39 @@ // // btnPg // + this.btnPg.ButtonInterval = 5; this.btnPg.Font = new System.Drawing.Font("微软雅黑", 12F); this.btnPg.Location = new System.Drawing.Point(3, 528); this.btnPg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.btnPg.MinimumSize = new System.Drawing.Size(1, 1); this.btnPg.Name = "btnPg"; + this.btnPg.PageSize = 12; this.btnPg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.btnPg.Size = new System.Drawing.Size(999, 34); + this.btnPg.Size = new System.Drawing.Size(782, 34); + this.btnPg.Style = Sunny.UI.UIStyle.Custom; this.btnPg.TabIndex = 121; + this.btnPg.Text = null; this.btnPg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.btnPg.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.btnPg_PageChanged); - this.btnPg.Paint += new System.Windows.Forms.PaintEventHandler(this.btnPg_Paint); + // + // uiLine1 + // + this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine1.Location = new System.Drawing.Point(792, 533); + this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2); + this.uiLine1.Name = "uiLine1"; + this.uiLine1.Size = new System.Drawing.Size(203, 29); + this.uiLine1.Style = Sunny.UI.UIStyle.Custom; + this.uiLine1.TabIndex = 123; + this.uiLine1.Text = "右键可复制客户编号"; // // FrmCustoManager // - this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.ClientSize = new System.Drawing.Size(1005, 623); this.ControlBox = false; + this.Controls.Add(this.uiLine1); this.Controls.Add(this.btnPg); this.Controls.Add(this.uiGroupBox1); this.Controls.Add(this.btnUpdate); @@ -373,10 +423,11 @@ this.MaximizeBox = false; this.MinimizeBox = false; this.Name = "FrmCustoManager"; - this.ShowIcon = true; + this.Style = Sunny.UI.UIStyle.Custom; this.Text = "客户信息管理"; this.Load += new System.EventHandler(this.FrmCustoManager_Load); ((System.ComponentModel.ISupportInitialize)(this.dgvCustomerList)).EndInit(); + this.cmsCustoManager.ResumeLayout(false); this.uiGroupBox1.ResumeLayout(false); this.uiGroupBox1.PerformLayout(); this.ResumeLayout(false); @@ -407,5 +458,8 @@ private Sunny.UI.UITextBox txtCustoNo; private System.Windows.Forms.Label label3; private Sunny.UI.UIPagination btnPg; + private Sunny.UI.UIContextMenuStrip cmsCustoManager; + private System.Windows.Forms.ToolStripMenuItem tsmiCustoNo; + private Sunny.UI.UILine uiLine1; } } \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmCustoManager.cs b/SYS.FormUI/AppFunction/FrmCustoManager.cs index 8f50b35ebe0c7e62deab6b1ca5d185727bf65971..94b4d880729709cb4acf9524fe6e939d2394d5da 100644 --- a/SYS.FormUI/AppFunction/FrmCustoManager.cs +++ b/SYS.FormUI/AppFunction/FrmCustoManager.cs @@ -22,13 +22,17 @@ * */ using System; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using SYS.FormUI.Properties; using System.Collections.Generic; using SYS.Application; using Sunny.UI; +using SYS.Common; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; namespace SYS.FormUI { @@ -56,9 +60,13 @@ namespace SYS.FormUI ReloadCusto = LoadCustomer; } + Dictionary dic = null; + ResponseMsg result = null; + private void FrmCustoManager_Load(object sender, EventArgs e) { //dgvCustomerList.AutoGenerateColumns = false; + this.btnPg.PageSize = 12; LoadCustomer(); LoadCustoType(); //txtCustoNo.ReadOnly = true; @@ -78,11 +86,22 @@ namespace SYS.FormUI #region 加载用户信息列表 private void LoadCustomer() { - var count = 0; - List lstSource = new CustoService().SelectCustoAll(ref count, 1, 20); - btnPg.TotalCount = count; + dic = new Dictionary() + { + { "delete_mk","0"}, + { "pageIndex","1"}, + { "pageSize","15"} + }; + result = HttpHelper.Request("Custo/SelectCustoAll",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + OSelectCustoAllDto custos = HttpHelper.JsonToModel(result.message); + this.btnPg.TotalCount = custos.total; this.dgvCustomerList.AutoGenerateColumns = false; - this.dgvCustomerList.DataSource = lstSource; + this.dgvCustomerList.DataSource = custos.listSource; } #endregion @@ -124,19 +143,44 @@ namespace SYS.FormUI { dgvCustomerList.ClearRows(); dgvCustomerList.AutoGenerateColumns = false; - List custos = null; + OSelectCustoAllDto custos = new OSelectCustoAllDto(); if (!txtCustoNo.Text.IsNullOrEmpty()) { - custos = new CustoService().SelectCustoByInfo(new Custo { CustoNo = txtCustoNo.Text.Trim() }); + dic = new Dictionary + { + { "CustoNo", txtCustoNo.Text.Trim() } + }; + result = HttpHelper.Request("Custo/SelectCustoByInfo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoByInfo+接口服务异常,请提交Issue!"); + return; + } + custos = HttpHelper.JsonToModel(result.message); } else if (!txtCustoName.Text.IsNullOrEmpty()) { - custos = new CustoService().SelectCustoByInfo(new Custo { CustoName = txtCustoName.Text.Trim() }); + dic = new Dictionary + { + { "CustoName", txtCustoName.Text.Trim() } + }; + result = HttpHelper.Request("Custo/SelectCustoByInfo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoByInfo+接口服务异常,请提交Issue!"); + return; + } + custos = HttpHelper.JsonToModel(result.message); } else { - custos = new CustoService().SelectCustoAll(ref count,1,20); - + result = HttpHelper.Request("Custo/SelectCustoAll?pageIndex=1&pageSize=20"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + custos = HttpHelper.JsonToModel(result.message); } dgvCustomerList.DataSource = custos; } @@ -212,15 +256,33 @@ namespace SYS.FormUI private void btnPg_PageChanged(object sender, object pagingSource, int pageIndex, int count) { - var totalCount = 0; - List lstSource = new CustoService().SelectCustoAll(ref totalCount, pageIndex, count); + dic = new Dictionary() + { + { "delete_mk","0"}, + { "pageIndex",pageIndex.ToString()}, + { "pageSize",count.ToString()} + }; + result = HttpHelper.Request("Custo/SelectCustoAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + OSelectCustoAllDto custos = HttpHelper.JsonToModel(result.message); + btnPg.TotalCount = custos.total; this.dgvCustomerList.AutoGenerateColumns = false; - this.dgvCustomerList.DataSource = lstSource; + this.dgvCustomerList.DataSource = custos.listSource; } private void btnPg_Paint(object sender, PaintEventArgs e) { } + + private void tsmiCustoNo_Click(object sender, EventArgs e) + { + Clipboard.SetText(dgvCustomerList.Rows[0].Cells["CustoNo"].Value as string); + UIMessageTip.ShowOk("复制完成!", 1500); + } } } diff --git a/SYS.FormUI/AppFunction/FrmCustoManager.resx b/SYS.FormUI/AppFunction/FrmCustoManager.resx index 9f5a51a5dfa102ed0cc2821260e6540a3e92433a..bc5715e475b510e3395c4f059d23811715bde62f 100644 --- a/SYS.FormUI/AppFunction/FrmCustoManager.resx +++ b/SYS.FormUI/AppFunction/FrmCustoManager.resx @@ -153,6 +153,9 @@ True + + 17, 17 + diff --git a/SYS.FormUI/AppFunction/FrmCustoSpend.cs b/SYS.FormUI/AppFunction/FrmCustoSpend.cs index f8c58456cde81d441e814e8034775d25e428b81d..464d74ff302161a0e2c27878770f38b8bbc3f2b0 100644 --- a/SYS.FormUI/AppFunction/FrmCustoSpend.cs +++ b/SYS.FormUI/AppFunction/FrmCustoSpend.cs @@ -21,8 +21,11 @@ *SOFTWARE. * */ + using Sunny.UI; using SYS.Application; +using SYS.Common; +using SYS.Core; using System; using System.Windows.Forms; @@ -37,8 +40,14 @@ namespace SYS.FormUI private void FrmCustoSpend_Load(object sender, EventArgs e) { + var result = HttpHelper.Request("Spend/SelectSpendInfoAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSpendInfoAll+接口服务异常,请提交Issue!"); + return; + } dgvSpendList.AutoGenerateColumns = false; - dgvSpendList.DataSource = new SpendService().SelectSpendInfoAll(); + dgvSpendList.DataSource = HttpHelper.JsonToList(result.message); } } } diff --git a/SYS.FormUI/AppFunction/FrmCustomerManager.Designer.cs b/SYS.FormUI/AppFunction/FrmCustomerManager.Designer.cs index a1d25770e894a8484d99e2728eeca7fea05edb41..4efb160b49560dd1109862a6101980e191db9f61 100644 --- a/SYS.FormUI/AppFunction/FrmCustomerManager.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmCustomerManager.Designer.cs @@ -29,10 +29,10 @@ private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle9 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle10 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle11 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle12 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); this.dgvCustomerList = new Sunny.UI.UIDataGridView(); this.CustoNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); @@ -52,6 +52,8 @@ this.Column7 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column8 = new System.Windows.Forms.DataGridViewTextBoxColumn(); this.Column9 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.cmsCustoManager = new Sunny.UI.UIContextMenuStrip(); + this.tsmiCustoNo = new System.Windows.Forms.ToolStripMenuItem(); this.btnSerach = new Sunny.UI.UIButton(); this.btnAddCusto = new Sunny.UI.UIButton(); this.btnUpdCustomer = new Sunny.UI.UIButton(); @@ -61,7 +63,9 @@ this.txtCustoNo = new Sunny.UI.UITextBox(); this.label3 = new System.Windows.Forms.Label(); this.btnPg = new Sunny.UI.UIPagination(); + this.uiLine1 = new Sunny.UI.UILine(); ((System.ComponentModel.ISupportInitialize)(this.dgvCustomerList)).BeginInit(); + this.cmsCustoManager.SuspendLayout(); this.uiGroupBox1.SuspendLayout(); this.SuspendLayout(); // @@ -76,21 +80,21 @@ this.dgvCustomerList.AllowUserToDeleteRows = false; this.dgvCustomerList.AllowUserToResizeColumns = false; this.dgvCustomerList.AllowUserToResizeRows = false; - dataGridViewCellStyle9.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.dgvCustomerList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle9; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvCustomerList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; this.dgvCustomerList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; this.dgvCustomerList.BackgroundColor = System.Drawing.Color.White; this.dgvCustomerList.BorderStyle = System.Windows.Forms.BorderStyle.None; this.dgvCustomerList.CellBorderStyle = System.Windows.Forms.DataGridViewCellBorderStyle.Raised; this.dgvCustomerList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; - dataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - dataGridViewCellStyle10.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - dataGridViewCellStyle10.Font = new System.Drawing.Font("微软雅黑", 12F); - dataGridViewCellStyle10.ForeColor = System.Drawing.Color.White; - dataGridViewCellStyle10.SelectionBackColor = System.Drawing.SystemColors.Highlight; - dataGridViewCellStyle10.SelectionForeColor = System.Drawing.SystemColors.HighlightText; - dataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvCustomerList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle10; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight; + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvCustomerList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; this.dgvCustomerList.ColumnHeadersHeight = 25; this.dgvCustomerList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; this.dgvCustomerList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { @@ -111,24 +115,25 @@ this.Column7, this.Column8, this.Column9}); + this.dgvCustomerList.ContextMenuStrip = this.cmsCustoManager; this.dgvCustomerList.EnableHeadersVisualStyles = false; this.dgvCustomerList.Font = new System.Drawing.Font("微软雅黑", 12F); this.dgvCustomerList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); this.dgvCustomerList.Location = new System.Drawing.Point(12, 12); this.dgvCustomerList.Name = "dgvCustomerList"; this.dgvCustomerList.ReadOnly = true; - dataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; - dataGridViewCellStyle11.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - dataGridViewCellStyle11.Font = new System.Drawing.Font("微软雅黑", 12F); - dataGridViewCellStyle11.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); - dataGridViewCellStyle11.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - dataGridViewCellStyle11.SelectionForeColor = System.Drawing.Color.White; - dataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.True; - this.dgvCustomerList.RowHeadersDefaultCellStyle = dataGridViewCellStyle11; + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvCustomerList.RowHeadersDefaultCellStyle = dataGridViewCellStyle3; this.dgvCustomerList.RowHeadersVisible = false; this.dgvCustomerList.RowHeight = 29; - dataGridViewCellStyle12.BackColor = System.Drawing.Color.White; - this.dgvCustomerList.RowsDefaultCellStyle = dataGridViewCellStyle12; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.White; + this.dgvCustomerList.RowsDefaultCellStyle = dataGridViewCellStyle4; this.dgvCustomerList.RowTemplate.Height = 29; this.dgvCustomerList.SelectedIndex = -1; this.dgvCustomerList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; @@ -267,6 +272,22 @@ this.Column9.ReadOnly = true; this.Column9.Visible = false; // + // cmsCustoManager + // + this.cmsCustoManager.Font = new System.Drawing.Font("微软雅黑", 12F); + this.cmsCustoManager.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.tsmiCustoNo}); + this.cmsCustoManager.Name = "cmsCustoManager"; + this.cmsCustoManager.Size = new System.Drawing.Size(177, 30); + // + // tsmiCustoNo + // + this.tsmiCustoNo.Image = global::SYS.FormUI.Properties.Resources.复制; + this.tsmiCustoNo.Name = "tsmiCustoNo"; + this.tsmiCustoNo.Size = new System.Drawing.Size(176, 26); + this.tsmiCustoNo.Text = "复制用户编号"; + this.tsmiCustoNo.Click += new System.EventHandler(this.tsmiCustoNo_Click); + // // btnSerach // this.btnSerach.Cursor = System.Windows.Forms.Cursors.Hand; @@ -382,17 +403,29 @@ // // btnPg // + this.btnPg.ButtonInterval = 5; this.btnPg.Font = new System.Drawing.Font("微软雅黑", 12F); this.btnPg.Location = new System.Drawing.Point(12, 401); this.btnPg.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); this.btnPg.MinimumSize = new System.Drawing.Size(1, 1); this.btnPg.Name = "btnPg"; + this.btnPg.PageSize = 12; this.btnPg.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.btnPg.Size = new System.Drawing.Size(1048, 34); + this.btnPg.Size = new System.Drawing.Size(755, 34); this.btnPg.TabIndex = 120; + this.btnPg.Text = null; this.btnPg.TextAlignment = System.Drawing.ContentAlignment.MiddleCenter; this.btnPg.PageChanged += new Sunny.UI.UIPagination.OnPageChangeEventHandler(this.btnPg_PageChanged); - this.btnPg.Click += new System.EventHandler(this.btnPg_Click); + // + // uiLine1 + // + this.uiLine1.Font = new System.Drawing.Font("微软雅黑", 12F); + this.uiLine1.Location = new System.Drawing.Point(774, 404); + this.uiLine1.MinimumSize = new System.Drawing.Size(2, 2); + this.uiLine1.Name = "uiLine1"; + this.uiLine1.Size = new System.Drawing.Size(286, 29); + this.uiLine1.TabIndex = 124; + this.uiLine1.Text = "右键可复制快速客户编号"; // // FrmCustomerManager // @@ -400,6 +433,7 @@ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); this.ClientSize = new System.Drawing.Size(1072, 490); + this.Controls.Add(this.uiLine1); this.Controls.Add(this.btnPg); this.Controls.Add(this.uiGroupBox1); this.Controls.Add(this.btnUpdCustomer); @@ -412,6 +446,7 @@ this.Text = "TS酒店管理系统"; this.Load += new System.EventHandler(this.FrmCustomerManager_Load); ((System.ComponentModel.ISupportInitialize)(this.dgvCustomerList)).EndInit(); + this.cmsCustoManager.ResumeLayout(false); this.uiGroupBox1.ResumeLayout(false); this.uiGroupBox1.PerformLayout(); this.ResumeLayout(false); @@ -447,5 +482,8 @@ private Sunny.UI.UITextBox txtCustoName; private System.Windows.Forms.Label label1; private Sunny.UI.UIPagination btnPg; + private Sunny.UI.UIContextMenuStrip cmsCustoManager; + private System.Windows.Forms.ToolStripMenuItem tsmiCustoNo; + private Sunny.UI.UILine uiLine1; } } \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmCustomerManager.cs b/SYS.FormUI/AppFunction/FrmCustomerManager.cs index 4eea61b636eb1af9916b1c5c28c7c2763e1ea1a8..51e93c7215720524a4aaeb545e90019d8a3830a4 100644 --- a/SYS.FormUI/AppFunction/FrmCustomerManager.cs +++ b/SYS.FormUI/AppFunction/FrmCustomerManager.cs @@ -22,7 +22,7 @@ * */ using System; -using MySql.Data.MySqlClient; + using System.Text.RegularExpressions; using System.Windows.Forms; using SYS.Core; @@ -31,6 +31,7 @@ using System.Collections.Generic; using System.Linq; using SYS.Application; using Sunny.UI; +using SYS.Common; namespace SYS.FormUI { @@ -49,22 +50,36 @@ namespace SYS.FormUI ReloadCustomer = LoadCustomer; } + Dictionary dic = null; + ResponseMsg result = null; + #region 用户管理界面加载事件方法 private void FrmCustomerManager_Load(object sender, EventArgs e) { + this.btnPg.PageSize = 12; LoadCustomer(); - } #endregion #region 加载用户信息列表 private void LoadCustomer() { - var count = 0; - List lstSource = new CustoService().SelectCustoAll(ref count, 1, 20); - btnPg.TotalCount = count; + dic = new Dictionary() + { + { "delete_mk","0"}, + { "pageIndex","1"}, + { "pageSize","12"} + }; + result = HttpHelper.Request("Custo/SelectCustoAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + OSelectCustoAllDto custos = HttpHelper.JsonToModel(result.message); + btnPg.TotalCount = custos.total; this.dgvCustomerList.AutoGenerateColumns = false; - this.dgvCustomerList.DataSource = lstSource; + this.dgvCustomerList.DataSource = custos.listSource; } #endregion @@ -148,19 +163,48 @@ namespace SYS.FormUI { dgvCustomerList.ClearRows(); dgvCustomerList.AutoGenerateColumns = false; - List custos = null; + List custos = new List(); if (!txtCustoNo.Text.IsNullOrEmpty()) { - custos = new CustoService().SelectCustoByInfo(new Custo { CustoNo = txtCustoNo.Text.Trim() }); + dic = new Dictionary + { + { "CustoNo", txtCustoNo.Text.Trim() } + }; + result = HttpHelper.Request("Custo/SelectCustoAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + //custos = HttpHelper.JsonToList(result.message); + var listSource = HttpHelper.JsonToModel(result.message); + custos = listSource.listSource; } else if (!txtCustoName.Text.IsNullOrEmpty()) { - custos = new CustoService().SelectCustoByInfo(new Custo { CustoName = txtCustoName.Text.Trim() }); + dic = new Dictionary + { + { "CustoName", txtCustoName.Text.Trim() } + }; + result = HttpHelper.Request("Custo/SelectCustoAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + var listSource = HttpHelper.JsonToModel(result.message); + custos = listSource.listSource; } else { - custos = new CustoService().SelectCustoAll(ref count, null,null); - + result = HttpHelper.Request("Custo/SelectCustoAll?pageIndex=1&pageSize=10"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + var listSource = HttpHelper.JsonToModel(result.message); + custos = listSource.listSource; } dgvCustomerList.DataSource = custos; } @@ -208,10 +252,28 @@ namespace SYS.FormUI private void btnPg_PageChanged(object sender, object pagingSource, int pageIndex, int count) { - var totalCount = 0; - List lstSource = new CustoService().SelectCustoAll(ref totalCount,pageIndex, count); + dic = new Dictionary() + { + { "delete_mk","0"}, + { "pageIndex",pageIndex.ToString()}, + { "pageSize",count.ToString()} + }; + result = HttpHelper.Request("Custo/SelectCustoAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoAll+接口服务异常,请提交Issue!"); + return; + } + OSelectCustoAllDto custos = HttpHelper.JsonToModel(result.message); + this.btnPg.TotalCount = custos.total; this.dgvCustomerList.AutoGenerateColumns = false; - this.dgvCustomerList.DataSource = lstSource; + this.dgvCustomerList.DataSource = custos.listSource; + } + + private void tsmiCustoNo_Click(object sender, EventArgs e) + { + Clipboard.SetText(dgvCustomerList.Rows[0].Cells["CustoNo"].Value as string); + UIMessageTip.ShowOk("复制完成!", 1500); } } diff --git a/SYS.FormUI/AppFunction/FrmCustomerManager.resx b/SYS.FormUI/AppFunction/FrmCustomerManager.resx index 03dcc7e485272e2b4af240d004364ea2f0ac9183..4626d0ce0a38f8ea8db45d77021412156aaf25a6 100644 --- a/SYS.FormUI/AppFunction/FrmCustomerManager.resx +++ b/SYS.FormUI/AppFunction/FrmCustomerManager.resx @@ -171,4 +171,7 @@ True + + 179, 17 + \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmDepartment.cs b/SYS.FormUI/AppFunction/FrmDepartment.cs index d31ea7558d016b3329a0b6a8449e028ec499fc0f..df5c3b5ef7609894a8e910d46c36e773b882c8d8 100644 --- a/SYS.FormUI/AppFunction/FrmDepartment.cs +++ b/SYS.FormUI/AppFunction/FrmDepartment.cs @@ -50,25 +50,46 @@ namespace SYS.FormUI ReloadDeptList(); } + ResponseMsg result = null; + Dictionary dic = null; + public void ReloadDeptList() { LoadDept(); LoadLeader(); - txtDeptNo.Text = new CounterHelper().GetNewId(CounterRuleConsts.DeptInfo); + txtDeptNo.Text = Util.GetListNewId("D", 3, 1, "-").FirstOrDefault(); dgvDeptList.AutoGenerateColumns = false; - dgvDeptList.DataSource = new BaseService().SelectDeptAllCanUse(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + dgvDeptList.DataSource =HttpHelper.JsonToList(result.message); } public void LoadDept() { - cboDeptParent.DataSource = new BaseService().SelectDeptAllCanUse(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + cboDeptParent.DataSource = HttpHelper.JsonToList(result.message); cboDeptParent.DisplayMember = "dept_name"; cboDeptParent.ValueMember = "dept_no"; } public void LoadLeader() { - cboDeptLeader.DataSource = new WorkerService().SelectWorkerAll(); + result = HttpHelper.Request("Worker/SelectWorkerAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectWorkerAll+接口服务异常,请提交Issue!"); + return; + } + cboDeptLeader.DataSource = HttpHelper.JsonToList(result.message); cboDeptLeader.DisplayMember = "WorkerName"; cboDeptLeader.ValueMember = "WorkerId"; } @@ -103,8 +124,14 @@ namespace SYS.FormUI }; if (CheckInput(dept)) { - bool tf = new BaseService().AddDept(dept); - if (tf == false) + result = HttpHelper.Request("Base/AddDept",HttpHelper.ModelToJson(dept)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("AddDept+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (!tf) { UIMessageBox.Show("添加失败!或是服务器繁忙所致,请稍后重试!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; @@ -150,8 +177,14 @@ namespace SYS.FormUI }; if (CheckInput(dept)) { - bool tf = new BaseService().UpdDept(dept); - if (tf == false) + result = HttpHelper.Request("Base/UpdDept", HttpHelper.ModelToJson(dept)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdDept+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (!tf) { UIMessageBox.Show("修改失败!或是服务器繁忙所致,请稍后重试!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; @@ -179,11 +212,18 @@ namespace SYS.FormUI Dept dept = new Dept() { dept_no = txtDeptNo.Text.Trim(), - dept_name = txtDeptName.Text.Trim(), - dept_desc = txtDeptDesc.Text.Trim() + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datains_date = DateTime.Now }; - bool tf = new BaseService().DelDept(dept); - if (tf == false) + result = HttpHelper.Request("Base/DelDept", HttpHelper.ModelToJson(dept)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DelDept+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true"); + if (!tf) { UIMessageBox.Show("删除失败!或是服务器繁忙所致,请稍后重试!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; diff --git a/SYS.FormUI/AppFunction/FrmEditInputs.cs b/SYS.FormUI/AppFunction/FrmEditInputs.cs index 511e4ee827652c78a660a8631a01a762a05249f2..45ece6aced9bf170db79c483cf60e118765a5bc6 100644 --- a/SYS.FormUI/AppFunction/FrmEditInputs.cs +++ b/SYS.FormUI/AppFunction/FrmEditInputs.cs @@ -1,8 +1,8 @@ -using Sunny.UI; + +using Sunny.UI; using SYS.Application; using SYS.Common; using SYS.Core; -using SYS.Core.Util; using System; using System.Collections.Generic; using System.ComponentModel; @@ -23,6 +23,9 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + protected override bool CheckData() { return CheckEmpty(txtCustoName, "请输入姓名") @@ -33,11 +36,17 @@ namespace SYS.FormUI private void FrmEditInputs_Load(object sender, EventArgs e) { - string cardId = new CounterHelper().GetNewId(CounterRuleConsts.CustoId); + string cardId = Util.GetListNewId("TS", 3, 1, "-").FirstOrDefault(); txtCustoNo.Text = cardId; #region 加载客户类型信息 - List lstSourceGrid = new BaseService().SelectCustoTypeAllCanUse(); + var result = HttpHelper.Request("Base/SelectCustoTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List lstSourceGrid = HttpHelper.JsonToList(result.message); this.cbCustoType.DataSource = lstSourceGrid; this.cbCustoType.DisplayMember = "TypeName"; this.cbCustoType.ValueMember = "UserType"; @@ -46,7 +55,13 @@ namespace SYS.FormUI #endregion #region 加载证件类型信息 - List passPorts = new BaseService().SelectPassPortTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectPassPortTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPassPortTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List passPorts = HttpHelper.JsonToList(result.message); this.cbPassportType.DataSource = passPorts; this.cbPassportType.DisplayMember = "PassportName"; this.cbPassportType.ValueMember = "PassportId"; @@ -54,7 +69,13 @@ namespace SYS.FormUI #endregion #region 加载性别信息 - List listSexType = new BaseService().SelectSexTypeAll(new SexType { delete_mk = 0 }); + result = HttpHelper.Request("Base/SelectSexTypeAll?delete_mk=0"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + List listSexType = HttpHelper.JsonToList(result.message); this.cbSex.DataSource = listSexType; this.cbSex.DisplayMember = "sexName"; this.cbSex.ValueMember = "sexId"; @@ -94,24 +115,28 @@ namespace SYS.FormUI { CustoNo = txtCustoNo.Text, CustoName = txtCustoName.Text, - CustoSex = cbSex.SelectedIndex, + CustoSex = Convert.ToInt32(cbSex.SelectedValue.ToString()), CustoBirth = dtpBirthday.Value, - CustoType = cbCustoType.SelectedIndex, - PassportType = cbPassportType.SelectedIndex, + CustoType = Convert.ToInt32(cbCustoType.SelectedValue.ToString()), + PassportType = Convert.ToInt32(cbPassportType.SelectedValue.ToString()), CustoID = txtCardID.Text, CustoTel = txtTel.Text, CustoAdress = txtCustoAdress.Text, datachg_usr = LoginInfo.WorkerNo == null ? AdminInfo.Account : LoginInfo.WorkerNo, datachg_date = DateTime.Now - }; - bool t = new CustoService().UpdCustomerInfoByCustoNo(custo); + result = HttpHelper.Request("Custo/UpdCustomerInfoByCustoNo", HttpHelper.ModelToJson(custo)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdCustomerInfoByCustoNo+接口服务异常,请提交Issue!"); + return; + } + bool t = result.message.ToString().Equals("true") ? true : false; if (!t) { UIMessageBox.Show("修改失败", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; - } UIMessageBox.Show("修改成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK); @@ -142,10 +167,10 @@ namespace SYS.FormUI { CustoNo = txtCustoNo.Text, CustoName = txtCustoName.Text, - CustoSex = cbSex.SelectedIndex, + CustoSex = Convert.ToInt32(cbSex.SelectedValue.ToString()), CustoBirth = dtpBirthday.Value, - CustoType = cbCustoType.SelectedIndex, - PassportType = cbPassportType.SelectedIndex, + CustoType = Convert.ToInt32(cbCustoType.SelectedValue.ToString()), + PassportType = Convert.ToInt32(cbPassportType.SelectedValue.ToString()), CustoID = txtCardID.Text, CustoTel = txtTel.Text, CustoAdress = txtCustoAdress.Text, @@ -154,7 +179,13 @@ namespace SYS.FormUI }; - if (new CustoService().InsertCustomerInfo(custo)) + result = HttpHelper.Request("Custo/InsertCustomerInfo", HttpHelper.ModelToJson(custo), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertCustomerInfo+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) { UIMessageBox.Show("添加成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK); FrmCustomerManager.ReloadCustomer(); @@ -225,36 +256,34 @@ namespace SYS.FormUI return; } } - string birthday = ""; - string sex = ""; + if (identityCard.Length == 18) { - var result = new IDCardUtil().SelectCardCode(identityCard); - var address = result.Replace(",", "").ToString(); - birthday = identityCard.Substring(6, 4) + "-" + identityCard.Substring(10, 2) + "-" + identityCard.Substring(12, 2); - sex = identityCard.Substring(14, 3); - txtCustoAdress.Text = address; - //性别代码为偶数是女性奇数为男性 - if (int.Parse(sex) % 2 == 0) + var result = Util.searchCode(identityCard); + if (result.message.IsNullOrEmpty()) //如果没有错误消息输出,则代表成功 { - cbSex.Text = "女"; + try + { + cbSex.Text = result.sex; + txtCustoAdress.Text = result.address; + dtpBirthday.Value = Convert.ToDateTime(result.birthday); + } + catch + { + UIMessageBox.ShowError("请正确输入证件号码!"); + return; + } + finally + { + cbPassportType.SelectedIndex = 0; + } } else { - cbSex.Text = "男"; + UIMessageBox.ShowError(result.message); + return; } } - try - { - dtpBirthday.Value = Convert.ToDateTime(birthday); - } - catch - { - UIMessageBox.ShowError("请正确输入证件号码!"); - } - - cbPassportType.SelectedIndex = 0; - return; } } diff --git a/SYS.FormUI/AppFunction/FrmEducation.Designer.cs b/SYS.FormUI/AppFunction/FrmEducation.Designer.cs index 099afd3bd053458c11a8893953844fb6480c4174..18b4e32986f7ca8e2cf4a64dd13760383b632f11 100644 --- a/SYS.FormUI/AppFunction/FrmEducation.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmEducation.Designer.cs @@ -29,91 +29,260 @@ namespace SYS.FormUI /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmEducation)); - this.flpInformation = new System.Windows.Forms.FlowLayoutPanel(); - this.txtEducationNm = new Sunny.UI.UITextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.btnAdd = new Sunny.UI.UIButton(); - this.btnSearch = new Sunny.UI.UIButton(); + this.btnDeleteEducation = new Sunny.UI.UIButton(); + this.btnUpdateEducation = new Sunny.UI.UIButton(); + this.btnAddEducation = new Sunny.UI.UIButton(); + this.label7 = new System.Windows.Forms.Label(); + this.txtEducationName = new Sunny.UI.UITextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.txtEducationNo = new Sunny.UI.UITextBox(); + this.dgvEducationList = new Sunny.UI.UIDataGridView(); + this.clEducationNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.clEducationName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvEducationList)).BeginInit(); this.SuspendLayout(); // - // flpInformation - // - this.flpInformation.AutoScroll = true; - this.flpInformation.BackColor = System.Drawing.Color.Transparent; - this.flpInformation.Location = new System.Drawing.Point(2, 117); - this.flpInformation.Margin = new System.Windows.Forms.Padding(2); - this.flpInformation.Name = "flpInformation"; - this.flpInformation.Size = new System.Drawing.Size(1001, 504); - this.flpInformation.TabIndex = 73; - this.flpInformation.SizeChanged += new System.EventHandler(this.flpInformation_SizeChanged); - // - // txtEducationNm - // - this.txtEducationNm.Cursor = System.Windows.Forms.Cursors.IBeam; - this.txtEducationNm.FillColor = System.Drawing.Color.White; - this.txtEducationNm.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtEducationNm.Location = new System.Drawing.Point(280, 56); - this.txtEducationNm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txtEducationNm.Maximum = 2147483647D; - this.txtEducationNm.Minimum = -2147483648D; - this.txtEducationNm.MinimumSize = new System.Drawing.Size(1, 1); - this.txtEducationNm.Name = "txtEducationNm"; - this.txtEducationNm.Padding = new System.Windows.Forms.Padding(5); - this.txtEducationNm.Radius = 20; - this.txtEducationNm.Size = new System.Drawing.Size(250, 35); - this.txtEducationNm.Style = Sunny.UI.UIStyle.Custom; - this.txtEducationNm.StyleCustomMode = true; - this.txtEducationNm.TabIndex = 127; - this.txtEducationNm.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(173, 62); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(88, 25); - this.label2.TabIndex = 123; - this.label2.Text = "学历名称"; - // - // btnAdd - // - this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAdd.Location = new System.Drawing.Point(582, 56); - this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Radius = 20; - this.btnAdd.Size = new System.Drawing.Size(100, 35); - this.btnAdd.TabIndex = 128; - this.btnAdd.Text = "添 加"; - this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); - // - // btnSearch - // - this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnSearch.Location = new System.Drawing.Point(732, 56); - this.btnSearch.MinimumSize = new System.Drawing.Size(1, 1); - this.btnSearch.Name = "btnSearch"; - this.btnSearch.Radius = 20; - this.btnSearch.Size = new System.Drawing.Size(100, 35); - this.btnSearch.TabIndex = 129; - this.btnSearch.Text = "搜 索"; - this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // btnDeleteEducation + // + this.btnDeleteEducation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDeleteEducation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnDeleteEducation.Location = new System.Drawing.Point(821, 419); + this.btnDeleteEducation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnDeleteEducation.Name = "btnDeleteEducation"; + this.btnDeleteEducation.Radius = 20; + this.btnDeleteEducation.Size = new System.Drawing.Size(165, 33); + this.btnDeleteEducation.TabIndex = 198; + this.btnDeleteEducation.Text = "删除学历"; + this.btnDeleteEducation.Click += new System.EventHandler(this.btnDeleteEducation_Click); + // + // btnUpdateEducation + // + this.btnUpdateEducation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUpdateEducation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnUpdateEducation.Location = new System.Drawing.Point(821, 374); + this.btnUpdateEducation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnUpdateEducation.Name = "btnUpdateEducation"; + this.btnUpdateEducation.Radius = 20; + this.btnUpdateEducation.Size = new System.Drawing.Size(165, 33); + this.btnUpdateEducation.TabIndex = 197; + this.btnUpdateEducation.Text = "更新学历"; + this.btnUpdateEducation.Click += new System.EventHandler(this.btnUpdateEducation_Click); + // + // btnAddEducation + // + this.btnAddEducation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAddEducation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnAddEducation.Location = new System.Drawing.Point(821, 329); + this.btnAddEducation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnAddEducation.Name = "btnAddEducation"; + this.btnAddEducation.Radius = 20; + this.btnAddEducation.Size = new System.Drawing.Size(165, 33); + this.btnAddEducation.TabIndex = 194; + this.btnAddEducation.Text = "新增学历"; + this.btnAddEducation.Click += new System.EventHandler(this.btnAddEducation_Click); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(859, 247); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(85, 19); + this.label7.TabIndex = 189; + this.label7.Text = "学历名称"; + // + // txtEducationName + // + this.txtEducationName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtEducationName.FillColor = System.Drawing.Color.White; + this.txtEducationName.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtEducationName.Location = new System.Drawing.Point(821, 278); + this.txtEducationName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtEducationName.Maximum = 2147483647D; + this.txtEducationName.Minimum = -2147483648D; + this.txtEducationName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtEducationName.Name = "txtEducationName"; + this.txtEducationName.Padding = new System.Windows.Forms.Padding(5); + this.txtEducationName.Radius = 20; + this.txtEducationName.Size = new System.Drawing.Size(165, 29); + this.txtEducationName.Style = Sunny.UI.UIStyle.Custom; + this.txtEducationName.StyleCustomMode = true; + this.txtEducationName.TabIndex = 188; + this.txtEducationName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label20.Location = new System.Drawing.Point(859, 175); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(85, 19); + this.label20.TabIndex = 187; + this.label20.Text = "学历编号"; + // + // txtEducationNo + // + this.txtEducationNo.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtEducationNo.FillColor = System.Drawing.Color.White; + this.txtEducationNo.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtEducationNo.Location = new System.Drawing.Point(821, 206); + this.txtEducationNo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtEducationNo.Maximum = 2147483647D; + this.txtEducationNo.Minimum = -2147483648D; + this.txtEducationNo.MinimumSize = new System.Drawing.Size(1, 1); + this.txtEducationNo.Name = "txtEducationNo"; + this.txtEducationNo.Padding = new System.Windows.Forms.Padding(5); + this.txtEducationNo.Radius = 20; + this.txtEducationNo.ReadOnly = true; + this.txtEducationNo.Size = new System.Drawing.Size(165, 29); + this.txtEducationNo.Style = Sunny.UI.UIStyle.Custom; + this.txtEducationNo.StyleCustomMode = true; + this.txtEducationNo.TabIndex = 186; + this.txtEducationNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // dgvEducationList + // + this.dgvEducationList.AllowUserToAddRows = false; + this.dgvEducationList.AllowUserToDeleteRows = false; + this.dgvEducationList.AllowUserToResizeColumns = false; + this.dgvEducationList.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvEducationList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvEducationList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvEducationList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvEducationList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvEducationList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvEducationList.ColumnHeadersHeight = 32; + this.dgvEducationList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dgvEducationList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.clEducationNo, + this.clEducationName, + this.Column1, + this.Column2, + this.Column3, + this.Column4, + this.Column5}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvEducationList.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvEducationList.EnableHeadersVisualStyles = false; + this.dgvEducationList.Font = new System.Drawing.Font("微软雅黑", 12F); + this.dgvEducationList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + this.dgvEducationList.Location = new System.Drawing.Point(3, 38); + this.dgvEducationList.MultiSelect = false; + this.dgvEducationList.Name = "dgvEducationList"; + this.dgvEducationList.ReadOnly = true; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvEducationList.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvEducationList.RowHeadersVisible = false; + this.dgvEducationList.RowHeight = 29; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + this.dgvEducationList.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dgvEducationList.RowTemplate.Height = 29; + this.dgvEducationList.SelectedIndex = -1; + this.dgvEducationList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvEducationList.ShowGridLine = true; + this.dgvEducationList.Size = new System.Drawing.Size(788, 582); + this.dgvEducationList.TabIndex = 185; + this.dgvEducationList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvEducationList_CellClick); + // + // clEducationNo + // + this.clEducationNo.DataPropertyName = "education_no"; + this.clEducationNo.HeaderText = "学历编号"; + this.clEducationNo.Name = "clEducationNo"; + this.clEducationNo.ReadOnly = true; + // + // clEducationName + // + this.clEducationName.DataPropertyName = "education_name"; + this.clEducationName.HeaderText = "学历名称"; + this.clEducationName.Name = "clEducationName"; + this.clEducationName.ReadOnly = true; + // + // Column1 + // + this.Column1.DataPropertyName = "delete_mk"; + this.Column1.HeaderText = "Column1"; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Visible = false; + // + // Column2 + // + this.Column2.DataPropertyName = "datains_usr"; + this.Column2.HeaderText = "Column2"; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + this.Column2.Visible = false; + // + // Column3 + // + this.Column3.DataPropertyName = "datains_date"; + this.Column3.HeaderText = "Column3"; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Visible = false; + // + // Column4 + // + this.Column4.DataPropertyName = "datachg_usr"; + this.Column4.HeaderText = "Column4"; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Visible = false; + // + // Column5 + // + this.Column5.DataPropertyName = "datachg_date"; + this.Column5.HeaderText = "Column5"; + this.Column5.Name = "Column5"; + this.Column5.ReadOnly = true; + this.Column5.Visible = false; // // FrmEducation // this.AutoScaleDimensions = new System.Drawing.SizeF(10F, 21F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1005, 623); + this.ClientSize = new System.Drawing.Size(1005, 627); this.ControlBox = false; - this.Controls.Add(this.btnSearch); - this.Controls.Add(this.btnAdd); - this.Controls.Add(this.txtEducationNm); - this.Controls.Add(this.label2); - this.Controls.Add(this.flpInformation); + this.Controls.Add(this.btnDeleteEducation); + this.Controls.Add(this.btnUpdateEducation); + this.Controls.Add(this.btnAddEducation); + this.Controls.Add(this.label7); + this.Controls.Add(this.txtEducationName); + this.Controls.Add(this.label20); + this.Controls.Add(this.txtEducationNo); + this.Controls.Add(this.dgvEducationList); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; @@ -122,6 +291,7 @@ namespace SYS.FormUI this.ShowTitleIcon = true; this.Text = "学历类型维护"; this.Load += new System.EventHandler(this.FrmEducation_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvEducationList)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -129,10 +299,20 @@ namespace SYS.FormUI #endregion - private System.Windows.Forms.FlowLayoutPanel flpInformation; - private Sunny.UI.UITextBox txtEducationNm; - private System.Windows.Forms.Label label2; - private Sunny.UI.UIButton btnAdd; - private Sunny.UI.UIButton btnSearch; + private Sunny.UI.UIButton btnDeleteEducation; + private Sunny.UI.UIButton btnUpdateEducation; + private Sunny.UI.UIButton btnAddEducation; + private System.Windows.Forms.Label label7; + private Sunny.UI.UITextBox txtEducationName; + private System.Windows.Forms.Label label20; + private Sunny.UI.UITextBox txtEducationNo; + private Sunny.UI.UIDataGridView dgvEducationList; + private System.Windows.Forms.DataGridViewTextBoxColumn clEducationNo; + private System.Windows.Forms.DataGridViewTextBoxColumn clEducationName; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; } } \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmEducation.cs b/SYS.FormUI/AppFunction/FrmEducation.cs index cc424f0797d33696aff8d9a6f27499d72d03fb85..54c3161f9728a4df60da7598d9cb2f7cf0a2466f 100644 --- a/SYS.FormUI/AppFunction/FrmEducation.cs +++ b/SYS.FormUI/AppFunction/FrmEducation.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ + using Sunny.UI; using SYS.Application; using SYS.Common; @@ -48,18 +49,11 @@ namespace SYS.FormUI public static OperationEducation reload; - public static OperationEducation Accessed; - - public static OperationEducation insert; - public FrmEducation() { InitializeComponent(); - operation = Visited; reload = ReloadEducationList; - Accessed = Access; } - ucEducationInformation baseInfo = null; List educations = null; public static string info = null; private void FrmEducation_Load(object sender, EventArgs e) @@ -67,142 +61,103 @@ namespace SYS.FormUI ReloadEducationList(); } + ResponseMsg result = null; + Dictionary dic = null; public void ReloadEducationList() { - flpInformation.Controls.Clear(); - educations = new BaseService().SelectEducationAll(); - for (int i = 0; i < educations.Count; i++) + //flpInformation.Controls.Clear(); + txtEducationNo.Text = Util.GetListNewId("E", 3, 1, "-").FirstOrDefault(); + result = HttpHelper.Request("Base/SelectEducationAll"); + if (result.statusCode != 200) { - baseInfo = new ucEducationInformation(); - baseInfo.Tag = "学历"; - baseInfo.lbName.Text = "名称:" + educations[i].education_name; - if (educations[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + UIMessageBox.ShowError("SelectEducationAll+接口服务异常,请提交Issue!"); + return; } + educations = HttpHelper.JsonToList(result.message); + dgvEducationList.AutoGenerateColumns = false; + dgvEducationList.DataSource = educations; } - private void flpInformation_SizeChanged(object sender, EventArgs e) - { - flpInformation.Width = 660; - flpInformation.Height = 582; - } - - public void Visited() + private void btnAddEducation_Click(object sender, EventArgs e) { - //筛选出只与当前学历对应的数据 - Education education = educations.FirstOrDefault(a => a.education_name.Equals(info)); - if (education.education_name.Equals(info)) + if (txtEducationName.Text.Trim().IsNullOrEmpty()) { - var _education = new Education() - { - education_no = education.education_no, - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_education != null) - { - bool n = new BaseService().DelEducation(_education); - if (n == true) - { - UIMessageBox.ShowSuccess("删除成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "删除学历类型操作!删除值为:" + _education.education_no, 2); - #endregion - ReloadEducationList(); - } - } + UIMessageTip.ShowWarning("学历名称为空,请检查",1500); + txtEducationName.Focus(); + return; } - } - public void Access() - { - //筛选出只与当前学历对应的数据 - Education education = educations.FirstOrDefault(a => a.education_name.Equals(info)); - if (education.education_name.Equals(info)) + var edu = new Education() { - var _education = new Education() - { - education_no = education.education_no, - delete_mk = 0, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_education != null) - { - bool n = new BaseService().DelEducation(_education); - if (n == true) - { - UIMessageBox.ShowSuccess("恢复成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "恢复学历类型操作!删除值为:" + _education.education_no, 2); - #endregion - ReloadEducationList(); - } - } + education_no = txtEducationNo.Text.Trim(), + education_name = txtEducationName.Text.Trim(), + delete_mk = 0, + datains_usr = AdminInfo.Account, + datains_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/AddEducation",HttpHelper.ModelToJson(edu)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) + { + UIMessageTip.ShowError("AddEducation+接口服务异常,请提交Issue!", 1500); + return; } + UIMessageTip.ShowOk("添加学历成功!", 1500); + #region 获取添加操作日志所需的信息 + RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增学历类型操作!新增值为:" + edu.education_no, 2); + #endregion + ReloadEducationList(); + return; } - private void btnAdd_Click(object sender, EventArgs e) + private void btnUpdateEducation_Click(object sender, EventArgs e) { - if (txtEducationNm.Text.Trim().IsNullOrEmpty()) + if (dgvEducationList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("学历名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的学历数据,请检查",1500); return; } - var _education = new Education() + var edu = new Education() { - education_no = new SYS.Core.CounterHelper().GetNewId(CounterRuleConsts.EducationId).ToString(), - education_name = txtEducationNm.Text.Trim(), - delete_mk = 0, - datains_usr = AdminInfo.Account, - datains_date = DateTime.Now + education_no = txtEducationNo.Text.Trim(), + education_name = txtEducationName.Text.Trim(), + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now }; - if (_education != null) + result = HttpHelper.Request("Base​/UpdEducation", HttpHelper.ModelToJson(edu)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) { - bool n = new BaseService().AddEducation(_education); - if (n == true) - { - UIMessageBox.ShowSuccess("新增成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增学历类型操作!新增值为:" + _education.education_no, 2); - #endregion - ReloadEducationList(); - txtEducationNm.Text = ""; - } + UIMessageTip.ShowError("UpdEducation+接口服务异常,请提交Issue!", 1500); + return; } } - private void btnSearch_Click(object sender, EventArgs e) + private void btnDeleteEducation_Click(object sender, EventArgs e) { - if (txtEducationNm.Text.Trim().IsNullOrEmpty()) + if (dgvEducationList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("学历名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的学历数据,请检查", 1500); return; } - var listSource = new BaseService().SelectEducationAll(new Education { education_name = txtEducationNm.Text.Trim() }); - flpInformation.Controls.Clear(); - for (int i = 0; i < listSource.Count; i++) + var edu = new Education() { - baseInfo = new ucEducationInformation(); - baseInfo.Tag = "学历"; - baseInfo.lbName.Text = "名称:" + listSource[i].education_name; - if (listSource[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + education_no = txtEducationNo.Text.Trim(), + education_name = txtEducationName.Text.Trim(), + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/DelEducation", HttpHelper.ModelToJson(edu)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) + { + UIMessageTip.ShowError("DelEducation+接口服务异常,请提交Issue!", 1500); + return; } } + + private void dgvEducationList_CellClick(object sender, DataGridViewCellEventArgs e) + { + txtEducationNo.Text = dgvEducationList.Rows[0].Cells["clEducationNo"].Value.ToString(); + txtEducationName.Text = dgvEducationList.Rows[0].Cells["clEducationName"].Value.ToString(); + } } } diff --git a/SYS.FormUI/AppFunction/FrmEducation.resx b/SYS.FormUI/AppFunction/FrmEducation.resx index 4691df250e9ef86c15e54aba5fdd92af2d104af2..94aa12d9bf63cdb67e5a1b85627419a28633b617 100644 --- a/SYS.FormUI/AppFunction/FrmEducation.resx +++ b/SYS.FormUI/AppFunction/FrmEducation.resx @@ -117,6 +117,27 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + diff --git a/SYS.FormUI/AppFunction/FrmGoodOrBad.cs b/SYS.FormUI/AppFunction/FrmGoodOrBad.cs index 814dd4af852db68cd2e3c2ea4245a256ae76701c..00e1fa250f177c8aff85d8723a1c36e370aef2a9 100644 --- a/SYS.FormUI/AppFunction/FrmGoodOrBad.cs +++ b/SYS.FormUI/AppFunction/FrmGoodOrBad.cs @@ -44,18 +44,41 @@ namespace SYS.FormUI InitializeComponent(); } - + Dictionary dic = null; + ResponseMsg result = null; private void FrmGoodOrBad_Load(object sender, EventArgs e) { + LoadGoodBadInfo(); + result = HttpHelper.Request("Base/SelectGBTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectGBTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + CboType.DataSource = HttpHelper.JsonToList(result.message); + CboType.DisplayMember = "GBName"; + CboType.ValueMember = "GBTypeId"; + } + + public void LoadGoodBadInfo() + { + DgvGoodBadList.Rows.Clear(); lblWorkerNo.Text = FrmWorkerManager.wk_WorkerNo; lblName.Text = FrmWorkerManager.wk_WorkerName; - lblDate.Text = Convert.ToDateTime(FrmWorkerManager.wk_WorkerTime).ToString("yyyy年MM月dd日").Substring(0,9); + lblDate.Text = Convert.ToDateTime(FrmWorkerManager.wk_WorkerTime).ToString("yyyy年MM月dd日").Substring(0, 9); + dic = new Dictionary() + { + { "wn",lblWorkerNo.Text} + }; + result = HttpHelper.Request("WorkerGoodBad/SelectAllGoodBadByWorkNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectAllGoodBadByWorkNo+接口服务异常,请提交Issue!"); + return; + } DgvGoodBadList.AutoGenerateColumns = false; - DgvGoodBadList.DataSource = new WorkerGoodBadService().SelectAllGoodBadByWorkNo(lblWorkerNo.Text); - CboType.DataSource = new BaseService().SelectGBTypeAll(); - CboType.DisplayMember = "GBName"; - CboType.ValueMember = "GBTypeId"; + DgvGoodBadList.DataSource = HttpHelper.JsonToList(result.message); } public bool CheckInput(WorkerGoodBad workerGoodBad) @@ -98,16 +121,22 @@ namespace SYS.FormUI if (CheckInput(goodBad)) { bool dr = UIMessageBox.Show("确定录入?一旦录入后将无法修改及删除,或会影响员工的晋升!", "录入警告",UIStyle.Orange, UIMessageBoxButtons.OKCancel); - if (!dr) + if (dr) { - bool n = new WorkerGoodBadService().AddGoodBad(goodBad); - if (n == true) + result = HttpHelper.Request("WorkerGoodBad​/AddGoodBad",HttpHelper.ModelToJson(goodBad)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("AddGoodBad+接口服务异常,请提交Issue!"); + return; + } + bool n = result.message.ToString().Equals("true"); + if (n) { UIMessageBox.Show("新增成功!","系统提示",UIStyle.Green,UIMessageBoxButtons.OK); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "录入员工奖惩操作!新增值为:" + goodBad.GBInfo, 2); #endregion - DgvGoodBadList.DataSource = new WorkerGoodBadService().SelectAllGoodBadByWorkNo(lblWorkerNo.Text); + LoadGoodBadInfo(); } else { @@ -126,7 +155,6 @@ namespace SYS.FormUI { UIMessageBox.Show("信息不能为空!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); } - } private void btnClose_Click(object sender, EventArgs e) diff --git a/SYS.FormUI/AppFunction/FrmMySpace.cs b/SYS.FormUI/AppFunction/FrmMySpace.cs index 4b67dea8e947f0ac8dd36e598e3f3b1258b24243..0d5f8f244ca9b3fa86ba7e2c124fcaf7c1650205 100644 --- a/SYS.FormUI/AppFunction/FrmMySpace.cs +++ b/SYS.FormUI/AppFunction/FrmMySpace.cs @@ -27,7 +27,6 @@ using Sunny.UI; using SYS.Application; using SYS.Common; using SYS.Core; -using SYS.Core.Util; using System; using System.Collections.Generic; using System.ComponentModel; @@ -53,19 +52,49 @@ namespace SYS.FormUI private void FrmMySpace_Load(object sender, EventArgs e) { //加载民族信息 - cbWorkerNation.DataSource = new BaseService().SelectNationAll(new Nation { delete_mk = 0 }); + Dictionary dic = new Dictionary(); + dic.Add("delete_mk", "0"); + var result = HttpHelper.Request("Base/SelectNationAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNationAll+接口服务异常,请提交Issue!"); + return; + } + cbWorkerNation.DataSource = HttpHelper.JsonToList(result.message); cbWorkerNation.DisplayMember = "nation_name"; cbWorkerNation.ValueMember = "nation_no"; //加载性别信息 - cboSex.DataSource = new BaseService().SelectSexTypeAll(new SexType { delete_mk = 0 }); + dic = new Dictionary(); + dic.Add("delete_mk", "0"); + result = HttpHelper.Request("Base/SelectSexTypeAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + cboSex.DataSource = HttpHelper.JsonToList(result.message); cboSex.DisplayMember = "sexName"; cboSex.ValueMember = "sexId"; //加载部门信息 - cboWorkerClub.DataSource = new BaseService().SelectDeptAllCanUse(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + cboWorkerClub.DataSource = HttpHelper.JsonToList(result.message); cboWorkerClub.DisplayMember = "dept_name"; cboWorkerClub.ValueMember = "dept_no"; //加载职位信息 - cboWorkerPosition.DataSource = new BaseService().SelectPositionAll(new Position { delete_mk = 0 }); + dic = new Dictionary(); + dic.Add("delete_mk", "0"); + result = HttpHelper.Request("Base/SelectPositionAll", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPositionAll+接口服务异常,请提交Issue!"); + return; + } + cboWorkerPosition.DataSource = HttpHelper.JsonToList(result.message); cboWorkerPosition.DisplayMember = "position_name"; cboWorkerPosition.ValueMember = "position_no"; LoadData(); @@ -78,8 +107,16 @@ namespace SYS.FormUI public void LoadData() { - Worker worker = new WorkerService().SelectWorkerInfoByWorkerId(LoginInfo.WorkerNo); - if (worker != null) + var dic = new Dictionary(); + dic.Add("workerId", LoginInfo.WorkerNo); + var result = HttpHelper.Request("Worker/SelectWorkerInfoByWorkerId", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectWorkerInfoByWorkerId+接口服务异常,请提交Issue!"); + return; + } + Worker worker = HttpHelper.JsonToModel(result.message); + if (!worker.IsNullOrEmpty()) { txtWorkerNo.Text = worker.WorkerId; txtWorkerName.Text = worker.WorkerName; @@ -93,15 +130,20 @@ namespace SYS.FormUI txtAddress.Text = worker.WorkerAddress; txtTel.Text = worker.WorkerTel; } - - var workerPicSource = new WorkerPicService().WorkerPic(new WorkerPic + dic = new Dictionary(); + dic.Add("WorkerId", LoginInfo.WorkerNo); + result = HttpHelper.Request("WorkerPicture/WorkerPic", null, dic); + if (result.statusCode != 200) { - WorkerId = LoginInfo.WorkerNo.Trim() - }); + UIMessageBox.ShowError("WorkerPic+接口服务异常,请提交Issue!"); + return; + } + var workerPicSource = HttpHelper.JsonToModel(result.message); if (workerPicSource != null && !string.IsNullOrEmpty(workerPicSource.Pic)) { + EncryptLib encryptLib = new EncryptLib(); picWorkerPic.BackgroundImage = null; - picWorkerPic.LoadAsync(workerPicSource.Pic); + picWorkerPic.LoadAsync(encryptLib.Decryption(HttpHelper.baseUrl) + workerPicSource.Pic); } } @@ -118,8 +160,14 @@ namespace SYS.FormUI { //校验旧密码是否正确 Worker worker = new Worker() { WorkerId = LoginInfo.WorkerNo, WorkerPwd = txtOldPwd.Text.Trim() }; - var result = new WorkerService().SelectWorkerInfoByWorkerIdAndWorkerPwd(worker); - if (result != null) + var result = HttpHelper.Request("Worker/SelectWorkerInfoByWorkerIdAndWorkerPwd", HttpHelper.ModelToJson(worker), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectWorkerInfoByWorkerIdAndWorkerPwd+接口服务异常,请提交Issue!"); + return; + } + worker = HttpHelper.JsonToModel(result.message); + if (worker != null) { lgCheckOldPwd.Visible = true; lgCheckOldPwd.OnColor = Color.Green; @@ -166,8 +214,14 @@ namespace SYS.FormUI private void btnUpdPwd_Click(object sender, EventArgs e) { - bool tf = new WorkerService().UpdWorkerPwdByWorkNo(LoginInfo.WorkerNo, txtNewPwd.Text.Trim()); - if (tf == false) + var result = HttpHelper.Request("Worker/UpdWorkerPwdByWorkNo", HttpHelper.ModelToJson(new Worker { WorkerId = LoginInfo.WorkerNo, WorkerPwd = txtNewPwd.Text.Trim() }), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdWorkerPwdByWorkNo+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true") ? true : false; + if (!tf) { UIMessageBox.Show("服务器繁忙,修改失败!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; @@ -210,7 +264,7 @@ namespace SYS.FormUI } return true; } - + ResponseMsg result = new ResponseMsg(); private void btnUpdWorker_Click(object sender, EventArgs e) { Worker worker = new Worker() @@ -227,8 +281,14 @@ namespace SYS.FormUI if (CheckInput(worker)) { - bool tf = new WorkerService().UpdateWorker(worker); - if (tf == false) + result = HttpHelper.Request("Worker/UpdateWorker", HttpHelper.ModelToJson(worker), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateWorker+接口服务异常,请提交Issue!"); + return; + } + bool tf = result.message.ToString().Equals("true") ? true:false; + if (!tf) { UIMessageBox.Show("修改失败!服务器处于繁忙,请稍后再试!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; @@ -259,10 +319,24 @@ namespace SYS.FormUI { WorkerId = txtWorkerNo.Text.Trim(), }; - var source = new WorkerPicService().WorkerPic(workerPic); + Dictionary dic = new Dictionary(); + dic.Add("WorkerId", txtWorkerNo.Text.Trim()); + result = HttpHelper.Request("WorkerPicture/WorkerPic", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("WorkerPic+接口服务异常,请提交Issue!"); + return; + } + var source = HttpHelper.JsonToModel(result.message); if (!source.IsNullOrEmpty()) { - if (new WorkerPicService().DeleteWorkerPic(workerPic)) + result = HttpHelper.Request("WorkerPicture/DeleteWorkerPic", HttpHelper.ModelToJson(workerPic), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DeleteWorkerPic+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) { PicHandler(); } @@ -284,7 +358,12 @@ namespace SYS.FormUI WorkerId = txtWorkerNo.Text.Trim(), Pic = result.Trim(), }; - new WorkerPicService().InsertWorkerPic(workerPic); + var requestResult = HttpHelper.Request("WorkerPicture/InsertWorkerPic", HttpHelper.ModelToJson(workerPic), null); + if (requestResult.statusCode != 200) + { + UIMessageBox.ShowError("InsertWorkerPic+接口服务异常,请提交Issue!"); + return; + } picWorkerPic.BackgroundImage = null; picWorkerPic.LoadAsync(encryptLib.Decryption(HttpHelper.baseUrl) + result.Trim()); UIMessageTip.ShowOk("头像上传成功!稍等将会加载头像哦.."); diff --git a/SYS.FormUI/AppFunction/FrmNation.Designer.cs b/SYS.FormUI/AppFunction/FrmNation.Designer.cs index dd008707c3826ccf8d03a5c9bb523a1b6cb4afd5..bd477d06d1958db76b721bb5f198d0af9952857f 100644 --- a/SYS.FormUI/AppFunction/FrmNation.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmNation.Designer.cs @@ -29,79 +29,245 @@ namespace SYS.FormUI /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmNation)); - this.flpInformation = new System.Windows.Forms.FlowLayoutPanel(); - this.btnAdd = new Sunny.UI.UIButton(); - this.txtNationNm = new Sunny.UI.UITextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.btnSearch = new Sunny.UI.UIButton(); + this.btnDeleteNation = new Sunny.UI.UIButton(); + this.btnUpdateNation = new Sunny.UI.UIButton(); + this.btnAddNation = new Sunny.UI.UIButton(); + this.label7 = new System.Windows.Forms.Label(); + this.txtNationName = new Sunny.UI.UITextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.txtNationNo = new Sunny.UI.UITextBox(); + this.dgvNationList = new Sunny.UI.UIDataGridView(); + this.clEducationNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.clEducationName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvNationList)).BeginInit(); this.SuspendLayout(); // - // flpInformation - // - this.flpInformation.AutoScroll = true; - this.flpInformation.BackColor = System.Drawing.Color.Transparent; - this.flpInformation.Location = new System.Drawing.Point(2, 117); - this.flpInformation.Margin = new System.Windows.Forms.Padding(2); - this.flpInformation.Name = "flpInformation"; - this.flpInformation.Size = new System.Drawing.Size(1001, 504); - this.flpInformation.TabIndex = 72; - this.flpInformation.SizeChanged += new System.EventHandler(this.flpInformation_SizeChanged); - // - // btnAdd - // - this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAdd.Location = new System.Drawing.Point(582, 56); - this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Radius = 20; - this.btnAdd.Size = new System.Drawing.Size(100, 35); - this.btnAdd.TabIndex = 131; - this.btnAdd.Text = "添 加"; - this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); - // - // txtNationNm - // - this.txtNationNm.Cursor = System.Windows.Forms.Cursors.IBeam; - this.txtNationNm.FillColor = System.Drawing.Color.White; - this.txtNationNm.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtNationNm.Location = new System.Drawing.Point(280, 56); - this.txtNationNm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txtNationNm.Maximum = 2147483647D; - this.txtNationNm.Minimum = -2147483648D; - this.txtNationNm.MinimumSize = new System.Drawing.Size(1, 1); - this.txtNationNm.Name = "txtNationNm"; - this.txtNationNm.Padding = new System.Windows.Forms.Padding(5); - this.txtNationNm.Radius = 20; - this.txtNationNm.Size = new System.Drawing.Size(250, 35); - this.txtNationNm.Style = Sunny.UI.UIStyle.Custom; - this.txtNationNm.StyleCustomMode = true; - this.txtNationNm.TabIndex = 130; - this.txtNationNm.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(173, 62); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(88, 25); - this.label2.TabIndex = 129; - this.label2.Text = "民族名称"; - // - // btnSearch - // - this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnSearch.Location = new System.Drawing.Point(732, 56); - this.btnSearch.MinimumSize = new System.Drawing.Size(1, 1); - this.btnSearch.Name = "btnSearch"; - this.btnSearch.Radius = 20; - this.btnSearch.Size = new System.Drawing.Size(100, 35); - this.btnSearch.TabIndex = 132; - this.btnSearch.Text = "搜 索"; - this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // btnDeleteNation + // + this.btnDeleteNation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDeleteNation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnDeleteNation.Location = new System.Drawing.Point(823, 419); + this.btnDeleteNation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnDeleteNation.Name = "btnDeleteNation"; + this.btnDeleteNation.Radius = 20; + this.btnDeleteNation.Size = new System.Drawing.Size(165, 33); + this.btnDeleteNation.TabIndex = 206; + this.btnDeleteNation.Text = "删除民族"; + this.btnDeleteNation.Click += new System.EventHandler(this.btnDeleteNation_Click); + // + // btnUpdateNation + // + this.btnUpdateNation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUpdateNation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnUpdateNation.Location = new System.Drawing.Point(823, 374); + this.btnUpdateNation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnUpdateNation.Name = "btnUpdateNation"; + this.btnUpdateNation.Radius = 20; + this.btnUpdateNation.Size = new System.Drawing.Size(165, 33); + this.btnUpdateNation.TabIndex = 205; + this.btnUpdateNation.Text = "更新民族"; + this.btnUpdateNation.Click += new System.EventHandler(this.btnUpdateNation_Click); + // + // btnAddNation + // + this.btnAddNation.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAddNation.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnAddNation.Location = new System.Drawing.Point(823, 329); + this.btnAddNation.MinimumSize = new System.Drawing.Size(1, 1); + this.btnAddNation.Name = "btnAddNation"; + this.btnAddNation.Radius = 20; + this.btnAddNation.Size = new System.Drawing.Size(165, 33); + this.btnAddNation.TabIndex = 204; + this.btnAddNation.Text = "新增民族"; + this.btnAddNation.Click += new System.EventHandler(this.btnAddNation_Click); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(861, 247); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(85, 19); + this.label7.TabIndex = 203; + this.label7.Text = "民族名称"; + // + // txtNationName + // + this.txtNationName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtNationName.FillColor = System.Drawing.Color.White; + this.txtNationName.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtNationName.Location = new System.Drawing.Point(823, 278); + this.txtNationName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtNationName.Maximum = 2147483647D; + this.txtNationName.Minimum = -2147483648D; + this.txtNationName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtNationName.Name = "txtNationName"; + this.txtNationName.Padding = new System.Windows.Forms.Padding(5); + this.txtNationName.Radius = 20; + this.txtNationName.Size = new System.Drawing.Size(165, 29); + this.txtNationName.Style = Sunny.UI.UIStyle.Custom; + this.txtNationName.StyleCustomMode = true; + this.txtNationName.TabIndex = 202; + this.txtNationName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label20.Location = new System.Drawing.Point(861, 175); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(85, 19); + this.label20.TabIndex = 201; + this.label20.Text = "民族编号"; + // + // txtNationNo + // + this.txtNationNo.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtNationNo.FillColor = System.Drawing.Color.White; + this.txtNationNo.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtNationNo.Location = new System.Drawing.Point(823, 206); + this.txtNationNo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtNationNo.Maximum = 2147483647D; + this.txtNationNo.Minimum = -2147483648D; + this.txtNationNo.MinimumSize = new System.Drawing.Size(1, 1); + this.txtNationNo.Name = "txtNationNo"; + this.txtNationNo.Padding = new System.Windows.Forms.Padding(5); + this.txtNationNo.Radius = 20; + this.txtNationNo.ReadOnly = true; + this.txtNationNo.Size = new System.Drawing.Size(165, 29); + this.txtNationNo.Style = Sunny.UI.UIStyle.Custom; + this.txtNationNo.StyleCustomMode = true; + this.txtNationNo.TabIndex = 200; + this.txtNationNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // dgvNationList + // + this.dgvNationList.AllowUserToAddRows = false; + this.dgvNationList.AllowUserToDeleteRows = false; + this.dgvNationList.AllowUserToResizeColumns = false; + this.dgvNationList.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvNationList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvNationList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvNationList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvNationList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvNationList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvNationList.ColumnHeadersHeight = 32; + this.dgvNationList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dgvNationList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.clEducationNo, + this.clEducationName, + this.Column1, + this.Column2, + this.Column3, + this.Column4, + this.Column5}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvNationList.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvNationList.EnableHeadersVisualStyles = false; + this.dgvNationList.Font = new System.Drawing.Font("微软雅黑", 12F); + this.dgvNationList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + this.dgvNationList.Location = new System.Drawing.Point(5, 38); + this.dgvNationList.MultiSelect = false; + this.dgvNationList.Name = "dgvNationList"; + this.dgvNationList.ReadOnly = true; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvNationList.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvNationList.RowHeadersVisible = false; + this.dgvNationList.RowHeight = 29; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + this.dgvNationList.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dgvNationList.RowTemplate.Height = 29; + this.dgvNationList.SelectedIndex = -1; + this.dgvNationList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvNationList.ShowGridLine = true; + this.dgvNationList.Size = new System.Drawing.Size(788, 582); + this.dgvNationList.TabIndex = 199; + this.dgvNationList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvNationList_CellClick); + // + // clEducationNo + // + this.clEducationNo.DataPropertyName = "nation_no"; + this.clEducationNo.HeaderText = "民族编号"; + this.clEducationNo.Name = "clEducationNo"; + this.clEducationNo.ReadOnly = true; + // + // clEducationName + // + this.clEducationName.DataPropertyName = "nation_name"; + this.clEducationName.HeaderText = "民族名称"; + this.clEducationName.Name = "clEducationName"; + this.clEducationName.ReadOnly = true; + // + // Column1 + // + this.Column1.DataPropertyName = "delete_mk"; + this.Column1.HeaderText = "Column1"; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Visible = false; + // + // Column2 + // + this.Column2.DataPropertyName = "datains_usr"; + this.Column2.HeaderText = "Column2"; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + this.Column2.Visible = false; + // + // Column3 + // + this.Column3.DataPropertyName = "datains_date"; + this.Column3.HeaderText = "Column3"; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Visible = false; + // + // Column4 + // + this.Column4.DataPropertyName = "datachg_usr"; + this.Column4.HeaderText = "Column4"; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Visible = false; + // + // Column5 + // + this.Column5.DataPropertyName = "datachg_date"; + this.Column5.HeaderText = "datachg_date"; + this.Column5.Name = "Column5"; + this.Column5.ReadOnly = true; + this.Column5.Visible = false; // // FrmNation // @@ -109,11 +275,14 @@ namespace SYS.FormUI this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1005, 623); this.ControlBox = false; - this.Controls.Add(this.btnSearch); - this.Controls.Add(this.btnAdd); - this.Controls.Add(this.txtNationNm); - this.Controls.Add(this.label2); - this.Controls.Add(this.flpInformation); + this.Controls.Add(this.btnDeleteNation); + this.Controls.Add(this.btnUpdateNation); + this.Controls.Add(this.btnAddNation); + this.Controls.Add(this.label7); + this.Controls.Add(this.txtNationName); + this.Controls.Add(this.label20); + this.Controls.Add(this.txtNationNo); + this.Controls.Add(this.dgvNationList); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; @@ -122,6 +291,7 @@ namespace SYS.FormUI this.ShowTitleIcon = true; this.Text = "民族类型维护"; this.Load += new System.EventHandler(this.FrmNation_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvNationList)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -129,10 +299,20 @@ namespace SYS.FormUI #endregion - private System.Windows.Forms.FlowLayoutPanel flpInformation; - private Sunny.UI.UIButton btnAdd; - private Sunny.UI.UITextBox txtNationNm; - private System.Windows.Forms.Label label2; - private Sunny.UI.UIButton btnSearch; + private Sunny.UI.UIButton btnDeleteNation; + private Sunny.UI.UIButton btnUpdateNation; + private Sunny.UI.UIButton btnAddNation; + private System.Windows.Forms.Label label7; + private Sunny.UI.UITextBox txtNationName; + private System.Windows.Forms.Label label20; + private Sunny.UI.UITextBox txtNationNo; + private Sunny.UI.UIDataGridView dgvNationList; + private System.Windows.Forms.DataGridViewTextBoxColumn clEducationNo; + private System.Windows.Forms.DataGridViewTextBoxColumn clEducationName; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; } } \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmNation.cs b/SYS.FormUI/AppFunction/FrmNation.cs index 582ba282e3567e696ffa85ef0e48efca4fb20209..9090a9cb5a7314d01809e981ff05924a1ecf7bdb 100644 --- a/SYS.FormUI/AppFunction/FrmNation.cs +++ b/SYS.FormUI/AppFunction/FrmNation.cs @@ -43,166 +43,115 @@ namespace SYS.FormUI public delegate void OperationInfo(); - - //定义委托类型的变量 - public static OperationInfo operation; - public static OperationInfo reload; - public static OperationInfo Accessed; - - public static OperationInfo insert; - public FrmNation() { InitializeComponent(); - operation = Visited; reload = ReloadNationList; - Accessed = Access; } - ucBaseInformation baseInfo = null; List nations = null; public static string info = null; private void FrmNation_Load(object sender, EventArgs e) { ReloadNationList(); - } - public void ReloadNationList() + ResponseMsg result = new ResponseMsg(); + Dictionary dic = null; + + public void ReloadNationList() { - flpInformation.Controls.Clear(); - nations = new BaseService().SelectNationAll(); - for (int i = 0; i < nations.Count; i++) + txtNationNo.Text = Util.GetListNewId("N", 3, 1, "-").FirstOrDefault(); + result = HttpHelper.Request("Base/SelectNationAll"); + if (result.statusCode != 200) { - baseInfo = new ucBaseInformation(); - baseInfo.lbName.Text = "名称:" + nations[i].nation_name; - if (nations[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + UIMessageBox.ShowError("SelectNationAll+接口服务异常,请提交Issue!"); + return; } + nations = HttpHelper.JsonToList(result.message); + dgvNationList.AutoGenerateColumns = false; + dgvNationList.DataSource = nations; } - private void flpInformation_SizeChanged(object sender, EventArgs e) + private void dgvNationList_CellClick(object sender, DataGridViewCellEventArgs e) { - //flpInformation.Width = 660; - //flpInformation.Height = 582; + txtNationNo.Text = dgvNationList.Rows[0].Cells["clNationNo"].Value.ToString(); + txtNationName.Text = dgvNationList.Rows[0].Cells["clNationName"].Value.ToString(); } - public void Visited() + private void btnAddNation_Click(object sender, EventArgs e) { - //筛选出只与当前民族对应的数据 - Nation nation = nations.FirstOrDefault(a => a.nation_name.Equals(info)); - if (nation.nation_name.Equals(info)) + if (txtNationName.Text.Trim().IsNullOrEmpty()) { - var _nation = new Nation() - { - nation_no = nation.nation_no, - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_nation != null) - { - bool n = new BaseService().DelNation(_nation); - if (n == true) - { - UIMessageBox.ShowSuccess("删除成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "删除民族类型操作!删除值为:" + _nation.nation_no, 2); - #endregion - ReloadNationList(); - } - } + UIMessageTip.ShowWarning("民族名称为空,请检查", 1500); + txtNationName.Focus(); + return; } - } - public void Access() - { - //筛选出只与当前民族对应的数据 - Nation nation = nations.FirstOrDefault(a => a.nation_name.Equals(info)); - if (nation.nation_name.Equals(info)) + var nat = new Nation() { - var _nation = new Nation() - { - nation_no = nation.nation_no, - delete_mk = 0, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_nation != null) - { - bool n = new BaseService().DelNation(_nation); - if (n == true) - { - UIMessageBox.ShowSuccess("恢复成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "恢复民族类型操作!恢复值为:" + _nation.nation_no, 2); - #endregion - ReloadNationList(); - } - } + nation_no = txtNationNo.Text.Trim(), + nation_name = txtNationName.Text.Trim(), + delete_mk = 0, + datains_usr = AdminInfo.Account, + datains_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/AddNation", HttpHelper.ModelToJson(nat)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) + { + UIMessageTip.ShowError("AddNation+接口服务异常,请提交Issue!", 1500); + return; } - + UIMessageTip.ShowOk("添加民族成功!", 1500); + #region 获取添加操作日志所需的信息 + RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增民族类型操作!新增值为:" + nat.nation_no, 2); + #endregion + ReloadNationList(); + return; } - private void btnAdd_Click(object sender, EventArgs e) + private void btnUpdateNation_Click(object sender, EventArgs e) { - if (txtNationNm.Text.Trim().IsNullOrEmpty()) + if (dgvNationList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("民族名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的民族数据,请检查", 1500); return; } - var _nation = new Nation() + var nat = new Nation() { - nation_no = new SYS.Core.CounterHelper().GetNewId(CounterRuleConsts.NationId).ToString(), - nation_name = txtNationNm.Text.Trim(), - delete_mk = 0, - datains_usr = AdminInfo.Account, - datains_date = DateTime.Now + nation_no = txtNationNo.Text.Trim(), + nation_name = txtNationName.Text.Trim(), + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now }; - if (_nation != null) + result = HttpHelper.Request("Base​/UpdNation", HttpHelper.ModelToJson(nat)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) { - bool n = new BaseService().AddNation(_nation); - if (n == true) - { - UIMessageBox.ShowSuccess("新增成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增民族类型操作!新增值为:" + _nation.nation_no, 2); - #endregion - ReloadNationList(); - txtNationNm.Text = ""; - } + UIMessageTip.ShowError("UpdNation+接口服务异常,请提交Issue!", 1500); + return; } } - private void btnSearch_Click(object sender, EventArgs e) + private void btnDeleteNation_Click(object sender, EventArgs e) { - if (txtNationNm.Text.Trim().IsNullOrEmpty()) + if (dgvNationList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("民族名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的民族数据,请检查", 1500); return; } - var listSource = new BaseService().SelectNationAll(new Nation { nation_name = txtNationNm.Text.Trim() }); - flpInformation.Controls.Clear(); - for (int i = 0; i < listSource.Count; i++) + var nat = new Nation() { - baseInfo = new ucBaseInformation(); - baseInfo.Tag = "民族"; - baseInfo.lbName.Text = "名称:" + listSource[i].nation_name; - if (listSource[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + nation_no = txtNationNo.Text.Trim(), + nation_name = txtNationName.Text.Trim(), + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/DelNation", HttpHelper.ModelToJson(nat)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) + { + UIMessageTip.ShowError("DelNation+接口服务异常,请提交Issue!", 1500); + return; } } } diff --git a/SYS.FormUI/AppFunction/FrmNation.resx b/SYS.FormUI/AppFunction/FrmNation.resx index b0a054532f52dbfe9580dc01810cfe6c5aef4a96..9eafb6be56899413c16ba55ddb45bb6d487c93cf 100644 --- a/SYS.FormUI/AppFunction/FrmNation.resx +++ b/SYS.FormUI/AppFunction/FrmNation.resx @@ -117,6 +117,27 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + diff --git a/SYS.FormUI/AppFunction/FrmNotice.cs b/SYS.FormUI/AppFunction/FrmNotice.cs index 71d61229357bc5e3e7391ebe3b5a221fa4de7ebd..6c9aca96751f91dffa51f6a5cf870a2c98a2491c 100644 --- a/SYS.FormUI/AppFunction/FrmNotice.cs +++ b/SYS.FormUI/AppFunction/FrmNotice.cs @@ -23,6 +23,7 @@ */ using Sunny.UI; using SYS.Application; +using SYS.Common; using SYS.Core; using System; using System.Collections.Generic; @@ -43,9 +44,18 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + private void FrmNotice_Load(object sender, EventArgs e) { - List notices = new NoticeService().SelectNoticeAll(); + result = HttpHelper.Request("Notice/SelectNoticeAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNoticeAll+接口服务异常,请提交Issue!"); + return; + } + List notices = HttpHelper.JsonToList(result.message); notices.ForEach(source => { dgvNoticeList.Items.Add(source.NoticeNo + ":" + source.Noticetheme); @@ -56,7 +66,17 @@ namespace SYS.FormUI { //根据:来分割字符串并返回第一项数据即为公告编号 var str = dgvNoticeList.SelectedItem.ToString().Split(":").First(); - Notice notice = new NoticeService().SelectNoticeByNoticeNo(str); + dic= new Dictionary() + { + { "noticeId",str} + }; + result = HttpHelper.Request("Notice/SelectNoticeByNoticeNo",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNoticeAll+接口服务异常,请提交Issue!"); + return; + } + Notice notice = HttpHelper.JsonToModel(result.message); if (notice != null) { rtbNoticeContent.Html = notice.NoticeContent; diff --git a/SYS.FormUI/AppFunction/FrmOperation.cs b/SYS.FormUI/AppFunction/FrmOperation.cs index 1a4548ad2ca017202c0452473afe61692fa81701..2a03527b13f0750ac515bfb3ca4d456eee9ff398 100644 --- a/SYS.FormUI/AppFunction/FrmOperation.cs +++ b/SYS.FormUI/AppFunction/FrmOperation.cs @@ -24,7 +24,9 @@ using Sunny.UI; using SYS.Application; using SYS.Common; +using SYS.Core; using System; +using System.Collections.Generic; using System.Windows.Forms; namespace SYS.FormUI @@ -36,12 +38,19 @@ namespace SYS.FormUI InitializeComponent(); } - + Dictionary dic = null; + ResponseMsg result = null; private void FrmOperation_Load(object sender, EventArgs e) { + result = HttpHelper.Request("App/SelectOperationlogAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectOperationlogAll+接口服务异常,请提交Issue!"); + return; + } dgvOperationlog.AutoGenerateColumns = false; - dgvOperationlog.DataSource = new OperationlogService().SelectOperationlogAll(); + dgvOperationlog.DataSource = HttpHelper.JsonToList(result.message); } } } diff --git a/SYS.FormUI/AppFunction/FrmPosition.Designer.cs b/SYS.FormUI/AppFunction/FrmPosition.Designer.cs index cf86075addb0d9b1b38b9893b977844d9b9c4df4..6bd26bd901a11a558fcd1c6ae294e2a0c81145ae 100644 --- a/SYS.FormUI/AppFunction/FrmPosition.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmPosition.Designer.cs @@ -29,78 +29,245 @@ namespace SYS.FormUI /// private void InitializeComponent() { + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(FrmPosition)); - this.flpInformation = new System.Windows.Forms.FlowLayoutPanel(); - this.btnAdd = new Sunny.UI.UIButton(); - this.txtJobNm = new Sunny.UI.UITextBox(); - this.label2 = new System.Windows.Forms.Label(); - this.btnSearch = new Sunny.UI.UIButton(); + this.btnDeletePosition = new Sunny.UI.UIButton(); + this.btnUpdatePosition = new Sunny.UI.UIButton(); + this.btnAddPosition = new Sunny.UI.UIButton(); + this.label7 = new System.Windows.Forms.Label(); + this.txtPositionName = new Sunny.UI.UITextBox(); + this.label20 = new System.Windows.Forms.Label(); + this.txtPositionNo = new Sunny.UI.UITextBox(); + this.dgvPositionList = new Sunny.UI.UIDataGridView(); + this.clPositionNo = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.clPositionName = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column1 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column2 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column3 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column4 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + this.Column5 = new System.Windows.Forms.DataGridViewTextBoxColumn(); + ((System.ComponentModel.ISupportInitialize)(this.dgvPositionList)).BeginInit(); this.SuspendLayout(); // - // flpInformation - // - this.flpInformation.AutoScroll = true; - this.flpInformation.BackColor = System.Drawing.Color.Transparent; - this.flpInformation.Location = new System.Drawing.Point(2, 117); - this.flpInformation.Margin = new System.Windows.Forms.Padding(2); - this.flpInformation.Name = "flpInformation"; - this.flpInformation.Size = new System.Drawing.Size(1001, 504); - this.flpInformation.TabIndex = 73; - // - // btnAdd - // - this.btnAdd.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnAdd.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnAdd.Location = new System.Drawing.Point(582, 56); - this.btnAdd.MinimumSize = new System.Drawing.Size(1, 1); - this.btnAdd.Name = "btnAdd"; - this.btnAdd.Radius = 20; - this.btnAdd.Size = new System.Drawing.Size(100, 35); - this.btnAdd.TabIndex = 134; - this.btnAdd.Text = "添 加"; - this.btnAdd.Click += new System.EventHandler(this.btnAdd_Click); - // - // txtJobNm - // - this.txtJobNm.Cursor = System.Windows.Forms.Cursors.IBeam; - this.txtJobNm.FillColor = System.Drawing.Color.White; - this.txtJobNm.Font = new System.Drawing.Font("微软雅黑", 15.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.txtJobNm.Location = new System.Drawing.Point(280, 56); - this.txtJobNm.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.txtJobNm.Maximum = 2147483647D; - this.txtJobNm.Minimum = -2147483648D; - this.txtJobNm.MinimumSize = new System.Drawing.Size(1, 1); - this.txtJobNm.Name = "txtJobNm"; - this.txtJobNm.Padding = new System.Windows.Forms.Padding(5); - this.txtJobNm.Radius = 20; - this.txtJobNm.Size = new System.Drawing.Size(250, 35); - this.txtJobNm.Style = Sunny.UI.UIStyle.Custom; - this.txtJobNm.StyleCustomMode = true; - this.txtJobNm.TabIndex = 133; - this.txtJobNm.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - // - // label2 - // - this.label2.AutoSize = true; - this.label2.Font = new System.Drawing.Font("微软雅黑", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.label2.Location = new System.Drawing.Point(173, 62); - this.label2.Name = "label2"; - this.label2.Size = new System.Drawing.Size(88, 25); - this.label2.TabIndex = 132; - this.label2.Text = "职位名称"; - // - // btnSearch - // - this.btnSearch.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnSearch.Font = new System.Drawing.Font("微软雅黑", 12F); - this.btnSearch.Location = new System.Drawing.Point(732, 56); - this.btnSearch.MinimumSize = new System.Drawing.Size(1, 1); - this.btnSearch.Name = "btnSearch"; - this.btnSearch.Radius = 20; - this.btnSearch.Size = new System.Drawing.Size(100, 35); - this.btnSearch.TabIndex = 135; - this.btnSearch.Text = "搜 索"; - this.btnSearch.Click += new System.EventHandler(this.btnSearch_Click); + // btnDeletePosition + // + this.btnDeletePosition.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnDeletePosition.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnDeletePosition.Location = new System.Drawing.Point(821, 419); + this.btnDeletePosition.MinimumSize = new System.Drawing.Size(1, 1); + this.btnDeletePosition.Name = "btnDeletePosition"; + this.btnDeletePosition.Radius = 20; + this.btnDeletePosition.Size = new System.Drawing.Size(165, 33); + this.btnDeletePosition.TabIndex = 214; + this.btnDeletePosition.Text = "删除职位"; + this.btnDeletePosition.Click += new System.EventHandler(this.btnDeletePosition_Click); + // + // btnUpdatePosition + // + this.btnUpdatePosition.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnUpdatePosition.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnUpdatePosition.Location = new System.Drawing.Point(821, 374); + this.btnUpdatePosition.MinimumSize = new System.Drawing.Size(1, 1); + this.btnUpdatePosition.Name = "btnUpdatePosition"; + this.btnUpdatePosition.Radius = 20; + this.btnUpdatePosition.Size = new System.Drawing.Size(165, 33); + this.btnUpdatePosition.TabIndex = 213; + this.btnUpdatePosition.Text = "更新职位"; + this.btnUpdatePosition.Click += new System.EventHandler(this.btnUpdatePosition_Click); + // + // btnAddPosition + // + this.btnAddPosition.Cursor = System.Windows.Forms.Cursors.Hand; + this.btnAddPosition.Font = new System.Drawing.Font("微软雅黑", 12F); + this.btnAddPosition.Location = new System.Drawing.Point(821, 329); + this.btnAddPosition.MinimumSize = new System.Drawing.Size(1, 1); + this.btnAddPosition.Name = "btnAddPosition"; + this.btnAddPosition.Radius = 20; + this.btnAddPosition.Size = new System.Drawing.Size(165, 33); + this.btnAddPosition.TabIndex = 212; + this.btnAddPosition.Text = "新增职位"; + this.btnAddPosition.Click += new System.EventHandler(this.btnAddPosition_Click); + // + // label7 + // + this.label7.AutoSize = true; + this.label7.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label7.Location = new System.Drawing.Point(859, 247); + this.label7.Name = "label7"; + this.label7.Size = new System.Drawing.Size(85, 19); + this.label7.TabIndex = 211; + this.label7.Text = "职位名称"; + // + // txtPositionName + // + this.txtPositionName.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtPositionName.FillColor = System.Drawing.Color.White; + this.txtPositionName.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPositionName.Location = new System.Drawing.Point(821, 278); + this.txtPositionName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtPositionName.Maximum = 2147483647D; + this.txtPositionName.Minimum = -2147483648D; + this.txtPositionName.MinimumSize = new System.Drawing.Size(1, 1); + this.txtPositionName.Name = "txtPositionName"; + this.txtPositionName.Padding = new System.Windows.Forms.Padding(5); + this.txtPositionName.Radius = 20; + this.txtPositionName.Size = new System.Drawing.Size(165, 29); + this.txtPositionName.Style = Sunny.UI.UIStyle.Custom; + this.txtPositionName.StyleCustomMode = true; + this.txtPositionName.TabIndex = 210; + this.txtPositionName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // label20 + // + this.label20.AutoSize = true; + this.label20.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.label20.Location = new System.Drawing.Point(859, 175); + this.label20.Name = "label20"; + this.label20.Size = new System.Drawing.Size(85, 19); + this.label20.TabIndex = 209; + this.label20.Text = "职位编号"; + // + // txtPositionNo + // + this.txtPositionNo.Cursor = System.Windows.Forms.Cursors.IBeam; + this.txtPositionNo.FillColor = System.Drawing.Color.White; + this.txtPositionNo.Font = new System.Drawing.Font("宋体", 14.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); + this.txtPositionNo.Location = new System.Drawing.Point(821, 206); + this.txtPositionNo.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); + this.txtPositionNo.Maximum = 2147483647D; + this.txtPositionNo.Minimum = -2147483648D; + this.txtPositionNo.MinimumSize = new System.Drawing.Size(1, 1); + this.txtPositionNo.Name = "txtPositionNo"; + this.txtPositionNo.Padding = new System.Windows.Forms.Padding(5); + this.txtPositionNo.Radius = 20; + this.txtPositionNo.ReadOnly = true; + this.txtPositionNo.Size = new System.Drawing.Size(165, 29); + this.txtPositionNo.Style = Sunny.UI.UIStyle.Custom; + this.txtPositionNo.StyleCustomMode = true; + this.txtPositionNo.TabIndex = 208; + this.txtPositionNo.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; + // + // dgvPositionList + // + this.dgvPositionList.AllowUserToAddRows = false; + this.dgvPositionList.AllowUserToDeleteRows = false; + this.dgvPositionList.AllowUserToResizeColumns = false; + this.dgvPositionList.AllowUserToResizeRows = false; + dataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvPositionList.AlternatingRowsDefaultCellStyle = dataGridViewCellStyle1; + this.dgvPositionList.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dgvPositionList.BackgroundColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + this.dgvPositionList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.Single; + dataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + dataGridViewCellStyle2.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle2.ForeColor = System.Drawing.Color.White; + dataGridViewCellStyle2.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText; + dataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvPositionList.ColumnHeadersDefaultCellStyle = dataGridViewCellStyle2; + this.dgvPositionList.ColumnHeadersHeight = 32; + this.dgvPositionList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing; + this.dgvPositionList.Columns.AddRange(new System.Windows.Forms.DataGridViewColumn[] { + this.clPositionNo, + this.clPositionName, + this.Column1, + this.Column2, + this.Column3, + this.Column4, + this.Column5}); + dataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window; + dataGridViewCellStyle3.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle3.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(155)))), ((int)(((byte)(200)))), ((int)(((byte)(255))))); + dataGridViewCellStyle3.SelectionForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.False; + this.dgvPositionList.DefaultCellStyle = dataGridViewCellStyle3; + this.dgvPositionList.EnableHeadersVisualStyles = false; + this.dgvPositionList.Font = new System.Drawing.Font("微软雅黑", 12F); + this.dgvPositionList.GridColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + this.dgvPositionList.Location = new System.Drawing.Point(3, 38); + this.dgvPositionList.MultiSelect = false; + this.dgvPositionList.Name = "dgvPositionList"; + this.dgvPositionList.ReadOnly = true; + dataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft; + dataGridViewCellStyle4.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.Font = new System.Drawing.Font("微软雅黑", 12F); + dataGridViewCellStyle4.ForeColor = System.Drawing.Color.FromArgb(((int)(((byte)(48)))), ((int)(((byte)(48)))), ((int)(((byte)(48))))); + dataGridViewCellStyle4.SelectionBackColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); + dataGridViewCellStyle4.SelectionForeColor = System.Drawing.Color.White; + dataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.True; + this.dgvPositionList.RowHeadersDefaultCellStyle = dataGridViewCellStyle4; + this.dgvPositionList.RowHeadersVisible = false; + this.dgvPositionList.RowHeight = 29; + dataGridViewCellStyle5.BackColor = System.Drawing.Color.White; + this.dgvPositionList.RowsDefaultCellStyle = dataGridViewCellStyle5; + this.dgvPositionList.RowTemplate.Height = 29; + this.dgvPositionList.SelectedIndex = -1; + this.dgvPositionList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dgvPositionList.ShowGridLine = true; + this.dgvPositionList.Size = new System.Drawing.Size(788, 582); + this.dgvPositionList.TabIndex = 207; + this.dgvPositionList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvPositionList_CellClick); + // + // clPositionNo + // + this.clPositionNo.DataPropertyName = "position_no"; + this.clPositionNo.HeaderText = "职位编号"; + this.clPositionNo.Name = "clPositionNo"; + this.clPositionNo.ReadOnly = true; + // + // clPositionName + // + this.clPositionName.DataPropertyName = "position_name"; + this.clPositionName.HeaderText = "职位名称"; + this.clPositionName.Name = "clPositionName"; + this.clPositionName.ReadOnly = true; + // + // Column1 + // + this.Column1.DataPropertyName = "delete_mk"; + this.Column1.HeaderText = "Column1"; + this.Column1.Name = "Column1"; + this.Column1.ReadOnly = true; + this.Column1.Visible = false; + // + // Column2 + // + this.Column2.DataPropertyName = "datains_usr"; + this.Column2.HeaderText = "Column2"; + this.Column2.Name = "Column2"; + this.Column2.ReadOnly = true; + this.Column2.Visible = false; + // + // Column3 + // + this.Column3.DataPropertyName = "datains_date"; + this.Column3.HeaderText = "Column3"; + this.Column3.Name = "Column3"; + this.Column3.ReadOnly = true; + this.Column3.Visible = false; + // + // Column4 + // + this.Column4.DataPropertyName = "datachg_usr"; + this.Column4.HeaderText = "Column4"; + this.Column4.Name = "Column4"; + this.Column4.ReadOnly = true; + this.Column4.Visible = false; + // + // Column5 + // + this.Column5.DataPropertyName = "datachg_date"; + this.Column5.HeaderText = "datachg_date"; + this.Column5.Name = "Column5"; + this.Column5.ReadOnly = true; + this.Column5.Visible = false; // // FrmPosition // @@ -108,11 +275,14 @@ namespace SYS.FormUI this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1005, 623); this.ControlBox = false; - this.Controls.Add(this.btnSearch); - this.Controls.Add(this.btnAdd); - this.Controls.Add(this.txtJobNm); - this.Controls.Add(this.label2); - this.Controls.Add(this.flpInformation); + this.Controls.Add(this.btnDeletePosition); + this.Controls.Add(this.btnUpdatePosition); + this.Controls.Add(this.btnAddPosition); + this.Controls.Add(this.label7); + this.Controls.Add(this.txtPositionName); + this.Controls.Add(this.label20); + this.Controls.Add(this.txtPositionNo); + this.Controls.Add(this.dgvPositionList); this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); this.MaximizeBox = false; this.MinimizeBox = false; @@ -121,6 +291,7 @@ namespace SYS.FormUI this.ShowTitleIcon = true; this.Text = "职位类型维护"; this.Load += new System.EventHandler(this.FrmPosition_Load); + ((System.ComponentModel.ISupportInitialize)(this.dgvPositionList)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -128,10 +299,20 @@ namespace SYS.FormUI #endregion - private System.Windows.Forms.FlowLayoutPanel flpInformation; - private Sunny.UI.UIButton btnAdd; - private Sunny.UI.UITextBox txtJobNm; - private System.Windows.Forms.Label label2; - private Sunny.UI.UIButton btnSearch; + private Sunny.UI.UIButton btnDeletePosition; + private Sunny.UI.UIButton btnUpdatePosition; + private Sunny.UI.UIButton btnAddPosition; + private System.Windows.Forms.Label label7; + private Sunny.UI.UITextBox txtPositionName; + private System.Windows.Forms.Label label20; + private Sunny.UI.UITextBox txtPositionNo; + private Sunny.UI.UIDataGridView dgvPositionList; + private System.Windows.Forms.DataGridViewTextBoxColumn clPositionNo; + private System.Windows.Forms.DataGridViewTextBoxColumn clPositionName; + private System.Windows.Forms.DataGridViewTextBoxColumn Column1; + private System.Windows.Forms.DataGridViewTextBoxColumn Column2; + private System.Windows.Forms.DataGridViewTextBoxColumn Column3; + private System.Windows.Forms.DataGridViewTextBoxColumn Column4; + private System.Windows.Forms.DataGridViewTextBoxColumn Column5; } } \ No newline at end of file diff --git a/SYS.FormUI/AppFunction/FrmPosition.cs b/SYS.FormUI/AppFunction/FrmPosition.cs index 22a527f806d04de57e6d7d4fcf2f8b2d41709c93..9790d97b5db43dc90f4b97d537749f551663d7d4 100644 --- a/SYS.FormUI/AppFunction/FrmPosition.cs +++ b/SYS.FormUI/AppFunction/FrmPosition.cs @@ -48,19 +48,12 @@ namespace SYS.FormUI public static PositionInfo reload; - public static PositionInfo Accessed; - - public static PositionInfo insert; - public FrmPosition() { InitializeComponent(); - operation = Visited; reload = ReloadPositionList; - Accessed = Access; } - ucPositionInformation baseInfo = null; List positions = null; public static string info = null; private void FrmPosition_Load(object sender, EventArgs e) @@ -68,139 +61,101 @@ namespace SYS.FormUI ReloadPositionList(); } + ResponseMsg result = new ResponseMsg(); + Dictionary dic = null; + public void ReloadPositionList() { - flpInformation.Controls.Clear(); - positions = new BaseService().SelectPositionAll(); - for (int i = 0; i < positions.Count; i++) + txtPositionNo.Text = Util.GetListNewId("P", 3, 1, "-").FirstOrDefault(); + result = HttpHelper.Request("Base/SelectPositionAll"); + if (result.statusCode != 200) { - baseInfo = new ucPositionInformation(); - baseInfo.lbName.Text = "名称:" + positions[i].position_name; - if (positions[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + UIMessageBox.ShowError("SelectPositionAll+接口服务异常,请提交Issue!"); + return; } + positions = HttpHelper.JsonToList(result.message); + dgvPositionList.AutoGenerateColumns = false; + dgvPositionList.DataSource = positions; } - private void flpInformation_SizeChanged(object sender, EventArgs e) - { - flpInformation.Width = 660; - flpInformation.Height = 582; - } - - public void Visited() + private void btnAddPosition_Click(object sender, EventArgs e) { - //筛选出只与当前职位对应的数据 - Position position = positions.FirstOrDefault(a => a.position_name.Equals(info)); - if (position.position_name.Equals(info)) + if (txtPositionName.Text.Trim().IsNullOrEmpty()) { - var _position = new Position() - { - position_no = position.position_no, - delete_mk = 1, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_position != null) - { - bool n = new BaseService().DelPosition(_position); - if (n == true) - { - UIMessageBox.ShowSuccess("删除成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "删除职位类型操作!删除值为:" + _position.position_no, 2); - #endregion - ReloadPositionList(); - } - } + UIMessageTip.ShowWarning("职位名称为空,请检查", 1500); + txtPositionName.Focus(); + return; } - } - public void Access() - { - //筛选出只与当前职位对应的数据 - Position position = positions.FirstOrDefault(a => a.position_name.Equals(info)); - if (position.position_name.Equals(info)) + var pos = new Position() + { + position_no = txtPositionNo.Text.Trim(), + position_name = txtPositionName.Text.Trim(), + delete_mk = 0, + datains_usr = AdminInfo.Account, + datains_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/AddPosition", HttpHelper.ModelToJson(pos)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) { - var _position = new Position() - { - position_no = position.position_no, - delete_mk = 0, - datachg_usr = AdminInfo.Account, - datachg_date = DateTime.Now - }; - if (_position != null) - { - bool n = new BaseService().DelPosition(_position); - if (n == true) - { - UIMessageBox.ShowSuccess("恢复成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "恢复职位类型操作!恢复值为:" + _position.position_no, 2); - #endregion - ReloadPositionList(); - } - } + UIMessageTip.ShowError("AddPosition+接口服务异常,请提交Issue!", 1500); + return; } + UIMessageTip.ShowOk("添加职位成功!", 1500); + #region 获取添加操作日志所需的信息 + RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增职位类型操作!新增值为:" + pos.position_no, 2); + #endregion + ReloadPositionList(); + return; + } + private void dgvPositionList_CellClick(object sender, DataGridViewCellEventArgs e) + { + txtPositionNo.Text = dgvPositionList.Rows[0].Cells["clPositionNo"].Value.ToString(); + txtPositionName.Text = dgvPositionList.Rows[0].Cells["clPositionName"].Value.ToString(); } - private void btnAdd_Click(object sender, EventArgs e) + private void btnUpdatePosition_Click(object sender, EventArgs e) { - if (txtJobNm.Text.Trim().IsNullOrEmpty()) + if (dgvPositionList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("职位名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的职位数据,请检查", 1500); return; } - var _position = new Position() + var pos = new Position() { - position_no = new SYS.Core.CounterHelper().GetNewId(CounterRuleConsts.PositionId).ToString(), - position_name = txtJobNm.Text.Trim(), - delete_mk = 0, - datains_usr = AdminInfo.Account, - datains_date = DateTime.Now + position_no = txtPositionNo.Text.Trim(), + position_name = txtPositionName.Text.Trim(), + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now }; - if (_position != null) + result = HttpHelper.Request("Base​/UpdPosition", HttpHelper.ModelToJson(pos)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) { - bool n = new BaseService().AddPosition(_position); - if (n == true) - { - UIMessageBox.ShowSuccess("新增成功!"); - #region 获取添加操作日志所需的信息 - RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增职位类型操作!新增值为:" + _position.position_no, 2); - #endregion - ReloadPositionList(); - txtJobNm.Text = ""; - } + UIMessageTip.ShowError("UpdPosition+接口服务异常,请提交Issue!", 1500); + return; } } - private void btnSearch_Click(object sender, EventArgs e) + private void btnDeletePosition_Click(object sender, EventArgs e) { - if (txtJobNm.Text.Trim().IsNullOrEmpty()) + if (dgvPositionList.SelectedRows.Count <= 0) { - UIMessageTip.ShowError("职位名称为空,请检查", 3000); + UIMessageTip.ShowWarning("未选择需修改的职位数据,请检查", 1500); return; } - var listSource = new BaseService().SelectPositionAll(new Position { position_name = txtJobNm.Text.Trim() }); - flpInformation.Controls.Clear(); - for (int i = 0; i < listSource.Count; i++) + var pos = new Position() { - baseInfo = new ucPositionInformation(); - baseInfo.Tag = "职位"; - baseInfo.lbName.Text = "名称:" + listSource[i].position_name; - if (listSource[i].delete_mk == 1) - { - baseInfo.btnOperation.Text = "恢复"; - baseInfo.btnOperation.FillColor = Color.FromArgb(33, 179, 81); - baseInfo.lbName.BackColor = Color.Red; - baseInfo.btnOperation.FillHoverColor = Color.FromArgb(128, 255, 128); - } - flpInformation.Controls.Add(baseInfo); + position_no = txtPositionNo.Text.Trim(), + position_name = txtPositionName.Text.Trim(), + delete_mk = 1, + datachg_usr = AdminInfo.Account, + datachg_date = DateTime.Now + }; + result = HttpHelper.Request("Base​/DelPosition", HttpHelper.ModelToJson(pos)); + if (result.statusCode != 200 || result.message.ToString().Equals("false")) + { + UIMessageTip.ShowError("DelPosition+接口服务异常,请提交Issue!", 1500); + return; } } } diff --git a/SYS.FormUI/AppFunction/FrmPosition.resx b/SYS.FormUI/AppFunction/FrmPosition.resx index 016a058e3889ad3dde5bc4ab2b35c88c0fe9cdde..0506287af8d57fbe423252739bfbb7b41a623494 100644 --- a/SYS.FormUI/AppFunction/FrmPosition.resx +++ b/SYS.FormUI/AppFunction/FrmPosition.resx @@ -117,6 +117,27 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + True + + + True + + + True + + + True + + + True + + + True + + + True + diff --git a/SYS.FormUI/AppFunction/FrmReserList.Designer.cs b/SYS.FormUI/AppFunction/FrmReserList.Designer.cs index 195f4eabd06fd1d0236b39b81518cf200fe41a10..aca28eabad6998a92baaa766a9aca1febae4855e 100644 --- a/SYS.FormUI/AppFunction/FrmReserList.Designer.cs +++ b/SYS.FormUI/AppFunction/FrmReserList.Designer.cs @@ -114,7 +114,7 @@ this.dgvReserList.RowTemplate.Height = 29; this.dgvReserList.SelectedIndex = -1; this.dgvReserList.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; - this.dgvReserList.ShowGridLine = true; + //this.dgvReserList.ShowGridLine = true; this.dgvReserList.Size = new System.Drawing.Size(726, 169); this.dgvReserList.TabIndex = 113; this.dgvReserList.CellClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dgvReserList_CellClick); diff --git a/SYS.FormUI/AppFunction/FrmReserList.cs b/SYS.FormUI/AppFunction/FrmReserList.cs index fc3cccf31deb18e9633c00f2d822b82425e5f5ea..933b3bea116175e99df430370f7609cada0fc38c 100644 --- a/SYS.FormUI/AppFunction/FrmReserList.cs +++ b/SYS.FormUI/AppFunction/FrmReserList.cs @@ -1,12 +1,15 @@ using System; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using Sunny.UI; using System.Transactions; -using SYS.Core.Util; using System.Collections.Generic; using SYS.Application; +using System.Web.Script.Services; +using SYS.Common; +using System.Linq; +using static System.Windows.Forms.VisualStyles.VisualStyleElement.ToolTip; namespace SYS.FormUI { @@ -17,15 +20,27 @@ namespace SYS.FormUI InitializeComponent(); } - + ResponseMsg result = new ResponseMsg(); private void FrmReserList_Load(object sender, EventArgs e) { + result = HttpHelper.Request("Reser/SelectReserAll", null, null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectReserAll+接口服务异常,请提交Issue!"); + return; + } dgvReserList.AutoGenerateColumns = false; - dgvReserList.DataSource = new ReserService().SelectReserAll(); + dgvReserList.DataSource = HttpHelper.JsonToList(result.message); #region 加载客户类型信息 - List lstSourceGrid = new BaseService().SelectCustoTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectCustoTypeAllCanUse", null, null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List lstSourceGrid = HttpHelper.JsonToList(result.message); this.cbCustoType.DataSource = lstSourceGrid; this.cbCustoType.DisplayMember = "TypeName"; this.cbCustoType.ValueMember = "UserType"; @@ -34,7 +49,13 @@ namespace SYS.FormUI #endregion #region 加载证件类型信息 - List passPorts = new BaseService().SelectPassPortTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectPassPortTypeAllCanUse", null, null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPassPortTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List passPorts = HttpHelper.JsonToList(result.message); this.cbPassportType.DataSource = passPorts; this.cbPassportType.DisplayMember = "PassportName"; this.cbPassportType.ValueMember = "PassportId"; @@ -42,11 +63,16 @@ namespace SYS.FormUI #endregion #region 加载性别信息 - List listSexType = new BaseService().SelectSexTypeAll(new SexType { delete_mk = 0 }); + result = HttpHelper.Request("Base/SelectSexTypeAll", null, null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + List listSexType = HttpHelper.JsonToList(result.message); this.cbSex.DataSource = listSexType; this.cbSex.DisplayMember = "sexName"; this.cbSex.ValueMember = "sexId"; - this.cbSex.SelectedIndex = 0; #endregion } @@ -63,15 +89,23 @@ namespace SYS.FormUI { CustoNo = txtCustoNo.Text.Trim(), CustoName = txtCustoName.Text.Trim(), - CustoSex = cbSex.SelectedIndex, + CustoSex = Convert.ToInt32(cbSex.SelectedValue.ToString()), CustoTel = txtTel.Text.Trim(), PassportType = cbPassportType.SelectedIndex, CustoID = txtCardID.Text.Trim(), CustoAdress = txtCustoAdress.Text.Trim(), CustoBirth = dtpBirthday.Value, - CustoType = cbCustoType.SelectedIndex + CustoType = cbCustoType.SelectedIndex, + delete_mk = 0, + datains_usr = LoginInfo.WorkerNo, + datains_date=DateTime.Now }; - new CustoService().InsertCustomerInfo(custo); + result = HttpHelper.Request("Custo​/InsertCustomerInfo", HttpHelper.ModelToJson(custo)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertCustomerInfo+接口服务异常,请提交Issue!"); + return; + } Room r = new Room() { @@ -80,22 +114,41 @@ namespace SYS.FormUI RoomStateId = 1, RoomNo = dgvReserList.SelectedRows[0].Cells["clRoomNo"].Value.ToString() }; - - new RoomService().UpdateRoomInfo(r); - new ReserService().DeleteReserInfo(dgvReserList.SelectedRows[0].Cells["clReserNo"].Value.ToString()); + result = HttpHelper.Request("Room​/UpdateRoomInfo", HttpHelper.ModelToJson(r), null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertCustomerInfo+接口服务异常,请提交Issue!"); + return; + } + var reser = new Reser + { + ReserId = dgvReserList.SelectedRows[0].Cells["clReserNo"].Value.ToString() + }; + result = HttpHelper.Request("Reser/DeleteReserInfo", HttpHelper.ModelToJson(reser)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DeleteReserInfo+接口服务异常,请提交Issue!"); + return; + } + + UIMessageBox.ShowSuccess("操作成功"); + dgvReserList.AutoGenerateColumns = false; + result = HttpHelper.Request("Reser/SelectReserAll", null, null); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectReserAll+接口服务异常,请提交Issue!"); + return; + } + dgvReserList.DataSource = HttpHelper.JsonToList(result.message); + FrmRoomManager.Reload(""); scope.Complete(); + this.Close(); } - UIMessageBox.ShowSuccess("操作成功"); - dgvReserList.AutoGenerateColumns = false; - dgvReserList.DataSource = new ReserService().SelectReserAll(); - FrmRoomManager.Reload(""); - this.Close(); - } private void dgvReserList_CellClick(object sender, DataGridViewCellEventArgs e) { - string custoNo = new CounterHelper().GetNewId("CustoId"); + string custoNo = Util.GetListNewId("TS", 2, 1, "-").FirstOrDefault(); txtCustoNo.Text = custoNo; txtCustoName.Text = dgvReserList.SelectedRows[0].Cells["clCustoNm"].Value.ToString(); txtTel.Text = dgvReserList.SelectedRows[0].Cells["clTel"].Value.ToString(); @@ -105,6 +158,7 @@ namespace SYS.FormUI { //获取得到输入的身份证号码 string identityCard = txtCardID.Text.Trim(); + if (string.IsNullOrEmpty(identityCard)) { //身份证号码不能为空,如果为空返回 @@ -128,33 +182,31 @@ namespace SYS.FormUI return; } } - string birthday = ""; - string sex = ""; + if (identityCard.Length == 18) { - var result = new IDCardUtil().SelectCardCode(identityCard); - var address = result.Replace(",","").ToString(); - birthday = identityCard.Substring(6, 4) + "-" + identityCard.Substring(10, 2) + "-" + identityCard.Substring(12, 2); - sex = identityCard.Substring(14, 3); - txtCustoAdress.Text = address; - //性别代码为偶数是女性奇数为男性 - if (int.Parse(sex) % 2 == 0) + var result = Util.searchCode(identityCard); + if (result.message.IsNullOrEmpty()) //如果没有错误消息输出,则代表成功 { - cbSex.Text = "女"; + try + { + cbSex.Text = result.sex; + txtCustoAdress.Text = result.address; + dtpBirthday.Value = Convert.ToDateTime(result.birthday); + } + catch + { + UIMessageBox.ShowError("请正确输入证件号码!"); + return; + } } else { - cbSex.Text = "男"; + UIMessageBox.ShowError(result.message); + return; } } - try - { - dtpBirthday.Value = Convert.ToDateTime(birthday); - } - catch - { - UIMessageBox.ShowError("请正确输入证件号码!"); - } + return; } } diff --git a/SYS.FormUI/AppFunction/FrmReserManager.cs b/SYS.FormUI/AppFunction/FrmReserManager.cs index f32f5acd72d65fe15be6b0746e86158d378b9ec9..2e2a70fae6f14de8e233cbb9644ecfd07debb3be 100644 --- a/SYS.FormUI/AppFunction/FrmReserManager.cs +++ b/SYS.FormUI/AppFunction/FrmReserManager.cs @@ -4,6 +4,8 @@ using SYS.Core; using Sunny.UI; using SYS.Application; using SYS.Common; +using System.Linq; +using System.Collections.Generic; namespace SYS.FormUI { @@ -20,10 +22,13 @@ namespace SYS.FormUI #endregion } + Dictionary dic = null; + ResponseMsg result = null; + private void btnReser_Click(object sender, EventArgs e) { Random random = new Random(); - string reserid = new CounterHelper().GetNewId(CounterRuleConsts.ReserId); + string reserid = Util.GetListNewId("R", 3, 1, "-").FirstOrDefault(); Reser reser = new Reser() { ReserId = reserid, @@ -41,10 +46,22 @@ namespace SYS.FormUI RoomNo = cboReserRoomNo.Text, RoomStateId = 4 }; - bool result1 = new ReserService().InserReserInfo(reser); - bool result2 = new RoomService().UpdateRoomInfoWithReser(room); + result = HttpHelper.Request("Reser​/InserReserInfo",HttpHelper.ModelToJson(reser)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InserReserInfo+接口服务异常,请提交Issue!"); + return; + } + bool result1 = result.message.ToString().Equals("true"); + result = HttpHelper.Request("Room​/UpdateRoomInfoWithReser", HttpHelper.ModelToJson(room)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateRoomInfoWithReser+接口服务异常,请提交Issue!"); + return; + } + bool result2 = result.message.ToString().Equals("true"); - if (result1 == true && result2 == true) + if (result1 && result2) { UIMessageBox.ShowSuccess("预约成功!请在指定时间内进行登记入住"); #region 获取添加操作日志所需的信息 @@ -52,16 +69,24 @@ namespace SYS.FormUI #endregion FrmRoomManager.Reload(""); this.Close(); - } - - + else + { + UIMessageBox.ShowError("预约失败!服务器繁忙"); + return; + } } private void FrmRoomManager_Load(object sender, EventArgs e) { cboReserWay.SelectedIndex = 0; - cboReserRoomNo.DataSource = new RoomService().SelectCanUseRoomAll(); + result = HttpHelper.Request("Room/SelectCanUseRoomAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCanUseRoomAll+接口服务异常,请提交Issue!"); + return; + } + cboReserRoomNo.DataSource = HttpHelper.JsonToList(result.message); cboReserRoomNo.DisplayMember = "RoomNo"; cboReserRoomNo.ValueMember = "RoomNo"; cboReserRoomNo.Text = ucRoomList.co_RoomNo; diff --git a/SYS.FormUI/AppFunction/FrmRoomManager.cs b/SYS.FormUI/AppFunction/FrmRoomManager.cs index c7572503934fb5236a2bf18742a6efef9c6315c4..b96667b169b5eaef1fff1bd681dd8b0e73f323fa 100644 --- a/SYS.FormUI/AppFunction/FrmRoomManager.cs +++ b/SYS.FormUI/AppFunction/FrmRoomManager.cs @@ -28,6 +28,9 @@ using SYS.Core; using SYS.FormUI.Properties; using SYS.Application; using System.Drawing; +using SYS.Common; +using Sunny.UI; +using static SYS.FormUI.FrmRoomManager; namespace SYS.FormUI { @@ -52,25 +55,18 @@ namespace SYS.FormUI InitializeComponent(); ReadInfo = LoadRoomInfo; Reload = LoadData; - - } + Dictionary dic = null; + ResponseMsg result = null; + List romsty = null; ucRoomList romt = null; #region 房间加载事件方法 private void FrmRoomManager_Load(object sender, EventArgs e) { - lblCanUse.Text = new RoomService().SelectCanUseRoomAllByRoomState().ToString(); - lblCheck.Text = new RoomService().SelectNotUseRoomAllByRoomState().ToString(); - lblNotClear.Text = new RoomService().SelectNotClearRoomAllByRoomState().ToString(); - lblFix.Text = new RoomService().SelectFixingRoomAllByRoomState().ToString(); - lblReser.Text = new RoomService().SelectReseredRoomAllByRoomState().ToString(); - lblRoomNo.Text = ucRoomList.co_RoomNo; - lblCustoNo.Text = ucRoomList.co_CustoNo; - lblRoomPosition.Text = ucRoomList.co_RoomPosition; - lblCheckTime.Text = ucRoomList.co_CheckTime == null ? "" : Convert.ToDateTime(ucRoomList.co_CheckTime).ToString("yyyy-MM-dd"); - lblRoomState.Text = ucRoomList.co_RoomState; + LoadRoomInfo(); + //foreach (Control item in this.pnlRoomInfo.Controls) //{ // if (item.GetType().ToString() == "System.Windows.Forms.Label") @@ -84,12 +80,6 @@ namespace SYS.FormUI } #endregion - private void tmrGetData_Tick(object sender, EventArgs e) - { - - - } - private void btnAll_Click(object sender, EventArgs e) { LoadData(); @@ -102,11 +92,41 @@ namespace SYS.FormUI public void LoadRoomInfo() { - lblCanUse.Text = new RoomService().SelectCanUseRoomAllByRoomState().ToString(); - lblCheck.Text = new RoomService().SelectNotUseRoomAllByRoomState().ToString(); - lblNotClear.Text = new RoomService().SelectNotClearRoomAllByRoomState().ToString(); - lblFix.Text = new RoomService().SelectFixingRoomAllByRoomState().ToString(); - lblReser.Text = new RoomService().SelectReseredRoomAllByRoomState().ToString(); + result = HttpHelper.Request("Room/SelectCanUseRoomAllByRoomState"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCanUseRoomAllByRoomState+接口服务异常,请提交Issue!"); + return; + } + lblCanUse.Text = result.message.ToString(); + result = HttpHelper.Request("Room/SelectNotUseRoomAllByRoomState"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNotUseRoomAllByRoomState+接口服务异常,请提交Issue!"); + return; + } + lblCheck.Text = result.message.ToString(); + result = HttpHelper.Request("Room/SelectNotClearRoomAllByRoomState"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectNotClearRoomAllByRoomState+接口服务异常,请提交Issue!"); + return; + } + lblNotClear.Text = result.message.ToString(); + result = HttpHelper.Request("Room/SelectFixingRoomAllByRoomState"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectFixingRoomAllByRoomState+接口服务异常,请提交Issue!"); + return; + } + lblFix.Text = result.message.ToString(); + result = HttpHelper.Request("Room/SelectReseredRoomAllByRoomState"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectReseredRoomAllByRoomState+接口服务异常,请提交Issue!"); + return; + } + lblReser.Text = result.message.ToString(); lblRoomNo.Text = ucRoomList.co_RoomNo; lblCustoNo.Text = ucRoomList.co_CustoNo; lblRoomPosition.Text = ucRoomList.co_RoomPosition; @@ -119,11 +139,27 @@ namespace SYS.FormUI flpRoom.Controls.Clear(); if (string.IsNullOrEmpty(typeName)) { - romsty = new RoomService().SelectRoomAll(); + result = HttpHelper.Request("Room/SelectRoomAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomAll+接口服务异常,请提交Issue!"); + return; + } + romsty = HttpHelper.JsonToList(result.message); } else { - romsty = new RoomService().SelectRoomByTypeName(typeName); + dic =new Dictionary() + { + { "TypeName",typeName} + }; + result = HttpHelper.Request("Room/SelectRoomByTypeName",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByTypeName+接口服务异常,请提交Issue!"); + return; + } + romsty = HttpHelper.JsonToList(result.message); } for (int i = 0; i < romsty.Count; i++) { @@ -140,16 +176,11 @@ namespace SYS.FormUI lblRoomState.Text = ""; lblCustoNo.Text = ""; lblCheckTime.Text = ""; - lblCanUse.Text = new RoomService().SelectCanUseRoomAllByRoomState().ToString(); - lblCheck.Text = new RoomService().SelectNotUseRoomAllByRoomState().ToString(); - lblNotClear.Text = new RoomService().SelectNotClearRoomAllByRoomState().ToString(); - lblFix.Text = new RoomService().SelectFixingRoomAllByRoomState().ToString(); - lblReser.Text = new RoomService().SelectReseredRoomAllByRoomState().ToString(); + LoadRoomInfo(); } private void btnBS_Click(object sender, EventArgs e) { - LoadData(btnBS.Text); } @@ -178,11 +209,20 @@ namespace SYS.FormUI LoadData(); } - private void LoadRoomByState(int stateid) { flpRoom.Controls.Clear(); - romsty = new RoomService().SelectRoomByRoomState(stateid); + dic = new Dictionary() + { + { "stateid",stateid.ToString()} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomState", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByRoomState+接口服务异常,请提交Issue!"); + return; + } + romsty = HttpHelper.JsonToList(result.message); for (int i = 0; i < romsty.Count; i++) { romt = new ucRoomList(); diff --git a/SYS.FormUI/AppFunction/FrmRoomMap.cs b/SYS.FormUI/AppFunction/FrmRoomMap.cs index 1347de135b5d962f535763db971551c62ef67421..c0a4066cf0fde0768b0983344e4b3b5bfcc960af 100644 --- a/SYS.FormUI/AppFunction/FrmRoomMap.cs +++ b/SYS.FormUI/AppFunction/FrmRoomMap.cs @@ -21,8 +21,10 @@ *SOFTWARE. * */ + using Sunny.UI; using SYS.Application; +using SYS.Common; using SYS.Core; using System; using System.Collections.Generic; @@ -51,7 +53,13 @@ namespace SYS.FormUI.AppFunction public void LoadRoom() { flpRoom.Controls.Clear(); - List rooms = new RoomService().SelectRoomAll(); + var result = HttpHelper.Request("Room/SelectRoomAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomAll+接口服务异常,请提交Issue!"); + return; + } + List rooms = HttpHelper.JsonToList(result.message); for (int i = 0; i < rooms.Count; i++) { romt = new ucRoomList(); diff --git a/SYS.FormUI/AppFunction/FrmRoomStateManager.cs b/SYS.FormUI/AppFunction/FrmRoomStateManager.cs index b2239db917ba17eb625a3c9c3df6a6fca770f93a..2997fe152e634027dc58e69ff7eda90e95401090 100644 --- a/SYS.FormUI/AppFunction/FrmRoomStateManager.cs +++ b/SYS.FormUI/AppFunction/FrmRoomStateManager.cs @@ -26,6 +26,8 @@ using System.Windows.Forms; using SYS.Core; using Sunny.UI; using SYS.Application; +using System.Collections.Generic; +using SYS.Common; namespace SYS.FormUI { @@ -36,11 +38,20 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + #region 窗体加载事件 private void FrmRoomStateManager_Load(object sender, EventArgs e) { txtRoomNo.Text = ucRoomList.rm_RoomNo; - cboState.DataSource = new RoomService().SelectRoomStateAll(); + result = HttpHelper.Request("Room/SelectRoomStateAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomStateAll+接口服务异常,请提交Issue!"); + return; + } + cboState.DataSource = HttpHelper.JsonToList(result.message); cboState.DisplayMember = "RoomStateName"; cboState.ValueMember = "RoomStateId"; cboState.SelectedIndex = 0; @@ -59,7 +70,18 @@ namespace SYS.FormUI case 2: case 3: case 4: - if (new RoomService().UpdateRoomStateByRoomNo(txtRoomNo.Text, cboState.SelectedIndex) == true) + dic = new Dictionary() + { + { "roomno",txtRoomNo.Text}, + { "stateid",cboState.SelectedIndex.ToString()} + }; + result = HttpHelper.Request("Room/UpdateRoomStateByRoomNo",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateRoomStateByRoomNo+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) { UIMessageBox.Show("房间" + txtRoomNo.Text + "成功修改为" + cboState.Text, "修改提示", UIStyle.Green); FrmRoomManager.Reload(""); diff --git a/SYS.FormUI/AppFunction/FrmSelectCustoInfo.cs b/SYS.FormUI/AppFunction/FrmSelectCustoInfo.cs index d2a905ab6c862302eefb0423516d34b1ec672109..9d08ce65e1fa69a3e53c29e72fc3e47c08855027 100644 --- a/SYS.FormUI/AppFunction/FrmSelectCustoInfo.cs +++ b/SYS.FormUI/AppFunction/FrmSelectCustoInfo.cs @@ -27,6 +27,7 @@ using SYS.Core; using Sunny.UI; using System.Collections.Generic; using SYS.Application; +using SYS.Common; namespace SYS.FormUI { @@ -37,6 +38,9 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + #region 存放客户信息类 public static string co_CustoNo; public static string co_RoomNo; @@ -53,7 +57,13 @@ namespace SYS.FormUI private void FrmSelectCustoInfo_Load(object sender, EventArgs e) { #region 加载客户类型信息 - List lstSourceGrid = new BaseService().SelectCustoTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectCustoTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCustoTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List lstSourceGrid = HttpHelper.JsonToList(result.message); this.cbCustoType.DataSource = lstSourceGrid; this.cbCustoType.DisplayMember = "TypeName"; this.cbCustoType.ValueMember = "UserType"; @@ -62,7 +72,13 @@ namespace SYS.FormUI #endregion #region 加载证件类型信息 - List passPorts = new BaseService().SelectPassPortTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectPassPortTypeAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectPassPortTypeAllCanUse+接口服务异常,请提交Issue!"); + return; + } + List passPorts = HttpHelper.JsonToList(result.message); this.cbPassportType.DataSource = passPorts; this.cbPassportType.DisplayMember = "PassportName"; this.cbPassportType.ValueMember = "PassportId"; @@ -70,7 +86,13 @@ namespace SYS.FormUI #endregion #region 加载性别信息 - List listSexType = new BaseService().SelectSexTypeAll(new SexType { delete_mk = 0 }); + result = HttpHelper.Request("Base/SelectSexTypeAll?delete_mk=0"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSexTypeAll+接口服务异常,请提交Issue!"); + return; + } + List listSexType = HttpHelper.JsonToList(result.message); this.cbSex.DataSource = listSexType; this.cbSex.DisplayMember = "sexName"; this.cbSex.ValueMember = "sexId"; @@ -78,7 +100,17 @@ namespace SYS.FormUI #endregion txtCustoNo.Text = ucRoomList.rm_CustoNo; - Custo c = new CustoService().SelectCardInfoByCustoNo(txtCustoNo.Text); + dic = new Dictionary() + { + { "CustoNo",txtCustoNo.Text.Trim()} + }; + result = HttpHelper.Request("Custo/SelectCardInfoByCustoNo",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectCardInfoByCustoNo+接口服务异常,请提交Issue!"); + return; + } + Custo c = HttpHelper.JsonToModel(result.message); txtCustoAdress.Text = c.CustoAdress; txtCustoName.Text = c.CustoName; txtCardID.Text = c.CustoID; @@ -86,7 +118,7 @@ namespace SYS.FormUI cbSex.Text = c.CustoSex == 1 ? "男" : "女"; cbCustoType.SelectedIndex = c.CustoType; cbPassportType.SelectedIndex = c.PassportType; - dtpBirthday.Value = c.CustoBirth; + dtpBirthday.Value = Convert.ToDateTime(c.CustoBirth); } } } diff --git a/SYS.FormUI/AppFunction/FrmSellThing.cs b/SYS.FormUI/AppFunction/FrmSellThing.cs index acac7ccbd1f4d87ad48f39b878c57c075e8ca863..eebd056629afdb2c47e268ca0f572c8572bdde05 100644 --- a/SYS.FormUI/AppFunction/FrmSellThing.cs +++ b/SYS.FormUI/AppFunction/FrmSellThing.cs @@ -31,15 +31,20 @@ using SYS.Application; using SYS.Common; using jvncorelib_fr.EntityLib; using System.Linq; +using System.Collections; +using Microsoft.Office.Interop.Excel; namespace SYS.FormUI { public partial class FrmSellThing : Sunny.UI.UIForm { private int rs = 0;//用于判断房间是否可消费 - static string roomNo; + Dictionary dic = null; + ResponseMsg result = null; + Room r = null; + public FrmSellThing() { InitializeComponent(); @@ -48,8 +53,13 @@ namespace SYS.FormUI #region 窗体加载事件 private void FrmSellThing_Load(object sender, EventArgs e) { - - List roms = new RoomService().SelectRoomByStateAll(); + result = HttpHelper.Request("Room/SelectRoomByStateAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByStateAll+接口服务异常,请提交Issue!"); + return; + } + List roms = HttpHelper.JsonToList(result.message); for (int i = 0; i < roms.Count; i++) { txtRoomNo.AutoCompleteCustomSource.Add(roms[i].RoomNo); @@ -66,24 +76,42 @@ namespace SYS.FormUI } #endregion - #region 查询文本框更改事件 private void LoadThingByName() { - - List lstSource = new SellService().SelectSellThingAll(new SellThing { SellNo = txtFind.Text.Trim(), SellName = txtFind.Text.Trim() }); + dic = new Dictionary() + { + { "SellNo",txtFind.Text.Trim()}, + {"SellName", txtFind.Text.Trim()} + }; + result = HttpHelper.Request("Sellthing/SelectSellThingAll",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingAll+接口服务异常,请提交Issue!"); + return; + } + List lstSource = HttpHelper.JsonToList(result.message); this.dgvSellthing.DataSource = lstSource; this.dgvSellthing.AutoGenerateColumns = false; } #endregion - #region 根据客户编号加载消费信息的方法 private void LoadSpendInfoByRoomNo(string room) { + dic = new Dictionary() + { + { "No",room} + }; + result = HttpHelper.Request("Spend/SelectSpendByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSpendByRoomNo+接口服务异常,请提交Issue!"); + return; + } this.dgvRoomSell.AutoGenerateColumns = false; - List lstSource = new SpendService().SelectSpendByRoomNo(room); + List lstSource = HttpHelper.JsonToList(result.message); this.dgvRoomSell.DataSource = lstSource; } #endregion @@ -91,7 +119,13 @@ namespace SYS.FormUI #region 商品加载事件方法 public void LoadSellThingInfo() { - List lstSource = new SellService().SelectSellThingAll(); + result = HttpHelper.Request("Sellthing/SelectSellThingAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingAll+接口服务异常,请提交Issue!"); + return; + } + List lstSource = HttpHelper.JsonToList(result.message); this.dgvSellthing.AutoGenerateColumns = false; this.dgvSellthing.DataSource = lstSource; @@ -135,12 +169,9 @@ namespace SYS.FormUI } #endregion - Room r = null; - #region 添加事件 private void btnAdd_Click(object sender, EventArgs e) { - if (lblState.Visible == false) { UIMessageBox.Show("请先输入消费的房间!", "提示信息", UIStyle.Red); @@ -155,11 +186,40 @@ namespace SYS.FormUI { if (CheckInput()) { - List st = new SellService().SelectSellThingAll(new SellThing { SellNo = txtSellNo.Text.Trim() }) ; - r = new RoomService().SelectRoomByRoomNo(txtRoomNo.Text); - var listSource = new SpendService().SelectSpendInfoRoomNo(txtRoomNo.Text.Trim()); + dic = new Dictionary() + { + { "SellNo",txtSellNo.Text.Trim()} + }; + result = HttpHelper.Request("Sellthing/SelectSellThingAll",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingAll+接口服务异常,请提交Issue!"); + return; + } + List st = HttpHelper.JsonToList(result.message); + dic = new Dictionary() + { + { "no",txtRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByRoomNo+接口服务异常,请提交Issue!"); + return; + } + r = HttpHelper.JsonToModel(result.message); + dic = new Dictionary() + { + { "RoomNo",txtRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Spend/SelectSpendInfoRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSpendInfoRoomNo+接口服务异常,请提交Issue!"); + return; + } + var listSource = HttpHelper.JsonToList(result.message); Spend s = null; - listSource = new SpendService().SelectSpendInfoRoomNo(txtRoomNo.Text.Trim()); if (!listSource.IsNullOrEmpty()) { var sellthing = listSource.FirstOrDefault(a => a.SpendName.Equals(txtSellName.Text)); @@ -176,10 +236,22 @@ namespace SYS.FormUI SpendTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")), MoneyState = SpendConsts.UnSettle, }; - if (new SpendService().UpdSpenInfo(s)) + result = HttpHelper.Request("Spend/UpdSpenInfo", HttpHelper.ModelToJson(s)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdSpenInfo+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) { var stock = ((decimal)st.First().Stock - (decimal)nudNum.Value); - bool n = new SellService().UpdateSellthingInfo(new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }); + var sellThing = new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }; + result = HttpHelper.Request("Sellthing/UpdateSellthingInfo", HttpHelper.ModelToJson(sellThing)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSellthingInfo+接口服务异常,请提交Issue!"); + return; + } UIMessageBox.Show("添加成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK, true); LoadSpendInfoByRoomNo(r.RoomNo); LoadSellThingInfo(); @@ -201,11 +273,23 @@ namespace SYS.FormUI SpendTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")), MoneyState = SpendConsts.UnSettle, }; - bool m = new SpendService().InsertSpendInfo(s); - if (m == true) + result = HttpHelper.Request("Spend​/InsertSpendInfo", HttpHelper.ModelToJson(s)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertSpendInfo+接口服务异常,请提交Issue!"); + return; + } + bool m = result.message.ToString().Equals("true"); + if (m) { var stock = ((decimal)st.First().Stock - (decimal)nudNum.Value); - bool n = new SellService().UpdateSellthingInfo(new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }); + var sellThing = new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }; + result = HttpHelper.Request("Sellthing/UpdateSellthingInfo", HttpHelper.ModelToJson(sellThing)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSellthingInfo+接口服务异常,请提交Issue!"); + return; + } UIMessageBox.Show("添加成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK, true); LoadSpendInfoByRoomNo(r.RoomNo); LoadSellThingInfo(); @@ -235,11 +319,23 @@ namespace SYS.FormUI SpendTime = Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")), MoneyState = SpendConsts.UnSettle, }; - bool m = new SpendService().InsertSpendInfo(s); - if (m == true) + result = HttpHelper.Request("Spend​/InsertSpendInfo", HttpHelper.ModelToJson(s)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertSpendInfo+接口服务异常,请提交Issue!"); + return; + } + bool m = result.message.ToString().Equals("true"); + if (m) { var stock = ((decimal)st.First().Stock - (decimal)nudNum.Value); - bool n = new SellService().UpdateSellthingInfo(new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }); + var sellThing = new SellThing { SellName = st.First().SellName, SellPrice = st.First().SellPrice, Stock = stock, SellNo = st.First().SellNo, format = st.First().format }; + result = HttpHelper.Request("Sellthing/UpdateSellthingInfo", HttpHelper.ModelToJson(sellThing)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSellthingInfo+接口服务异常,请提交Issue!"); + return; + } UIMessageBox.Show("添加成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK, true); LoadSpendInfoByRoomNo(r.RoomNo); LoadSellThingInfo(); @@ -281,12 +377,41 @@ namespace SYS.FormUI string custoNo = dgvRoomSell.SelectedRows[0].Cells["clCustoNo"].Value.ToString(); string name = dgvRoomSell.SelectedRows[0].Cells["clSpendName"].Value.ToString(); string price = dgvRoomSell.SelectedRows[0].Cells["clSpendPrice"].Value.ToString(); - SellThing s = new SellService().SelectSellThingByNameAndPrice(name, price); + dic = new Dictionary() + { + { "name",name}, + { "price",price} + }; + result = HttpHelper.Request("Sellthing/SelectSellThingByNameAndPrice", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingByNameAndPrice+接口服务异常,请提交Issue!"); + return; + } + SellThing s = HttpHelper.JsonToModel(result.message); decimal num = Convert.ToDecimal(dgvRoomSell.SelectedRows[0].Cells["clSpendAmount"].Value.ToString()); string Stock = (s.Stock + num).ToString(); - if (new SellService().DeleteSellThing(txtRoomNo.Text, custoNo, name) == true) + dic = new Dictionary() + { + { "roomNo",txtRoomNo.Text.Trim()}, + { "custoNo",custoNo}, + { "sellName",name} + }; + result = HttpHelper.Request("Sellthing/DeleteSellThing", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DeleteSellThing+接口服务异常,请提交Issue!"); + return; + } + if (result.message.ToString().Equals("true")) { - bool n = new SellService().UpdateSellthingInfo(new SellThing { SellName = s.SellName, SellPrice = s.SellPrice, Stock = s.Stock, SellNo = s.SellNo, format = s.format }); + var sellThing = new SellThing { SellName = s.SellName, SellPrice = s.SellPrice, Stock = s.Stock, SellNo = s.SellNo, format = s.format }; + result = HttpHelper.Request("Sellthing/UpdateSellthingInfo", HttpHelper.ModelToJson(sellThing)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSellthingInfo+接口服务异常,请提交Issue!"); + return; + } UIMessageTip.ShowOk("撤销成功!", 1000); #region 获取添加操作日志所需的信息 RecordHelper.Record(LoginInfo.WorkerNo + "-" + LoginInfo.WorkerName + "在" + DateTime.Now + "位于" + LoginInfo.SoftwareVersion + "执行:" + "帮助" + custoNo + "撤销了消费商品:" + txtSellName.Text + "操作!", 2); @@ -346,13 +471,23 @@ namespace SYS.FormUI private void btnCheck_Click(object sender, EventArgs e) { - string room = txtRoomNo.Text; + string room = txtRoomNo.Text.Trim(); if (string.IsNullOrWhiteSpace(room) == true) { UIMessageTip.ShowWarning("请输入消费房间号!",1000); return; } - Room r = new RoomService().SelectRoomByRoomNo(room); + dic = new Dictionary() + { + { "no",room} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectRoomByRoomNo+接口服务异常,请提交Issue!"); + return; + } + Room r = HttpHelper.JsonToModel(result.message); if (txtRoomNo.Text == "") { lblState.Text = ""; diff --git a/SYS.FormUI/AppFunction/FrmSellThingManager.cs b/SYS.FormUI/AppFunction/FrmSellThingManager.cs index f50b185004a1b4447a9873ce28b0951e3e7ca0ee..96b8fa68ad5bde56c2a13fc5ed17be3f4847b5c3 100644 --- a/SYS.FormUI/AppFunction/FrmSellThingManager.cs +++ b/SYS.FormUI/AppFunction/FrmSellThingManager.cs @@ -22,13 +22,15 @@ * */ using System; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using SYS.FormUI.Properties; using SYS.Application; using Sunny.UI; using SYS.Common; +using System.Collections.Generic; +using System.Linq; namespace SYS.FormUI { @@ -41,28 +43,56 @@ namespace SYS.FormUI public static SellThing st; + Dictionary dic = null; + ResponseMsg result = null; + public void LoadData() { + result = HttpHelper.Request("Sellthing/SelectSellThingAll"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingAll+接口服务异常,请提交Issue!"); + return; + } dgvSellthing.AutoGenerateColumns = false; - dgvSellthing.DataSource = new SellService().SelectSellThingAll(); + dgvSellthing.DataSource = HttpHelper.JsonToList(result.message); } private void FrmSellThingManager_Load(object sender, EventArgs e) { - string SellId = new CounterHelper().GetNewId(CounterRuleConsts.SellId); + string SellId = Util.GetListNewId("ST",3,1,"-").FirstOrDefault(); txtSellNo.Text = SellId; - dgvSellthing.AutoGenerateColumns = false; - dgvSellthing.DataSource = new SellService().SelectSellThingAll(); + LoadData(); } private void btnFind_Click(object sender, EventArgs e) { - dgvSellthing.DataSource = new SellService().SelectSellThingAll(new SellThing { SellNo = txtFind.Text.Trim(), SellName = txtFind.Text.Trim() }); + dic= new Dictionary() + { + {"SellNo",txtFind.Text.Trim() }, + { "SellName",txtFind.Text.Trim()} + }; + result = HttpHelper.Request("Sellthing/SelectSellThingAll",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellThingAll+接口服务异常,请提交Issue!"); + return; + } + dgvSellthing.DataSource = HttpHelper.JsonToList(result.message); } private void btnDeleteSellThing_Click(object sender, EventArgs e) { - bool n = new SellService().DeleteSellThingBySellNo(txtSellNo.Text.Trim()); + dic = new Dictionary() + { + { "sellNo",txtSellNo.Text.Trim()} + }; + result = HttpHelper.Request("Sellthing/DeleteSellThingBySellNo", null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("DeleteSellThingBySellNo+接口服务异常,请提交Issue!"); + return; + } UIMessageBox.ShowSuccess("删除商品成功!"); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "删除商品操作!删除值为:" + st.SellNo, 2); @@ -106,30 +136,48 @@ namespace SYS.FormUI }; if (CheckInput(st)) { - var SellThing = new SellService().SelectSellInfoBySellNo(st.SellNo); + dic = new Dictionary() + { + { "SellNo",st.SellNo} + }; + result = HttpHelper.Request("Sellthing/SelectSellInfoBySellNo",null,dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectSellInfoBySellNo+接口服务异常,请提交Issue!"); + return; + } + var SellThing = HttpHelper.JsonToModel(result.message); if (SellThing != null && SellThing.SellName.Equals(st.SellName) && SellThing.format.Equals(st.format)) { UIMessageBox.ShowError("信息已存在,请检查!"); return; } - - new SellService().InsertSellThing(st); - UIMessageBox.Show("添加商品成功","系统提示",UIStyle.Green,UIMessageBoxButtons.OK); + result = HttpHelper.Request("Sellthing​/InsertSellThing", HttpHelper.ModelToJson(st)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertSellThing+接口服务异常,请提交Issue!"); + return; + } + if (!result.ToString().Equals("true")) + { + UIMessageBox.Show("添加商品失败", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); + return; + } + UIMessageBox.Show("添加商品成功", "系统提示", UIStyle.Green, UIMessageBoxButtons.OK); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "新增商品操作!新增值为:" + st.SellNo, 2); #endregion LoadData(); - string SellId = new CounterHelper().GetNewId("SellId"); + string SellId = Util.GetListNewId("ST",3,1,"-").FirstOrDefault(); txtSellNo.Text = SellId; } else { UIMessageBox.ShowError("信息不完整,请检查!"); - return; - string SellId = new CounterHelper().GetNewId("SellId"); + string SellId = Util.GetListNewId("ST", 3, 1, "-").FirstOrDefault(); txtSellNo.Text = SellId; + return; } - } private void dgvSellthing_CellClick(object sender, DataGridViewCellEventArgs e) @@ -164,7 +212,17 @@ namespace SYS.FormUI }; if (CheckInput(st)) { - new SellService().UpdateSellthingInfo(st); + result = HttpHelper.Request("Sellthing​/UpdateSellthingInfo", HttpHelper.ModelToJson(st)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("UpdateSellthingInfo+接口服务异常,请提交Issue!"); + return; + } + if (!result.message.ToString().Equals("true")) + { + UIMessageBox.Show("修改商品失败", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); + return; + } UIMessageBox.Show("修改商品成功","系统提示",UIStyle.Green,UIMessageBoxButtons.OK); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "修改商品操作!修改值为:" + st.SellNo, 2); diff --git a/SYS.FormUI/AppFunction/FrmUnLockSystem.cs b/SYS.FormUI/AppFunction/FrmUnLockSystem.cs index f6db13bba86d022433b445f464387c81c44a2d33..5aeabd9a7a7259f49a2cec410719239c1d98001f 100644 --- a/SYS.FormUI/AppFunction/FrmUnLockSystem.cs +++ b/SYS.FormUI/AppFunction/FrmUnLockSystem.cs @@ -22,6 +22,7 @@ * */ using System; +using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Reflection; @@ -70,9 +71,22 @@ namespace SYS.FormUI } + Dictionary dic = null; + ResponseMsg result = null; + private void btnUnLock_Click(object sender, EventArgs e) { - var account = new AdminService().SelectAdminPwdByAccount(AdminInfo.Account); + dic= new Dictionary() + { + { "account",AdminInfo.Account.Trim()} + }; + result = HttpHelper.Request("Admin/SelectAdminPwdByAccount", null, dic); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectAdminPwdByAccount+接口服务异常,请提交Issue!"); + return; + } + var account = HttpHelper.JsonToModel(result.message); if (account != null) { if (account.AdminPassword != txtUnLockPwd.Text.Trim()) @@ -85,8 +99,6 @@ namespace SYS.FormUI this.Close(); string regPath = System.Windows.Forms.Application.StartupPath + @"\启用任务管理器.reg"; ExecuteReg(regPath); - - } } diff --git a/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs b/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs index 9e2d1c04d327b8497da59ec34a1765a698000578..9d38fd116398a80422963ba346a6039051a533f0 100644 --- a/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs +++ b/SYS.FormUI/AppFunction/FrmUpLoadNotice.cs @@ -22,12 +22,15 @@ * */ using System; -using MySql.Data.MySqlClient; + using System.Windows.Forms; using SYS.Core; using SYS.Application; using Sunny.UI; using SYS.Common; +using System.Linq; + +using System.Collections.Generic; namespace SYS.FormUI { @@ -38,6 +41,9 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + public bool CheckInput(string Content) { if (string.IsNullOrWhiteSpace(Content)) @@ -58,7 +64,7 @@ namespace SYS.FormUI { Notice notice = new Notice() { - NoticeNo = new CounterHelper().GetNewId(CounterRuleConsts.NoticeId), + NoticeNo = Util.GetListNewId("UP",3,1,"-").FirstOrDefault(), Noticetheme = txtNoticeTheme.Text.Trim(), NoticeContent = rtbNoticeContent.Html, NoticeTime = dtpUpLoadDate.Value, @@ -76,8 +82,17 @@ namespace SYS.FormUI notice.NoticeTypeName = "GeneralNotice"; break; } - - bool n = new NoticeService().InsertNotice(notice); + result = HttpHelper.Request("Notice​/InsertNotice", HttpHelper.ModelToJson(notice)); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("InsertNotice+接口服务异常,请提交Issue!"); + return; + } + if (!result.message.ToString().Equals("true")) + { + UIMessageBox.Show("上传失败!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); + return; + } UIMessageBox.ShowSuccess("上传成功!"); #region 获取添加操作日志所需的信息 RecordHelper.Record(AdminInfo.Account + "-" + AdminInfo.Name + "在" + DateTime.Now + "位于" + AdminInfo.SoftwareVersion + "执行:" + "上传公告操作!新增值为:" + notice.NoticeNo, 2); @@ -105,20 +120,17 @@ namespace SYS.FormUI private void FrmUpLoad_Load(object sender, EventArgs e) { - cboSelectClub.DataSource = new BaseService().SelectDeptAll(); + result = HttpHelper.Request("Base/SelectDeptAllCanUse"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("SelectDeptAllCanUse+接口服务异常,请提交Issue!"); + return; + } + //加载部门信息 + cboSelectClub.DataSource = HttpHelper.JsonToList(result.message); cboSelectClub.DisplayMember = "dept_name"; cboSelectClub.ValueMember = "dept_no"; } - - private void dgvNoticeList_CellClick(object sender, DataGridViewCellEventArgs e) - { - //txtUpLoadNo.Text = dgvNoticeList.SelectedRows[0].Cells["clNoticeNo"].Value.ToString(); - //txtNoticeTheme.Text = dgvNoticeList.SelectedRows[0].Cells["clNoticetheme"].Value.ToString(); - //rtbNoticeContent.Text = dgvNoticeList.SelectedRows[0].Cells["clNoticeContent"].Value.ToString(); - //cboSelectClub.Text= dgvNoticeList.SelectedRows[0].Cells["clNoticeClub"].ToString(); - //txtNoticePerson.Text= dgvNoticeList.SelectedRows[0].Cells["clNoticePerson"].ToString(); - } - } } diff --git a/SYS.FormUI/AppFunction/FrmVipRule.cs b/SYS.FormUI/AppFunction/FrmVipRule.cs index 6ee49f12fea8c85c5746c0a039d63094aeb42ccd..1072e8b2ca244454ef35729f858376909c7d1263 100644 --- a/SYS.FormUI/AppFunction/FrmVipRule.cs +++ b/SYS.FormUI/AppFunction/FrmVipRule.cs @@ -1,6 +1,6 @@ -using Sunny.UI; + +using Sunny.UI; using SYS.Application; -using SYS.Application.Zero; using SYS.Common; using SYS.Core; using SYS.FormUI.Properties; @@ -11,6 +11,7 @@ using System.Data; using System.Drawing; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; @@ -23,17 +24,25 @@ namespace SYS.FormUI InitializeComponent(); } + ResponseMsg result = new ResponseMsg(); + private void FrmVipRule_Load(object sender, EventArgs e) { #region 加载客户类型信息 - List lstSourceGrid = new BaseService().SelectCustoTypeAllCanUse(); + result = HttpHelper.Request("Base/SelectCustoTypeAllCanUse", null, null); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectCustoTypeAllCanUse+接口服务异常,请提交issue"); + return; + } + List lstSourceGrid = HttpHelper.JsonToList(result.message); this.cboCustoType.DataSource = lstSourceGrid; this.cboCustoType.DisplayMember = "TypeName"; this.cboCustoType.ValueMember = "UserType"; this.cboCustoType.SelectedIndex = 0; #endregion //生成流水号 - txtRuleId.Text = new CounterHelper().GetNewId(CounterRuleConsts.VipRuleId); + txtRuleId.Text = Util.GetListNewId("VR", 3, 1, "-").FirstOrDefault(); LoadVipType(); } @@ -43,7 +52,13 @@ namespace SYS.FormUI public void LoadVipType() { flpVipType.Clear(); - var listVipTypes = new VipRuleAppService().SelectVipRuleList(); + result = HttpHelper.Request("VipRule/SelectVipRuleList"); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectVipRuleList+接口服务异常,请提交issue"); + return; + } + var listVipTypes = HttpHelper.JsonToList(result.message); listVipTypes.ForEach(vipType => { ucVipType ucVipType = new ucVipType(); @@ -72,7 +87,13 @@ namespace SYS.FormUI datains_usr = AdminInfo.Account, datains_date = DateTime.Now }; - return new VipRuleAppService().AddVipRule(vipRule1); + result = HttpHelper.Request("VipRule/AddVipRule",HttpHelper.ModelToJson(vipRule1)); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("AddVipRule+接口服务异常,请提交issue"); + return false; + } + return true; } private void btnOK_Click(object sender, EventArgs e) diff --git a/SYS.FormUI/AppFunction/FrmWorkerCheckInfo.cs b/SYS.FormUI/AppFunction/FrmWorkerCheckInfo.cs index d10082809f5755dda4b183b1f0d9036b1d22c40c..92199880343053ddd237b42e61af9c436ca5e6b6 100644 --- a/SYS.FormUI/AppFunction/FrmWorkerCheckInfo.cs +++ b/SYS.FormUI/AppFunction/FrmWorkerCheckInfo.cs @@ -23,7 +23,10 @@ */ using Sunny.UI; using SYS.Application; +using SYS.Common; +using SYS.Core; using System; +using System.Collections.Generic; using System.Windows.Forms; namespace SYS.FormUI @@ -36,13 +39,24 @@ namespace SYS.FormUI } - + Dictionary dic = null; + ResponseMsg result = null; private void FrmWorkerCheckInfo_Load(object sender, EventArgs e) { - lblWorkerInfo.Text = "以下为员工编号:" + FrmChangeWorker.wk_WorkerNo + "员工姓名:" + FrmChangeWorker.wk_WorkerName + "的所有打卡考勤记录:"; + lblWorkerInfo.Text = "以下为员工:" + FrmChangeWorker.wk_WorkerNo + "-员工姓名:" + FrmChangeWorker.wk_WorkerName + "的所有打卡考勤记录:"; + dic= new Dictionary() + { + { "wid",FrmChangeWorker.wk_WorkerNo} + }; + result = HttpHelper.Request("WorkerCheck/SelectCheckInfoByWorkerNo", null, dic); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectCheckInfoByWorkerNo+接口服务异常,请提交issue"); + return; + } DgvCheckInfoList.AutoGenerateColumns = false; - DgvCheckInfoList.DataSource = new WorkerCheckService().SelectCheckInfoByWorkerNo(FrmChangeWorker.wk_WorkerNo); + DgvCheckInfoList.DataSource = HttpHelper.JsonToList(result.message); } private void btnClose_Click(object sender, EventArgs e) diff --git a/SYS.FormUI/AppFunction/FrmWorkerManager.cs b/SYS.FormUI/AppFunction/FrmWorkerManager.cs index c36445adc25bdb8e39f2fdb3b45a37856f65e0c3..eca6a18301b7458812cf1793e54b2c71730c1001 100644 --- a/SYS.FormUI/AppFunction/FrmWorkerManager.cs +++ b/SYS.FormUI/AppFunction/FrmWorkerManager.cs @@ -22,6 +22,7 @@ * */ using System; +using System.Collections.Generic; using System.ComponentModel; using System.Windows.Forms; using Sunny.UI; @@ -61,10 +62,19 @@ namespace SYS.FormUI Reload = LoadWorker; } + Dictionary dic = null; + ResponseMsg result = null; + private void LoadWorker() { + result = HttpHelper.Request("Worker/SelectWorkerAll"); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectWorkerAll+接口服务异常,请提交issue"); + return; + } dgvWorkerList.AutoGenerateColumns = false; - dgvWorkerList.DataSource = new WorkerService().SelectWorkerAll(); + dgvWorkerList.DataSource = HttpHelper.JsonToList(result.message); } private void FrmTopChange_Load(object sender, EventArgs e) diff --git a/SYS.FormUI/AppFunction/FrmWtiInfo.cs b/SYS.FormUI/AppFunction/FrmWtiInfo.cs index 14ac3e14417748ab71ef3bcdf70ee79aca1ae529..eb3aef40575cc86925ec75892a06e31b2fa37697 100644 --- a/SYS.FormUI/AppFunction/FrmWtiInfo.cs +++ b/SYS.FormUI/AppFunction/FrmWtiInfo.cs @@ -22,6 +22,7 @@ * */ using System; +using System.Collections.Generic; using System.Windows.Forms; using Sunny.UI; using SYS.Application; @@ -37,6 +38,9 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + #region 窗体加载事件 private void WtiInfo_Load(object sender, EventArgs e) { @@ -57,8 +61,14 @@ namespace SYS.FormUI /// private void LoadWtiInfo() { + result = HttpHelper.Request("Wti/SelectWtiInfoAll"); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectWtiInfoAll+接口服务异常,请提交issue"); + return; + } //将水电费信息加载到Dgv - dgvWti.DataSource = new WtiService().SelectWtiInfoAll(); + dgvWti.DataSource = HttpHelper.JsonToList(result.message); dgvWti.AutoGenerateColumns = false; } #endregion @@ -78,7 +88,16 @@ namespace SYS.FormUI datachg_usr = AdminInfo.Account, datachg_date = DateTime.Now }; - new WtiService().UpdateWtiInfo(wti); + result = HttpHelper.Request("Wti/UpdateWtiInfo",HttpHelper.ModelToJson(wti)); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("UpdateWtiInfo+接口服务异常,请提交issue"); + return; + } + if (!result.message.ToString().Equals("true")) + { + UIMessageTip.ShowError("修改失败!", 1500); + } UIMessageTip.ShowOk("修改成功!", 1500); pnlWtiInfo.Visible = false; LoadWtiInfo(); diff --git a/SYS.FormUI/AppInterface/FrmAdminEnter.cs b/SYS.FormUI/AppInterface/FrmAdminEnter.cs index 32d05f7eb37b02a5ee49780c15d69e5c5cd1934f..f486664fc06d19cb9adb6f59530f5fc381291e92 100644 --- a/SYS.FormUI/AppInterface/FrmAdminEnter.cs +++ b/SYS.FormUI/AppInterface/FrmAdminEnter.cs @@ -31,6 +31,8 @@ using SYS.Common; using System.Net; using System.Diagnostics; +using System.Collections.Generic; + namespace SYS.FormUI { public partial class FrmAdminEnter : UIForm @@ -40,6 +42,9 @@ namespace SYS.FormUI InitializeComponent(); } + Dictionary dic = null; + ResponseMsg result = null; + private void btnCheckIn_Click(object sender, EventArgs e) { string account = txtAccount.Text.Trim();//获取超管账号 @@ -49,8 +54,15 @@ namespace SYS.FormUI UIMessageDialog.ShowErrorDialog(this, "错误提示", "账号或密码包含除字母数字外的字符,请检查!", UIStyle.Red); return; } + Admin admin = new Admin() { AdminAccount = account, AdminPassword = pass }; - Admin a = new AdminService().SelectMangerByPass(admin); + result = HttpHelper.Request("Admin/SelectMangerByPass", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectMangerByPass+接口服务异常,请提交issue"); + return; + } + Admin a = HttpHelper.JsonToModel(result.message); if (a != null)//判断超管是否存在 { //判断当前管理员是否被禁用 @@ -70,7 +82,7 @@ namespace SYS.FormUI FrmBackgroundSystem fm = new FrmBackgroundSystem(); fm.ShowDialog(this);//打开主窗体 this.Hide();//隐藏登录窗体 - + } else { diff --git a/SYS.FormUI/AppInterface/FrmLoading.cs b/SYS.FormUI/AppInterface/FrmLoading.cs index 45f581eec44124569129fce30b0fa6fee67409ff..d2b114b1dd013d883fdf122504c805121c0a87ff 100644 --- a/SYS.FormUI/AppInterface/FrmLoading.cs +++ b/SYS.FormUI/AppInterface/FrmLoading.cs @@ -1,4 +1,5 @@ using Sunny.UI; +using SYS.Common; using SYS.Core; using System; using System.Collections.Generic; @@ -42,10 +43,18 @@ namespace SYS.FormUI this.Close(); } + ResponseMsg result = new ResponseMsg(); + #region 判断版本号 private void CheckUpdate() { - var newversion = new ApplicationVersionUtil().CheckBaseVersion(); + result = HttpHelper.Request("App/CheckBaseVersion"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("CheckBaseVersion+接口服务异常,请提交Issue!"); + return; + } + var newversion = HttpHelper.JsonToModel(result.message); string version = System.Windows.Forms.Application.ProductVersion.ToString(); if (newversion.base_version != version) diff --git a/SYS.FormUI/AppInterface/FrmLogin.Designer.cs b/SYS.FormUI/AppInterface/FrmLogin.Designer.cs index 21af7bdcb0bb641194e3b1cd15e95df092705023..9d29c6e9582fb039684e072bed77346eea928e2f 100644 --- a/SYS.FormUI/AppInterface/FrmLogin.Designer.cs +++ b/SYS.FormUI/AppInterface/FrmLogin.Designer.cs @@ -88,6 +88,7 @@ this.txtWorkerId.Style = Sunny.UI.UIStyle.Custom; this.txtWorkerId.TabIndex = 16; this.txtWorkerId.Text = "WK010"; + this.txtWorkerId.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; // // txtWorkerPwd // @@ -109,6 +110,7 @@ this.txtWorkerPwd.Style = Sunny.UI.UIStyle.Custom; this.txtWorkerPwd.TabIndex = 17; this.txtWorkerPwd.Text = "admin"; + this.txtWorkerPwd.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; // // btnLoginBackSystem // diff --git a/SYS.FormUI/AppInterface/FrmLogin.cs b/SYS.FormUI/AppInterface/FrmLogin.cs index 74b654edf8515e6b43970acc4514ba283b4f962f..5d7630fb29edc15d029d02986a8fa2863394ee39 100644 --- a/SYS.FormUI/AppInterface/FrmLogin.cs +++ b/SYS.FormUI/AppInterface/FrmLogin.cs @@ -50,6 +50,8 @@ namespace SYS.FormUI #endregion } + ResponseMsg result = new ResponseMsg(); + #region 记录鼠标和窗体坐标的方法 private Point mouseOld;//鼠标旧坐标 private Point formOld;//窗体旧坐标 @@ -162,7 +164,18 @@ namespace SYS.FormUI if (CheckInput())//检验输入完整性 { Worker worker = new Worker() { WorkerId = txtWorkerId.Text.Trim(), WorkerPwd = txtWorkerPwd.Text.Trim() }; - Worker w = new WorkerService().SelectWorkerInfoByWorkerIdAndWorkerPwd(worker); + + result = HttpHelper.Request("Worker/SelectWorkerInfoByWorkerIdAndWorkerPwd", HttpHelper.ModelToJson(worker)); + + if (result.statusCode != 200) + { + UIMessageBox.Show("账号或密码错误!", "来自小T提示", UIStyle.Red); + txtWorkerPwd.Focus();//聚焦 + return; + } + + Worker w = HttpHelper.JsonToModel(result.message); + if (w != null)//判断员工编号是否存在 { if (w.delete_mk == 1) @@ -188,10 +201,10 @@ namespace SYS.FormUI } } } - catch(Exception ex) + catch (Exception ex) { - Console.WriteLine(ex); - //UIMessageBox.Show("服务器维护中,请稍后再试!", "温馨提示", UIStyle.Red); + //Console.WriteLine(ex); + UIMessageBox.Show("服务器维护中,请稍后再试!", "温馨提示", UIStyle.Red); } } #endregion diff --git a/SYS.FormUI/AppMain/FrmBackgroundSystem.cs b/SYS.FormUI/AppMain/FrmBackgroundSystem.cs index 6455fb5634d57034c1d5baab14a29d4e8e5fcbdb..6b11cd41d2c738bdbcc9f2b9c5214cdac0f902e4 100644 --- a/SYS.FormUI/AppMain/FrmBackgroundSystem.cs +++ b/SYS.FormUI/AppMain/FrmBackgroundSystem.cs @@ -21,6 +21,7 @@ *SOFTWARE. * */ + using Sunny.UI; using SYS.Application; using SYS.Common; @@ -59,6 +60,9 @@ namespace SYS.FormUI this.Text = string.Empty; } + Dictionary dic = null; + ResponseMsg result = null; + private void FrmBackgroundSystem_Load(object sender, EventArgs e) { this.Owner.Close(); @@ -293,10 +297,16 @@ namespace SYS.FormUI public void LoadModule() { Admin admin = new Admin() { AdminAccount = AdminInfo.Account }; - List moduleZeros = new AdminModuleZeroService().GetAllModuleByAdmin(admin); + result = HttpHelper.Request("Module/GetAllModuleByAdmin", HttpHelper.ModelToJson(admin)); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("GetAllModuleByAdmin+接口服务异常,请提交issue"); + return; + } + List moduleZeros = HttpHelper.JsonToList(result.message); for (int i = 0; i <= Aside.Nodes.Count; i++) { - var moduleZero = moduleZeros.FirstOrDefault(a => a.module_name.Split('|','|').FirstOrDefault().Equals(Aside.Nodes[i].Name.ToString())); + var moduleZero = moduleZeros.FirstOrDefault(a => a.module_name.Split('|', '|').FirstOrDefault().Equals(Aside.Nodes[i].Name.ToString())); if (moduleZero == null) { Aside.Nodes[i].Remove(); @@ -307,8 +317,6 @@ namespace SYS.FormUI break; } } - - } private void btnLocked_MouseHover(object sender, EventArgs e) diff --git a/SYS.FormUI/AppMain/FrmMain.cs b/SYS.FormUI/AppMain/FrmMain.cs index 36a3b58d1da4ebd8e4a3500520735cd87b98901b..97ca1aba9b1275e4cfea73305ddd96dc49203807 100644 --- a/SYS.FormUI/AppMain/FrmMain.cs +++ b/SYS.FormUI/AppMain/FrmMain.cs @@ -35,7 +35,6 @@ using System.Management; using SYS.Application; using SYS.Common; using SYS.FormUI.AppUserControls; -using jvncorelib_fr.EntityLib; namespace SYS.FormUI { @@ -74,6 +73,7 @@ namespace SYS.FormUI public static StarUseList CloseMy; + ResponseMsg result = new ResponseMsg(); public void StopUseExit() { @@ -125,31 +125,6 @@ namespace SYS.FormUI } #endregion - #region 定时器:获取网络时间 - private void tmrDate_Tick(object sender, EventArgs e) - { - lblTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm"); - - DateTime tmCur = DateTime.Now; - - if (tmCur.Hour < 8 || tmCur.Hour > 18) - {//晚上 - label3.Text = "(*´▽`)ノノ晚上好," + LoginInfo.WorkerName; - btnHello.BackgroundImage = Resources.月亮; - } - else if (tmCur.Hour > 8 && tmCur.Hour < 12) - {//上午 - label3.Text = "上午好," + LoginInfo.WorkerName; - btnHello.BackgroundImage = Resources.早上; - } - else - {//下午 - label3.Text = "下午好," + LoginInfo.WorkerName; - btnHello.BackgroundImage = Resources.咖啡; - } - } - #endregion - #region 获取网络时间 public static string GetNetDateTime() { @@ -187,14 +162,54 @@ namespace SYS.FormUI } #endregion - #region 从数据库读取文字滚动的内容 - List fonts = new FontsService().SelectFontAll(); - int fontn = 0; + #region 定时器:获取网络时间 + private void tmrDate_Tick(object sender, EventArgs e) + { + lblTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm"); + + DateTime tmCur = DateTime.Now; + + if (tmCur.Hour < 8 || tmCur.Hour > 18) + {//晚上 + label3.Text = "(*´▽`)ノノ晚上好," + LoginInfo.WorkerName; + btnHello.BackgroundImage = Resources.月亮; + } + else if (tmCur.Hour > 8 && tmCur.Hour < 12) + {//上午 + label3.Text = "上午好," + LoginInfo.WorkerName; + btnHello.BackgroundImage = Resources.早上; + } + else + {//下午 + label3.Text = "下午好," + LoginInfo.WorkerName; + btnHello.BackgroundImage = Resources.咖啡; + } + } #endregion + List fonts = null; + int fontn = 0; + private void LoadFonts() + { + #region 从数据库读取文字滚动的内容 + result = HttpHelper.Request("Fonts/SelectFontAll"); + if (result.statusCode != 200) + { + fonts = null; + } + + fonts = HttpHelper.JsonToList(result.message); + #endregion + } + #region 定时器:文字滚动间隔 private void tmrFont_Tick(object sender, EventArgs e) { + if (fonts.IsNullOrEmpty()) + { + lblScroll.Text = "接口服务异常"; + return; + } fontn++; if (fontn == fonts.Count) { @@ -280,9 +295,16 @@ namespace SYS.FormUI /// private void LoadNavBar() { + var listSource = new List(); #region 菜单导航代码块 + result = HttpHelper.Request("NavBar/NavBarList"); + if (result.statusCode != 200) + { + listSource = null; + return; + } flpNav.Controls.Clear(); - var listSource = new NavBarService().NavBarList(); + listSource = HttpHelper.JsonToList(result.message); ucNavBar ucNavBar = null; if (!listSource.IsNullOrEmpty()) { @@ -326,6 +348,8 @@ namespace SYS.FormUI LoadNavBar(); + LoadFonts(); + lblTime.Text = DateTime.Now.ToString("yyyy-MM-dd HH:mm"); DateTime tmCur = DateTime.Now; @@ -346,8 +370,16 @@ namespace SYS.FormUI btnHello.BackgroundImage = Resources.咖啡; } SetClassLong(this.Handle, GCL_STYLE, GetClassLong(this.Handle, GCL_STYLE) | CS_DropSHADOW); //API函数加载,实现窗体边框阴影效果 - - int n = Convert.ToInt32(new WorkerCheckService().SelectToDayCheckInfoByWorkerNo(LoginInfo.WorkerNo)); + + Dictionary user = new Dictionary(); + user.Add("wkn", LoginInfo.WorkerNo); + result = HttpHelper.Request("WorkerCheck/SelectToDayCheckInfoByWorkerNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("打卡接口异常,请提交issue"); + return; + } + int n = Convert.ToInt32(result.message); if (n > 0) { linkLabel1.Text = "已打卡"; @@ -361,10 +393,6 @@ namespace SYS.FormUI frm1.TopLevel = false; pnlMID.Controls.Add(frm1); frm1.Show(); - - - - } #endregion @@ -382,9 +410,17 @@ namespace SYS.FormUI #region 检查软件更新版本事件方法 private void tsmiCheckUpdate_Click(object sender, EventArgs e) { - var tempUrl = new BaseService().GetBase(); + result = HttpHelper.Request("Base/GetBase"); + if (result.statusCode != 200) + { + UIMessageBox.ShowError("接口服务异常,请重试"); + return; + } + + Base _base = HttpHelper.JsonToModel(result.message); + //调用系统默认的浏览器 - System.Diagnostics.Process.Start(tempUrl.url_addr); + System.Diagnostics.Process.Start(_base.url_addr); } #endregion @@ -426,21 +462,35 @@ namespace SYS.FormUI private void linkLabel1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { - int n = Convert.ToInt32(new WorkerCheckService().SelectToDayCheckInfoByWorkerNo(LoginInfo.WorkerNo)); + Dictionary user = new Dictionary(); + user.Add("wkn", LoginInfo.WorkerNo); + result = HttpHelper.Request("WorkerCheck/SelectToDayCheckInfoByWorkerNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("打卡接口异常,请提交issue"); + return; + } + int n = Convert.ToInt32(result.message); if (n > 0) { linkLabel1.Text = "已打卡"; linkLabel1.ForeColor = Color.Green; linkLabel1.LinkColor = Color.Green; pnlCheckInfo.Visible = true; - lblCheckDay.Text = Convert.ToString(new WorkerCheckService().SelectWorkerCheckDaySumByWorkerNo(LoginInfo.WorkerNo)); + result = HttpHelper.Request("WorkerCheck/SelectWorkerCheckDaySumByWorkerNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("打卡接口异常,请提交issue"); + return; + } + lblCheckDay.Text = Convert.ToString(result.message); } else { linkLabel1.Text = "未打卡"; linkLabel1.ForeColor = Color.Red; linkLabel1.LinkColor = Color.Red; - bool dr = UIMessageBox.Show("你今天还未打卡哦,请先打卡吧!", "打卡提醒",UIStyle.Blue, UIMessageBoxButtons.OK); + bool dr = UIMessageBox.Show("你今天还未打卡哦,请先打卡吧!", "打卡提醒", UIStyle.Blue, UIMessageBoxButtons.OK); if (dr == true) { WorkerCheck workerCheck = new WorkerCheck @@ -451,11 +501,23 @@ namespace SYS.FormUI datains_usr = LoginInfo.WorkerNo, datains_date = DateTime.Now }; - bool j = new WorkerCheckService().AddCheckInfo(workerCheck); - if (j == true) + result = HttpHelper.Request("WorkerCheck/AddCheckInfo", workerCheck.ModelToJson(), null); + if (result.statusCode != 200) { - lblCheckDay.Text = Convert.ToString(new WorkerCheckService().SelectWorkerCheckDaySumByWorkerNo(LoginInfo.WorkerNo)); - UIMessageBox.Show("打卡成功!你已共打卡" + lblCheckDay.Text + "天,再接再厉吧!", "打卡提醒",UIStyle.Green, UIMessageBoxButtons.OK); + UIMessageTip.ShowError("打卡接口异常,请提交issue"); + return; + } + bool j = result.statusCode == 200 ? true : false; + if (j) + { + result = HttpHelper.Request("WorkerCheck/SelectWorkerCheckDaySumByWorkerNo", null, user); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("打卡接口异常,请提交issue"); + return; + } + lblCheckDay.Text = Convert.ToString(result.message); + UIMessageBox.Show("打卡成功!你已共打卡" + lblCheckDay.Text + "天,再接再厉吧!", "打卡提醒", UIStyle.Green, UIMessageBoxButtons.OK); linkLabel1.Text = "已打卡"; linkLabel1.ForeColor = Color.Green; linkLabel1.LinkColor = Color.Green; @@ -465,13 +527,11 @@ namespace SYS.FormUI } else { - UIMessageBox.Show("服务器错误,请稍后再试!", "系统提示", UIStyle.Red,UIMessageBoxButtons.OK); + UIMessageBox.Show("服务器错误,请稍后再试!", "系统提示", UIStyle.Red, UIMessageBoxButtons.OK); return; } } } - - } private void lblClose_Click(object sender, EventArgs e) diff --git a/SYS.FormUI/AppUserControls/ucBaseInformation.Designer.cs b/SYS.FormUI/AppUserControls/ucBaseInformation.Designer.cs deleted file mode 100644 index ac5d5c7ad287d79845859842bbbe30ac434392ef..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucBaseInformation.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ - -namespace SYS.FormUI -{ - partial class ucBaseInformation - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ucBaseInformation)); - this.btnOperation = new Sunny.UI.UIButton(); - this.lbName = new Sunny.UI.UITextBox(); - this.SuspendLayout(); - // - // btnOperation - // - this.btnOperation.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnOperation.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOperation.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(29)))), ((int)(((byte)(35))))); - this.btnOperation.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOperation.Location = new System.Drawing.Point(34, 4); - this.btnOperation.Margin = new System.Windows.Forms.Padding(0); - this.btnOperation.MinimumSize = new System.Drawing.Size(1, 1); - this.btnOperation.Name = "btnOperation"; - this.btnOperation.Radius = 20; - this.btnOperation.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); - this.btnOperation.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.btnOperation.Size = new System.Drawing.Size(44, 26); - this.btnOperation.Style = Sunny.UI.UIStyle.Custom; - this.btnOperation.StyleCustomMode = true; - this.btnOperation.TabIndex = 15; - this.btnOperation.Text = "删除"; - this.btnOperation.SizeChanged += new System.EventHandler(this.btnOperation_SizeChanged); - this.btnOperation.Click += new System.EventHandler(this.btnOperation_Click); - // - // lbName - // - this.lbName.BackColor = System.Drawing.Color.Transparent; - this.lbName.Cursor = System.Windows.Forms.Cursors.IBeam; - this.lbName.Enabled = false; - this.lbName.FillColor = System.Drawing.Color.White; - this.lbName.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.lbName.FocusedSelectAll = true; - this.lbName.Font = new System.Drawing.Font("微软雅黑", 12F); - this.lbName.Location = new System.Drawing.Point(6, 35); - this.lbName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.lbName.Maximum = 2147483647D; - this.lbName.Minimum = -2147483648D; - this.lbName.MinimumSize = new System.Drawing.Size(1, 1); - this.lbName.Name = "lbName"; - this.lbName.Padding = new System.Windows.Forms.Padding(5); - this.lbName.Radius = 20; - this.lbName.ReadOnly = true; - this.lbName.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.lbName.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.lbName.Size = new System.Drawing.Size(74, 29); - this.lbName.Style = Sunny.UI.UIStyle.Custom; - this.lbName.TabIndex = 17; - this.lbName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - this.lbName.MouseLeave += new System.EventHandler(this.lbName_MouseLeave); - this.lbName.MouseHover += new System.EventHandler(this.lbName_MouseHover); - this.lbName.Validated += new System.EventHandler(this.lbName_Validated); - // - // ucBaseInformation - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.Controls.Add(this.lbName); - this.Controls.Add(this.btnOperation); - this.DoubleBuffered = true; - this.Name = "ucBaseInformation"; - this.Size = new System.Drawing.Size(86, 66); - this.Tag = ""; - this.Load += new System.EventHandler(this.ucBaseInformation_Load); - this.SizeChanged += new System.EventHandler(this.ucBaseInformation_SizeChanged); - this.Layout += new System.Windows.Forms.LayoutEventHandler(this.ucBaseInformation_Layout); - this.Resize += new System.EventHandler(this.ucBaseInformation_Resize); - this.ResumeLayout(false); - - } - - #endregion - public Sunny.UI.UIButton btnOperation; - public Sunny.UI.UITextBox lbName; - } -} diff --git a/SYS.FormUI/AppUserControls/ucBaseInformation.cs b/SYS.FormUI/AppUserControls/ucBaseInformation.cs deleted file mode 100644 index b7010ce002da2b778272e1c44e721c5d7a30190c..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucBaseInformation.cs +++ /dev/null @@ -1,111 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace SYS.FormUI -{ - public partial class ucBaseInformation : UserControl - { - - - public ucBaseInformation() - { - InitializeComponent(); - } - - private void ucBaseInformation_Load(object sender, EventArgs e) - { - } - - private void btnOperation_SizeChanged(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - } - - private void ucBaseInformation_SizeChanged(object sender, EventArgs e) - { - this.Width = 130; - this.Height = 90; - lbName.Width = 70; - lbName.Height = 20; - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void ucBaseInformation_Resize(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - this.Width = 130; - this.Height = 90; - } - - private void ucBaseInformation_Layout(object sender, LayoutEventArgs e) - { - - } - - private void btnOperation_Click(object sender, EventArgs e) - { - if (btnOperation.Text == "恢复") - { - FrmNation.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmNation.Accessed(); - return; - } - FrmNation.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmNation.operation(); - return; - } - - private void lbName_MouseLeave(object sender, EventArgs e) - { - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void lbName_MouseHover(object sender, EventArgs e) - { - //lbName.Enabled = true; - //lbName.ReadOnly = false; - } - - private void lbName_Validated(object sender, EventArgs e) - { - - } - } -} diff --git a/SYS.FormUI/AppUserControls/ucBaseInformation.resx b/SYS.FormUI/AppUserControls/ucBaseInformation.resx deleted file mode 100644 index 90ec49eb51ed03991e305a8398c7817c18fc3e06..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucBaseInformation.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - True - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAS5JREFUWEft - lr+uAUEYxfcN9k994xG4NY1WIoJEf2udiFJotEqtXryD5/A0nDOOtWSyO0IuxXeSXybzzXdmjzW7RF+h - JEnaYAFOgSxkdUrTtBbH8cbT54W99MjuAmxRXGFkkBD24E92+hn+oLUQ2LuU3W3AZG1NK0UzN9GUc3dx - TSvF3qLfAlgAC2AB3hIAb9KRppXitYr+fEMtlIJ3eBfjEWNddvobgB9iwJ4AGHgm+0Uo9rkQQpZlTdly - oc4Q3n4PQ9lMN+G2BH8F4Fe2XKgNH3rK6Ml2EQqvHsIpOKHWufaVwIPKAzuV3W3wr48he4v+twR40s87 - YQEsgAWwAHcB1mCuhRD2D6/iHnAhQoB3d/d/AL/vP1iYAG5SCTZoyZoLtbGv1wcuvpLt04qiM/cKDdw4 - ayEsAAAAAElFTkSuQmCC - - - \ No newline at end of file diff --git a/SYS.FormUI/AppUserControls/ucEducationInformation.Designer.cs b/SYS.FormUI/AppUserControls/ucEducationInformation.Designer.cs deleted file mode 100644 index 771e687fdac47a9e7e85e1195729902caec89cfa..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucEducationInformation.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ - -namespace SYS.FormUI -{ - partial class ucEducationInformation - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ucBaseInformation)); - this.btnOperation = new Sunny.UI.UIButton(); - this.lbName = new Sunny.UI.UITextBox(); - this.SuspendLayout(); - // - // btnOperation - // - this.btnOperation.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnOperation.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOperation.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(29)))), ((int)(((byte)(35))))); - this.btnOperation.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOperation.Location = new System.Drawing.Point(34, 4); - this.btnOperation.Margin = new System.Windows.Forms.Padding(0); - this.btnOperation.MinimumSize = new System.Drawing.Size(1, 1); - this.btnOperation.Name = "btnOperation"; - this.btnOperation.Radius = 20; - this.btnOperation.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); - this.btnOperation.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.btnOperation.Size = new System.Drawing.Size(44, 26); - this.btnOperation.Style = Sunny.UI.UIStyle.Custom; - this.btnOperation.StyleCustomMode = true; - this.btnOperation.TabIndex = 15; - this.btnOperation.Text = "删除"; - this.btnOperation.SizeChanged += new System.EventHandler(this.btnOperation_SizeChanged); - this.btnOperation.Click += new System.EventHandler(this.btnOperation_Click); - // - // lbName - // - this.lbName.BackColor = System.Drawing.Color.Transparent; - this.lbName.Cursor = System.Windows.Forms.Cursors.IBeam; - this.lbName.Enabled = false; - this.lbName.FillColor = System.Drawing.Color.White; - this.lbName.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.lbName.FocusedSelectAll = true; - this.lbName.Font = new System.Drawing.Font("微软雅黑", 12F); - this.lbName.Location = new System.Drawing.Point(6, 35); - this.lbName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.lbName.Maximum = 2147483647D; - this.lbName.Minimum = -2147483648D; - this.lbName.MinimumSize = new System.Drawing.Size(1, 1); - this.lbName.Name = "lbName"; - this.lbName.Padding = new System.Windows.Forms.Padding(5); - this.lbName.Radius = 20; - this.lbName.ReadOnly = true; - this.lbName.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.lbName.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.lbName.Size = new System.Drawing.Size(74, 29); - this.lbName.Style = Sunny.UI.UIStyle.Custom; - this.lbName.TabIndex = 17; - this.lbName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - this.lbName.MouseLeave += new System.EventHandler(this.lbName_MouseLeave); - this.lbName.MouseHover += new System.EventHandler(this.lbName_MouseHover); - this.lbName.Validated += new System.EventHandler(this.lbName_Validated); - // - // ucBaseInformation - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.Controls.Add(this.lbName); - this.Controls.Add(this.btnOperation); - this.DoubleBuffered = true; - this.Name = "ucBaseInformation"; - this.Size = new System.Drawing.Size(86, 66); - this.Tag = ""; - this.Load += new System.EventHandler(this.ucBaseInformation_Load); - this.SizeChanged += new System.EventHandler(this.ucBaseInformation_SizeChanged); - this.Layout += new System.Windows.Forms.LayoutEventHandler(this.ucBaseInformation_Layout); - this.Resize += new System.EventHandler(this.ucBaseInformation_Resize); - this.ResumeLayout(false); - - } - - #endregion - public Sunny.UI.UIButton btnOperation; - public Sunny.UI.UITextBox lbName; - } -} diff --git a/SYS.FormUI/AppUserControls/ucEducationInformation.cs b/SYS.FormUI/AppUserControls/ucEducationInformation.cs deleted file mode 100644 index 33c5b6706d64fd14d05c45e5f16f5c6e061275f4..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucEducationInformation.cs +++ /dev/null @@ -1,112 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace SYS.FormUI -{ - public partial class ucEducationInformation : UserControl - { - - - public ucEducationInformation() - { - InitializeComponent(); - } - - private void ucBaseInformation_Load(object sender, EventArgs e) - { - } - - private void btnOperation_SizeChanged(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - } - - private void ucBaseInformation_SizeChanged(object sender, EventArgs e) - { - this.Width = 130; - this.Height = 90; - lbName.Width = 70; - lbName.Height = 20; - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void ucBaseInformation_Resize(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - this.Width = 130; - this.Height = 90; - } - - private void ucBaseInformation_Layout(object sender, LayoutEventArgs e) - { - - } - - private void btnOperation_Click(object sender, EventArgs e) - { - if (btnOperation.Text == "恢复") - { - FrmEducation.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmEducation.Accessed(); - return; - } - FrmEducation.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmEducation.operation(); - return; - } - - private void lbName_MouseLeave(object sender, EventArgs e) - { - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void lbName_MouseHover(object sender, EventArgs e) - { - //lbName.Enabled = true; - //lbName.ReadOnly = false; - } - - private void lbName_Validated(object sender, EventArgs e) - { - //FrmEducation.info = lbName.Text.ToString(); - //FrmEducation.insert(); - } - } -} diff --git a/SYS.FormUI/AppUserControls/ucEducationInformation.resx b/SYS.FormUI/AppUserControls/ucEducationInformation.resx deleted file mode 100644 index 90ec49eb51ed03991e305a8398c7817c18fc3e06..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucEducationInformation.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - True - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAS5JREFUWEft - lr+uAUEYxfcN9k994xG4NY1WIoJEf2udiFJotEqtXryD5/A0nDOOtWSyO0IuxXeSXybzzXdmjzW7RF+h - JEnaYAFOgSxkdUrTtBbH8cbT54W99MjuAmxRXGFkkBD24E92+hn+oLUQ2LuU3W3AZG1NK0UzN9GUc3dx - TSvF3qLfAlgAC2AB3hIAb9KRppXitYr+fEMtlIJ3eBfjEWNddvobgB9iwJ4AGHgm+0Uo9rkQQpZlTdly - oc4Q3n4PQ9lMN+G2BH8F4Fe2XKgNH3rK6Ml2EQqvHsIpOKHWufaVwIPKAzuV3W3wr48he4v+twR40s87 - YQEsgAWwAHcB1mCuhRD2D6/iHnAhQoB3d/d/AL/vP1iYAG5SCTZoyZoLtbGv1wcuvpLt04qiM/cKDdw4 - ayEsAAAAAElFTkSuQmCC - - - \ No newline at end of file diff --git a/SYS.FormUI/AppUserControls/ucPositionInformation.Designer.cs b/SYS.FormUI/AppUserControls/ucPositionInformation.Designer.cs deleted file mode 100644 index 12af0b2c5eaf20c1448a4c559848bc01b292aa93..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucPositionInformation.Designer.cs +++ /dev/null @@ -1,113 +0,0 @@ - -namespace SYS.FormUI -{ - partial class ucPositionInformation - { - /// - /// 必需的设计器变量。 - /// - private System.ComponentModel.IContainer components = null; - - /// - /// 清理所有正在使用的资源。 - /// - /// 如果应释放托管资源,为 true;否则为 false。 - protected override void Dispose(bool disposing) - { - if (disposing && (components != null)) - { - components.Dispose(); - } - base.Dispose(disposing); - } - - #region 组件设计器生成的代码 - - /// - /// 设计器支持所需的方法 - 不要修改 - /// 使用代码编辑器修改此方法的内容。 - /// - private void InitializeComponent() - { - System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ucBaseInformation)); - this.btnOperation = new Sunny.UI.UIButton(); - this.lbName = new Sunny.UI.UITextBox(); - this.SuspendLayout(); - // - // btnOperation - // - this.btnOperation.Anchor = System.Windows.Forms.AnchorStyles.None; - this.btnOperation.Cursor = System.Windows.Forms.Cursors.Hand; - this.btnOperation.FillColor = System.Drawing.Color.FromArgb(((int)(((byte)(199)))), ((int)(((byte)(29)))), ((int)(((byte)(35))))); - this.btnOperation.FillHoverColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.FillSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(255)))), ((int)(((byte)(128)))), ((int)(((byte)(128))))); - this.btnOperation.Font = new System.Drawing.Font("微软雅黑", 9F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(134))); - this.btnOperation.Location = new System.Drawing.Point(34, 4); - this.btnOperation.Margin = new System.Windows.Forms.Padding(0); - this.btnOperation.MinimumSize = new System.Drawing.Size(1, 1); - this.btnOperation.Name = "btnOperation"; - this.btnOperation.Radius = 20; - this.btnOperation.RectSelectedColor = System.Drawing.Color.FromArgb(((int)(((byte)(128)))), ((int)(((byte)(255)))), ((int)(((byte)(128))))); - this.btnOperation.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.btnOperation.Size = new System.Drawing.Size(44, 26); - this.btnOperation.Style = Sunny.UI.UIStyle.Custom; - this.btnOperation.StyleCustomMode = true; - this.btnOperation.TabIndex = 15; - this.btnOperation.Text = "删除"; - this.btnOperation.SizeChanged += new System.EventHandler(this.btnOperation_SizeChanged); - this.btnOperation.Click += new System.EventHandler(this.btnOperation_Click); - // - // lbName - // - this.lbName.BackColor = System.Drawing.Color.Transparent; - this.lbName.Cursor = System.Windows.Forms.Cursors.IBeam; - this.lbName.Enabled = false; - this.lbName.FillColor = System.Drawing.Color.White; - this.lbName.FillDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.lbName.FocusedSelectAll = true; - this.lbName.Font = new System.Drawing.Font("微软雅黑", 12F); - this.lbName.Location = new System.Drawing.Point(6, 35); - this.lbName.Margin = new System.Windows.Forms.Padding(4, 5, 4, 5); - this.lbName.Maximum = 2147483647D; - this.lbName.Minimum = -2147483648D; - this.lbName.MinimumSize = new System.Drawing.Size(1, 1); - this.lbName.Name = "lbName"; - this.lbName.Padding = new System.Windows.Forms.Padding(5); - this.lbName.Radius = 20; - this.lbName.ReadOnly = true; - this.lbName.RectDisableColor = System.Drawing.Color.FromArgb(((int)(((byte)(80)))), ((int)(((byte)(160)))), ((int)(((byte)(255))))); - this.lbName.RectSides = System.Windows.Forms.ToolStripStatusLabelBorderSides.None; - this.lbName.Size = new System.Drawing.Size(74, 29); - this.lbName.Style = Sunny.UI.UIStyle.Custom; - this.lbName.TabIndex = 17; - this.lbName.TextAlignment = System.Drawing.ContentAlignment.MiddleLeft; - this.lbName.MouseLeave += new System.EventHandler(this.lbName_MouseLeave); - this.lbName.MouseHover += new System.EventHandler(this.lbName_MouseHover); - this.lbName.Validated += new System.EventHandler(this.lbName_Validated); - // - // ucBaseInformation - // - this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 12F); - this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(235)))), ((int)(((byte)(243)))), ((int)(((byte)(255))))); - this.BackgroundImage = ((System.Drawing.Image)(resources.GetObject("$this.BackgroundImage"))); - this.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None; - this.Controls.Add(this.lbName); - this.Controls.Add(this.btnOperation); - this.DoubleBuffered = true; - this.Name = "ucBaseInformation"; - this.Size = new System.Drawing.Size(86, 66); - this.Tag = ""; - this.Load += new System.EventHandler(this.ucBaseInformation_Load); - this.SizeChanged += new System.EventHandler(this.ucBaseInformation_SizeChanged); - this.Layout += new System.Windows.Forms.LayoutEventHandler(this.ucBaseInformation_Layout); - this.Resize += new System.EventHandler(this.ucBaseInformation_Resize); - this.ResumeLayout(false); - - } - - #endregion - public Sunny.UI.UIButton btnOperation; - public Sunny.UI.UITextBox lbName; - } -} diff --git a/SYS.FormUI/AppUserControls/ucPositionInformation.cs b/SYS.FormUI/AppUserControls/ucPositionInformation.cs deleted file mode 100644 index ee6b5803c2bc4cbac12860c6c5278ec1b00641ca..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucPositionInformation.cs +++ /dev/null @@ -1,120 +0,0 @@ -/* - * MIT License - *Copyright (c) 2021 咖啡与网络(java-and-net) - - *Permission is hereby granted, free of charge, to any person obtaining a copy - *of this software and associated documentation files (the "Software"), to deal - *in the Software without restriction, including without limitation the rights - *to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - *copies of the Software, and to permit persons to whom the Software is - *furnished to do so, subject to the following conditions: - - *The above copyright notice and this permission notice shall be included in all - *copies or substantial portions of the Software. - - *THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - *IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - *FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - *AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - *LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - *OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - *SOFTWARE. - * - */ -using SYS.Core; -using System; -using System.Collections.Generic; -using System.ComponentModel; -using System.Data; -using System.Drawing; -using System.Linq; -using System.Text; -using System.Threading.Tasks; -using System.Windows.Forms; - -namespace SYS.FormUI -{ - public partial class ucPositionInformation : UserControl - { - - - public ucPositionInformation() - { - InitializeComponent(); - } - - private void ucBaseInformation_Load(object sender, EventArgs e) - { - } - - private void btnOperation_SizeChanged(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - } - - private void ucBaseInformation_SizeChanged(object sender, EventArgs e) - { - this.Width = 130; - this.Height = 90; - lbName.Width = 70; - lbName.Height = 20; - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void ucBaseInformation_Resize(object sender, EventArgs e) - { - btnOperation.Width = 63; - btnOperation.Height = 26; - this.Width = 130; - this.Height = 90; - } - - private void ucBaseInformation_Layout(object sender, LayoutEventArgs e) - { - - } - - private void btnOperation_Click(object sender, EventArgs e) - { - if (btnOperation.Text == "恢复") - { - FrmPosition.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmPosition.Accessed(); - return; - } - if (btnOperation.Text == "新增") - { - lbName.Enabled = true; - lbName.ReadOnly = false; - return; - } - FrmPosition.info = lbName.Text.Replace("名称:", string.Empty).ToString(); - FrmPosition.operation(); - return; - } - - private void lbName_MouseLeave(object sender, EventArgs e) - { - //lbName.Enabled = false; - //lbName.ReadOnly = true; - lbName.FillColor = Color.FromArgb(235, 243, 255); - lbName.FillDisableColor = Color.FromArgb(235, 243, 255); - lbName.RectColor = Color.FromArgb(235, 243, 255); - } - - private void lbName_MouseHover(object sender, EventArgs e) - { - //lbName.Enabled = true; - //lbName.ReadOnly = false; - } - - private void lbName_Validated(object sender, EventArgs e) - { - //FrmPosition.info = lbName.Text.ToString(); - //FrmPosition.insert(); - } - } -} diff --git a/SYS.FormUI/AppUserControls/ucPositionInformation.resx b/SYS.FormUI/AppUserControls/ucPositionInformation.resx deleted file mode 100644 index 90ec49eb51ed03991e305a8398c7817c18fc3e06..0000000000000000000000000000000000000000 --- a/SYS.FormUI/AppUserControls/ucPositionInformation.resx +++ /dev/null @@ -1,141 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - True - - - True - - - True - - - - - iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAABGdBTUEAALGPC/xhBQAAAS5JREFUWEft - lr+uAUEYxfcN9k994xG4NY1WIoJEf2udiFJotEqtXryD5/A0nDOOtWSyO0IuxXeSXybzzXdmjzW7RF+h - JEnaYAFOgSxkdUrTtBbH8cbT54W99MjuAmxRXGFkkBD24E92+hn+oLUQ2LuU3W3AZG1NK0UzN9GUc3dx - TSvF3qLfAlgAC2AB3hIAb9KRppXitYr+fEMtlIJ3eBfjEWNddvobgB9iwJ4AGHgm+0Uo9rkQQpZlTdly - oc4Q3n4PQ9lMN+G2BH8F4Fe2XKgNH3rK6Ml2EQqvHsIpOKHWufaVwIPKAzuV3W3wr48he4v+twR40s87 - YQEsgAWwAHcB1mCuhRD2D6/iHnAhQoB3d/d/AL/vP1iYAG5SCTZoyZoLtbGv1wcuvpLt04qiM/cKDdw4 - ayEsAAAAAElFTkSuQmCC - - - \ No newline at end of file diff --git a/SYS.FormUI/AppUserControls/ucRoom.cs b/SYS.FormUI/AppUserControls/ucRoom.cs index ea0f9b7f0a9149a5b658186dd3c47e7c8f99f0bc..adab67c13ce0d17a7438e767bfd4f1f07e55f161 100644 --- a/SYS.FormUI/AppUserControls/ucRoom.cs +++ b/SYS.FormUI/AppUserControls/ucRoom.cs @@ -1,5 +1,6 @@ using Sunny.UI; using SYS.Application; +using SYS.Common; using SYS.Core; using System; using System.Collections.Generic; @@ -40,6 +41,9 @@ namespace SYS.FormUI this.CanPenetrate(); } + Dictionary dic = null; + ResponseMsg result = null; + #region 存放房间信息类 public static string rm_RoomNo; public static string rm_CustoNo; @@ -150,7 +154,17 @@ namespace SYS.FormUI Room r = null; private void cmsControlPanel_Opening(object sender, CancelEventArgs e) { - r = new RoomService().SelectRoomByRoomNo(leRoomNo.Text); + dic = new Dictionary() + { + { "no",leRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectRoomByRoomNo+接口服务异常,请提交issue"); + return; + } + r = HttpHelper.JsonToModel(result.message); if (!r.CustoNo.IsNullOrEmpty()) { tsmiCheckIn.Enabled = false; @@ -242,7 +256,17 @@ namespace SYS.FormUI { if (leCustoNo.Text.IsNullOrEmpty()) { - Room r = new RoomService().SelectRoomByRoomNo(leRoomNo.Text); + dic = new Dictionary() + { + { "no",leRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectRoomByRoomNo+接口服务异常,请提交issue"); + return; + } + Room r = HttpHelper.JsonToModel(result.message); if (r.RoomStateId == 0) { rm_RoomNo = leRoomNo.Text; @@ -283,7 +307,17 @@ namespace SYS.FormUI /// private void tsmiChangeState_Click(object sender, EventArgs e) { - rm_RoomStateId = Convert.ToInt32(new RoomService().SelectRoomStateIdByRoomNo(leRoomNo.Text)); + dic = new Dictionary() + { + { "roomno",leRoomNo.Text.Trim()} + }; + result = HttpHelper.Request("Room/SelectRoomStateIdByRoomNo", null, dic); + if (result.statusCode != 200) + { + UIMessageTip.ShowError("SelectRoomStateIdByRoomNo+接口服务异常,请提交issue"); + return; + } + rm_RoomStateId = Convert.ToInt32(result.message.ToString()); rm_RoomNo = leRoomNo.Text; FrmRoomStateManager frsm = new FrmRoomStateManager(); frsm.ShowDialog(); diff --git a/SYS.FormUI/AppUserControls/ucRoomList.cs b/SYS.FormUI/AppUserControls/ucRoomList.cs index 6080e69fc7243fa73318db534fad51ac30f34173..11f5b2848c8074090ef1a4fab78fffe811fe124f 100644 --- a/SYS.FormUI/AppUserControls/ucRoomList.cs +++ b/SYS.FormUI/AppUserControls/ucRoomList.cs @@ -8,6 +8,8 @@ using SYS.Core; using SYS.FormUI.Properties; using SYS.Application; using Sunny.UI; +using SYS.Common; +using System.Collections.Generic; namespace SYS.FormUI { @@ -188,7 +190,16 @@ namespace SYS.FormUI #region 当右键菜单打开时事件方法 private void cmsMain_Opening(object sender, CancelEventArgs e) { - r = new RoomService().SelectRoomByRoomNo(lblRoomNo.Text); + Dictionary room = new Dictionary(); + room.Add("no", lblRoomNo.Text); + var result = HttpHelper.Request("Room/SelectRoomByRoomNo", null,room); + + if (result.statusCode != 200) + { + UIMessageBox.Show("接口服务异常!", "来自小T提示", UIStyle.Red); + return; + } + r = HttpHelper.JsonToModel(result.message); if (lblCustoNo.Text != "") { tsmiCheckIn.Enabled = false; @@ -277,7 +288,16 @@ namespace SYS.FormUI if (lblCustoNo.Text == "") { - Room r = new RoomService().SelectRoomByRoomNo(lblRoomNo.Text); + Dictionary room = new Dictionary(); + room.Add("no", lblRoomNo.Text); + var result = HttpHelper.Request("Room/SelectRoomByRoomNo", null, room); + + if (result.statusCode != 200) + { + UIMessageBox.Show("接口服务异常!", "来自小T提示", UIStyle.Red); + return; + } + Room r = HttpHelper.JsonToModel(result.message); if (r.RoomStateId == 0) { rm_RoomNo = lblRoomNo.Text; @@ -311,7 +331,18 @@ namespace SYS.FormUI #region 修改房间状态 private void tsmiChangeState_Click(object sender, EventArgs e) { - rm_RoomStateId = Convert.ToInt32(new RoomService().SelectRoomStateIdByRoomNo(lblRoomNo.Text)); + Dictionary room = new Dictionary + { + { "roomno", lblRoomNo.Text } + }; + var result = HttpHelper.Request("Room/SelectRoomStateIdByRoomNo", null, room); + + if (result.statusCode != 200) + { + UIMessageBox.Show("SelectRoomStateIdByRoomNo+接口服务异常!", "来自小T提示", UIStyle.Red); + return; + } + rm_RoomStateId = Convert.ToInt32(result.message); rm_RoomNo = lblRoomNo.Text; FrmRoomStateManager frsm = new FrmRoomStateManager(); frsm.ShowDialog(); diff --git a/SYS.FormUI/Font/UI-FontUtil.cs b/SYS.FormUI/Font/UI-FontUtil.cs deleted file mode 100644 index d600ba6187053ecb3844f8f6c93c4aa2536f4afd..0000000000000000000000000000000000000000 --- a/SYS.FormUI/Font/UI-FontUtil.cs +++ /dev/null @@ -1,55 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Drawing; -using System.Drawing.Text; -using System.IO; -using System.Linq; -using System.Net; -using System.Reflection; -using System.Resources; -using System.Runtime.Serialization; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; -using System.Threading.Tasks; - -namespace SYS.FormUI -{ - //public static class UI_FontUtil - //{ - - // private static PrivateFontCollection pfc = new PrivateFontCollection(); - // private static ResourceManager rm = new ResourceManager("SYS.FormUI.Resource", Assembly.GetExecutingAssembly()); - // private static Assembly assembly = Assembly.GetExecutingAssembly(); - // /// - // /// 子控件字体 - // /// - // public static Font childControlFont = null; - // public static Font mainFont = null; - // public static Font scorllingFont = null; - // public static Font controlFont = null; - // public static Font roomControlFont = null; - - // static UI_FontUtil() - // { - // Stream stream = assembly.GetManifestResourceStream("SYS.FormUI.Resources.Alibaba-PuHuiTi-Regular.ttf"); - // //Stream stream = response.GetResponseStream(); - // byte[] fontdata = new byte[stream.Length]; - // stream.Read(fontdata, 0, (int)stream.Length); - // stream.Close(); - // unsafe - // { - // fixed (byte* pFontData = fontdata) - // { - // pfc.AddMemoryFont((System.IntPtr)pFontData, fontdata.Length); - // } - // } - // childControlFont = new Font(pfc.Families[0], 10); - // mainFont = new Font(pfc.Families[0], 10); - // scorllingFont = new Font(pfc.Families[0], 10); - // controlFont = new Font(pfc.Families[0], 11); - // roomControlFont = new Font(pfc.Families[0], 10); - // } - - - //} -} diff --git a/SYS.FormUI/Properties/AssemblyInfo.cs b/SYS.FormUI/Properties/AssemblyInfo.cs index 8567fec91cc64da6cc3820d57d70aca5cb114193..a39856d1a7be46acffd158cdd98f61d199fd39fa 100644 --- a/SYS.FormUI/Properties/AssemblyInfo.cs +++ b/SYS.FormUI/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; //可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值, // 方法是按如下所示使用“*”: : // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.5.0.8")] -[assembly: AssemblyFileVersion("1.5.0.8")] +[assembly: AssemblyVersion("2.0.0.0")] +[assembly: AssemblyFileVersion("2.0.0.0")] diff --git a/SYS.FormUI/Properties/Resources.Designer.cs b/SYS.FormUI/Properties/Resources.Designer.cs index ee8c0f4b16b94617c9de77bba0024552f5a27729..896af7551e84f64f26b316789102a9c684cbed9f 100644 --- a/SYS.FormUI/Properties/Resources.Designer.cs +++ b/SYS.FormUI/Properties/Resources.Designer.cs @@ -490,6 +490,16 @@ namespace SYS.FormUI.Properties { } } + /// + /// 查找 System.Drawing.Bitmap 类型的本地化资源。 + /// + public static System.Drawing.Bitmap 复制 { + get { + object obj = ResourceManager.GetObject("复制", resourceCulture); + return ((System.Drawing.Bitmap)(obj)); + } + } + /// /// 查找 System.Drawing.Bitmap 类型的本地化资源。 /// diff --git a/SYS.FormUI/Properties/Resources.resx b/SYS.FormUI/Properties/Resources.resx index f429618cfd9cd93787c2b9320c436a15bca41b5f..850e13c2188bedc62d16195df4cf4649710b741b 100644 --- a/SYS.FormUI/Properties/Resources.resx +++ b/SYS.FormUI/Properties/Resources.resx @@ -118,8 +118,8 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ..\Resources\picCustomer.ImagePress.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\脏房状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\picExtend.ImageHover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -127,6 +127,9 @@ ..\Resources\arrow-down-b.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\餐饮部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\维修部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -148,6 +151,9 @@ ..\Resources\添加管理员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\打卡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\酒店部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -157,20 +163,23 @@ ..\Resources\经理部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\delete2-a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\搜索--1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\minus (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\常规部门卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\返回 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\搜索--1a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\picCommodity.ImageHover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\picCustomer.ImagePress.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\财务部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -193,6 +202,9 @@ ..\Resources\主页 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\picCommodity.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\监管小组卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -202,14 +214,11 @@ ..\Resources\組織圖塊.bmp;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\内控部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\已住状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\上传照片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\已住房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -220,9 +229,6 @@ ..\Resources\白金会员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\可住房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\黄金会员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -238,20 +244,17 @@ ..\Resources\注销.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\修改.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\77377282_p0_master1200.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\后勤部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\导出 (4)1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\可住房icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\系统管理员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\维修房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\锁屏.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -265,9 +268,6 @@ ..\Resources\个人中心.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\Alibaba-PuHuiTi-Regular.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - ..\Resources\picCustomer.ImageHover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -289,9 +289,6 @@ ..\Resources\修改a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\脏房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - ..\Resources\预约状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -310,26 +307,29 @@ ..\Resources\picRoom.ImagePress.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\咖啡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + ..\Resources\获取用户编号-ia.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\uiButton1.BackgroundImage.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\picCommodity.ImageHover.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\修改.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\picCommodity.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\minus (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\770e7b52ecafc807247aad51bb6c6b43.jpg;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\delete2-a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\上传照片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\close.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\脏房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\月亮.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -337,14 +337,14 @@ ..\Resources\picCustomer.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\餐饮部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\Alibaba-PuHuiTi-Regular.ttf;System.Byte[], mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 ..\Resources\普通会员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\脏房状态.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\系统管理员.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\早上.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -355,8 +355,11 @@ ..\Resources\picExtend.Image.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\咖啡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\搜索--1a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + + ..\Resources\内控部卡片.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\lock.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a @@ -370,16 +373,16 @@ ..\Resources\增加 添加 加减 (1).png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\维修房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\导出 (4)1.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\可住房icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\可住房(hover)icon.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a ..\Resources\添 加a.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a - - ..\Resources\打卡.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\images\复制.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a \ No newline at end of file diff --git a/SYS.FormUI/SYS.FormUI.csproj b/SYS.FormUI/SYS.FormUI.csproj index 5979bd23647ea4a1e72e2b6aa718bc7f9e9bd02b..a6b14e8f685c1ab29527c585da5258673bf15103 100644 --- a/SYS.FormUI/SYS.FormUI.csproj +++ b/SYS.FormUI/SYS.FormUI.csproj @@ -89,19 +89,8 @@ ..\SYS.Library\kse.dll - - False - ..\SYS.Library\MySql.Data.dll - - - False - ..\SYS.Library\MySql.Data.EntityFramework.dll - - - ..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll - - - ..\packages\Npgsql.4.0.10\lib\net451\Npgsql.dll + + ..\packages\Newtonsoft.Json.13.0.2\lib\net45\Newtonsoft.Json.dll ..\packages\SqlSugar.5.0.3.5\lib\SqlSugar.dll @@ -258,30 +247,12 @@ FrmMain.cs - - UserControl - - - ucBaseInformation.cs - UserControl ucNavBar.cs - - UserControl - - - ucPositionInformation.cs - - - UserControl - - - ucEducationInformation.cs - Form @@ -462,15 +433,18 @@ FrmWorkerCheckInfo.cs + + UserControl + + + ucRoom.cs + UserControl ucVipType.cs - - PreserveNewest - @@ -637,17 +611,11 @@ FrmMain.cs - - ucBaseInformation.cs - ucNavBar.cs - - ucPositionInformation.cs - - - ucEducationInformation.cs + + ucRoom.cs ucVipType.cs @@ -846,6 +814,7 @@ Always + Always @@ -1103,10 +1072,6 @@ - - {600f4cc8-4323-4237-a55c-bfef4b67d57c} - SYS.Application - {65501AF6-C629-448A-847E-1BCD60665865} SYS.Common diff --git a/SYS.FormUI/packages.config b/SYS.FormUI/packages.config index 89e43595bf671c5dfa09a8bee7f757b6e75345d9..d596ccdcfc6a304cc2f36d9182a9d46d2cf4deab 100644 --- a/SYS.FormUI/packages.config +++ b/SYS.FormUI/packages.config @@ -3,8 +3,7 @@ - - + diff --git a/SYS.Library/MySql.Data.EntityFramework.dll b/SYS.Library/MySql.Data.EntityFramework.dll deleted file mode 100644 index 798a74b6116167d12c2f3bf9d44fc969fc4d6f69..0000000000000000000000000000000000000000 Binary files a/SYS.Library/MySql.Data.EntityFramework.dll and /dev/null differ diff --git a/SYS.Library/MySql.Data.dll b/SYS.Library/MySql.Data.dll deleted file mode 100644 index 3a5c1b1c10d7dc45606fbb0e8c7b4239ba2bb657..0000000000000000000000000000000000000000 Binary files a/SYS.Library/MySql.Data.dll and /dev/null differ diff --git a/SYS.Library/MySql.Web.dll b/SYS.Library/MySql.Web.dll deleted file mode 100644 index 9324c4c2602acfd2b3951dfa4c33b7ee2d1e8cd8..0000000000000000000000000000000000000000 Binary files a/SYS.Library/MySql.Web.dll and /dev/null differ diff --git a/SYS.Library/Newtonsoft.Json.dll b/SYS.Library/Newtonsoft.Json.dll deleted file mode 100644 index 7af125a246d180e71b9c4a20cca73cc44bfa8902..0000000000000000000000000000000000000000 Binary files a/SYS.Library/Newtonsoft.Json.dll and /dev/null differ diff --git a/SYS.Library/Newtonsoft.Json.xml b/SYS.Library/Newtonsoft.Json.xml deleted file mode 100644 index 008e0ca2369f387d45adc8a376b83290062e27eb..0000000000000000000000000000000000000000 --- a/SYS.Library/Newtonsoft.Json.xml +++ /dev/null @@ -1,11305 +0,0 @@ - - - - Newtonsoft.Json - - - - - Represents a BSON Oid (object id). - - - - - Gets or sets the value of the Oid. - - The value of the Oid. - - - - Initializes a new instance of the class. - - The Oid value. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized BSON data. - - - - - Gets or sets a value indicating whether binary data reading should be compatible with incorrect Json.NET 3.5 written binary. - - - true if binary data reading will be compatible with incorrect Json.NET 3.5 written binary; otherwise, false. - - - - - Gets or sets a value indicating whether the root object will be read as a JSON array. - - - true if the root object will be read as a JSON array; otherwise, false. - - - - - Gets or sets the used when reading values from BSON. - - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Initializes a new instance of the class. - - The containing the BSON data to read. - if set to true the root object will be read as a JSON array. - The used when reading values from BSON. - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating BSON data. - - - - - Gets or sets the used when writing values to BSON. - When set to no conversion will occur. - - The used when writing values to BSON. - - - - Initializes a new instance of the class. - - The to write to. - - - - Initializes a new instance of the class. - - The to write to. - - - - Flushes whatever is in the buffer to the underlying and also flushes the underlying stream. - - - - - Writes the end. - - The token. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes the beginning of a JSON array. - - - - - Writes the beginning of a JSON object. - - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Closes this writer. - If is set to true, the underlying is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value that represents a BSON object id. - - The Object ID value to write. - - - - Writes a BSON regex. - - The regex pattern. - The regex options. - - - - Specifies how constructors are used when initializing objects during deserialization by the . - - - - - First attempt to use the public default constructor, then fall back to a single parameterized constructor, then to the non-public default constructor. - - - - - Json.NET will use a non-public default constructor before falling back to a parameterized constructor. - - - - - Converts a binary value to and from a base 64 string value. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Creates a custom object. - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Creates an object which will then be populated by the serializer. - - Type of the object. - The created object. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Provides a base class for converting a to and from JSON. - - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a F# discriminated union type to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an Entity Framework to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can write JSON. - - - true if this can write JSON; otherwise, false. - - - - - Converts a to and from the ISO 8601 date format (e.g. "2008-04-12T12:53Z"). - - - - - Gets or sets the date time styles used when converting a date to and from JSON. - - The date time styles used when converting a date to and from JSON. - - - - Gets or sets the date time format used when converting a date to and from JSON. - - The date time format used when converting a date to and from JSON. - - - - Gets or sets the culture used when converting a date to and from JSON. - - The culture used when converting a date to and from JSON. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Converts a to and from a JavaScript Date constructor (e.g. new Date(52231943)). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts a to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from JSON and BSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts an to and from its name string value. - - - - - Gets or sets a value indicating whether the written enum text should be camel case. - The default value is false. - - true if the written enum text will be camel case; otherwise, false. - - - - Gets or sets the naming strategy used to resolve how enum text is written. - - The naming strategy used to resolve how enum text is written. - - - - Gets or sets a value indicating whether integer values are allowed when serializing and deserializing. - The default value is true. - - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - true if the written enum text will be camel case; otherwise, false. - - - - Initializes a new instance of the class. - - The naming strategy used to resolve how enum text is written. - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - - Initializes a new instance of the class. - - The of the used to write enum text. - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - true if integers are allowed when serializing and deserializing; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts a to and from Unix epoch time - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Converts a to and from a string (e.g. "1.2.3.4"). - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing property value of the JSON that is being converted. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Converts XML to and from JSON. - - - - - Gets or sets the name of the root element to insert when deserializing to XML if the JSON structure has produced multiple root elements. - - The name of the deserialized root element. - - - - Gets or sets a value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - true if the array attribute is written to the XML; otherwise, false. - - - - Gets or sets a value indicating whether to write the root JSON object. - - true if the JSON root object is omitted; otherwise, false. - - - - Gets or sets a value indicating whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - true if special characters are encoded; otherwise, false. - - - - Writes the JSON representation of the object. - - The to write to. - The calling serializer. - The value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Checks if the is a namespace attribute. - - Attribute name to test. - The attribute name prefix if it has one, otherwise an empty string. - true if attribute name is for a namespace attribute, otherwise false. - - - - Determines whether this instance can convert the specified value type. - - Type of the value. - - true if this instance can convert the specified value type; otherwise, false. - - - - - Specifies how dates are formatted when writing JSON text. - - - - - Dates are written in the ISO 8601 format, e.g. "2012-03-21T05:40Z". - - - - - Dates are written in the Microsoft JSON format, e.g. "\/Date(1198908717056)\/". - - - - - Specifies how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON text. - - - - - Date formatted strings are not parsed to a date type and are read as strings. - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed to . - - - - - Specifies how to treat the time value when converting between string and . - - - - - Treat as local time. If the object represents a Coordinated Universal Time (UTC), it is converted to the local time. - - - - - Treat as a UTC. If the object represents a local time, it is converted to a UTC. - - - - - Treat as a local time if a is being converted to a string. - If a string is being converted to , convert to a local time if a time zone is specified. - - - - - Time zone information should be preserved when converting. - - - - - The default JSON name table implementation. - - - - - Initializes a new instance of the class. - - - - - Gets a string containing the same characters as the specified range of characters in the given array. - - The character array containing the name to find. - The zero-based index into the array specifying the first character of the name. - The number of characters in the name. - A string containing the same characters as the specified range of characters in the given array. - - - - Adds the specified string into name table. - - The string to add. - This method is not thread-safe. - The resolved string. - - - - Specifies default value handling options for the . - - - - - - - - - Include members where the member value is the same as the member's default value when serializing objects. - Included members are written to JSON. Has no effect when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - so that it is not written to JSON. - This option will ignore all default values (e.g. null for objects and nullable types; 0 for integers, - decimals and floating point numbers; and false for booleans). The default value ignored can be changed by - placing the on the property. - - - - - Members with a default value but no JSON will be set to their default value when deserializing. - - - - - Ignore members where the member value is the same as the member's default value when serializing objects - and set members to their default value when deserializing. - - - - - Specifies float format handling options when writing special floating point numbers, e.g. , - and with . - - - - - Write special floating point values as strings in JSON, e.g. "NaN", "Infinity", "-Infinity". - - - - - Write special floating point values as symbols in JSON, e.g. NaN, Infinity, -Infinity. - Note that this will produce non-valid JSON. - - - - - Write special floating point values as the property's default value in JSON, e.g. 0.0 for a property, null for a of property. - - - - - Specifies how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Floating point numbers are parsed to . - - - - - Floating point numbers are parsed to . - - - - - Specifies formatting options for the . - - - - - No special formatting is applied. This is the default. - - - - - Causes child objects to be indented according to the and settings. - - - - - Provides an interface for using pooled arrays. - - The array type content. - - - - Rent an array from the pool. This array must be returned when it is no longer needed. - - The minimum required length of the array. The returned array may be longer. - The rented array from the pool. This array must be returned when it is no longer needed. - - - - Return an array to the pool. - - The array that is being returned. - - - - Provides an interface to enable a class to return line and position information. - - - - - Gets a value indicating whether the class can return line information. - - - true if and can be provided; otherwise, false. - - - - - Gets the current line number. - - The current line number or 0 if no line information is available (for example, when returns false). - - - - Gets the current line position. - - The current line position or 0 if no line information is available (for example, when returns false). - - - - Instructs the how to serialize the collection. - - - - - Gets or sets a value indicating whether null items are allowed in the collection. - - true if null items are allowed in the collection; otherwise, false. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with a flag indicating whether the array can contain null items. - - A flag indicating whether the array can contain null items. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Instructs the to use the specified constructor when deserializing that object. - - - - - Instructs the how to serialize the object. - - - - - Gets or sets the id. - - The id. - - - - Gets or sets the title. - - The title. - - - - Gets or sets the description. - - The description. - - - - Gets or sets the collection's items converter. - - The collection's items converter. - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonContainer(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonContainer(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets a value that indicates whether to preserve object references. - - - true to keep object reference; otherwise, false. The default is false. - - - - - Gets or sets a value that indicates whether to preserve collection's items references. - - - true to keep collection's items object references; otherwise, false. The default is false. - - - - - Gets or sets the reference loop handling used when serializing the collection's items. - - The reference loop handling. - - - - Gets or sets the type name handling used when serializing the collection's items. - - The type name handling. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Provides methods for converting between .NET types and JSON types. - - - - - - - - Gets or sets a function that creates default . - Default settings are automatically used by serialization methods on , - and and on . - To serialize without using any default settings create a with - . - - - - - Represents JavaScript's boolean value true as a string. This field is read-only. - - - - - Represents JavaScript's boolean value false as a string. This field is read-only. - - - - - Represents JavaScript's null as a string. This field is read-only. - - - - - Represents JavaScript's undefined as a string. This field is read-only. - - - - - Represents JavaScript's positive infinity as a string. This field is read-only. - - - - - Represents JavaScript's negative infinity as a string. This field is read-only. - - - - - Represents JavaScript's NaN as a string. This field is read-only. - - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - The time zone handling when the date is converted to a string. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation using the specified. - - The value to convert. - The format the date will be converted to. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - The string delimiter character. - The string escape handling. - A JSON string representation of the . - - - - Converts the to its JSON string representation. - - The value to convert. - A JSON string representation of the . - - - - Serializes the specified object to a JSON string. - - The object to serialize. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting. - - The object to serialize. - Indicates how the output should be formatted. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a collection of . - - The object to serialize. - A collection of converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using formatting and a collection of . - - The object to serialize. - Indicates how the output should be formatted. - A collection of converters used while serializing. - A JSON string representation of the object. - - - - Serializes the specified object to a JSON string using . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using formatting and . - - The object to serialize. - Indicates how the output should be formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - A JSON string representation of the object. - - - - - Serializes the specified object to a JSON string using a type, formatting and . - - The object to serialize. - Indicates how the output should be formatted. - The used to serialize the object. - If this is null, default serialization settings will be used. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - A JSON string representation of the object. - - - - - Deserializes the JSON to a .NET object. - - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to a .NET object using . - - The JSON to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The JSON to deserialize. - The of object being deserialized. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type. - - The type of the object to deserialize to. - The JSON to deserialize. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the given anonymous type. - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be inferred from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the given anonymous type using . - - - The anonymous type to deserialize to. This can't be specified - traditionally and must be inferred from the anonymous type passed - as a parameter. - - The JSON to deserialize. - The anonymous type object. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized anonymous type from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The type of the object to deserialize to. - The JSON to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The type of the object to deserialize to. - The object to deserialize. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using a collection of . - - The JSON to deserialize. - The type of the object to deserialize. - Converters to use while deserializing. - The deserialized object from the JSON string. - - - - Deserializes the JSON to the specified .NET type using . - - The JSON to deserialize. - The type of the object to deserialize to. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - The deserialized object from the JSON string. - - - - Populates the object with values from the JSON string. - - The JSON to populate values from. - The target object to populate values onto. - - - - Populates the object with values from the JSON string using . - - The JSON to populate values from. - The target object to populate values onto. - - The used to deserialize the object. - If this is null, default serialization settings will be used. - - - - - Serializes the to a JSON string. - - The node to serialize. - A JSON string of the . - - - - Serializes the to a JSON string using formatting. - - The node to serialize. - Indicates how the output should be formatted. - A JSON string of the . - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output should be formatted. - Omits writing the root object. - A JSON string of the . - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by - and writes a Json.NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by , - writes a Json.NET array attribute for collections, and encodes special characters. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - - A value to indicate whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - The deserialized . - - - - Serializes the to a JSON string. - - The node to convert to JSON. - A JSON string of the . - - - - Serializes the to a JSON string using formatting. - - The node to convert to JSON. - Indicates how the output should be formatted. - A JSON string of the . - - - - Serializes the to a JSON string using formatting and omits the root object if is true. - - The node to serialize. - Indicates how the output should be formatted. - Omits writing the root object. - A JSON string of the . - - - - Deserializes the from a JSON string. - - The JSON string. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by . - - The JSON string. - The name of the root element to append when deserializing. - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by - and writes a Json.NET array attribute for collections. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - The deserialized . - - - - Deserializes the from a JSON string nested in a root element specified by , - writes a Json.NET array attribute for collections, and encodes special characters. - - The JSON string. - The name of the root element to append when deserializing. - - A value to indicate whether to write the Json.NET array attribute. - This attribute helps preserve arrays when converting the written XML back to JSON. - - - A value to indicate whether to encode special characters when converting JSON to XML. - If true, special characters like ':', '@', '?', '#' and '$' in JSON property names aren't used to specify - XML namespaces, attributes or processing directives. Instead special characters are encoded and written - as part of the XML element name. - - The deserialized . - - - - Converts an object to and from JSON. - - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Gets a value indicating whether this can read JSON. - - true if this can read JSON; otherwise, false. - - - - Gets a value indicating whether this can write JSON. - - true if this can write JSON; otherwise, false. - - - - Converts an object to and from JSON. - - The object type to convert. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Writes the JSON representation of the object. - - The to write to. - The value. - The calling serializer. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. - The calling serializer. - The object value. - - - - Reads the JSON representation of the object. - - The to read from. - Type of the object. - The existing value of object being read. If there is no existing value then null will be used. - The existing value has a value. - The calling serializer. - The object value. - - - - Determines whether this instance can convert the specified object type. - - Type of the object. - - true if this instance can convert the specified object type; otherwise, false. - - - - - Instructs the to use the specified when serializing the member or class. - - - - - Gets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - - - - - Initializes a new instance of the class. - - Type of the . - - - - Initializes a new instance of the class. - - Type of the . - Parameter list to use when constructing the . Can be null. - - - - Represents a collection of . - - - - - Instructs the how to serialize the collection. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - The exception thrown when an error occurs during JSON serialization or deserialization. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Instructs the to deserialize properties with no matching class member into the specified collection - and write values during serialization. - - - - - Gets or sets a value that indicates whether to write extension data when serializing the object. - - - true to write extension data when serializing the object; otherwise, false. The default is true. - - - - - Gets or sets a value that indicates whether to read extension data when deserializing the object. - - - true to read extension data when deserializing the object; otherwise, false. The default is true. - - - - - Initializes a new instance of the class. - - - - - Instructs the not to serialize the public field or public read/write property value. - - - - - Base class for a table of atomized string objects. - - - - - Gets a string containing the same characters as the specified range of characters in the given array. - - The character array containing the name to find. - The zero-based index into the array specifying the first character of the name. - The number of characters in the name. - A string containing the same characters as the specified range of characters in the given array. - - - - Instructs the how to serialize the object. - - - - - Gets or sets the member serialization. - - The member serialization. - - - - Gets or sets the missing member handling used when deserializing this object. - - The missing member handling. - - - - Gets or sets how the object's properties with null values are handled during serialization and deserialization. - - How the object's properties with null values are handled during serialization and deserialization. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified member serialization. - - The member serialization. - - - - Initializes a new instance of the class with the specified container Id. - - The container Id. - - - - Instructs the to always serialize the member with the specified name. - - - - - Gets or sets the type used when serializing the property's collection items. - - The collection's items type. - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonProperty(ItemConverterType = typeof(MyContainerConverter), ItemConverterParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the of the . - - The of the . - - - - The parameter list to use when constructing the described by . - If null, the default constructor is used. - When non-null, there must be a constructor defined in the that exactly matches the number, - order, and type of these parameters. - - - - [JsonProperty(NamingStrategyType = typeof(MyNamingStrategy), NamingStrategyParameters = new object[] { 123, "Four" })] - - - - - - Gets or sets the null value handling used when serializing this property. - - The null value handling. - - - - Gets or sets the default value handling used when serializing this property. - - The default value handling. - - - - Gets or sets the reference loop handling used when serializing this property. - - The reference loop handling. - - - - Gets or sets the object creation handling used when deserializing this property. - - The object creation handling. - - - - Gets or sets the type name handling used when serializing this property. - - The type name handling. - - - - Gets or sets whether this property's value is serialized as a reference. - - Whether this property's value is serialized as a reference. - - - - Gets or sets the order of serialization of a member. - - The numeric order of serialization. - - - - Gets or sets a value indicating whether this property is required. - - - A value indicating whether this property is required. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - Gets or sets the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class with the specified name. - - Name of the property. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Asynchronously reads the next JSON token from the source. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns true if the next token was read successfully; false if there are no more tokens to read. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously skips the children of the current token. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a []. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the []. This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously reads the next JSON token from the source as a . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the . This result will be null at the end of an array. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Specifies the state of the reader. - - - - - A read method has not been called. - - - - - The end of the file has been reached successfully. - - - - - Reader is at a property. - - - - - Reader is at the start of an object. - - - - - Reader is in an object. - - - - - Reader is at the start of an array. - - - - - Reader is in an array. - - - - - The method has been called. - - - - - Reader has just read a value. - - - - - Reader is at the start of a constructor. - - - - - Reader is in a constructor. - - - - - An error occurred that prevents the read operation from continuing. - - - - - The end of the file has been reached successfully. - - - - - Gets the current reader state. - - The current reader state. - - - - Gets or sets a value indicating whether the source should be closed when this reader is closed. - - - true to close the source when this reader is closed; otherwise false. The default is true. - - - - - Gets or sets a value indicating whether multiple pieces of JSON content can - be read from a continuous stream without erroring. - - - true to support reading multiple pieces of JSON content; otherwise false. - The default is false. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - Gets or sets how time zones are handled when reading JSON. - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - - - - - Gets or sets how custom date formatted strings are parsed when reading JSON. - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - A null value means there is no maximum. - The default value is 128. - - - - - Gets the type of the current JSON token. - - - - - Gets the text value of the current JSON token. - - - - - Gets the .NET type for the current JSON token. - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets or sets the culture used when reading JSON. Defaults to . - - - - - Initializes a new instance of the class. - - - - - Reads the next JSON token from the source. - - true if the next token was read successfully; false if there are no more tokens to read. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a []. - - A [] or null if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the source as a of . - - A of . This method will return null at the end of an array. - - - - Skips the children of the current token. - - - - - Sets the current token. - - The new token. - - - - Sets the current token and value. - - The new token. - The value. - - - - Sets the current token and value. - - The new token. - The value. - A flag indicating whether the position index inside an array should be updated. - - - - Sets the state based on current token type. - - - - - Releases unmanaged and - optionally - managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Changes the reader's state to . - If is set to true, the source is also closed. - - - - - The exception thrown when an error occurs while reading JSON text. - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The line number indicating where the error occurred. - The line position indicating where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Instructs the to always serialize the member, and to require that the member has a value. - - - - - The exception thrown when an error occurs during JSON serialization or deserialization. - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path, line number, line position, and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The line number indicating where the error occurred. - The line position indicating where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Serializes and deserializes objects into and from the JSON format. - The enables you to control how objects are encoded into JSON. - - - - - Occurs when the errors during serialization and deserialization. - - - - - Gets or sets the used by the serializer when resolving references. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets the used by the serializer when resolving type names. - - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets the equality comparer used by the serializer when comparing references. - - The equality comparer. - - - - Gets or sets how type name writing and reading is handled by the serializer. - The default value is . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how object references are preserved by the serializer. - The default value is . - - - - - Gets or sets how reference loops (e.g. a class referencing itself) is handled. - The default value is . - - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - The default value is . - - - - - Gets or sets how null values are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how default values are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how objects are created during deserialization. - The default value is . - - The object creation handling. - - - - Gets or sets how constructors are used during deserialization. - The default value is . - - The constructor handling. - - - - Gets or sets how metadata properties are used during deserialization. - The default value is . - - The metadata properties handling. - - - - Gets a collection that will be used during serialization. - - Collection that will be used during serialization. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Indicates how JSON text output is formatted. - The default value is . - - - - - Gets or sets how dates are written to JSON text. - The default value is . - - - - - Gets or sets how time zones are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - The default value is . - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - The default value is . - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written as JSON text. - The default value is . - - - - - Gets or sets how strings are escaped when writing JSON text. - The default value is . - - - - - Gets or sets how and values are formatted when writing JSON text, - and the expected date format when reading JSON text. - The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". - - - - - Gets or sets the culture used when reading JSON. - The default value is . - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - A null value means there is no maximum. - The default value is 128. - - - - - Gets a value indicating whether there will be a check for additional JSON content after deserializing an object. - The default value is false. - - - true if there will be a check for additional JSON content after deserializing an object; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Creates a new instance. - The will not use default settings - from . - - - A new instance. - The will not use default settings - from . - - - - - Creates a new instance using the specified . - The will not use default settings - from . - - The settings to be applied to the . - - A new instance using the specified . - The will not use default settings - from . - - - - - Creates a new instance. - The will use default settings - from . - - - A new instance. - The will use default settings - from . - - - - - Creates a new instance using the specified . - The will use default settings - from as well as the specified . - - The settings to be applied to the . - - A new instance using the specified . - The will use default settings - from as well as the specified . - - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to read values from. - The target object to populate values onto. - - - - Populates the JSON values onto the target object. - - The that contains the JSON structure to read values from. - The target object to populate values onto. - - - - Deserializes the JSON structure contained by the specified . - - The that contains the JSON structure to deserialize. - The being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The type of the object to deserialize. - The instance of being deserialized. - - - - Deserializes the JSON structure contained by the specified - into an instance of the specified type. - - The containing the object. - The of object being deserialized. - The instance of being deserialized. - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - The type of the value being serialized. - This parameter is used when is Auto to write out the type name if the type of the value does not match. - Specifying the type is optional. - - - - - Serializes the specified and writes the JSON structure - using the specified . - - The used to write the JSON structure. - The to serialize. - - - - Specifies the settings on a object. - - - - - Gets or sets how reference loops (e.g. a class referencing itself) are handled. - The default value is . - - Reference loop handling. - - - - Gets or sets how missing members (e.g. JSON contains a property that isn't a member on the object) are handled during deserialization. - The default value is . - - Missing member handling. - - - - Gets or sets how objects are created during deserialization. - The default value is . - - The object creation handling. - - - - Gets or sets how null values are handled during serialization and deserialization. - The default value is . - - Null value handling. - - - - Gets or sets how default values are handled during serialization and deserialization. - The default value is . - - The default value handling. - - - - Gets or sets a collection that will be used during serialization. - - The converters. - - - - Gets or sets how object references are preserved by the serializer. - The default value is . - - The preserve references handling. - - - - Gets or sets how type name writing and reading is handled by the serializer. - The default value is . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - The type name handling. - - - - Gets or sets how metadata properties are used during deserialization. - The default value is . - - The metadata properties handling. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how a type name assembly is written and resolved by the serializer. - The default value is . - - The type name assembly format. - - - - Gets or sets how constructors are used during deserialization. - The default value is . - - The constructor handling. - - - - Gets or sets the contract resolver used by the serializer when - serializing .NET objects to JSON and vice versa. - - The contract resolver. - - - - Gets or sets the equality comparer used by the serializer when comparing references. - - The equality comparer. - - - - Gets or sets the used by the serializer when resolving references. - - The reference resolver. - - - - Gets or sets a function that creates the used by the serializer when resolving references. - - A function that creates the used by the serializer when resolving references. - - - - Gets or sets the used by the serializer when writing trace messages. - - The trace writer. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the used by the serializer when resolving type names. - - The binder. - - - - Gets or sets the error handler called during serialization and deserialization. - - The error handler called during serialization and deserialization. - - - - Gets or sets the used by the serializer when invoking serialization callback methods. - - The context. - - - - Gets or sets how and values are formatted when writing JSON text, - and the expected date format when reading JSON text. - The default value is "yyyy'-'MM'-'dd'T'HH':'mm':'ss.FFFFFFFK". - - - - - Gets or sets the maximum depth allowed when reading JSON. Reading past this depth will throw a . - A null value means there is no maximum. - The default value is 128. - - - - - Indicates how JSON text output is formatted. - The default value is . - - - - - Gets or sets how dates are written to JSON text. - The default value is . - - - - - Gets or sets how time zones are handled during serialization and deserialization. - The default value is . - - - - - Gets or sets how date formatted strings, e.g. "\/Date(1198908717056)\/" and "2012-03-21T05:40Z", are parsed when reading JSON. - The default value is . - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written as JSON. - The default value is . - - - - - Gets or sets how floating point numbers, e.g. 1.0 and 9.9, are parsed when reading JSON text. - The default value is . - - - - - Gets or sets how strings are escaped when writing JSON text. - The default value is . - - - - - Gets or sets the culture used when reading JSON. - The default value is . - - - - - Gets a value indicating whether there will be a check for additional content after deserializing an object. - The default value is false. - - - true if there will be a check for additional content after deserializing an object; otherwise, false. - - - - - Initializes a new instance of the class. - - - - - Represents a reader that provides fast, non-cached, forward-only access to JSON text data. - - - - - Asynchronously reads the next JSON token from the source. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns true if the next token was read successfully; false if there are no more tokens to read. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a []. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the []. This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a of . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the of . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously reads the next JSON token from the source as a . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous read. The - property returns the . This result will be null at the end of an array. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Initializes a new instance of the class with the specified . - - The containing the JSON data to read. - - - - Gets or sets the reader's property name table. - - - - - Gets or sets the reader's character buffer pool. - - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a []. - - A [] or null if the next JSON token is null. This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Gets a value indicating whether the class can return line information. - - - true if and can be provided; otherwise, false. - - - - - Gets the current line number. - - - The current line number or 0 if no line information is available (for example, returns false). - - - - - Gets the current line position. - - - The current line position or 0 if no line information is available (for example, returns false). - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the JSON value delimiter. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the specified end token. - - The end token to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously closes this writer. - If is set to true, the destination is also closed. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of the current JSON object or array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes indent characters. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes an indent space. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes raw JSON without changing the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a null value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the beginning of a JSON array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the beginning of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the start of a constructor with the given name. - - The name of the constructor. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes an undefined value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the given white space. - - The string of white space characters. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a [] value. - - The [] value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of an array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of a constructor. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes the end of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Asynchronously writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - Derived classes must override this method to get asynchronous behaviour. Otherwise it will - execute synchronously, returning an already-completed task. - - - - Gets or sets the writer's character array pool. - - - - - Gets or sets how many s to write for each level in the hierarchy when is set to . - - - - - Gets or sets which character to use to quote attribute values. - - - - - Gets or sets which character to use for indenting when is set to . - - - - - Gets or sets a value indicating whether object names will be surrounded with quotes. - - - - - Initializes a new instance of the class using the specified . - - The to write to. - - - - Flushes whatever is in the buffer to the underlying and also flushes the underlying . - - - - - Closes this writer. - If is set to true, the underlying is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the specified end token. - - The end token to write. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the given white space. - - The string of white space characters. - - - - Specifies the type of JSON token. - - - - - This is returned by the if a read method has not been called. - - - - - An object start token. - - - - - An array start token. - - - - - A constructor start token. - - - - - An object property name. - - - - - A comment. - - - - - Raw JSON. - - - - - An integer. - - - - - A float. - - - - - A string. - - - - - A boolean. - - - - - A null token. - - - - - An undefined token. - - - - - An object end token. - - - - - An array end token. - - - - - A constructor end token. - - - - - A Date. - - - - - Byte data. - - - - - - Represents a reader that provides validation. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Sets an event handler for receiving schema validation errors. - - - - - Gets the text value of the current JSON token. - - - - - - Gets the depth of the current token in the JSON document. - - The depth of the current token in the JSON document. - - - - Gets the path of the current JSON token. - - - - - Gets the quotation mark character used to enclose the value of a string. - - - - - - Gets the type of the current JSON token. - - - - - - Gets the .NET type for the current JSON token. - - - - - - Initializes a new instance of the class that - validates the content returned from the given . - - The to read from while validating. - - - - Gets or sets the schema. - - The schema. - - - - Gets the used to construct this . - - The specified in the constructor. - - - - Changes the reader's state to . - If is set to true, the underlying is also closed. - - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a []. - - - A [] or null if the next JSON token is null. - - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying as a . - - A . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . This method will return null at the end of an array. - - - - Reads the next JSON token from the underlying as a of . - - A of . - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Asynchronously closes this writer. - If is set to true, the destination is also closed. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously flushes whatever is in the buffer to the destination and also flushes the destination. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the specified end token. - - The end token to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes indent characters. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the JSON value delimiter. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes an indent space. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes raw JSON without changing the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of the current JSON object or array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of an array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of a constructor. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the end of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a null value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the beginning of a JSON array. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the start of a constructor with the given name. - - The name of the constructor. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the beginning of a JSON object. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the current token. - - The to read the token from. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the current token. - - The to read the token from. - A flag indicating whether the current token's children should be written. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the token and its value. - - The to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the token and its value. - - The to write. - - The value to write. - A value is only required for tokens that have an associated value, e.g. the property name for . - null can be passed to the method for tokens that don't have a value, e.g. . - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a [] value. - - The [] value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a value. - - The value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes a of value. - - The of value to write. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes an undefined value. - - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously writes the given white space. - - The string of white space characters. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Asynchronously ets the state of the . - - The being written. - The value being written. - The token to monitor for cancellation requests. The default value is . - A that represents the asynchronous operation. - The default behaviour is to execute synchronously, returning an already-completed task. Derived - classes can override this behaviour for true asynchronicity. - - - - Gets or sets a value indicating whether the destination should be closed when this writer is closed. - - - true to close the destination when this writer is closed; otherwise false. The default is true. - - - - - Gets or sets a value indicating whether the JSON should be auto-completed when this writer is closed. - - - true to auto-complete the JSON when this writer is closed; otherwise false. The default is true. - - - - - Gets the top. - - The top. - - - - Gets the state of the writer. - - - - - Gets the path of the writer. - - - - - Gets or sets a value indicating how JSON text output should be formatted. - - - - - Gets or sets how dates are written to JSON text. - - - - - Gets or sets how time zones are handled when writing JSON text. - - - - - Gets or sets how strings are escaped when writing JSON text. - - - - - Gets or sets how special floating point numbers, e.g. , - and , - are written to JSON text. - - - - - Gets or sets how and values are formatted when writing JSON text. - - - - - Gets or sets the culture used when writing JSON. Defaults to . - - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the destination and also flushes the destination. - - - - - Closes this writer. - If is set to true, the destination is also closed. - If is set to true, the JSON is auto-completed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the end of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the end of an array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end constructor. - - - - - Writes the property name of a name/value pair of a JSON object. - - The name of the property. - - - - Writes the property name of a name/value pair of a JSON object. - - The name of the property. - A flag to indicate whether the text should be escaped when it is written as a JSON property name. - - - - Writes the end of the current JSON object or array. - - - - - Writes the current token and its children. - - The to read the token from. - - - - Writes the current token. - - The to read the token from. - A flag indicating whether the current token's children should be written. - - - - Writes the token and its value. - - The to write. - - The value to write. - A value is only required for tokens that have an associated value, e.g. the property name for . - null can be passed to the method for tokens that don't have a value, e.g. . - - - - - Writes the token. - - The to write. - - - - Writes the specified end token. - - The end token to write. - - - - Writes indent characters. - - - - - Writes the JSON value delimiter. - - - - - Writes an indent space. - - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON without changing the writer's state. - - The raw JSON to write. - - - - Writes raw JSON where a value is expected and updates the writer's state. - - The raw JSON to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a of value. - - The of value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - An error will raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes the given white space. - - The string of white space characters. - - - - Releases unmanaged and - optionally - managed resources. - - true to release both managed and unmanaged resources; false to release only unmanaged resources. - - - - Sets the state of the . - - The being written. - The value being written. - - - - The exception thrown when an error occurs while writing JSON text. - - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - Initializes a new instance of the class - with a specified error message, JSON path and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The path to the JSON where the error occurred. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Specifies how JSON comments are handled when loading JSON. - - - - - Ignore comments. - - - - - Load comments as a with type . - - - - - Specifies how duplicate property names are handled when loading JSON. - - - - - Replace the existing value when there is a duplicate property. The value of the last property in the JSON object will be used. - - - - - Ignore the new value when there is a duplicate property. The value of the first property in the JSON object will be used. - - - - - Throw a when a duplicate property is encountered. - - - - - Contains the LINQ to JSON extension methods. - - - - - Returns a collection of tokens that contains the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the ancestors of every token in the source collection. - - - - Returns a collection of tokens that contains every token in the source collection, and the ancestors of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains every token in the source collection, the ancestors of every token in the source collection. - - - - Returns a collection of tokens that contains the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains the descendants of every token in the source collection. - - - - Returns a collection of tokens that contains every token in the source collection, and the descendants of every token in the source collection. - - The type of the objects in source, constrained to . - An of that contains the source collection. - An of that contains every token in the source collection, and the descendants of every token in the source collection. - - - - Returns a collection of child properties of every object in the source collection. - - An of that contains the source collection. - An of that contains the properties of every object in the source collection. - - - - Returns a collection of child values of every object in the source collection with the given key. - - An of that contains the source collection. - The token key. - An of that contains the values of every token in the source collection with the given key. - - - - Returns a collection of child values of every object in the source collection. - - An of that contains the source collection. - An of that contains the values of every token in the source collection. - - - - Returns a collection of converted child values of every object in the source collection with the given key. - - The type to convert the values to. - An of that contains the source collection. - The token key. - An that contains the converted values of every token in the source collection with the given key. - - - - Returns a collection of converted child values of every object in the source collection. - - The type to convert the values to. - An of that contains the source collection. - An that contains the converted values of every token in the source collection. - - - - Converts the value. - - The type to convert the value to. - A cast as a of . - A converted value. - - - - Converts the value. - - The source collection type. - The type to convert the value to. - A cast as a of . - A converted value. - - - - Returns a collection of child tokens of every array in the source collection. - - The source collection type. - An of that contains the source collection. - An of that contains the values of every token in the source collection. - - - - Returns a collection of converted child tokens of every array in the source collection. - - An of that contains the source collection. - The type to convert the values to. - The source collection type. - An that contains the converted values of every token in the source collection. - - - - Returns the input typed as . - - An of that contains the source collection. - The input typed as . - - - - Returns the input typed as . - - The source collection type. - An of that contains the source collection. - The input typed as . - - - - Represents a collection of objects. - - The type of token. - - - - Gets the of with the specified key. - - - - - - Represents a JSON array. - - - - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous load. The property contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous load. The property contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Initializes a new instance of the class with the specified content. - - The contents of the array. - - - - Loads an from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads an from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object. - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the at the specified index. - - - - - - Determines the index of a specific item in the . - - The object to locate in the . - - The index of if found in the list; otherwise, -1. - - - - - Inserts an item to the at the specified index. - - The zero-based index at which should be inserted. - The object to insert into the . - - is not a valid index in the . - - - - - Removes the item at the specified index. - - The zero-based index of the item to remove. - - is not a valid index in the . - - - - - Returns an enumerator that iterates through the collection. - - - A of that can be used to iterate through the collection. - - - - - Adds an item to the . - - The object to add to the . - - - - Removes all items from the . - - - - - Determines whether the contains a specific value. - - The object to locate in the . - - true if is found in the ; otherwise, false. - - - - - Copies the elements of the to an array, starting at a particular array index. - - The array. - Index of the array. - - - - Gets a value indicating whether the is read-only. - - true if the is read-only; otherwise, false. - - - - Removes the first occurrence of a specific object from the . - - The object to remove from the . - - true if was successfully removed from the ; otherwise, false. This method also returns false if is not found in the original . - - - - - Represents a JSON constructor. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets or sets the name of this constructor. - - The constructor name. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name and content. - - The constructor name. - The contents of the constructor. - - - - Initializes a new instance of the class with the specified name. - - The constructor name. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified key. - - The with the specified key. - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Represents a token that can contain other tokens. - - - - - Occurs when the list changes or an item in the list changes. - - - - - Occurs before an item is added to the collection. - - - - - Occurs when the items list of the collection has changed, or the collection is reset. - - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Raises the event. - - The instance containing the event data. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Get the first child token of this token. - - - A containing the first child token of the . - - - - - Get the last child token of this token. - - - A containing the last child token of the . - - - - - Returns a collection of the child tokens of this token, in document order. - - - An of containing the child tokens of this , in document order. - - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - - A containing the child values of this , in document order. - - - - - Returns a collection of the descendant tokens for this token in document order. - - An of containing the descendant tokens of the . - - - - Returns a collection of the tokens that contain this token, and all descendant tokens of this token, in document order. - - An of containing this token, and all the descendant tokens of the . - - - - Adds the specified content as children of this . - - The content to be added. - - - - Adds the specified content as the first children of this . - - The content to be added. - - - - Creates a that can be used to add tokens to the . - - A that is ready to have content written to it. - - - - Replaces the child nodes of this token with the specified content. - - The content. - - - - Removes the child nodes from this token. - - - - - Merge the specified content into this . - - The content to be merged. - - - - Merge the specified content into this using . - - The content to be merged. - The used to merge the content. - - - - Gets the count of child JSON tokens. - - The count of child JSON tokens. - - - - Represents a collection of objects. - - The type of token. - - - - An empty collection of objects. - - - - - Initializes a new instance of the struct. - - The enumerable. - - - - Returns an enumerator that can be used to iterate through the collection. - - - A that can be used to iterate through the collection. - - - - - Gets the of with the specified key. - - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Determines whether the specified is equal to this instance. - - The to compare with this instance. - - true if the specified is equal to this instance; otherwise, false. - - - - - Returns a hash code for this instance. - - - A hash code for this instance, suitable for use in hashing algorithms and data structures like a hash table. - - - - - Represents a JSON object. - - - - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous load. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Occurs when a property value changes. - - - - - Occurs when a property value is changing. - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Initializes a new instance of the class with the specified content. - - The contents of the object. - - - - Gets the node type for this . - - The type. - - - - Gets an of of this object's properties. - - An of of this object's properties. - - - - Gets a with the specified name. - - The property name. - A with the specified name or null. - - - - Gets the with the specified name. - The exact name will be searched for first and if no matching property is found then - the will be used to match a property. - - The property name. - One of the enumeration values that specifies how the strings will be compared. - A matched with the specified name or null. - - - - Gets a of of this object's property values. - - A of of this object's property values. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets or sets the with the specified property name. - - - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - is not valid JSON. - - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - is not valid JSON. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - is not valid JSON. - - - - - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - is not valid JSON. - - - - - - - - Creates a from an object. - - The object that will be used to create . - A with the values of the specified object. - - - - Creates a from an object. - - The object that will be used to create . - The that will be used to read the object. - A with the values of the specified object. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Gets the with the specified property name. - - Name of the property. - The with the specified property name. - - - - Gets the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - One of the enumeration values that specifies how the strings will be compared. - The with the specified property name. - - - - Tries to get the with the specified property name. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - Name of the property. - The value. - One of the enumeration values that specifies how the strings will be compared. - true if a value was successfully retrieved; otherwise, false. - - - - Adds the specified property name. - - Name of the property. - The value. - - - - Determines whether the JSON object has the specified property name. - - Name of the property. - true if the JSON object has the specified property name; otherwise, false. - - - - Removes the property with the specified name. - - Name of the property. - true if item was successfully removed; otherwise, false. - - - - Tries to get the with the specified property name. - - Name of the property. - The value. - true if a value was successfully retrieved; otherwise, false. - - - - Returns an enumerator that can be used to iterate through the collection. - - - A that can be used to iterate through the collection. - - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Raises the event with the provided arguments. - - Name of the property. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Represents a JSON property. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns a that contains the JSON that was read from the specified . - - - - Asynchronously loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns a that contains the JSON that was read from the specified . - - - - Gets the container's children tokens. - - The container's children tokens. - - - - Gets the property name. - - The property name. - - - - Gets or sets the property value. - - The property value. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Gets the node type for this . - - The type. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Initializes a new instance of the class. - - The property name. - The property content. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Loads a from a . - - A that will be read for the content of the . - A that contains the JSON that was read from the specified . - - - - Loads a from a . - - A that will be read for the content of the . - The used to load the JSON. - If this is null, default load settings will be used. - A that contains the JSON that was read from the specified . - - - - Represents a view of a . - - - - - Initializes a new instance of the class. - - The name. - - - - When overridden in a derived class, returns whether resetting an object changes its value. - - - true if resetting the component changes its value; otherwise, false. - - The component to test for reset capability. - - - - When overridden in a derived class, gets the current value of the property on a component. - - - The value of a property for a given component. - - The component with the property for which to retrieve the value. - - - - When overridden in a derived class, resets the value for this property of the component to the default value. - - The component with the property value that is to be reset to the default value. - - - - When overridden in a derived class, sets the value of the component to a different value. - - The component with the property value that is to be set. - The new value. - - - - When overridden in a derived class, determines a value indicating whether the value of this property needs to be persisted. - - - true if the property should be persisted; otherwise, false. - - The component with the property to be examined for persistence. - - - - When overridden in a derived class, gets the type of the component this property is bound to. - - - A that represents the type of component this property is bound to. - When the or - - methods are invoked, the object specified might be an instance of this type. - - - - - When overridden in a derived class, gets a value indicating whether this property is read-only. - - - true if the property is read-only; otherwise, false. - - - - - When overridden in a derived class, gets the type of the property. - - - A that represents the type of the property. - - - - - Gets the hash code for the name of the member. - - - - The hash code for the name of the member. - - - - - Represents a raw JSON string. - - - - - Asynchronously creates an instance of with the content of the reader's current token. - - The reader. - The token to monitor for cancellation requests. The default value is . - A representing the asynchronous creation. The - property returns an instance of with the content of the reader's current token. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class. - - The raw json. - - - - Creates an instance of with the content of the reader's current token. - - The reader. - An instance of with the content of the reader's current token. - - - - Specifies the settings used when loading JSON. - - - - - Initializes a new instance of the class. - - - - - Gets or sets how JSON comments are handled when loading JSON. - The default value is . - - The JSON comment handling. - - - - Gets or sets how JSON line info is handled when loading JSON. - The default value is . - - The JSON line info handling. - - - - Gets or sets how duplicate property names in JSON objects are handled when loading JSON. - The default value is . - - The JSON duplicate property name handling. - - - - Specifies the settings used when merging JSON. - - - - - Initializes a new instance of the class. - - - - - Gets or sets the method used when merging JSON arrays. - - The method used when merging JSON arrays. - - - - Gets or sets how null value properties are merged. - - How null value properties are merged. - - - - Gets or sets the comparison used to match property names while merging. - The exact property name will be searched for first and if no matching property is found then - the will be used to match a property. - - The comparison used to match property names while merging. - - - - Specifies the settings used when selecting JSON. - - - - - Gets or sets a timeout that will be used when executing regular expressions. - - The timeout that will be used when executing regular expressions. - - - - Gets or sets a flag that indicates whether an error should be thrown if - no tokens are found when evaluating part of the expression. - - - A flag that indicates whether an error should be thrown if - no tokens are found when evaluating part of the expression. - - - - - Represents an abstract JSON token. - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Writes this token to a asynchronously. - - A into which this method will write. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Asynchronously creates a from a . - - An positioned at the token to read into this . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains - the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - An positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains - the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - A positioned at the token to read into this . - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Asynchronously creates a from a . - - A positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - The token to monitor for cancellation requests. The default value is . - - A that represents the asynchronous creation. The - property returns a that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Gets a comparer that can compare two tokens for value equality. - - A that can compare two nodes for value equality. - - - - Gets or sets the parent. - - The parent. - - - - Gets the root of this . - - The root of this . - - - - Gets the node type for this . - - The type. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Compares the values of two tokens, including the values of all descendant tokens. - - The first to compare. - The second to compare. - true if the tokens are equal; otherwise false. - - - - Gets the next sibling token of this node. - - The that contains the next sibling token. - - - - Gets the previous sibling token of this node. - - The that contains the previous sibling token. - - - - Gets the path of the JSON token. - - - - - Adds the specified content immediately after this token. - - A content object that contains simple content or a collection of content objects to be added after this token. - - - - Adds the specified content immediately before this token. - - A content object that contains simple content or a collection of content objects to be added before this token. - - - - Returns a collection of the ancestor tokens of this token. - - A collection of the ancestor tokens of this token. - - - - Returns a collection of tokens that contain this token, and the ancestors of this token. - - A collection of tokens that contain this token, and the ancestors of this token. - - - - Returns a collection of the sibling tokens after this token, in document order. - - A collection of the sibling tokens after this tokens, in document order. - - - - Returns a collection of the sibling tokens before this token, in document order. - - A collection of the sibling tokens before this token, in document order. - - - - Gets the with the specified key. - - The with the specified key. - - - - Gets the with the specified key converted to the specified type. - - The type to convert the token to. - The token key. - The converted token value. - - - - Get the first child token of this token. - - A containing the first child token of the . - - - - Get the last child token of this token. - - A containing the last child token of the . - - - - Returns a collection of the child tokens of this token, in document order. - - An of containing the child tokens of this , in document order. - - - - Returns a collection of the child tokens of this token, in document order, filtered by the specified type. - - The type to filter the child tokens on. - A containing the child tokens of this , in document order. - - - - Returns a collection of the child values of this token, in document order. - - The type to convert the values to. - A containing the child values of this , in document order. - - - - Removes this token from its parent. - - - - - Replaces this token with the specified token. - - The value. - - - - Writes this token to a . - - A into which this method will write. - A collection of which will be used when writing the token. - - - - Returns the indented JSON for this token. - - - ToString() returns a non-JSON string value for tokens with a type of . - If you want the JSON for all token types then you should use . - - - The indented JSON for this token. - - - - - Returns the JSON for this token using the given formatting and converters. - - Indicates how the output should be formatted. - A collection of s which will be used when writing the token. - The JSON for this token using the given formatting and converters. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to []. - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to of . - - The value. - The result of the conversion. - - - - Performs an explicit conversion from to . - - The value. - The result of the conversion. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from [] to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from to . - - The value to create a from. - The initialized with the specified value. - - - - Performs an implicit conversion from of to . - - The value to create a from. - The initialized with the specified value. - - - - Creates a for this token. - - A that can be used to read this token and its descendants. - - - - Creates a from an object. - - The object that will be used to create . - A with the value of the specified object. - - - - Creates a from an object using the specified . - - The object that will be used to create . - The that will be used when reading the object. - A with the value of the specified object. - - - - Creates an instance of the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the . - - The object type that the token will be deserialized to. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates an instance of the specified .NET type from the using the specified . - - The object type that the token will be deserialized to. - The that will be used when creating the object. - The new object created from the JSON value. - - - - Creates a from a . - - A positioned at the token to read into this . - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Creates a from a . - - An positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Load a from a string that contains JSON. - - A that contains JSON. - A populated from the string that contains JSON. - - - - Load a from a string that contains JSON. - - A that contains JSON. - The used to load the JSON. - If this is null, default load settings will be used. - A populated from the string that contains JSON. - - - - Creates a from a . - - A positioned at the token to read into this . - The used to load the JSON. - If this is null, default load settings will be used. - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Creates a from a . - - A positioned at the token to read into this . - - A that contains the token and its descendant tokens - that were read from the reader. The runtime type of the token is determined - by the token type of the first token encountered in the reader. - - - - - Selects a using a JSONPath expression. Selects the token that matches the object path. - - - A that contains a JSONPath expression. - - A , or null. - - - - Selects a using a JSONPath expression. Selects the token that matches the object path. - - - A that contains a JSONPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - A . - - - - Selects a using a JSONPath expression. Selects the token that matches the object path. - - - A that contains a JSONPath expression. - - The used to select tokens. - A . - - - - Selects a collection of elements using a JSONPath expression. - - - A that contains a JSONPath expression. - - An of that contains the selected elements. - - - - Selects a collection of elements using a JSONPath expression. - - - A that contains a JSONPath expression. - - A flag to indicate whether an error should be thrown if no tokens are found when evaluating part of the expression. - An of that contains the selected elements. - - - - Selects a collection of elements using a JSONPath expression. - - - A that contains a JSONPath expression. - - The used to select tokens. - An of that contains the selected elements. - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Creates a new instance of the . All child tokens are recursively cloned. - - A new instance of the . - - - - Adds an object to the annotation list of this . - - The annotation to add. - - - - Get the first annotation object of the specified type from this . - - The type of the annotation to retrieve. - The first annotation object that matches the specified type, or null if no annotation is of the specified type. - - - - Gets the first annotation object of the specified type from this . - - The of the annotation to retrieve. - The first annotation object that matches the specified type, or null if no annotation is of the specified type. - - - - Gets a collection of annotations of the specified type for this . - - The type of the annotations to retrieve. - An that contains the annotations for this . - - - - Gets a collection of annotations of the specified type for this . - - The of the annotations to retrieve. - An of that contains the annotations that match the specified type for this . - - - - Removes the annotations of the specified type from this . - - The type of annotations to remove. - - - - Removes the annotations of the specified type from this . - - The of annotations to remove. - - - - Compares tokens to determine whether they are equal. - - - - - Determines whether the specified objects are equal. - - The first object of type to compare. - The second object of type to compare. - - true if the specified objects are equal; otherwise, false. - - - - - Returns a hash code for the specified object. - - The for which a hash code is to be returned. - A hash code for the specified object. - The type of is a reference type and is null. - - - - Represents a reader that provides fast, non-cached, forward-only access to serialized JSON data. - - - - - Gets the at the reader's current position. - - - - - Initializes a new instance of the class. - - The token to read from. - - - - Initializes a new instance of the class. - - The token to read from. - The initial path of the token. It is prepended to the returned . - - - - Reads the next JSON token from the underlying . - - - true if the next token was read successfully; false if there are no more tokens to read. - - - - - Gets the path of the current JSON token. - - - - - Specifies the type of token. - - - - - No token type has been set. - - - - - A JSON object. - - - - - A JSON array. - - - - - A JSON constructor. - - - - - A JSON object property. - - - - - A comment. - - - - - An integer value. - - - - - A float value. - - - - - A string value. - - - - - A boolean value. - - - - - A null value. - - - - - An undefined value. - - - - - A date value. - - - - - A raw JSON value. - - - - - A collection of bytes value. - - - - - A Guid value. - - - - - A Uri value. - - - - - A TimeSpan value. - - - - - Represents a writer that provides a fast, non-cached, forward-only way of generating JSON data. - - - - - Gets the at the writer's current position. - - - - - Gets the token being written. - - The token being written. - - - - Initializes a new instance of the class writing to the given . - - The container being written to. - - - - Initializes a new instance of the class. - - - - - Flushes whatever is in the buffer to the underlying . - - - - - Closes this writer. - If is set to true, the JSON is auto-completed. - - - Setting to true has no additional effect, since the underlying is a type that cannot be closed. - - - - - Writes the beginning of a JSON object. - - - - - Writes the beginning of a JSON array. - - - - - Writes the start of a constructor with the given name. - - The name of the constructor. - - - - Writes the end. - - The token. - - - - Writes the property name of a name/value pair on a JSON object. - - The name of the property. - - - - Writes a value. - An error will be raised if the value cannot be written as a single JSON token. - - The value to write. - - - - Writes a null value. - - - - - Writes an undefined value. - - - - - Writes raw JSON. - - The raw JSON to write. - - - - Writes a comment /*...*/ containing the specified text. - - Text to place inside the comment. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a [] value. - - The [] value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Writes a value. - - The value to write. - - - - Represents a value in JSON (string, integer, date, etc). - - - - - Writes this token to a asynchronously. - - A into which this method will write. - The token to monitor for cancellation requests. - A collection of which will be used when writing the token. - A that represents the asynchronous write operation. - - - - Initializes a new instance of the class from another object. - - A object to copy from. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Initializes a new instance of the class with the given value. - - The value. - - - - Gets a value indicating whether this token has child tokens. - - - true if this token has child values; otherwise, false. - - - - - Creates a comment with the given value. - - The value. - A comment with the given value. - - - - Creates a string with the given value. - - The value. - A string with the given value. - - - - Creates a null value. - - A null value. - - - - Creates a undefined value. - - A undefined value. - - - - Gets the node type for this . - - The type. - - - - Gets or sets the underlying token value. - - The underlying token value. - - - - Writes this token to a . - - A into which this method will write. - A collection of s which will be used when writing the token. - - - - Indicates whether the current object is equal to another object of the same type. - - - true if the current object is equal to the parameter; otherwise, false. - - An object to compare with this object. - - - - Determines whether the specified is equal to the current . - - The to compare with the current . - - true if the specified is equal to the current ; otherwise, false. - - - - - Serves as a hash function for a particular type. - - - A hash code for the current . - - - - - Returns a that represents this instance. - - - ToString() returns a non-JSON string value for tokens with a type of . - If you want the JSON for all token types then you should use . - - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format provider. - - A that represents this instance. - - - - - Returns a that represents this instance. - - The format. - The format provider. - - A that represents this instance. - - - - - Returns the responsible for binding operations performed on this object. - - The expression tree representation of the runtime value. - - The to bind this object. - - - - - Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object. - - An object to compare with this instance. - - A 32-bit signed integer that indicates the relative order of the objects being compared. The return value has these meanings: - Value - Meaning - Less than zero - This instance is less than . - Zero - This instance is equal to . - Greater than zero - This instance is greater than . - - - is not of the same type as this instance. - - - - - Specifies how line information is handled when loading JSON. - - - - - Ignore line information. - - - - - Load line information. - - - - - Specifies how JSON arrays are merged together. - - - - Concatenate arrays. - - - Union arrays, skipping items that already exist. - - - Replace all array items. - - - Merge array items together, matched by index. - - - - Specifies how null value properties are merged. - - - - - The content's null value properties will be ignored during merging. - - - - - The content's null value properties will be merged. - - - - - Specifies the member serialization options for the . - - - - - All public members are serialized by default. Members can be excluded using or . - This is the default member serialization mode. - - - - - Only members marked with or are serialized. - This member serialization mode can also be set by marking the class with . - - - - - All public and private fields are serialized. Members can be excluded using or . - This member serialization mode can also be set by marking the class with - and setting IgnoreSerializableAttribute on to false. - - - - - Specifies metadata property handling options for the . - - - - - Read metadata properties located at the start of a JSON object. - - - - - Read metadata properties located anywhere in a JSON object. Note that this setting will impact performance. - - - - - Do not try to read metadata properties. - - - - - Specifies missing member handling options for the . - - - - - Ignore a missing member and do not attempt to deserialize it. - - - - - Throw a when a missing member is encountered during deserialization. - - - - - Specifies null value handling options for the . - - - - - - - - - Include null values when serializing and deserializing objects. - - - - - Ignore null values when serializing and deserializing objects. - - - - - Specifies how object creation is handled by the . - - - - - Reuse existing objects, create new objects when needed. - - - - - Only reuse existing objects. - - - - - Always create new objects. - - - - - Specifies reference handling options for the . - Note that references cannot be preserved when a value is set via a non-default constructor such as types that implement . - - - - - - - - Do not preserve references when serializing types. - - - - - Preserve references when serializing into a JSON object structure. - - - - - Preserve references when serializing into a JSON array structure. - - - - - Preserve references when serializing. - - - - - Specifies reference loop handling options for the . - - - - - Throw a when a loop is encountered. - - - - - Ignore loop references and do not serialize. - - - - - Serialize loop references. - - - - - Indicating whether a property is required. - - - - - The property is not required. The default state. - - - - - The property must be defined in JSON but can be a null value. - - - - - The property must be defined in JSON and cannot be a null value. - - - - - The property is not required but it cannot be a null value. - - - - - - Contains the JSON schema extension methods. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - - true if the specified is valid; otherwise, false. - - - - - - Determines whether the is valid. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - When this method returns, contains any error messages generated while validating. - - true if the specified is valid; otherwise, false. - - - - - - Validates the specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - - - - - Validates the specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - The source to test. - The schema to test with. - The validation event handler. - - - - - An in-memory representation of a JSON Schema. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets the id. - - - - - Gets or sets the title. - - - - - Gets or sets whether the object is required. - - - - - Gets or sets whether the object is read-only. - - - - - Gets or sets whether the object is visible to users. - - - - - Gets or sets whether the object is transient. - - - - - Gets or sets the description of the object. - - - - - Gets or sets the types of values allowed by the object. - - The type. - - - - Gets or sets the pattern. - - The pattern. - - - - Gets or sets the minimum length. - - The minimum length. - - - - Gets or sets the maximum length. - - The maximum length. - - - - Gets or sets a number that the value should be divisible by. - - A number that the value should be divisible by. - - - - Gets or sets the minimum. - - The minimum. - - - - Gets or sets the maximum. - - The maximum. - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the minimum attribute (). - - A flag indicating whether the value can not equal the number defined by the minimum attribute (). - - - - Gets or sets a flag indicating whether the value can not equal the number defined by the maximum attribute (). - - A flag indicating whether the value can not equal the number defined by the maximum attribute (). - - - - Gets or sets the minimum number of items. - - The minimum number of items. - - - - Gets or sets the maximum number of items. - - The maximum number of items. - - - - Gets or sets the of items. - - The of items. - - - - Gets or sets a value indicating whether items in an array are validated using the instance at their array position from . - - - true if items are validated using their array position; otherwise, false. - - - - - Gets or sets the of additional items. - - The of additional items. - - - - Gets or sets a value indicating whether additional items are allowed. - - - true if additional items are allowed; otherwise, false. - - - - - Gets or sets whether the array items must be unique. - - - - - Gets or sets the of properties. - - The of properties. - - - - Gets or sets the of additional properties. - - The of additional properties. - - - - Gets or sets the pattern properties. - - The pattern properties. - - - - Gets or sets a value indicating whether additional properties are allowed. - - - true if additional properties are allowed; otherwise, false. - - - - - Gets or sets the required property if this property is present. - - The required property if this property is present. - - - - Gets or sets the a collection of valid enum values allowed. - - A collection of valid enum values allowed. - - - - Gets or sets disallowed types. - - The disallowed types. - - - - Gets or sets the default value. - - The default value. - - - - Gets or sets the collection of that this schema extends. - - The collection of that this schema extends. - - - - Gets or sets the format. - - The format. - - - - Initializes a new instance of the class. - - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The object representing the JSON Schema. - - - - Reads a from the specified . - - The containing the JSON Schema to read. - The to use when resolving schema references. - The object representing the JSON Schema. - - - - Load a from a string that contains JSON Schema. - - A that contains JSON Schema. - A populated from the string that contains JSON Schema. - - - - Load a from a string that contains JSON Schema using the specified . - - A that contains JSON Schema. - The resolver. - A populated from the string that contains JSON Schema. - - - - Writes this schema to a . - - A into which this method will write. - - - - Writes this schema to a using the specified . - - A into which this method will write. - The resolver used. - - - - Returns a that represents the current . - - - A that represents the current . - - - - - - Returns detailed information about the schema exception. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets the line number indicating where the error occurred. - - The line number indicating where the error occurred. - - - - Gets the line position indicating where the error occurred. - - The line position indicating where the error occurred. - - - - Gets the path to the JSON where the error occurred. - - The path to the JSON where the error occurred. - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class - with a specified error message. - - The error message that explains the reason for the exception. - - - - Initializes a new instance of the class - with a specified error message and a reference to the inner exception that is the cause of this exception. - - The error message that explains the reason for the exception. - The exception that is the cause of the current exception, or null if no inner exception is specified. - - - - Initializes a new instance of the class. - - The that holds the serialized object data about the exception being thrown. - The that contains contextual information about the source or destination. - The parameter is null. - The class name is null or is zero (0). - - - - - Generates a from a specified . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets how undefined schemas are handled by the serializer. - - - - - Gets or sets the contract resolver. - - The contract resolver. - - - - Generate a from the specified type. - - The type to generate a from. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - Generate a from the specified type. - - The type to generate a from. - The used to resolve schema references. - Specify whether the generated root will be nullable. - A generated from the specified type. - - - - - Resolves from an id. - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets or sets the loaded schemas. - - The loaded schemas. - - - - Initializes a new instance of the class. - - - - - Gets a for the specified reference. - - The id. - A for the specified reference. - - - - - The value types allowed by the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - No type specified. - - - - - String type. - - - - - Float type. - - - - - Integer type. - - - - - Boolean type. - - - - - Object type. - - - - - Array type. - - - - - Null type. - - - - - Any type. - - - - - - Specifies undefined schema Id handling options for the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Do not infer a schema Id. - - - - - Use the .NET type name as the schema Id. - - - - - Use the assembly qualified .NET type name as the schema Id. - - - - - - Returns detailed information related to the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - Gets the associated with the validation error. - - The JsonSchemaException associated with the validation error. - - - - Gets the path of the JSON location where the validation error occurred. - - The path of the JSON location where the validation error occurred. - - - - Gets the text description corresponding to the validation error. - - The text description. - - - - - Represents the callback method that will handle JSON schema validation events and the . - - - JSON Schema validation has been moved to its own package. See https://www.newtonsoft.com/jsonschema for more details. - - - - - - A camel case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Resolves member mappings for a type, camel casing property names. - - - - - Initializes a new instance of the class. - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Used by to resolve a for a given . - - - - - Gets a value indicating whether members are being get and set using dynamic code generation. - This value is determined by the runtime permissions available. - - - true if using dynamic code generation; otherwise, false. - - - - - Gets or sets the default members search flags. - - The default members search flags. - - - - Gets or sets a value indicating whether compiler generated members should be serialized. - - - true if serialized compiler generated members; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the interface when serializing and deserializing types. - - - true if the interface will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore the attribute when serializing and deserializing types. - - - true if the attribute will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore IsSpecified members when serializing and deserializing types. - - - true if the IsSpecified members will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets a value indicating whether to ignore ShouldSerialize members when serializing and deserializing types. - - - true if the ShouldSerialize members will be ignored when serializing and deserializing types; otherwise, false. - - - - - Gets or sets the naming strategy used to resolve how property names and dictionary keys are serialized. - - The naming strategy used to resolve how property names and dictionary keys are serialized. - - - - Initializes a new instance of the class. - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Gets the serializable members for the type. - - The type to get serializable members for. - The serializable members for the type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates the constructor parameters. - - The constructor to create properties for. - The type's member properties. - Properties for the given . - - - - Creates a for the given . - - The matching member property. - The constructor parameter. - A created for the given . - - - - Resolves the default for the contract. - - Type of the object. - The contract's default . - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Creates a for the given type. - - Type of the object. - A for the given type. - - - - Determines which contract type is created for the given type. - - Type of the object. - A for the given type. - - - - Creates properties for the given . - - The type to create properties for. - /// The member serialization mode for the type. - Properties for the given . - - - - Creates the used by the serializer to get and set values from a member. - - The member. - The used by the serializer to get and set values from a member. - - - - Creates a for the given . - - The member's parent . - The member to create a for. - A created for the given . - - - - Resolves the name of the property. - - Name of the property. - Resolved name of the property. - - - - Resolves the name of the extension data. By default no changes are made to extension data names. - - Name of the extension data. - Resolved name of the extension data. - - - - Resolves the key of the dictionary. By default is used to resolve dictionary keys. - - Key of the dictionary. - Resolved key of the dictionary. - - - - Gets the resolved name of the property. - - Name of the property. - Name of the property. - - - - The default naming strategy. Property names and dictionary keys are unchanged. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - The default serialization binder used when resolving and loading classes from type names. - - - - - Initializes a new instance of the class. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - The type of the object the formatter creates a new instance of. - - - - - When overridden in a derived class, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Represents a trace writer that writes to the application's instances. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - - The that will be used to filter the trace messages passed to the writer. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Get and set values for a using dynamic methods. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides information surrounding an error. - - - - - Gets the error. - - The error. - - - - Gets the original object that caused the error. - - The original object that caused the error. - - - - Gets the member that caused the error. - - The member that caused the error. - - - - Gets the path of the JSON location where the error occurred. - - The path of the JSON location where the error occurred. - - - - Gets or sets a value indicating whether this is handled. - - true if handled; otherwise, false. - - - - Provides data for the Error event. - - - - - Gets the current object the error event is being raised against. - - The current object the error event is being raised against. - - - - Gets the error context. - - The error context. - - - - Initializes a new instance of the class. - - The current object. - The error context. - - - - Get and set values for a using dynamic methods. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Provides methods to get attributes. - - - - - Returns a collection of all of the attributes, or an empty collection if there are no attributes. - - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. - - The type of the attributes. - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Used by to resolve a for a given . - - - - - - - - - Resolves the contract for a given type. - - The type to resolve a contract for. - The contract for a given type. - - - - Used to resolve references when serializing and deserializing JSON by the . - - - - - Resolves a reference to its object. - - The serialization context. - The reference to resolve. - The object that was resolved from the reference. - - - - Gets the reference for the specified object. - - The serialization context. - The object to get a reference for. - The reference to the object. - - - - Determines whether the specified object is referenced. - - The serialization context. - The object to test for a reference. - - true if the specified object is referenced; otherwise, false. - - - - - Adds a reference to the specified object. - - The serialization context. - The reference. - The object to reference. - - - - Allows users to control class loading and mandate what class to load. - - - - - When implemented, controls the binding of a serialized object to a type. - - Specifies the name of the serialized object. - Specifies the name of the serialized object - The type of the object the formatter creates a new instance of. - - - - When implemented, controls the binding of a serialized object to a type. - - The type of the object the formatter creates a new instance of. - Specifies the name of the serialized object. - Specifies the name of the serialized object. - - - - Represents a trace writer. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - The that will be used to filter the trace messages passed to the writer. - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Provides methods to get and set values. - - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - Contract details for a used by the . - - - - - Gets the of the collection items. - - The of the collection items. - - - - Gets a value indicating whether the collection type is a multidimensional array. - - true if the collection type is a multidimensional array; otherwise, false. - - - - Gets or sets the function used to create the object. When set this function will override . - - The function used to create the object. - - - - Gets a value indicating whether the creator has a parameter with the collection values. - - true if the creator has a parameter with the collection values; otherwise, false. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the default collection items . - - The converter. - - - - Gets or sets a value indicating whether the collection items preserve object references. - - true if collection items preserve object references; otherwise, false. - - - - Gets or sets the collection item reference loop handling. - - The reference loop handling. - - - - Gets or sets the collection item type name handling. - - The type name handling. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Handles serialization callback events. - - The object that raised the callback event. - The streaming context. - - - - Handles serialization error callback events. - - The object that raised the callback event. - The streaming context. - The error context. - - - - Sets extension data for an object during deserialization. - - The object to set extension data on. - The extension data key. - The extension data value. - - - - Gets extension data for an object during serialization. - - The object to set extension data on. - - - - Contract details for a used by the . - - - - - Gets the underlying type for the contract. - - The underlying type for the contract. - - - - Gets or sets the type created during deserialization. - - The type created during deserialization. - - - - Gets or sets whether this type contract is serialized as a reference. - - Whether this type contract is serialized as a reference. - - - - Gets or sets the default for this contract. - - The converter. - - - - Gets the internally resolved for the contract's type. - This converter is used as a fallback converter when no other converter is resolved. - Setting will always override this converter. - - - - - Gets or sets all methods called immediately after deserialization of the object. - - The methods called immediately after deserialization of the object. - - - - Gets or sets all methods called during deserialization of the object. - - The methods called during deserialization of the object. - - - - Gets or sets all methods called after serialization of the object graph. - - The methods called after serialization of the object graph. - - - - Gets or sets all methods called before serialization of the object. - - The methods called before serialization of the object. - - - - Gets or sets all method called when an error is thrown during the serialization of the object. - - The methods called when an error is thrown during the serialization of the object. - - - - Gets or sets the default creator method used to create the object. - - The default creator method used to create the object. - - - - Gets or sets a value indicating whether the default creator is non-public. - - true if the default object creator is non-public; otherwise, false. - - - - Contract details for a used by the . - - - - - Gets or sets the dictionary key resolver. - - The dictionary key resolver. - - - - Gets the of the dictionary keys. - - The of the dictionary keys. - - - - Gets the of the dictionary values. - - The of the dictionary values. - - - - Gets or sets the function used to create the object. When set this function will override . - - The function used to create the object. - - - - Gets a value indicating whether the creator has a parameter with the dictionary values. - - true if the creator has a parameter with the dictionary values; otherwise, false. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets the object's properties. - - The object's properties. - - - - Gets or sets the property name resolver. - - The property name resolver. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the object constructor. - - The object constructor. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Gets or sets the object member serialization. - - The member object serialization. - - - - Gets or sets the missing member handling used when deserializing this object. - - The missing member handling. - - - - Gets or sets a value that indicates whether the object's properties are required. - - - A value indicating whether the object's properties are required. - - - - - Gets or sets how the object's properties with null values are handled during serialization and deserialization. - - How the object's properties with null values are handled during serialization and deserialization. - - - - Gets the object's properties. - - The object's properties. - - - - Gets a collection of instances that define the parameters used with . - - - - - Gets or sets the function used to create the object. When set this function will override . - This function is called with a collection of arguments which are defined by the collection. - - The function used to create the object. - - - - Gets or sets the extension data setter. - - - - - Gets or sets the extension data getter. - - - - - Gets or sets the extension data value type. - - - - - Gets or sets the extension data name resolver. - - The extension data name resolver. - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Maps a JSON property to a .NET member or constructor parameter. - - - - - Gets or sets the name of the property. - - The name of the property. - - - - Gets or sets the type that declared this property. - - The type that declared this property. - - - - Gets or sets the order of serialization of a member. - - The numeric order of serialization. - - - - Gets or sets the name of the underlying member or parameter. - - The name of the underlying member or parameter. - - - - Gets the that will get and set the during serialization. - - The that will get and set the during serialization. - - - - Gets or sets the for this property. - - The for this property. - - - - Gets or sets the type of the property. - - The type of the property. - - - - Gets or sets the for the property. - If set this converter takes precedence over the contract converter for the property type. - - The converter. - - - - Gets or sets the member converter. - - The member converter. - - - - Gets or sets a value indicating whether this is ignored. - - true if ignored; otherwise, false. - - - - Gets or sets a value indicating whether this is readable. - - true if readable; otherwise, false. - - - - Gets or sets a value indicating whether this is writable. - - true if writable; otherwise, false. - - - - Gets or sets a value indicating whether this has a member attribute. - - true if has a member attribute; otherwise, false. - - - - Gets the default value. - - The default value. - - - - Gets or sets a value indicating whether this is required. - - A value indicating whether this is required. - - - - Gets a value indicating whether has a value specified. - - - - - Gets or sets a value indicating whether this property preserves object references. - - - true if this instance is reference; otherwise, false. - - - - - Gets or sets the property null value handling. - - The null value handling. - - - - Gets or sets the property default value handling. - - The default value handling. - - - - Gets or sets the property reference loop handling. - - The reference loop handling. - - - - Gets or sets the property object creation handling. - - The object creation handling. - - - - Gets or sets or sets the type name handling. - - The type name handling. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets a predicate used to determine whether the property should be deserialized. - - A predicate used to determine whether the property should be deserialized. - - - - Gets or sets a predicate used to determine whether the property should be serialized. - - A predicate used to determine whether the property should be serialized. - - - - Gets or sets an action used to set whether the property has been deserialized. - - An action used to set whether the property has been deserialized. - - - - Returns a that represents this instance. - - - A that represents this instance. - - - - - Gets or sets the converter used when serializing the property's collection items. - - The collection's items converter. - - - - Gets or sets whether this property's collection items are serialized as a reference. - - Whether this property's collection items are serialized as a reference. - - - - Gets or sets the type name handling used when serializing the property's collection items. - - The collection's items type name handling. - - - - Gets or sets the reference loop handling used when serializing the property's collection items. - - The collection's items reference loop handling. - - - - A collection of objects. - - - - - Initializes a new instance of the class. - - The type. - - - - When implemented in a derived class, extracts the key from the specified element. - - The element from which to extract the key. - The key for the specified element. - - - - Adds a object. - - The property to add to the collection. - - - - Gets the closest matching object. - First attempts to get an exact case match of and then - a case insensitive match. - - Name of the property. - A matching property if found. - - - - Gets a property by property name. - - The name of the property to get. - Type property name string comparison. - A matching property if found. - - - - Contract details for a used by the . - - - - - Initializes a new instance of the class. - - The underlying type for the contract. - - - - Lookup and create an instance of the type described by the argument. - - The type to create. - Optional arguments to pass to an initializing constructor of the JsonConverter. - If null, the default constructor is used. - - - - A kebab case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Represents a trace writer that writes to memory. When the trace message limit is - reached then old trace messages will be removed as new messages are added. - - - - - Gets the that will be used to filter the trace messages passed to the writer. - For example a filter level of will exclude messages and include , - and messages. - - - The that will be used to filter the trace messages passed to the writer. - - - - - Initializes a new instance of the class. - - - - - Writes the specified trace level, message and optional exception. - - The at which to write this trace. - The trace message. - The trace exception. This parameter is optional. - - - - Returns an enumeration of the most recent trace messages. - - An enumeration of the most recent trace messages. - - - - Returns a of the most recent trace messages. - - - A of the most recent trace messages. - - - - - A base class for resolving how property names and dictionary keys are serialized. - - - - - A flag indicating whether dictionary keys should be processed. - Defaults to false. - - - - - A flag indicating whether extension data names should be processed. - Defaults to false. - - - - - A flag indicating whether explicitly specified property names, - e.g. a property name customized with a , should be processed. - Defaults to false. - - - - - Gets the serialized name for a given property name. - - The initial property name. - A flag indicating whether the property has had a name explicitly specified. - The serialized property name. - - - - Gets the serialized name for a given extension data name. - - The initial extension data name. - The serialized extension data name. - - - - Gets the serialized key for a given dictionary key. - - The initial dictionary key. - The serialized dictionary key. - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Hash code calculation - - - - - - Object equality implementation - - - - - - - Compare to another NamingStrategy - - - - - - - Represents a method that constructs an object. - - The object type to create. - - - - When applied to a method, specifies that the method is called when an error occurs serializing an object. - - - - - Provides methods to get attributes from a , , or . - - - - - Initializes a new instance of the class. - - The instance to get attributes for. This parameter should be a , , or . - - - - Returns a collection of all of the attributes, or an empty collection if there are no attributes. - - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Returns a collection of attributes, identified by type, or an empty collection if there are no attributes. - - The type of the attributes. - When true, look up the hierarchy chain for the inherited custom attribute. - A collection of s, or an empty collection. - - - - Get and set values for a using reflection. - - - - - Initializes a new instance of the class. - - The member info. - - - - Sets the value. - - The target to set the value on. - The value to set on the target. - - - - Gets the value. - - The target to get the value from. - The value. - - - - A snake case naming strategy. - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - - - Initializes a new instance of the class. - - - A flag indicating whether dictionary keys should be processed. - - - A flag indicating whether explicitly specified property names should be processed, - e.g. a property name customized with a . - - - A flag indicating whether extension data names should be processed. - - - - - Initializes a new instance of the class. - - - - - Resolves the specified property name. - - The property name to resolve. - The resolved property name. - - - - Specifies how strings are escaped when writing JSON text. - - - - - Only control characters (e.g. newline) are escaped. - - - - - All non-ASCII and control characters (e.g. newline) are escaped. - - - - - HTML (<, >, &, ', ") and control characters (e.g. newline) are escaped. - - - - - Indicates the method that will be used during deserialization for locating and loading assemblies. - - - - - In simple mode, the assembly used during deserialization need not match exactly the assembly used during serialization. Specifically, the version numbers need not match as the LoadWithPartialName method of the class is used to load the assembly. - - - - - In full mode, the assembly used during deserialization must match exactly the assembly used during serialization. The Load method of the class is used to load the assembly. - - - - - Specifies type name handling options for the . - - - should be used with caution when your application deserializes JSON from an external source. - Incoming types should be validated with a custom - when deserializing with a value other than . - - - - - Do not include the .NET type name when serializing types. - - - - - Include the .NET type name when serializing into a JSON object structure. - - - - - Include the .NET type name when serializing into a JSON array structure. - - - - - Always include the .NET type name when serializing. - - - - - Include the .NET type name when the type of the object being serialized is not the same as its declared type. - Note that this doesn't include the root serialized object by default. To include the root object's type name in JSON - you must specify a root type object with - or . - - - - - Determines whether the collection is null or empty. - - The collection. - - true if the collection is null or empty; otherwise, false. - - - - - Adds the elements of the specified collection to the specified generic . - - The list to add to. - The collection of elements to add. - - - - Converts the value to the specified type. If the value is unable to be converted, the - value is checked whether it assignable to the specified type. - - The value to convert. - The culture to use when converting. - The type to convert or cast the value to. - - The converted type. If conversion was unsuccessful, the initial value - is returned if assignable to the target type. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic that returns a result - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Helper method for generating a MetaObject which calls a - specific method on Dynamic, but uses one of the arguments for - the result. - - - - - Returns a Restrictions object which includes our current restrictions merged - with a restriction limiting our type - - - - - Helper class for serializing immutable collections. - Note that this is used by all builds, even those that don't support immutable collections, in case the DLL is GACed - https://github.com/JamesNK/Newtonsoft.Json/issues/652 - - - - - Gets the type of the typed collection's items. - - The type. - The type of the typed collection's items. - - - - Gets the member's underlying type. - - The member. - The underlying type of the member. - - - - Determines whether the property is an indexed property. - - The property. - - true if the property is an indexed property; otherwise, false. - - - - - Gets the member's value on the object. - - The member. - The target object. - The member's value on the object. - - - - Sets the member's value on the target object. - - The member. - The target. - The value. - - - - Determines whether the specified MemberInfo can be read. - - The MemberInfo to determine whether can be read. - /// if set to true then allow the member to be gotten non-publicly. - - true if the specified MemberInfo can be read; otherwise, false. - - - - - Determines whether the specified MemberInfo can be set. - - The MemberInfo to determine whether can be set. - if set to true then allow the member to be set non-publicly. - if set to true then allow the member to be set if read-only. - - true if the specified MemberInfo can be set; otherwise, false. - - - - - Builds a string. Unlike this class lets you reuse its internal buffer. - - - - - Determines whether the string is all white space. Empty string will return false. - - The string to test whether it is all white space. - - true if the string is all white space; otherwise, false. - - - - - Specifies the state of the . - - - - - An exception has been thrown, which has left the in an invalid state. - You may call the method to put the in the Closed state. - Any other method calls result in an being thrown. - - - - - The method has been called. - - - - - An object is being written. - - - - - An array is being written. - - - - - A constructor is being written. - - - - - A property is being written. - - - - - A write method has not been called. - - - - Specifies that an output will not be null even if the corresponding type allows it. - - - Specifies that when a method returns , the parameter will not be null even if the corresponding type allows it. - - - Initializes the attribute with the specified return value condition. - - The return value condition. If the method returns this value, the associated parameter will not be null. - - - - Gets the return value condition. - - - Specifies that an output may be null even if the corresponding type disallows it. - - - Specifies that null is allowed as an input even if the corresponding type disallows it. - - - - Specifies that the method will not return if the associated Boolean parameter is passed the specified value. - - - - - Initializes a new instance of the class. - - - The condition parameter value. Code after the method will be considered unreachable by diagnostics if the argument to - the associated parameter matches this value. - - - - Gets the condition parameter value. - - - diff --git a/SYS.Library/RequestHelper.dll b/SYS.Library/RequestHelper.dll deleted file mode 100644 index d330811b24d0aa553bf76a2a2af61de553e18316..0000000000000000000000000000000000000000 Binary files a/SYS.Library/RequestHelper.dll and /dev/null differ diff --git a/SYS.Library/SYS.Library.csproj b/SYS.Library/SYS.Library.csproj index 69112bc8987c836a5cbf366036a52c8505e038f6..205a5d2ddacdf6409348e4b7b052cb9bcf51a6b7 100644 --- a/SYS.Library/SYS.Library.csproj +++ b/SYS.Library/SYS.Library.csproj @@ -55,12 +55,6 @@ - - - - - - diff --git "a/\347\211\210\346\234\254\350\277\255\344\273\243\345\212\237\350\203\275/\347\231\273\351\231\206\346\265\201\347\250\213\345\233\276.png" "b/\347\211\210\346\234\254\350\277\255\344\273\243\345\212\237\350\203\275/\347\231\273\351\231\206\346\265\201\347\250\213\345\233\276.png" deleted file mode 100644 index 1837aa599af6046f06b6e8d22916f47c8e25d9fd..0000000000000000000000000000000000000000 Binary files "a/\347\211\210\346\234\254\350\277\255\344\273\243\345\212\237\350\203\275/\347\231\273\351\231\206\346\265\201\347\250\213\345\233\276.png" and /dev/null differ