Browse Source

添加报表服务

master
郑勃旭 1 year ago
parent
commit
d496ca1d3c
  1. 1
      WinIn.FasterZ.AgGridReport/.gitattributes
  2. 265
      WinIn.FasterZ.AgGridReport/.gitignore
  3. 5
      WinIn.FasterZ.AgGridReport/.prettierrc
  4. 5
      WinIn.FasterZ.AgGridReport/NuGet.Config
  5. 130
      WinIn.FasterZ.AgGridReport/WinIn.FasterZ.AgGridReport.sln
  6. 23
      WinIn.FasterZ.AgGridReport/WinIn.FasterZ.AgGridReport.sln.DotSettings
  7. 19
      WinIn.FasterZ.AgGridReport/common.props
  8. 28
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/AgGridReportApplicationContractsModule.cs
  9. 28
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/AgGridReportDtoExtensions.cs
  10. 20
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/Permissions/AgGridReportPermissionDefinitionProvider.cs
  11. 9
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/Permissions/AgGridReportPermissions.cs
  12. 25
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn.FasterZ.AgGridReport.Application.Contracts.csproj
  13. 22
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/CreateUpdateMapperProcDto.cs
  14. 26
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/MapperProcDto.cs
  15. 24
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/MapperProcGetListInput.cs
  16. 20
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/IMapperProcAppService.cs
  17. 17
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportAppService.cs
  18. 17
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportApplicationAutoMapperProfile.cs
  19. 31
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportApplicationModule.cs
  20. 2
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/Properties/AssemblyInfo.cs
  21. 141
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/ReportProcAppService.cs
  22. 27
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/WinIn.FasterZ.AgGridReport.Application.csproj
  23. 33
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/WinIn/FasterZ/AgGridReport/MapperProcAppService.cs
  24. 15
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/AgGridReportDbMigratorModule.cs
  25. 51
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/DbMigratorHostedService.cs
  26. 41
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/Program.cs
  27. 45
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/WinIn.FasterZ.AgGridReport.DbMigrator.csproj
  28. 27
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/appsettings.json
  29. 2
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/appsettings.secrets.json
  30. 6
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportDomainErrorCodes.cs
  31. 58
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportDomainSharedModule.cs
  32. 22
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportGlobalFeatureConfigurator.cs
  33. 73
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportModuleExtensionConfigurator.cs
  34. 17
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ar.json
  35. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/cs.json
  36. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/de.json
  37. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/en-GB.json
  38. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/en.json
  39. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/es.json
  40. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/fi.json
  41. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/fr.json
  42. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hi.json
  43. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hr.json
  44. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hu.json
  45. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/is.json
  46. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/it.json
  47. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/nl.json
  48. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/pl-PL.json
  49. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/pt-BR.json
  50. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ro-RO.json
  51. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ru.json
  52. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/sk.json
  53. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/sl.json
  54. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/tr.json
  55. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/vi.json
  56. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/zh-Hans.json
  57. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/zh-Hant.json
  58. 9
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReportResource.cs
  59. 10
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs
  60. 32
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/WinIn.FasterZ.AgGridReport.Domain.Shared.csproj
  61. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/AgGridReportConsts.cs
  62. 68
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/AgGridReportDomainModule.cs
  63. 218
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/AgGridReportDbMigrationService.cs
  64. 8
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/IAgGridReportDbSchemaMigrator.cs
  65. 15
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/NullAgGridReportDbSchemaMigrator.cs
  66. 18
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/MapperProc.cs
  67. 405
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/OpenIddict/OpenIddictDataSeedContributor.cs
  68. 3
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Properties/AssemblyInfo.cs
  69. 12
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Settings/AgGridReportSettingDefinitionProvider.cs
  70. 9
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Settings/AgGridReportSettings.cs
  71. 28
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/WinIn.FasterZ.AgGridReport.Domain.csproj
  72. 11
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/WinIn/FasterZ/AgGridReport/IMapperProcRepository.cs
  73. 102
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportDbContext.cs
  74. 33
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportDbContextFactory.cs
  75. 44
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportEfCoreEntityExtensionMappings.cs
  76. 56
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportEntityFrameworkCoreModule.cs
  77. 34
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAgGridReportDbSchemaMigrator.cs
  78. 1870
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231030033602_Initial.Designer.cs
  79. 1084
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231030033602_Initial.cs
  80. 1895
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231031005700_Added_MapperProc.Designer.cs
  81. 37
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231031005700_Added_MapperProc.cs
  82. 1892
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/AgGridReportDbContextModelSnapshot.cs
  83. 2
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Properties/AssemblyInfo.cs
  84. 31
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn.FasterZ.AgGridReport.EntityFrameworkCore.csproj
  85. 22
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn/FasterZ/AgGridReport/MapperProcEfCoreQuerableExtensions.cs
  86. 20
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn/FasterZ/AgGridReport/MapperProcRepository.cs
  87. 38
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi.Client/AgGridReportHttpApiClientModule.cs
  88. 29
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi.Client/WinIn.FasterZ.AgGridReport.HttpApi.Client.csproj
  89. 41
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/AgGridReportHttpApiModule.cs
  90. 14
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/Controllers/AgGridReportController.cs
  91. 10
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/Models/Test/TestModel.cs
  92. 24
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/WinIn.FasterZ.AgGridReport.HttpApi.csproj
  93. 10
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportBrandingProvider.cs
  94. 15
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportWebAutoMapperProfile.cs
  95. 242
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportWebModule.cs
  96. 4
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Components/_ViewImports.cshtml
  97. 54
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Menus/AgGridReportMenuContributor.cs
  98. 11
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Menus/AgGridReportMenus.cs
  99. 14
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Pages/AgGridReportPageModel.cs
  100. 187
      WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Pages/Index.cshtml

1
WinIn.FasterZ.AgGridReport/.gitattributes

@ -0,0 +1 @@
**/wwwroot/libs/** linguist-vendored

265
WinIn.FasterZ.AgGridReport/.gitignore

@ -0,0 +1,265 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
# Visual Studio 2015 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUNIT
*.VisualState.xml
TestResult.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# DNX
project.lock.json
artifacts/
*_i.c
*_p.c
*_i.h
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*.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
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# JustCode is a .NET coding add-in
.JustCode
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# 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
# TODO: 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
# The packages folder can be ignored because of Package Restore
**/packages/*
# except build/, which is used as an MSBuild target.
!**/packages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/packages/repositories.config
# NuGet v3's project.json files produces more ignoreable 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
# 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
*.pfx
*.publishsettings
node_modules/
orleans.codegen.cs
# 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
# SQL Server files
*.mdf
*.ldf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# 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/
# JetBrains Rider
.idea/
*.sln.iml
# AgGridReport
src/WinIn.FasterZ.AgGridReport.Web/Logs/*
src/WinIn.FasterZ.AgGridReport.Web.Host/Logs/*
src/WinIn.FasterZ.AgGridReport.AuthServer/Logs/*
src/WinIn.FasterZ.AgGridReport.HttpApi.Host/Logs/*
src/WinIn.FasterZ.AgGridReport.HttpApi.HostWithIds/Logs/*
src/WinIn.FasterZ.AgGridReport.DbMigrator/Logs/*
src/WinIn.FasterZ.AgGridReport.Blazor.Server/Logs/*
src/WinIn.FasterZ.AgGridReport.Blazor.Server.Tiered/Logs/*
# Use abp install-libs to restore.
**/wwwroot/libs/*

5
WinIn.FasterZ.AgGridReport/.prettierrc

@ -0,0 +1,5 @@
{
"singleQuote": true,
"useTabs": false,
"tabWidth": 4
}

5
WinIn.FasterZ.AgGridReport/NuGet.Config

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>
</packageSources>
</configuration>

130
WinIn.FasterZ.AgGridReport/WinIn.FasterZ.AgGridReport.sln

@ -0,0 +1,130 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29020.237
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Domain", "src\WinIn.FasterZ.AgGridReport.Domain\WinIn.FasterZ.AgGridReport.Domain.csproj", "{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Application", "src\WinIn.FasterZ.AgGridReport.Application\WinIn.FasterZ.AgGridReport.Application.csproj", "{1A94A50E-06DC-43C1-80B5-B662820EC3EB}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.EntityFrameworkCore", "src\WinIn.FasterZ.AgGridReport.EntityFrameworkCore\WinIn.FasterZ.AgGridReport.EntityFrameworkCore.csproj", "{C956DD76-69C8-4A9C-83EA-D17DF83340FD}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Web", "src\WinIn.FasterZ.AgGridReport.Web\WinIn.FasterZ.AgGridReport.Web.csproj", "{068855E8-9240-4F1A-910B-CF825794513B}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{CA9AC87F-097E-4F15-8393-4BC07735A5B0}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "test", "test", "{04DBDB01-70F4-4E06-B468-8F87850B22BE}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Application.Tests", "test\WinIn.FasterZ.AgGridReport.Application.Tests\WinIn.FasterZ.AgGridReport.Application.Tests.csproj", "{50B2631D-129C-47B3-A587-029CCD6099BC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Web.Tests", "test\WinIn.FasterZ.AgGridReport.Web.Tests\WinIn.FasterZ.AgGridReport.Web.Tests.csproj", "{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Domain.Shared", "src\WinIn.FasterZ.AgGridReport.Domain.Shared\WinIn.FasterZ.AgGridReport.Domain.Shared.csproj", "{42F719ED-8413-4895-B5B4-5AB56079BC66}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Application.Contracts", "src\WinIn.FasterZ.AgGridReport.Application.Contracts\WinIn.FasterZ.AgGridReport.Application.Contracts.csproj", "{520659C8-C734-4298-A3DA-B539DB9DFC0B}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.HttpApi", "src\WinIn.FasterZ.AgGridReport.HttpApi\WinIn.FasterZ.AgGridReport.HttpApi.csproj", "{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.HttpApi.Client", "src\WinIn.FasterZ.AgGridReport.HttpApi.Client\WinIn.FasterZ.AgGridReport.HttpApi.Client.csproj", "{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.EntityFrameworkCore.Tests", "test\WinIn.FasterZ.AgGridReport.EntityFrameworkCore.Tests\WinIn.FasterZ.AgGridReport.EntityFrameworkCore.Tests.csproj", "{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.TestBase", "test\WinIn.FasterZ.AgGridReport.TestBase\WinIn.FasterZ.AgGridReport.TestBase.csproj", "{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.Domain.Tests", "test\WinIn.FasterZ.AgGridReport.Domain.Tests\WinIn.FasterZ.AgGridReport.Domain.Tests.csproj", "{E512F4D9-9375-480F-A2F6-A46509F9D824}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.HttpApi.Client.ConsoleTestApp", "test\WinIn.FasterZ.AgGridReport.HttpApi.Client.ConsoleTestApp\WinIn.FasterZ.AgGridReport.HttpApi.Client.ConsoleTestApp.csproj", "{EF480016-9127-4916-8735-D2466BDBC582}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WinIn.FasterZ.AgGridReport.DbMigrator", "src\WinIn.FasterZ.AgGridReport.DbMigrator\WinIn.FasterZ.AgGridReport.DbMigrator.csproj", "{AA94D832-1CCC-4715-95A9-A483F23A1A5D}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Debug|Any CPU.Build.0 = Debug|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.ActiveCfg = Release|Any CPU
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F}.Release|Any CPU.Build.0 = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1A94A50E-06DC-43C1-80B5-B662820EC3EB}.Release|Any CPU.Build.0 = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
{C956DD76-69C8-4A9C-83EA-D17DF83340FD}.Release|Any CPU.Build.0 = Release|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{068855E8-9240-4F1A-910B-CF825794513B}.Release|Any CPU.Build.0 = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{50B2631D-129C-47B3-A587-029CCD6099BC}.Release|Any CPU.Build.0 = Release|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Debug|Any CPU.Build.0 = Debug|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.ActiveCfg = Release|Any CPU
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674}.Release|Any CPU.Build.0 = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Debug|Any CPU.Build.0 = Debug|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.ActiveCfg = Release|Any CPU
{42F719ED-8413-4895-B5B4-5AB56079BC66}.Release|Any CPU.Build.0 = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{520659C8-C734-4298-A3DA-B539DB9DFC0B}.Release|Any CPU.Build.0 = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27}.Release|Any CPU.Build.0 = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC}.Release|Any CPU.Build.0 = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81}.Release|Any CPU.Build.0 = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Debug|Any CPU.Build.0 = Debug|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.ActiveCfg = Release|Any CPU
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7}.Release|Any CPU.Build.0 = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Debug|Any CPU.Build.0 = Debug|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.ActiveCfg = Release|Any CPU
{E512F4D9-9375-480F-A2F6-A46509F9D824}.Release|Any CPU.Build.0 = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Debug|Any CPU.Build.0 = Debug|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.ActiveCfg = Release|Any CPU
{EF480016-9127-4916-8735-D2466BDBC582}.Release|Any CPU.Build.0 = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Debug|Any CPU.Build.0 = Debug|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.ActiveCfg = Release|Any CPU
{AA94D832-1CCC-4715-95A9-A483F23A1A5D}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{554AD327-6DBA-4F8F-96F8-81CE7A0C863F} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1A94A50E-06DC-43C1-80B5-B662820EC3EB} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{C956DD76-69C8-4A9C-83EA-D17DF83340FD} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{068855E8-9240-4F1A-910B-CF825794513B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{50B2631D-129C-47B3-A587-029CCD6099BC} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{5F1B28C6-8D0C-4155-92D0-252F7EA5F674} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{42F719ED-8413-4895-B5B4-5AB56079BC66} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{520659C8-C734-4298-A3DA-B539DB9DFC0B} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{4164BDF7-F527-4E85-9CE6-E3C2D7426A27} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{3B5A0094-670D-4BB1-BFDD-61B88A8773DC} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
{1FE30EB9-74A9-47F5-A9F6-7B1FAB672D81} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{91853F21-9CD9-4132-BC29-A7D5D84FFFE7} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{E512F4D9-9375-480F-A2F6-A46509F9D824} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{EF480016-9127-4916-8735-D2466BDBC582} = {04DBDB01-70F4-4E06-B468-8F87850B22BE}
{AA94D832-1CCC-4715-95A9-A483F23A1A5D} = {CA9AC87F-097E-4F15-8393-4BC07735A5B0}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {28315BFD-90E7-4E14-A2EA-F3D23AF4126F}
EndGlobalSection
EndGlobal

23
WinIn.FasterZ.AgGridReport/WinIn.FasterZ.AgGridReport.sln.DotSettings

@ -0,0 +1,23 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:Boolean x:Key="/Default/CodeEditing/Intellisense/CodeCompletion/IntelliSenseCompletingCharacters/CSharpCompletingCharacters/UpgradedFromVSSettings/@EntryValue">True</s:Boolean>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceDoWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceFixedStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForeachStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceForStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceIfStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceLockStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceUsingStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeInspection/Highlighting/InspectionSeverities/=EnforceWhileStatementBraces/@EntryIndexedValue">WARNING</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOR/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_FOREACH/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_IFELSE/@EntryValue">Required</s:String>
<s:String x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_FOR_WHILE/@EntryValue">Required</s:String>
<s:Boolean x:Key="/Default/CodeStyle/CodeFormatting/CSharpCodeStyle/BRACES_REDUNDANT/@EntryValue">False</s:Boolean>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Implementations/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Implementations/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:Boolean x:Key="/Default/CodeStyle/Generate/=Overrides/@KeyIndexDefined">True</s:Boolean>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Async/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Generate/=Overrides/Options/=Mutable/@EntryIndexedValue">False</s:String>
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=SQL/@EntryIndexedValue">SQL</s:String>
</wpf:ResourceDictionary>

19
WinIn.FasterZ.AgGridReport/common.props

@ -0,0 +1,19 @@
<Project>
<PropertyGroup>
<LangVersion>latest</LangVersion>
<Version>1.0.0</Version>
<NoWarn>$(NoWarn);CS1591</NoWarn>
<AbpProjectType>app</AbpProjectType>
</PropertyGroup>
<Target Name="NoWarnOnRazorViewImportedTypeConflicts" BeforeTargets="RazorCoreCompile">
<PropertyGroup>
<NoWarn>$(NoWarn);0436</NoWarn>
</PropertyGroup>
</Target>
<ItemGroup>
<Content Remove="$(UserProfile)\.nuget\packages\*\*\contentFiles\any\*\*.abppkg*.json" />
</ItemGroup>
</Project>

28
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/AgGridReportApplicationContractsModule.cs

@ -0,0 +1,28 @@
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AgGridReportDomainSharedModule),
typeof(AbpAccountApplicationContractsModule),
typeof(AbpFeatureManagementApplicationContractsModule),
typeof(AbpIdentityApplicationContractsModule),
typeof(AbpPermissionManagementApplicationContractsModule),
typeof(AbpSettingManagementApplicationContractsModule),
typeof(AbpTenantManagementApplicationContractsModule),
typeof(AbpObjectExtendingModule)
)]
public class AgGridReportApplicationContractsModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
AgGridReportDtoExtensions.Configure();
}
}

28
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/AgGridReportDtoExtensions.cs

@ -0,0 +1,28 @@
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace WinIn.FasterZ.AgGridReport;
public static class AgGridReportDtoExtensions
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can add extension properties to DTOs
* defined in the depended modules.
*
* Example:
*
* ObjectExtensionManager.Instance
* .AddOrUpdateProperty<IdentityRoleDto, string>("Title");
*
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Object-Extensions
*/
});
}
}

20
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/Permissions/AgGridReportPermissionDefinitionProvider.cs

@ -0,0 +1,20 @@
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Localization;
namespace WinIn.FasterZ.AgGridReport.Permissions;
public class AgGridReportPermissionDefinitionProvider : PermissionDefinitionProvider
{
public override void Define(IPermissionDefinitionContext context)
{
var myGroup = context.AddGroup(AgGridReportPermissions.GroupName);
//Define your own permissions here. Example:
//myGroup.AddPermission(AgGridReportPermissions.MyPermission1, L("Permission:MyPermission1"));
}
private static LocalizableString L(string name)
{
return LocalizableString.Create<AgGridReportResource>(name);
}
}

9
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/Permissions/AgGridReportPermissions.cs

@ -0,0 +1,9 @@
namespace WinIn.FasterZ.AgGridReport.Permissions;
public static class AgGridReportPermissions
{
public const string GroupName = "AgGridReport";
//Add your own permission names. Example:
//public const string MyPermission1 = GroupName + ".MyPermission1";
}

25
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn.FasterZ.AgGridReport.Application.Contracts.csproj

@ -0,0 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Domain.Shared\WinIn.FasterZ.AgGridReport.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.ObjectExtending" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Account.Application.Contracts" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.Application.Contracts" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application.Contracts" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application.Contracts" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application.Contracts" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Application.Contracts" Version="7.2.1" />
</ItemGroup>
</Project>

22
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/CreateUpdateMapperProcDto.cs

@ -0,0 +1,22 @@
using System;
namespace WinIn.FasterZ.AgGridReport.Dtos;
[Serializable]
public class CreateUpdateMapperProcDto
{
/// <summary>
///
/// </summary>
public string ProcName { get; set; }
/// <summary>
///
/// </summary>
public string ProcParameters { get; set; }
/// <summary>
///
/// </summary>
public string Remark { get; set; }
}

26
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/MapperProcDto.cs

@ -0,0 +1,26 @@
using System;
using Volo.Abp.Application.Dtos;
namespace WinIn.FasterZ.AgGridReport.Dtos;
/// <summary>
///
/// </summary>
[Serializable]
public class MapperProcDto : EntityDto<Guid>
{
/// <summary>
///
/// </summary>
public string ProcName { get; set; }
/// <summary>
///
/// </summary>
public string ProcParameters { get; set; }
/// <summary>
///
/// </summary>
public string Remark { get; set; }
}

24
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/Dtos/MapperProcGetListInput.cs

@ -0,0 +1,24 @@
using System;
using System.ComponentModel;
using Volo.Abp.Application.Dtos;
namespace WinIn.FasterZ.AgGridReport.Dtos;
[Serializable]
public class MapperProcGetListInput : PagedAndSortedResultRequestDto
{
/// <summary>
///
/// </summary>
public string ProcName { get; set; }
/// <summary>
///
/// </summary>
public string ProcParameters { get; set; }
/// <summary>
///
/// </summary>
public string Remark { get; set; }
}

20
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application.Contracts/WinIn/FasterZ/AgGridReport/IMapperProcAppService.cs

@ -0,0 +1,20 @@
using System;
using WinIn.FasterZ.AgGridReport.Dtos;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.AgGridReport;
/// <summary>
///
/// </summary>
public interface IMapperProcAppService :
ICrudAppService<
MapperProcDto,
Guid,
MapperProcGetListInput,
CreateUpdateMapperProcDto,
CreateUpdateMapperProcDto>
{
}

17
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportAppService.cs

@ -0,0 +1,17 @@
using System;
using System.Collections.Generic;
using System.Text;
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.AgGridReport;
/* Inherit your application services from this class.
*/
public abstract class AgGridReportAppService : ApplicationService
{
protected AgGridReportAppService()
{
LocalizationResource = typeof(AgGridReportResource);
}
}

17
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportApplicationAutoMapperProfile.cs

@ -0,0 +1,17 @@
using WinIn.FasterZ.AgGridReport;
using WinIn.FasterZ.AgGridReport.Dtos;
using AutoMapper;
namespace WinIn.FasterZ.AgGridReport;
public class AgGridReportApplicationAutoMapperProfile : Profile
{
public AgGridReportApplicationAutoMapperProfile()
{
/* You can configure your AutoMapper mapping configuration here.
* Alternatively, you can split your mapping configurations
* into multiple profile classes for a better organization. */
CreateMap<MapperProc, MapperProcDto>();
CreateMap<CreateUpdateMapperProcDto, MapperProc>(MemberList.Source);
}
}

31
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/AgGridReportApplicationModule.cs

@ -0,0 +1,31 @@
using Volo.Abp.Account;
using Volo.Abp.AutoMapper;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AgGridReportDomainModule),
typeof(AbpAccountApplicationModule),
typeof(AgGridReportApplicationContractsModule),
typeof(AbpIdentityApplicationModule),
typeof(AbpPermissionManagementApplicationModule),
typeof(AbpTenantManagementApplicationModule),
typeof(AbpFeatureManagementApplicationModule),
typeof(AbpSettingManagementApplicationModule)
)]
public class AgGridReportApplicationModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AgGridReportApplicationModule>();
});
}
}

2
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/Properties/AssemblyInfo.cs

@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("WinIn.FasterZ.AgGridReport.Application.Tests")]

141
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/ReportProcAppService.cs

@ -0,0 +1,141 @@
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.Common;
using System.Text.Json;
using System.Threading.Tasks;
using Microsoft.Data.SqlClient;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using Microsoft.IdentityModel.Tokens;
using Volo.Abp.Application.Services;
using Volo.Abp.EntityFrameworkCore;
using WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
namespace WinIn.FasterZ.AgGridReport;
public class ReportProcAppService : ApplicationService
{
private readonly IDbContextProvider<AgGridReportDbContext> _dbContextProvider;
public ReportProcAppService(IDbContextProvider<AgGridReportDbContext> dbContextProvider)
{
_dbContextProvider = dbContextProvider;
}
public async Task<string> ExecuteProcedureBySqlAsync(string procName, Dictionary<string, string> dictParms)
{
var dbContext = await _dbContextProvider.GetDbContextAsync();
var sql = $"EXEC [dbo].[{procName}] ";
foreach (var dictParm in dictParms)
{
sql += $" @{dictParm.Key} = ";
var value = string.IsNullOrEmpty(dictParm.Value) ? "NULL" : "'" + dictParm.Value + "'";
sql += $" {value} ,";
}
sql = sql.Remove(sql.Length - 1); //去掉最后的','逗号
using (var command = await CreateCommandAsync(sql, CommandType.Text))
{
command.CommandTimeout = 6000;
var resultStr = "";
await using (var dataReader = await command.ExecuteReaderAsync())
{
var dataTable = new DataTable();
dataTable.Load(dataReader);
// 提取DataTable中的数据到C#对象列表
var data = ConvertDataTableToList(dataTable);
// 将C#对象列表序列化为JSON
var jsonData = JsonSerializer.Serialize(data);
resultStr = jsonData;
}
return resultStr;
}
}
public async Task<string> ExecuteProcedureByProcAsync(string procName, Dictionary<string, string> dictParms)
{
var resultStr = "";
var dbContext = await _dbContextProvider.GetDbContextAsync();
var command = dbContext.Database.GetDbConnection().CreateCommand();
var existingTransaction = dbContext.Database.CurrentTransaction;
command.CommandTimeout = 6000;
command.CommandText = procName;
command.CommandType = CommandType.StoredProcedure;
command.Transaction = existingTransaction.GetDbTransaction();
foreach (var dictParm in dictParms)
{
var param = new SqlParameter($"@{dictParm.Key}",string.IsNullOrEmpty(dictParm.Value)? DBNull.Value : dictParm.Value);
command.Parameters.Add(param);
}
await using (var dataReader = await command.ExecuteReaderAsync())
{
var dataTable = new DataTable();
dataTable.Load(dataReader);
// 提取DataTable中的数据到C#对象列表
var data = ConvertDataTableToList(dataTable);
// 将C#对象列表序列化为JSON
var jsonData = JsonSerializer.Serialize(data);
resultStr = jsonData;
}
return resultStr;
}
#region 私有
private static List<Dictionary<string, object>> ConvertDataTableToList(DataTable dataTable)
{
var data = new List<Dictionary<string, object>>();
foreach (DataRow row in dataTable.Rows)
{
var rowData = new Dictionary<string, object>();
foreach (DataColumn column in dataTable.Columns)
{
if (row[column]!=null&&!string.IsNullOrEmpty(row[column].ToString()))
{
rowData[column.ColumnName] = row[column];
}
else
{
rowData[column.ColumnName] = string.Empty;
}
}
data.Add(rowData);
}
return data;
}
private async Task<DbCommand> CreateCommandAsync(string commandText, CommandType commandType,
params SqlParameter[] parameters)
{
var dbContext = await _dbContextProvider.GetDbContextAsync();
var command = dbContext.Database.GetDbConnection().CreateCommand();
var existingTransaction = dbContext.Database.CurrentTransaction;
command.CommandText = commandText;
command.CommandType = commandType;
command.Transaction = existingTransaction.GetDbTransaction();
foreach (var parameter in parameters)
{
command.Parameters.Add(parameter);
}
return command;
}
#endregion
}

27
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/WinIn.FasterZ.AgGridReport.Application.csproj

@ -0,0 +1,27 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Domain\WinIn.FasterZ.AgGridReport.Domain.csproj" />
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Application.Contracts\WinIn.FasterZ.AgGridReport.Application.Contracts.csproj" />
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.EntityFrameworkCore\WinIn.FasterZ.AgGridReport.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.Application" Version="7.2.1" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.Application" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Application" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Application" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Application" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Application" Version="7.2.1" />
</ItemGroup>
</Project>

33
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Application/WinIn/FasterZ/AgGridReport/MapperProcAppService.cs

@ -0,0 +1,33 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using WinIn.FasterZ.AgGridReport.Dtos;
using Volo.Abp.Application.Services;
namespace WinIn.FasterZ.AgGridReport;
/// <summary>
///
/// </summary>
public class MapperProcAppService : CrudAppService<MapperProc, MapperProcDto, Guid, MapperProcGetListInput, CreateUpdateMapperProcDto, CreateUpdateMapperProcDto>,
IMapperProcAppService
{
private readonly IMapperProcRepository _repository;
public MapperProcAppService(IMapperProcRepository repository) : base(repository)
{
_repository = repository;
}
protected override async Task<IQueryable<MapperProc>> CreateFilteredQueryAsync(MapperProcGetListInput input)
{
// TODO: AbpHelper generated
return (await base.CreateFilteredQueryAsync(input))
.WhereIf(!input.ProcName.IsNullOrWhiteSpace(), x => x.ProcName.Contains(input.ProcName))
.WhereIf(!input.ProcParameters.IsNullOrWhiteSpace(), x => x.ProcParameters.Contains(input.ProcParameters))
.WhereIf(!input.Remark.IsNullOrWhiteSpace(), x => x.Remark.Contains(input.Remark))
;
}
}

15
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/AgGridReportDbMigratorModule.cs

@ -0,0 +1,15 @@
using WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
using Volo.Abp.Autofac;
using Volo.Abp.Modularity;
namespace WinIn.FasterZ.AgGridReport.DbMigrator;
[DependsOn(
typeof(AbpAutofacModule),
typeof(AgGridReportEntityFrameworkCoreModule),
typeof(AgGridReportApplicationContractsModule)
)]
public class AgGridReportDbMigratorModule : AbpModule
{
}

51
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/DbMigratorHostedService.cs

@ -0,0 +1,51 @@
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using WinIn.FasterZ.AgGridReport.Data;
using Serilog;
using Volo.Abp;
using Volo.Abp.Data;
namespace WinIn.FasterZ.AgGridReport.DbMigrator;
public class DbMigratorHostedService : IHostedService
{
private readonly IHostApplicationLifetime _hostApplicationLifetime;
private readonly IConfiguration _configuration;
public DbMigratorHostedService(IHostApplicationLifetime hostApplicationLifetime, IConfiguration configuration)
{
_hostApplicationLifetime = hostApplicationLifetime;
_configuration = configuration;
}
public async Task StartAsync(CancellationToken cancellationToken)
{
using (var application = await AbpApplicationFactory.CreateAsync<AgGridReportDbMigratorModule>(options =>
{
options.Services.ReplaceConfiguration(_configuration);
options.UseAutofac();
options.Services.AddLogging(c => c.AddSerilog());
options.AddDataMigrationEnvironment();
}))
{
await application.InitializeAsync();
await application
.ServiceProvider
.GetRequiredService<AgGridReportDbMigrationService>()
.MigrateAsync();
await application.ShutdownAsync();
_hostApplicationLifetime.StopApplication();
}
}
public Task StopAsync(CancellationToken cancellationToken)
{
return Task.CompletedTask;
}
}

41
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/Program.cs

@ -0,0 +1,41 @@
using System.IO;
using System.Threading.Tasks;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using Microsoft.Extensions.Logging;
using Serilog;
using Serilog.Events;
namespace WinIn.FasterZ.AgGridReport.DbMigrator;
class Program
{
static async Task Main(string[] args)
{
Log.Logger = new LoggerConfiguration()
.MinimumLevel.Information()
.MinimumLevel.Override("Microsoft", LogEventLevel.Warning)
.MinimumLevel.Override("Volo.Abp", LogEventLevel.Warning)
#if DEBUG
.MinimumLevel.Override("WinIn.FasterZ.AgGridReport", LogEventLevel.Debug)
#else
.MinimumLevel.Override("WinIn.FasterZ.AgGridReport", LogEventLevel.Information)
#endif
.Enrich.FromLogContext()
.WriteTo.Async(c => c.File("Logs/logs.txt"))
.WriteTo.Async(c => c.Console())
.CreateLogger();
await CreateHostBuilder(args).RunConsoleAsync();
}
public static IHostBuilder CreateHostBuilder(string[] args) =>
Host.CreateDefaultBuilder(args)
.AddAppSettingsSecretsJson()
.ConfigureLogging((context, logging) => logging.ClearProviders())
.ConfigureServices((hostContext, services) =>
{
services.AddHostedService<DbMigratorHostedService>();
});
}

45
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/WinIn.FasterZ.AgGridReport.DbMigrator.csproj

@ -0,0 +1,45 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<None Remove="appsettings.json" />
<Content Include="appsettings.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
<None Remove="appsettings.secrets.json" />
<Content Include="appsettings.secrets.json">
<CopyToPublishDirectory>PreserveNewest</CopyToPublishDirectory>
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Serilog.Extensions.Logging" Version="3.1.0" />
<PackageReference Include="Serilog.Sinks.Async" Version="1.5.0" />
<PackageReference Include="Serilog.Sinks.File" Version="5.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="4.0.1" />
<PackageReference Include="Microsoft.Extensions.Hosting" Version="7.0.0" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Autofac" Version="7.2.1" />
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Application.Contracts\WinIn.FasterZ.AgGridReport.Application.Contracts.csproj" />
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.EntityFrameworkCore\WinIn.FasterZ.AgGridReport.EntityFrameworkCore.csproj" />
</ItemGroup>
<ItemGroup>
<Compile Remove="Logs\**" />
<Content Remove="Logs\**" />
<EmbeddedResource Remove="Logs\**" />
<None Remove="Logs\**" />
</ItemGroup>
</Project>

27
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/appsettings.json

@ -0,0 +1,27 @@
{
"ConnectionStrings": {
"Default": "Server=dev.ccwin-in.com,13319;Database=WMS_IAC_Report_AgGrid;uid=ccwin-in;pwd=Microsoft@2022;timeout=6000;Encrypt=False;"
},
"OpenIddict": {
"Applications": {
"AgGridReport_Web": {
"ClientId": "AgGridReport_Web",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44341"
},
"AgGridReport_App": {
"ClientId": "AgGridReport_App",
"RootUrl": "http://localhost:4200"
},
"AgGridReport_BlazorServerTiered": {
"ClientId": "AgGridReport_BlazorServerTiered",
"ClientSecret": "1q2w3e*",
"RootUrl": "https://localhost:44388"
},
"AgGridReport_Swagger": {
"ClientId": "AgGridReport_Swagger",
"RootUrl": "https://localhost:44396"
}
}
}
}

2
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.DbMigrator/appsettings.secrets.json

@ -0,0 +1,2 @@
{
}

6
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportDomainErrorCodes.cs

@ -0,0 +1,6 @@
namespace WinIn.FasterZ.AgGridReport;
public static class AgGridReportDomainErrorCodes
{
/* You can add your business exception error codes here, as constants */
}

58
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportDomainSharedModule.cs

@ -0,0 +1,58 @@
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Localization.ExceptionHandling;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict;
using Volo.Abp.PermissionManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.Validation.Localization;
using Volo.Abp.VirtualFileSystem;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AbpAuditLoggingDomainSharedModule),
typeof(AbpBackgroundJobsDomainSharedModule),
typeof(AbpFeatureManagementDomainSharedModule),
typeof(AbpIdentityDomainSharedModule),
typeof(AbpOpenIddictDomainSharedModule),
typeof(AbpPermissionManagementDomainSharedModule),
typeof(AbpSettingManagementDomainSharedModule),
typeof(AbpTenantManagementDomainSharedModule)
)]
public class AgGridReportDomainSharedModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
AgGridReportGlobalFeatureConfigurator.Configure();
AgGridReportModuleExtensionConfigurator.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AgGridReportDomainSharedModule>();
});
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Add<AgGridReportResource>("en")
.AddBaseTypes(typeof(AbpValidationResource))
.AddVirtualJson("/Localization/AgGridReport");
options.DefaultResourceType = typeof(AgGridReportResource);
});
Configure<AbpExceptionLocalizationOptions>(options =>
{
options.MapCodeNamespace("AgGridReport", typeof(AgGridReportResource));
});
}
}

22
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportGlobalFeatureConfigurator.cs

@ -0,0 +1,22 @@
using Volo.Abp.Threading;
namespace WinIn.FasterZ.AgGridReport;
public static class AgGridReportGlobalFeatureConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
/* You can configure (enable/disable) global features of the used modules here.
*
* YOU CAN SAFELY DELETE THIS CLASS AND REMOVE ITS USAGES IF YOU DON'T NEED TO IT!
*
* Please refer to the documentation to lear more about the Global Features System:
* https://docs.abp.io/en/abp/latest/Global-Features
*/
});
}
}

73
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/AgGridReportModuleExtensionConfigurator.cs

@ -0,0 +1,73 @@
using System.ComponentModel.DataAnnotations;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace WinIn.FasterZ.AgGridReport;
public static class AgGridReportModuleExtensionConfigurator
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
OneTimeRunner.Run(() =>
{
ConfigureExistingProperties();
ConfigureExtraProperties();
});
}
private static void ConfigureExistingProperties()
{
/* You can change max lengths for properties of the
* entities defined in the modules used by your application.
*
* Example: Change user and role name max lengths
IdentityUserConsts.MaxNameLength = 99;
IdentityRoleConsts.MaxNameLength = 99;
* Notice: It is not suggested to change property lengths
* unless you really need it. Go with the standard values wherever possible.
*
* If you are using EF Core, you will need to run the add-migration command after your changes.
*/
}
private static void ConfigureExtraProperties()
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to define these extra properties
* with a high level, easy to use API.
*
* Example: Add a new property to the user entity of the identity module
ObjectExtensionManager.Instance.Modules()
.ConfigureIdentity(identity =>
{
identity.ConfigureUser(user =>
{
user.AddOrUpdateProperty<string>( //property type: string
"SocialSecurityNumber", //property name
property =>
{
//validation rules
property.Attributes.Add(new RequiredAttribute());
property.Attributes.Add(new StringLengthAttribute(64) {MinimumLength = 4});
property.Configuration[IdentityModuleExtensionConsts.ConfigurationNames.AllowUserToEdit] = true;
//...other configurations for this property
}
);
});
});
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Module-Entity-Extensions
*/
}
}

17
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ar.json

@ -0,0 +1,17 @@
{
"culture": "ar",
"texts": {
"Menu:Home": "الصفحة الرئيسية",
"LongWelcomeMessage": "مرحبا بكم في التطبيق. هذا مشروع بدء تشغيل يعتمد على إطار عمل ABP. لمزيد من المعلومات ، يرجى زيارة abp.io.",
"Menu:MapperProc": "MenuMapperProc",
"MapperProc": "MapperProc",
"MapperProcProcName": "MapperProcProcName",
"MapperProcProcParameters": "MapperProcProcParameters",
"MapperProcRemark": "MapperProcRemark",
"CreateMapperProc": "CreateMapperProc",
"EditMapperProc": "EditMapperProc",
"MapperProcDeletionConfirmationMessage": "Are you sure to delete the mapperProc {0}?",
"SuccessfullyDeleted": "Successfully deleted",
"TableFilter": "TableFilter"
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/cs.json

@ -0,0 +1,8 @@
{
"culture": "cs",
"texts": {
"Menu:Home": "Úvod",
"Welcome": "Vítejte",
"LongWelcomeMessage": "Vítejte v aplikaci. Toto je startovací projekt založený na ABP frameworku. Pro více informací, navštivte abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/de.json

@ -0,0 +1,8 @@
{
"culture": "de",
"texts": {
"Menu:Home": "Home",
"Welcome": "Willkommen",
"LongWelcomeMessage": "Willkommen bei der Anwendung. Dies ist ein Startup-Projekt, das auf dem ABP-Framework basiert. Weitere Informationen finden Sie unter abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/en-GB.json

@ -0,0 +1,8 @@
{
"culture": "en-GB",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/en.json

@ -0,0 +1,8 @@
{
"culture": "en",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welcome",
"LongWelcomeMessage": "Welcome to the application. This is a startup project based on the ABP framework. For more information, visit abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/es.json

@ -0,0 +1,8 @@
{
"culture": "es",
"texts": {
"Menu:Home": "Inicio",
"Welcome": "Bienvenido",
"LongWelcomeMessage": "Bienvenido a la aplicación, este es un proyecto base basado en el framework ABP. Para más información, visita abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/fi.json

@ -0,0 +1,8 @@
{
"culture": "fi",
"texts": {
"Menu:Home": "Koti",
"Welcome": "Tervetuloa",
"LongWelcomeMessage": "Tervetuloa sovellukseen. Tämä on ABP-kehykseen perustuva käynnistysprojekti. Lisätietoja on osoitteessa abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/fr.json

@ -0,0 +1,8 @@
{
"culture": "fr",
"texts": {
"Menu:Home": "Accueil",
"Welcome": "Bienvenue",
"LongWelcomeMessage": "Bienvenue dans l'application. Il s'agit d'un projet de démarrage basé sur le framework ABP. Pour plus d'informations, visitez abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hi.json

@ -0,0 +1,8 @@
{
"culture": "hi",
"texts": {
"Menu:Home": "घर",
"Welcome": "स्वागत हे",
"LongWelcomeMessage": "आवेदन करने के लिए आपका स्वागत है। यह एबीपी ढांचे पर आधारित एक स्टार्टअप परियोजना है। अधिक जानकारी के लिए, abp.io पर जाएं।"
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hr.json

@ -0,0 +1,8 @@
{
"culture": "hr",
"texts": {
"Menu:Home": "Početna",
"Welcome": "Dobrodošli",
"LongWelcomeMessage": "Dobrodošli u aplikaciju. Ovo je startup projekt temeljen na ABP framework-u. Za više informacija posjetite abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/hu.json

@ -0,0 +1,8 @@
{
"culture": "hu",
"texts": {
"Menu:Home": "Kezdőlap",
"Welcome": "Üdvözlöm",
"LongWelcomeMessage": "Üdvözöljük az alkalmazásban. Ez egy ABP keretrendszeren alapuló startup projekt. További információkért látogasson el az abp.io oldalra."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/is.json

@ -0,0 +1,8 @@
{
"culture": "is",
"texts": {
"Menu:Home": "Heim",
"Welcome": "Velkomin",
"LongWelcomeMessage": "Verið velkomin í forritið. Þetta er startup verkefni sem byggir á ABP. Nánari upplýsingar er að finna á abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/it.json

@ -0,0 +1,8 @@
{
"culture": "it",
"texts": {
"Menu:Home": "Home",
"Welcome": "Benvenuto",
"LongWelcomeMessage": "Benvenuto nell'applicazione. Questo è un progetto di avvio basato sul framework ABP. Per ulteriori informazioni, visita abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/nl.json

@ -0,0 +1,8 @@
{
"culture": "nl",
"texts": {
"Menu:Home": "Home",
"Welcome": "Welkom",
"LongWelcomeMessage": "Welkom bij de applicatie. Dit is een startup-project gebaseerd op het ABP-framework. Bezoek abp.io voor meer informatie."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/pl-PL.json

@ -0,0 +1,8 @@
{
"culture": "pl-PL",
"texts": {
"Menu:Home": "Home",
"Welcome": "Witaj",
"LongWelcomeMessage": "Witaj w aplikacji. To jest inicjalny projekt bazujący na ABP framework. Po więcej informacji odwiedź stronę abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/pt-BR.json

@ -0,0 +1,8 @@
{
"culture": "pt-BR",
"texts": {
"Menu:Home": "Principal",
"Welcome": "Seja bem-vindo!",
"LongWelcomeMessage": "Bem-vindo a esta aplicação. Este é um projeto inicial baseado no ABP framework. Para mais informações, visite abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ro-RO.json

@ -0,0 +1,8 @@
{
"culture": "ro-RO",
"texts": {
"Menu:Home": "Acasă",
"Welcome": "Bun venit",
"LongWelcomeMessage": "Bun venit la aplicaţie. Acesta este un proiect de pornire bazat pe framework-ul ABP. Pentru mai multe informaţii, vizitaţi, visit abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/ru.json

@ -0,0 +1,8 @@
{
"culture": "ru",
"texts": {
"Menu:Home": "Главная",
"Welcome": "Добро пожаловать",
"LongWelcomeMessage": "Добро пожаловать в приложение. Этот запущенный проект основан на фреймворке ABP. Для получения дополнительной информации посетите сайт abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/sk.json

@ -0,0 +1,8 @@
{
"culture": "sk",
"texts": {
"Menu:Home": "Domov",
"Welcome": "Vitajte",
"LongWelcomeMessage": "Vitajte v aplikácii. Toto je štartovací projekt založený na ABP frameworku. Viac informácií nájdete na stránke abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/sl.json

@ -0,0 +1,8 @@
{
"culture": "sl",
"texts": {
"Menu:Home": "Domov",
"Welcome": "Dobrodošli",
"LongWelcomeMessage": "Dobrodošli v aplikaciji. To je začetni projekt na osnovi okolja ABP. Za več informacij obiščite abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/tr.json

@ -0,0 +1,8 @@
{
"culture": "tr",
"texts": {
"Menu:Home": "Ana sayfa",
"Welcome": "Hoşgeldiniz",
"LongWelcomeMessage": "Uygulamaya hoşgeldiniz. Bu, ABP framework'ü üzerine bina edilmiş bir başlangıç projesidir. Daha fazla bilgi için abp.io adresini ziyaret edebilirsiniz."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/vi.json

@ -0,0 +1,8 @@
{
"culture": "vi",
"texts": {
"Menu:Home": "Trang chủ",
"Welcome": "Chào mừng bạn",
"LongWelcomeMessage": "Chào mừng bạn đến ứng dụng. Đây là một dự án khởi nghiệp dựa trên khung ABP. Để biết thêm thông tin, hãy truy cập abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/zh-Hans.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hans",
"texts": {
"Menu:Home": "首页",
"Welcome": "欢迎",
"LongWelcomeMessage": "欢迎来到该应用程序. 这是一个基于ABP框架的启动项目. 有关更多信息, 请访问 abp.io."
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReport/zh-Hant.json

@ -0,0 +1,8 @@
{
"culture": "zh-Hant",
"texts": {
"Menu:Home": "首頁",
"Welcome": "歡迎",
"LongWelcomeMessage": "歡迎來到此應用程式. 這是一個基於ABP框架的起始專案. 有關更多訊息, 請瀏覽 abp.io."
}
}

9
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/Localization/AgGridReportResource.cs

@ -0,0 +1,9 @@
using Volo.Abp.Localization;
namespace WinIn.FasterZ.AgGridReport.Localization;
[LocalizationResourceName("AgGridReport")]
public class AgGridReportResource
{
}

10
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/MultiTenancy/MultiTenancyConsts.cs

@ -0,0 +1,10 @@
namespace WinIn.FasterZ.AgGridReport.MultiTenancy;
public static class MultiTenancyConsts
{
/* Enable/disable multi-tenancy easily in a single point.
* If you will never need to multi-tenancy, you can remove
* related modules and code parts, including this file.
*/
public const bool IsEnabled = true;
}

32
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain.Shared/WinIn.FasterZ.AgGridReport.Domain.Shared.csproj

@ -0,0 +1,32 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Identity.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain.Shared" Version="7.2.1" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain.Shared" Version="7.2.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Localization\AgGridReport\*.json" />
<Content Remove="Localization\AgGridReport\*.json" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.Extensions.FileProviders.Embedded" Version="7.0.0" />
</ItemGroup>
</Project>

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/AgGridReportConsts.cs

@ -0,0 +1,8 @@
namespace WinIn.FasterZ.AgGridReport;
public static class AgGridReportConsts
{
public const string DbTablePrefix = "App";
public const string DbSchema = null;
}

68
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/AgGridReportDomainModule.cs

@ -0,0 +1,68 @@
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using WinIn.FasterZ.AgGridReport.MultiTenancy;
using Volo.Abp.AuditLogging;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.Emailing;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.OpenIddict;
using Volo.Abp.PermissionManagement.Identity;
using Volo.Abp.PermissionManagement.OpenIddict;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AgGridReportDomainSharedModule),
typeof(AbpAuditLoggingDomainModule),
typeof(AbpBackgroundJobsDomainModule),
typeof(AbpFeatureManagementDomainModule),
typeof(AbpIdentityDomainModule),
typeof(AbpOpenIddictDomainModule),
typeof(AbpPermissionManagementDomainOpenIddictModule),
typeof(AbpPermissionManagementDomainIdentityModule),
typeof(AbpSettingManagementDomainModule),
typeof(AbpTenantManagementDomainModule),
typeof(AbpEmailingModule)
)]
public class AgGridReportDomainModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
Configure<AbpLocalizationOptions>(options =>
{
options.Languages.Add(new LanguageInfo("ar", "ar", "العربية", "ae"));
options.Languages.Add(new LanguageInfo("cs", "cs", "Čeština"));
options.Languages.Add(new LanguageInfo("en", "en", "English", "gb"));
options.Languages.Add(new LanguageInfo("en-GB", "en-GB", "English (UK)"));
options.Languages.Add(new LanguageInfo("hu", "hu", "Magyar"));
options.Languages.Add(new LanguageInfo("hr", "hr", "Croatian"));
options.Languages.Add(new LanguageInfo("fi", "fi", "Finnish", "fi"));
options.Languages.Add(new LanguageInfo("fr", "fr", "Français", "fr"));
options.Languages.Add(new LanguageInfo("hi", "hi", "Hindi", "in"));
options.Languages.Add(new LanguageInfo("it", "it", "Italiano", "it"));
options.Languages.Add(new LanguageInfo("pt-BR", "pt-BR", "Português"));
options.Languages.Add(new LanguageInfo("ru", "ru", "Русский", "ru"));
options.Languages.Add(new LanguageInfo("sk", "sk", "Slovak", "sk"));
options.Languages.Add(new LanguageInfo("tr", "tr", "Türkçe", "tr"));
options.Languages.Add(new LanguageInfo("zh-Hans", "zh-Hans", "简体中文"));
options.Languages.Add(new LanguageInfo("zh-Hant", "zh-Hant", "繁體中文"));
options.Languages.Add(new LanguageInfo("de-DE", "de-DE", "Deutsch", "de"));
options.Languages.Add(new LanguageInfo("es", "es", "Español"));
});
Configure<AbpMultiTenancyOptions>(options =>
{
options.IsEnabled = MultiTenancyConsts.IsEnabled;
});
#if DEBUG
context.Services.Replace(ServiceDescriptor.Singleton<IEmailSender, NullEmailSender>());
#endif
}
}

218
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/AgGridReportDbMigrationService.cs

@ -0,0 +1,218 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Runtime.InteropServices;
using System.Threading.Tasks;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Logging.Abstractions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Identity;
using Volo.Abp.MultiTenancy;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.AgGridReport.Data;
public class AgGridReportDbMigrationService : ITransientDependency
{
public ILogger<AgGridReportDbMigrationService> Logger { get; set; }
private readonly IDataSeeder _dataSeeder;
private readonly IEnumerable<IAgGridReportDbSchemaMigrator> _dbSchemaMigrators;
private readonly ITenantRepository _tenantRepository;
private readonly ICurrentTenant _currentTenant;
public AgGridReportDbMigrationService(
IDataSeeder dataSeeder,
IEnumerable<IAgGridReportDbSchemaMigrator> dbSchemaMigrators,
ITenantRepository tenantRepository,
ICurrentTenant currentTenant)
{
_dataSeeder = dataSeeder;
_dbSchemaMigrators = dbSchemaMigrators;
_tenantRepository = tenantRepository;
_currentTenant = currentTenant;
Logger = NullLogger<AgGridReportDbMigrationService>.Instance;
}
public async Task MigrateAsync()
{
var initialMigrationAdded = AddInitialMigrationIfNotExist();
if (initialMigrationAdded)
{
return;
}
Logger.LogInformation("Started database migrations...");
await MigrateDatabaseSchemaAsync();
await SeedDataAsync();
Logger.LogInformation($"Successfully completed host database migrations.");
var tenants = await _tenantRepository.GetListAsync(includeDetails: true);
var migratedDatabaseSchemas = new HashSet<string>();
foreach (var tenant in tenants)
{
using (_currentTenant.Change(tenant.Id))
{
if (tenant.ConnectionStrings.Any())
{
var tenantConnectionStrings = tenant.ConnectionStrings
.Select(x => x.Value)
.ToList();
if (!migratedDatabaseSchemas.IsSupersetOf(tenantConnectionStrings))
{
await MigrateDatabaseSchemaAsync(tenant);
migratedDatabaseSchemas.AddIfNotContains(tenantConnectionStrings);
}
}
await SeedDataAsync(tenant);
}
Logger.LogInformation($"Successfully completed {tenant.Name} tenant database migrations.");
}
Logger.LogInformation("Successfully completed all database migrations.");
Logger.LogInformation("You can safely end this process...");
}
private async Task MigrateDatabaseSchemaAsync(Tenant? tenant = null)
{
Logger.LogInformation(
$"Migrating schema for {(tenant == null ? "host" : tenant.Name + " tenant")} database...");
foreach (var migrator in _dbSchemaMigrators)
{
await migrator.MigrateAsync();
}
}
private async Task SeedDataAsync(Tenant? tenant = null)
{
Logger.LogInformation($"Executing {(tenant == null ? "host" : tenant.Name + " tenant")} database seed...");
await _dataSeeder.SeedAsync(new DataSeedContext(tenant?.Id)
.WithProperty(IdentityDataSeedContributor.AdminEmailPropertyName, IdentityDataSeedContributor.AdminEmailDefaultValue)
.WithProperty(IdentityDataSeedContributor.AdminPasswordPropertyName, IdentityDataSeedContributor.AdminPasswordDefaultValue)
);
}
private bool AddInitialMigrationIfNotExist()
{
try
{
if (!DbMigrationsProjectExists())
{
return false;
}
}
catch (Exception)
{
return false;
}
try
{
if (!MigrationsFolderExists())
{
AddInitialMigration();
return true;
}
else
{
return false;
}
}
catch (Exception e)
{
Logger.LogWarning("Couldn't determinate if any migrations exist : " + e.Message);
return false;
}
}
private bool DbMigrationsProjectExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null;
}
private bool MigrationsFolderExists()
{
var dbMigrationsProjectFolder = GetEntityFrameworkCoreProjectFolderPath();
return dbMigrationsProjectFolder != null && Directory.Exists(Path.Combine(dbMigrationsProjectFolder, "Migrations"));
}
private void AddInitialMigration()
{
Logger.LogInformation("Creating initial migration...");
string argumentPrefix;
string fileName;
if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX) || RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
{
argumentPrefix = "-c";
fileName = "/bin/bash";
}
else
{
argumentPrefix = "/C";
fileName = "cmd.exe";
}
var procStartInfo = new ProcessStartInfo(fileName,
$"{argumentPrefix} \"abp create-migration-and-run-migrator \"{GetEntityFrameworkCoreProjectFolderPath()}\"\""
);
try
{
Process.Start(procStartInfo);
}
catch (Exception)
{
throw new Exception("Couldn't run ABP CLI...");
}
}
private string? GetEntityFrameworkCoreProjectFolderPath()
{
var slnDirectoryPath = GetSolutionDirectoryPath();
if (slnDirectoryPath == null)
{
throw new Exception("Solution folder not found!");
}
var srcDirectoryPath = Path.Combine(slnDirectoryPath, "src");
return Directory.GetDirectories(srcDirectoryPath)
.FirstOrDefault(d => d.EndsWith(".EntityFrameworkCore"));
}
private string? GetSolutionDirectoryPath()
{
var currentDirectory = new DirectoryInfo(Directory.GetCurrentDirectory());
while (currentDirectory != null && Directory.GetParent(currentDirectory.FullName) != null)
{
currentDirectory = Directory.GetParent(currentDirectory.FullName);
if (currentDirectory != null && Directory.GetFiles(currentDirectory.FullName).FirstOrDefault(f => f.EndsWith(".sln")) != null)
{
return currentDirectory.FullName;
}
}
return null;
}
}

8
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/IAgGridReportDbSchemaMigrator.cs

@ -0,0 +1,8 @@
using System.Threading.Tasks;
namespace WinIn.FasterZ.AgGridReport.Data;
public interface IAgGridReportDbSchemaMigrator
{
Task MigrateAsync();
}

15
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Data/NullAgGridReportDbSchemaMigrator.cs

@ -0,0 +1,15 @@
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;
namespace WinIn.FasterZ.AgGridReport.Data;
/* This is used if database provider does't define
* IAgGridReportDbSchemaMigrator implementation.
*/
public class NullAgGridReportDbSchemaMigrator : IAgGridReportDbSchemaMigrator, ITransientDependency
{
public Task MigrateAsync()
{
return Task.CompletedTask;
}
}

18
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/MapperProc.cs

@ -0,0 +1,18 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Domain.Entities;
namespace WinIn.FasterZ.AgGridReport
{
public class MapperProc:Entity<Guid>
{
public string ProcName { get; set; }
public string ProcParameters { get; set; }
public string Remark { get; set; }
}
}

405
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/OpenIddict/OpenIddictDataSeedContributor.cs

@ -0,0 +1,405 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using JetBrains.Annotations;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Localization;
using OpenIddict.Abstractions;
using Volo.Abp;
using Volo.Abp.Authorization.Permissions;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.OpenIddict.Applications;
using Volo.Abp.PermissionManagement;
using Volo.Abp.Uow;
namespace WinIn.FasterZ.AgGridReport.OpenIddict;
/* Creates initial data that is needed to property run the application
* and make client-to-server communication possible.
*/
public class OpenIddictDataSeedContributor : IDataSeedContributor, ITransientDependency
{
private readonly IConfiguration _configuration;
private readonly IAbpApplicationManager _applicationManager;
private readonly IOpenIddictScopeManager _scopeManager;
private readonly IPermissionDataSeeder _permissionDataSeeder;
private readonly IStringLocalizer<OpenIddictResponse> L;
public OpenIddictDataSeedContributor(
IConfiguration configuration,
IAbpApplicationManager applicationManager,
IOpenIddictScopeManager scopeManager,
IPermissionDataSeeder permissionDataSeeder,
IStringLocalizer<OpenIddictResponse> l)
{
_configuration = configuration;
_applicationManager = applicationManager;
_scopeManager = scopeManager;
_permissionDataSeeder = permissionDataSeeder;
L = l;
}
[UnitOfWork]
public virtual async Task SeedAsync(DataSeedContext context)
{
await CreateScopesAsync();
await CreateApplicationsAsync();
}
private async Task CreateScopesAsync()
{
if (await _scopeManager.FindByNameAsync("AgGridReport") == null)
{
await _scopeManager.CreateAsync(new OpenIddictScopeDescriptor
{
Name = "AgGridReport",
DisplayName = "AgGridReport API",
Resources =
{
"AgGridReport"
}
});
}
}
private async Task CreateApplicationsAsync()
{
var commonScopes = new List<string>
{
OpenIddictConstants.Permissions.Scopes.Address,
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles,
"AgGridReport"
};
var configurationSection = _configuration.GetSection("OpenIddict:Applications");
//Web Client
var webClientId = configurationSection["AgGridReport_Web:ClientId"];
if (!webClientId.IsNullOrWhiteSpace())
{
var webClientRootUrl = configurationSection["AgGridReport_Web:RootUrl"].EnsureEndsWith('/');
/* AgGridReport_Web client is only needed if you created a tiered
* solution. Otherwise, you can delete this client. */
await CreateApplicationAsync(
name: webClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Web Application",
secret: configurationSection["AgGridReport_Web:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{webClientRootUrl}signin-oidc",
clientUri: webClientRootUrl,
postLogoutRedirectUri: $"{webClientRootUrl}signout-callback-oidc"
);
}
//Console Test / Angular Client
var consoleAndAngularClientId = configurationSection["AgGridReport_App:ClientId"];
if (!consoleAndAngularClientId.IsNullOrWhiteSpace())
{
var consoleAndAngularClientRootUrl = configurationSection["AgGridReport_App:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: consoleAndAngularClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Console Test / Angular Application",
secret: null,
grantTypes: new List<string>
{
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.RefreshToken
},
scopes: commonScopes,
redirectUri: consoleAndAngularClientRootUrl,
clientUri: consoleAndAngularClientRootUrl,
postLogoutRedirectUri: consoleAndAngularClientRootUrl
);
}
// Blazor Client
var blazorClientId = configurationSection["AgGridReport_Blazor:ClientId"];
if (!blazorClientId.IsNullOrWhiteSpace())
{
var blazorRootUrl = configurationSection["AgGridReport_Blazor:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: blazorClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Application",
secret: null,
grantTypes: new List<string>
{
OpenIddictConstants.GrantTypes.AuthorizationCode,
},
scopes: commonScopes,
redirectUri: $"{blazorRootUrl}/authentication/login-callback",
clientUri: blazorRootUrl,
postLogoutRedirectUri: $"{blazorRootUrl}/authentication/logout-callback"
);
}
// Blazor Server Tiered Client
var blazorServerTieredClientId = configurationSection["AgGridReport_BlazorServerTiered:ClientId"];
if (!blazorServerTieredClientId.IsNullOrWhiteSpace())
{
var blazorServerTieredRootUrl = configurationSection["AgGridReport_BlazorServerTiered:RootUrl"].EnsureEndsWith('/');
await CreateApplicationAsync(
name: blazorServerTieredClientId!,
type: OpenIddictConstants.ClientTypes.Confidential,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Blazor Server Application",
secret: configurationSection["AgGridReport_BlazorServerTiered:ClientSecret"] ?? "1q2w3e*",
grantTypes: new List<string> //Hybrid flow
{
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.Implicit
},
scopes: commonScopes,
redirectUri: $"{blazorServerTieredRootUrl}signin-oidc",
clientUri: blazorServerTieredRootUrl,
postLogoutRedirectUri: $"{blazorServerTieredRootUrl}signout-callback-oidc"
);
}
// Swagger Client
var swaggerClientId = configurationSection["AgGridReport_Swagger:ClientId"];
if (!swaggerClientId.IsNullOrWhiteSpace())
{
var swaggerRootUrl = configurationSection["AgGridReport_Swagger:RootUrl"]?.TrimEnd('/');
await CreateApplicationAsync(
name: swaggerClientId!,
type: OpenIddictConstants.ClientTypes.Public,
consentType: OpenIddictConstants.ConsentTypes.Implicit,
displayName: "Swagger Application",
secret: null,
grantTypes: new List<string>
{
OpenIddictConstants.GrantTypes.AuthorizationCode,
},
scopes: commonScopes,
redirectUri: $"{swaggerRootUrl}/swagger/oauth2-redirect.html",
clientUri: swaggerRootUrl
);
}
}
private async Task CreateApplicationAsync(
[NotNull] string name,
[NotNull] string type,
[NotNull] string consentType,
string displayName,
string? secret,
List<string> grantTypes,
List<string> scopes,
string? clientUri = null,
string? redirectUri = null,
string? postLogoutRedirectUri = null,
List<string>? permissions = null)
{
if (!string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
{
throw new BusinessException(L["NoClientSecretCanBeSetForPublicApplications"]);
}
if (string.IsNullOrEmpty(secret) && string.Equals(type, OpenIddictConstants.ClientTypes.Confidential, StringComparison.OrdinalIgnoreCase))
{
throw new BusinessException(L["TheClientSecretIsRequiredForConfidentialApplications"]);
}
if (!string.IsNullOrEmpty(name) && await _applicationManager.FindByClientIdAsync(name) != null)
{
return;
//throw new BusinessException(L["TheClientIdentifierIsAlreadyTakenByAnotherApplication"]);
}
var client = await _applicationManager.FindByClientIdAsync(name);
if (client == null)
{
var application = new AbpApplicationDescriptor
{
ClientId = name,
Type = type,
ClientSecret = secret,
ConsentType = consentType,
DisplayName = displayName,
ClientUri = clientUri,
};
Check.NotNullOrEmpty(grantTypes, nameof(grantTypes));
Check.NotNullOrEmpty(scopes, nameof(scopes));
if (new [] { OpenIddictConstants.GrantTypes.AuthorizationCode, OpenIddictConstants.GrantTypes.Implicit }.All(grantTypes.Contains))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdToken);
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeIdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.CodeToken);
}
}
if (!redirectUri.IsNullOrWhiteSpace() || !postLogoutRedirectUri.IsNullOrWhiteSpace())
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Logout);
}
var buildInGrantTypes = new []
{
OpenIddictConstants.GrantTypes.Implicit,
OpenIddictConstants.GrantTypes.Password,
OpenIddictConstants.GrantTypes.AuthorizationCode,
OpenIddictConstants.GrantTypes.ClientCredentials,
OpenIddictConstants.GrantTypes.DeviceCode,
OpenIddictConstants.GrantTypes.RefreshToken
};
foreach (var grantType in grantTypes)
{
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.AuthorizationCode);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Code);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode || grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Authorization);
}
if (grantType == OpenIddictConstants.GrantTypes.AuthorizationCode ||
grantType == OpenIddictConstants.GrantTypes.ClientCredentials ||
grantType == OpenIddictConstants.GrantTypes.Password ||
grantType == OpenIddictConstants.GrantTypes.RefreshToken ||
grantType == OpenIddictConstants.GrantTypes.DeviceCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Token);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Revocation);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Introspection);
}
if (grantType == OpenIddictConstants.GrantTypes.ClientCredentials)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.ClientCredentials);
}
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Implicit);
}
if (grantType == OpenIddictConstants.GrantTypes.Password)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.Password);
}
if (grantType == OpenIddictConstants.GrantTypes.RefreshToken)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.RefreshToken);
}
if (grantType == OpenIddictConstants.GrantTypes.DeviceCode)
{
application.Permissions.Add(OpenIddictConstants.Permissions.GrantTypes.DeviceCode);
application.Permissions.Add(OpenIddictConstants.Permissions.Endpoints.Device);
}
if (grantType == OpenIddictConstants.GrantTypes.Implicit)
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdToken);
if (string.Equals(type, OpenIddictConstants.ClientTypes.Public, StringComparison.OrdinalIgnoreCase))
{
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.IdTokenToken);
application.Permissions.Add(OpenIddictConstants.Permissions.ResponseTypes.Token);
}
}
if (!buildInGrantTypes.Contains(grantType))
{
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.GrantType + grantType);
}
}
var buildInScopes = new []
{
OpenIddictConstants.Permissions.Scopes.Address,
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Phone,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles
};
foreach (var scope in scopes)
{
if (buildInScopes.Contains(scope))
{
application.Permissions.Add(scope);
}
else
{
application.Permissions.Add(OpenIddictConstants.Permissions.Prefixes.Scope + scope);
}
}
if (redirectUri != null)
{
if (!redirectUri.IsNullOrEmpty())
{
if (!Uri.TryCreate(redirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
{
throw new BusinessException(L["InvalidRedirectUri", redirectUri]);
}
if (application.RedirectUris.All(x => x != uri))
{
application.RedirectUris.Add(uri);
}
}
}
if (postLogoutRedirectUri != null)
{
if (!postLogoutRedirectUri.IsNullOrEmpty())
{
if (!Uri.TryCreate(postLogoutRedirectUri, UriKind.Absolute, out var uri) || !uri.IsWellFormedOriginalString())
{
throw new BusinessException(L["InvalidPostLogoutRedirectUri", postLogoutRedirectUri]);
}
if (application.PostLogoutRedirectUris.All(x => x != uri))
{
application.PostLogoutRedirectUris.Add(uri);
}
}
}
if (permissions != null)
{
await _permissionDataSeeder.SeedAsync(
ClientPermissionValueProvider.ProviderName,
name,
permissions,
null
);
}
await _applicationManager.CreateAsync(application);
}
}
}

3
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Properties/AssemblyInfo.cs

@ -0,0 +1,3 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("WinIn.FasterZ.AgGridReport.Domain.Tests")]
[assembly:InternalsVisibleToAttribute("WinIn.FasterZ.AgGridReport.TestBase")]

12
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Settings/AgGridReportSettingDefinitionProvider.cs

@ -0,0 +1,12 @@
using Volo.Abp.Settings;
namespace WinIn.FasterZ.AgGridReport.Settings;
public class AgGridReportSettingDefinitionProvider : SettingDefinitionProvider
{
public override void Define(ISettingDefinitionContext context)
{
//Define your own settings here. Example:
//context.Add(new SettingDefinition(AgGridReportSettings.MySetting1));
}
}

9
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/Settings/AgGridReportSettings.cs

@ -0,0 +1,9 @@
namespace WinIn.FasterZ.AgGridReport.Settings;
public static class AgGridReportSettings
{
private const string Prefix = "AgGridReport";
//Add your own setting names here. Example:
//public const string MySetting1 = Prefix + ".MySetting1";
}

28
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/WinIn.FasterZ.AgGridReport.Domain.csproj

@ -0,0 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Domain.Shared\WinIn.FasterZ.AgGridReport.Domain.Shared.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Emailing" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.Identity" Version="7.2.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.AuditLogging.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.OpenIddict.Domain" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.Domain.OpenIddict" Version="7.2.1" />
</ItemGroup>
</Project>

11
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Domain/WinIn/FasterZ/AgGridReport/IMapperProcRepository.cs

@ -0,0 +1,11 @@
using System;
using Volo.Abp.Domain.Repositories;
namespace WinIn.FasterZ.AgGridReport;
/// <summary>
///
/// </summary>
public interface IMapperProcRepository : IRepository<MapperProc, Guid>
{
}

102
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportDbContext.cs

@ -0,0 +1,102 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.Data;
using Volo.Abp.DependencyInjection;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
using WinIn.FasterZ.AgGridReport;
using Volo.Abp.EntityFrameworkCore.Modeling;
namespace WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
[ReplaceDbContext(typeof(IIdentityDbContext))]
[ReplaceDbContext(typeof(ITenantManagementDbContext))]
[ConnectionStringName("Default")]
public class AgGridReportDbContext :
AbpDbContext<AgGridReportDbContext>,
IIdentityDbContext,
ITenantManagementDbContext
{
/* Add DbSet properties for your Aggregate Roots / Entities here. */
#region Entities from the modules
/* Notice: We only implemented IIdentityDbContext and ITenantManagementDbContext
* and replaced them for this DbContext. This allows you to perform JOIN
* queries for the entities of these modules over the repositories easily. You
* typically don't need that for other modules. But, if you need, you can
* implement the DbContext interface of the needed module and use ReplaceDbContext
* attribute just like IIdentityDbContext and ITenantManagementDbContext.
*
* More info: Replacing a DbContext of a module ensures that the related module
* uses this DbContext on runtime. Otherwise, it will use its own DbContext class.
*/
//Identity
public DbSet<IdentityUser> Users { get; set; }
public DbSet<IdentityRole> Roles { get; set; }
public DbSet<IdentityClaimType> ClaimTypes { get; set; }
public DbSet<OrganizationUnit> OrganizationUnits { get; set; }
public DbSet<IdentitySecurityLog> SecurityLogs { get; set; }
public DbSet<IdentityLinkUser> LinkUsers { get; set; }
public DbSet<IdentityUserDelegation> UserDelegations { get; set; }
// Tenant Management
public DbSet<Tenant> Tenants { get; set; }
public DbSet<TenantConnectionString> TenantConnectionStrings { get; set; }
#endregion
/// <summary>
///
/// </summary>
public DbSet<MapperProc> MapperProcs { get; set; }
public AgGridReportDbContext(DbContextOptions<AgGridReportDbContext> options)
: base(options)
{
}
protected override void OnModelCreating(ModelBuilder builder)
{
base.OnModelCreating(builder);
/* Include modules to your migration db context */
builder.ConfigurePermissionManagement();
builder.ConfigureSettingManagement();
builder.ConfigureBackgroundJobs();
builder.ConfigureAuditLogging();
builder.ConfigureIdentity();
builder.ConfigureOpenIddict();
builder.ConfigureFeatureManagement();
builder.ConfigureTenantManagement();
/* Configure your own tables/entities inside here */
//builder.Entity<YourEntity>(b =>
//{
// b.ToTable(AgGridReportConsts.DbTablePrefix + "YourEntities", AgGridReportConsts.DbSchema);
// b.ConfigureByConvention(); //auto configure for the base class props
// //...
//});
builder.Entity<MapperProc>(b =>
{
b.ToTable(AgGridReportConsts.DbTablePrefix + "MapperProcs", AgGridReportConsts.DbSchema, table => table.HasComment(""));
b.ConfigureByConvention();
/* Configure more properties here */
});
}
}

33
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportDbContextFactory.cs

@ -0,0 +1,33 @@
using System;
using System.IO;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
namespace WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
/* This class is needed for EF Core console commands
* (like Add-Migration and Update-Database commands) */
public class AgGridReportDbContextFactory : IDesignTimeDbContextFactory<AgGridReportDbContext>
{
public AgGridReportDbContext CreateDbContext(string[] args)
{
AgGridReportEfCoreEntityExtensionMappings.Configure();
var configuration = BuildConfiguration();
var builder = new DbContextOptionsBuilder<AgGridReportDbContext>()
.UseSqlServer(configuration.GetConnectionString("Default"));
return new AgGridReportDbContext(builder.Options);
}
private static IConfigurationRoot BuildConfiguration()
{
var builder = new ConfigurationBuilder()
.SetBasePath(Path.Combine(Directory.GetCurrentDirectory(), "../WinIn.FasterZ.AgGridReport.DbMigrator/"))
.AddJsonFile("appsettings.json", optional: false);
return builder.Build();
}
}

44
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportEfCoreEntityExtensionMappings.cs

@ -0,0 +1,44 @@
using Microsoft.EntityFrameworkCore;
using Volo.Abp.Identity;
using Volo.Abp.ObjectExtending;
using Volo.Abp.Threading;
namespace WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
public static class AgGridReportEfCoreEntityExtensionMappings
{
private static readonly OneTimeRunner OneTimeRunner = new OneTimeRunner();
public static void Configure()
{
AgGridReportGlobalFeatureConfigurator.Configure();
AgGridReportModuleExtensionConfigurator.Configure();
OneTimeRunner.Run(() =>
{
/* You can configure extra properties for the
* entities defined in the modules used by your application.
*
* This class can be used to map these extra properties to table fields in the database.
*
* USE THIS CLASS ONLY TO CONFIGURE EF CORE RELATED MAPPING.
* USE AgGridReportModuleExtensionConfigurator CLASS (in the Domain.Shared project)
* FOR A HIGH LEVEL API TO DEFINE EXTRA PROPERTIES TO ENTITIES OF THE USED MODULES
*
* Example: Map a property to a table field:
ObjectExtensionManager.Instance
.MapEfCoreProperty<IdentityUser, string>(
"MyProperty",
(entityBuilder, propertyBuilder) =>
{
propertyBuilder.HasMaxLength(128);
}
);
* See the documentation for more:
* https://docs.abp.io/en/abp/latest/Customizing-Application-Modules-Extending-Entities
*/
});
}
}

56
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/AgGridReportEntityFrameworkCoreModule.cs

@ -0,0 +1,56 @@
using WinIn.FasterZ.AgGridReport;
using System;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Uow;
using Volo.Abp.AuditLogging.EntityFrameworkCore;
using Volo.Abp.BackgroundJobs.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore.SqlServer;
using Volo.Abp.FeatureManagement.EntityFrameworkCore;
using Volo.Abp.Identity.EntityFrameworkCore;
using Volo.Abp.Modularity;
using Volo.Abp.OpenIddict.EntityFrameworkCore;
using Volo.Abp.PermissionManagement.EntityFrameworkCore;
using Volo.Abp.SettingManagement.EntityFrameworkCore;
using Volo.Abp.TenantManagement.EntityFrameworkCore;
namespace WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
[DependsOn(
typeof(AgGridReportDomainModule),
typeof(AbpIdentityEntityFrameworkCoreModule),
typeof(AbpOpenIddictEntityFrameworkCoreModule),
typeof(AbpPermissionManagementEntityFrameworkCoreModule),
typeof(AbpSettingManagementEntityFrameworkCoreModule),
typeof(AbpEntityFrameworkCoreSqlServerModule),
typeof(AbpBackgroundJobsEntityFrameworkCoreModule),
typeof(AbpAuditLoggingEntityFrameworkCoreModule),
typeof(AbpTenantManagementEntityFrameworkCoreModule),
typeof(AbpFeatureManagementEntityFrameworkCoreModule)
)]
public class AgGridReportEntityFrameworkCoreModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
AgGridReportEfCoreEntityExtensionMappings.Configure();
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddAbpDbContext<AgGridReportDbContext>(options =>
{
/* Remove "includeAllEntities: true" to create
* default repositories only for aggregate roots */
options.AddDefaultRepositories(includeAllEntities: true);
options.AddRepository<MapperProc, MapperProcRepository>();
});
Configure<AbpDbContextOptions>(options =>
{
/* The main point to change your DBMS.
* See also AgGridReportMigrationsDbContextFactory for EF Core tooling. */
options.UseSqlServer();
});
}
}

34
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/EntityFrameworkCore/EntityFrameworkCoreAgGridReportDbSchemaMigrator.cs

@ -0,0 +1,34 @@
using System;
using System.Threading.Tasks;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using WinIn.FasterZ.AgGridReport.Data;
using Volo.Abp.DependencyInjection;
namespace WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
public class EntityFrameworkCoreAgGridReportDbSchemaMigrator
: IAgGridReportDbSchemaMigrator, ITransientDependency
{
private readonly IServiceProvider _serviceProvider;
public EntityFrameworkCoreAgGridReportDbSchemaMigrator(
IServiceProvider serviceProvider)
{
_serviceProvider = serviceProvider;
}
public async Task MigrateAsync()
{
/* We intentionally resolving the AgGridReportDbContext
* from IServiceProvider (instead of directly injecting it)
* to properly get the connection string of the current tenant in the
* current scope.
*/
await _serviceProvider
.GetRequiredService<AgGridReportDbContext>()
.Database
.MigrateAsync();
}
}

1870
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231030033602_Initial.Designer.cs

File diff suppressed because it is too large

1084
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231030033602_Initial.cs

File diff suppressed because it is too large

1895
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231031005700_Added_MapperProc.Designer.cs

File diff suppressed because it is too large

37
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/20231031005700_Added_MapperProc.cs

@ -0,0 +1,37 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace WinIn.FasterZ.AgGridReport.Migrations
{
/// <inheritdoc />
public partial class AddedMapperProc : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "AppMapperProcs",
columns: table => new
{
Id = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ProcName = table.Column<string>(type: "nvarchar(max)", nullable: false),
ProcParameters = table.Column<string>(type: "nvarchar(max)", nullable: true),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_AppMapperProcs", x => x.Id);
},
comment: "");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "AppMapperProcs");
}
}
}

1892
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Migrations/AgGridReportDbContextModelSnapshot.cs

File diff suppressed because it is too large

2
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/Properties/AssemblyInfo.cs

@ -0,0 +1,2 @@
using System.Runtime.CompilerServices;
[assembly:InternalsVisibleToAttribute("WinIn.FasterZ.AgGridReport.EntityFrameworkCore.Tests")]

31
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn.FasterZ.AgGridReport.EntityFrameworkCore.csproj

@ -0,0 +1,31 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Domain\WinIn.FasterZ.AgGridReport.Domain.csproj" />
<PackageReference Include="Volo.Abp.EntityFrameworkCore.SqlServer" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.BackgroundJobs.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.AuditLogging.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.EntityFrameworkCore" Version="7.2.1" />
<PackageReference Include="Volo.Abp.OpenIddict.EntityFrameworkCore" Version="7.2.1" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="7.0.1">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>
</ItemGroup>
</Project>

22
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn/FasterZ/AgGridReport/MapperProcEfCoreQuerableExtensions.cs

@ -0,0 +1,22 @@
using System.Linq;
using Microsoft.EntityFrameworkCore;
namespace WinIn.FasterZ.AgGridReport;
/// <summary>
///
/// </summary>
public static class MapperProcEfCoreQueryableExtensions
{
public static IQueryable<MapperProc> IncludeDetails(this IQueryable<MapperProc> queryable, bool include = true)
{
if (!include)
{
return queryable;
}
return queryable
// .Include(x => x.xxx) // TODO: AbpHelper generated
;
}
}

20
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.EntityFrameworkCore/WinIn/FasterZ/AgGridReport/MapperProcRepository.cs

@ -0,0 +1,20 @@
using System;
using System.Linq;
using System.Threading.Tasks;
using WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
using Volo.Abp.Domain.Repositories.EntityFrameworkCore;
using Volo.Abp.EntityFrameworkCore;
namespace WinIn.FasterZ.AgGridReport;
public class MapperProcRepository : EfCoreRepository<AgGridReportDbContext, MapperProc, Guid>, IMapperProcRepository
{
public MapperProcRepository(IDbContextProvider<AgGridReportDbContext> dbContextProvider) : base(dbContextProvider)
{
}
public override async Task<IQueryable<MapperProc>> WithDetailsAsync()
{
return (await GetQueryableAsync()).IncludeDetails();
}
}

38
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi.Client/AgGridReportHttpApiClientModule.cs

@ -0,0 +1,38 @@
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement;
using Volo.Abp.TenantManagement;
using Volo.Abp.SettingManagement;
using Volo.Abp.VirtualFileSystem;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AgGridReportApplicationContractsModule),
typeof(AbpAccountHttpApiClientModule),
typeof(AbpIdentityHttpApiClientModule),
typeof(AbpPermissionManagementHttpApiClientModule),
typeof(AbpTenantManagementHttpApiClientModule),
typeof(AbpFeatureManagementHttpApiClientModule),
typeof(AbpSettingManagementHttpApiClientModule)
)]
public class AgGridReportHttpApiClientModule : AbpModule
{
public const string RemoteServiceName = "Default";
public override void ConfigureServices(ServiceConfigurationContext context)
{
context.Services.AddHttpClientProxies(
typeof(AgGridReportApplicationContractsModule).Assembly,
RemoteServiceName
);
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.AddEmbedded<AgGridReportHttpApiClientModule>();
});
}
}

29
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi.Client/WinIn.FasterZ.AgGridReport.HttpApi.Client.csproj

@ -0,0 +1,29 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Application.Contracts\WinIn.FasterZ.AgGridReport.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi.Client" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi.Client" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi.Client" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi.Client" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi.Client" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi.Client" Version="7.2.1" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="**\*generate-proxy.json" />
<Content Remove="**\*generate-proxy.json" />
</ItemGroup>
</Project>

41
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/AgGridReportHttpApiModule.cs

@ -0,0 +1,41 @@
using Localization.Resources.AbpUi;
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.Account;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.HttpApi;
using Volo.Abp.SettingManagement;
using Volo.Abp.TenantManagement;
namespace WinIn.FasterZ.AgGridReport;
[DependsOn(
typeof(AgGridReportApplicationContractsModule),
typeof(AbpAccountHttpApiModule),
typeof(AbpIdentityHttpApiModule),
typeof(AbpPermissionManagementHttpApiModule),
typeof(AbpTenantManagementHttpApiModule),
typeof(AbpFeatureManagementHttpApiModule),
typeof(AbpSettingManagementHttpApiModule)
)]
public class AgGridReportHttpApiModule : AbpModule
{
public override void ConfigureServices(ServiceConfigurationContext context)
{
ConfigureLocalization();
}
private void ConfigureLocalization()
{
Configure<AbpLocalizationOptions>(options =>
{
options.Resources
.Get<AgGridReportResource>()
.AddBaseTypes(
typeof(AbpUiResource)
);
});
}
}

14
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/Controllers/AgGridReportController.cs

@ -0,0 +1,14 @@
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.AspNetCore.Mvc;
namespace WinIn.FasterZ.AgGridReport.Controllers;
/* Inherit your controllers from this class.
*/
public abstract class AgGridReportController : AbpControllerBase
{
protected AgGridReportController()
{
LocalizationResource = typeof(AgGridReportResource);
}
}

10
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/Models/Test/TestModel.cs

@ -0,0 +1,10 @@
using System;
namespace WinIn.FasterZ.AgGridReport.Models.Test;
public class TestModel
{
public string Name { get; set; }
public DateTime BirthDate { get; set; }
}

24
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.HttpApi/WinIn.FasterZ.AgGridReport.HttpApi.csproj

@ -0,0 +1,24 @@
<Project Sdk="Microsoft.NET.Sdk">
<Import Project="..\..\common.props" />
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<Nullable>enable</Nullable>
<RootNamespace>WinIn.FasterZ.AgGridReport</RootNamespace>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\WinIn.FasterZ.AgGridReport.Application.Contracts\WinIn.FasterZ.AgGridReport.Application.Contracts.csproj" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Volo.Abp.Account.HttpApi" Version="7.2.1" />
<PackageReference Include="Volo.Abp.Identity.HttpApi" Version="7.2.1" />
<PackageReference Include="Volo.Abp.PermissionManagement.HttpApi" Version="7.2.1" />
<PackageReference Include="Volo.Abp.TenantManagement.HttpApi" Version="7.2.1" />
<PackageReference Include="Volo.Abp.FeatureManagement.HttpApi" Version="7.2.1" />
<PackageReference Include="Volo.Abp.SettingManagement.HttpApi" Version="7.2.1" />
</ItemGroup>
</Project>

10
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportBrandingProvider.cs

@ -0,0 +1,10 @@
using Volo.Abp.Ui.Branding;
using Volo.Abp.DependencyInjection;
namespace WinIn.FasterZ.AgGridReport.Web;
[Dependency(ReplaceServices = true)]
public class AgGridReportBrandingProvider : DefaultBrandingProvider
{
public override string AppName => "AgGridReport";
}

15
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportWebAutoMapperProfile.cs

@ -0,0 +1,15 @@
using WinIn.FasterZ.AgGridReport.Dtos;
using WinIn.FasterZ.AgGridReport.Web.Pages.WinIn.FasterZ.AgGridReport.MapperProc.ViewModels;
using AutoMapper;
namespace WinIn.FasterZ.AgGridReport.Web;
public class AgGridReportWebAutoMapperProfile : Profile
{
public AgGridReportWebAutoMapperProfile()
{
//Define your AutoMapper configuration here for the Web project.
CreateMap<MapperProcDto, CreateEditMapperProcViewModel>();
CreateMap<CreateEditMapperProcViewModel, CreateUpdateMapperProcDto>();
}
}

242
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/AgGridReportWebModule.cs

@ -0,0 +1,242 @@
using System.Collections.Generic;
using System.IO;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.Extensions.DependencyInjection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using WinIn.FasterZ.AgGridReport.EntityFrameworkCore;
using WinIn.FasterZ.AgGridReport.Localization;
using WinIn.FasterZ.AgGridReport.MultiTenancy;
using WinIn.FasterZ.AgGridReport.Web.Menus;
using Microsoft.OpenApi.Models;
using OpenIddict.Validation.AspNetCore;
using Volo.Abp;
using Volo.Abp.Account.Web;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.Localization;
using Volo.Abp.AspNetCore.Mvc.UI;
using Volo.Abp.AspNetCore.Mvc.UI.Bootstrap;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.MultiTenancy;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.LeptonXLite.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Theme.Shared;
using Volo.Abp.AspNetCore.Serilog;
using Volo.Abp.Autofac;
using Volo.Abp.AutoMapper;
using Volo.Abp.BackgroundJobs;
using Volo.Abp.FeatureManagement;
using Volo.Abp.Identity.Web;
using Volo.Abp.Localization;
using Volo.Abp.Modularity;
using Volo.Abp.PermissionManagement.Web;
using Volo.Abp.SettingManagement.Web;
using Volo.Abp.Swashbuckle;
using Volo.Abp.TenantManagement.Web;
using Volo.Abp.UI.Navigation.Urls;
using Volo.Abp.UI;
using Volo.Abp.UI.Navigation;
using Volo.Abp.VirtualFileSystem;
using System;
using System.Linq;
using Microsoft.AspNetCore.Cors;
namespace WinIn.FasterZ.AgGridReport.Web;
[DependsOn(
typeof(AgGridReportHttpApiModule),
typeof(AgGridReportApplicationModule),
typeof(AgGridReportEntityFrameworkCoreModule),
typeof(AbpAutofacModule),
typeof(AbpIdentityWebModule),
typeof(AbpSettingManagementWebModule),
typeof(AbpAccountWebOpenIddictModule),
typeof(AbpAspNetCoreMvcUiLeptonXLiteThemeModule),
typeof(AbpTenantManagementWebModule),
typeof(AbpAspNetCoreSerilogModule),
typeof(AbpSwashbuckleModule)
)]
public class AgGridReportWebModule : AbpModule
{
public override void PreConfigureServices(ServiceConfigurationContext context)
{
context.Services.PreConfigure<AbpMvcDataAnnotationsLocalizationOptions>(options =>
{
options.AddAssemblyResource(
typeof(AgGridReportResource),
typeof(AgGridReportDomainModule).Assembly,
typeof(AgGridReportDomainSharedModule).Assembly,
typeof(AgGridReportApplicationModule).Assembly,
typeof(AgGridReportApplicationContractsModule).Assembly,
typeof(AgGridReportWebModule).Assembly
);
});
PreConfigure<OpenIddictBuilder>(builder =>
{
builder.AddValidation(options =>
{
options.AddAudiences("AgGridReport");
options.UseLocalServer();
options.UseAspNetCore();
});
});
}
public override void ConfigureServices(ServiceConfigurationContext context)
{
var hostingEnvironment = context.Services.GetHostingEnvironment();
var configuration = context.Services.GetConfiguration();
ConfigureAuthentication(context);
ConfigureUrls(configuration);
ConfigureBundles();
ConfigureAutoMapper();
context.Services.AddCors(options =>
{
options.AddDefaultPolicy(builder =>
{
builder
.WithOrigins(
configuration["App:CorsOrigins"]?
.Split(",", StringSplitOptions.RemoveEmptyEntries)
.Select(o => o.RemovePostFix("/"))
.ToArray() ?? Array.Empty<string>()
)
.WithAbpExposedHeaders()
.SetIsOriginAllowedToAllowWildcardSubdomains()
.AllowAnyHeader()
.AllowAnyMethod()
.AllowCredentials();
});
});
ConfigureVirtualFileSystem(hostingEnvironment);
ConfigureNavigationServices();
ConfigureAutoApiControllers();
ConfigureSwaggerServices(context.Services);
}
private void ConfigureAuthentication(ServiceConfigurationContext context)
{
//ÈÆ¹ýÊÚȨ·þÎñ,ÓÃÓÚ²âÊÔ
context.Services.AddAlwaysAllowAuthorization();
context.Services.ForwardIdentityAuthenticationForBearer(OpenIddictValidationAspNetCoreDefaults.AuthenticationScheme);
}
private void ConfigureUrls(IConfiguration configuration)
{
Configure<AppUrlOptions>(options =>
{
options.Applications["MVC"].RootUrl = configuration["App:SelfUrl"];
});
}
private void ConfigureBundles()
{
Configure<AbpBundlingOptions>(options =>
{
options.StyleBundles.Configure(
LeptonXLiteThemeBundles.Styles.Global,
bundle =>
{
bundle.AddFiles("/global-styles.css");
}
);
});
}
private void ConfigureAutoMapper()
{
Configure<AbpAutoMapperOptions>(options =>
{
options.AddMaps<AgGridReportWebModule>();
});
}
private void ConfigureVirtualFileSystem(IWebHostEnvironment hostingEnvironment)
{
if (hostingEnvironment.IsDevelopment())
{
Configure<AbpVirtualFileSystemOptions>(options =>
{
options.FileSets.ReplaceEmbeddedByPhysical<AgGridReportDomainSharedModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.AgGridReport.Domain.Shared"));
options.FileSets.ReplaceEmbeddedByPhysical<AgGridReportDomainModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.AgGridReport.Domain"));
options.FileSets.ReplaceEmbeddedByPhysical<AgGridReportApplicationContractsModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.AgGridReport.Application.Contracts"));
options.FileSets.ReplaceEmbeddedByPhysical<AgGridReportApplicationModule>(Path.Combine(hostingEnvironment.ContentRootPath, $"..{Path.DirectorySeparatorChar}WinIn.FasterZ.AgGridReport.Application"));
options.FileSets.ReplaceEmbeddedByPhysical<AgGridReportWebModule>(hostingEnvironment.ContentRootPath);
});
}
}
private void ConfigureNavigationServices()
{
Configure<AbpNavigationOptions>(options =>
{
options.MenuContributors.Add(new AgGridReportMenuContributor());
});
}
private void ConfigureAutoApiControllers()
{
Configure<AbpAspNetCoreMvcOptions>(options =>
{
options.ConventionalControllers.Create(typeof(AgGridReportApplicationModule).Assembly);
});
}
private void ConfigureSwaggerServices(IServiceCollection services)
{
services.AddAbpSwaggerGen(
options =>
{
options.SwaggerDoc("v1", new OpenApiInfo { Title = "AgGridReport API", Version = "v1" });
options.DocInclusionPredicate((docName, description) => true);
options.CustomSchemaIds(type => type.FullName);
}
);
}
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var app = context.GetApplicationBuilder();
var env = context.GetEnvironment();
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseAbpRequestLocalization();
if (!env.IsDevelopment())
{
app.UseErrorPage();
}
app.UseCorrelationId();
app.UseStaticFiles();
app.UseRouting();
app.UseCors();
app.UseAuthentication();
app.UseAbpOpenIddictValidation();
if (MultiTenancyConsts.IsEnabled)
{
app.UseMultiTenancy();
}
app.UseUnitOfWork();
app.UseAuthorization();
app.UseSwagger();
app.UseAbpSwaggerUI(options =>
{
options.SwaggerEndpoint("/swagger/v1/swagger.json", "AgGridReport API");
});
app.UseAuditing();
app.UseAbpSerilogEnrichers();
app.UseConfiguredEndpoints();
}
}

4
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Components/_ViewImports.cshtml

@ -0,0 +1,4 @@
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bootstrap
@addTagHelper *, Volo.Abp.AspNetCore.Mvc.UI.Bundling

54
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Menus/AgGridReportMenuContributor.cs

@ -0,0 +1,54 @@
using System.Threading.Tasks;
using WinIn.FasterZ.AgGridReport.Localization;
using WinIn.FasterZ.AgGridReport.MultiTenancy;
using Volo.Abp.Identity.Web.Navigation;
using Volo.Abp.SettingManagement.Web.Navigation;
using Volo.Abp.TenantManagement.Web.Navigation;
using Volo.Abp.UI.Navigation;
namespace WinIn.FasterZ.AgGridReport.Web.Menus;
public class AgGridReportMenuContributor : IMenuContributor
{
public async Task ConfigureMenuAsync(MenuConfigurationContext context)
{
if (context.Menu.Name == StandardMenus.Main)
{
await ConfigureMainMenuAsync(context);
}
}
private Task ConfigureMainMenuAsync(MenuConfigurationContext context)
{
var administration = context.Menu.GetAdministration();
var l = context.GetLocalizer<AgGridReportResource>();
context.Menu.Items.Insert(
0,
new ApplicationMenuItem(
AgGridReportMenus.Home,
l["Menu:Home"],
"~/",
icon: "fas fa-home",
order: 0
)
);
if (MultiTenancyConsts.IsEnabled)
{
administration.SetSubItemOrder(TenantManagementMenuNames.GroupName, 1);
}
else
{
administration.TryRemoveMenuItem(TenantManagementMenuNames.GroupName);
}
administration.SetSubItemOrder(IdentityMenuNames.GroupName, 2);
administration.SetSubItemOrder(SettingManagementMenuNames.GroupName, 3);
return Task.CompletedTask;
context.Menu.AddItem(
new ApplicationMenuItem(AgGridReportMenus.MapperProc, l["Menu:MapperProc"], "/WinIn/FasterZ/AgGridReport/MapperProc")
);
}
}

11
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Menus/AgGridReportMenus.cs

@ -0,0 +1,11 @@
namespace WinIn.FasterZ.AgGridReport.Web.Menus;
public class AgGridReportMenus
{
private const string Prefix = "AgGridReport";
public const string Home = Prefix + ".Home";
//Add your menu items here...
public const string MapperProc = Prefix + ".MapperProc";
}

14
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Pages/AgGridReportPageModel.cs

@ -0,0 +1,14 @@
using WinIn.FasterZ.AgGridReport.Localization;
using Volo.Abp.AspNetCore.Mvc.UI.RazorPages;
namespace WinIn.FasterZ.AgGridReport.Web.Pages;
/* Inherit your PageModel classes from this class.
*/
public abstract class AgGridReportPageModel : AbpPageModel
{
protected AgGridReportPageModel()
{
LocalizationResourceType = typeof(AgGridReportResource);
}
}

187
WinIn.FasterZ.AgGridReport/src/WinIn.FasterZ.AgGridReport.Web/Pages/Index.cshtml

@ -0,0 +1,187 @@
@page
@using Microsoft.AspNetCore.Mvc.Localization
@using WinIn.FasterZ.AgGridReport.Localization
@using Volo.Abp.Users
@model WinIn.FasterZ.AgGridReport.Web.Pages.IndexModel
@inject IHtmlLocalizer<AgGridReportResource> L
@inject ICurrentUser CurrentUser
@section styles {
<abp-style src="/Pages/Index.css" />
}
@section scripts {
<abp-script src="/Pages/Index.js" />
}
<div class="container">
<div class="p-5 text-center">
<div class="d-inline-block bg-success text-white p-1 h5 rounded mb-4 " role="alert">
<h5 class="m-1"> <i class="fas fa-rocket"></i> Congratulations, <strong>AgGridReport</strong> is successfully running!</h5>
</div>
<h1>Welcome to the Application</h1>
<p class="lead px-lg-5 mx-lg-5">@L["LongWelcomeMessage"]</p>
@if (!CurrentUser.IsAuthenticated)
{
<a abp-button="Primary" href="~/Account/Login"><i class="fa fa-sign-in"></i> @L["Login"]</a>
}
</div>
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-auto text-center">
<img src="https://abp.io/assets/png/mastering-abp-framework.webp" style="max-width: 400px;" class="w-100 mb-5 my-md-3">
</div>
<div class="col-md d-flex align-items-center">
<div class="pe-0 pe-md-4">
<small class="text-uppercase text-muted">THE OFFICIAL GUIDE</small>
<h2 class="mb-4">Mastering ABP Framework</h2>
<p class="mb-4">Written by the creator of the ABP Framework, this book will help you gain a complete understanding of the framework and modern web application development techniques.</p>
<div class="mb-4">
<a href="https://www.amazon.com/gp/product/B097Z2DM8Q/ref=dbs_a_def_rwt_hsch_vapi_tkin_p1_i0" class="btn btn-success mb-1">
Buy on Amazon US
</a>
<a href="https://www.packtpub.com/product/mastering-abp-framework/9781801079242" class="btn btn-primary mb-1">
Buy on PACKT
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="my-3 text-center">
<h3>Let's improve your application!</h3>
<p>Here are some links to help you get started:</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<div class="row text-center justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-book text-secondary d-block my-3 fa-2x"></i> Learn the ABP Framework</h5>
<p>Explore the compherensive documentation to learn how to build a modern web application.</p>
<a href="https://docs.abp.io/en/abp/latest?ref=tmpl" target="_blank" class="btn btn-link px-1">See Documents <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-cubes text-secondary d-block my-3 fa-2x"></i> Samples</h5>
<p>See the example projects built with the ABP Framework.</p>
<a href="https://docs.abp.io/en/abp/latest/Samples/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">All samples <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-users text-secondary d-block my-3 fa-2x"></i> ABP Community</h5>
<p>Get involved with a vibrant community and become a contributor.</p>
<a href="https://community.abp.io/" target="_blank" class="btn btn-link px-1">Community <i class="fas fa-chevron-right"></i></a>
<a href="https://docs.abp.io/en/abp/latest/Contribution/Index?ref=tmpl" target="_blank" class="btn btn-link px-1">Contribute <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
<div class="row text-center mt-lg-3 justify-content-md-center">
<div class="col-lg-4">
<div class="p-4">
<h5 class="mb-3"><i class="fas fa-pen-nib text-secondary d-block my-3 fa-2x"></i> ABP Blog</h5>
<p>Take a look at our recently published articles.</p>
<a href="https://blog.abp.io/abp?ref=tmpl" target="_blank" class="btn btn-link px-1">See Blog <i class="fas fa-chevron-right"></i></a>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-github text-secondary d-block my-3 fa-2x"></i> Github</h5>
<p>Do you love the ABP Framework? Please <strong>give a star</strong> to support it!</p>
<p class="mb-1">
<a class="github-button" href="https://github.com/abpframework/abp" data-icon="octicon-star" data-size="large" data-show-count="true" aria-label="Star abpframework/abp on GitHub">Star</a>
<a class="github-button" href="https://github.com/abpframework/abp/issues" data-icon="octicon-issue-opened" data-size="large" data-show-count="false" aria-label="Issue abpframework/abp on GitHub">Issue</a>
<a class="github-button" href="https://github.com/abpframework/abp/fork" data-icon="octicon-repo-forked" data-size="large" data-show-count="false" aria-label="Fork abpframework/abp on GitHub">Fork</a>
</p>
<a href="https://github.com/abpframework/abp/issues/new?template=feature.md" target="_blank" class="btn btn-link px-1">Request a feature <i class="fas fa-chevron-right"></i></a>
<script async defer src="https://buttons.github.io/buttons.js"></script>
</div>
</div>
<div class="col-lg-4 border-start">
<div class="p-4">
<h5 class="mb-3"><i class="fab fa-stack-overflow text-secondary d-block my-3 fa-2x"></i> Stackoverflow</h5>
<p>See answers to previously asked questions or ask a new one.</p>
<a href="https://stackoverflow.com/questions/tagged/abp" target="_blank" class="btn btn-link px-1">Questions <i class="fas fa-chevron-right"></i></a>
<a href="https://stackoverflow.com/questions/ask" target="_blank" class="btn btn-link px-1">Ask a Question <i class="fas fa-chevron-right"></i></a>
</div>
</div>
</div>
</div>
</div>
<div class="mt-5 my-3 text-center">
<h3>Meet the ABP Commercial</h3>
<p>A Complete Web Application Platform Built on the ABP Framework</p>
</div>
<div class="card mt-4 mb-5">
<div class="card-body">
<p class="px-lg-5 mx-lg-5 py-3 text-center">
<a href="https://commercial.abp.io/" target="_blank">ABP Commercial</a> is a platform based on the open source ABP framework. It provides pre-built application modules,
rapid application development tooling, professional UI themes, premium support and more.
</p>
<div class="row text-center justify-content-md-center">
<div class="col-lg-2">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Startup Templates
<a href="https://commercial.abp.io/startup-templates?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Application Modules
<a href="https://commercial.abp.io/modules?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Developer<br />Tools
<a href="https://commercial.abp.io/tools?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> UI<br /> Themes
<a href="https://commercial.abp.io/themes?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Premium Support
<a href="https://support.abp.io/QA/Questions?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
<div class="col-lg-2 border-start">
<div class="p-3">
<h6>
<i class="fas fa-plus d-block mb-3 fa- 2x text-secondary"></i> Additional Services
<a href="https://commercial.abp.io/additional-services?ref=tmpl" target="_blank" class="d-block mt-2 btn btn-sm btn-link">Details <i class="fas fa-chevron-right"></i></a>
</h6>
</div>
</div>
</div>
</div>
</div>
<div class="mb-5 text-center">
<p class="align-middle">
<a href="https://twitter.com/abpframework" target="_blank" class="mx-2"><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Framework</span></a>
<a href="https://twitter.com/abpcommercial" target="_blank" class="mx-2"><i class="fa fa-twitter"></i><span class="text-secondary"> Abp Commercial</span></a>
<a href="https://github.com/abpframework/abp" target="_blank" class="mx-2"><i class="fa fa-github"></i><span class="text-secondary"> abpframework</span></a>
</p>
</div>
</div>

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save