Compare commits
410 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 40fa485b33 | |||
| 691deb40ee | |||
| a4828875f7 | |||
| 5cac2f22ec | |||
| 98de9ea6be | |||
| 367e2be94c | |||
| 9a071bfc52 | |||
| 6f320d38b5 | |||
| ab3acadafe | |||
| e27aff7ad2 | |||
| 512f37654a | |||
| 5a1f5c2da9 | |||
| cc3b32f1d9 | |||
| 57d3f9433d | |||
| 191ca5f2a2 | |||
| 1b491bd8a0 | |||
| badf940391 | |||
| e157770076 | |||
| 6c8e118a46 | |||
| 1beb1c54d4 | |||
| d4d8cc9204 | |||
| 77a7294cf0 | |||
| c8ed62ad82 | |||
| c2eae8ad9e | |||
| 249035756f | |||
| cabd291b63 | |||
| 2586f443b0 | |||
| 1698e326a2 | |||
| b2fed86c03 | |||
| c7218c0941 | |||
| 4beae1d55c | |||
| 8be28cd5b6 | |||
| c3da3a0aa3 | |||
| d4a03a3fd6 | |||
| 8df4d68fc2 | |||
| fb070c030a | |||
| 393613cb1a | |||
| a4e62dc681 | |||
| 8e2ea5c312 | |||
| 0da0fa9fa4 | |||
| 0ba8cf6ef0 | |||
| 5940e1262d | |||
| 1f9923ff8f | |||
| 06feff5655 | |||
| 1a498357c1 | |||
| e24a76accd | |||
| f7cf1727c9 | |||
| f93b79bbf0 | |||
| ac8e8a8682 | |||
| 635457aef5 | |||
| 057da27842 | |||
| 15d2d0244b | |||
| a5d7992b28 | |||
| 3997aa97e9 | |||
| d10933c76e | |||
| 1d9ec9be58 | |||
| 11ca037e8e | |||
| bb078ac88f | |||
| e9ff15f07f | |||
| fbfcb9d012 | |||
| 3cd968d148 | |||
| 4f620f3441 | |||
| 4a5601c8c5 | |||
| b29398c673 | |||
| 4a2808a955 | |||
| b02481ef33 | |||
| 8287ff68ef | |||
| dc7ee1eb00 | |||
| 4d3eafc7e7 | |||
| c4f832cc59 | |||
| 6f7b917c12 | |||
| 509e9c4c6b | |||
| 0d803d552d | |||
| 84e715f7d9 | |||
| f01f3542ac | |||
| 4c0e96e89f | |||
| cba65097ee | |||
| 3a3e3a3fd1 | |||
| 9beadf6e35 | |||
| a0580332f5 | |||
| de7ab813bc | |||
| f5e44de50c | |||
| c6f8b9fc75 | |||
| c4922c3c23 | |||
| 6213564693 | |||
| 61198818a5 | |||
| 5fb1f3a170 | |||
| 725b847770 | |||
| 0459a458de | |||
| bcfb5f3b13 | |||
| f354330756 | |||
| 4d4b7c4cd0 | |||
| 092315ccc8 | |||
| 014a52ad34 | |||
| 36359ab59a | |||
| 8d8b5931c4 | |||
| e8878df82e | |||
| 75409430c4 | |||
| 7bb73093a7 | |||
| 75a37728d3 | |||
| ea71e26a16 | |||
| d80d005925 | |||
| d8abd9d08c | |||
| edb1778b82 | |||
| 4c4b90a336 | |||
| 8127654ce3 | |||
| 37e8ff9001 | |||
| 7a704f5a02 | |||
| 8086f27140 | |||
| 7b3fab1f31 | |||
| 2cdb87496b | |||
| a359b73191 | |||
| 731bd5ccdc | |||
| d50b167b9d | |||
| 2c02e27e5d | |||
| 9193d45fb0 | |||
| 6eed928af5 | |||
| 9e65f9dce1 | |||
| e23d29a72a | |||
| 955529ac1c | |||
| 78604b3f54 | |||
| c673dcc627 | |||
| 9ff4d56137 | |||
| 6844b6edd3 | |||
| 7d7d65e250 | |||
| 4f92e44024 | |||
| cf7211e08e | |||
| 1f1bd8ebaa | |||
| 41d67c3686 | |||
| b544524fd9 | |||
| 4ab48e3b18 | |||
| 2bcb89ba14 | |||
| c4f16804e7 | |||
| 1d171adcb4 | |||
| af2fa72743 | |||
| 3c63d0c093 | |||
| 33aae7dba3 | |||
| ead026a15e | |||
| 44e62b8798 | |||
| 876504ebee | |||
| 4c31a1bd60 | |||
| dd4363ba34 | |||
| f0d2ccddea | |||
| 813a1733dd | |||
| 9808f32544 | |||
| 47a63d5d60 | |||
| 92fa6ea474 | |||
| eb08eeb7d8 | |||
| e00987e96c | |||
| 84c7d075b3 | |||
| caaa2c602a | |||
| b8770953f6 | |||
| e7eb191ef4 | |||
| 3e6c76aec5 | |||
| fe475c1910 | |||
| 4ff5f4eb7f | |||
| 499df2e116 | |||
| 1f3d60afa8 | |||
| 35804905af | |||
| 79822237a7 | |||
| 5dd78c5b0f | |||
| 4714bb6034 | |||
| c1a4e26f52 | |||
| f7548ef074 | |||
| 2e8555c9a4 | |||
| ce3cad0fc3 | |||
| e231234afe | |||
| a9ba01a178 | |||
| 4d1f06cfbe | |||
| 8d0f7bb3fa | |||
| 23727217df | |||
| 0dfe90ec95 | |||
| 2701c951a8 | |||
| 594d1c7095 | |||
| 05bf416ca1 | |||
| 10d5330cb9 | |||
| ea550f37b6 | |||
| d6e7c0dcd6 | |||
| 6508d1dd2a | |||
| ee45a5fb42 | |||
| 06e8f910d8 | |||
| e07d7d8d37 | |||
| 8df04e2760 | |||
| 3246f62dc4 | |||
| 9dec436896 | |||
| 2e9c948da5 | |||
| 1d3e4cac06 | |||
| 86147cbfb0 | |||
| e47906eb4a | |||
| b6fd3f15f4 | |||
| 949958c9b3 | |||
| 15a8759574 | |||
| 7cccfe66fc | |||
| d7f34df0f6 | |||
| 759d9be118 | |||
| 8b13765bfc | |||
| 59d6bc1205 | |||
| a510e9196a | |||
| 4b94420a9f | |||
| 6b9b5cc8fc | |||
| 1029d8522c | |||
| 1f6f7bc78a | |||
| 7dfebf08bd | |||
| 56dc492d0b | |||
| 266b252b27 | |||
| c83add7d37 | |||
| 04b358c7bd | |||
| c9a7f9f903 | |||
| 8da18ef306 | |||
| f63e969f69 | |||
| aa685839cd | |||
| eff48abdb9 | |||
| c2d79f5f3a | |||
| 14e6c4c85e | |||
| 07e9a0237d | |||
| 8e1f21f417 | |||
| 6895a0f192 | |||
| 3666354194 | |||
| 6a0787335e | |||
| e8b02d6578 | |||
| 525569b04e | |||
| 4111d559b4 | |||
| d3adaaf968 | |||
| dca0e3f843 | |||
| 0cb5def602 | |||
| ce120f3e67 | |||
| 2bd6b441ea | |||
| 2dceeda6b1 | |||
| ae05935402 | |||
| 806eef6d6f | |||
| 4064906ae5 | |||
| 1129cf4b0d | |||
| 36a03fe9d5 | |||
| 2aced5e705 | |||
| ca8a805d18 | |||
| 7e1cfef511 | |||
| 162a08e120 | |||
| d0652c52c5 | |||
| f61a671661 | |||
| cda8063358 | |||
| 89894fd242 | |||
| 1cd82ef617 | |||
| 0cf477ad54 | |||
| eabf5ba12e | |||
| d2a3c54eba | |||
| 0878d7efc4 | |||
| 149061a689 | |||
| 0169d9d8d1 | |||
| b4f3891a85 | |||
| ad06acd392 | |||
| 6df0db4e1b | |||
| 1c30ccf024 | |||
| 89d479c356 | |||
| 4c5ac0ada4 | |||
| 59b3a48732 | |||
| 6161f4d52b | |||
| 2f410275c4 | |||
| edff91caed | |||
| b3c1abd32c | |||
| 8a7be62f1b | |||
| 081e54d85d | |||
| 52bd4eb785 | |||
| b771e3dc65 | |||
| aef9d6a2f9 | |||
| b07aa8f9c2 | |||
| 2dd307b0f1 | |||
| c964089fc9 | |||
| 998e092f69 | |||
| b719150999 | |||
| a87542d37a | |||
| 0084a77030 | |||
| 226247f8be | |||
| 7cfedd2e56 | |||
| e24e0143f5 | |||
| 97d582e733 | |||
| 38b3814f22 | |||
| be33cdfd25 | |||
| 08980f110d | |||
| d8e189489a | |||
| 8fdde6b7ee | |||
| 983194d2fb | |||
| 7bb3de466b | |||
| 28888dd085 | |||
| 994fe22e22 | |||
| a392723b01 | |||
| bb578cb856 | |||
| 609ecbf2ae | |||
| 9d8ab51420 | |||
| 594b7b925d | |||
| 845095ec6c | |||
| 04c1aca268 | |||
| 5f31052bde | |||
| cac6ef4499 | |||
| 22fbd0153f | |||
| 6d1b5c2806 | |||
| 09776ab2d1 | |||
| 236bb47f17 | |||
| fa98ed495b | |||
| a7831be194 | |||
| e95650bfdf | |||
| 1f96279c91 | |||
| 96c4b3078b | |||
| 9ff6025061 | |||
| 7b018b0f5e | |||
| 888e7c52ac | |||
| 81dfe6be4a | |||
| 10645b3fb0 | |||
| e31528769b | |||
| 1826963054 | |||
| 0239acea9a | |||
| 0a66cb3e53 | |||
| 6adf3f386c | |||
| 33747b9eab | |||
| 31b10c2593 | |||
| ced194d513 | |||
| 9a144a95ff | |||
| 1ba31b7c59 | |||
| 2ac6bd94eb | |||
| 9c4e82108c | |||
| 7ddf9cfab0 | |||
| 186191e6c1 | |||
| 0e910df132 | |||
| cbadcd9f96 | |||
| aaeddc7e54 | |||
| e9116e9904 | |||
| f96ea5bd62 | |||
| eec4608919 | |||
| 086f46eb62 | |||
| 3429f4fa31 | |||
| 196869d631 | |||
| d7621a2639 | |||
| 9f8fbab059 | |||
| ef916c4aa2 | |||
| 371eab4f65 | |||
| c8b7826a0c | |||
| d70b286940 | |||
| 7a04a6ef57 | |||
| ba9149be80 | |||
| 28a51631ca | |||
| 27e1fa5c0a | |||
| 842849b35b | |||
| 895337468d | |||
| ae684a121d | |||
| b474606de0 | |||
| e35282f8cd | |||
| 2cd21b3efd | |||
| d1fca97d25 | |||
| 45f33bb6c7 | |||
| 0ef69bb675 | |||
| e7d7783d29 | |||
| 50c961408c | |||
| 55d1dbf6ef | |||
| be3ff6e861 | |||
| 0ea1c28424 | |||
| 10f8108393 | |||
| d33bb2110c | |||
| 38f8febe60 | |||
| c6ae31c80d | |||
| c0a8785b28 | |||
| 995aff5bf9 | |||
| 72a2bc53da | |||
| a0f30600b4 | |||
| 4bd65555a1 | |||
| 9896afb7c8 | |||
| 7b61d49767 | |||
| 7995436689 | |||
| 3f0c0e2b93 | |||
| f704525053 | |||
| b0fd6fc28a | |||
| 278c8d2dba | |||
| 0bcc18a1d3 | |||
| de2e831a70 | |||
| e11dae3a9c | |||
| 5b6ccd560d | |||
| c3a1b73256 | |||
| 04f0044b36 | |||
| 91641a8936 | |||
| f78fb92d52 | |||
| b031dd0bec | |||
| 33a43ce370 | |||
| a1955d56ee | |||
| 96fdf85b27 | |||
| cc08f30647 | |||
| 6a8274171a | |||
| 7508b118fe | |||
| 3e79d95d60 | |||
| 8e99ac071e | |||
| ab9438d590 | |||
| 6230fa3512 | |||
| d2a8f78b5f | |||
| 3a0fc194a6 | |||
| 4ed79e89f7 | |||
| 67549e8bb3 | |||
| 118c32c7c5 | |||
| 973417edcc | |||
| 952014c8f6 | |||
| 3b1af14aa9 | |||
| fa32c7d3b9 | |||
| 37c00cd31f | |||
| 6838723e50 | |||
| 3895594bf6 | |||
| 13fb31d51c | |||
| 28c55f9746 | |||
| 65c07b4777 | |||
| 0c60ce2746 | |||
| f03aa8dad5 | |||
| a074c05faf | |||
| 47d800c08e | |||
| 38a6f0c8e9 | |||
| deb25ae326 |
@@ -0,0 +1,229 @@
|
||||
variables:
|
||||
VERS_MAIN: '0.9'
|
||||
NEW_REL: ''
|
||||
APP_NAME: 'WDC.UI'
|
||||
SOL_NAME: 'WebDoorCreator.UI'
|
||||
|
||||
# helper x fix pacchetti nuget da repo locale nexus.steamware.net
|
||||
.nuget-fix: &nuget-fix
|
||||
- |
|
||||
echo "esecuzione Nuget FIX steps"
|
||||
dotnet nuget list source
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus Proxy"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "`"Steamware Nexus Proxy`""
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "Steamware Nexus"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source "`"Steamware Nexus`""
|
||||
}
|
||||
$hasSource = dotnet nuget list source | Select-String -Pattern "nexus-proxy-v3"
|
||||
if (! [String]::IsNullOrWhiteSpace($hasSource)) {
|
||||
dotnet nuget remove source nexus-proxy-v3
|
||||
}
|
||||
dotnet nuget add source https://nexus.steamware.net/repository/nuget-group-3/index.json -n "Steamware Nexus" -u nugetUser -p $NEXUS_PASSWD --store-password-in-clear-text
|
||||
echo "Steamware Nexus Source added"
|
||||
|
||||
# helper creazione hash files x IIS
|
||||
.hashBuild: &hashBuild
|
||||
- |
|
||||
$Target = $env:APP_NAME + "\bin\publish\" + $env:APP_NAME + ".zip"
|
||||
$MD5 = Get-FileHash $Target -Algorithm MD5
|
||||
$SHA1 = Get-FileHash $Target -Algorithm SHA1
|
||||
New-Item $Target".md5"
|
||||
New-Item $Target".sha1"
|
||||
$MD5.Hash | Set-Content -Path $Target".md5"
|
||||
$SHA1.Hash | Set-Content -Path $Target".sha1"
|
||||
|
||||
echo "Created HASH files for $Target"
|
||||
|
||||
# helper x send su NEXUS x pack
|
||||
.nexusUpload: &nexusUpload
|
||||
- |
|
||||
Set-Alias mCurl C:\Windows\system32\curl.exe
|
||||
$fileVers = $env:APP_NAME + "\Resources\VersNum.txt"
|
||||
$VersNumb = Get-Content $fileVers
|
||||
echo "Curr Version: $VersNumb"
|
||||
if($CI_COMMIT_BRANCH -eq "master")
|
||||
{
|
||||
$version = "stable"
|
||||
}
|
||||
else
|
||||
{
|
||||
$version = "unstable"
|
||||
}
|
||||
$File2Send = Get-ChildItem($env:APP_NAME + "\bin\publish\*")
|
||||
ForEach ($File in $File2Send) {
|
||||
$FileName = Split-Path $File -leaf
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/$FileName
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file $File https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/ARCHIVE/$VersNumb/$FileName
|
||||
}
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\manifest.xml" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/manifest.xml
|
||||
mCurl -v -u GitLab:$NEXUS_PASSWD --upload-file "$env:APP_NAME\Resources\ChangeLog.html" https://nexus.steamware.net/repository/SWS/$env:NEXUS_PATH/$version/LAST/ChangeLog.html
|
||||
|
||||
stages:
|
||||
- build
|
||||
- staging
|
||||
- deploy
|
||||
- release
|
||||
|
||||
# ---------- BUILD ----------
|
||||
WDC.Api:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
WDC.UI:build:
|
||||
stage: build
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ---------- STAGING ----------
|
||||
WDC.Api:staging:
|
||||
stage: staging
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- develop
|
||||
needs: ["WDC.Api:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
WDC.UI:staging:
|
||||
stage: staging
|
||||
tags:
|
||||
- win
|
||||
environment:
|
||||
name: staging
|
||||
url: https://iis01.egalware.com/GPW/WDC.UI
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- develop
|
||||
needs: ["WDC.UI:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ---------- DEPLOY ----------
|
||||
WDC.Api:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
environment:
|
||||
name: production
|
||||
url: https://seriate.egalware.com/GPW/WDC.UI
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- main
|
||||
needs: ["WDC.Api:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS 02
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS PROD
|
||||
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
WDC.UI:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- main
|
||||
needs: ["WDC.UI:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS EXT
|
||||
- dotnet publish -p:PublishProfile=IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS INT
|
||||
- dotnet publish -p:PublishProfile=IIS-PROD.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=jenkins -p:Password=$IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
# ---------- RELEASE ----------
|
||||
WDC.Api:release:
|
||||
stage: release
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- main
|
||||
except:
|
||||
- branches
|
||||
needs: ["WDC.Api:build"]
|
||||
before_script:
|
||||
- *nuget-fix
|
||||
- dotnet restore "$env:SOL_NAME.sln"
|
||||
artifacts:
|
||||
paths:
|
||||
- publish/
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
|
||||
# qui il deploy su nexus...
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
# script:
|
||||
# - dotnet publish -c Release -o ./publish GPW.WDC.Api/GPW.WDC.Api.csproj
|
||||
|
||||
WDC.UI:release:
|
||||
stage: release
|
||||
tags:
|
||||
- win
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
only:
|
||||
- main
|
||||
except:
|
||||
- branches
|
||||
needs: ["WDC.UI:build"]
|
||||
artifacts:
|
||||
paths:
|
||||
- publish/
|
||||
script:
|
||||
- dotnet build $env:APP_NAME/$env:APP_NAME.csproj
|
||||
- dotnet publish -p:PublishProfile=IISProfile.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release $env:APP_NAME/$env:APP_NAME.csproj -o:publish -p:verbosity=quiet
|
||||
# qui il deploy su nexus...
|
||||
- *hashBuild
|
||||
- *nexusUpload
|
||||
# script:
|
||||
# - dotnet publish -c Release -o ./publish GPW.CORE.WRKLOG/GPW.CORE.WRKLOG.csproj
|
||||
@@ -0,0 +1,78 @@
|
||||
# Elenco ToDo
|
||||
|
||||
Di seguito l'elenco dei todo da completare
|
||||
|
||||
## Framework
|
||||
|
||||
Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
|
||||
## Pagine
|
||||
|
||||
### HOME page
|
||||
|
||||
... non saprei, forse link a
|
||||
- help
|
||||
- sito web generale DCA
|
||||
- sito egalware
|
||||
- statistiche...
|
||||
|
||||
### Orders Home page
|
||||
|
||||
Per completare
|
||||
- [x] aggiunta paginatore
|
||||
- [x] aggiunta stato ordine
|
||||
- [x] aggiunta filtri ricerca
|
||||
- periodo da-a
|
||||
- search generico
|
||||
- stato ordine
|
||||
- [x] ordinamento
|
||||
|
||||
### DCA Order Mans
|
||||
|
||||
FORSE la Orders home Page NON VA bene x gli utenti backoffice, oppure va estesa, perché x confermare quotazione, indicare avanzamento ordini gli operatori ABH/DCA devono avere una pagina operativa...
|
||||
|
||||
### OrderDetails
|
||||
|
||||
Per completare:
|
||||
|
||||
- [x] aggiunta button x il cambio stato da end-user
|
||||
- [x] sistemare con paginatore max 3 righe x 4 porte
|
||||
- [x] fix button verde add-new
|
||||
- [x] ombreggiatura blocco
|
||||
|
||||
### DoorDefinition BaseParams
|
||||
- [x] conteggio num modifiche da salvare
|
||||
- [x] armonizzare il cancel/save nella pagina
|
||||
- [x] revisione testata fino al btn del salva generale
|
||||
- [x] sostituire il salva generale con 2 buttons:
|
||||
- salva, o meglio RECALC PNG = update PNG, potrebbe andare in automatico DOPO i vari SALVA nella pagina (opzione x auto-recalc?!?)
|
||||
- get 3D obj (in new window/tab)
|
||||
|
||||
- [x] delete singola porta da ordine
|
||||
- [x] navigazione in ritorno come da FIGMA in HwNewInst
|
||||
- [x] refresh conteggi su approvazione
|
||||
- [x] conteggio istanze in aggiunta HW
|
||||
|
||||
### DoorDefinition Hardware
|
||||
|
||||
Sistemare:
|
||||
- [x] da implementare davvero lettura pdf (da cartella pdf di esempi)
|
||||
- [x] fix cancel/save: globale x Hardware oppure x ognuno con icona?
|
||||
- [ ] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] mancano il totale componenti x ogni hw attivato
|
||||
|
||||
#### Report
|
||||
|
||||
- [x] Va inserita una lista dei componenti + elenco quote.
|
||||
- [ ] Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
|
||||
## Componenti
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Da sistemare
|
||||
|
||||
- [x] btn effettivi
|
||||
- [x] dinamico da user-role?
|
||||
- [x] fix responsive
|
||||
@@ -297,6 +297,10 @@ During standard user process the task of time/cost estimation (based on actual D
|
||||
|
||||
In particular we expect to have some data auto-calculated (ex time from CAM), while other data will be required to external system (ex: materials cost, availability date for materials or machine time, cost markup to define final user price, custom discount based on customer special agreements...)
|
||||
|
||||
<div style="page-break-after: always; visibility: hidden"></div>
|
||||
|
||||
|
||||
|
||||
<div style="page-break-after: always; visibility: hidden"></div>
|
||||
|
||||
# 6. Document Revision
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: {{CURRENT-REL}}</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Last Changes:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.* →</b>
|
||||
<ul>
|
||||
<li>First CORE UI</li>
|
||||
<li>First CORE API rest services</li>
|
||||
<li>integration with EgtEngine server</li>
|
||||
<li>Release dotnet6</li>
|
||||
<li>EFCore Engine</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="LogoEgw.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.egalware.net/" target="_blank">© Egalware 2022+</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
@@ -0,0 +1,29 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2612</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
<b>Last Changes:</b>
|
||||
<ul>{{LAST-CHANGES}}</ul>
|
||||
</li>
|
||||
<li>
|
||||
<b>v.0.* →</b>
|
||||
<ul>
|
||||
<li>First CORE UI</li>
|
||||
<li>First CORE API rest services</li>
|
||||
<li>integration with EgtEngine server</li>
|
||||
<li>Release dotnet6</li>
|
||||
<li>EFCore Engine</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<div>
|
||||
<div style="float: left;">
|
||||
<img src="LogoEgw.png" />
|
||||
</div>
|
||||
<div style="float: right;">
|
||||
<a href="https://www.egalware.net/" target="_blank">© Egalware 2022+</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1 @@
|
||||
0.9.
|
||||
@@ -0,0 +1 @@
|
||||
0.9.2305.2612
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>1.0.0.0</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/{{PACKNAME}}.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/{{DIRNAME}}/{{BRANCHNAME}}/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2612</version>
|
||||
<url>http://nexus.steamware.net/repository/SWS/WDC/stable/WDC.UI.zip</url>
|
||||
<changelog>http://nexus.steamware.net/repository/SWS/WDC/stable/ChangeLog.html</changelog>
|
||||
<mandatory>false</mandatory>
|
||||
</item>
|
||||
@@ -0,0 +1,75 @@
|
||||
// See https://aka.ms/new-console-template for more information
|
||||
using System.Diagnostics;
|
||||
|
||||
int lineCount = 0;
|
||||
|
||||
|
||||
void OutputHandler(object sender, DataReceivedEventArgs e)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(e.Data))
|
||||
{
|
||||
Console.WriteLine($"RIPOSTA PROCESSO [{lineCount}] - {e.Data}");
|
||||
if (e.Data == "SUCCESS")
|
||||
{
|
||||
lineCount += 1;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
var domanda = "Sai chi ti saluta tantissimo?";
|
||||
|
||||
Console.WriteLine(domanda);
|
||||
|
||||
// Create a new process object
|
||||
Process p = new Process();
|
||||
|
||||
// Specify the file name of the external exe
|
||||
p.StartInfo.FileName = @"C:\Temp\TestEcho.bat";
|
||||
p.StartInfo.UseShellExecute = false;
|
||||
p.StartInfo.RedirectStandardOutput = true;
|
||||
p.StartInfo.RedirectStandardInput = true;
|
||||
//var stdIn = p.StandardInput;
|
||||
p.OutputDataReceived += (s, e) => OutputHandler(s, e);
|
||||
|
||||
// Optionally, specify any arguments for the exe
|
||||
//p.StartInfo.Arguments = domanda;
|
||||
|
||||
// Start the process
|
||||
p.Start();
|
||||
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
|
||||
p.BeginOutputReadLine();
|
||||
|
||||
while (!p.HasExited)
|
||||
{
|
||||
//Console.WriteLine(output.ToString());
|
||||
Thread.Sleep(500);
|
||||
//var inVar = Console.ReadLine();
|
||||
//// mando nuovo input...
|
||||
//p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine(domanda);
|
||||
Thread.Sleep(500);
|
||||
// mando nuovo input...
|
||||
p.StandardInput.WriteLine("escape");
|
||||
}
|
||||
|
||||
|
||||
// Optionally, wait for the process to exit
|
||||
p.WaitForExit();
|
||||
|
||||
|
||||
p.Close();
|
||||
|
||||
Console.WriteLine("Ho finito...");
|
||||
Console.WriteLine("...press return to close");
|
||||
|
||||
Console.ReadLine();
|
||||
@@ -0,0 +1,10 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"version": 1,
|
||||
"isRoot": true,
|
||||
"tools": {}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class AliveController : ControllerBase
|
||||
{
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
//// GET: api/Alive/Clock
|
||||
//[HttpGet("Clock")]
|
||||
//public string GetClock(string id)
|
||||
//{
|
||||
// return DateTime.Now.ToString($"yyyy-MM-dd HH:mm:ss.fff - ID: {id}");
|
||||
//}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,86 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using Svg;
|
||||
using System.Drawing;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class DoorImageController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public DoorImageController(IConfiguration configuration, QueueDataService DataService)
|
||||
{
|
||||
Log.Info("Starting DoorImageController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
Log.Info("Avviato DoorImageController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
[HttpGet("GetImage.png")]
|
||||
public async Task<IActionResult> GetImagePng(int DoorId)
|
||||
{
|
||||
byte[] result = new byte[0];
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
if (!string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
result = ImageToByte2(myBmp);
|
||||
}
|
||||
return File(result, "image/png");
|
||||
}
|
||||
|
||||
[HttpGet("GetImage.svg")]
|
||||
public async Task<IActionResult> GetImageSvg(int DoorId)
|
||||
{
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
var result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
return File(result, "image/svg+xml");
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private byte[] ImageToByte2(Image img)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
return stream.ToArray();
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class OrderController : ControllerBase
|
||||
{
|
||||
public OrderController(IConfiguration configuration, WebDoorCreatorService DataService)
|
||||
{
|
||||
Log.Info("Starting OrderController");
|
||||
_configuration = configuration;
|
||||
WDCService = DataService;
|
||||
Log.Info("Avviato OrderController");
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order/GetCurrent
|
||||
/// Recupera ordini degli ultimi 6 mesi dato cliente e stato
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetCurrent")]
|
||||
public async Task<List<int>> GetCurrent(int id, int ordStatus)
|
||||
{
|
||||
List<int> answ = new List<int>();
|
||||
DateTime dtEnd = DateTime.Now;
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
var rawData = await WDCService.OrderStatusGetFilt(id, ordStatus, dtStart, dtEnd);
|
||||
if (rawData != null)
|
||||
{
|
||||
answ = rawData.Select(x => x.OrderId).ToList();
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Order detail for cost evaluation
|
||||
/// </summary>
|
||||
/// <param name="OrderId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("OrderDetail")]
|
||||
public async Task<OrderDetailsDTO> OrderDetail(int OrderId)
|
||||
{
|
||||
OrderDetailsDTO answ = new OrderDetailsDTO()
|
||||
{
|
||||
OrderId = OrderId
|
||||
};
|
||||
// recupero info ordine
|
||||
var rawOrder = await WDCService.OrderGetByKey(OrderId);
|
||||
if (rawOrder != null)
|
||||
{
|
||||
answ.OrderDescript = rawOrder.OrderDescript;
|
||||
answ.OrderExtCode = rawOrder.OrderExtCode;
|
||||
// recupero info customer
|
||||
|
||||
// recuper elenco porte...
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
}
|
||||
// popolo con dati specifica...
|
||||
return answ;
|
||||
}
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,162 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class QueueController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService)
|
||||
{
|
||||
Log.Info("Starting QueueController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
Log.Info("Avviato QueueController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Lunghezza coda in fase di processing
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("ActLenght")]
|
||||
public async Task<Dictionary<string, long>> ActLenght()
|
||||
{
|
||||
Dictionary<string, long> answ = new Dictionary<string, long>();
|
||||
var actPend = await QDataServ.NumRequestPending();
|
||||
answ.Add("pending", actPend);
|
||||
|
||||
var actProc = await QDataServ.NumRequestProcessing();
|
||||
answ.Add("processing", actProc);
|
||||
|
||||
var actErr = await QDataServ.NumRequestErrors();
|
||||
answ.Add("errors", actErr);
|
||||
|
||||
var actDone = await QDataServ.NumRequestDone();
|
||||
answ.Add("done", actDone);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Cleanup dati delle code di calcolo
|
||||
/// </summary>
|
||||
/// <param name="passPhrase">Chiave x auth di reset</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("DCCacheCleanup")]
|
||||
public async Task<string> DCCacheCleanup(string passPhrase)
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = false;
|
||||
if (passPhrase == "bbbBirdIsTheWord")
|
||||
{
|
||||
fatto = await QDataServ.DoorCalcCacheCleanup();
|
||||
}
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset delle code di chiamata x ripetere simulazione
|
||||
/// </summary>
|
||||
/// <param name="passPhrase">Chiave x auth di reset</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("ResetQueue")]
|
||||
public async Task<string> ResetQueue(string passPhrase)
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = false;
|
||||
if (passPhrase == "bbbBirdIsTheWord")
|
||||
{
|
||||
fatto = await QDataServ.ResetQueue();
|
||||
}
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Reset della coda di processing x evitare condizioni di "stuck in calc"
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpPost("ResetQueueProcessing")]
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio elenco risultati elaborazioni (modalità boolean di esecuzione corretta)
|
||||
/// </summary>
|
||||
/// <param name="calcResults">Risultati elaborazioni in formato CalcResultDTO</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("SaveProcResult")]
|
||||
public async Task<string> SaveProcResult(List<CalcResultDTO> calcResults)
|
||||
{
|
||||
string answ = "NA";
|
||||
bool fatto = await QDataServ.SaveProcessingResult(calcResults);
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Elenco richieste raggruppate x stato
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("StatusList")]
|
||||
public async Task<Dictionary<string, Dictionary<string, string>>> StatusList()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> answ = new Dictionary<string, Dictionary<string, string>>();
|
||||
var actPend = await QDataServ.RequestPending();
|
||||
answ.Add("pending", actPend);
|
||||
|
||||
var actProc = await QDataServ.RequestProcessing();
|
||||
answ.Add("processing", actProc);
|
||||
|
||||
var actErr = await QDataServ.RequestErr();
|
||||
answ.Add("errors", actErr);
|
||||
|
||||
var actDone = await QDataServ.RequestDone();
|
||||
answ.Add("done", actDone);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Chiede un numero massimo di items dalla coda NB:
|
||||
/// - verranno tolti dalla coda FIFO richieste
|
||||
/// - verranno messi nella coda FIFO processing
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("TakeNextItems")]
|
||||
public async Task<Dictionary<string, string>> TakeProcessingItems(int numItems = 10)
|
||||
{
|
||||
var actQueue = await QDataServ.TakeProcessingItems(numItems);
|
||||
return actQueue;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,155 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
using ToDataTable;
|
||||
using WebDoorCreator.Core.ReportViewer;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
[ApiController]
|
||||
public class ReportController : ControllerBase
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public ReportController(IConfiguration configuration, WebDoorCreatorService DataService)
|
||||
{
|
||||
Log.Info("Starting ReportController");
|
||||
_configuration = configuration;
|
||||
WDCService = DataService;
|
||||
Log.Info("Avviato ReportController");
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
// GET: api/Alive
|
||||
[HttpGet]
|
||||
public string Get()
|
||||
{
|
||||
return "OK";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce report dato ordine e formato
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID univoco ordine</param>
|
||||
/// <param name="Format">Formato: PDF/HTML/DOCX/XLSX</param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetOrderReport")]
|
||||
public async Task<IActionResult> GetOrderReport(int OrderId, string Format)
|
||||
{
|
||||
// dato il servizio è impostato il file rdlc e la struttura data DS da passare
|
||||
await Task.Delay(1);
|
||||
// inizializzo parametri report di default
|
||||
Core.ReportViewer.Report.RenderParams currParams = new Core.ReportViewer.Report.RenderParams(Format);
|
||||
currParams.FileName= $"DCA-Order-{OrderId:00000000}";
|
||||
|
||||
// restituisco oggetto ReportOrder specifico
|
||||
return await OrderReportGet(OrderId, currParams);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private WebDoorCreatorService WDCService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
#if false
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report DEMO
|
||||
/// </summary>
|
||||
/// <param name="FileName">Nome file desiderato x download</param>
|
||||
/// <param name="RenderFormat"></param>
|
||||
/// <param name="FileExt"></param>
|
||||
/// <param name="MimeType"></param>
|
||||
/// <returns></returns>
|
||||
private IActionResult ReportDemoGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("Title", "Invoice 4/2020"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
Random rnd = new Random();
|
||||
decimal WidgetPrice = 204.99m;
|
||||
decimal GizmoPrice = 2.41m;
|
||||
var items = new[] {
|
||||
new ReportItem { Description = "Widget 6000", Price = WidgetPrice, Qty = rnd.Next(1,5) },
|
||||
new ReportItem { Description = "Gizmo MAX", Price = GizmoPrice, Qty = rnd.Next(10,50) },
|
||||
new ReportItem { Description = "Pippo", Price = 1.2m, Qty = rnd.Next(3,9) },
|
||||
new ReportItem { Description = "Paperino", Price = 1.74m, Qty = rnd.Next(5,15) }
|
||||
}.ToList();
|
||||
var totaQty = items.Sum(x => x.Qty);
|
||||
var avgPrice = items.Sum(x => x.Qty * x.Price) / totaQty;
|
||||
items.Add(new ReportItem() { Description = "Total", Qty = totaQty, Price = Math.Round(avgPrice, 2) });
|
||||
|
||||
DataTable tabDati = items.ToDataTable();
|
||||
tabDati.TableName = "Items";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("Items", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "Report.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/// <summary>
|
||||
/// Restituisce filestream del report richiesto
|
||||
/// </summary>
|
||||
/// <param name="OrderId">ID Ordine</param>
|
||||
/// <param name="CurrParams">Parametri rendering report</param>
|
||||
/// <returns></returns>
|
||||
private async Task<IActionResult> OrderReportGet(int OrderId, Core.ReportViewer.Report.RenderParams CurrParams)
|
||||
{
|
||||
using (var report = new LocalReport())
|
||||
{
|
||||
// setup parametri
|
||||
List<ReportParameter> RepParams = new List<ReportParameter>();
|
||||
RepParams.Add(new ReportParameter("OrderID", $"{OrderId}"));
|
||||
// setup DsReport
|
||||
Dictionary<string, DataTable> DsDict = new Dictionary<string, DataTable>();
|
||||
// recupero tab dati config...
|
||||
var confList = await WDCService.ConfigGetAll();
|
||||
DataTable tabDatiConf = confList.ToDataTable();
|
||||
tabDatiConf.TableName = "DataSetConfig";
|
||||
// aggiungo a dizionario
|
||||
DsDict.Add("DataSetConfig", tabDatiConf);
|
||||
|
||||
// recupero dati veri del report...
|
||||
var repDetailData = await WDCService.PreRepOrderGetByKey(OrderId);
|
||||
DataTable tabDati = repDetailData.ToDataTable();
|
||||
tabDati.TableName = "DataSetOrderReportExpl";
|
||||
// aggiungo dizionario
|
||||
DsDict.Add("DataSetOrderReportExpl", tabDati);
|
||||
|
||||
// carico dati nel report...
|
||||
Core.ReportViewer.Report.Load(report, "ReportOrder.rdlc", RepParams, DsDict);
|
||||
var rawData = report.Render(CurrParams.RenderFormat);
|
||||
return File(rawData, CurrParams.MimeType, $"{CurrParams.FileName}.{CurrParams.Extension}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
<?xml version="1.0" encoding="utf-8" ?>
|
||||
<nlog xmlns="http://www.nlog-project.org/schemas/NLog.xsd"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.nlog-project.org/schemas/NLog.xsd NLog.xsd"
|
||||
autoReload="true"
|
||||
throwExceptions="false"
|
||||
internalLogLevel="Off" internalLogFile="c:\temp\nlog-internal.log">
|
||||
|
||||
<!-- optional, add some variables
|
||||
https://github.com/nlog/NLog/wiki/Configuration-file#variables
|
||||
-->
|
||||
<variable name="myvar" value="myvalue" />
|
||||
|
||||
<!--
|
||||
See https://github.com/nlog/nlog/wiki/Configuration-file
|
||||
for information on customizing logging rules and outputs.
|
||||
-->
|
||||
<targets>
|
||||
|
||||
<!--
|
||||
add your targets here
|
||||
See https://github.com/nlog/NLog/wiki/Targets for possible targets.
|
||||
See https://github.com/nlog/NLog/wiki/Layout-Renderers for the possible layout renderers.
|
||||
-->
|
||||
|
||||
<!--
|
||||
Write events to a file with the date in the filename.
|
||||
<target xsi:type="File" name="f" fileName="${basedir}/logs/${shortdate}.log"
|
||||
layout="${longdate} ${uppercase:${level}} ${message}" />
|
||||
-->
|
||||
<target xsi:type="File" name="fileTarget" fileName="${basedir}/logs/${shortdate}.log" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=false} | ${message}" />
|
||||
<target xsi:type="ColoredConsole" name="consoleTarget" layout="${longdate} | ${uppercase:${level}} | ${logger:shortName=true}| ${message}" />
|
||||
</targets>
|
||||
|
||||
<rules>
|
||||
<!-- add your logging rules here -->
|
||||
|
||||
<!--
|
||||
Write all events with minimal level of Debug (So Debug, Info, Warn, Error and Fatal, but not Trace) to "f"
|
||||
<logger name="*" minlevel="Debug" writeTo="f" />
|
||||
-->
|
||||
<logger name="*" minlevel="Trace" writeTo="consoleTarget" />
|
||||
<!--<logger name="Microsoft.*" maxlevel="Info" final="true" />-->
|
||||
<logger name="*" minlevel="Info" writeTo="fileTarget" />
|
||||
</rules>
|
||||
</nlog>
|
||||
@@ -0,0 +1,94 @@
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using StackExchange.Redis;
|
||||
using StackExchange.Redis.Extensions.Core.Configuration;
|
||||
using StackExchange.Redis.Extensions.Newtonsoft;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Serialization;
|
||||
using WebDoorCreator.Data;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
|
||||
|
||||
// configuration setup
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
// Redis
|
||||
var connStringRedis = configuration.GetConnectionString("Redis");
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
|
||||
// Add services to the container.
|
||||
builder.Services.AddControllers();
|
||||
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
// abilitazione x email management con MailKit
|
||||
//builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
|
||||
builder.Services.AddSingleton<IEmailSender, MailKitEmailSender>();
|
||||
builder.Services.Configure<MailKitEmailSenderOptions>(options =>
|
||||
{
|
||||
options.Host_Address = configuration["ExternalProviders:MailKit:SMTP:Address"] ?? "";
|
||||
options.Host_Port = Convert.ToInt32(configuration["ExternalProviders:MailKit:SMTP:Port"] ?? "");
|
||||
options.Host_Username = configuration["ExternalProviders:MailKit:SMTP:Account"] ?? "";
|
||||
options.Host_Password = configuration["ExternalProviders:MailKit:SMTP:Password"] ?? "";
|
||||
options.Sender_EMail = configuration["ExternalProviders:MailKit:SMTP:SenderEmail"] ?? "";
|
||||
options.Sender_Name = configuration["ExternalProviders:MailKit:SMTP:SenderName"] ?? "";
|
||||
});
|
||||
|
||||
// aggiunta servizi x accesso dati...
|
||||
builder.Services.AddControllers()
|
||||
.AddJsonOptions(c => c.JsonSerializerOptions.ReferenceHandler = ReferenceHandler.Preserve);
|
||||
|
||||
builder.Services.AddStackExchangeRedisExtensions<NewtonsoftSerializer>((options) =>
|
||||
{
|
||||
List<RedisConfiguration> newConf = new List<RedisConfiguration>();
|
||||
var currConf = configuration.GetSection("Redis").Get<RedisConfiguration>();
|
||||
if (currConf != null)
|
||||
{
|
||||
newConf.Add(currConf);
|
||||
}
|
||||
return newConf;
|
||||
//return configuration.GetSection("Redis").Get<RedisConfiguration>();
|
||||
});
|
||||
|
||||
builder.Services.AddSingleton<QueueDataService>();
|
||||
builder.Services.AddSingleton<WebDoorCreatorService>();
|
||||
builder.Services.AddSingleton<IConnectionMultiplexer>(redisMultiplexer);
|
||||
|
||||
var app = builder.Build();
|
||||
|
||||
// Configure the HTTP request pipeline.
|
||||
|
||||
// abilitato temporaneamente anche in iis01...
|
||||
if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
|
||||
{
|
||||
app.UseSwagger();
|
||||
app.UseSwaggerUI();
|
||||
}
|
||||
|
||||
|
||||
//// cultura IT...
|
||||
//var supportedCultures = new[]{
|
||||
// new CultureInfo("it-IT")
|
||||
// };
|
||||
//app.UseRequestLocalization(new RequestLocalizationOptions
|
||||
//{
|
||||
// DefaultRequestCulture = new RequestCulture("it-IT"),
|
||||
// SupportedCultures = supportedCultures,
|
||||
// FallBackToParentCultures = false
|
||||
//});
|
||||
//CultureInfo.DefaultThreadCurrentCulture = CultureInfo.CreateSpecificCulture("it-IT");
|
||||
|
||||
|
||||
app.UseHttpsRedirection();
|
||||
|
||||
app.UseAuthorization();
|
||||
|
||||
app.MapControllers();
|
||||
|
||||
app.Run();
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://seriate.egalware.com/WDC/SRV/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis04.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>seriate.egalware.com/WDC/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
This file is used by the publish/package process of your Web project. You can customize the behavior of this process
|
||||
by editing this MSBuild file. In order to learn more about this please visit https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<TimeStampOfAssociatedLegacyPublishXmlFile />
|
||||
<EncryptedPassword>AQAAANCMnd8BFdERjHoAwE/Cl+sBAAAAk75miMJLMkCTEelQutKpbwAAAAACAAAAAAADZgAAwAAAABAAAAB43BVhUmznhAu3pUfV1IfOAAAAAASAAACgAAAAEAAAAEV8hgbujDFfsMjS77NS2oYYAAAAUHPGFaVWgRqQPDU4wk5KGABmVHKko4/9FAAAANtaROBOcPHljx4RnmQHj5aHdtYk</EncryptedPassword>
|
||||
<History>True|2023-05-22T13:37:00.8611764Z;True|2023-05-11T17:35:09.5858697+02:00;True|2022-01-27T10:34:09.2346456+01:00;True|2022-01-27T10:13:36.3080675+01:00;True|2022-01-27T10:05:45.6649507+01:00;True|2022-01-26T14:34:16.5263189+01:00;True|2022-01-26T13:04:22.2336648+01:00;False|2022-01-26T13:04:06.0677616+01:00;True|2021-11-08T09:03:37.7855257+01:00;True|2021-11-08T09:03:34.8263479+01:00;True|2021-11-08T09:03:31.8889390+01:00;True|2021-10-29T16:19:33.6539408+02:00;True|2021-10-29T16:19:28.2082360+02:00;True|2021-10-26T16:12:11.7740950+02:00;True|2021-10-26T16:11:56.2014641+02:00;True|2021-10-26T16:11:22.2897842+02:00;False|2021-10-26T16:10:58.3733037+02:00;False|2021-10-26T16:10:29.4793991+02:00;True|2021-10-21T17:35:11.9761128+02:00;True|2021-10-18T20:22:00.9305399+02:00;True|2021-10-18T18:32:29.4558070+02:00;True|2021-10-18T18:32:22.8950294+02:00;True|2021-10-18T18:16:13.7563877+02:00;True|2021-10-18T18:15:48.5678387+02:00;True|2021-10-18T12:45:45.7228681+02:00;True|2021-10-18T12:14:22.3221605+02:00;True|2021-10-18T12:14:15.7373530+02:00;True|2021-10-18T12:10:43.8607301+02:00;</History>
|
||||
<LastFailureDetails />
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis01.egalware.com/WDC/SRV/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis01.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/WDC/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>MSDeploy</WebPublishMethod>
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish>https://iis02.egalware.com/WDC/SRV/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://iis02.egalware.com:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>Default Web Site/WDC/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>jenkins</UserName>
|
||||
<_SavePWD>true</_SavePWD>
|
||||
<_TargetId>IISWebDeploy</_TargetId>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<WebPublishMethod>Package</WebPublishMethod>
|
||||
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
|
||||
<LastUsedPlatform>Any CPU</LastUsedPlatform>
|
||||
<SiteUrlToLaunchAfterPublish />
|
||||
<LaunchSiteAfterPublish>true</LaunchSiteAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<DesktopBuildPackageLocation>bin\publish\WDC.API.zip</DesktopBuildPackageLocation>
|
||||
<PackageAsSingleFile>true</PackageAsSingleFile>
|
||||
<DeployIisAppPath>Default Web Site/WDC/SRV</DeployIisAppPath>
|
||||
<_TargetId>IISWebDeployPackage</_TargetId>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
},
|
||||
"profiles": {
|
||||
"WebDoorCreator.API": {
|
||||
"commandName": "Project",
|
||||
"dotnetRunMessages": true,
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
@@ -0,0 +1,47 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IISProfile.pubxml" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Properties\PublishProfiles\IIS-PROD.pubxml.user" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.2" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.96" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.AspNetCore" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Core" Version="9.1.0" />
|
||||
<PackageReference Include="StackExchange.Redis.Extensions.Newtonsoft" Version="9.1.0" />
|
||||
<PackageReference Include="Svg" Version="3.4.4" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.2.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebDoorCreator.Core\WebDoorCreator.Core.csproj" />
|
||||
<ProjectReference Include="..\WebDoorCreator.Data\WebDoorCreator.Data.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="Reports\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\ReportOrder.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="powershell.exe -ExecutionPolicy Unrestricted -NoProfile -NonInteractive -File $(ProjectDir)\post-build.ps1 -ProjectDir $(ProjectDir) -ProjectPath $(ProjectPath)" />
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,8 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"AllowedHosts": "*",
|
||||
"ConnectionStrings": {
|
||||
"Redis": "nkcredis.steamware.net:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
|
||||
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
|
||||
},
|
||||
"ExternalProviders": {
|
||||
"MailKit": {
|
||||
"SMTP": {
|
||||
"Address": "smtp-mail.outlook.com",
|
||||
"Port": "587",
|
||||
"Account": "steamwarebot@outlook.it",
|
||||
"Password": "siamoInViaNazionale93",
|
||||
"SenderEmail": "steamwarebot@outlook.it",
|
||||
"SenderName": "Steamware Email BOT"
|
||||
}
|
||||
}
|
||||
},
|
||||
"MailDest": {
|
||||
"Admin": "samuele@steamware.net",
|
||||
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
|
||||
},
|
||||
"RumtimeOpt": {
|
||||
"VetoRemoveProcessing": 5
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
param([string]$ProjectDir, [string]$ProjectPath);
|
||||
|
||||
$MainVers="..\Resources\MainVers.txt"
|
||||
$FileVers="..\Resources\VersNum.txt"
|
||||
$FileManIn="..\Resources\manifest-original.xml"
|
||||
$FileManOut="..\Resources\manifest.xml"
|
||||
$FileCLogIn="..\Resources\ChangeLog-original.html"
|
||||
$FileCLogOut="..\Resources\ChangeLog.html"
|
||||
$MajMin=Get-Content $MainVers #"0.9."
|
||||
$currentDate = get-date -format yyMM;
|
||||
$currentTime = get-date -format ddHH;
|
||||
$find = "<Version>(.|\n)*?</Version>";
|
||||
$currRelNum=$MajMin + $currentDate +"." + $currentTime
|
||||
$replace = "<Version>" + $MajMin + $currentDate +"." + $currentTime + "</Version>";
|
||||
$csproj = Get-Content $ProjectPath
|
||||
$csprojUpdated = $csproj -replace $find, $replace
|
||||
|
||||
Set-Content -Path $ProjectPath -Value $csprojUpdated
|
||||
Set-Content -Path $FileVers -Value $currRelNum
|
||||
|
||||
# replace x manifest
|
||||
$manData = Get-Content $FileManIn
|
||||
$manData = $manData -replace "1.0.0.0", $currRelNum
|
||||
$manData = $manData -replace "{{DIRNAME}}", "WDC"
|
||||
$manData = $manData -replace "{{BRANCHNAME}}", "stable"
|
||||
$manData = $manData -replace "{{PACKNAME}}", "WDC.API"
|
||||
Set-Content -Path $FileManOut -Value $manData
|
||||
|
||||
# replace x ChangeLog
|
||||
$clogData = Get-Content $FileCLogIn
|
||||
$clogData = $clogData -replace "{{CURRENT-REL}}", $currRelNum
|
||||
Set-Content -Path $FileCLogOut -Value $clogData
|
||||
@@ -0,0 +1,23 @@
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg41"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="Missing.svg">
|
||||
<g
|
||||
inkscape:label="Livello 1"
|
||||
inkscape:groupmode="layer"
|
||||
id="layer1">
|
||||
<path
|
||||
style="fill:#454c55;stroke:none;stroke-width:0.460184"
|
||||
d="M 67.284871,27.840094 C 54.209292,29.845169 46.354698,40.041553 37.483749,49.537223 30.786635,56.705844 22.139596,63.788212 18.364192,73.342671 13.425835,85.840068 15.688899,101.95827 15.688899,115.24029 v 83.31911 42.37372 c 0,7.58822 -0.702068,15.87777 3.692177,22.37522 8.317054,12.29838 27.557626,8.09577 39.897523,8.09577 h 79.617931 c 12.51202,0 26.8348,2.07774 39.14178,-0.29328 20.95597,-4.03694 15.56774,-34.14276 15.56774,-50.65042 V 90.482618 57.154964 c 0,-6.779801 0.48839,-13.912333 -2.82399,-19.996591 C 184.24273,25.145859 170.34873,27.636197 159.357,27.636197 H 97.975587 c -9.965149,0 -20.828764,-1.308344 -30.690716,0.203897 M 65.950496,40.491145 V 68.58159 c 0,3.334243 0.635156,8.230973 -1.880591,10.762918 -2.011793,2.023943 -4.923857,1.615918 -7.460068,1.615918 -5.485632,0 -10.971706,-0.02807 -16.457327,3.51e-4 -3.463614,0.01808 -8.012815,1.523078 -7.777343,6.188941 0.285906,5.66571 6.133826,5.71331 10.001297,5.71331 9.131159,0 21.653851,2.511 28.904873,-4.80536 C 76.981364,82.306261 76.62552,75.34031 76.62552,67.629244 V 39.538921 h 78.72834 c 6.51178,0 22.20629,-3.148174 26.00571,3.816212 2.13101,3.906515 1.12667,9.914114 1.12667,14.275944 v 32.375431 120.931732 37.1365 c 0,5.08581 -0.86957,10.76627 -6.6719,11.37664 -12.057,1.26788 -24.7972,0.0499 -36.91781,0.0499 H 64.616109 38.818123 c -3.881264,0 -8.102032,0.52467 -10.615648,-3.37704 -2.606754,-4.04646 -1.39376,-10.98766 -1.39376,-15.66733 V 202.84434 121.42967 94.767548 c 0,-5.82043 -0.394349,-11.702756 1.918165,-17.139934 2.59243,-6.095472 7.972696,-10.587133 12.315209,-15.235482 6.361872,-6.809749 15.302659,-20.997658 24.908407,-21.901027 M 82.852622,149.04404 v -0.47611 c 2.228416,-1.68019 4.853137,-4.06073 6.164829,-6.66553 2.329384,-4.62682 -1.57368,-9.44601 -6.164829,-8.43713 -3.058838,0.67179 -5.856141,4.41734 -7.561479,7.00881 -2.09231,-2.23963 -4.330057,-5.57095 -7.116681,-6.80503 -4.373656,-1.9373 -8.256257,2.08393 -7.460067,6.80503 0.576892,3.41988 5.655983,5.35289 5.655983,8.56996 0,4.59303 -10.127493,8.24193 -4.321609,14.09569 5.910848,5.95899 8.604069,-4.54684 13.241932,-4.54684 3.099767,0 4.747268,5.79806 8.451512,6.10419 3.582359,0.29567 6.831128,-3.17374 5.852131,-7.08307 -0.79484,-3.17279 -4.32427,-6.70886 -6.741722,-8.56997 M 122.88576,133.6857 c -9.48787,3.93362 2.64207,11.32569 2.64207,15.35834 0,2.57527 -4.14146,4.93963 -5.25034,7.14164 -1.98378,3.9398 0.69032,8.54283 4.83046,8.52854 2.37029,-0.008 4.14858,-1.65495 5.7823,-3.31039 0.99056,-1.00411 2.41256,-3.18612 4.00314,-2.73905 3.99602,1.12314 5.45272,7.87723 10.67459,5.7376 5.41757,-2.22011 3.38931,-8.28002 0.43857,-11.54947 -0.94741,-1.04934 -2.98768,-2.58336 -2.57001,-4.28498 0.66941,-2.72953 4.0823,-4.4221 5.14402,-7.14163 1.96465,-5.03392 -2.79463,-10.02972 -7.46007,-7.53253 -2.13189,1.14124 -4.21841,5.60143 -6.6719,5.60143 -4.45949,0 -5.69601,-8.24194 -11.56283,-5.8095 m -24.46539,56.98172 c -11.577511,1.64734 -22.445577,5.80805 -31.580295,13.80716 -3.447589,3.019 -10.885415,12.52215 -1.77917,14.39182 5.186728,1.06506 11.254602,-7.31684 15.567751,-9.8983 9.005719,-5.39003 19.519294,-7.81533 29.801124,-6.46365 7.65399,1.00649 15.44988,3.90551 21.79485,8.6428 3.52988,2.63526 7.64111,8.85895 12.45376,7.69677 3.41067,-0.82366 5.02037,-5.08246 3.47917,-8.3819 -1.80408,-3.86172 -6.4366,-7.01927 -9.70583,-9.35316 -11.39247,-8.13337 -26.34952,-12.38788 -40.03136,-10.44154 z"
|
||||
id="path22" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 4.0 KiB |
@@ -0,0 +1,20 @@
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
viewBox="0 0 210 297"
|
||||
version="1.1"
|
||||
id="svg41"
|
||||
inkscape:version="1.0.2-2 (e86c870879, 2021-01-15)"
|
||||
sodipodi:docname="MissingOrange.svg">
|
||||
<g id="layer1">
|
||||
<path
|
||||
style="fill:#FD8C00;stroke:none;stroke-width:0.460184"
|
||||
d="M 67.284871,27.840094 C 54.209292,29.845169 46.354698,40.041553 37.483749,49.537223 30.786635,56.705844 22.139596,63.788212 18.364192,73.342671 13.425835,85.840068 15.688899,101.95827 15.688899,115.24029 v 83.31911 42.37372 c 0,7.58822 -0.702068,15.87777 3.692177,22.37522 8.317054,12.29838 27.557626,8.09577 39.897523,8.09577 h 79.617931 c 12.51202,0 26.8348,2.07774 39.14178,-0.29328 20.95597,-4.03694 15.56774,-34.14276 15.56774,-50.65042 V 90.482618 57.154964 c 0,-6.779801 0.48839,-13.912333 -2.82399,-19.996591 C 184.24273,25.145859 170.34873,27.636197 159.357,27.636197 H 97.975587 c -9.965149,0 -20.828764,-1.308344 -30.690716,0.203897 M 65.950496,40.491145 V 68.58159 c 0,3.334243 0.635156,8.230973 -1.880591,10.762918 -2.011793,2.023943 -4.923857,1.615918 -7.460068,1.615918 -5.485632,0 -10.971706,-0.02807 -16.457327,3.51e-4 -3.463614,0.01808 -8.012815,1.523078 -7.777343,6.188941 0.285906,5.66571 6.133826,5.71331 10.001297,5.71331 9.131159,0 21.653851,2.511 28.904873,-4.80536 C 76.981364,82.306261 76.62552,75.34031 76.62552,67.629244 V 39.538921 h 78.72834 c 6.51178,0 22.20629,-3.148174 26.00571,3.816212 2.13101,3.906515 1.12667,9.914114 1.12667,14.275944 v 32.375431 120.931732 37.1365 c 0,5.08581 -0.86957,10.76627 -6.6719,11.37664 -12.057,1.26788 -24.7972,0.0499 -36.91781,0.0499 H 64.616109 38.818123 c -3.881264,0 -8.102032,0.52467 -10.615648,-3.37704 -2.606754,-4.04646 -1.39376,-10.98766 -1.39376,-15.66733 V 202.84434 121.42967 94.767548 c 0,-5.82043 -0.394349,-11.702756 1.918165,-17.139934 2.59243,-6.095472 7.972696,-10.587133 12.315209,-15.235482 6.361872,-6.809749 15.302659,-20.997658 24.908407,-21.901027 M 82.852622,149.04404 v -0.47611 c 2.228416,-1.68019 4.853137,-4.06073 6.164829,-6.66553 2.329384,-4.62682 -1.57368,-9.44601 -6.164829,-8.43713 -3.058838,0.67179 -5.856141,4.41734 -7.561479,7.00881 -2.09231,-2.23963 -4.330057,-5.57095 -7.116681,-6.80503 -4.373656,-1.9373 -8.256257,2.08393 -7.460067,6.80503 0.576892,3.41988 5.655983,5.35289 5.655983,8.56996 0,4.59303 -10.127493,8.24193 -4.321609,14.09569 5.910848,5.95899 8.604069,-4.54684 13.241932,-4.54684 3.099767,0 4.747268,5.79806 8.451512,6.10419 3.582359,0.29567 6.831128,-3.17374 5.852131,-7.08307 -0.79484,-3.17279 -4.32427,-6.70886 -6.741722,-8.56997 M 122.88576,133.6857 c -9.48787,3.93362 2.64207,11.32569 2.64207,15.35834 0,2.57527 -4.14146,4.93963 -5.25034,7.14164 -1.98378,3.9398 0.69032,8.54283 4.83046,8.52854 2.37029,-0.008 4.14858,-1.65495 5.7823,-3.31039 0.99056,-1.00411 2.41256,-3.18612 4.00314,-2.73905 3.99602,1.12314 5.45272,7.87723 10.67459,5.7376 5.41757,-2.22011 3.38931,-8.28002 0.43857,-11.54947 -0.94741,-1.04934 -2.98768,-2.58336 -2.57001,-4.28498 0.66941,-2.72953 4.0823,-4.4221 5.14402,-7.14163 1.96465,-5.03392 -2.79463,-10.02972 -7.46007,-7.53253 -2.13189,1.14124 -4.21841,5.60143 -6.6719,5.60143 -4.45949,0 -5.69601,-8.24194 -11.56283,-5.8095 m -24.46539,56.98172 c -11.577511,1.64734 -22.445577,5.80805 -31.580295,13.80716 -3.447589,3.019 -10.885415,12.52215 -1.77917,14.39182 5.186728,1.06506 11.254602,-7.31684 15.567751,-9.8983 9.005719,-5.39003 19.519294,-7.81533 29.801124,-6.46365 7.65399,1.00649 15.44988,3.90551 21.79485,8.6428 3.52988,2.63526 7.64111,8.85895 12.45376,7.69677 3.41067,-0.82366 5.02037,-5.08246 3.47917,-8.3819 -1.80408,-3.86172 -6.4366,-7.01927 -9.70583,-9.35316 -11.39247,-8.13337 -26.34952,-12.38788 -40.03136,-10.44154 z"
|
||||
id="path22" />
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.9 KiB |
@@ -0,0 +1,31 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio Version 17
|
||||
VisualStudioVersion = 17.5.33530.505
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "WebDoorCreator.CamSrv", "WebDoorCreator.CamSrv\WebDoorCreator.CamSrv.vbproj", "{96266312-9739-4F12-A6C2-16C1CAFDDA6E}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "WebDoorCreator.SDK", "WebDoorCreator.SDK\WebDoorCreator.SDK.csproj", "{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Release|Any CPU = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
SolutionGuid = {A4FC2F6F-69CF-4644-81BC-1C3B546DA61F}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -0,0 +1,15 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<probing privatePath="lib;libs" xmlns="" />
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
@@ -0,0 +1,38 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
'NOTE: This file is auto-generated; do not modify it directly. To make changes,
|
||||
' or if you encounter build errors in this file, go to the Project Designer
|
||||
' (go to Project Properties or double-click the My Project node in
|
||||
' Solution Explorer), and make changes on the Application tab.
|
||||
'
|
||||
Partial Friend Class MyApplication
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Public Sub New()
|
||||
MyBase.New(Global.Microsoft.VisualBasic.ApplicationServices.AuthenticationMode.Windows)
|
||||
Me.IsSingleInstance = false
|
||||
Me.EnableVisualStyles = true
|
||||
Me.SaveMySettingsOnExit = true
|
||||
Me.ShutDownStyle = Global.Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses
|
||||
End Sub
|
||||
|
||||
<Global.System.Diagnostics.DebuggerStepThroughAttribute()> _
|
||||
Protected Overrides Sub OnCreateMainForm()
|
||||
Me.MainForm = Global.WebDoorCreator.CamSrv.ProcMan
|
||||
End Sub
|
||||
End Class
|
||||
End Namespace
|
||||
@@ -0,0 +1,11 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MyApplicationData xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<MySubMain>true</MySubMain>
|
||||
<MainForm>MainForm</MainForm>
|
||||
<SingleInstance>false</SingleInstance>
|
||||
<ShutdownMode>0</ShutdownMode>
|
||||
<EnableVisualStyles>true</EnableVisualStyles>
|
||||
<AuthenticationMode>0</AuthenticationMode>
|
||||
<SaveMySettingsOnExit>true</SaveMySettingsOnExit>
|
||||
<HighDpiMpde>false</HighDpiMpde>
|
||||
</MyApplicationData>
|
||||
@@ -0,0 +1,35 @@
|
||||
Imports System
|
||||
Imports System.Reflection
|
||||
Imports System.Runtime.InteropServices
|
||||
|
||||
' General Information about an assembly is controlled through the following
|
||||
' set of attributes. Change these attribute values to modify the information
|
||||
' associated with an assembly.
|
||||
|
||||
' Review the values of the assembly attributes
|
||||
|
||||
<Assembly: AssemblyTitle("WebDoorCreator.CamSrv")>
|
||||
<Assembly: AssemblyDescription("")>
|
||||
<Assembly: AssemblyCompany("EgalWare")>
|
||||
<Assembly: AssemblyProduct("WebDoorCreator.CamSrv")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2023")>
|
||||
<Assembly: AssemblyTrademark("")>
|
||||
|
||||
<Assembly: ComVisible(False)>
|
||||
|
||||
'The following GUID is for the ID of the typelib if this project is exposed to COM
|
||||
<Assembly: Guid("eecac567-5d92-49de-a5e5-9da43bfde795")>
|
||||
|
||||
' Version information for an assembly consists of the following four values:
|
||||
'
|
||||
' Major Version
|
||||
' Minor Version
|
||||
' Build Number
|
||||
' Revision
|
||||
'
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
@@ -0,0 +1,63 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
Imports System
|
||||
|
||||
Namespace My.Resources
|
||||
|
||||
'This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
'class via a tool like ResGen or Visual Studio.
|
||||
'To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
'with the /str option, or rebuild your VS project.
|
||||
'''<summary>
|
||||
''' A strongly-typed resource class, for looking up localized strings, etc.
|
||||
'''</summary>
|
||||
<Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0"), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _
|
||||
Friend Module Resources
|
||||
|
||||
Private resourceMan As Global.System.Resources.ResourceManager
|
||||
|
||||
Private resourceCulture As Global.System.Globalization.CultureInfo
|
||||
|
||||
'''<summary>
|
||||
''' Returns the cached ResourceManager instance used by this class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||
Get
|
||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("WebDoorCreator.CamSrv.Resources", GetType(Resources).Assembly)
|
||||
resourceMan = temp
|
||||
End If
|
||||
Return resourceMan
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Overrides the current thread's CurrentUICulture property for all
|
||||
''' resource lookups using this strongly typed resource class.
|
||||
'''</summary>
|
||||
<Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Friend Property Culture() As Global.System.Globalization.CultureInfo
|
||||
Get
|
||||
Return resourceCulture
|
||||
End Get
|
||||
Set
|
||||
resourceCulture = value
|
||||
End Set
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,117 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
@@ -0,0 +1,73 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
Option Strict On
|
||||
Option Explicit On
|
||||
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
|
||||
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
|
||||
|
||||
#Region "My.Settings Auto-Save Functionality"
|
||||
#If _MyType = "WindowsForms" Then
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
Private Shared addedHandlerLockObject As New Object
|
||||
|
||||
<Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Private Shared Sub AutoSaveSettings(sender As Global.System.Object, e As Global.System.EventArgs)
|
||||
If My.Application.SaveMySettingsOnExit Then
|
||||
My.Settings.Save()
|
||||
End If
|
||||
End Sub
|
||||
#End If
|
||||
#End Region
|
||||
|
||||
Public Shared ReadOnly Property [Default]() As MySettings
|
||||
Get
|
||||
|
||||
#If _MyType = "WindowsForms" Then
|
||||
If Not addedHandler Then
|
||||
SyncLock addedHandlerLockObject
|
||||
If Not addedHandler Then
|
||||
AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings
|
||||
addedHandler = True
|
||||
End If
|
||||
End SyncLock
|
||||
End If
|
||||
#End If
|
||||
Return defaultInstance
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
Namespace My
|
||||
|
||||
<Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _
|
||||
Friend Module MySettingsProperty
|
||||
|
||||
<Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _
|
||||
Friend ReadOnly Property Settings() As Global.WebDoorCreator.CamSrv.My.MySettings
|
||||
Get
|
||||
Return Global.WebDoorCreator.CamSrv.My.MySettings.Default
|
||||
End Get
|
||||
End Property
|
||||
End Module
|
||||
End Namespace
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -0,0 +1,404 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Class ProcMan
|
||||
Inherits System.Windows.Forms.Form
|
||||
|
||||
'Form overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
Try
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
Finally
|
||||
MyBase.Dispose(disposing)
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
'Required by the Windows Form Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Windows Form Designer
|
||||
'It can be modified using the Windows Form Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(ProcMan))
|
||||
Me.btnTestPing = New System.Windows.Forms.Button()
|
||||
Me.lblpingTest = New System.Windows.Forms.Label()
|
||||
Me.lblTestAlive = New System.Windows.Forms.Label()
|
||||
Me.btnTestAlive = New System.Windows.Forms.Button()
|
||||
Me.btnResetQueue = New System.Windows.Forms.Button()
|
||||
Me.txtOut = New System.Windows.Forms.TextBox()
|
||||
Me.btnQueueStatus = New System.Windows.Forms.Button()
|
||||
Me.StartProcess = New System.Windows.Forms.Button()
|
||||
Me.StopProcess = New System.Windows.Forms.Button()
|
||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||
Me.tsProgBar = New System.Windows.Forms.ToolStripProgressBar()
|
||||
Me.txtQueue = New System.Windows.Forms.TextBox()
|
||||
Me.Label1 = New System.Windows.Forms.Label()
|
||||
Me.txtNumThread = New System.Windows.Forms.TextBox()
|
||||
Me.lblRunning = New System.Windows.Forms.Label()
|
||||
Me.TimerUI = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.TimerProgBar = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.LISTThreadStatus = New System.Windows.Forms.ListView()
|
||||
Me.chThread = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.chTime = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.chOther = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.GroupBox1 = New System.Windows.Forms.GroupBox()
|
||||
Me.ThreadCurrentStatusList = New System.Windows.Forms.ListView()
|
||||
Me.ColumnHeader1 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ColumnHeader2 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.chkStatAggr = New System.Windows.Forms.CheckBox()
|
||||
Me.btnExportStats = New System.Windows.Forms.Button()
|
||||
Me.chkAutoRestart = New System.Windows.Forms.CheckBox()
|
||||
Me.TimerCheck = New System.Windows.Forms.Timer(Me.components)
|
||||
Me.ColumnHeader3 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.StatusStrip1.SuspendLayout()
|
||||
Me.GroupBox1.SuspendLayout()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'btnTestPing
|
||||
'
|
||||
Me.btnTestPing.Location = New System.Drawing.Point(17, 16)
|
||||
Me.btnTestPing.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.btnTestPing.Name = "btnTestPing"
|
||||
Me.btnTestPing.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnTestPing.TabIndex = 0
|
||||
Me.btnTestPing.Text = "Test Ping"
|
||||
Me.btnTestPing.UseVisualStyleBackColor = True
|
||||
'
|
||||
'lblpingTest
|
||||
'
|
||||
Me.lblpingTest.AutoSize = True
|
||||
Me.lblpingTest.Location = New System.Drawing.Point(153, 22)
|
||||
Me.lblpingTest.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.lblpingTest.Name = "lblpingTest"
|
||||
Me.lblpingTest.Size = New System.Drawing.Size(28, 16)
|
||||
Me.lblpingTest.TabIndex = 1
|
||||
Me.lblpingTest.Text = "???"
|
||||
'
|
||||
'lblTestAlive
|
||||
'
|
||||
Me.lblTestAlive.AutoSize = True
|
||||
Me.lblTestAlive.Location = New System.Drawing.Point(365, 22)
|
||||
Me.lblTestAlive.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.lblTestAlive.Name = "lblTestAlive"
|
||||
Me.lblTestAlive.Size = New System.Drawing.Size(28, 16)
|
||||
Me.lblTestAlive.TabIndex = 3
|
||||
Me.lblTestAlive.Text = "???"
|
||||
'
|
||||
'btnTestAlive
|
||||
'
|
||||
Me.btnTestAlive.Location = New System.Drawing.Point(229, 16)
|
||||
Me.btnTestAlive.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.btnTestAlive.Name = "btnTestAlive"
|
||||
Me.btnTestAlive.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnTestAlive.TabIndex = 2
|
||||
Me.btnTestAlive.Text = "Test Alive"
|
||||
Me.btnTestAlive.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnResetQueue
|
||||
'
|
||||
Me.btnResetQueue.Location = New System.Drawing.Point(17, 201)
|
||||
Me.btnResetQueue.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.btnResetQueue.Name = "btnResetQueue"
|
||||
Me.btnResetQueue.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnResetQueue.TabIndex = 6
|
||||
Me.btnResetQueue.Text = "Reset Q"
|
||||
Me.btnResetQueue.UseVisualStyleBackColor = True
|
||||
'
|
||||
'txtOut
|
||||
'
|
||||
Me.txtOut.BackColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.txtOut.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.txtOut.ForeColor = System.Drawing.Color.Yellow
|
||||
Me.txtOut.Location = New System.Drawing.Point(16, 240)
|
||||
Me.txtOut.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.txtOut.MinimumSize = New System.Drawing.Size(79, 147)
|
||||
Me.txtOut.Multiline = True
|
||||
Me.txtOut.Name = "txtOut"
|
||||
Me.txtOut.Size = New System.Drawing.Size(99, 173)
|
||||
Me.txtOut.TabIndex = 7
|
||||
Me.txtOut.Text = "---"
|
||||
'
|
||||
'btnQueueStatus
|
||||
'
|
||||
Me.btnQueueStatus.Location = New System.Drawing.Point(17, 79)
|
||||
Me.btnQueueStatus.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.btnQueueStatus.Name = "btnQueueStatus"
|
||||
Me.btnQueueStatus.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnQueueStatus.TabIndex = 8
|
||||
Me.btnQueueStatus.Text = "Stato Queue"
|
||||
Me.btnQueueStatus.UseVisualStyleBackColor = True
|
||||
'
|
||||
'StartProcess
|
||||
'
|
||||
Me.StartProcess.Location = New System.Drawing.Point(17, 23)
|
||||
Me.StartProcess.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.StartProcess.Name = "StartProcess"
|
||||
Me.StartProcess.Size = New System.Drawing.Size(100, 28)
|
||||
Me.StartProcess.TabIndex = 9
|
||||
Me.StartProcess.Text = "Start"
|
||||
Me.StartProcess.UseVisualStyleBackColor = True
|
||||
'
|
||||
'StopProcess
|
||||
'
|
||||
Me.StopProcess.Location = New System.Drawing.Point(325, 22)
|
||||
Me.StopProcess.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.StopProcess.Name = "StopProcess"
|
||||
Me.StopProcess.Size = New System.Drawing.Size(100, 28)
|
||||
Me.StopProcess.TabIndex = 10
|
||||
Me.StopProcess.Text = "Stop"
|
||||
Me.StopProcess.UseVisualStyleBackColor = True
|
||||
'
|
||||
'StatusStrip1
|
||||
'
|
||||
Me.StatusStrip1.ImageScalingSize = New System.Drawing.Size(20, 20)
|
||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsProgBar})
|
||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 526)
|
||||
Me.StatusStrip1.Name = "StatusStrip1"
|
||||
Me.StatusStrip1.Padding = New System.Windows.Forms.Padding(1, 0, 19, 0)
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(736, 22)
|
||||
Me.StatusStrip1.TabIndex = 11
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'tsProgBar
|
||||
'
|
||||
Me.tsProgBar.Name = "tsProgBar"
|
||||
Me.tsProgBar.Size = New System.Drawing.Size(133, 14)
|
||||
Me.tsProgBar.Step = 1
|
||||
'
|
||||
'txtQueue
|
||||
'
|
||||
Me.txtQueue.BackColor = System.Drawing.SystemColors.ControlDarkDark
|
||||
Me.txtQueue.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!)
|
||||
Me.txtQueue.ForeColor = System.Drawing.SystemColors.Window
|
||||
Me.txtQueue.Location = New System.Drawing.Point(17, 114)
|
||||
Me.txtQueue.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.txtQueue.Multiline = True
|
||||
Me.txtQueue.Name = "txtQueue"
|
||||
Me.txtQueue.Size = New System.Drawing.Size(99, 78)
|
||||
Me.txtQueue.TabIndex = 12
|
||||
Me.txtQueue.Text = "Q Status:"
|
||||
'
|
||||
'Label1
|
||||
'
|
||||
Me.Label1.AutoSize = True
|
||||
Me.Label1.Location = New System.Drawing.Point(132, 30)
|
||||
Me.Label1.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.Label1.Name = "Label1"
|
||||
Me.Label1.Size = New System.Drawing.Size(35, 16)
|
||||
Me.Label1.TabIndex = 13
|
||||
Me.Label1.Text = "num:"
|
||||
'
|
||||
'txtNumThread
|
||||
'
|
||||
Me.txtNumThread.Location = New System.Drawing.Point(171, 26)
|
||||
Me.txtNumThread.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.txtNumThread.Name = "txtNumThread"
|
||||
Me.txtNumThread.Size = New System.Drawing.Size(41, 22)
|
||||
Me.txtNumThread.TabIndex = 14
|
||||
Me.txtNumThread.Text = "1"
|
||||
Me.txtNumThread.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'lblRunning
|
||||
'
|
||||
Me.lblRunning.AutoSize = True
|
||||
Me.lblRunning.Location = New System.Drawing.Point(221, 30)
|
||||
Me.lblRunning.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.lblRunning.MinimumSize = New System.Drawing.Size(100, 0)
|
||||
Me.lblRunning.Name = "lblRunning"
|
||||
Me.lblRunning.Size = New System.Drawing.Size(100, 16)
|
||||
Me.lblRunning.TabIndex = 15
|
||||
Me.lblRunning.Text = "running: -"
|
||||
Me.lblRunning.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
'
|
||||
'TimerUI
|
||||
'
|
||||
Me.TimerUI.Interval = 800
|
||||
'
|
||||
'TimerProgBar
|
||||
'
|
||||
'
|
||||
'LISTThreadStatus
|
||||
'
|
||||
Me.LISTThreadStatus.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.chThread, Me.chTime, Me.chOther})
|
||||
Me.LISTThreadStatus.HideSelection = False
|
||||
Me.LISTThreadStatus.Location = New System.Drawing.Point(17, 59)
|
||||
Me.LISTThreadStatus.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.LISTThreadStatus.Name = "LISTThreadStatus"
|
||||
Me.LISTThreadStatus.Size = New System.Drawing.Size(536, 173)
|
||||
Me.LISTThreadStatus.TabIndex = 16
|
||||
Me.LISTThreadStatus.UseCompatibleStateImageBehavior = False
|
||||
Me.LISTThreadStatus.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'chThread
|
||||
'
|
||||
Me.chThread.Text = "Thread"
|
||||
Me.chThread.Width = 100
|
||||
'
|
||||
'chTime
|
||||
'
|
||||
Me.chTime.Text = "Time"
|
||||
Me.chTime.Width = 100
|
||||
'
|
||||
'chOther
|
||||
'
|
||||
Me.chOther.Text = "Other"
|
||||
Me.chOther.Width = 100
|
||||
'
|
||||
'GroupBox1
|
||||
'
|
||||
Me.GroupBox1.Controls.Add(Me.ThreadCurrentStatusList)
|
||||
Me.GroupBox1.Controls.Add(Me.chkStatAggr)
|
||||
Me.GroupBox1.Controls.Add(Me.LISTThreadStatus)
|
||||
Me.GroupBox1.Controls.Add(Me.lblRunning)
|
||||
Me.GroupBox1.Controls.Add(Me.txtNumThread)
|
||||
Me.GroupBox1.Controls.Add(Me.StopProcess)
|
||||
Me.GroupBox1.Controls.Add(Me.Label1)
|
||||
Me.GroupBox1.Controls.Add(Me.StartProcess)
|
||||
Me.GroupBox1.Location = New System.Drawing.Point(157, 79)
|
||||
Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.GroupBox1.Name = "GroupBox1"
|
||||
Me.GroupBox1.Padding = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(563, 438)
|
||||
Me.GroupBox1.TabIndex = 17
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Threads"
|
||||
'
|
||||
'ThreadCurrentStatusList
|
||||
'
|
||||
Me.ThreadCurrentStatusList.Columns.AddRange(New System.Windows.Forms.ColumnHeader() {Me.ColumnHeader1, Me.ColumnHeader2, Me.ColumnHeader4, Me.ColumnHeader3})
|
||||
Me.ThreadCurrentStatusList.HideSelection = False
|
||||
Me.ThreadCurrentStatusList.Location = New System.Drawing.Point(17, 257)
|
||||
Me.ThreadCurrentStatusList.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.ThreadCurrentStatusList.Name = "ThreadCurrentStatusList"
|
||||
Me.ThreadCurrentStatusList.Size = New System.Drawing.Size(536, 173)
|
||||
Me.ThreadCurrentStatusList.TabIndex = 18
|
||||
Me.ThreadCurrentStatusList.UseCompatibleStateImageBehavior = False
|
||||
Me.ThreadCurrentStatusList.View = System.Windows.Forms.View.Details
|
||||
'
|
||||
'ColumnHeader1
|
||||
'
|
||||
Me.ColumnHeader1.Text = "Thread"
|
||||
Me.ColumnHeader1.Width = 100
|
||||
'
|
||||
'ColumnHeader2
|
||||
'
|
||||
Me.ColumnHeader2.Text = "Thread Status"
|
||||
Me.ColumnHeader2.Width = 100
|
||||
'
|
||||
'chkStatAggr
|
||||
'
|
||||
Me.chkStatAggr.AutoSize = True
|
||||
Me.chkStatAggr.Checked = True
|
||||
Me.chkStatAggr.CheckState = System.Windows.Forms.CheckState.Checked
|
||||
Me.chkStatAggr.Location = New System.Drawing.Point(435, 26)
|
||||
Me.chkStatAggr.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.chkStatAggr.Name = "chkStatAggr"
|
||||
Me.chkStatAggr.Size = New System.Drawing.Size(91, 20)
|
||||
Me.chkStatAggr.TabIndex = 17
|
||||
Me.chkStatAggr.Text = "Aggr Stats"
|
||||
Me.chkStatAggr.UseVisualStyleBackColor = True
|
||||
'
|
||||
'btnExportStats
|
||||
'
|
||||
Me.btnExportStats.Location = New System.Drawing.Point(612, 16)
|
||||
Me.btnExportStats.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.btnExportStats.Name = "btnExportStats"
|
||||
Me.btnExportStats.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnExportStats.TabIndex = 18
|
||||
Me.btnExportStats.Text = "Export Stats"
|
||||
Me.btnExportStats.UseVisualStyleBackColor = True
|
||||
'
|
||||
'chkAutoRestart
|
||||
'
|
||||
Me.chkAutoRestart.AutoSize = True
|
||||
Me.chkAutoRestart.Location = New System.Drawing.Point(465, 21)
|
||||
Me.chkAutoRestart.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.chkAutoRestart.Name = "chkAutoRestart"
|
||||
Me.chkAutoRestart.Size = New System.Drawing.Size(99, 20)
|
||||
Me.chkAutoRestart.TabIndex = 19
|
||||
Me.chkAutoRestart.Text = "AutoRestart"
|
||||
Me.chkAutoRestart.UseVisualStyleBackColor = True
|
||||
'
|
||||
'TimerCheck
|
||||
'
|
||||
Me.TimerCheck.Interval = 30000
|
||||
'
|
||||
'ColumnHeader3
|
||||
'
|
||||
Me.ColumnHeader3.DisplayIndex = 2
|
||||
Me.ColumnHeader3.Text = "Process Status"
|
||||
Me.ColumnHeader3.Width = 100
|
||||
'
|
||||
'ColumnHeader4
|
||||
'
|
||||
Me.ColumnHeader4.DisplayIndex = 3
|
||||
Me.ColumnHeader4.Text = "Thread Phase"
|
||||
Me.ColumnHeader4.Width = 100
|
||||
'
|
||||
'ProcMan
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(736, 548)
|
||||
Me.Controls.Add(Me.chkAutoRestart)
|
||||
Me.Controls.Add(Me.btnExportStats)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
Me.Controls.Add(Me.txtQueue)
|
||||
Me.Controls.Add(Me.StatusStrip1)
|
||||
Me.Controls.Add(Me.btnQueueStatus)
|
||||
Me.Controls.Add(Me.txtOut)
|
||||
Me.Controls.Add(Me.btnResetQueue)
|
||||
Me.Controls.Add(Me.lblTestAlive)
|
||||
Me.Controls.Add(Me.btnTestAlive)
|
||||
Me.Controls.Add(Me.lblpingTest)
|
||||
Me.Controls.Add(Me.btnTestPing)
|
||||
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
|
||||
Me.Margin = New System.Windows.Forms.Padding(4, 4, 4, 4)
|
||||
Me.Name = "ProcMan"
|
||||
Me.Text = "MainForm"
|
||||
Me.StatusStrip1.ResumeLayout(False)
|
||||
Me.StatusStrip1.PerformLayout()
|
||||
Me.GroupBox1.ResumeLayout(False)
|
||||
Me.GroupBox1.PerformLayout()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents btnTestPing As Button
|
||||
Friend WithEvents lblpingTest As Label
|
||||
Friend WithEvents lblTestAlive As Label
|
||||
Friend WithEvents btnTestAlive As Button
|
||||
Friend WithEvents btnResetQueue As Button
|
||||
Friend WithEvents txtOut As TextBox
|
||||
Friend WithEvents btnQueueStatus As Button
|
||||
Friend WithEvents StartProcess As Button
|
||||
Friend WithEvents StopProcess As Button
|
||||
Friend WithEvents StatusStrip1 As StatusStrip
|
||||
Friend WithEvents tsProgBar As ToolStripProgressBar
|
||||
Friend WithEvents txtQueue As TextBox
|
||||
Friend WithEvents Label1 As Label
|
||||
Friend WithEvents txtNumThread As TextBox
|
||||
Friend WithEvents lblRunning As Label
|
||||
Friend WithEvents TimerUI As Timer
|
||||
Friend WithEvents TimerProgBar As Timer
|
||||
Friend WithEvents LISTThreadStatus As ListView
|
||||
Friend WithEvents GroupBox1 As GroupBox
|
||||
Friend WithEvents chThread As ColumnHeader
|
||||
Friend WithEvents chTime As ColumnHeader
|
||||
Friend WithEvents chOther As ColumnHeader
|
||||
Friend WithEvents chkStatAggr As CheckBox
|
||||
Friend WithEvents btnExportStats As Button
|
||||
Friend WithEvents chkAutoRestart As CheckBox
|
||||
Friend WithEvents TimerCheck As Timer
|
||||
Friend WithEvents ThreadCurrentStatusList As ListView
|
||||
Friend WithEvents ColumnHeader1 As ColumnHeader
|
||||
Friend WithEvents ColumnHeader2 As ColumnHeader
|
||||
Friend WithEvents ColumnHeader3 As ColumnHeader
|
||||
Friend WithEvents ColumnHeader4 As ColumnHeader
|
||||
End Class
|
||||
@@ -0,0 +1,996 @@
|
||||
Imports System.IO
|
||||
Imports System.Net.NetworkInformation
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports WebDoorCreator.SDK
|
||||
|
||||
Public Class ProcMan
|
||||
|
||||
#Region "Public Constructors"
|
||||
|
||||
Public Sub New()
|
||||
|
||||
' This call is required by the designer.
|
||||
InitializeComponent()
|
||||
|
||||
' Add any initialization after the InitializeComponent() call.
|
||||
synchronizationContext = SynchronizationContext.Current
|
||||
m_bStopProcess = True
|
||||
SetMaxCamInstances(1)
|
||||
StartUiThread()
|
||||
' preparo lista thread...
|
||||
LISTThreadStatus.BeginUpdate()
|
||||
LISTThreadStatus.Items.Clear()
|
||||
LISTThreadStatus.Items.Add(New ListViewItem(New String() {"init", "waiting", "-"}))
|
||||
LISTThreadStatus.EndUpdate()
|
||||
|
||||
' verifico SE avviare
|
||||
If chkAutoRestart.Checked Then
|
||||
startAllThreads()
|
||||
End If
|
||||
CheckStartAutoRestart()
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
#Region "Private Fields"
|
||||
|
||||
Private ReadOnly synchronizationContext As SynchronizationContext
|
||||
|
||||
' caricamento del NEXT STACK da redis (come oggetto) PROD http : https://iis01.egalware.com/WDC/SRV/
|
||||
' DEV: https : https://localhost:7043/
|
||||
Dim baseIp As String = "iis01.egalware.com"
|
||||
|
||||
Dim baseUrl As String = "https://iis01.egalware.com/WDC/SRV/"
|
||||
|
||||
Dim codPost As String = "WRK001"
|
||||
|
||||
' nome macchina calcolo
|
||||
Dim currWDC As WDC = New WDC(baseIp, baseUrl, codPost)
|
||||
|
||||
Dim idxSim As Integer = 0
|
||||
|
||||
Dim m_bExecutionThreadStoped As Boolean = False
|
||||
|
||||
Dim m_bStopProcess As Boolean = False
|
||||
|
||||
Dim m_ExecutionThread As Thread
|
||||
|
||||
'Private m_MaxCamInstances As Integer = 8
|
||||
Private m_MaxCamInstances As Integer = 1
|
||||
|
||||
Dim risultatoPing As PingReply = Nothing
|
||||
|
||||
Dim ThreadList As Thread()
|
||||
|
||||
Dim ThreadDataList As ThreadData()
|
||||
|
||||
Dim m_bPingOk As Boolean = False
|
||||
Dim m_bAliveOk As Boolean = False
|
||||
|
||||
#End Region
|
||||
Enum ThreadOperations As Integer
|
||||
WaitingData = 1
|
||||
FoundRequest = 2
|
||||
WritingDdf = 3
|
||||
ProcessingDdf = 4
|
||||
ReadingSvg = 5
|
||||
SendResult = 6
|
||||
Closed = 10
|
||||
End Enum
|
||||
|
||||
Private Class ThreadData
|
||||
|
||||
Private m_ThreadOperation As ThreadOperations
|
||||
Public ReadOnly Property ThreadOperation As ThreadOperations
|
||||
Get
|
||||
Return m_ThreadOperation
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetThreadOperation(value As ThreadOperations)
|
||||
m_ThreadOperation = value
|
||||
End Sub
|
||||
|
||||
Private m_Process As Process
|
||||
Public ReadOnly Property Process As Process
|
||||
Get
|
||||
Return m_Process
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetProcess(value As Process)
|
||||
m_Process = value
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#Region "Private Methods"
|
||||
|
||||
Private Sub UpdateThreadCurrentStatus()
|
||||
synchronizationContext.Post(New SendOrPostCallback(
|
||||
Sub(o)
|
||||
ThreadCurrentStatusList.BeginUpdate()
|
||||
ThreadCurrentStatusList.Items.Clear()
|
||||
|
||||
If Not IsNothing(ThreadList) Then
|
||||
For ThreadIndex = 0 To ThreadList.Count - 1
|
||||
If Not IsNothing(ThreadList(ThreadIndex)) Then
|
||||
Dim ThreadProcessState As String = "Nothing"
|
||||
'If Not IsNothing(ThreadDataList(ThreadIndex)) AndAlso Not IsNothing(ThreadDataList(ThreadIndex).Process) AndAlso
|
||||
'Not IsNothing(ThreadDataList(ThreadIndex).Process.HasExited) Then
|
||||
' ThreadProcessState = ThreadDataList(ThreadIndex).Process.HasExited
|
||||
'End If
|
||||
ThreadCurrentStatusList.Items.Add(New ListViewItem(New String() {ThreadIndex,
|
||||
ThreadList(ThreadIndex).ThreadState.ToString(),
|
||||
ThreadProcessState,
|
||||
ThreadDataList(ThreadIndex).ThreadOperation.ToString()}))
|
||||
Else
|
||||
ThreadCurrentStatusList.Items.Add(New ListViewItem(New String() {ThreadIndex,
|
||||
"nothing"}))
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
ThreadCurrentStatusList.EndUpdate()
|
||||
lblpingTest.Text = m_bPingOk.ToString()
|
||||
lblTestAlive.Text = m_bAliveOk.ToString()
|
||||
End Sub), "")
|
||||
End Sub
|
||||
|
||||
Private Sub btnQueueStatus_Click(sender As Object, e As EventArgs) Handles btnQueueStatus.Click
|
||||
DisplayQueueStatus()
|
||||
End Sub
|
||||
|
||||
Private Sub btnResetQueue_Click(sender As Object, e As EventArgs) Handles btnResetQueue.Click
|
||||
currWDC.ResetQueue()
|
||||
txtOut.Text = "Queue Resetted!"
|
||||
End Sub
|
||||
|
||||
Private Sub btnTestAlive_Click(sender As Object, e As EventArgs) Handles btnTestAlive.Click
|
||||
Dim answ As String = ""
|
||||
If (currWDC.testAlive) Then
|
||||
lblTestAlive.Text = "Server Alive!!!"
|
||||
Else
|
||||
lblTestAlive.Text = "Alive test failed!"
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnTestPing_Click(sender As Object, e As EventArgs) Handles btnTestPing.Click
|
||||
' chiamo test ping...
|
||||
risultatoPing = currWDC.testPing
|
||||
lblpingTest.Text = risultatoPing.Status.ToString()
|
||||
End Sub
|
||||
|
||||
Private Sub DisplayQueueStatus()
|
||||
Dim queueStatus As New Dictionary(Of String, Long)
|
||||
queueStatus = currWDC.queueStatus
|
||||
Dim sb As StringBuilder
|
||||
sb = New StringBuilder
|
||||
For Each item As KeyValuePair(Of String, Long) In queueStatus
|
||||
sb.AppendLine($"{item.Key}: {item.Value}")
|
||||
Next
|
||||
sb.AppendLine()
|
||||
txtQueue.Text = sb.ToString()
|
||||
txtQueue.Invalidate()
|
||||
End Sub
|
||||
|
||||
Private Sub ExecutionProcess()
|
||||
' recupero Id dei DDF
|
||||
Dim sDdfRoot As String = "c:\EgtData\WebDoor\Ddf"
|
||||
Dim sCurrDdfDir As String = ""
|
||||
Dim nDdfId As Integer = 1
|
||||
|
||||
Dim bStopMainProcess As Boolean = False
|
||||
Dim n30SecCounter As Integer = 0
|
||||
While Not bStopMainProcess
|
||||
bStopMainProcess = m_bStopProcess
|
||||
Dim bOk As Boolean = False
|
||||
While Not bOk
|
||||
If Not bStopMainProcess AndAlso Not m_bStopProcess Then
|
||||
' ogni 30 secondi
|
||||
If n30SecCounter = 30 OrElse n30SecCounter = 0 Then
|
||||
' verifica connessione
|
||||
'Dim risultatoPing As PingReply = currWDC.testPing
|
||||
'bOk = risultatoPing.Status = IPStatus.Success
|
||||
|
||||
' test boolean diretto
|
||||
bOk = currWDC.testPingOk
|
||||
m_bPingOk = bOk
|
||||
If bOk Then
|
||||
bOk = currWDC.testAlive
|
||||
m_bAliveOk = bOk
|
||||
Else
|
||||
m_bAliveOk = False
|
||||
End If
|
||||
Else
|
||||
bOk = True
|
||||
End If
|
||||
End If
|
||||
' se connessione non ok o processo fermato, fermo i thread
|
||||
If Not bOk OrElse bStopMainProcess Then
|
||||
If Not IsNothing(ThreadList) AndAlso ThreadList.Count > 0 AndAlso Not IsNothing(ThreadList(0)) Then
|
||||
' li fermo
|
||||
m_bStopProcess = True
|
||||
' verifico siano terminati
|
||||
Dim bOneNotEnded As Boolean = True
|
||||
While bOneNotEnded
|
||||
bOneNotEnded = False
|
||||
For Each Thread In ThreadList
|
||||
If Not IsNothing(Thread) Then
|
||||
If Thread.IsAlive Then
|
||||
bOneNotEnded = True
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End While
|
||||
' pulisco la lista
|
||||
For ThreadIndex = 0 To ThreadList.Count - 1
|
||||
ThreadList(ThreadIndex) = Nothing
|
||||
Next
|
||||
m_bStopProcess = False
|
||||
End If
|
||||
If bStopMainProcess Then
|
||||
m_bExecutionThreadStoped = True
|
||||
Return
|
||||
End If
|
||||
End If
|
||||
If Not bOk Then Thread.Sleep(10)
|
||||
End While
|
||||
|
||||
If bOk AndAlso (IsNothing(ThreadList) OrElse ThreadList.Count = 0) Then
|
||||
ThreadList = New Thread(m_MaxCamInstances - 1) {}
|
||||
ThreadDataList = New ThreadData(m_MaxCamInstances - 1) {}
|
||||
For nThreadIndex = 0 To m_MaxCamInstances - 1
|
||||
Dim ThreadId As Integer = nThreadIndex
|
||||
ThreadList(nThreadIndex) = New Thread(Sub()
|
||||
ThreadFunction(ThreadId)
|
||||
End Sub)
|
||||
ThreadList(nThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
ThreadList(nThreadIndex).Start()
|
||||
Thread.Sleep(100)
|
||||
Next
|
||||
End If
|
||||
' se qualche processo in stop, lo faccio ripartire
|
||||
For ThreadIndex = 0 To ThreadList.Count - 1
|
||||
Dim Thread = ThreadList(ThreadIndex)
|
||||
If Not IsNothing(Thread) Then
|
||||
If Thread.ThreadState = ThreadState.Stopped OrElse Thread.ThreadState = ThreadState.Aborted OrElse
|
||||
Thread.ThreadState = ThreadState.Suspended Then
|
||||
Thread.Abort()
|
||||
Thread.Sleep(500)
|
||||
While Not Thread.ThreadState = ThreadState.Aborted
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
Thread = Nothing
|
||||
Dim ThreadId As Integer = ThreadIndex
|
||||
Thread = New Thread(Sub()
|
||||
ThreadFunction(ThreadId)
|
||||
End Sub)
|
||||
Thread.SetApartmentState(ApartmentState.STA)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
Thread.Start()
|
||||
End If
|
||||
Else
|
||||
Dim ThreadId As Integer = ThreadIndex
|
||||
ThreadList(ThreadIndex) = New Thread(Sub()
|
||||
ThreadFunction(ThreadId)
|
||||
End Sub)
|
||||
ThreadList(ThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
ThreadList(ThreadIndex).Start()
|
||||
End If
|
||||
Next
|
||||
If n30SecCounter <= 30 Then
|
||||
n30SecCounter += 1
|
||||
Else
|
||||
n30SecCounter = 1
|
||||
End If
|
||||
Thread.Sleep(1000)
|
||||
|
||||
End While
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function GetFileContent(ByVal filePath As String, ByRef fileContent As String) As Boolean
|
||||
|
||||
Dim bOk As Boolean = File.Exists(filePath)
|
||||
If bOk Then
|
||||
Try
|
||||
fileContent = File.ReadAllText(filePath)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
fileContent = ""
|
||||
End Try
|
||||
End If
|
||||
Return bOk
|
||||
End Function
|
||||
|
||||
Private Sub performBarAdvance()
|
||||
synchronizationContext.Post(New SendOrPostCallback(
|
||||
Sub(o)
|
||||
tsProgBar.PerformStep()
|
||||
If tsProgBar.Value >= tsProgBar.Maximum Then
|
||||
tsProgBar.Value = 0
|
||||
End If
|
||||
|
||||
tsProgBar.Invalidate()
|
||||
End Sub
|
||||
), "")
|
||||
End Sub
|
||||
|
||||
Private Sub performUpdateUI()
|
||||
synchronizationContext.Post(New SendOrPostCallback(
|
||||
Sub(o)
|
||||
'verifico thread attivi e se calano --> riavvia..
|
||||
If ThreadCount() <> m_MaxCamInstances And Not m_bStopProcess Then
|
||||
'stopAllThreads()
|
||||
'Thread.Sleep(100)
|
||||
'startAllThreads()
|
||||
End If
|
||||
|
||||
lblRunning.Text = $"threads: {ThreadCount()}/{m_MaxCamInstances}"
|
||||
lblRunning.Invalidate()
|
||||
DisplayQueueStatus()
|
||||
' colore btn start / stop...
|
||||
If m_bStopProcess Then
|
||||
|
||||
StartProcess.BackColor = ButtonBase.DefaultBackColor
|
||||
StartProcess.ForeColor = ButtonBase.DefaultForeColor
|
||||
StopProcess.BackColor = Color.Green
|
||||
StopProcess.ForeColor = Color.White
|
||||
Else
|
||||
StartProcess.BackColor = Color.Green
|
||||
StartProcess.ForeColor = Color.White
|
||||
StopProcess.BackColor = ButtonBase.DefaultBackColor
|
||||
StopProcess.ForeColor = ButtonBase.DefaultForeColor
|
||||
End If
|
||||
End Sub
|
||||
), "")
|
||||
End Sub
|
||||
|
||||
Private Sub SetMaxCamInstances(value As Integer)
|
||||
' Numero di core logici da utilizzare (minimo tra presenti sul PC e imposti da INI)
|
||||
Dim nMaxThread As Integer = Math.Min(Environment.ProcessorCount, value)
|
||||
m_MaxCamInstances = nMaxThread
|
||||
End Sub
|
||||
|
||||
Private Sub startAllThreads()
|
||||
m_bStopProcess = False
|
||||
m_bExecutionThreadStoped = False
|
||||
m_ExecutionThread = New Thread(Sub()
|
||||
ExecutionProcess()
|
||||
End Sub)
|
||||
|
||||
m_ExecutionThread.SetApartmentState(ApartmentState.STA)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
m_ExecutionThread.Start()
|
||||
#If False Then
|
||||
'' recupero Id dei DDF
|
||||
'Dim sDdfRoot As String = "c:\EgtData\WebDoor\Ddf"
|
||||
'Dim sCurrDdfDir As String = ""
|
||||
'Dim nDdfId As Integer = 1
|
||||
|
||||
'' Numero di core logici da utilizzare (minimo tra presenti sul PC e imposti da INI)
|
||||
'Dim nMaxThread As Integer = Math.Min(Environment.ProcessorCount, m_MaxCamInstances)
|
||||
'Dim bStopMainProcess As Boolean = False
|
||||
'Dim n30SecCounter As Integer = 0
|
||||
'While Not bStopMainProcess
|
||||
' bStopMainProcess = m_bStopProcess
|
||||
' Dim bOk As Boolean = False
|
||||
' While Not bOk
|
||||
' ' ogni 30 secondi
|
||||
' If n30SecCounter = 30 OrElse n30SecCounter = 0 Then
|
||||
' ' verifica connessione
|
||||
' Dim risultatoPing As PingReply = currWDC.testPing
|
||||
' bOk = risultatoPing.Status = IPStatus.Success
|
||||
' If bOk Then
|
||||
' bOk = currWDC.testAlive
|
||||
' End If
|
||||
' Else bOk = True
|
||||
' End If
|
||||
' ' se connessione non ok o processo fermato, fermo i thread
|
||||
' If Not bOk OrElse bStopMainProcess Then
|
||||
' If Not IsNothing(ThreadList) AndAlso ThreadList.Count > 0 Then
|
||||
' ' li fermo
|
||||
' m_bStopProcess = True
|
||||
' ' verifico siano terminati
|
||||
' Dim bOneNotEnded As Boolean = True
|
||||
' While bOneNotEnded
|
||||
' bOneNotEnded = False
|
||||
' For Each Thread In ThreadList
|
||||
' If Thread.IsAlive Then
|
||||
' bOneNotEnded = True
|
||||
' Exit For
|
||||
' End If
|
||||
' Next
|
||||
' End While
|
||||
' ' pulisco la lista
|
||||
' For Each Thread In ThreadList
|
||||
' Thread = Nothing
|
||||
' Next
|
||||
' End If
|
||||
' If bStopMainProcess Then Return
|
||||
' End If
|
||||
' If Not bOk Then Thread.Sleep(10)
|
||||
' End While
|
||||
|
||||
' If bOk AndAlso (IsNothing(ThreadList) OrElse ThreadList.Count = 0) Then
|
||||
' ThreadList = New Thread(nMaxThread - 1) {}
|
||||
' For nThreadIndex = 0 To nMaxThread - 1
|
||||
' ThreadList(nThreadIndex) = New Thread(Sub()
|
||||
' ThreadFunction()
|
||||
' End Sub)
|
||||
' ThreadList(nThreadIndex).SetApartmentState(ApartmentState.STA)
|
||||
' ' avvio thread di gestione della macchina che avvia la connessione
|
||||
' ThreadList(nThreadIndex).Start()
|
||||
' Next
|
||||
' End If
|
||||
' If n30SecCounter <= 30 Then
|
||||
' n30SecCounter += 1
|
||||
' Else
|
||||
' n30SecCounter = 1
|
||||
' End If
|
||||
' Thread.Sleep(1000)
|
||||
'End While
|
||||
|
||||
'Dim DdfDirs As String() = Directory.GetDirectories(sDdfRoot)
|
||||
'If DdfDirs.Count = 0 Then
|
||||
' sCurrDdfDir = sDdfRoot & "\0"
|
||||
' Directory.CreateDirectory(sCurrDdfDir)
|
||||
' nDdfId = 0
|
||||
'Else
|
||||
|
||||
' nDdfId = Directory.EnumerateFiles(DdfDirs(DdfDirs.Count - 1)).Max(Of Integer)(Function(x)
|
||||
' Dim nDirId As Integer = 0
|
||||
' If Integer.TryParse(x, nDirId) Then
|
||||
' Return nDirId
|
||||
' Else
|
||||
' Return 0
|
||||
' End If
|
||||
' End Function)
|
||||
' If (nDdfId + 1) Mod 100 = 0 Then
|
||||
' sCurrDdfDir = sDdfRoot & "\" & nDdfId + 1
|
||||
' Directory.CreateDirectory(sCurrDdfDir)
|
||||
' nDdfId = 0
|
||||
' End If
|
||||
'End If
|
||||
|
||||
' ' Lancio in parallelo più processi (senza superare il numero di core logici presenti) Dim
|
||||
' vProc As MyProc() = New MyProc(nMaxThread - 1) {} For j As Integer = 0 To nMaxThread - 1
|
||||
' vProc(j).nBar = -1 vProc(j).bEnable = True Next
|
||||
|
||||
' While Not m_bStopProcess
|
||||
|
||||
' For j As Integer = 0 To nMaxThread - 1 If Not vProc(j).bEnable Then Continue For Dim bDone
|
||||
' As Boolean = False
|
||||
|
||||
' If vProc(j).nBar = -1 Then
|
||||
|
||||
' ' se c'e' qualcosa da processare If currWDC.numTask2proc > 0 Then
|
||||
|
||||
' Dim LastRequest As Dictionary(Of String, String) = currWDC.queueList(1)
|
||||
|
||||
' If vBar(nCurrBar).bBarOk Then vProc(j).Proc = New Process()
|
||||
' vProc(j).Proc.StartInfo.FileName = ExePath If bIsEdit Then
|
||||
' vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """" Else
|
||||
' vProc(j).Proc.StartInfo.Arguments = """" & vBar(nCurrBar).sBarPath & """ " & """" &
|
||||
' vBar(nCurrBar).nProjType & """ " & """" & vBar(nCurrBar).nMachineName & """ " &
|
||||
' vBar(nCurrBar).nCmdType End If vProc(j).Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
' If vProc(j).Proc.Start() Then vProc(j).nBar = nCurrBar nCurrBar += 1 nActProc += 1 End If
|
||||
' Else If vBar(nCurrBar).nCmdType = CmdTypes.CHECK OrElse vBar(nCurrBar).nCmdType =
|
||||
' CmdTypes.CHECKGEN Then RaiseEvent Calc_ProcessResult(Nothing, New
|
||||
' CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar)) ElseIf
|
||||
' vBar(nCurrBar).nCmdType = CmdTypes.GENERATE Then RaiseEvent Calc_ProcessResult(Nothing,
|
||||
' New CalcResultEventArgs(vBar(nCurrBar))) 'ProcessResults(vBar(nCurrBar)) 'RaiseEvent
|
||||
' Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(nCurrBar)))
|
||||
' 'ProcessResults(vBar(nCurrBar)) End If bDone = True nCurrBar += 1 End If End If Else
|
||||
|
||||
' If vProc(j).Proc.HasExited Then ' se terminato con successo If vProc(j).Proc.ExitCode = 0
|
||||
' Then ' salvo il risultato If vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECK OrElse
|
||||
' vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKGEN Then RaiseEvent
|
||||
' Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) '
|
||||
' ProcessResults(vBar(vProc(j).nBar)) ElseIf vBar(vProc(j).nBar).nCmdType =
|
||||
' CmdTypes.GENERATE Then RaiseEvent Calc_ProcessResult(Nothing, New
|
||||
' CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
' 'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar)))
|
||||
' 'ProcessResults(vBar(nCurrBar)) End If bDone = True vProc(j).nBar = -1 nActProc -= 1 ' se
|
||||
' superato il numero di processi eseguibili in parallelo ElseIf vProc(j).Proc.ExitCode = 1
|
||||
' Then ' aggiungo il pezzo in coda If numBars + nShiftBar < numBars + nMaxThread Then
|
||||
' vBar(numBars + nShiftBar) = vBar(vProc(j).nBar) nShiftBar += 1 End If ' disabilito il
|
||||
' processo vProc(j).bEnable = False vProc(j).nBar = -1 nActProc -= 1 ' altrimenti (errore
|
||||
' generico di esecuzione) Else ' salvo il risultato If vBar(vProc(j).nBar).nCmdType =
|
||||
' CmdTypes.CHECK OrElse vBar(vProc(j).nBar).nCmdType = CmdTypes.CHECKGEN Then RaiseEvent
|
||||
' Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(vProc(j).nBar))) '
|
||||
' ProcessResults(vBar(vProc(j).nBar)) ElseIf vBar(vProc(j).nBar).nCmdType =
|
||||
' CmdTypes.GENERATE Then RaiseEvent Calc_ProcessResult(Nothing, New
|
||||
' CalcResultEventArgs(vBar(vProc(j).nBar))) ' ProcessResults(vBar(vProc(j).nBar))
|
||||
' 'RaiseEvent Calc_ProcessEnd(Nothing, New CalcProcessEndEventArgs(vBar(vProc(j).nBar)))
|
||||
' 'ProcessResults(vBar(nCurrBar)) End If bDone = True vProc(j).nBar = -1 nActProc -= 1 End
|
||||
' If Else vProc(j).Proc.Refresh() End If End If
|
||||
|
||||
' If bDone Then ' se sono in simulazione If bIsSimulation Then Dim sOriPath As String =
|
||||
' Path.ChangeExtension(vBar(0).sBarPath, ".ori.bwe") ' se file modificato a mano If
|
||||
' File.GetLastWriteTime(sOriPath) < File.GetLastWriteTime(vBar(0).sBarPath) Then ' aggiorno
|
||||
' progetto If File.Exists(vBar(0).sBarPath) Then File.Copy(vBar(0).sBarPath, sOriPath, True)
|
||||
|
||||
' ' messaggio di lancio verifica callback(50, "Verifying modifications...", bCancel) '
|
||||
' lancio verifica System.Threading.Thread.Sleep(500)
|
||||
|
||||
' Dim Proc As New Process()
|
||||
' Proc.StartInfo.FileName = ExePath
|
||||
' Proc.StartInfo.Arguments = """" & vBar(0).sBarPath & """ " &
|
||||
' """" & vBar(0).nProjType & """ " &
|
||||
'"""" & vBar(0).nMachineName & """ " & CmdTypes.CHECKGEN
|
||||
' Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
' If Proc.Start() Then Dim ProgressValue As Integer = 50 While Not Proc.HasExited
|
||||
' Proc.Refresh() If ProgressValue < 90 Then ProgressValue += 0.001 callback(ProgressValue,
|
||||
' "Verifying modifications...", bCancel) Thread.Sleep(1) End While ' se terminato con
|
||||
' successo If Proc.ExitCode = 0 Then ' salvo il risultato RaiseEvent
|
||||
' Calc_ProcessResult(Nothing, New CalcResultEventArgs(vBar(0))) Thread.Sleep(500) End If End
|
||||
' If End If ' messaggio di completamento simulazione callback(0, "Simulation closing",
|
||||
' bCancel) ElseIf bIsEdit Then ' ricarico il progetto Dim Result As CalcEndEventArgs.Results
|
||||
' If bAllKO Then Result = CalcEndEventArgs.Results.ERROR_ ElseIf bIsEdit Then Result =
|
||||
' CalcEndEventArgs.Results.EDIT Else Result = CalcEndEventArgs.Results.OK End If RaiseEvent
|
||||
' Calc_Ended(Nothing, New CalcEndEventArgs(CmdTypes.EDIT, Result)) Return Else ' Dialog con
|
||||
' Progress Bar nDoneBar += 1 dProgress = 1 / numBars * nDoneBar Dim sProg As String =
|
||||
' (dProgress * 100).ToString("F1", CultureInfo.InvariantCulture) callback(dProgress, "
|
||||
' Progress: " & sProg & "% Count: " & nDoneBar & " / " & numBars, bCancel) End If If bCancel
|
||||
' Then ' fine callback(1, "", bCancel) ' riabilito interfaccia RaiseEvent
|
||||
' Calc_Ended(Nothing, New CalcEndEventArgs(CmdTypes.CHECKGEN, CalcEndEventArgs.Results.OK))
|
||||
' Return End If nPgsCurrBar = 0 nPgsClock = 0 Else ' se non sono in simulazione If Not
|
||||
' bIsSimulation AndAlso Not bIsEdit Then ' aggiorno conteggio If nPgsClock >= 100 AndAlso
|
||||
' nPgsCurrBar < 149 Then nPgsCurrBar += 1 dProgress = 1 / numBars * nDoneBar + 1 / numBars /
|
||||
' 150 * nPgsCurrBar Dim sProg As String = (dProgress * 100).ToString("F1",
|
||||
' CultureInfo.InvariantCulture) callback(dProgress, " Progress: " & sProg & "% Count: " &
|
||||
' nDoneBar & " / " & numBars, bCancel) nPgsClock = 0 End If End If End If nPgsClock += 1
|
||||
' Thread.Sleep(1) Next
|
||||
|
||||
' End While
|
||||
|
||||
' m_bStopProcess = False
|
||||
|
||||
' Dim num2proc As Integer Dim queueStatus As New Dictionary(Of String, Long) Dim queueList
|
||||
' As New Dictionary(Of String, String) Dim procResults As New List(Of CalcResultDTO) Dim
|
||||
' respPut As String Dim fileName As String Dim fileCont As String
|
||||
|
||||
' queueStatus = currWDC.queueStatus Dim sb As StringBuilder sb = New StringBuilder
|
||||
' sb.Append(txtOut.Text) sb.AppendLine("----------------------------") For Each item As
|
||||
' KeyValuePair(Of String, Long) In queueStatus sb.AppendLine($"{item.Key} | Found
|
||||
' {item.Value} items") Next sb.AppendLine("----------------------------") sb.AppendLine()
|
||||
' txtOut.Text = sb.ToString()
|
||||
|
||||
' ' recupero numero da processare num2proc = currWDC.numTask2proc If (num2proc > 0) Then
|
||||
|
||||
' sb.AppendLine("----------------------------") ' mi prendo la lista dei primi 10 max e
|
||||
' processo... queueList = currWDC.queueList(10) For Each item As KeyValuePair(Of String,
|
||||
' String) In queueList fileCont = "" idxSim = idxSim + 1 If (idxSim > 3) Then idxSim = 0 End
|
||||
' If fileName = Path.Combine("temp", $"Logo{idxSim:00}.svg") If (File.Exists(fileName)) Then
|
||||
' fileCont = File.ReadAllText(fileName) End If
|
||||
|
||||
' ' mi limito a mostrare codice + contenuto DDF... dovrebbe processare invero...
|
||||
' sb.AppendLine("--------------------------------------------------------")
|
||||
' sb.AppendLine($"DoorId.Vers: {item.Key}") sb.AppendLine("DDF:") sb.AppendLine("--------")
|
||||
' sb.AppendLine(item.Value)
|
||||
' sb.AppendLine("--------------------------------------------------------") sb.AppendLine()
|
||||
|
||||
' ' scrivo ddf File.WriteAllText(sCurrDdfDir & "\" & nDdfId, item.Value)
|
||||
|
||||
' ' eseguo calcolo
|
||||
|
||||
' ' costruisco risposta finta di processing con esito true + SVG Dim currRes As New
|
||||
' CalcResultDTO currRes.Validated = True currRes.DoorIdVers = item.Key currRes.SvgGen =
|
||||
' fileCont procResults.Add(currRes) Next sb.AppendLine("----------------------------") sb.AppendLine()
|
||||
|
||||
' ' rendo la risposta... respPut = currWDC.SendProcResults(procResults) sb.AppendLine()
|
||||
' sb.AppendLine("----------------------------") sb.AppendLine("Esito invio risposta al
|
||||
' server:") sb.AppendLine() sb.AppendLine(respPut) sb.AppendLine("----------------------------")
|
||||
|
||||
' txtOut.Text = sb.ToString()
|
||||
|
||||
' End If
|
||||
#End If
|
||||
End Sub
|
||||
|
||||
Private Sub StartProcess_Click(sender As Object, e As EventArgs) Handles StartProcess.Click
|
||||
startAllThreads()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub StartUiThread()
|
||||
' avvio timer progBar
|
||||
TimerUI.Enabled = True
|
||||
TimerUI.Start()
|
||||
|
||||
' avvio il timer di refresh
|
||||
TimerProgBar.Enabled = True
|
||||
TimerProgBar.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub stopAllThreads()
|
||||
m_bStopProcess = True
|
||||
While Not m_bExecutionThreadStoped
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
If Not IsNothing(m_ExecutionThread) Then
|
||||
m_ExecutionThread.Abort()
|
||||
While Not m_ExecutionThread.ThreadState = ThreadState.Aborted
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
m_ExecutionThread = Nothing
|
||||
End If
|
||||
ThreadList = Nothing
|
||||
' fix timer
|
||||
TimerProgBar.Enabled = False
|
||||
TimerProgBar.Stop()
|
||||
End Sub
|
||||
|
||||
Private Sub StopProcess_Click(sender As Object, e As EventArgs) Handles StopProcess.Click
|
||||
stopAllThreads()
|
||||
End Sub
|
||||
|
||||
Private Function ThreadCount() As Integer
|
||||
Dim numCount = 0
|
||||
If Not IsNothing(ThreadList) Then
|
||||
' conto i NON nulli
|
||||
For Each Thread In ThreadList
|
||||
If Not IsNothing(Thread) Then
|
||||
numCount += 1
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' rendo
|
||||
Return numCount
|
||||
End Function
|
||||
|
||||
Private Sub ThreadFunction(ThreadIndex As Integer)
|
||||
Dim MyThreadData As New ThreadData
|
||||
ThreadDataList(ThreadIndex) = MyThreadData
|
||||
Dim sExePath As String = "c:\EgtProg\EgtEngine\EgtEngineR32.exe"
|
||||
Dim sCurrDdfDir As String = "c:\EgtData\WebDoor\Ddf"
|
||||
Dim stopWatch As New Stopwatch()
|
||||
Dim lExeTime As Long = 0
|
||||
Dim lOtherTime As Long = 0
|
||||
|
||||
While Not m_bStopProcess
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.WaitingData)
|
||||
' se c'e' qualcosa da processare
|
||||
If currWDC.numTask2proc > 0 Then
|
||||
Dim LastRequest As Dictionary(Of String, String) = currWDC.queueList(1)
|
||||
If LastRequest.Count > 0 Then
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.FoundRequest)
|
||||
Dim Item As KeyValuePair(Of String, String) = LastRequest.First()
|
||||
Dim bOk As Boolean = Not IsNothing(Item)
|
||||
If bOk Then
|
||||
|
||||
' avvio cronometro
|
||||
'stopWatch.Reset()
|
||||
stopWatch.Restart()
|
||||
' svuoto vecchio set file della porta richiesta
|
||||
Dim fileList As String() = Directory.GetFiles(sCurrDdfDir, Item.Key + ".*")
|
||||
' elimino vecchi
|
||||
If Not IsNothing(fileList) Then
|
||||
For Each sFile In fileList
|
||||
File.Delete(sFile)
|
||||
Next
|
||||
End If
|
||||
|
||||
' scrivo ddf
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.WritingDdf)
|
||||
Dim sDdfPath As String = sCurrDdfDir & "\" & Item.Key & ".ddf"
|
||||
Try
|
||||
File.WriteAllText(sDdfPath, Item.Value)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
End Try
|
||||
|
||||
If bOk Then
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.ProcessingDdf)
|
||||
|
||||
' eseguo calcolo
|
||||
Dim Proc As Process = New Process()
|
||||
MyThreadData.SetProcess(Proc)
|
||||
Proc.StartInfo.FileName = sExePath
|
||||
Proc.StartInfo.Arguments = """C:\EgtData\WebDoor\Main.lua""" & " """ & sDdfPath & """"
|
||||
Proc.StartInfo.UseShellExecute = False
|
||||
|
||||
If Proc.Start() Then
|
||||
|
||||
While Not Proc.HasExited
|
||||
Thread.Sleep(1)
|
||||
End While
|
||||
MyThreadData.SetProcess(Nothing)
|
||||
' salvo exe time...
|
||||
stopWatch.Stop()
|
||||
lExeTime = stopWatch.ElapsedMilliseconds
|
||||
stopWatch.Restart()
|
||||
Dim procResults As New List(Of CalcResultDTO)
|
||||
Dim currRes As New CalcResultDTO
|
||||
Dim fContent As String = ""
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.ReadingSvg)
|
||||
' verifico esistenza file svg e lo carico
|
||||
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "svg"), fContent)
|
||||
' invio risposta
|
||||
currRes.Validated = Proc.ExitCode = 0 AndAlso bOk
|
||||
currRes.DoorIdVers = Item.Key
|
||||
' se NON fosse validato --> messo il messaggio...
|
||||
If (currRes.Validated) Then
|
||||
currRes.SvgGen = fContent
|
||||
Else
|
||||
bOk = GetFileContent(Path.ChangeExtension(sDdfPath, "txt"), fContent)
|
||||
currRes.ErrorMsg = fContent
|
||||
End If
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.SendResult)
|
||||
|
||||
procResults.Add(currRes)
|
||||
Dim respPut As String = currWDC.SendProcResults(procResults)
|
||||
|
||||
stopWatch.Stop()
|
||||
lOtherTime = stopWatch.ElapsedMilliseconds
|
||||
' aggiorno thread display...
|
||||
UpdateThreadList(Item.Key, lExeTime, lOtherTime)
|
||||
' cambio nomi file generati in old
|
||||
Dim OldSvg As String = Path.ChangeExtension(sDdfPath, "svg")
|
||||
Dim NewSvg As String = Path.GetDirectoryName(sDdfPath) & "\" & Path.GetFileNameWithoutExtension(sDdfPath) & "_old.svg"
|
||||
Try
|
||||
File.Delete(NewSvg)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(NewSvg, "txt"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(NewSvg, "log"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(NewSvg, "nge"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Delete(Path.ChangeExtension(NewSvg, "ddf"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Move(OldSvg, NewSvg)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Move(Path.ChangeExtension(OldSvg, "txt"), Path.ChangeExtension(NewSvg, "txt"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Move(Path.ChangeExtension(OldSvg, "log"), Path.ChangeExtension(NewSvg, "log"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Move(Path.ChangeExtension(OldSvg, "nge"), Path.ChangeExtension(NewSvg, "nge"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Try
|
||||
File.Move(Path.ChangeExtension(OldSvg, "ddf"), Path.ChangeExtension(NewSvg, "ddf"))
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
End If
|
||||
stopWatch.Stop()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End While
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.Closed)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TimerProgBar_Tick(sender As Object, e As EventArgs) Handles TimerProgBar.Tick
|
||||
' esegue refresh prog bar
|
||||
performBarAdvance()
|
||||
End Sub
|
||||
|
||||
Private Sub TimerUI_Tick(sender As Object, e As EventArgs) Handles TimerUI.Tick
|
||||
' effettuo refresh code e status thread
|
||||
performUpdateUI()
|
||||
UpdateThreadCurrentStatus()
|
||||
End Sub
|
||||
|
||||
Private Sub txtNumThread_TextChanged(sender As Object, e As EventArgs) Handles txtNumThread.TextChanged
|
||||
Dim numReq As Integer = 1
|
||||
Integer.TryParse(txtNumThread.Text, numReq)
|
||||
' controllo se cambiato il num thread
|
||||
If numReq <> m_MaxCamInstances Then
|
||||
If m_bStopProcess = False Then
|
||||
stopAllThreads()
|
||||
Thread.Sleep(200)
|
||||
End If
|
||||
' imposto
|
||||
SetMaxCamInstances(numReq)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private isUpdatingThreads As Boolean = False
|
||||
''' <summary>
|
||||
''' Esecuzione update display lista stato threads
|
||||
''' </summary>
|
||||
Private Sub UpdateThreadList(tId As String, tExeCam As Long, tOther As Long)
|
||||
synchronizationContext.Post(New SendOrPostCallback(
|
||||
Sub(o)
|
||||
If Not isUpdatingThreads Then
|
||||
isUpdatingThreads = True
|
||||
ProcStats.RecordData(m_MaxCamInstances, tExeCam, tOther)
|
||||
ProcStats.RecordList.Enqueue((tId, tExeCam, tOther))
|
||||
'Begin the update
|
||||
LISTThreadStatus.BeginUpdate()
|
||||
LISTThreadStatus.Items.Clear()
|
||||
|
||||
' compilo in base al tipo di stat richiesta
|
||||
If (chkStatAggr.Checked) Then
|
||||
' statistiche di sintesi
|
||||
Dim sorted = From pair In ProcStats.ExeCumSum
|
||||
Order By pair.Key
|
||||
For Each item In sorted
|
||||
LISTThreadStatus.Items.Add(
|
||||
New ListViewItem(New String() {item.Key,
|
||||
$"{item.Value.NumRec} x {item.Value.ExeTime / item.Value.NumRec:N2} ms",
|
||||
$"{item.Value.NumRec} x {item.Value.OthTime / item.Value.NumRec:N2} ms"
|
||||
}))
|
||||
Next
|
||||
Else
|
||||
' formato log
|
||||
Dim maxItems As Integer = 15
|
||||
While ProcStats.RecordList.Count > maxItems
|
||||
Dim oldItem As (String, Long, Long) = ("", 0, 0)
|
||||
ProcStats.RecordList.TryDequeue(oldItem)
|
||||
End While
|
||||
|
||||
For Each item As (String, Long, Long) In ProcStats.RecordList.Reverse
|
||||
LISTThreadStatus.Items.Add(New ListViewItem(New String() {
|
||||
item.Item1,
|
||||
$"{item.Item2} ms",
|
||||
$"{item.Item3} ms"
|
||||
}))
|
||||
Next
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'End the update
|
||||
LISTThreadStatus.EndUpdate()
|
||||
isUpdatingThreads = False
|
||||
End If
|
||||
End Sub
|
||||
), "")
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
#If False Then
|
||||
'Private Sub btnFullTest_Click(sender As Object, e As EventArgs) Handles btnFullTest.Click
|
||||
|
||||
' Dim num2proc As Integer Dim queueStatus As New Dictionary(Of String, Long) Dim queueList As
|
||||
' New Dictionary(Of String, String) Dim procResults As New List(Of CalcResultDTO) Dim respPut As
|
||||
' String Dim fileName As String Dim fileCont As String
|
||||
|
||||
' queueStatus = currWDC.queueStatus Dim sb As StringBuilder sb = New StringBuilder
|
||||
' sb.AppendLine("----------------------------") For Each item As KeyValuePair(Of String, Long)
|
||||
' In queueStatus sb.AppendLine($"{item.Key} | Found {item.Value} items") Next
|
||||
' sb.AppendLine("----------------------------") sb.AppendLine() txtOut.Text = sb.ToString() '
|
||||
' recupero numero da processare num2proc = currWDC.numTask2proc If (num2proc > 0) Then
|
||||
|
||||
' sb.AppendLine("----------------------------") ' mi prendo la lista dei primi 10 max e
|
||||
' processo... queueList = currWDC.queueList(10) For Each item As KeyValuePair(Of String, String)
|
||||
' In queueList fileCont = "" idxSim = idxSim + 1 If (idxSim > 3) Then idxSim = 0 End If fileName
|
||||
' = Path.Combine("temp", $"Logo{idxSim:00}.svg") If (File.Exists(fileName)) Then fileCont =
|
||||
' File.ReadAllText(fileName) End If
|
||||
|
||||
' ' mi limito a mostrare codice + contenuto DDF... dovrebbe processare invero...
|
||||
' sb.AppendLine("--------------------------------------------------------")
|
||||
' sb.AppendLine($"DoorId.Vers: {item.Key}") sb.AppendLine("DDF:") sb.AppendLine("--------")
|
||||
' sb.AppendLine(item.Value)
|
||||
' sb.AppendLine("--------------------------------------------------------") sb.AppendLine()
|
||||
|
||||
' ' costruisco risposta finta di processing con esito true + SVG Dim currRes As New
|
||||
' CalcResultDTO currRes.Validated = True currRes.DoorIdVers = $"{item.Key}.{item.Value}"
|
||||
' currRes.SvgGen = fileCont procResults.Add(currRes) Next
|
||||
' sb.AppendLine("----------------------------") sb.AppendLine()
|
||||
|
||||
' ' rendo la risposta... respPut = currWDC.SendProcResults(procResults) sb.AppendLine()
|
||||
' sb.AppendLine("----------------------------") sb.AppendLine("Esito invio risposta al server:")
|
||||
' sb.AppendLine() sb.AppendLine(respPut) sb.AppendLine("----------------------------")
|
||||
|
||||
' txtOut.Text = sb.ToString() End If
|
||||
|
||||
'End Sub
|
||||
#End If
|
||||
|
||||
#Region "Private Structs"
|
||||
|
||||
Private Structure MyProc
|
||||
|
||||
#Region "Public Fields"
|
||||
|
||||
Public bEnable As Boolean
|
||||
Public nBar As Integer
|
||||
Public Proc As Process
|
||||
Public Thread As Thread
|
||||
|
||||
#End Region
|
||||
|
||||
End Structure
|
||||
|
||||
''' <summary>
|
||||
''' Esportazione statistiche attuali esecuzione
|
||||
''' </summary>
|
||||
''' <param name="sender"></param>
|
||||
''' <param name="e"></param>
|
||||
Private Sub btnExportStats_Click(sender As Object, e As EventArgs) Handles btnExportStats.Click
|
||||
' statistiche di sintesi
|
||||
Dim sorted = From pair In ProcStats.ExeCumSum
|
||||
Order By pair.Key
|
||||
' preparo il file export...
|
||||
Dim fileName As String
|
||||
Dim adesso As DateTime = DateTime.Now
|
||||
fileName = Path.Combine("C:\Temp\", $"WDC_Stats_{adesso:yyyyMMdd-HHmmss}.csv")
|
||||
Dim sb As StringBuilder = New StringBuilder
|
||||
sb.AppendLine("Threads;Samples;ExeTime;OtherTime;FullTime")
|
||||
For Each item In sorted
|
||||
' preparo la linea CSV...
|
||||
sb.AppendLine($"{item.Key};{item.Value.NumRec};{item.Value.ExeTime / item.Value.NumRec:N2};{item.Value.OthTime / item.Value.NumRec:N2};{(item.Value.ExeTime + item.Value.OthTime) / item.Key:N2}")
|
||||
Next
|
||||
' scrivo!
|
||||
File.WriteAllText(fileName, sb.ToString())
|
||||
End Sub
|
||||
|
||||
Private Sub ProcMan_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
' forzo chiusura threads!
|
||||
stopAllThreads()
|
||||
End Sub
|
||||
|
||||
Private Sub chkAutoRestart_CheckedChanged(sender As Object, e As EventArgs) Handles chkAutoRestart.CheckedChanged
|
||||
CheckStartAutoRestart()
|
||||
End Sub
|
||||
|
||||
Private Sub CheckStartAutoRestart()
|
||||
TimerCheck.Enabled = chkAutoRestart.Checked
|
||||
If chkAutoRestart.Checked Then
|
||||
If IsNothing(m_ExecutionThread) Then
|
||||
startAllThreads()
|
||||
ElseIf m_ExecutionThread.ThreadState = ThreadState.Aborted OrElse m_ExecutionThread.ThreadState = ThreadState.Stopped OrElse
|
||||
m_ExecutionThread.ThreadState = ThreadState.Suspended Then
|
||||
stopAllThreads()
|
||||
Thread.Sleep(200)
|
||||
While Not IsNothing(m_ExecutionThread)
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
Thread.Sleep(100)
|
||||
startAllThreads()
|
||||
End If
|
||||
TimerCheck.Start()
|
||||
Else
|
||||
TimerCheck.Stop()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TimerCheck_Tick(sender As Object, e As EventArgs) Handles TimerCheck.Tick
|
||||
restartAll()
|
||||
End Sub
|
||||
|
||||
Private Sub restartAll()
|
||||
If Not IsNothing(m_ExecutionThread) Then
|
||||
stopAllThreads()
|
||||
Thread.Sleep(200)
|
||||
While Not IsNothing(m_ExecutionThread)
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
startAllThreads()
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
After Width: | Height: | Size: 273 KiB |
@@ -0,0 +1,175 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{96266312-9739-4F12-A6C2-16C1CAFDDA6E}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<StartupObject>WebDoorCreator.CamSrv.My.MyApplication</StartupObject>
|
||||
<RootNamespace>WebDoorCreator.CamSrv</RootNamespace>
|
||||
<AssemblyName>WebDoorCreator.CamSrv</AssemblyName>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<MyType>WindowsForms</MyType>
|
||||
<TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DocumentationFile>WebDoorCreator.CamSrv.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<DefineDebug>false</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DocumentationFile>WebDoorCreator.CamSrv.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionExplicit>On</OptionExplicit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionCompare>Binary</OptionCompare>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionStrict>Off</OptionStrict>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<OptionInfer>On</OptionInfer>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\Temp.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.Buffers.4.5.1\lib\net461\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Deployment" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Memory, Version=4.0.1.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.Memory.4.5.5\lib\net461\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.Runtime.CompilerServices.Unsafe.6.0.0\lib\net461\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\DemoServer\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Web" />
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Import Include="Microsoft.VisualBasic" />
|
||||
<Import Include="System" />
|
||||
<Import Include="System.Collections" />
|
||||
<Import Include="System.Collections.Generic" />
|
||||
<Import Include="System.Data" />
|
||||
<Import Include="System.Drawing" />
|
||||
<Import Include="System.Diagnostics" />
|
||||
<Import Include="System.Windows.Forms" />
|
||||
<Import Include="System.Linq" />
|
||||
<Import Include="System.Xml.Linq" />
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ProcMan.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="ProcMan.Designer.vb">
|
||||
<DependentUpon>ProcMan.vb</DependentUpon>
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||
<Compile Include="My Project\Application.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Application.myapp</DependentUpon>
|
||||
<DesignTime>True</DesignTime>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Resources.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="My Project\Settings.Designer.vb">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ProcMan.resx">
|
||||
<DependentUpon>ProcMan.vb</DependentUpon>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="My Project\Resources.resx">
|
||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="My Project\Application.myapp">
|
||||
<Generator>MyApplicationCodeGenerator</Generator>
|
||||
<LastGenOutput>Application.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="My Project\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<CustomToolNamespace>My</CustomToolNamespace>
|
||||
<LastGenOutput>Settings.Designer.vb</LastGenOutput>
|
||||
</None>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Resources\Temp.ico" />
|
||||
<Content Include="temp\Logo00.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="temp\Logo01.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="temp\Logo02.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
<Content Include="temp\Logo03.svg">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</Content>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\WebDoorCreator.SDK\WebDoorCreator.SDK.csproj">
|
||||
<Project>{4a07adfc-ca24-4135-ba97-3b8e5d49bc09}</Project>
|
||||
<Name>WebDoorCreator.SDK</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Target Name="AfterBuild">
|
||||
<ItemGroup>
|
||||
<MoveToLibFolder Include="$(OutputPath)*.dll ; $(OutputPath)*.pdb ; $(OutputPath)*.xml" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
</Project>
|
||||
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="7.0.0" targetFramework="net472" />
|
||||
<package id="System.Buffers" version="4.5.1" targetFramework="net472" />
|
||||
<package id="System.Memory" version="4.5.5" targetFramework="net472" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net472" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="6.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Encodings.Web" version="7.0.0" targetFramework="net472" />
|
||||
<package id="System.Text.Json" version="7.0.2" targetFramework="net472" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net472" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net472" />
|
||||
</packages>
|
||||
@@ -0,0 +1,49 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#010202;}
|
||||
.st1{fill:none;}
|
||||
.st2{fill:#B0C5D6;}
|
||||
.st3{fill:#3C89C9;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="Livello_1">
|
||||
</g>
|
||||
<g id="Livello_2">
|
||||
</g>
|
||||
<g id="Livello_3">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M33.6,158.2H47v3.6h-9.7v7.9h6.2l-1.1,3.5h-5.2v9.8h9.6v3.3H33.6V158.2z"/>
|
||||
<path d="M62,188.5v-3.2c-0.3,0.5-0.8,0.8-1.5,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-2.3,0-4.2-0.6-5.5-1.9c-1.3-1.3-2-3.2-2-5.6v-6
|
||||
c0-2.4,0.7-4.2,2.1-5.5c1.4-1.3,3.2-2,5.5-2c0.9,0,1.7,0.1,2.4,0.4c0.7,0.3,1.2,0.6,1.5,1l0.5-1.1h3.1V189c0,1.8-0.4,3.2-1.3,4.1
|
||||
c-0.9,1-2.3,1.6-4.3,1.7l-0.9-2.9C61.1,191.8,62,190.6,62,188.5z M61,170.5c-0.7-0.7-1.7-1-3-1c-1.2,0-2.1,0.4-2.8,1.1
|
||||
c-0.7,0.7-1,1.7-1,3v5.5c0,1.3,0.3,2.4,0.9,3.2c0.6,0.8,1.6,1.2,2.9,1.2c1.4,0,2.4-0.5,3-1.4c0.7-0.9,1-2.3,1-4.1v-4.5
|
||||
C62,172.1,61.7,171.1,61,170.5z"/>
|
||||
<path d="M77.9,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4c0.9-0.4,1.9-0.6,3.1-0.6
|
||||
c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6c2.6,0,4.4,0.4,5.7,1.2
|
||||
c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C81.3,186.7,79.2,186.8,77.9,186.8z M78,174.4c-1-0.3-1.9-0.5-2.8-0.5
|
||||
c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7C79.8,175.1,79,174.8,78,174.4z"/>
|
||||
<path d="M88.7,158.2h3.6v28.2h-3.6V158.2z"/>
|
||||
<path d="M108.9,173.7l-3.3,12.7h-3.9l-6.3-20.2h4l4.2,14.3l3.7-14.3h3.5l3.7,14.3l4-14.3h3.9l-6.4,20.2h-3.8L108.9,173.7z"/>
|
||||
<path d="M131.8,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4c0.9-0.4,1.9-0.6,3.1-0.6
|
||||
c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6c2.6,0,4.4,0.4,5.7,1.2
|
||||
c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C135.1,186.7,133.1,186.8,131.8,186.8z M131.9,174.4c-1-0.3-1.9-0.5-2.8-0.5
|
||||
c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7C133.7,175.1,132.8,174.8,131.9,174.4z"/>
|
||||
<path d="M141.9,166.2h3.4l0.2,0.6c1.1-0.6,2.4-0.9,3.8-0.9c1,0,2.1,0.1,3.4,0.4l-0.9,3.5c-0.7-0.3-1.5-0.5-2.3-0.5
|
||||
c-1.1,0-2,0.3-2.8,0.8c-0.8,0.6-1.1,1.3-1.1,2.3v13.9h-3.6V166.2z"/>
|
||||
<path d="M163.7,186.4c-1.2,0.3-2.5,0.5-3.7,0.5c-2,0-3.5-0.5-4.7-1.5c-1.2-1-1.7-2.5-1.7-4.4v-8.3c0-2.2,0.7-3.9,2-5.1
|
||||
c1.3-1.2,3.1-1.8,5.3-1.8c2.2,0,3.9,0.6,5.2,1.8c1.2,1.2,1.9,2.9,1.9,5v5.8l-10.7,0.6v1.6c0,0.9,0.3,1.7,0.8,2.2
|
||||
c0.5,0.5,1.3,0.7,2.3,0.7c1.5,0,3.2-0.5,5.2-1.6l1.4,3.1C166,185.6,164.9,186.1,163.7,186.4z M163.2,170.1
|
||||
c-0.7-0.5-1.5-0.8-2.4-0.8c-1.1,0-2,0.3-2.7,0.9c-0.6,0.6-1,1.5-1,2.5v2.8l7-0.4v-2.6C164.3,171.5,163.9,170.7,163.2,170.1z"/>
|
||||
</g>
|
||||
<polygon class="st1" points="98.9,32.9 61.4,32.8 98.9,32.9 "/>
|
||||
<polygon class="st1" points="75.7,91.3 90.7,69.8 75.7,91.3 "/>
|
||||
<polygon class="st2" points="167.9,111.6 61.5,111.6 61.4,32.8 98.9,32.9 118.9,4.6 32.7,4.6 33.1,140.8 167.9,140.6 "/>
|
||||
<polygon class="st3" points="102.4,52.9 90.7,69.8 75.7,91.3 167.9,91.2 167.9,4.6 148.2,4.6 114.6,52.8 "/>
|
||||
<polygon class="st4" points="148.2,4.6 148.2,4.6 118.9,4.6 135.9,4.6 "/>
|
||||
<polygon class="st4" points="75.7,91.3 75.7,91.3 90.7,69.8 102.4,52.9 114.6,52.8 148.2,4.6 135.9,4.6 118.9,4.6 98.9,32.9
|
||||
98.9,32.9 61.4,32.8 61.5,111.6 167.9,111.6 167.9,91.2 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,52 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#010202;}
|
||||
.st1{fill:none;}
|
||||
.st2{fill:#B0C5D6;}
|
||||
.st3{fill:#3C89C9;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="Livello_1">
|
||||
</g>
|
||||
<g id="Livello_2">
|
||||
</g>
|
||||
<g id="Livello_3">
|
||||
<g>
|
||||
<g>
|
||||
<path class="st2" d="M33.6,158.2H47v3.6h-9.7v7.9h6.2l-1.1,3.5h-5.2v9.8h9.6v3.3H33.6V158.2z"/>
|
||||
<path class="st2" d="M62,188.5v-3.2c-0.3,0.5-0.8,0.8-1.5,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-2.3,0-4.2-0.6-5.5-1.9s-2-3.2-2-5.6v-6
|
||||
c0-2.4,0.7-4.2,2.1-5.5c1.4-1.3,3.2-2,5.5-2c0.9,0,1.7,0.1,2.4,0.4s1.2,0.6,1.5,1l0.5-1.1h3.1V189c0,1.8-0.4,3.2-1.3,4.1
|
||||
c-0.9,1-2.3,1.6-4.3,1.7l-0.9-2.9C61.1,191.8,62,190.6,62,188.5z M61,170.5c-0.7-0.7-1.7-1-3-1c-1.2,0-2.1,0.4-2.8,1.1
|
||||
c-0.7,0.7-1,1.7-1,3v5.5c0,1.3,0.3,2.4,0.9,3.2c0.6,0.8,1.6,1.2,2.9,1.2c1.4,0,2.4-0.5,3-1.4c0.7-0.9,1-2.3,1-4.1v-4.5
|
||||
C62,172.1,61.7,171.1,61,170.5z"/>
|
||||
<path class="st2" d="M77.9,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4
|
||||
c0.9-0.4,1.9-0.6,3.1-0.6c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6
|
||||
c2.6,0,4.4,0.4,5.7,1.2c1.2,0.8,2,1.8,2.2,2.9s0.4,2.6,0.4,4.4v12C81.3,186.7,79.2,186.8,77.9,186.8z M78,174.4
|
||||
c-1-0.3-1.9-0.5-2.8-0.5c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.2,5.3,4.2c0.9,0,1.8-0.1,2.8-0.2v-7.7
|
||||
C79.8,175.1,79,174.8,78,174.4z"/>
|
||||
<path class="st2" d="M88.7,158.2h3.6v28.2h-3.6V158.2z"/>
|
||||
<path class="st2" d="M108.9,173.7l-3.3,12.7h-3.9l-6.3-20.2h4l4.2,14.3l3.7-14.3h3.5l3.7,14.3l4-14.3h3.9l-6.4,20.2h-3.8
|
||||
L108.9,173.7z"/>
|
||||
<path class="st2" d="M131.8,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4
|
||||
c0.9-0.4,1.9-0.6,3.1-0.6c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6
|
||||
c2.6,0,4.4,0.4,5.7,1.2c1.2,0.8,2,1.8,2.2,2.9s0.4,2.6,0.4,4.4v12C135.1,186.7,133.1,186.8,131.8,186.8z M131.9,174.4
|
||||
c-1-0.3-1.9-0.5-2.8-0.5c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.2,5.3,4.2c0.9,0,1.8-0.1,2.8-0.2v-7.7
|
||||
C133.7,175.1,132.8,174.8,131.9,174.4z"/>
|
||||
<path class="st2" d="M141.9,166.2h3.4l0.2,0.6c1.1-0.6,2.4-0.9,3.8-0.9c1,0,2.1,0.1,3.4,0.4l-0.9,3.5c-0.7-0.3-1.5-0.5-2.3-0.5
|
||||
c-1.1,0-2,0.3-2.8,0.8c-0.8,0.6-1.1,1.3-1.1,2.3v13.9h-3.6V166.2z"/>
|
||||
<path class="st2" d="M163.7,186.4c-1.2,0.3-2.5,0.5-3.7,0.5c-2,0-3.5-0.5-4.7-1.5c-1.2-1-1.7-2.5-1.7-4.4v-8.3
|
||||
c0-2.2,0.7-3.9,2-5.1c1.3-1.2,3.1-1.8,5.3-1.8s3.9,0.6,5.2,1.8c1.2,1.2,1.9,2.9,1.9,5v5.8l-10.7,0.6v1.6c0,0.9,0.3,1.7,0.8,2.2
|
||||
c0.5,0.5,1.3,0.7,2.3,0.7c1.5,0,3.2-0.5,5.2-1.6l1.4,3.1C166,185.6,164.9,186.1,163.7,186.4z M163.2,170.1
|
||||
c-0.7-0.5-1.5-0.8-2.4-0.8c-1.1,0-2,0.3-2.7,0.9c-0.6,0.6-1,1.5-1,2.5v2.8l7-0.4v-2.6C164.3,171.5,163.9,170.7,163.2,170.1z"/>
|
||||
</g>
|
||||
<polygon class="st1" points="98.9,32.9 61.4,32.8 98.9,32.9 "/>
|
||||
<polygon class="st1" points="75.7,91.3 90.7,69.8 75.7,91.3 "/>
|
||||
<polygon class="st2" points="167.9,111.6 61.5,111.6 61.4,32.8 98.9,32.9 118.9,4.6 32.7,4.6 33.1,140.8 167.9,140.6 "/>
|
||||
<polygon class="st2" points="102.4,52.9 90.7,69.8 75.7,91.3 167.9,91.2 167.9,4.6 148.2,4.6 114.6,52.8 "/>
|
||||
<polygon class="st4" points="148.2,4.6 148.2,4.6 118.9,4.6 135.9,4.6 "/>
|
||||
<polygon class="st4" points="75.7,91.3 75.7,91.3 90.7,69.8 102.4,52.9 114.6,52.8 148.2,4.6 135.9,4.6 118.9,4.6 98.9,32.9
|
||||
98.9,32.9 61.4,32.8 61.5,111.6 167.9,111.6 167.9,91.2 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,50 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#010202;}
|
||||
.st1{fill:none;}
|
||||
.st2{fill:#B0C5D6;}
|
||||
.st3{fill:#3C89C9;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="Livello_1">
|
||||
</g>
|
||||
<g id="Livello_2">
|
||||
</g>
|
||||
<g id="Livello_3">
|
||||
<g>
|
||||
<path class="st3" d="M33.6,158.2H47v3.6h-9.7v7.9h6.2l-1.1,3.5h-5.2v9.8h9.6v3.3H33.6V158.2z"/>
|
||||
<path class="st3" d="M62,188.5v-3.2c-0.3,0.5-0.8,0.8-1.5,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-2.3,0-4.2-0.6-5.5-1.9
|
||||
c-1.3-1.3-2-3.2-2-5.6v-6c0-2.4,0.7-4.2,2.1-5.5c1.4-1.3,3.2-2,5.5-2c0.9,0,1.7,0.1,2.4,0.4c0.7,0.3,1.2,0.6,1.5,1l0.5-1.1h3.1
|
||||
V189c0,1.8-0.4,3.2-1.3,4.1c-0.9,1-2.3,1.6-4.3,1.7l-0.9-2.9C61.1,191.8,62,190.6,62,188.5z M61,170.5c-0.7-0.7-1.7-1-3-1
|
||||
c-1.2,0-2.1,0.4-2.8,1.1c-0.7,0.7-1,1.7-1,3v5.5c0,1.3,0.3,2.4,0.9,3.2c0.6,0.8,1.6,1.2,2.9,1.2c1.4,0,2.4-0.5,3-1.4
|
||||
c0.7-0.9,1-2.3,1-4.1v-4.5C62,172.1,61.7,171.1,61,170.5z"/>
|
||||
<path class="st3" d="M77.9,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4
|
||||
c0.9-0.4,1.9-0.6,3.1-0.6c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6
|
||||
c2.6,0,4.4,0.4,5.7,1.2c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C81.3,186.7,79.2,186.8,77.9,186.8z M78,174.4
|
||||
c-1-0.3-1.9-0.5-2.8-0.5c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7
|
||||
C79.8,175.1,79,174.8,78,174.4z"/>
|
||||
<path class="st3" d="M88.7,158.2h3.6v28.2h-3.6V158.2z"/>
|
||||
<path class="st3" d="M108.9,173.7l-3.3,12.7h-3.9l-6.3-20.2h4l4.2,14.3l3.7-14.3h3.5l3.7,14.3l4-14.3h3.9l-6.4,20.2h-3.8
|
||||
L108.9,173.7z"/>
|
||||
<path class="st3" d="M131.8,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4
|
||||
c0.9-0.4,1.9-0.6,3.1-0.6c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6
|
||||
c2.6,0,4.4,0.4,5.7,1.2c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C135.1,186.7,133.1,186.8,131.8,186.8z M131.9,174.4
|
||||
c-1-0.3-1.9-0.5-2.8-0.5c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7
|
||||
C133.7,175.1,132.8,174.8,131.9,174.4z"/>
|
||||
<path class="st3" d="M141.9,166.2h3.4l0.2,0.6c1.1-0.6,2.4-0.9,3.8-0.9c1,0,2.1,0.1,3.4,0.4l-0.9,3.5c-0.7-0.3-1.5-0.5-2.3-0.5
|
||||
c-1.1,0-2,0.3-2.8,0.8c-0.8,0.6-1.1,1.3-1.1,2.3v13.9h-3.6V166.2z"/>
|
||||
<path class="st3" d="M163.7,186.4c-1.2,0.3-2.5,0.5-3.7,0.5c-2,0-3.5-0.5-4.7-1.5c-1.2-1-1.7-2.5-1.7-4.4v-8.3
|
||||
c0-2.2,0.7-3.9,2-5.1c1.3-1.2,3.1-1.8,5.3-1.8c2.2,0,3.9,0.6,5.2,1.8c1.2,1.2,1.9,2.9,1.9,5v5.8l-10.7,0.6v1.6
|
||||
c0,0.9,0.3,1.7,0.8,2.2c0.5,0.5,1.3,0.7,2.3,0.7c1.5,0,3.2-0.5,5.2-1.6l1.4,3.1C166,185.6,164.9,186.1,163.7,186.4z M163.2,170.1
|
||||
c-0.7-0.5-1.5-0.8-2.4-0.8c-1.1,0-2,0.3-2.7,0.9c-0.6,0.6-1,1.5-1,2.5v2.8l7-0.4v-2.6C164.3,171.5,163.9,170.7,163.2,170.1z"/>
|
||||
</g>
|
||||
<polygon class="st1" points="98.9,32.9 61.4,32.8 98.9,32.9 "/>
|
||||
<polygon class="st1" points="75.7,91.3 90.7,69.8 75.7,91.3 "/>
|
||||
<polygon class="st3" points="167.9,111.6 61.5,111.6 61.4,32.8 98.9,32.9 118.9,4.6 32.7,4.6 33.1,140.8 167.9,140.6 "/>
|
||||
<polygon class="st3" points="102.4,52.9 90.7,69.8 75.7,91.3 167.9,91.2 167.9,4.6 148.2,4.6 114.6,52.8 "/>
|
||||
<polygon class="st4" points="148.2,4.6 148.2,4.6 118.9,4.6 135.9,4.6 "/>
|
||||
<polygon class="st4" points="75.7,91.3 75.7,91.3 90.7,69.8 102.4,52.9 114.6,52.8 148.2,4.6 135.9,4.6 118.9,4.6 98.9,32.9
|
||||
98.9,32.9 61.4,32.8 61.5,111.6 167.9,111.6 167.9,91.2 "/>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.5 KiB |
@@ -0,0 +1,49 @@
|
||||
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
viewBox="0 0 200 200" style="enable-background:new 0 0 200 200;" xml:space="preserve">
|
||||
<style type="text/css">
|
||||
.st0{fill:#010202;}
|
||||
.st1{fill:none;}
|
||||
.st2{fill:#B0C5D6;}
|
||||
.st3{fill:#3C89C9;}
|
||||
.st4{fill:#FFFFFF;}
|
||||
</style>
|
||||
<g id="Livello_1">
|
||||
</g>
|
||||
<g id="Livello_2">
|
||||
</g>
|
||||
<g id="Livello_3">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M33.6,158.2H47v3.6h-9.7v7.9h6.2l-1.1,3.5h-5.2v9.8h9.6v3.3H33.6V158.2z"/>
|
||||
<path d="M62,188.5v-3.2c-0.3,0.5-0.8,0.8-1.5,1.1c-0.7,0.3-1.5,0.4-2.5,0.4c-2.3,0-4.2-0.6-5.5-1.9c-1.3-1.3-2-3.2-2-5.6v-6
|
||||
c0-2.4,0.7-4.2,2.1-5.5c1.4-1.3,3.2-2,5.5-2c0.9,0,1.7,0.1,2.4,0.4c0.7,0.3,1.2,0.6,1.5,1l0.5-1.1h3.1V189c0,1.8-0.4,3.2-1.3,4.1
|
||||
c-0.9,1-2.3,1.6-4.3,1.7l-0.9-2.9C61.1,191.8,62,190.6,62,188.5z M61,170.5c-0.7-0.7-1.7-1-3-1c-1.2,0-2.1,0.4-2.8,1.1
|
||||
c-0.7,0.7-1,1.7-1,3v5.5c0,1.3,0.3,2.4,0.9,3.2c0.6,0.8,1.6,1.2,2.9,1.2c1.4,0,2.4-0.5,3-1.4c0.7-0.9,1-2.3,1-4.1v-4.5
|
||||
C62,172.1,61.7,171.1,61,170.5z"/>
|
||||
<path d="M77.9,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4c0.9-0.4,1.9-0.6,3.1-0.6
|
||||
c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6c2.6,0,4.4,0.4,5.7,1.2
|
||||
c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C81.3,186.7,79.2,186.8,77.9,186.8z M78,174.4c-1-0.3-1.9-0.5-2.8-0.5
|
||||
c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7C79.8,175.1,79,174.8,78,174.4z"/>
|
||||
<path d="M88.7,158.2h3.6v28.2h-3.6V158.2z"/>
|
||||
<path d="M108.9,173.7l-3.3,12.7h-3.9l-6.3-20.2h4l4.2,14.3l3.7-14.3h3.5l3.7,14.3l4-14.3h3.9l-6.4,20.2h-3.8L108.9,173.7z"/>
|
||||
<path d="M131.8,186.8c-2.8,0-5-0.5-6.7-1.6c-1.7-1-2.5-2.9-2.5-5.7v-3.3c0-2.7,0.9-4.4,2.8-5.4c0.9-0.4,1.9-0.6,3.1-0.6
|
||||
c1.1,0,2.1,0.2,3.2,0.5c1.1,0.3,2,0.7,2.6,1.1c0-1.1-0.4-2-1.3-2.5c-0.9-0.6-2.1-0.8-3.7-0.8l0.3-2.6c2.6,0,4.4,0.4,5.7,1.2
|
||||
c1.2,0.8,2,1.8,2.2,2.9c0.3,1.1,0.4,2.6,0.4,4.4v12C135.1,186.7,133.1,186.8,131.8,186.8z M131.9,174.4c-1-0.3-1.9-0.5-2.8-0.5
|
||||
c-1.9,0-2.8,0.9-2.8,2.7v2.7c0,2.8,1.8,4.1,5.3,4.1c0.9,0,1.8-0.1,2.8-0.2v-7.7C133.7,175.1,132.8,174.8,131.9,174.4z"/>
|
||||
<path d="M141.9,166.2h3.4l0.2,0.6c1.1-0.6,2.4-0.9,3.8-0.9c1,0,2.1,0.1,3.4,0.4l-0.9,3.5c-0.7-0.3-1.5-0.5-2.3-0.5
|
||||
c-1.1,0-2,0.3-2.8,0.8c-0.8,0.6-1.1,1.3-1.1,2.3v13.9h-3.6V166.2z"/>
|
||||
<path d="M163.7,186.4c-1.2,0.3-2.5,0.5-3.7,0.5c-2,0-3.5-0.5-4.7-1.5c-1.2-1-1.7-2.5-1.7-4.4v-8.3c0-2.2,0.7-3.9,2-5.1
|
||||
c1.3-1.2,3.1-1.8,5.3-1.8c2.2,0,3.9,0.6,5.2,1.8c1.2,1.2,1.9,2.9,1.9,5v5.8l-10.7,0.6v1.6c0,0.9,0.3,1.7,0.8,2.2
|
||||
c0.5,0.5,1.3,0.7,2.3,0.7c1.5,0,3.2-0.5,5.2-1.6l1.4,3.1C166,185.6,164.9,186.1,163.7,186.4z M163.2,170.1
|
||||
c-0.7-0.5-1.5-0.8-2.4-0.8c-1.1,0-2,0.3-2.7,0.9c-0.6,0.6-1,1.5-1,2.5v2.8l7-0.4v-2.6C164.3,171.5,163.9,170.7,163.2,170.1z"/>
|
||||
</g>
|
||||
<polygon class="st1" points="98.9,32.9 61.4,32.8 98.9,32.9 "/>
|
||||
<polygon class="st1" points="75.7,91.3 90.7,69.8 75.7,91.3 "/>
|
||||
<polygon class="st0" points="167.9,111.6 61.5,111.6 61.4,32.8 98.9,32.9 118.9,4.6 32.7,4.6 33.1,140.8 167.9,140.6 "/>
|
||||
<polygon class="st0" points="102.4,52.9 90.7,69.8 75.7,91.3 167.9,91.2 167.9,4.6 148.2,4.6 114.6,52.8 "/>
|
||||
<polygon class="st4" points="148.2,4.6 148.2,4.6 118.9,4.6 135.9,4.6 "/>
|
||||
<polygon class="st4" points="75.7,91.3 75.7,91.3 90.7,69.8 102.4,52.9 114.6,52.8 148.2,4.6 135.9,4.6 118.9,4.6 98.9,32.9
|
||||
98.9,32.9 61.4,32.8 61.5,111.6 167.9,111.6 167.9,91.2 "/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 3.4 KiB |
@@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Core
|
||||
{
|
||||
//// <Auto-Generated>
|
||||
//// This is here so CodeMaid doesn't reorganize this document
|
||||
//// </Auto-Generated>
|
||||
public class Constants
|
||||
{
|
||||
// dati conf REDIS Cache
|
||||
public static readonly string BASE_HASH = "WDC";
|
||||
public static readonly string BASE_PATH = Directory.GetCurrentDirectory();
|
||||
|
||||
|
||||
// REDIS KEY Dati correnti x QueueMan
|
||||
public static readonly string LAST_CALC_REQ_KEY = $"{BASE_HASH}:Current:LastCalcReq";
|
||||
public static readonly string LAST_CALC_DONE_KEY = $"{BASE_HASH}:Current:LastCalcDone";
|
||||
public static readonly string LAST_DOOR_REFR_KEY = $"{BASE_HASH}:Current:LastDoorRefr";
|
||||
public static readonly string CALC_REQ_DONE = $"{BASE_HASH}:CalcRequests:Completed";
|
||||
public static readonly string CALC_REQ_ERRS = $"{BASE_HASH}:CalcRequests:Errors";
|
||||
public static readonly string CALC_REQ_PEND = $"{BASE_HASH}:CalcRequests:Pending";
|
||||
public static readonly string CALC_REQ_PROC = $"{BASE_HASH}:CalcRequests:Processing";
|
||||
public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF";
|
||||
public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
|
||||
|
||||
// REDIS Channels messaggi x QueueMan (verso UI/srv)
|
||||
public static readonly string CALC_REQ_QUEUE = $"CalcRequest";
|
||||
public static readonly string CALC_DONE_QUEUE = $"CalcCompleted";
|
||||
|
||||
|
||||
public const string passPhrase = "9eb4660f-8753-46bc-b23b-08759ba03fe9";
|
||||
|
||||
// classi utilità x cache REDIS dati DB
|
||||
public const string redisBaseAddr = "WDC";
|
||||
public const string rKeyConfig = $"{redisBaseAddr}:Cache:Config";
|
||||
public const string rKeyCompany = $"{redisBaseAddr}:Cache:Company";
|
||||
public const string rKeyDoor = $"{redisBaseAddr}:Cache:Door";
|
||||
public const string rKeyDoorOp = $"{redisBaseAddr}:Cache:DoorOp";
|
||||
public const string rKeyDoorOpType = $"{redisBaseAddr}:Cache:DoorOpType";
|
||||
public const string rKeyGraphicParameters = $"{redisBaseAddr}:Cache:GraphicParameters";
|
||||
public const string rKeyListValues = $"{redisBaseAddr}:Cache:ListValues";
|
||||
public const string rKeyDoorLast = $"{redisBaseAddr}:Cache:DoorList";
|
||||
public const string rKeyDoorsByOrder = $"{redisBaseAddr}:Cache:DoorsByOrder";
|
||||
public const string rKeyOrderDetail = $"{redisBaseAddr}:Cache:OrderDetail";
|
||||
public const string rKeyOrderStatus = $"{redisBaseAddr}:Cache:OrderStatus";
|
||||
public const string rKeyRoles = $"{redisBaseAddr}:Cache:Roles";
|
||||
public const string rKeyUsers = $"{redisBaseAddr}:Cache:Users";
|
||||
public const string rKeyUsersView = $"{redisBaseAddr}:Cache:UsersView";
|
||||
public const string rKeyVocLemma = $"{redisBaseAddr}:Cache:VocLemma";
|
||||
public const string rKeyLanguage = $"{redisBaseAddr}:Cache:Languages";
|
||||
}
|
||||
}
|
||||
@@ -4,15 +4,7 @@
|
||||
{
|
||||
#region Public Enums
|
||||
|
||||
public enum OrderStatus
|
||||
{
|
||||
NA = 0,
|
||||
DoorDef,
|
||||
Sent,
|
||||
ApprovedByMaker,
|
||||
ApprovedByCustomer,
|
||||
InProduction
|
||||
}
|
||||
|
||||
|
||||
public enum UserLevel
|
||||
{
|
||||
@@ -28,7 +20,16 @@
|
||||
{
|
||||
Door = 0,
|
||||
Hardware,
|
||||
report
|
||||
Report
|
||||
}
|
||||
|
||||
public enum orderTypeEnum
|
||||
{
|
||||
none = 1,
|
||||
DateAscending,
|
||||
DateDescending,
|
||||
CodeAscending,
|
||||
CodeDescending
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
using Microsoft.Reporting.NETCore;
|
||||
using Microsoft.ReportingServices.ReportProcessing.ReportObjectModel;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Data;
|
||||
using System.IO;
|
||||
using System.Reflection;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
/// <summary>
|
||||
/// Gestione report dotNet core
|
||||
///
|
||||
/// https://github.com/lkosson/reportviewercore/
|
||||
/// </summary>
|
||||
public class Report
|
||||
{
|
||||
/// <summary>
|
||||
/// Effettua setup del Report corrente
|
||||
/// </summary>
|
||||
/// <param name="ReportObj">Oggetto LocalReport da impiegare</param>
|
||||
/// <param name="FileNameRdlc">Nome del Report (file rdlc) da usare</param>
|
||||
/// <param name="RepParams">Parametri opzionali report</param>
|
||||
/// <param name="ReportDatasets">Dizionario dei dataset del report (DsName + DataTable relativa)</param>
|
||||
public static void Load(LocalReport ReportObj, string FileNameRdlc, List<ReportParameter> RepParams, Dictionary<string, DataTable> ReportDatasets)
|
||||
{
|
||||
|
||||
// setup preliminari
|
||||
ReportObj.EnableExternalImages = true;
|
||||
// calcolo path complessivo
|
||||
string reportPath = Path.Combine(AppContext.BaseDirectory, "Reports", FileNameRdlc);
|
||||
/*------------------------------------------------------------------------------------------
|
||||
* NB: SE volessi includere i ReportObj come EMBEDDED potrei usare una versione alternativa,
|
||||
* ad esempio (x ReportObj inclusi in area WebDoorCreator.Core\ReportViewer\Report.rdlc
|
||||
*
|
||||
* using var rs = Assembly.GetExecutingAssembly().GetManifestResourceStream("WebDoorCreator.Core.ReportViewer.Report.rdlc");
|
||||
* ReportObj.LoadReportDefinition(rs);
|
||||
*
|
||||
* oppure con filestream
|
||||
* using (FileStream fs = File.OpenRead(reportPath))
|
||||
* {
|
||||
* ReportObj.LoadReportDefinition(fs);
|
||||
* ....
|
||||
* }
|
||||
*
|
||||
* ------------------------------------------------------------------------------------------*/
|
||||
ReportObj.ReportPath = reportPath;
|
||||
foreach (var item in ReportDatasets)
|
||||
{
|
||||
ReportObj.DataSources.Add(new ReportDataSource(item.Key, item.Value));
|
||||
}
|
||||
ReportObj.SetParameters(RepParams);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Parametri associati al report
|
||||
/// </summary>
|
||||
public class RenderParams
|
||||
{
|
||||
public string FileName { get; set; } = "";
|
||||
public string Extension { get; set; } = "";
|
||||
public string MimeType { get; set; } = "";
|
||||
public string RenderFormat { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Crea setup parametri report dato formato desiderato
|
||||
/// </summary>
|
||||
/// <param name="OutFormat"></param>
|
||||
public RenderParams(string OutFormat)
|
||||
{
|
||||
this.FileName = $"{DateTime.Now:yyyyMMdd_HHmmss}";
|
||||
switch (OutFormat.ToUpper())
|
||||
{
|
||||
case "HTML":
|
||||
this.Extension = "html";
|
||||
this.RenderFormat = "HTML5";
|
||||
this.MimeType = "text/html";
|
||||
break;
|
||||
|
||||
case "DOCX":
|
||||
this.Extension = "docx";
|
||||
this.RenderFormat = "WORDOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
|
||||
break;
|
||||
|
||||
case "XLSX":
|
||||
this.Extension = "xlsx";
|
||||
this.RenderFormat = "EXCELOPENXML";
|
||||
this.MimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
|
||||
break;
|
||||
|
||||
case "PDF":
|
||||
default:
|
||||
this.Extension = "pdf";
|
||||
this.RenderFormat = "PDF";
|
||||
this.MimeType = "application/pdf";
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,447 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Report xmlns="http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition" xmlns:rd="http://schemas.microsoft.com/SQLServer/reporting/reportdesigner">
|
||||
<AutoRefresh>0</AutoRefresh>
|
||||
<DataSources>
|
||||
<DataSource Name="LocalSource">
|
||||
<ConnectionProperties>
|
||||
<DataProvider>System.Data.DataSet</DataProvider>
|
||||
<ConnectString>/* Local Connection */</ConnectString>
|
||||
</ConnectionProperties>
|
||||
<rd:DataSourceID>bd60bef3-b3d9-477e-9052-ab58c6f1ec86</rd:DataSourceID>
|
||||
</DataSource>
|
||||
</DataSources>
|
||||
<DataSets>
|
||||
<DataSet Name="Items">
|
||||
<Query>
|
||||
<DataSourceName>LocalSource</DataSourceName>
|
||||
<CommandText>/* Local Query */</CommandText>
|
||||
</Query>
|
||||
<Fields>
|
||||
<Field Name="Description">
|
||||
<DataField>Description</DataField>
|
||||
<rd:TypeName>System.String</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Price">
|
||||
<DataField>Price</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Qty">
|
||||
<DataField>Qty</DataField>
|
||||
<rd:TypeName>System.Int32</rd:TypeName>
|
||||
</Field>
|
||||
<Field Name="Total">
|
||||
<DataField>Total</DataField>
|
||||
<rd:TypeName>System.Decimal</rd:TypeName>
|
||||
</Field>
|
||||
</Fields>
|
||||
<rd:DataSetInfo>
|
||||
<rd:DataSetName>LocalSource</rd:DataSetName>
|
||||
<rd:TableName>Items</rd:TableName>
|
||||
<rd:ObjectDataSourceType>ReportViewerCore.ReportItem</rd:ObjectDataSourceType>
|
||||
</rd:DataSetInfo>
|
||||
</DataSet>
|
||||
</DataSets>
|
||||
<ReportSections>
|
||||
<ReportSection>
|
||||
<Body>
|
||||
<ReportItems>
|
||||
<Tablix Name="Tablix1">
|
||||
<TablixBody>
|
||||
<TablixColumns>
|
||||
<TablixColumn>
|
||||
<Width>8.31785cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
<TablixColumn>
|
||||
<Width>2.51905cm</Width>
|
||||
</TablixColumn>
|
||||
</TablixColumns>
|
||||
<TablixRows>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox1">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Description</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox1</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox3">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Price</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox3</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox5">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Qty</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox5</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Textbox2">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Total</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox2</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
<TablixRow>
|
||||
<Height>0.67938cm</Height>
|
||||
<TablixCells>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Description">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Description.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Description</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Price">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Price.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Price</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Qty">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Qty.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Qty</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
<TablixCell>
|
||||
<CellContents>
|
||||
<Textbox Name="Total">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Fields!Total.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Right</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Total</rd:DefaultName>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>Solid</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
</TablixRow>
|
||||
</TablixRows>
|
||||
</TablixBody>
|
||||
<TablixColumnHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
<TablixMember />
|
||||
</TablixMembers>
|
||||
</TablixColumnHierarchy>
|
||||
<TablixRowHierarchy>
|
||||
<TablixMembers>
|
||||
<TablixMember>
|
||||
<KeepWithGroup>After</KeepWithGroup>
|
||||
</TablixMember>
|
||||
<TablixMember>
|
||||
<Group Name="Details" />
|
||||
</TablixMember>
|
||||
</TablixMembers>
|
||||
</TablixRowHierarchy>
|
||||
<DataSetName>Items</DataSetName>
|
||||
<Top>2.85433cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.35875cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
</Style>
|
||||
</Tablix>
|
||||
<Textbox Name="Textbox6">
|
||||
<CanGrow>true</CanGrow>
|
||||
<KeepTogether>true</KeepTogether>
|
||||
<Paragraphs>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>=Parameters!Title.Value</Value>
|
||||
<Style>
|
||||
<FontFamily>Cambria</FontFamily>
|
||||
<FontSize>26pt</FontSize>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style>
|
||||
<TextAlign>Center</TextAlign>
|
||||
</Style>
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.26141cm</Top>
|
||||
<Left>0.3175cm</Left>
|
||||
<Height>1.79062cm</Height>
|
||||
<Width>15.875cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
<Style>None</Style>
|
||||
</Border>
|
||||
<PaddingLeft>2pt</PaddingLeft>
|
||||
<PaddingRight>2pt</PaddingRight>
|
||||
<PaddingTop>2pt</PaddingTop>
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
</ReportItems>
|
||||
<Height>2in</Height>
|
||||
<Style />
|
||||
</Body>
|
||||
<Width>6.5in</Width>
|
||||
<Page>
|
||||
<PageHeight>29.7cm</PageHeight>
|
||||
<PageWidth>21cm</PageWidth>
|
||||
<LeftMargin>2cm</LeftMargin>
|
||||
<RightMargin>2cm</RightMargin>
|
||||
<TopMargin>2cm</TopMargin>
|
||||
<BottomMargin>2cm</BottomMargin>
|
||||
<ColumnSpacing>0.13cm</ColumnSpacing>
|
||||
<Style />
|
||||
</Page>
|
||||
</ReportSection>
|
||||
</ReportSections>
|
||||
<ReportParameters>
|
||||
<ReportParameter Name="Title">
|
||||
<DataType>String</DataType>
|
||||
<Nullable>true</Nullable>
|
||||
<AllowBlank>true</AllowBlank>
|
||||
<Prompt>ReportParameter1</Prompt>
|
||||
</ReportParameter>
|
||||
</ReportParameters>
|
||||
<ReportParametersLayout>
|
||||
<GridLayoutDefinition>
|
||||
<NumberOfColumns>4</NumberOfColumns>
|
||||
<NumberOfRows>2</NumberOfRows>
|
||||
<CellDefinitions>
|
||||
<CellDefinition>
|
||||
<ColumnIndex>0</ColumnIndex>
|
||||
<RowIndex>0</RowIndex>
|
||||
<ParameterName>Title</ParameterName>
|
||||
</CellDefinition>
|
||||
</CellDefinitions>
|
||||
</GridLayoutDefinition>
|
||||
</ReportParametersLayout>
|
||||
<rd:ReportUnitType>Cm</rd:ReportUnitType>
|
||||
<rd:ReportID>156b21d2-9542-4902-99ef-7ec823774bb2</rd:ReportID>
|
||||
</Report>
|
||||
@@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
|
||||
namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,27 @@
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Remove="ReportViewer\ReportExtUtils.cs" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="ReportViewer\Report.rdlc" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="EntityFrameworkCore.SqlServer.HierarchyId" Version="3.0.1" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="6.0.14" />
|
||||
<PackageReference Include="NLog" Version="5.1.2" />
|
||||
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Include="ReportViewer\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Builders;
|
||||
using System.Reflection.Emit;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
public class ConfigConfiguration : IEntityTypeConfiguration<ConfigModel>
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public void Configure(EntityTypeBuilder<ConfigModel> builder)
|
||||
{
|
||||
// aggiungo config URL x generazione immagini report
|
||||
builder.HasData(
|
||||
seedConfig("prt_ImageCodeBaseUrl", "https://iis01.egalware.com/WDC/SRV/api/", "https://seriate.egalware.com/WDC/SRV/api/", "URL di base per recupero immagini png"),
|
||||
seedConfig("prt_ReportServerUrl", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "http://w2019-sql-steam/reportserver?/Test/WebDoor/", "URL di base del Report Server")
|
||||
);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected ConfigModel seedConfig(string chaive, string valore, string valoreStd, string note)
|
||||
{
|
||||
var newRec = new ConfigModel()
|
||||
{
|
||||
chiave = chaive,
|
||||
valore = valore,
|
||||
valoreStd = valoreStd,
|
||||
note = note
|
||||
};
|
||||
return newRec;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,5 @@
|
||||
using Microsoft.AspNetCore.DataProtection;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.Data.SqlClient;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using System.Data;
|
||||
@@ -23,6 +21,59 @@ namespace WebDoorCreator.Data.Controllers
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new User
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit or add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> UserAddMod(AspNetUsers addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetUsers
|
||||
.Where(x => x.Id == addEditRec.Id)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Id = addEditRec.Id;
|
||||
currRec.UserName = addEditRec.UserName;
|
||||
currRec.NormalizedUserName = addEditRec.NormalizedUserName;
|
||||
currRec.Email = addEditRec.Email;
|
||||
currRec.EmailConfirmed = addEditRec.EmailConfirmed;
|
||||
currRec.LockoutEnabled = addEditRec.LockoutEnabled;
|
||||
currRec.LockoutEnd = addEditRec.LockoutEnd;
|
||||
currRec.ConcurrencyStamp = addEditRec.ConcurrencyStamp;
|
||||
currRec.SecurityStamp = addEditRec.SecurityStamp;
|
||||
currRec.AccessFailedCount = addEditRec.AccessFailedCount;
|
||||
currRec.PhoneNumberConfirmed = addEditRec.PhoneNumberConfirmed;
|
||||
currRec.PhoneNumber = addEditRec.PhoneNumber;
|
||||
currRec.TwoFactorEnabled = addEditRec.TwoFactorEnabled;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetUsers
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante CompanyAddMod: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new company
|
||||
/// </summary>
|
||||
@@ -138,6 +189,25 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Lista configurazione
|
||||
/// </summary>
|
||||
/// <param name="dtStart"></param>
|
||||
/// <param name="dtEnd"></param>
|
||||
/// <returns></returns>
|
||||
public List<ConfigModel> ConfigGetAll()
|
||||
{
|
||||
List<ConfigModel> dbResult = new List<ConfigModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetConfig
|
||||
.OrderBy(x => x.chiave)
|
||||
.ToList();
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
@@ -218,7 +288,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// <param name="doorId">Record id to edit or add</param>
|
||||
/// <param name="isAdd">States if it has to be added or removing a door</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorModQty(int doorId, bool isAdd)
|
||||
public async Task<bool> DoorModQty(int NewQty, int doorId, bool isAdd)
|
||||
{
|
||||
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
|
||||
bool fatto = false;
|
||||
@@ -233,7 +303,11 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
if (isAdd)
|
||||
if (NewQty > 0)
|
||||
{
|
||||
currRec.Quantity = NewQty;
|
||||
}
|
||||
else if (isAdd)
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity + 1;
|
||||
}
|
||||
@@ -254,6 +328,66 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDelete(DoorOpModel modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == modOpRec.DoorId && x.DoorOpId == modOpRec.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
var recToRem = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Remove(currRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDelete: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp list
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDeleteRange(List<DoorOpModel> listOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOp
|
||||
.RemoveRange(listOpRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDeleteRange: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving current data from door
|
||||
/// </summary>
|
||||
@@ -279,6 +413,36 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving current door operations by id
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DoorOpModel DoorOpGetById(int doorOpId)
|
||||
{
|
||||
DoorOpModel dbResult = new DoorOpModel();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
var temp = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorOpId == doorOpId)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (temp != null)
|
||||
{
|
||||
dbResult = temp;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpGetById:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding door's OP
|
||||
/// </summary>
|
||||
@@ -304,74 +468,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
/// <summary>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Records to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpUpdate(DoorOpModel modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == modOpRec.DoorId && x.DoorOpId == modOpRec.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.JsoncActVal = modOpRec.JsoncActVal;
|
||||
currRec.userConfirm = modOpRec.userConfirm;
|
||||
currRec.DtConfirm = modOpRec.DtConfirm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Record to delete</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpDelete(DoorOpModel modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == modOpRec.DoorId && x.DoorOpId == modOpRec.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
var recToRem = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Remove(currRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpDelete: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new DoorOpType
|
||||
@@ -473,7 +569,45 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by orderId
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
/// <param name="modOpRec">Records to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpUpdate(List<DoorOpModel> modOpRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
foreach (var item in modOpRec)
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOp
|
||||
.Where(x => x.DoorId == item.DoorId && x.DoorOpId == item.DoorOpId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.JsoncActVal = item.JsoncActVal;
|
||||
currRec.JsoncConfigVal = item.JsoncConfigVal;
|
||||
currRec.userConfirm = item.userConfirm;
|
||||
currRec.DtConfirm = item.DtConfirm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by numRec
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel> DoorsGetByOrderId(int orderId)
|
||||
@@ -502,6 +636,36 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door list (last numRec)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel> DoorsGetLast(int numRec)
|
||||
{
|
||||
List<DoorModel> dbResult = new List<DoorModel>();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoor
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderByDescending(x => x.DoorId)
|
||||
.Take(numRec)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorsGetLast:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying or adding a new door
|
||||
/// </summary>
|
||||
@@ -565,6 +729,47 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ListValuesAdd(List<ListValuesTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetValuesTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante ListValuesAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// ListValues list (All)
|
||||
/// </summary>
|
||||
@@ -579,7 +784,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
{
|
||||
if (tableName != "*" && fieldName != "*")
|
||||
{
|
||||
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetValues
|
||||
@@ -612,49 +816,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> ListValuesAdd(List<ListValuesTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetValuesTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante ListValuesAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new order
|
||||
/// </summary>
|
||||
@@ -675,12 +836,37 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderAd: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante OrderAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public OrderModel OrderGetByKey(int orderId)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
if (rawData != null)
|
||||
{
|
||||
dbResult = rawData;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in OrderGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Remove order
|
||||
/// </summary>
|
||||
@@ -746,6 +932,40 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order status
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newStatus"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdate(int orderId, int newStatus)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Status = newStatus;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new graphic param
|
||||
/// </summary>
|
||||
@@ -797,6 +1017,34 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Order Data for report printing
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <returns></returns>
|
||||
public List<PrtRepOrderModel> PreRepOrderGetByKey(int orderId)
|
||||
{
|
||||
List<PrtRepOrderModel> dbResult = new List<PrtRepOrderModel>();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var OrderId = new SqlParameter("@OrderId", orderId);
|
||||
|
||||
dbResult = dbCtx
|
||||
.DbSetPrtRepOrder
|
||||
.FromSqlRaw("exec dbo.stp_prt_OrderReportExpl @OrderId", OrderId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in PreRepOrderGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from roles table
|
||||
/// </summary>
|
||||
@@ -956,6 +1204,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
@@ -0,0 +1,162 @@
|
||||
using Microsoft.EntityFrameworkCore.Metadata.Internal;
|
||||
using Newtonsoft.Json;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
|
||||
namespace WebDoorCreator.Data.DDF
|
||||
{
|
||||
public class Converter
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Init del convertitore secondo impostazioni standard
|
||||
/// </summary>
|
||||
/// <param name="vers"></param>
|
||||
/// <param name="remDoorOp"></param>
|
||||
/// <param name="headRows"></param>
|
||||
/// <param name="footRows"></param>
|
||||
public Converter(string vers, bool remDoorOp, List<string> headRows, List<string> footRows)
|
||||
{
|
||||
FormatVers = vers;
|
||||
RemDoorOp = remDoorOp;
|
||||
HeadRows = headRows;
|
||||
FootRows = footRows;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Fornisce il DDF corrispondente all'elenco OP inviato, seocndo la conf del convertitore
|
||||
/// </summary>
|
||||
/// <param name="listOp"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(List<DoorOpModel> listOp)
|
||||
{
|
||||
string outDdf = "";
|
||||
try
|
||||
{
|
||||
DoorOpsDTO CurrentDoorOp = new DoorOpsDTO();
|
||||
EdgesDto CurrentEdges = new EdgesDto();
|
||||
SizeDto CurrentSize = new SizeDto();
|
||||
SwingDto CurrentSwing = new SwingDto();
|
||||
PropertiesDto CurrentProperties = new PropertiesDto();
|
||||
FinishingDto CurrentFinishing = new FinishingDto();
|
||||
DDFDto CurrentConf = new DDFDto();
|
||||
ListValuesModel CurrentCompoOrder = new ListValuesModel();
|
||||
// per prima cosa popolo gli oggetti di appoggio...
|
||||
dictDoorOP = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
var i = 0;
|
||||
foreach (var item in listOp.Where(x=>x.ObjectId != "Size" && x.ObjectId != "Profiles" && x.ObjectId != "Swing" && x.ObjectId != "Properties" && x.ObjectId != "Finishing"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, string>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
if (dictDoorOP.ContainsKey(item.ObjectId))
|
||||
{
|
||||
var actList = dictDoorOP[item.ObjectId];
|
||||
actList.Add(deserialized.Where(x => x.Key != "Folder").ToDictionary(x => x.Key, x => x.Value));
|
||||
//actList.Add(new Dictionary<string, string>() { ["Separator"] = " "});
|
||||
dictDoorOP[item.ObjectId] = actList;
|
||||
}
|
||||
else
|
||||
{
|
||||
var currList = new List<Dictionary<string, string>>();
|
||||
currList.Add(deserialized.Where(x => x.Key != "Folder").ToDictionary(x => x.Key, x => x.Value));
|
||||
//currList.Add(new Dictionary<string, string>() { ["Separator"] = " " });
|
||||
dictDoorOP.Add(item.ObjectId, currList);
|
||||
var sep = new List<Dictionary<string, string>>();
|
||||
dictDoorOP.Add($"Separator_{i}", sep);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentDoorOp.hardware = dictDoorOP;
|
||||
string doorOpSer = CurrentDoorOp.GetSerialized(RemDoorOp);
|
||||
dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Properties"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
dictBaseDoorOp = deserialized;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentProperties.Properties = dictBaseDoorOp;
|
||||
string WTSer = CurrentProperties.GetSerialized(RemDoorOp);
|
||||
dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Finishing"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
dictBaseDoorOp = deserialized;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentFinishing.finishing = dictBaseDoorOp;
|
||||
string FinishingSer = CurrentFinishing.GetSerialized(RemDoorOp);
|
||||
dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Profiles"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
dictBaseDoorOp = deserialized;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
// ora popolo l'oggetto DTO principale
|
||||
CurrentEdges.profiles = dictBaseDoorOp;
|
||||
string edgesSer = CurrentEdges.GetSerialized(RemDoorOp);
|
||||
dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Size"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
dictBaseDoorOp = deserialized;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentSize.size = dictBaseDoorOp;
|
||||
string sizeSer = CurrentSize.GetSerialized(RemDoorOp);
|
||||
//dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Swing"))
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, Dictionary<string, string>>>(item.JsoncActVal!);
|
||||
if (deserialized != null)
|
||||
{
|
||||
dictBaseSwing = deserialized;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentSwing.swing = dictBaseSwing;
|
||||
string swingSer = CurrentSwing.GetSerialized(RemDoorOp);
|
||||
CurrentConf.version = FormatVers;
|
||||
outDdf = CurrentConf.GetSerialized(HeadRows, FootRows, doorOpSer, edgesSer, sizeSer, swingSer, WTSer, FinishingSer);
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return outDdf;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Properties
|
||||
|
||||
protected Dictionary<string, List<Dictionary<string, string>>> dictDoorOP { get; set; } = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
protected Dictionary<string, Dictionary<string, string>> dictBaseDoorOp { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
protected Dictionary<string, Dictionary<string, string>> dictBaseSwing { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
protected List<string> FootRows { get; set; } = new List<string>();
|
||||
protected string FormatVers { get; set; } = "0";
|
||||
protected List<string> HeadRows { get; set; } = new List<string>();
|
||||
protected List<Dictionary<string, string>> listDictDoorOP { get; set; } = new List<Dictionary<string, string>>();
|
||||
protected bool RemDoorOp { get; set; } = false;
|
||||
|
||||
#endregion Protected Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto contenitore esiti calcolo
|
||||
/// </summary>
|
||||
public class CalcResultDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// UID (DoorId.Version)
|
||||
/// </summary>
|
||||
public string DoorIdVers { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Validated = true / error found = false
|
||||
/// </summary>
|
||||
public bool Validated { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Error message (optional)
|
||||
/// </summary>
|
||||
public string ErrorMsg { get; set; } = "";
|
||||
/// <summary>
|
||||
/// SVG generated
|
||||
/// </summary>
|
||||
public string SvgGen { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Articat path (ex 3d zip/pack)
|
||||
/// </summary>
|
||||
public string artifactPath { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
public class CostingDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Order's UID
|
||||
/// </summary>
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Dictionary of evaluated unit cost for each Door in Order
|
||||
/// </summary>
|
||||
public Dictionary<int, double> DoorUnitCost { get; set; } = new Dictionary<int, double>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// COmpany data DTO
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class CustomerDTO
|
||||
{
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string CompanyExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome / ragione Sociale
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string CompanyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indirizzo
|
||||
/// </summary>
|
||||
[MaxLength(250)]
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CAP
|
||||
/// </summary>
|
||||
public int ZipCode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Citta
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string City { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string State { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// VAT / P.Iva
|
||||
/// </summary>
|
||||
[MaxLength(50)]
|
||||
public string VAT { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,133 @@
|
||||
using System.Text;
|
||||
using WebDoorCreator.Data.DbModels;
|
||||
using YamlDotNet.Serialization;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class DDFDto
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public DDFDto()
|
||||
{ }
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
public string version { get; set; } = "0";
|
||||
public bool produce { get; set; } = true;
|
||||
public string measures { get; set; } = "inches";
|
||||
public string code { get; set; } = "0015943";
|
||||
|
||||
public OrderDto order { get; set; } = new OrderDto();
|
||||
public DateTime date { get; set; } = DateTime.Today.Date;
|
||||
public string piece { get; set; } = "DO_1";
|
||||
|
||||
#endregion Public Properties
|
||||
|
||||
#region Public Methods
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Scrive conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <param name="headRows"></param>
|
||||
/// <param name="footRows"></param>
|
||||
/// <param name="serialDoorOps"></param>
|
||||
/// <param name="serialEdges"></param>
|
||||
/// <param name="serialSize"></param>
|
||||
/// <param name="serialSwing"></param>
|
||||
/// <param name="serialProperties"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(List<string> headRows, List<string> footRows, string serialDoorOps, string serialEdges, string serialSize, string serialSwing, string serialProperties, string serialFinishing)
|
||||
{
|
||||
string fullData = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
try
|
||||
{
|
||||
// header!
|
||||
if (headRows != null && headRows.Count > 0)
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
foreach (var row in headRows)
|
||||
{
|
||||
sb.AppendLine(row);
|
||||
}
|
||||
fullData = sb.ToString();
|
||||
}
|
||||
|
||||
// obj principale
|
||||
var currYaml = GetObjYaml();
|
||||
fullData += currYaml;
|
||||
|
||||
#if false
|
||||
|
||||
// aggiungo la parte woodType come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialProperties))
|
||||
{
|
||||
fullData += serialProperties;
|
||||
}
|
||||
// aggiungo la parte finishing come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialFinishing))
|
||||
{
|
||||
fullData += serialFinishing;
|
||||
}
|
||||
#endif
|
||||
|
||||
// aggiungo la parte size come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialSize))
|
||||
{
|
||||
fullData += serialSize;
|
||||
}
|
||||
|
||||
// aggiungo la parte swing come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialSwing))
|
||||
{
|
||||
fullData += serialSwing;
|
||||
}
|
||||
|
||||
// aggiungo la parte profiles come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialEdges))
|
||||
{
|
||||
fullData += serialEdges;
|
||||
}
|
||||
|
||||
// aggiungo la parte doorOp come yaml reale/striped...
|
||||
if (!string.IsNullOrEmpty(serialDoorOps))
|
||||
{
|
||||
fullData += serialDoorOps;
|
||||
}
|
||||
|
||||
// footer!
|
||||
if (footRows != null && footRows.Count > 0)
|
||||
{
|
||||
sb = new StringBuilder();
|
||||
foreach (var row in footRows)
|
||||
{
|
||||
sb.AppendLine(row);
|
||||
}
|
||||
fullData += sb.ToString();
|
||||
}
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
return fullData;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialized door data for cost evaluation
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class DoorCostingDTO
|
||||
{
|
||||
public int DoorId { get; set; } = 0;
|
||||
|
||||
public double SizeX { get; set; } = 0;
|
||||
public double SizeY { get; set; } = 0;
|
||||
public double SizeZ { get; set; } = 0;
|
||||
|
||||
public double EstimatedWorkTime { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, double> BOMList { get; set; }= new Dictionary<string, double>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
|
||||
[Serializable]
|
||||
public class DoorOpsDTO
|
||||
{
|
||||
public Dictionary<string, List<Dictionary<string, string>>> hardware { get; set; } = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item.Length > 2 && !item.Contains("Separator"))
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
if (item.Contains("Separator"))
|
||||
{
|
||||
//sb.Remove(item);
|
||||
sb.AppendLine(" ");
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class EdgesDto
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> profiles { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item.Length > 2 && !item.Contains("Separator"))
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
if (item.Contains("Separator"))
|
||||
{
|
||||
//sb.Remove(item);
|
||||
sb.AppendLine(" ");
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class FinishingDto
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> finishing { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item != "")
|
||||
{
|
||||
if (item.Split(":")[1] != "")
|
||||
{
|
||||
if (item.StartsWith(" "))
|
||||
{
|
||||
sb.AppendLine($"{char.ToLower(item.Substring(4)[0])}{item.Substring(5)}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
//public static string? FirstCharToLowerCase(this string? str)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(str) && char.IsUpper(str[0]))
|
||||
// return str.Length == 1 ? char.ToLower(str[0]).ToString() : char.ToLower(str[0]) + str[1..];
|
||||
|
||||
// return str;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,40 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Serialized order data
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class OrderDetailsDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Order UID (DB)
|
||||
/// </summary>
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Customer Info
|
||||
/// </summary>
|
||||
public CustomerDTO CustomerInfo { get; set; } = new CustomerDTO();
|
||||
|
||||
/// <summary>
|
||||
/// Order reference / Ext code
|
||||
/// </summary>
|
||||
public string OrderExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Order description
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Door list for current order
|
||||
/// </summary>
|
||||
public List<DoorCostingDTO> DoorsList { get; set; } = new List<DoorCostingDTO>();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
public class OrderDto
|
||||
{
|
||||
public string customer { get; set; } = null!;
|
||||
public string elevation { get; set; } = null!;
|
||||
public string project { get; set; } = null!;
|
||||
public string PO { get; set; } = null!;
|
||||
public string Line { get; set; } = null!;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class SizeDto
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> size { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item.Length > 2 && !item.Contains("Size") && !item.Contains("Properties"))
|
||||
{
|
||||
if (item.StartsWith(" "))
|
||||
{
|
||||
//sb.AppendLine(item.Substring(2));
|
||||
sb.AppendLine($" {char.ToLower(item.Substring(4)[0])}{item.Substring(5)}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class SwingDto
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> swing { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
public string secure { get; set; } = "UP";
|
||||
public string material { get; set; } = "wood";
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item != "")
|
||||
{
|
||||
if (item.Split(":")[1] != "")
|
||||
{
|
||||
if (item.StartsWith(" "))
|
||||
{
|
||||
sb.AppendLine($"{char.ToLower(item.Substring(4)[0])}{item.Substring(5)}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
//public static string? FirstCharToLowerCase(this string? str)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(str) && char.IsUpper(str[0]))
|
||||
// return str.Length == 1 ? char.ToLower(str[0]).ToString() : char.ToLower(str[0]) + str[1..];
|
||||
|
||||
// return str;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,79 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using YamlDotNet.Serialization.NamingConventions;
|
||||
using YamlDotNet.Serialization;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
[Serializable]
|
||||
public class PropertiesDto
|
||||
{
|
||||
public Dictionary<string, Dictionary<string, string>> Properties { get; set; } = new Dictionary<string, Dictionary<string, string>>();
|
||||
|
||||
/// <summary>
|
||||
/// Recupera oggetto serializzato YAML oppure "semplificato"
|
||||
/// </summary>
|
||||
/// <param name="removeDoorOps"></param>
|
||||
/// <returns></returns>
|
||||
public string GetSerialized(bool removeDoorOps)
|
||||
{
|
||||
string answ = "";
|
||||
StringBuilder sb = new StringBuilder();
|
||||
List<string> outLines = new List<string>();
|
||||
string rawData = GetObjYaml();
|
||||
if (removeDoorOps)
|
||||
{
|
||||
var lines = rawData.Split(Environment.NewLine);
|
||||
foreach (var item in lines)
|
||||
{
|
||||
if (item != "")
|
||||
{
|
||||
if (item.Split(":")[1] != "")
|
||||
{
|
||||
if (item.StartsWith(" "))
|
||||
{
|
||||
sb.AppendLine($"{char.ToLower(item.Substring(4)[0])}{item.Substring(5)}");
|
||||
}
|
||||
else
|
||||
{
|
||||
sb.AppendLine(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
answ = sb.ToString();
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = rawData;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
//public static string? FirstCharToLowerCase(this string? str)
|
||||
//{
|
||||
// if (!string.IsNullOrEmpty(str) && char.IsUpper(str[0]))
|
||||
// return str.Length == 1 ? char.ToLower(str[0]).ToString() : char.ToLower(str[0]) + str[1..];
|
||||
|
||||
// return str;
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// Restituisce conf serializzata in formato YAML
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public string GetObjYaml()
|
||||
{
|
||||
var serializer = new SerializerBuilder()
|
||||
.WithNamingConvention(CamelCaseNamingConvention.Instance)
|
||||
.WithIndentedSequences()
|
||||
.Build();
|
||||
var rawdata = serializer.Serialize(this);
|
||||
return rawdata;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("Config")]
|
||||
public partial class ConfigModel
|
||||
{
|
||||
[Key]
|
||||
public string chiave { get; set; } = null!;
|
||||
public string valore { get; set; } = "";
|
||||
public string valoreStd { get; set; } = "";
|
||||
public string note { get; set; } = "";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -5,6 +5,8 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
@@ -91,5 +93,28 @@ namespace WebDoorCreator.Data.DbModels
|
||||
|
||||
[ForeignKey("TypeId")]
|
||||
public virtual DoorTypeModel? TypeNav { get; set; }
|
||||
|
||||
|
||||
public DoorModel ObjClone(string userId)
|
||||
{
|
||||
DateTime adesso = DateTime.Now;
|
||||
DoorModel answ = new DoorModel()
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
TypeId = TypeId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
UserIdIns = userId,
|
||||
DateMod = adesso,
|
||||
UserIdMod = userId,
|
||||
DoorDescript = DoorDescript,
|
||||
Quantity = Quantity,
|
||||
UnitCost = UnitCost,
|
||||
DateLockExpiry = DateLockExpiry,
|
||||
UserIdLock = UserIdLock
|
||||
};
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
@@ -81,5 +82,121 @@ namespace WebDoorCreator.Data.DbModels
|
||||
|
||||
//[ForeignKey("DoorOpTypId")]
|
||||
//public virtual DoorOpTypeModel? DoorOpTypeNav { get; set; }
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public Dictionary<string, string> CurrVals
|
||||
{
|
||||
get
|
||||
{
|
||||
Dictionary<string, string> answ = new Dictionary<string, string>();
|
||||
if (!string.IsNullOrEmpty(JsoncActVal))
|
||||
{
|
||||
try
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, string>>(JsoncActVal);
|
||||
answ = deserialized ?? new Dictionary<string, string>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
JsoncActVal = JsonConvert.SerializeObject(value);
|
||||
}
|
||||
}
|
||||
[NotMapped]
|
||||
public Dictionary<string, List<string>> GraphicParams
|
||||
{
|
||||
get
|
||||
{
|
||||
Dictionary<string, List<string>> answ = new Dictionary<string, List<string>>();
|
||||
if (!string.IsNullOrEmpty(JsoncConfigVal))
|
||||
{
|
||||
try
|
||||
{
|
||||
var deserialized = JsonConvert.DeserializeObject<Dictionary<string, List<string>>>(JsoncConfigVal);
|
||||
answ = deserialized ?? new Dictionary<string, List<string>>();
|
||||
}
|
||||
catch
|
||||
{ }
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
set
|
||||
{
|
||||
JsoncConfigVal = JsonConvert.SerializeObject(value);
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// COmparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// </summary>
|
||||
/// <param name="newDict">Dizionario x comparazione</param>
|
||||
/// <returns></returns>
|
||||
public bool JsoncActValEquals(Dictionary<string, string> newDict)
|
||||
{
|
||||
string JsonNewVal = JsonConvert.SerializeObject(newDict);
|
||||
bool answ = JsoncActVal.Equals(JsonNewVal);
|
||||
return answ;
|
||||
}
|
||||
/// <summary>
|
||||
/// Comparazione tra il dizionario configurazioni corrente e quello ricevuto
|
||||
/// </summary>
|
||||
/// <param name="newDict">Dizionario x comparazione</param>
|
||||
/// <returns></returns>
|
||||
public bool JsoncConfigValEquals(Dictionary<string, List<string>> newDict)
|
||||
{
|
||||
string JsonNewVal = JsonConvert.SerializeObject(newDict);
|
||||
bool answ = JsoncConfigVal.Equals(JsonNewVal);
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Clone oggetto
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <returns></returns>
|
||||
public DoorOpModel ObjClone(string userId, int doorId)
|
||||
{
|
||||
DoorOpModel answ = new DoorOpModel();
|
||||
DateTime adesso = DateTime.Now;
|
||||
if (doorId == 0)
|
||||
{
|
||||
answ = new DoorOpModel()
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = DoorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
JsoncActVal = JsoncActVal,
|
||||
userConfirm = userConfirm,
|
||||
DtConfirm = DtConfirm
|
||||
};
|
||||
}
|
||||
else
|
||||
{
|
||||
answ = new DoorOpModel()
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = doorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
JsoncActVal = JsoncActVal,
|
||||
userConfirm = userConfirm,
|
||||
DtConfirm = DtConfirm
|
||||
};
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,14 +72,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
|
||||
#if false
|
||||
|
||||
/// <summary>
|
||||
/// Codice tipo treeView
|
||||
/// </summary>
|
||||
public string TreeCode { get; set; } = "";
|
||||
#endif
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
@@ -129,10 +121,5 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
public int MaxAllowed { get; set; } = 1;
|
||||
|
||||
#if false
|
||||
[ForeignKey("ParentDoorOpId")]
|
||||
public virtual DoorOpModel? ParentNav { get; set; }
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,14 +3,15 @@ using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
public class Edges
|
||||
{
|
||||
public string lockEdge { get; set; } = "BV";
|
||||
public string hingeEdge { get; set; } = "BV";
|
||||
public string topEdge { get; set; } = "SQ";
|
||||
public string bottomEdge { get; set; } = "SQ";
|
||||
public EdgesDto lockedge { get; set; } = new EdgesDto();
|
||||
public EdgesDto hingeedge { get; set; } = new EdgesDto();
|
||||
public EdgesDto top { get; set; } = new EdgesDto();
|
||||
public EdgesDto bottom { get; set; } = new EdgesDto();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,33 +12,18 @@ namespace WebDoorCreator.Data.DbModels
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("ListValues")]
|
||||
public partial class ListValuesModel
|
||||
[Table("SerializedDoors")]
|
||||
public partial class SerializedDoorsModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TableName { get; set; }
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorTmpId { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
public string DoorSerVal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string InputType{ get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string DefaultVal { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public bool isSerializable { get; set; }
|
||||
public bool Lock { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
public OrderStatus Status { get; set; } = OrderStatus.NA;
|
||||
public int Status { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
|
||||
@@ -0,0 +1,143 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
public class PrtRepOrderModel
|
||||
{
|
||||
public int OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Company cui è associato l'ordine
|
||||
/// </summary>
|
||||
public int CompanyId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string OrderExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data inserimento ordine
|
||||
/// </summary>
|
||||
public DateTime DateIns { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdIns { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data (ultima) modifica ordine
|
||||
/// </summary>
|
||||
public DateTime DateMod { get; set; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
/// Codice utente che ha creato
|
||||
/// </summary>
|
||||
public string UserIdMod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
public int Status { get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string CompanyExtCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Nome / ragione Sociale
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// indirizzo
|
||||
/// </summary>
|
||||
public string Address { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// CAP
|
||||
/// </summary>
|
||||
public int ZipCode { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Citta
|
||||
/// </summary>
|
||||
public string City { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Stato
|
||||
/// </summary>
|
||||
public string State { get; set; } = "";
|
||||
/// <summary>
|
||||
/// VAT / P.Iva
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
public string DoorExtCode { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string DoorDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantity Ordered
|
||||
/// </summary>
|
||||
public int Quantity { get; set; } = 1;
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Unità di misura
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Tipo DoorOP
|
||||
/// </summary>
|
||||
public string ObjectType { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Chiave DoorOP
|
||||
/// </summary>
|
||||
public string ObjectKey { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Valore DoorOp
|
||||
/// </summary>
|
||||
public string ObjectVal { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Quantità DoorOp
|
||||
/// </summary>
|
||||
public int ObjectQty { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
#nullable disable
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("ListValues")]
|
||||
public partial class ListValuesModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[MaxLength(50)]
|
||||
public string TableName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
public string InputType{ get; set; }
|
||||
|
||||
[MaxLength(100)]
|
||||
public string DefaultVal { get; set; }
|
||||
|
||||
[MaxLength(5)]
|
||||
public bool isSerializable { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -34,20 +34,22 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// RoleId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public string RoleId { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Name from AspNetRole table
|
||||
/// </summary>
|
||||
public string RoleName { get; set; } = "";
|
||||
#if false
|
||||
|
||||
/// <summary>
|
||||
/// ClaimType from AspNetUserClaims table
|
||||
/// ClaimId from AspNetUserRoles table
|
||||
/// </summary>
|
||||
public int ClaimId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// ClaimType from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimType { get; set; } = "";
|
||||
/// <summary>
|
||||
/// ClaimValue from AspNetUserClaims table
|
||||
/// ClaimValue from AspNetRole table
|
||||
/// </summary>
|
||||
public string ClaimValue { get; set; } = "";
|
||||
#endif
|
||||
public string ClaimValue { get; set; } = "";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,147 @@
|
||||
using NLog;
|
||||
using StackExchange.Redis;
|
||||
using System.Diagnostics;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
public class MessagePipe
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
|
||||
{
|
||||
_channel = channelName;
|
||||
redis = redisConn;
|
||||
redisDb = redis.GetDatabase();
|
||||
this.enableLog = enableLog;
|
||||
// aggiungo sottoscrittore
|
||||
setupSubscriber();
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Events
|
||||
|
||||
public event EventHandler EA_NewMessage = delegate { };
|
||||
|
||||
#endregion Public Events
|
||||
|
||||
#region Public Methods
|
||||
|
||||
public bool saveAndSendMessage(string memKey, string message)
|
||||
{
|
||||
bool answ = false;
|
||||
Stopwatch stopWatch = new Stopwatch();
|
||||
stopWatch.Start();
|
||||
|
||||
// invio notifica tramite il canale richiesto
|
||||
answ = sendMessage(message);
|
||||
if (redisDb != null)
|
||||
{
|
||||
redisDb.StringSetAsync(memKey, message);
|
||||
}
|
||||
stopWatch.Stop();
|
||||
TimeSpan ts = stopWatch.Elapsed;
|
||||
if (numSent.ContainsKey(memKey))
|
||||
{
|
||||
numSent[memKey]++;
|
||||
}
|
||||
else
|
||||
{
|
||||
numSent.Add(memKey, 1);
|
||||
}
|
||||
if (enableLog || numSent[memKey] > 30)
|
||||
{
|
||||
Log.Info($"saveAndSendMessage| mKey {memKey} x {numSent[memKey]} | {message.Length} size | {ts.TotalMilliseconds} ms");
|
||||
|
||||
numSent[memKey] = 0;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Invio messaggio sul canale
|
||||
/// </summary>
|
||||
/// <param name="newMess"></param>
|
||||
/// <returns></returns>
|
||||
public bool sendMessage(string newMess)
|
||||
{
|
||||
bool answ = false;
|
||||
ISubscriber sub = redis.GetSubscriber();
|
||||
sub.Publish(_channel, newMess);
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Protected Fields
|
||||
|
||||
protected static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Protected Fields
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private bool enableLog = false;
|
||||
private Dictionary<string, int> numSent = new Dictionary<string, int>();
|
||||
private IConnectionMultiplexer redis;
|
||||
private IDatabase? redisDb;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
/// <summary>
|
||||
/// Canale associato al gestore pipeline messaggi
|
||||
/// </summary>
|
||||
private string _channel { get; set; } = "";
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private void setupSubscriber()
|
||||
{
|
||||
ISubscriber sub = redis.GetSubscriber();
|
||||
//Subscribe to the channel named messages
|
||||
sub.Subscribe(_channel, (channel, message) =>
|
||||
{
|
||||
Log.Trace($"ch {channel} | {message}");
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
if (EA_NewMessage != null)
|
||||
{
|
||||
EA_NewMessage(this, mea);
|
||||
}
|
||||
});
|
||||
Log.Info($"Subscribed {_channel}");
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
/// <summary>
|
||||
/// Invio messaggio sul canale + salvataggio in cache REDIS
|
||||
/// </summary>
|
||||
/// <param name="memKey">Chiave REDIS x salvare valore</param>
|
||||
/// <param name="message"></param>
|
||||
}
|
||||
|
||||
public class PubSubEventArgs : EventArgs
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public PubSubEventArgs(string messaggio)
|
||||
{
|
||||
this.newMessage = messaggio;
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
|
||||
#region Public Properties
|
||||
|
||||
public string newMessage { get; set; } = "";
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,869 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230414135021_AddSerializedDoorsModel")]
|
||||
partial class AddSerializedDoorsModel
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class AddSerializedDoorsModel : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "SerializedDoors",
|
||||
columns: table => new
|
||||
{
|
||||
DoorTmpId = table.Column<int>(type: "int", nullable: false)
|
||||
.Annotation("SqlServer:Identity", "1, 1"),
|
||||
DoorSerVal = table.Column<string>(type: "nvarchar(max)", nullable: true),
|
||||
Lock = table.Column<bool>(type: "bit", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_SerializedDoors", x => x.DoorTmpId);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "SerializedDoors");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,869 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230502100541_orderStatusTypeChange")]
|
||||
partial class orderStatusTypeChange
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class orderStatusTypeChange : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,891 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230523081025_ConfigTable")]
|
||||
partial class ConfigTable
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class ConfigTable : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "Config",
|
||||
columns: table => new
|
||||
{
|
||||
chiave = table.Column<string>(type: "nvarchar(450)", nullable: false),
|
||||
valore = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
valoreStd = table.Column<string>(type: "nvarchar(max)", nullable: false),
|
||||
note = table.Column<string>(type: "nvarchar(max)", nullable: false)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_Config", x => x.chiave);
|
||||
});
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "Config");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,890 @@
|
||||
// <auto-generated />
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Infrastructure;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.EntityFrameworkCore.Storage.ValueConversion;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
[DbContext(typeof(WDCDataContext))]
|
||||
[Migration("20230526063309_tryFixSqlErr")]
|
||||
partial class tryFixSqlErr
|
||||
{
|
||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||
{
|
||||
#pragma warning disable 612, 618
|
||||
modelBuilder
|
||||
.UseCollation("Latin1_General_CI_AS")
|
||||
.HasAnnotation("ProductVersion", "6.0.14")
|
||||
.HasAnnotation("Relational:MaxIdentifierLength", 128);
|
||||
|
||||
SqlServerModelBuilderExtensions.UseIdentityColumns(modelBuilder, 1L, 1);
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetRoles", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Name")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.HasIndex("RoleId");
|
||||
|
||||
b.ToTable("AspNetUserRoles", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUsers", b =>
|
||||
{
|
||||
b.Property<string>("Id")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<int>("AccessFailedCount")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ConcurrencyStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("EmailConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("LockoutEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTimeOffset?>("LockoutEnd")
|
||||
.HasColumnType("datetimeoffset");
|
||||
|
||||
b.Property<string>("NormalizedEmail")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("NormalizedUserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PasswordHash")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("PhoneNumber")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("PhoneNumberConfirmed")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("SecurityStamp")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("TwoFactorEnabled")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("Id");
|
||||
|
||||
b.ToTable("AspNetUsers", null, t => t.ExcludeFromMigrations());
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.CompanyModel", b =>
|
||||
{
|
||||
b.Property<int>("CompanyId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("CompanyId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasMaxLength(250)
|
||||
.HasColumnType("nvarchar(250)");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("CompanyToken")
|
||||
.IsRequired()
|
||||
.HasMaxLength(150)
|
||||
.HasColumnType("nvarchar(150)");
|
||||
|
||||
b.Property<string>("PrivateNote")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("CompanyId");
|
||||
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateLockExpiry")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("DoorDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DoorExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("MeasureUnit")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TypeId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("UnitCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdLock")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorId");
|
||||
|
||||
b.HasIndex("OrderId");
|
||||
|
||||
b.HasIndex("TypeId");
|
||||
|
||||
b.ToTable("Door");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpId"), 1L, 1);
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime?>("DtConfirm")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("JsoncActVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("JsoncConfigVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectId")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("userConfirm")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("DoorOpId");
|
||||
|
||||
b.HasIndex("DoorId");
|
||||
|
||||
b.ToTable("DoorOp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorOpTypId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorOpTypId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("DisplayUrl")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ExtOpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("FPath")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("HasHw")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("HwCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("HwDescription")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("IsConcrete")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<bool>("IsDefault")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<string>("JsoncConfig")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("MaxAllowed")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OpCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ParentDoorOpId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("Rev")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("ValidFrom")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("ValidUntil")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.HasKey("DoorOpTypId");
|
||||
|
||||
b.ToTable("DoorOpType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorTypeModel", b =>
|
||||
{
|
||||
b.Property<int>("TypeId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("TypeId"), 1L, 1);
|
||||
|
||||
b.Property<string>("Description")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("TypeCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("TypeId");
|
||||
|
||||
b.ToTable("DoorType");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.GraphicParamsModel", b =>
|
||||
{
|
||||
b.Property<int>("GraphicParamId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("GraphicParamId"), 1L, 1);
|
||||
|
||||
b.Property<int>("compoId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("graphicParamAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamDefaultVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamKey")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("graphicParamsN")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("GraphicParamId");
|
||||
|
||||
b.ToTable("GraphicParams");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.HardwareModel", b =>
|
||||
{
|
||||
b.Property<int>("HardwareId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("HardwareId"), 1L, 1);
|
||||
|
||||
b.Property<string>("compoAlias")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoLayerName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("compoName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("compoTemplateIsActive")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("HardwareId");
|
||||
|
||||
b.ToTable("Hardware");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.LanguageModel", b =>
|
||||
{
|
||||
b.Property<string>("CodLingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("DescrizioneLingua")
|
||||
.IsRequired()
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.HasKey("CodLingua");
|
||||
|
||||
b.ToTable("Languages");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
CodLingua = "EN",
|
||||
DescrizioneLingua = "English"
|
||||
},
|
||||
new
|
||||
{
|
||||
CodLingua = "IT",
|
||||
DescrizioneLingua = "Italiano"
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValues");
|
||||
|
||||
b.HasData(
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LH",
|
||||
Label = "Left Handed",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RH",
|
||||
Label = "Right Handed",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "LHR",
|
||||
Label = "Left Handed Reverse",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Opening",
|
||||
FieldName = "Swing",
|
||||
Value = "RHR",
|
||||
Label = "Right Handed Reverse",
|
||||
Ordinal = 4,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "BV",
|
||||
Label = "Bevel",
|
||||
Ordinal = 1,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "SQ",
|
||||
Label = "Squared",
|
||||
Ordinal = 2,
|
||||
isSerializable = false
|
||||
},
|
||||
new
|
||||
{
|
||||
TableName = "Edges",
|
||||
FieldName = "EdgeType",
|
||||
Value = "1B",
|
||||
Label = "Bull Nose 1",
|
||||
Ordinal = 3,
|
||||
isSerializable = false
|
||||
});
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ListValuesTempModel", b =>
|
||||
{
|
||||
b.Property<string>("TableName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("FieldName")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Value")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("DefaultVal")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("InputType")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Label")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<int>("Ordinal")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("isSerializable")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("TableName", "FieldName", "Value");
|
||||
|
||||
b.ToTable("ListValuesTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DateMod")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.HasIndex("CompanyId");
|
||||
|
||||
b.ToTable("Order");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderStatusViewModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("OrderId"), 1L, 1);
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("NumDoors")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("NumType")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("OrderStatus")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<decimal>("TotCost")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<string>("UserIdIns")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("OrderId");
|
||||
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("RoleId")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Email")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("RoleName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||
b.ToView("UsersViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("Vocabulary");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.VocabularyTempModel", b =>
|
||||
{
|
||||
b.Property<string>("Lingua")
|
||||
.HasMaxLength(5)
|
||||
.HasColumnType("nvarchar(5)");
|
||||
|
||||
b.Property<string>("Lemma")
|
||||
.HasMaxLength(50)
|
||||
.HasColumnType("nvarchar(50)");
|
||||
|
||||
b.Property<string>("Traduzione")
|
||||
.IsRequired()
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.HasKey("Lingua", "Lemma");
|
||||
|
||||
b.ToTable("VocabularyTemp");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.AspNetUserRoles", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetRoles", "RolesNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("RoleId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.AspNetUsers", "UsersNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("UserId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("RolesNav");
|
||||
|
||||
b.Navigation("UsersNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.OrderModel", "OrderNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("OrderId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorTypeModel", "TypeNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("TypeId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("OrderNav");
|
||||
|
||||
b.Navigation("TypeNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorOpModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.DoorModel", "DoorNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("DoorId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("DoorNav");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.OrderModel", b =>
|
||||
{
|
||||
b.HasOne("WebDoorCreator.Data.DbModels.CompanyModel", "CompanyNav")
|
||||
.WithMany()
|
||||
.HasForeignKey("CompanyId")
|
||||
.OnDelete(DeleteBehavior.Cascade)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("CompanyNav");
|
||||
});
|
||||
#pragma warning restore 612, 618
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class tryFixSqlErr : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -177,6 +177,28 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.ToTable("Company");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.ConfigModel", b =>
|
||||
{
|
||||
b.Property<string>("chiave")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("note")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valore")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("valoreStd")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("chiave");
|
||||
|
||||
b.ToTable("Config");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.DoorModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorId")
|
||||
@@ -718,6 +740,25 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
b.ToView("OrderStatusViewModel");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.SerializedDoorsModel", b =>
|
||||
{
|
||||
b.Property<int>("DoorTmpId")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("int");
|
||||
|
||||
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<int>("DoorTmpId"), 1L, 1);
|
||||
|
||||
b.Property<string>("DoorSerVal")
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<bool>("Lock")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.HasKey("DoorTmpId");
|
||||
|
||||
b.ToTable("SerializedDoors");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.UsersViewModel", b =>
|
||||
{
|
||||
b.Property<string>("UserId")
|
||||
@@ -735,7 +776,6 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("UserName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.HasKey("UserId", "RoleId");
|
||||
|
||||