Compare commits
499 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 2cae5693e7 | |||
| ea1e37055b | |||
| 221f7c03fd | |||
| 885b4b78b2 | |||
| 37986b0bcb | |||
| 670b71841d | |||
| 225ee35143 | |||
| 93906b747e | |||
| 4cde37cd5f | |||
| 1ed9ab4af9 | |||
| f612613977 | |||
| 96366e26e7 | |||
| 2ac91927dc | |||
| 6400e37944 | |||
| 1d9f550a02 | |||
| db7d0466f2 | |||
| 3fd9ef8383 | |||
| 795b60ee86 | |||
| f7182715e5 | |||
| 7547cc7035 | |||
| 99ee856340 | |||
| b02b9ccbf7 | |||
| 71e5fa0674 | |||
| ad772b8160 | |||
| 8737eefd31 | |||
| 9d0c29358d | |||
| 49f6114b67 | |||
| b723109f4e | |||
| 852d17ed0e | |||
| 4329ab8552 | |||
| ecb40ab66f | |||
| 1d82e2ba05 | |||
| e1dc3215a1 | |||
| e7665ff1e0 | |||
| e1addcf11b | |||
| 85259f334c | |||
| 7bda460b7b | |||
| 56aea1cc2c | |||
| 716cdc4a61 | |||
| 69c02fdb8a | |||
| 613339b662 | |||
| 4f4a0ec2b4 | |||
| f273aaaf5a | |||
| a0bbf356a9 | |||
| facd44c6f5 | |||
| e534651bf3 | |||
| 74b08ceefc | |||
| e798a764de | |||
| 30529d0825 | |||
| 7bebc6e8ea | |||
| 6b82975b9d | |||
| f5298172e6 | |||
| 2a9a1f4882 | |||
| 6f513809de | |||
| 9ef952de54 | |||
| 67b8464c5f | |||
| fbdddc0eee | |||
| 88b4e8686d | |||
| cedbd9931e | |||
| 43187d8d29 | |||
| d0f8a94d36 | |||
| fd91e8fe19 | |||
| df73a17126 | |||
| a38b0aa9cb | |||
| 316c028c86 | |||
| dcb51b7763 | |||
| aeb52a3576 | |||
| 452e316851 | |||
| a45a7390c3 | |||
| c020e5fff3 | |||
| 366ed08fb4 | |||
| 9465c859f9 | |||
| f4b6112a77 | |||
| 474f480198 | |||
| 931abece6f | |||
| 5b5d04cd5f | |||
| c202b7d387 | |||
| 69179e4af0 | |||
| 7b28b543e8 | |||
| 71f1cb1246 | |||
| 01a50dbfec | |||
| bff4251fbe | |||
| 7b6443e4d4 | |||
| ce122ba296 | |||
| 101429cf11 | |||
| 7cad7d00e7 | |||
| ba447558d4 | |||
| 337a4252f9 | |||
| c8098edb97 | |||
| cc9a1a8342 | |||
| d860bbbed5 | |||
| a5b134e32b | |||
| da742620b0 | |||
| 7bc955365f | |||
| 706a9bce17 | |||
| ab5757d0bd | |||
| 2fa5a0df16 | |||
| cba8ceb688 | |||
| 7b007f6ca5 | |||
| a67691278b | |||
| 7d3e1533fd | |||
| 084973df66 | |||
| 179565d47d | |||
| c35eb00002 | |||
| 16248e2346 | |||
| 9bf93c4996 | |||
| 82248f1068 | |||
| b0c37aa79f | |||
| 967a4e0e2f | |||
| 361854f5b5 | |||
| 52d65add22 | |||
| b868660ed9 | |||
| 2bbfa4b6bf | |||
| 118e43f0c2 | |||
| 726df4d36c | |||
| 68204acddd | |||
| 2b2e258020 | |||
| 17bbaf2136 | |||
| b2fd3a39fa | |||
| f843aff337 | |||
| 13afc6464f | |||
| eb64db41da | |||
| 65e54aefbe | |||
| e44d1e04a2 | |||
| fa948fd5d0 | |||
| 30fa3b8444 | |||
| 35815c3a56 | |||
| 4585ac4bf8 | |||
| 70cd621f80 | |||
| 145a0f5c7e | |||
| 9bac691032 | |||
| ba7d395d20 | |||
| 3c07a3ae26 | |||
| ca5731d2e6 | |||
| f8426f304a | |||
| b9414c7a48 | |||
| 6c9c3d8d85 | |||
| 5df108a979 | |||
| f15b1694f7 | |||
| 30e37531a2 | |||
| 215383c630 | |||
| 5df5391030 | |||
| 530faf053f | |||
| 592034c9d4 | |||
| 2a2e31d087 | |||
| 419150a41f | |||
| fc4be10caa | |||
| 2413b27678 | |||
| 95ff88ac11 | |||
| 54d7e594f1 | |||
| 7900141bda | |||
| 13953a86d6 | |||
| 7f0ee8ad7f | |||
| 788112e54e | |||
| 0e8ec13e68 | |||
| 67fe028cb6 | |||
| 55f4ee077d | |||
| cc6b195aa3 | |||
| 06b06db04d | |||
| f3810fa708 | |||
| f2d5894638 | |||
| 72a9b30224 | |||
| 5de127b786 | |||
| bda5a45556 | |||
| 544050bed8 | |||
| afd6dcc415 | |||
| a41ba4ed86 | |||
| 1b0e6eff12 | |||
| ece16243ff | |||
| 9228059419 | |||
| 4584f95004 | |||
| 16650e0b25 | |||
| 30f2a040b7 | |||
| b49752c31a | |||
| 1e8ce2315b | |||
| 5aadcb2605 | |||
| 96c58679ff | |||
| 2fcc24f3be | |||
| 99b201eeea | |||
| 5448a9117b | |||
| 49dd1eec6b | |||
| ccf37fec6d | |||
| e69a1b71f7 | |||
| cc8b227378 | |||
| 0ad9bfc322 | |||
| 2f849c2d4e | |||
| 3b120055f7 | |||
| 0f593ef013 | |||
| 0eb1dee91e | |||
| 37eb2ab1cf | |||
| 3085f5bad9 | |||
| 2d55618738 | |||
| c7c7cb5795 | |||
| bd5e60db77 | |||
| 54463ea14d | |||
| b5389ad62a | |||
| 839273f8de | |||
| 102918bf0a | |||
| 15f5f93081 | |||
| d62be83f7e | |||
| 4f5dac3156 | |||
| 01ef886474 | |||
| 42c23db164 | |||
| 998f24719c | |||
| 92cfa01d94 | |||
| f8c6db7902 | |||
| 355de58199 | |||
| fcf6398a5a | |||
| 4605985c85 | |||
| 4216c26747 | |||
| 90eb11e861 | |||
| d6dad0211f | |||
| e51b311203 | |||
| 25ab909477 | |||
| 78361c3c2c | |||
| baecfc96d6 | |||
| 05d1876d09 | |||
| b963104a2b | |||
| 7d6d75d539 | |||
| f9717618af | |||
| a61330abc1 | |||
| c08aa6a95f | |||
| 0c37f7875f | |||
| 71376e4a35 | |||
| 632e2005ee | |||
| c2bd127b64 | |||
| 053b39bb00 | |||
| a3f628f139 | |||
| c2af720d82 | |||
| 6605567a2f | |||
| d9d8994157 | |||
| cdfe383fc3 | |||
| 66f27a9baf | |||
| c23a596868 | |||
| 5be1aedd23 | |||
| 62b232b05e | |||
| 5bc32abc04 | |||
| 98d0cf60ea | |||
| b46d935956 | |||
| dafe55c017 | |||
| 5462c8cca4 | |||
| e4782f62f4 | |||
| 3f2a3b7a51 | |||
| e0d6ab0b0a | |||
| ccd9dca9fe | |||
| 09c55be1e7 | |||
| b3086f52fb | |||
| e8e53d940d | |||
| f9eaa7ccd4 | |||
| 34feb38b27 | |||
| a344f7401d | |||
| f5e7ff1452 | |||
| 178a8843dd | |||
| 6aa7ec80d6 | |||
| 98509a0fa2 | |||
| 24283722c6 | |||
| f49d9fcb0f | |||
| ac8284fcd2 | |||
| 9e8fcec7c0 | |||
| 08e1cad999 | |||
| f758dd3f1b | |||
| 555dae50db | |||
| 3e278c4e93 | |||
| 105d5083cb | |||
| 5457fde893 | |||
| a87711e714 | |||
| 54fb80e33b | |||
| ba0e338253 | |||
| 4de19da582 | |||
| 992165a30c | |||
| 4c72268fc5 | |||
| d102d04d24 | |||
| 899043124d | |||
| 60a8d5e4d0 | |||
| 39e065e584 | |||
| 81bed89059 | |||
| 577c1b8e0e | |||
| 66ac6ed86b | |||
| 34e8385946 | |||
| 9e526aef0b | |||
| 1449647645 | |||
| dbec591520 | |||
| 741af51f7b | |||
| 21b3e699c4 | |||
| bfdc802c90 | |||
| ac3a42eed4 | |||
| ec1e6a616b | |||
| efd23ecae3 | |||
| 05284c34e8 | |||
| 32501a8f38 | |||
| b75e16a221 | |||
| f8b8cf226f | |||
| 5f6d10df44 | |||
| 57cda0d5f7 | |||
| ca10b584e6 | |||
| 3c16090ec0 | |||
| ef3e4f957b | |||
| 5a924c340c | |||
| 0abf7186d1 | |||
| 51259f3c8e | |||
| aabc2b4364 | |||
| cd74c11b58 | |||
| 2055d4efbb | |||
| 9b782af373 | |||
| 2bcd575d00 | |||
| fa747a144d | |||
| 3324cf6d0e | |||
| cf9c1ebe0b | |||
| 9026dd4cf3 | |||
| aa327b3aad | |||
| 94334381fe | |||
| a5f3553186 | |||
| 9facdffb8b | |||
| 13fbeed6b6 | |||
| f000d4c026 | |||
| 37c6a50a59 | |||
| 7e6d7c6f63 | |||
| da6df5746d | |||
| 17316d6a91 | |||
| 8adf4583ea | |||
| 82c118c4c0 | |||
| 0f00d256a4 | |||
| ae43e93437 | |||
| 9c309b08d6 | |||
| 5961177503 | |||
| 01ec5f1f79 | |||
| 6d80b8e365 | |||
| 9522ddc08f | |||
| c468d9d91f | |||
| 52acadda42 | |||
| 4db5acc56f | |||
| aa138a1730 | |||
| b96e26185c | |||
| a25db706fb | |||
| 68edf14b63 | |||
| 1e11207bcb | |||
| a013269d66 | |||
| 8f241b2ff6 | |||
| 10b26de373 | |||
| 17f1bccdcd | |||
| e8485980c7 | |||
| 009dd7b93b | |||
| 92aeac389d | |||
| 58aa71dec7 | |||
| 3b523cd439 | |||
| 3dd39917d5 | |||
| edc3e68694 | |||
| acd41f59df | |||
| fed099d0e1 | |||
| 7e7030922d | |||
| cd32764c1e | |||
| 29e2b138fb | |||
| 3d0b97b019 | |||
| 2ca7a79101 | |||
| dc80de7238 | |||
| 9a167b83bd | |||
| 5b190bfaa8 | |||
| f4ef5b0781 | |||
| 312d350576 | |||
| f4c6cc7322 | |||
| d6055b640e | |||
| e8d9f89e11 | |||
| d62538a395 | |||
| 81bd020ceb | |||
| 8b66602575 | |||
| 0350ac3b9f | |||
| cce404789c | |||
| 000cb17acd | |||
| 07725e03a3 | |||
| 950ffdfefb | |||
| 21fc771292 | |||
| 1e9f2e70a0 | |||
| 59029ee106 | |||
| a26ab41fab | |||
| da423544ed | |||
| c517d130a2 | |||
| a56818a2c8 | |||
| ac115ac7ee | |||
| 43eba22eb3 | |||
| 5cac7224c6 | |||
| 6a03d1e107 | |||
| 3e51ab18d2 | |||
| 054230143f | |||
| 83fd131287 | |||
| 432edd8a26 | |||
| a8e4709199 | |||
| 2608df99b5 | |||
| cc9ecfe515 | |||
| 11a7b0ae61 | |||
| a32b271f55 | |||
| fd638feb11 | |||
| 9ec5585e6b | |||
| e4f2623a8e | |||
| afc1ff662c | |||
| 9428cbe9d3 | |||
| 4cb28d6096 | |||
| 0bfb7011c3 | |||
| 3c797f50a9 | |||
| a19ec9810c | |||
| 7a9d7d7076 | |||
| 68d4e3e64b | |||
| fdde929b65 | |||
| 15b6ea7178 | |||
| cdb892eb08 | |||
| 153e93010a | |||
| 79081639b0 | |||
| af682e0270 | |||
| a06dab15f2 | |||
| 245d408176 | |||
| 588a31cb00 | |||
| 811c121441 | |||
| 83412394c3 | |||
| 72b762b4b5 | |||
| b66ad4c3c0 | |||
| 00a55e6eb3 | |||
| aac9ef28c6 | |||
| a4175a5681 | |||
| 50323a4939 | |||
| 5cd7e5a144 | |||
| e8830f3993 | |||
| 77ca902e88 | |||
| f022e6d930 | |||
| 67fc5cc549 | |||
| 253f3aefac | |||
| f3c76418eb | |||
| 8fe0517264 | |||
| 850241c70d | |||
| 75e70191ff | |||
| 0f9a08a033 | |||
| f84e913839 | |||
| 40cf14c77b | |||
| 1d844597b6 | |||
| feb41fe576 | |||
| 39d8bf85b9 | |||
| 39601df9e5 | |||
| 96616dcc3e | |||
| 0003c52f28 | |||
| 24f7b5384c | |||
| e46947f764 | |||
| 97e21edf80 | |||
| e3dcbe2b61 | |||
| 2f6f728be4 | |||
| 766db47525 | |||
| 7511b16c6b | |||
| 000eca8057 | |||
| dd30d2cbf6 | |||
| 83dd3bb553 | |||
| 303632843c | |||
| c047f78120 | |||
| 24024ccfb3 | |||
| 6f82912ac5 | |||
| d43338f467 | |||
| a5ba37a2f9 | |||
| 8dc03b168b | |||
| 1eb92662ae | |||
| 7f8d21976f | |||
| d377f1a925 | |||
| b5fb438d5a | |||
| 6e0579e315 | |||
| 067ebdcc84 | |||
| dbbe25027a | |||
| 16468e9daa | |||
| 603966b444 | |||
| 1f51e15bb7 | |||
| f12766047a | |||
| 313871c18d | |||
| 4580483976 | |||
| 4aecdf9074 | |||
| c0c1b180b3 | |||
| 97d2e3f82f | |||
| 9ae5d21216 | |||
| cda829a2e2 | |||
| 970fbd4531 | |||
| 2a85f0eca3 | |||
| 3cbc717749 | |||
| c8ce515ba3 | |||
| 2c2b619854 | |||
| 9218ac7d5b | |||
| c699d8e2e5 | |||
| 6da0285af3 | |||
| e04e8d939e | |||
| 2ab02fabdd | |||
| aeb9da08cb | |||
| 1d5b1084e4 | |||
| aadb20a45b | |||
| 902b12267c | |||
| acff028e5f | |||
| c9ee7a02fc | |||
| 13b83369ae | |||
| 21f330d1f7 | |||
| 0b5d4f4909 | |||
| b26f18575f | |||
| 301b0a04e2 | |||
| b899a16bc0 | |||
| 9b80e7b25c | |||
| c10327cdb0 | |||
| 5029d6ef21 | |||
| 89a810ee77 | |||
| 6051750c95 |
+21
-10
@@ -99,6 +99,9 @@ WDC.Api:staging:
|
||||
stage: staging
|
||||
tags:
|
||||
- win
|
||||
environment:
|
||||
name: staging
|
||||
url: https://iis01.egalware.com/WDC/SRV/
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
@@ -111,6 +114,8 @@ WDC.Api:staging:
|
||||
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
|
||||
## 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
|
||||
|
||||
WDC.UI:staging:
|
||||
stage: staging
|
||||
@@ -118,7 +123,7 @@ WDC.UI:staging:
|
||||
- win
|
||||
environment:
|
||||
name: staging
|
||||
url: https://iis01.egalware.com/GPW/WDC.UI
|
||||
url: https://iis01.egalware.com/WDC/UI/
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
@@ -139,7 +144,7 @@ WDC.Api:deploy:
|
||||
- win
|
||||
environment:
|
||||
name: production
|
||||
url: https://seriate.egalware.com/GPW/WDC.UI
|
||||
url: https://wdc.egalware.com/SRV/
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.API
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
@@ -151,15 +156,18 @@ WDC.Api:deploy:
|
||||
- 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
|
||||
# IIS OVH IIS01
|
||||
- dotnet publish -p:PublishProfile=IIS-OVH-IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS OVH IIS02
|
||||
- dotnet publish -p:PublishProfile=IIS-OVH-IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
|
||||
WDC.UI:deploy:
|
||||
stage: deploy
|
||||
tags:
|
||||
- win
|
||||
environment:
|
||||
name: production
|
||||
url: https://wdc.egalware.com/UI/
|
||||
variables:
|
||||
APP_NAME: WebDoorCreator.UI
|
||||
SOL_NAME: WebDoorCreator.UI
|
||||
@@ -171,10 +179,13 @@ WDC.UI:deploy:
|
||||
- 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
|
||||
# IIS OVH IIS01
|
||||
- dotnet publish -p:PublishProfile=IIS-OVH-IIS01.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_IIS_PWD -p:AllowUntrustedCertificate=true -p:verbosity=quiet $env:APP_NAME/$env:APP_NAME.csproj
|
||||
# IIS OVH IIS02
|
||||
- dotnet publish -p:PublishProfile=IIS-OVH-IIS02.pubxml -p:RunCodeAnalysis=false -p:Configuration=Release -p:username=steamware -p:Password=$WDC_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
|
||||
|
||||
|
||||
# ---------- RELEASE ----------
|
||||
WDC.Api:release:
|
||||
|
||||
+69
-3
@@ -4,10 +4,31 @@ Di seguito l'elenco dei todo da completare
|
||||
|
||||
## Framework
|
||||
|
||||
Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
Importante:
|
||||
- [ ] Traduzione OVUNQUE x ogni termine/etichetta/button..
|
||||
|
||||
## Modello dati
|
||||
|
||||
Da sistemare
|
||||
|
||||
- [x] Eliminazione dell'oggetto DoorType (navigazione, tab db)
|
||||
- [x] creare nuova migration + update DB x fix TypeDoor
|
||||
- [x] Verificare che le porte duplicate (da template o da stesso ordine) riportino in TypeId il cod porta originale e che le altre abbiano 1
|
||||
- [x] verificare eventualmente cambio nome campo TypeId --> DoorIdParent
|
||||
|
||||
## Pagine
|
||||
|
||||
### UIX generale
|
||||
|
||||
Verifiche generali
|
||||
|
||||
- [ ] pulsanti update(save)/cancel
|
||||
- [ ] omogenei (colore, icona, x forma cerchio/quadrato vediamo...)
|
||||
- [ ] valutazione omogeneità forma (cerchio/quadrato... normalizzare? al contrario differenziare?)
|
||||
- [ ] icone di update che siano omogenee
|
||||
- [ ] pulsanti operativi siano omogenei
|
||||
- [ ] selettori a tendina da omogeneizzare
|
||||
|
||||
### HOME page
|
||||
|
||||
... non saprei, forse link a
|
||||
@@ -26,6 +47,14 @@ Per completare
|
||||
- search generico
|
||||
- stato ordine
|
||||
- [x] ordinamento
|
||||
- [ ] aggiungere data promessa consegna: dato sul db, valore default (+30gg?), gestione filtro...
|
||||
- [x] aggiungere calcolo (FAKE) dei prezzi
|
||||
- [x] aggiungere company x ordini (x viste DCA almeno)
|
||||
- [x] gestione modifica descrizione/codice ordini (da p\rte del cliente finale)
|
||||
- [x] aggiunta gestione DCA x conferma prezzi e tempistiche
|
||||
- [x] aggiunta gestione DCA x approvazione ordini
|
||||
- [ ] verifica HW con Filippo/Emmanuele da info ABH/Kit
|
||||
- [ ] verificare significato della dicitura "Model Number": cosa indica esattamente? è corretta sul db? è calcolata correttamente da interfaccia?
|
||||
|
||||
### DCA Order Mans
|
||||
|
||||
@@ -39,6 +68,7 @@ Per completare:
|
||||
- [x] sistemare con paginatore max 3 righe x 4 porte
|
||||
- [x] fix button verde add-new
|
||||
- [x] ombreggiatura blocco
|
||||
- [x] gestione calcolo prezzi (fake, random)
|
||||
|
||||
### DoorDefinition BaseParams
|
||||
- [x] conteggio num modifiche da salvare
|
||||
@@ -58,15 +88,51 @@ Per completare:
|
||||
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] verificare perché NON si aggiorna al salvataggio pagina dei 18 hw
|
||||
- [x] mancano il totale componenti x ogni hw attivato
|
||||
- [x] aggiungere icone/immagini x gli HW da inserire nelle porte
|
||||
|
||||
|
||||
### Import componenti DOOR
|
||||
|
||||
Procedura per import componenti, sempre GLOBALE (= TUTTI)
|
||||
|
||||
- [x] definizione cartelle di base:
|
||||
- [x] (A) R:\WebDoor\CurComp x componenti ATTUALI/cottenti/approvati
|
||||
- [x] (B) R:\WebDoor\NewComp x componenti DA valutare x import
|
||||
- [x] scansione della cartella (B)
|
||||
- [x] ciclo x ogni file della cartella B
|
||||
- [x] rilevo path (assoluto e relativo = togliendo parte (B))
|
||||
- [x] calcolo MD5
|
||||
- [x] rilevo lenght
|
||||
- [x] rilevo last mod
|
||||
- [ ] cerco sul DB record x il PATH (RELATIVO) in oggetto (opzionalmente unique sul db)
|
||||
- [ ] salvo datetime = adesso
|
||||
- [ ] in base alla verifica precedente mi tengo set in memoria dalla lista del DB con
|
||||
- [ ] NON trovo record --> registro nuovo record, con stato = new (=1)
|
||||
- [ ] trovo record
|
||||
- [ ] SE cambia MD5/lenght/(last mod?) --> registro stato MOD (=2) + lastCheck = adesso
|
||||
- [ ] se NON cambia --> registro lastCheck = adesso + stato CONFIRM ( =0)
|
||||
- [ ] verifico TUTTI i record del DB, e quelli con lastCheck < adesso --> segno come ELIMINATI (=3)
|
||||
- [ ] step di check puntuale: TUTTI quelli con stato > 0 sono mostrati x azione (1 check x ogni riga, con seleziona tutti/nessuno)
|
||||
- [ ] l'utente deve poter VEDERE la differenza tra i file (modificati) di (A) e (B) (con diff tramite modale, ...)
|
||||
- [ ] l'utente checca 0/+ righe e clicca su CONFERMA: si cicla x TUTTE le righe checked x aggiornarle sul DB
|
||||
- [ ] le righe NUOVE confermate --> sono registrate (con valid from...), stato CONFIRM ( =0), viene copiato file/cartelle da (B) ad (A)
|
||||
- [ ] le righe modificate --> si registra modifica, stato CONFIRM ( =0), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe eliminate --> si imposta cancellazione logica (validUntil), stato DELETED ( =-1), viene sovrascritto/sostituito file/cartelle da (B) ad (A)
|
||||
- [ ] le righe NON checked, ma NON aggiorno sul DB:
|
||||
- [ ] se erano nuove (=1) --> elimino dal DB (e NON copio folder)
|
||||
- [ ] se erano modificate (=2) --> riporto a stato precedente (0/-1) (e NON copio)
|
||||
- [ ] se erano eliminate (=3) --> riporto a 0 (e NON faccio nulla)
|
||||
|
||||
|
||||
#### Report
|
||||
|
||||
- [x] Va inserita una lista dei componenti + elenco quote.
|
||||
- [ ] Va pensato esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
- [x] Esportabile in pdf, comprensivo di "check pdf fatto da tizio alle ..."
|
||||
|
||||
## Componenti
|
||||
- [x] costruire libreria componenti (ad esempio waiter/loader) da siti di esempio componenti in EgwCoreLib.Razor --> ProgressBar e nuovi Loader
|
||||
|
||||
|
||||
### Top
|
||||
|
||||
Binary file not shown.
@@ -307,6 +307,6 @@ In particular we expect to have some data auto-calculated (ex time from CAM), wh
|
||||
|
||||
| Date | Edit | Version | Note |
|
||||
|------------|----------------|:-------:|-----------------:|
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2022.11.03 | S.E. Locatelli | 0.1 | Initial draft |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
| 2022.11.09 | S.E. Locatelli | 0.2 | Draft completion |
|
||||
| 2023.03.21 | Z. Majid | 0.4 | Grammar Fixes |
|
||||
|
||||
Binary file not shown.
@@ -0,0 +1,58 @@
|
||||
# Appunti fix vari
|
||||
|
||||
La sistemazione è gestita direttametne con commit git...
|
||||
## Traduzione
|
||||
|
||||
Ci sono ancora lemmi di interfaccia gestiti come numerici, NON è lo standard definito:
|
||||
- ok a lemmi "UI_"
|
||||
- lemmi devono essere "self explaining"
|
||||
- eventualmente nel naming il cosa/dove, accettabile **UI_BtnOk** o **UI_BtnKo**, ma anche **UI_OrderPage_title**
|
||||
|
||||
... da sistemare GLOBALMENTE (= Zac...) x gli esistenti, mi occupo di creare correttamente solo i nuovi...
|
||||
|
||||
## NavMenuHorizontal
|
||||
|
||||
|
||||
Ci sono alcne cose che non funzionano:
|
||||
|
||||
|
||||
- i pulsanti si disallineano (icona/testo) con size schermo sotto fhd (va gestito almeno da 1376 in orizzontale...)
|
||||
|
||||

|
||||
- typo: flex warp indica che la pagina deve caricarsi a velocità warp (superluminare) come in star trek? MAGARI!!!!
|
||||
|
||||
```csharp
|
||||
<AuthorizeView Roles="SuperAdmin" Context="MenuHide">
|
||||
<Authorized>
|
||||
<div class="nav-item px-3 d-flex flex-warp align-items-center">
|
||||
<NavLink class="nav-link" href="TemplateMan">
|
||||
<span class="fa-solid fa-paint-roller pe-2" aria-hidden="true"></span> Template Management
|
||||
</NavLink>
|
||||
</div>
|
||||
</Authorized>
|
||||
</AuthorizeView>
|
||||
```
|
||||
- il navbar toggler che non funziona...
|
||||
- opzioni utente con username (email) x esteso: troppo grande, ridotto
|
||||
|
||||
## Modale Door
|
||||
|
||||
La pagina modale della porta permetteva sia la modifica imperativa delle quantità che la modifica del resto gestita tramite controllo CurrDoor / CurrDoorClone per approvare/annullare intervento complessivo
|
||||
|
||||
Questo portava ad una situazione di errore in caso di modifica (es descrizioen door) + modifica quantità
|
||||
|
||||
Eliminato metodo esplicito modifica quantità (da service + DB), gestito come modifica "locale" del dato qta (che quindi eredita il controllo qty >=0)
|
||||
|
||||
## Modale Ordini
|
||||
|
||||
- Aggiunta modale x editing ordine cliente
|
||||
- Aggiunta modale x gestione editing DCA (data consegna...)
|
||||
|
||||
## HwSingleInstance
|
||||
|
||||
La gestione del calcolo "variato" non funziona bene/sempre
|
||||
- errori in fase di calcolo
|
||||
- usare funzione come check è sub ottimale
|
||||
- i valori creati x clone NON sono veri cloni (di fatto punta ad obj originali)
|
||||
|
||||
--> riscritta logica vaori originali/correnti ed editing...
|
||||
Binary file not shown.
@@ -0,0 +1,3 @@
|
||||
Per sistemare il manuale da ilias copiare il file delos.css qui allegato in
|
||||
|
||||
C:\Users\samuele.steamw\source\WebDoorCreator\WebDoorCreator.UI\wwwroot\help\templates\default
|
||||
+20127
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
@@ -1,6 +1,6 @@
|
||||
<body>
|
||||
<i>WebDoorCreator - Egalware</i>
|
||||
<h4>Version: 0.9.2305.2619</h4>
|
||||
<h4>Version: 0.9.2505.1316</h4>
|
||||
<br /> Release note:
|
||||
<ul>
|
||||
<li>
|
||||
|
||||
@@ -1 +1 @@
|
||||
0.9.2305.2619
|
||||
0.9.2505.1316
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<item>
|
||||
<version>0.9.2305.2619</version>
|
||||
<version>0.9.2505.1316</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>
|
||||
|
||||
@@ -1,9 +1,16 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using SkiaSharp;
|
||||
using Svg;
|
||||
using Svg.Skia;
|
||||
using System.Drawing;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
#if false
|
||||
using SkiaSharp;
|
||||
using Svg.Skia;
|
||||
#endif
|
||||
|
||||
namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
[Route("api/[controller]")]
|
||||
@@ -12,11 +19,13 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public DoorImageController(IConfiguration configuration, QueueDataService DataService)
|
||||
public DoorImageController(IConfiguration configuration, QueueDataService cQDService, WebDoorCreatorService cWDCService)
|
||||
{
|
||||
Log.Info("Starting DoorImageController");
|
||||
_configuration = configuration;
|
||||
QDataServ = DataService;
|
||||
WaitReloadSvg = _configuration.GetValue<int>("RuntimeOpt:WaitReloadSvg");
|
||||
QDService = cQDService;
|
||||
WDService = cWDCService;
|
||||
Log.Info("Avviato DoorImageController");
|
||||
}
|
||||
|
||||
@@ -35,13 +44,33 @@ namespace WebDoorCreator.API.Controllers
|
||||
public async Task<IActionResult> GetImagePng(int DoorId)
|
||||
{
|
||||
byte[] result = new byte[0];
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
string svgContent = await QDService.DoorGetLastSvg(DoorId);
|
||||
// se fosse vuoto...
|
||||
if (string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
// richiede ricalcolo img
|
||||
svgContent = await SendRecalcReq(DoorId);
|
||||
}
|
||||
// se fosse vuoto...
|
||||
if (string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
// legge img vuota
|
||||
svgContent = QDService.DoorGetMissingSvg();
|
||||
}
|
||||
// ora prosegue con conversione...
|
||||
if (!string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
var mySvg = SvgDocument.FromSvg<SvgDocument>(svgContent);
|
||||
//result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
var myBmp = mySvg.Draw();
|
||||
result = ImageToByte2(myBmp);
|
||||
using (var svg = new SKSvg())
|
||||
{
|
||||
if (svg.FromSvg(svgContent) is { })
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
{
|
||||
svg.Picture?.ToImage(stream, SKColors.Empty, SKEncodedImageFormat.Png, 100, 1f, 1f, SKColorType.Rgba8888, SKAlphaType.Unpremul, SKColorSpace.CreateSrgb());
|
||||
result = stream.ToArray();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return File(result, "image/png");
|
||||
}
|
||||
@@ -49,7 +78,15 @@ namespace WebDoorCreator.API.Controllers
|
||||
[HttpGet("GetImage.svg")]
|
||||
public async Task<IActionResult> GetImageSvg(int DoorId)
|
||||
{
|
||||
string svgContent = await QDataServ.DoorGetLastSvg(DoorId);
|
||||
string svgContent = await QDService.DoorGetLastSvg(DoorId);
|
||||
// se fosse vuoto...
|
||||
if (string.IsNullOrEmpty(svgContent))
|
||||
{
|
||||
// richiede ricalcolo img
|
||||
await SendRecalcReq(DoorId);
|
||||
// legge img vuota
|
||||
svgContent = QDService.DoorGetMissingSvg();
|
||||
}
|
||||
var result = System.Text.Encoding.UTF8.GetBytes(svgContent);
|
||||
return File(result, "image/svg+xml");
|
||||
}
|
||||
@@ -62,23 +99,46 @@ namespace WebDoorCreator.API.Controllers
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
private int WaitReloadSvg = 100;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
private QueueDataService QDService { get; set; } = null!;
|
||||
|
||||
private WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
#region Private Methods
|
||||
|
||||
private byte[] ImageToByte2(Image img)
|
||||
/// <summary>
|
||||
/// Invio richiesta ricalcolo porta
|
||||
/// </summary>
|
||||
/// <param name="DoorId"></param>
|
||||
/// <returns></returns>
|
||||
private async Task<string> SendRecalcReq(int DoorId)
|
||||
{
|
||||
using (var stream = new MemoryStream())
|
||||
string answ = "";
|
||||
// richiede ricalcolo img
|
||||
List<string> doorIdList = new List<string>() { $"{DoorId}" };
|
||||
// chiamo reset richieste
|
||||
var list2Proc = await QDService.ResetQueueByDoorList(doorIdList);
|
||||
|
||||
// recupero DDF ed invio x processing
|
||||
if (DoorId > 0)
|
||||
{
|
||||
img.Save(stream, System.Drawing.Imaging.ImageFormat.Png);
|
||||
return stream.ToArray();
|
||||
string currDDF = await WDService.DoorOpGetDDF(DoorId);
|
||||
// versione corrente del DDF generato
|
||||
int currVers = await QDService.SendCalcReq(DoorId, currDDF);
|
||||
}
|
||||
|
||||
// attende ...
|
||||
await Task.Delay(WaitReloadSvg);
|
||||
// riprova lettura
|
||||
answ = await QDService.DoorGetLastSvg(DoorId);
|
||||
return answ;
|
||||
}
|
||||
|
||||
#endregion Private Methods
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
}
|
||||
/// <summary>
|
||||
/// GET: api/Order/GetCurrent
|
||||
/// Recupera ordini degli ultimi 6 mesi dato cliente e stato
|
||||
/// Recupera ordini dato id cliente + stato ordini (limitato a ultimi 6 mesi)
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("GetCurrent")]
|
||||
@@ -36,7 +36,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
List<int> answ = new List<int>();
|
||||
DateTime dtEnd = DateTime.Now;
|
||||
DateTime dtStart = dtEnd.AddMonths(-1);
|
||||
DateTime dtStart = dtEnd.AddMonths(-6);
|
||||
var rawData = await WDCService.OrderStatusGetFilt(id, ordStatus, dtStart, dtEnd);
|
||||
if (rawData != null)
|
||||
{
|
||||
@@ -49,8 +49,8 @@ namespace WebDoorCreator.API.Controllers
|
||||
/// </summary>
|
||||
/// <param name="OrderId"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet("OrderDetail")]
|
||||
public async Task<OrderDetailsDTO> OrderDetail(int OrderId)
|
||||
[HttpGet("GetDetail")]
|
||||
public async Task<OrderDetailsDTO> GetDetail(int OrderId)
|
||||
{
|
||||
OrderDetailsDTO answ = new OrderDetailsDTO()
|
||||
{
|
||||
@@ -58,19 +58,84 @@ namespace WebDoorCreator.API.Controllers
|
||||
};
|
||||
// recupero info ordine
|
||||
var rawOrder = await WDCService.OrderGetByKey(OrderId);
|
||||
if (rawOrder != null)
|
||||
if (rawOrder != null && rawOrder.CompanyNav != null)
|
||||
{
|
||||
answ.OrderDescript = rawOrder.OrderDescript;
|
||||
answ.OrderExtCode = rawOrder.OrderExtCode;
|
||||
// recupero info customer
|
||||
|
||||
// recupero info customer
|
||||
CustomerDTO customer = new CustomerDTO()
|
||||
{
|
||||
Address = rawOrder.CompanyNav.Address,
|
||||
City = rawOrder.CompanyNav.City,
|
||||
CompanyExtCode = rawOrder.CompanyNav.CompanyExtCode,
|
||||
CompanyId = rawOrder.CompanyNav.CompanyId,
|
||||
CompanyName = rawOrder.CompanyNav.CompanyName,
|
||||
State = rawOrder.CompanyNav.State,
|
||||
VAT = rawOrder.CompanyNav.VAT,
|
||||
ZipCode = rawOrder.CompanyNav.ZipCode
|
||||
};
|
||||
answ.CustomerInfo = customer;
|
||||
// recuper elenco porte...
|
||||
List<DoorCostingDTO> dcDTO = new List<DoorCostingDTO>();
|
||||
var doorsList = await WDCService.DoorGetByOrderId(OrderId);
|
||||
if (doorsList != null)
|
||||
{
|
||||
foreach (var door in doorsList)
|
||||
{
|
||||
// recupero i dato DoorOp
|
||||
var doorOpList = await WDCService.DoorOpGetByDoorId(door.DoorId);
|
||||
Dictionary<string, List<string>> currBOMList = new Dictionary<string, List<string>>();
|
||||
// ciclo su tutte le DoorOp
|
||||
foreach (var doorOp in doorOpList)
|
||||
{
|
||||
// cerco se ci sia già o meno nella BOM l'item corrente
|
||||
if (currBOMList.ContainsKey(doorOp.ObjectId))
|
||||
{
|
||||
currBOMList[doorOp.ObjectId].Add(doorOp.JsoncActVal);
|
||||
}
|
||||
else
|
||||
{
|
||||
List<string> currOp = new List<string>();
|
||||
currOp.Add(doorOp.JsoncActVal);
|
||||
currBOMList.Add(doorOp.ObjectId, currOp);
|
||||
}
|
||||
}
|
||||
// creo oggetto DTO finale della porta
|
||||
var doorDto = new DoorCostingDTO()
|
||||
{
|
||||
DoorId = door.DoorId,
|
||||
Quantity = door.Quantity,
|
||||
EstimatedWorkTime = 0,
|
||||
BOMList = currBOMList
|
||||
};
|
||||
dcDTO.Add(doorDto);
|
||||
}
|
||||
}
|
||||
//answ. = rawOrder.OrderDescript;
|
||||
answ.DoorsList = dcDTO;
|
||||
}
|
||||
// popolo con dati specifica...
|
||||
return answ;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Door price update for order's cost evaluation
|
||||
/// </summary>
|
||||
/// <param name="EvalResults">list of DoorPriceDTO with UnitPrices</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost("DoorPriceUpdate")]
|
||||
public async Task<string> DoorPriceUpdate(List<DoorPriceDTO> EvalResults)
|
||||
{
|
||||
string answ = "NA";
|
||||
var updateSet = EvalResults
|
||||
.Where(x => x.Valid)
|
||||
.ToDictionary(x => x.DoorId, x => x.UnitCost);
|
||||
bool fatto = await WDCService.DoorUpdateCosts(updateSet);
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
}
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NLog;
|
||||
using System.Diagnostics;
|
||||
using WebDoorCreator.Core;
|
||||
using WebDoorCreator.Data.DTO;
|
||||
using WebDoorCreator.Data.Services;
|
||||
|
||||
@@ -11,12 +13,22 @@ namespace WebDoorCreator.API.Controllers
|
||||
{
|
||||
#region Public Constructors
|
||||
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService)
|
||||
public QueueController(IConfiguration configuration, QueueDataService DataService, WebDoorCreatorService _WDService)
|
||||
{
|
||||
Log.Info("Starting QueueController");
|
||||
_configuration = configuration;
|
||||
logTimingEnable = configuration.GetValue<bool>("RuntimeOpt:LogTimingEnable");
|
||||
QDataServ = DataService;
|
||||
Log.Info("Avviato QueueController");
|
||||
WDService = _WDService;
|
||||
// aggiungo..
|
||||
string statName = "QueueController";
|
||||
bool doWrite = QDataServ.StatUpsert(statName, new TimeSpan(), 5).Result;
|
||||
// se campione "pieno"...
|
||||
if (doWrite)
|
||||
{
|
||||
// recupero e resetto
|
||||
ExecStats statRec = QDataServ.StatReset(statName).Result;
|
||||
Log.Trace($"Avviato QueueController x {statRec.NumCall}");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion Public Constructors
|
||||
@@ -89,6 +101,33 @@ namespace WebDoorCreator.API.Controllers
|
||||
public async Task<string> ResetQueueProcessing()
|
||||
{
|
||||
string answ = "NA";
|
||||
// fixme todo
|
||||
|
||||
/* --------------
|
||||
* da riscrivere
|
||||
* - server record x cancellazione logica delle porte OK
|
||||
* - il record (boolean, toDelete...) indica azione richiesta OK
|
||||
* - si prendono TUTTE le porte da DB con toDelete == true OK
|
||||
* - si eliminano su REDIS dalle 4 code (req, processing, error, done) OK
|
||||
* - check delle code processing, SE ci sono record rimasti li cerco sul DB
|
||||
* - se NON ci sono sul db --> li elimino da processing
|
||||
* - effettivo delete sul db di toDelete
|
||||
*
|
||||
* - proseguo come ora (sposto tra code processing --> request)
|
||||
*/
|
||||
|
||||
var doors2Del = await WDService.DoorGet2Del();
|
||||
|
||||
if (doors2Del != null)
|
||||
{
|
||||
foreach (var item in doors2Del)
|
||||
{
|
||||
await WDService.RedisBulkDelByDoorId(item.DoorId);
|
||||
await QDataServ.RedisBulkDelHashByKey(item.DoorId);
|
||||
await WDService.DoorDelete(item);
|
||||
}
|
||||
}
|
||||
|
||||
bool fatto = await QDataServ.ResetQueueProcessing();
|
||||
answ = fatto ? "OK" : "NO";
|
||||
return answ;
|
||||
@@ -105,6 +144,7 @@ namespace WebDoorCreator.API.Controllers
|
||||
string answ = "NA";
|
||||
bool fatto = await QDataServ.SaveProcessingResult(calcResults);
|
||||
answ = fatto ? "OK" : "NO";
|
||||
Log.Debug("Eseguito SaveProcResult");
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -115,6 +155,11 @@ namespace WebDoorCreator.API.Controllers
|
||||
[HttpGet("StatusList")]
|
||||
public async Task<Dictionary<string, Dictionary<string, string>>> StatusList()
|
||||
{
|
||||
Stopwatch sw = new Stopwatch();
|
||||
if (logTimingEnable)
|
||||
{
|
||||
sw.Start();
|
||||
}
|
||||
Dictionary<string, Dictionary<string, string>> answ = new Dictionary<string, Dictionary<string, string>>();
|
||||
var actPend = await QDataServ.RequestPending();
|
||||
answ.Add("pending", actPend);
|
||||
@@ -127,6 +172,20 @@ namespace WebDoorCreator.API.Controllers
|
||||
|
||||
var actDone = await QDataServ.RequestDone();
|
||||
answ.Add("done", actDone);
|
||||
if (logTimingEnable)
|
||||
{
|
||||
sw.Stop();
|
||||
// aggiungo..
|
||||
string statName = "StatusList";
|
||||
bool doWrite = await QDataServ.StatUpsert(statName, sw.Elapsed, 5);
|
||||
// se campione "pieno"...
|
||||
if (doWrite)
|
||||
{
|
||||
// recupero e resetto
|
||||
ExecStats statRec = await QDataServ.StatReset(statName);
|
||||
Log.Info($"Eseguito {statName} x {statRec.NumCall} | {statRec.AvgTime.TotalMilliseconds:N3}ms");
|
||||
}
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
|
||||
@@ -137,9 +196,10 @@ namespace WebDoorCreator.API.Controllers
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
[HttpGet("TakeNextItems")]
|
||||
public async Task<Dictionary<string, string>> TakeProcessingItems(int numItems = 10)
|
||||
public async Task<Dictionary<string, CalcReqtDTO>> TakeProcessingItems(int numItems = 10)
|
||||
{
|
||||
var actQueue = await QDataServ.TakeProcessingItems(numItems);
|
||||
Log.Debug($"Eseguito TakeProcessingItems per {numItems} items");
|
||||
return actQueue;
|
||||
}
|
||||
|
||||
@@ -147,15 +207,17 @@ namespace WebDoorCreator.API.Controllers
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration = null!;
|
||||
|
||||
private static Logger Log = LogManager.GetCurrentClassLogger();
|
||||
private IConfiguration _configuration = null!;
|
||||
|
||||
private bool logTimingEnable = false;
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
#region Private Properties
|
||||
|
||||
private QueueDataService QDataServ { get; set; } = null!;
|
||||
private WebDoorCreatorService WDService { get; set; } = null!;
|
||||
|
||||
#endregion Private Properties
|
||||
}
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using NLog;
|
||||
using System.Net.NetworkInformation;
|
||||
using WebDoorCreator.Data;
|
||||
|
||||
namespace WebDoorCreator.API.Health
|
||||
{
|
||||
public class Checks
|
||||
{
|
||||
#region Public Methods
|
||||
|
||||
public static async Task<HealthCheckResult> ConfigCount(IConfiguration _config)
|
||||
{
|
||||
string description = "Try check Config table";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
|
||||
{
|
||||
var dbCount = localDbCtx
|
||||
.DbSetConfig
|
||||
.Count();
|
||||
if (dbCount > 0)
|
||||
{
|
||||
description = $"Check Config table, found {dbCount} records";
|
||||
healthCheckData.Add("Count", dbCount);
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(1);
|
||||
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
|
||||
}
|
||||
|
||||
public static async Task<HealthCheckResult> DoorsCount(IConfiguration _config)
|
||||
{
|
||||
string description = "Try check DOOR table";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
|
||||
{
|
||||
var dbCount = localDbCtx
|
||||
.DbSetDoor
|
||||
.Count();
|
||||
if (dbCount > 0)
|
||||
{
|
||||
description = $"Check DOOR table, found {dbCount} records";
|
||||
healthCheckData.Add("Count", dbCount);
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(1);
|
||||
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
|
||||
}
|
||||
|
||||
public static async Task<HealthCheckResult> OrdersCount(IConfiguration _config)
|
||||
{
|
||||
string description = "Try check ORDER table";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_config))
|
||||
{
|
||||
var dbCount = localDbCtx
|
||||
.DbSetOrders
|
||||
.Count();
|
||||
if (dbCount > 0)
|
||||
{
|
||||
description = $"Check ORDER table, found {dbCount} records";
|
||||
healthCheckData.Add("Count", dbCount);
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
}
|
||||
|
||||
await Task.Delay(1);
|
||||
return HealthCheckResult.Unhealthy(description + $" NO RECORD found", null, healthCheckData);
|
||||
}
|
||||
|
||||
public static async Task<HealthCheckResult> PingCheck(string hostName)
|
||||
{
|
||||
var description = $"Ping to {hostName}";
|
||||
var healthCheckData = new Dictionary<string, object>();
|
||||
using (var thePing = new Ping())
|
||||
{
|
||||
var pingResult = await thePing.SendPingAsync(hostName);
|
||||
healthCheckData.Add("RoundTripMS", pingResult.RoundtripTime);
|
||||
healthCheckData.Add("ActualIPAddress", pingResult.Address.ToString());
|
||||
if (pingResult.Status == IPStatus.Success)
|
||||
{
|
||||
description += $" - {pingResult.RoundtripTime}ms";
|
||||
return HealthCheckResult.Healthy(description, healthCheckData);
|
||||
}
|
||||
}
|
||||
return HealthCheckResult.Unhealthy(description + $" {hostName}", null, healthCheckData);
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,9 @@
|
||||
using HealthChecks.UI.Client;
|
||||
using Microsoft.AspNetCore.Diagnostics.HealthChecks;
|
||||
using Microsoft.AspNetCore.Identity.UI.Services;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
using Microsoft.CodeAnalysis.FlowAnalysis;
|
||||
using Microsoft.Extensions.Diagnostics.HealthChecks;
|
||||
using StackExchange.Redis;
|
||||
using StackExchange.Redis.Extensions.Core.Configuration;
|
||||
using StackExchange.Redis.Extensions.Newtonsoft;
|
||||
@@ -14,10 +18,14 @@ var builder = WebApplication.CreateBuilder(args);
|
||||
|
||||
// configuration setup
|
||||
ConfigurationManager configuration = builder.Configuration;
|
||||
|
||||
// Redis
|
||||
var connStringRedis = configuration.GetConnectionString("Redis");
|
||||
if (string.IsNullOrEmpty(connStringRedis))
|
||||
{
|
||||
connStringRedis = "localhost:6379, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false";
|
||||
}
|
||||
string redisSrvAddr = connStringRedis.Substring(0, connStringRedis.IndexOf(":"));
|
||||
|
||||
// avvio oggetto shared x redis...
|
||||
var redisMultiplexer = ConnectionMultiplexer.Connect(connStringRedis);
|
||||
|
||||
@@ -27,6 +35,67 @@ builder.Services.AddControllers();
|
||||
builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddSwaggerGen();
|
||||
|
||||
// APP MAIN setup
|
||||
string connectionString = configuration.GetConnectionString("WDC.DB") ?? "";
|
||||
string dbServerAddr = "127.0.0.1";
|
||||
|
||||
if (string.IsNullOrEmpty(connectionString))
|
||||
{
|
||||
connectionString = "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (connectionString.Contains("Server"))
|
||||
{
|
||||
bool trovato = false;
|
||||
var dbTokens = connectionString.Split(";");
|
||||
int numTok = dbTokens.Count();
|
||||
int idx = 0;
|
||||
while (!trovato && idx < numTok)
|
||||
{
|
||||
if (dbTokens[idx].StartsWith("Server="))
|
||||
{
|
||||
// rimuovo la chaive Server...
|
||||
dbServerAddr = dbTokens[idx].Replace("Server=", "");
|
||||
// se ci fosse un nome (tipo \\sqlexpress) rimuovo...
|
||||
if (dbServerAddr.Contains("\\"))
|
||||
{
|
||||
int sIdx = dbServerAddr.IndexOf("\\");
|
||||
dbServerAddr = dbServerAddr.Substring(0, sIdx);
|
||||
}
|
||||
trovato = true;
|
||||
}
|
||||
idx++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// healthchecks
|
||||
builder.Services.AddHealthChecks()
|
||||
.AddSqlServer(connectionString, healthQuery: "SELECT 1;", name: "SqlServer", failureStatus: HealthStatus.Degraded, tags: new string[] { "DB", "MsSql" })
|
||||
.AddAsyncCheck($"DB PING ({dbServerAddr})", () => WebDoorCreator.API.Health.Checks.PingCheck(dbServerAddr))
|
||||
.AddAsyncCheck($"Redis PING ({redisSrvAddr})", () => WebDoorCreator.API.Health.Checks.PingCheck(redisSrvAddr))
|
||||
// 512 MB max allocated memory
|
||||
.AddProcessAllocatedMemoryHealthCheck(512, "Max Process memory (<512MB)", failureStatus: HealthStatus.Degraded)
|
||||
.AddRedis(connStringRedis, "Redis", failureStatus: HealthStatus.Degraded)
|
||||
.AddAsyncCheck($"Config Table", () => WebDoorCreator.API.Health.Checks.ConfigCount(configuration))
|
||||
.AddAsyncCheck($"Orders Table", () => WebDoorCreator.API.Health.Checks.OrdersCount(configuration))
|
||||
.AddAsyncCheck($"Doors Table", () => WebDoorCreator.API.Health.Checks.DoorsCount(configuration))
|
||||
;
|
||||
|
||||
#if false
|
||||
builder.Services
|
||||
.AddHealthChecksUI(s =>
|
||||
{
|
||||
s.AddHealthCheckEndpoint("WDC_API_HC", "health");
|
||||
s.SetEvaluationTimeInSeconds(60);
|
||||
s.SetMinimumSecondsBetweenFailureNotifications(120);
|
||||
s.SetApiMaxActiveRequests(5);
|
||||
s.SetHeaderText("WDC.API Health Check Status");
|
||||
})
|
||||
.AddInMemoryStorage();
|
||||
#endif
|
||||
|
||||
// abilitazione x email management con MailKit
|
||||
//builder.Services.AddTransient<IEmailSender, MailKitEmailSender>();
|
||||
builder.Services.AddSingleton<IEmailSender, MailKitEmailSender>();
|
||||
@@ -71,24 +140,24 @@ if (app.Environment.IsDevelopment() || app.Environment.IsStaging())
|
||||
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();
|
||||
|
||||
// config healthcheck: https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/health-checks
|
||||
// prende tutti i predicati
|
||||
app.MapHealthChecks("/health", new HealthCheckOptions
|
||||
{
|
||||
Predicate = _ => true,
|
||||
ResponseWriter = UIResponseWriter.WriteHealthCheckUIResponse
|
||||
});
|
||||
|
||||
// nasconde tutti i dettagli
|
||||
app.MapHealthChecks("/health/live", new HealthCheckOptions
|
||||
{
|
||||
Predicate = _ => false
|
||||
});
|
||||
|
||||
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://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://wdc-w-iis-01.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>wdc.egalware.com/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>steamware</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+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACWZ0w5h84UFtYYB4xT+4rFAAAAAASAAACgAAAAEAAAAIcwjcdAiCDZN1OwNWoZSfQYAAAAiyiNcp/zeuC6Vt16+OALvsaO0rbkiVMVFAAAAHS264wElPIM4sYvPHMhW0YsXNe9</EncryptedPassword>
|
||||
<History>True|2024-04-19T17:27:31.3742108Z;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;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://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://wdc-w-iis-02.ovh:8172/MsDeploy.axd</MSDeployServiceURL>
|
||||
<DeployIisAppPath>wdc.egalware.com/SRV</DeployIisAppPath>
|
||||
<RemoteSitePhysicalPath />
|
||||
<SkipExtraFilesOnServer>false</SkipExtraFilesOnServer>
|
||||
<MSDeployPublishMethod>WMSVC</MSDeployPublishMethod>
|
||||
<EnableMSDeployBackup>true</EnableMSDeployBackup>
|
||||
<EnableMsDeployAppOffline>true</EnableMsDeployAppOffline>
|
||||
<UserName>steamware</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+sBAAAAs/7D3mNhw0uqUXeNq4OiHAAAAAACAAAAAAADZgAAwAAAABAAAACWZ0w5h84UFtYYB4xT+4rFAAAAAASAAACgAAAAEAAAAIcwjcdAiCDZN1OwNWoZSfQYAAAAiyiNcp/zeuC6Vt16+OALvsaO0rbkiVMVFAAAAHS264wElPIM4sYvPHMhW0YsXNe9</EncryptedPassword>
|
||||
<History>True|2024-04-19T17:27:31.3742108Z;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;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://wdc.egalware.com/UI/swagger/index.html</SiteUrlToLaunchAfterPublish>
|
||||
<ExcludeApp_Data>false</ExcludeApp_Data>
|
||||
<ProjectGuid>c2109e71-4eae-4167-9052-175123ccc2bc</ProjectGuid>
|
||||
<SelfContained>false</SelfContained>
|
||||
<MSDeployServiceURL>https://wdc-w-iis-01.ovh: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>steamware</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+sBAAAANAh+Q4GwYESjv9I3Vz/gKgAAAAACAAAAAAADZgAAwAAAABAAAAAZCj4Je1goQrORLePgnlVVAAAAAASAAACgAAAAEAAAAGZfY+EFaA+HwqpXWVf0/JgYAAAAz5wRfMtrjB7GbijGZUlW6g9q8ulJwQecFAAAADgQDtnMlYLrSQDGZI7Dg2OKfUhu</EncryptedPassword>
|
||||
<History>True|2024-04-19T17:25:01.4640398Z;False|2024-04-19T19:21:34.3241722+02:00;False|2024-04-19T19:15:31.0848527+02:00;False|2024-04-19T19:11:09.2511710+02:00;False|2024-04-19T19:09:49.4254115+02:00;False|2024-04-19T19:08:44.7222054+02:00;False|2024-04-19T19:01:26.7064709+02:00;False|2024-04-19T18:59:58.4177224+02:00;False|2024-04-19T18:59:10.9459272+02:00;False|2024-04-19T16:51:43.3272308+02:00;False|2024-04-19T16:41:46.2086401+02:00;False|2024-04-19T16:41:31.3019711+02:00;False|2024-04-19T16:08:22.4275238+02:00;False|2024-04-19T16:05:18.6039531+02:00;False|2024-04-19T15:59:02.0838144+02:00;True|2024-02-15T19:34:35.8362293+01:00;False|2024-02-15T19:33:47.6399861+01:00;True|2024-02-13T17:40:01.6315651+01:00;False|2024-02-13T17:37:21.2072257+01:00;False|2024-02-13T17:33:33.1471911+01:00;True|2023-05-22T15:37:00.8611764+02:00;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>
|
||||
@@ -1,23 +1,14 @@
|
||||
{
|
||||
"$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"
|
||||
}
|
||||
},
|
||||
"dotnetRunMessages": true,
|
||||
"applicationUrl": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"IIS Express": {
|
||||
"commandName": "IISExpress",
|
||||
@@ -26,6 +17,25 @@
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
}
|
||||
},
|
||||
"WSL": {
|
||||
"commandName": "WSL2",
|
||||
"launchBrowser": true,
|
||||
"launchUrl": "https://localhost:7043/swagger",
|
||||
"environmentVariables": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development",
|
||||
"ASPNETCORE_URLS": "https://localhost:7043;http://localhost:5240"
|
||||
},
|
||||
"distributionName": ""
|
||||
}
|
||||
},
|
||||
"$schema": "https://json.schemastore.org/launchsettings.json",
|
||||
"iisSettings": {
|
||||
"windowsAuthentication": false,
|
||||
"anonymousAuthentication": true,
|
||||
"iisExpress": {
|
||||
"applicationUrl": "http://localhost:33043",
|
||||
"sslPort": 44387
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4,9 +4,13 @@
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<Nullable>enable</Nullable>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<UserSecretsId>36a4225d-c8d7-4b97-b6db-6ab2af37bfde</UserSecretsId>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-OVH-PROD-test.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS-PROD.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS01.pubxml" />
|
||||
<_WebToolingArtifacts Remove="Properties\PublishProfiles\IIS02.pubxml" />
|
||||
@@ -14,18 +18,34 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="Properties\PublishProfiles\IIS-OVH-IIS02.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS-OVH-PROD-test.pubxml.user" />
|
||||
<None Include="Properties\PublishProfiles\IIS-OVH-IIS01.pubxml.user" />
|
||||
<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="AspNetCore.HealthChecks.Redis" Version="6.0.4" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.SqlServer" Version="6.0.2" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.System" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Client" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.Core" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.UI.InMemory.Storage" Version="6.0.5" />
|
||||
<PackageReference Include="AspNetCore.HealthChecks.Uris" Version="6.0.3" />
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks" Version="6.0.29" />
|
||||
<PackageReference Include="Microsoft.Extensions.Diagnostics.HealthChecks.Abstractions" Version="6.0.29" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="SkiaSharp" Version="2.88.8" />
|
||||
<PackageReference Include="SkiaSharp.NativeAssets.Linux.NoDependencies" Version="2.88.3" />
|
||||
<PackageReference Include="StackExchange.Redis" Version="2.6.122" />
|
||||
<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" />
|
||||
<PackageReference Include="Svg.Skia" Version="1.0.0" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -34,6 +54,9 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Update="logs\.placeholder.txt">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
<None Update="Reports\Report.rdlc">
|
||||
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
|
||||
</None>
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"Logging": {
|
||||
"LogLevel": {
|
||||
"Default": "Information",
|
||||
"Microsoft.AspNetCore": "Warning"
|
||||
}
|
||||
},
|
||||
"ConnectionStrings": {
|
||||
"Redis": "wdc-u-redis-01.ovh:6379, DefaultDatabase=12, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false, password=BtN9Py1wtLfLRvmzWnOPJ7RytDM+CLiVsJ/16zduNTlV8IOPGNrtzJSXPUnImA5PqmUMhKaUqo9NdHIG",
|
||||
"WDC.DB": "Server=WDC-W-SQL-01\\SQLEXPRESS;Database=DCA_WebDoorCreator; User ID=steamware;Password=viadante16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.UI;"
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,8 @@
|
||||
},
|
||||
"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;"
|
||||
"Redis": "redis.ufficio:26379,serviceName=devel, DefaultDatabase=11, connectTimeout=5000, syncTimeout=5000, asyncTimeout=5000, abortConnect=false, ssl=false",
|
||||
"WDC.DB": "Server=SQL2016DEV;Database=WebDoorCreator; User ID=sa;Password=keyhammer16; integrated security=False; MultipleActiveResultSets=True; App=WebDoorCreator.SRV;"
|
||||
},
|
||||
"ExternalProviders": {
|
||||
"MailKit": {
|
||||
@@ -24,10 +24,13 @@
|
||||
},
|
||||
"MailDest": {
|
||||
"Admin": "samuele@steamware.net",
|
||||
"ProjCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com,mara.baroni@egalware.com"
|
||||
"ProjCheck": "samuele.locatelli@egalware.com",
|
||||
"TimbCheck": "samuele.locatelli@egalware.com"
|
||||
},
|
||||
"RumtimeOpt": {
|
||||
"VetoRemoveProcessing": 5
|
||||
"RuntimeOpt": {
|
||||
"WaitReloadSvg": 200,
|
||||
"VetoRemoveProcessing": 5,
|
||||
"StatSampleSize": 30,
|
||||
"LogTimingEnable": true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,17 +10,27 @@ EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
Debug|x64 = Debug|x64
|
||||
Release|Any CPU = Release|Any CPU
|
||||
Release|x64 = Release|x64
|
||||
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}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Debug|x64.Build.0 = Debug|x64
|
||||
{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
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Release|x64.ActiveCfg = Release|x64
|
||||
{96266312-9739-4F12-A6C2-16C1CAFDDA6E}.Release|x64.Build.0 = Release|x64
|
||||
{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}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Debug|x64.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
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{4A07ADFC-CA24-4135-BA97-3B8E5D49BC09}.Release|x64.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
'----------------------------------------------------------------------------
|
||||
' EgalTech 2015-2015
|
||||
'----------------------------------------------------------------------------
|
||||
' File : ConstIni.vb Data : 12.02.15 Versione : 1.6b3
|
||||
' Contenuto : Modulo costanti sezione e chiavi per file Ini.
|
||||
'
|
||||
'
|
||||
'
|
||||
' Modifiche : 12.02.15 DS Creazione modulo.
|
||||
'
|
||||
'
|
||||
'----------------------------------------------------------------------------
|
||||
|
||||
Public Module ConstIni
|
||||
|
||||
' massimo numero di istanze del programma ammesse
|
||||
Public Const MAX_INST As Integer = 32
|
||||
|
||||
' File con dati di licenza
|
||||
Public Const LIC_FILE_NAME As String = "WebDoorCreator.CamSrv.lic"
|
||||
Public Const S_LICENCE As String = "Licence"
|
||||
Public Const K_LOCKID As String = "LockId"
|
||||
Public Const K_KEY As String = "Key"
|
||||
|
||||
' File di log generale
|
||||
Public Const GENLOG_FILE_NAME As String = "WebDoorCreator.CamSrv#.txt"
|
||||
|
||||
Public Const INI_FILE_NAME As String = "WebDoorCreator.CamSrv.ini"
|
||||
|
||||
Public Const S_GENERAL As String = "General"
|
||||
Public Const K_DEBUG As String = "Debug"
|
||||
Public Const K_LICENCE As String = "Licence"
|
||||
Public Const K_NETKEY As String = "NetKey"
|
||||
Public Const K_USERLEVEL As String = "UserLevel"
|
||||
Public Const K_MAXINST As String = "MaxInstances"
|
||||
Public Const K_INSTANCES As String = "Instances"
|
||||
Public Const K_COMMANDLOG As String = "CommandLog"
|
||||
Public Const K_STARTINSTANCES As String = "StartInstances"
|
||||
Public Const K_PROCESSPATH As String = "ProcessPath"
|
||||
Public Const K_PROCESSATSTART As String = "ProcessAtStart"
|
||||
Public Const K_BASEURL As String = "BaseUrl"
|
||||
Public Const K_BASEIP As String = "BaseIp"
|
||||
Public Const K_MUTEXNAME As String = "MutexName"
|
||||
|
||||
End Module
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' by using the '*' as shown below:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
<Assembly: AssemblyVersion("2.5.6.1")>
|
||||
<Assembly: AssemblyFileVersion("2.5.6.1")>
|
||||
|
||||
+93
-74
@@ -49,22 +49,24 @@ Partial Class ProcMan
|
||||
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.ColumnHeader4 = CType(New System.Windows.Forms.ColumnHeader(), System.Windows.Forms.ColumnHeader)
|
||||
Me.ColumnHeader3 = 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.Button1 = New System.Windows.Forms.Button()
|
||||
Me.TimerResetProcessing = New System.Windows.Forms.Timer(Me.components)
|
||||
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.Location = New System.Drawing.Point(19, 20)
|
||||
Me.btnTestPing.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.btnTestPing.Name = "btnTestPing"
|
||||
Me.btnTestPing.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnTestPing.Size = New System.Drawing.Size(112, 35)
|
||||
Me.btnTestPing.TabIndex = 0
|
||||
Me.btnTestPing.Text = "Test Ping"
|
||||
Me.btnTestPing.UseVisualStyleBackColor = True
|
||||
@@ -72,39 +74,39 @@ Partial Class ProcMan
|
||||
'lblpingTest
|
||||
'
|
||||
Me.lblpingTest.AutoSize = True
|
||||
Me.lblpingTest.Location = New System.Drawing.Point(153, 22)
|
||||
Me.lblpingTest.Location = New System.Drawing.Point(172, 28)
|
||||
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.Size = New System.Drawing.Size(36, 20)
|
||||
Me.lblpingTest.TabIndex = 1
|
||||
Me.lblpingTest.Text = "???"
|
||||
'
|
||||
'lblTestAlive
|
||||
'
|
||||
Me.lblTestAlive.AutoSize = True
|
||||
Me.lblTestAlive.Location = New System.Drawing.Point(365, 22)
|
||||
Me.lblTestAlive.Location = New System.Drawing.Point(411, 28)
|
||||
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.Size = New System.Drawing.Size(36, 20)
|
||||
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.Location = New System.Drawing.Point(258, 20)
|
||||
Me.btnTestAlive.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.btnTestAlive.Name = "btnTestAlive"
|
||||
Me.btnTestAlive.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnTestAlive.Size = New System.Drawing.Size(112, 35)
|
||||
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.Location = New System.Drawing.Point(19, 251)
|
||||
Me.btnResetQueue.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.btnResetQueue.Name = "btnResetQueue"
|
||||
Me.btnResetQueue.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnResetQueue.Size = New System.Drawing.Size(112, 35)
|
||||
Me.btnResetQueue.TabIndex = 6
|
||||
Me.btnResetQueue.Text = "Reset Q"
|
||||
Me.btnResetQueue.UseVisualStyleBackColor = True
|
||||
@@ -114,41 +116,41 @@ Partial Class ProcMan
|
||||
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.Location = New System.Drawing.Point(18, 300)
|
||||
Me.txtOut.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.txtOut.MinimumSize = New System.Drawing.Size(88, 183)
|
||||
Me.txtOut.Multiline = True
|
||||
Me.txtOut.Name = "txtOut"
|
||||
Me.txtOut.Size = New System.Drawing.Size(99, 173)
|
||||
Me.txtOut.Size = New System.Drawing.Size(111, 215)
|
||||
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.Location = New System.Drawing.Point(19, 99)
|
||||
Me.btnQueueStatus.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.btnQueueStatus.Name = "btnQueueStatus"
|
||||
Me.btnQueueStatus.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnQueueStatus.Size = New System.Drawing.Size(112, 35)
|
||||
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.Location = New System.Drawing.Point(19, 29)
|
||||
Me.StartProcess.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.StartProcess.Name = "StartProcess"
|
||||
Me.StartProcess.Size = New System.Drawing.Size(100, 28)
|
||||
Me.StartProcess.Size = New System.Drawing.Size(112, 35)
|
||||
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.Location = New System.Drawing.Point(366, 28)
|
||||
Me.StopProcess.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.StopProcess.Name = "StopProcess"
|
||||
Me.StopProcess.Size = New System.Drawing.Size(100, 28)
|
||||
Me.StopProcess.Size = New System.Drawing.Size(112, 35)
|
||||
Me.StopProcess.TabIndex = 10
|
||||
Me.StopProcess.Text = "Stop"
|
||||
Me.StopProcess.UseVisualStyleBackColor = True
|
||||
@@ -157,17 +159,17 @@ Partial Class ProcMan
|
||||
'
|
||||
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.Location = New System.Drawing.Point(0, 659)
|
||||
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.Padding = New System.Windows.Forms.Padding(1, 0, 21, 0)
|
||||
Me.StatusStrip1.Size = New System.Drawing.Size(828, 26)
|
||||
Me.StatusStrip1.TabIndex = 11
|
||||
Me.StatusStrip1.Text = "StatusStrip1"
|
||||
'
|
||||
'tsProgBar
|
||||
'
|
||||
Me.tsProgBar.Name = "tsProgBar"
|
||||
Me.tsProgBar.Size = New System.Drawing.Size(133, 14)
|
||||
Me.tsProgBar.Size = New System.Drawing.Size(150, 18)
|
||||
Me.tsProgBar.Step = 1
|
||||
'
|
||||
'txtQueue
|
||||
@@ -175,42 +177,42 @@ Partial Class ProcMan
|
||||
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.Location = New System.Drawing.Point(19, 142)
|
||||
Me.txtQueue.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.txtQueue.Multiline = True
|
||||
Me.txtQueue.Name = "txtQueue"
|
||||
Me.txtQueue.Size = New System.Drawing.Size(99, 78)
|
||||
Me.txtQueue.Size = New System.Drawing.Size(111, 96)
|
||||
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.Location = New System.Drawing.Point(148, 38)
|
||||
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.Size = New System.Drawing.Size(44, 20)
|
||||
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.Location = New System.Drawing.Point(192, 32)
|
||||
Me.txtNumThread.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.txtNumThread.Name = "txtNumThread"
|
||||
Me.txtNumThread.Size = New System.Drawing.Size(41, 22)
|
||||
Me.txtNumThread.Size = New System.Drawing.Size(46, 26)
|
||||
Me.txtNumThread.TabIndex = 14
|
||||
Me.txtNumThread.Text = "1"
|
||||
Me.txtNumThread.Text = "0"
|
||||
Me.txtNumThread.TextAlign = System.Windows.Forms.HorizontalAlignment.Right
|
||||
'
|
||||
'lblRunning
|
||||
'
|
||||
Me.lblRunning.AutoSize = True
|
||||
Me.lblRunning.Location = New System.Drawing.Point(221, 30)
|
||||
Me.lblRunning.Location = New System.Drawing.Point(249, 38)
|
||||
Me.lblRunning.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||
Me.lblRunning.MinimumSize = New System.Drawing.Size(100, 0)
|
||||
Me.lblRunning.MinimumSize = New System.Drawing.Size(112, 0)
|
||||
Me.lblRunning.Name = "lblRunning"
|
||||
Me.lblRunning.Size = New System.Drawing.Size(100, 16)
|
||||
Me.lblRunning.Size = New System.Drawing.Size(112, 20)
|
||||
Me.lblRunning.TabIndex = 15
|
||||
Me.lblRunning.Text = "running: -"
|
||||
Me.lblRunning.TextAlign = System.Drawing.ContentAlignment.MiddleCenter
|
||||
@@ -226,10 +228,10 @@ Partial Class ProcMan
|
||||
'
|
||||
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.Location = New System.Drawing.Point(19, 74)
|
||||
Me.LISTThreadStatus.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.LISTThreadStatus.Name = "LISTThreadStatus"
|
||||
Me.LISTThreadStatus.Size = New System.Drawing.Size(536, 173)
|
||||
Me.LISTThreadStatus.Size = New System.Drawing.Size(602, 215)
|
||||
Me.LISTThreadStatus.TabIndex = 16
|
||||
Me.LISTThreadStatus.UseCompatibleStateImageBehavior = False
|
||||
Me.LISTThreadStatus.View = System.Windows.Forms.View.Details
|
||||
@@ -259,11 +261,11 @@ Partial Class ProcMan
|
||||
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.Location = New System.Drawing.Point(177, 99)
|
||||
Me.GroupBox1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
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.Padding = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.GroupBox1.Size = New System.Drawing.Size(633, 548)
|
||||
Me.GroupBox1.TabIndex = 17
|
||||
Me.GroupBox1.TabStop = False
|
||||
Me.GroupBox1.Text = "Threads"
|
||||
@@ -272,10 +274,10 @@ Partial Class ProcMan
|
||||
'
|
||||
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.Location = New System.Drawing.Point(19, 321)
|
||||
Me.ThreadCurrentStatusList.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.ThreadCurrentStatusList.Name = "ThreadCurrentStatusList"
|
||||
Me.ThreadCurrentStatusList.Size = New System.Drawing.Size(536, 173)
|
||||
Me.ThreadCurrentStatusList.Size = New System.Drawing.Size(602, 215)
|
||||
Me.ThreadCurrentStatusList.TabIndex = 18
|
||||
Me.ThreadCurrentStatusList.UseCompatibleStateImageBehavior = False
|
||||
Me.ThreadCurrentStatusList.View = System.Windows.Forms.View.Details
|
||||
@@ -290,25 +292,37 @@ Partial Class ProcMan
|
||||
Me.ColumnHeader2.Text = "Thread Status"
|
||||
Me.ColumnHeader2.Width = 100
|
||||
'
|
||||
'ColumnHeader4
|
||||
'
|
||||
Me.ColumnHeader4.DisplayIndex = 3
|
||||
Me.ColumnHeader4.Text = "Thread Phase"
|
||||
Me.ColumnHeader4.Width = 100
|
||||
'
|
||||
'ColumnHeader3
|
||||
'
|
||||
Me.ColumnHeader3.DisplayIndex = 2
|
||||
Me.ColumnHeader3.Text = "Process Status"
|
||||
Me.ColumnHeader3.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.Location = New System.Drawing.Point(489, 32)
|
||||
Me.chkStatAggr.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.chkStatAggr.Name = "chkStatAggr"
|
||||
Me.chkStatAggr.Size = New System.Drawing.Size(91, 20)
|
||||
Me.chkStatAggr.Size = New System.Drawing.Size(111, 24)
|
||||
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.Location = New System.Drawing.Point(688, 20)
|
||||
Me.btnExportStats.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.btnExportStats.Name = "btnExportStats"
|
||||
Me.btnExportStats.Size = New System.Drawing.Size(100, 28)
|
||||
Me.btnExportStats.Size = New System.Drawing.Size(112, 35)
|
||||
Me.btnExportStats.TabIndex = 18
|
||||
Me.btnExportStats.Text = "Export Stats"
|
||||
Me.btnExportStats.UseVisualStyleBackColor = True
|
||||
@@ -316,10 +330,10 @@ Partial Class ProcMan
|
||||
'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.Location = New System.Drawing.Point(523, 26)
|
||||
Me.chkAutoRestart.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.chkAutoRestart.Name = "chkAutoRestart"
|
||||
Me.chkAutoRestart.Size = New System.Drawing.Size(99, 20)
|
||||
Me.chkAutoRestart.Size = New System.Drawing.Size(122, 24)
|
||||
Me.chkAutoRestart.TabIndex = 19
|
||||
Me.chkAutoRestart.Text = "AutoRestart"
|
||||
Me.chkAutoRestart.UseVisualStyleBackColor = True
|
||||
@@ -328,23 +342,26 @@ Partial Class ProcMan
|
||||
'
|
||||
Me.TimerCheck.Interval = 30000
|
||||
'
|
||||
'ColumnHeader3
|
||||
'Button1
|
||||
'
|
||||
Me.ColumnHeader3.DisplayIndex = 2
|
||||
Me.ColumnHeader3.Text = "Process Status"
|
||||
Me.ColumnHeader3.Width = 100
|
||||
Me.Button1.Location = New System.Drawing.Point(688, 65)
|
||||
Me.Button1.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.Button1.Name = "Button1"
|
||||
Me.Button1.Size = New System.Drawing.Size(112, 35)
|
||||
Me.Button1.TabIndex = 20
|
||||
Me.Button1.Text = "Kill All Procs"
|
||||
Me.Button1.UseVisualStyleBackColor = True
|
||||
'
|
||||
'ColumnHeader4
|
||||
'TimerResetProcessing
|
||||
'
|
||||
Me.ColumnHeader4.DisplayIndex = 3
|
||||
Me.ColumnHeader4.Text = "Thread Phase"
|
||||
Me.ColumnHeader4.Width = 100
|
||||
Me.TimerResetProcessing.Interval = 3000
|
||||
'
|
||||
'ProcMan
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 16.0!)
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(9.0!, 20.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(736, 548)
|
||||
Me.ClientSize = New System.Drawing.Size(828, 685)
|
||||
Me.Controls.Add(Me.Button1)
|
||||
Me.Controls.Add(Me.chkAutoRestart)
|
||||
Me.Controls.Add(Me.btnExportStats)
|
||||
Me.Controls.Add(Me.GroupBox1)
|
||||
@@ -358,7 +375,7 @@ Partial Class ProcMan
|
||||
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.Margin = New System.Windows.Forms.Padding(4, 5, 4, 5)
|
||||
Me.Name = "ProcMan"
|
||||
Me.Text = "MainForm"
|
||||
Me.StatusStrip1.ResumeLayout(False)
|
||||
@@ -401,4 +418,6 @@ Partial Class ProcMan
|
||||
Friend WithEvents ColumnHeader2 As ColumnHeader
|
||||
Friend WithEvents ColumnHeader3 As ColumnHeader
|
||||
Friend WithEvents ColumnHeader4 As ColumnHeader
|
||||
Friend WithEvents Button1 As Button
|
||||
Friend WithEvents TimerResetProcessing As Timer
|
||||
End Class
|
||||
|
||||
@@ -129,6 +129,9 @@
|
||||
<metadata name="TimerCheck.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>354, 17</value>
|
||||
</metadata>
|
||||
<metadata name="TimerResetProcessing.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
||||
<value>511, 22</value>
|
||||
</metadata>
|
||||
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<data name="$this.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
|
||||
+627
-159
@@ -1,8 +1,10 @@
|
||||
Imports System.IO
|
||||
Imports System.Net.NetworkInformation
|
||||
Imports System.Reflection
|
||||
Imports System.Text
|
||||
Imports System.Threading
|
||||
Imports WebDoorCreator.SDK
|
||||
Imports EgtUILib
|
||||
|
||||
Public Class ProcMan
|
||||
|
||||
@@ -46,8 +48,10 @@ Public Class ProcMan
|
||||
|
||||
Dim codPost As String = "WRK001"
|
||||
|
||||
Dim sEgtEnginePath As String = ""
|
||||
|
||||
' nome macchina calcolo
|
||||
Dim currWDC As WDC = New WDC(baseIp, baseUrl, codPost)
|
||||
Dim currWDC As WDC
|
||||
|
||||
Dim idxSim As Integer = 0
|
||||
|
||||
@@ -57,6 +61,17 @@ Public Class ProcMan
|
||||
|
||||
Dim m_ExecutionThread As Thread
|
||||
|
||||
Dim m_LastCrashedProcTime As DateTime
|
||||
|
||||
Private m_StatList As New List(Of ThreadStat)
|
||||
|
||||
Public Enum ProgramStatuses As Integer
|
||||
START = 1
|
||||
[STOP] = 2
|
||||
End Enum
|
||||
|
||||
Dim m_ProgramStatus As ProgramStatuses = ProgramStatuses.STOP
|
||||
|
||||
'Private m_MaxCamInstances As Integer = 8
|
||||
Private m_MaxCamInstances As Integer = 1
|
||||
|
||||
@@ -65,6 +80,9 @@ Public Class ProcMan
|
||||
Dim ThreadList As Thread()
|
||||
|
||||
Dim ThreadDataList As ThreadData()
|
||||
Dim HistoryThreadDataList As New List(Of ThreadStat)
|
||||
|
||||
Dim m_bCheckOrder As Boolean = True
|
||||
|
||||
Dim m_bPingOk As Boolean = False
|
||||
Dim m_bAliveOk As Boolean = False
|
||||
@@ -82,6 +100,52 @@ Public Class ProcMan
|
||||
|
||||
Private Class ThreadData
|
||||
|
||||
Public Enum ProcComm As Integer
|
||||
Null = 0
|
||||
WaitingAnswer = 1
|
||||
AnswerReceived = 2
|
||||
End Enum
|
||||
|
||||
Private m_CurrRequest As KeyValuePair(Of String, String)
|
||||
Public ReadOnly Property CurrRequest As KeyValuePair(Of String, String)
|
||||
Get
|
||||
Return m_CurrRequest
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetCurrRequest(value As KeyValuePair(Of String, String))
|
||||
m_CurrRequest = value
|
||||
End Sub
|
||||
|
||||
Private m_sDdfPath As String
|
||||
Public ReadOnly Property sDdfPath As String
|
||||
Get
|
||||
Return m_sDdfPath
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetDdfPath(value As String)
|
||||
m_sDdfPath = value
|
||||
End Sub
|
||||
|
||||
Private m_WaitProcAnswer As ProcComm = ProcComm.Null
|
||||
Public ReadOnly Property WaitProcAnswer As ProcComm
|
||||
Get
|
||||
Return m_WaitProcAnswer
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetWaitProcAnswer(value As ProcComm)
|
||||
m_WaitProcAnswer = value
|
||||
End Sub
|
||||
|
||||
Private m_nProcResult As Integer
|
||||
Public ReadOnly Property nProcResult As Integer
|
||||
Get
|
||||
Return m_nProcResult
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetProcResult(value As Integer)
|
||||
m_nProcResult = value
|
||||
End Sub
|
||||
|
||||
Private m_ThreadOperation As ThreadOperations
|
||||
Public ReadOnly Property ThreadOperation As ThreadOperations
|
||||
Get
|
||||
@@ -102,10 +166,105 @@ Public Class ProcMan
|
||||
m_Process = value
|
||||
End Sub
|
||||
|
||||
Private m_ThreadStat As ThreadStat
|
||||
Public ReadOnly Property ThreadStat As ThreadStat
|
||||
Get
|
||||
Return m_ThreadStat
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetThreadStat(value As ThreadStat)
|
||||
m_ThreadStat = value
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ThreadStat
|
||||
|
||||
Private m_nIndex As Integer
|
||||
Public ReadOnly Property nIndex As Integer
|
||||
Get
|
||||
Return m_nIndex
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StartThread As DateTime
|
||||
Public ReadOnly Property StartThread As DateTime
|
||||
Get
|
||||
Return m_StartThread
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StopThread As DateTime
|
||||
Public ReadOnly Property StopThread As DateTime
|
||||
Get
|
||||
Return m_StopThread
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetStopThread(value As DateTime)
|
||||
m_StopThread = value
|
||||
End Sub
|
||||
|
||||
Private m_ProcExecutionList As New List(Of ProcStat)
|
||||
Public ReadOnly Property ProcExecutionList As List(Of ProcStat)
|
||||
Get
|
||||
Return m_ProcExecutionList
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Sub New(nIndex As Integer)
|
||||
m_nIndex = nIndex
|
||||
End Sub
|
||||
|
||||
Sub New(nIndex As Integer, StartThread As DateTime)
|
||||
MyClass.New(nIndex)
|
||||
m_StartThread = StartThread
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
Public Class ProcStat
|
||||
|
||||
Private m_StartProc As DateTime
|
||||
Public ReadOnly Property StartProc As DateTime
|
||||
Get
|
||||
Return m_StartProc
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private m_StopProc As DateTime
|
||||
Public ReadOnly Property StopProc As DateTime
|
||||
Get
|
||||
Return m_StopProc
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub SetStopProc(value As DateTime)
|
||||
m_StopProc = value
|
||||
End Sub
|
||||
|
||||
Private m_nDoneRequests As Integer = 0
|
||||
Public ReadOnly Property nDoneRequests As Integer
|
||||
Get
|
||||
Return m_nDoneRequests
|
||||
End Get
|
||||
End Property
|
||||
Friend Sub IncrementDoneRequest()
|
||||
m_nDoneRequests += 1
|
||||
End Sub
|
||||
|
||||
Sub New(StartProc As DateTime)
|
||||
m_StartProc = StartProc
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
#Region "Private Methods"
|
||||
|
||||
Private Sub Form_Shown() Handles MyBase.Shown
|
||||
If GetPrivateProfileInt(S_GENERAL, K_PROCESSATSTART, 1, m_IniFilePath) = 1 Then
|
||||
startAllThreads()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub UpdateThreadCurrentStatus()
|
||||
synchronizationContext.Post(New SendOrPostCallback(
|
||||
Sub(o)
|
||||
@@ -121,15 +280,16 @@ Public Class ProcMan
|
||||
' ThreadProcessState = ThreadDataList(ThreadIndex).Process.HasExited
|
||||
'End If
|
||||
ThreadCurrentStatusList.Items.Add(New ListViewItem(New String() {ThreadIndex,
|
||||
ThreadList(ThreadIndex).ThreadState.ToString(),
|
||||
If(Not IsNothing(ThreadList(ThreadIndex)), ThreadList(ThreadIndex).ThreadState.ToString(), ""),
|
||||
ThreadProcessState,
|
||||
ThreadDataList(ThreadIndex).ThreadOperation.ToString()}))
|
||||
If(Not IsNothing(ThreadDataList(ThreadIndex)), 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()
|
||||
@@ -161,6 +321,7 @@ Public Class ProcMan
|
||||
End Sub
|
||||
|
||||
Private Sub DisplayQueueStatus()
|
||||
If IsNothing(currWDC) Then Return
|
||||
Dim queueStatus As New Dictionary(Of String, Long)
|
||||
queueStatus = currWDC.queueStatus
|
||||
Dim sb As StringBuilder
|
||||
@@ -175,12 +336,12 @@ Public Class ProcMan
|
||||
|
||||
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
|
||||
Dim nStartingProc As Integer = 0
|
||||
While Not bStopMainProcess
|
||||
bStopMainProcess = m_bStopProcess
|
||||
Dim bOk As Boolean = False
|
||||
@@ -252,32 +413,80 @@ Public Class ProcMan
|
||||
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
|
||||
If ThreadIndex < ThreadList.Count Then
|
||||
Dim Thread = ThreadList(ThreadIndex)
|
||||
If Not IsNothing(Thread) Then
|
||||
If Thread.ThreadState = ThreadState.Stopped OrElse Thread.ThreadState = ThreadState.Aborted OrElse
|
||||
Thread.ThreadState = ThreadState.Suspended OrElse IsNothing(ThreadDataList(ThreadIndex).Process) OrElse (Not IsNothing(ThreadDataList(ThreadIndex).Process) AndAlso ThreadDataList(ThreadIndex).Process.HasExited) Then
|
||||
Dim nActiveProc As Integer = 0
|
||||
If ThreadIndex < ThreadDataList.Count Then
|
||||
Dim CurrThreadStat As ThreadStat = ThreadDataList(ThreadIndex).ThreadStat
|
||||
Dim CurrProcess As ProcStat = Nothing
|
||||
If Not IsNothing(CurrThreadStat) Then
|
||||
CurrProcess = CurrThreadStat.ProcExecutionList(CurrThreadStat.ProcExecutionList.Count - 1)
|
||||
If Not IsNothing(CurrProcess) AndAlso CurrProcess.StopProc = DateTime.MinValue Then CurrProcess.SetStopProc(DateTime.Now)
|
||||
If CurrThreadStat.StopThread = DateTime.MinValue Then CurrThreadStat.SetStopThread(DateTime.Now)
|
||||
End If
|
||||
' verifico se posso rilanciarlo
|
||||
For nIndex As Integer = 0 To m_MaxCamInstances - 1
|
||||
If nIndex < ThreadDataList.Count Then
|
||||
Dim IndexThreadStat As ThreadStat = ThreadDataList(nIndex).ThreadStat
|
||||
If Not IsNothing(IndexThreadStat) Then
|
||||
If IndexThreadStat.ProcExecutionList.Count > 0 Then
|
||||
Dim IndexProcess As ProcStat = IndexThreadStat.ProcExecutionList(IndexThreadStat.ProcExecutionList.Count - 1)
|
||||
Dim random As New Random()
|
||||
Dim nRandWait As Integer = random.Next(15, 30)
|
||||
Dim RandTimeSpan As TimeSpan = TimeSpan.FromSeconds(nRandWait)
|
||||
'EgtOutLog("nIndex: " & nIndex)
|
||||
'EgtOutLog("Now: " & DateTime.Now)
|
||||
'EgtOutLog("Stop process: " & IndexProcess.StopProc)
|
||||
'EgtOutLog("nRandWait: " & nRandWait)
|
||||
'EgtOutLog("RandTimeSpan: " & RandTimeSpan.ToString)
|
||||
If Not IsNothing(IndexProcess) AndAlso Not IsNothing(CurrProcess) AndAlso (IndexProcess.StopProc = DateTime.MinValue OrElse (DateTime.Now - IndexProcess.StopProc) < TimeSpan.FromSeconds(nRandWait)) Then
|
||||
nActiveProc += 1
|
||||
'EgtOutLog("ActiveProc + 1")
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
'EgtOutLog("Conto processi attivi: " & nActiveProc)
|
||||
If nActiveProc + nStartingProc + 1 <= Math.Max(2, m_MaxCamInstances) Then
|
||||
nStartingProc += 1
|
||||
'EgtOutLog("Ne lancio un altro")
|
||||
' lo chiudo e rilancio
|
||||
If ThreadIndex < ThreadDataList.Count Then
|
||||
If Not IsNothing(ThreadDataList(ThreadIndex).Process) AndAlso Not ThreadDataList(ThreadIndex).Process.HasExited Then ThreadDataList(ThreadIndex).Process.Kill()
|
||||
Thread.Sleep(500)
|
||||
Thread.Abort()
|
||||
Thread.Sleep(500)
|
||||
While Not Thread.ThreadState = ThreadState.Aborted
|
||||
Thread.Sleep(100)
|
||||
End While
|
||||
Thread = Nothing
|
||||
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
|
||||
nStartingProc -= 1
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
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()
|
||||
If ThreadIndex < ThreadList.Count Then
|
||||
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
|
||||
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
|
||||
@@ -327,12 +536,22 @@ Public Class ProcMan
|
||||
'Thread.Sleep(100)
|
||||
'startAllThreads()
|
||||
End If
|
||||
|
||||
lblRunning.Text = $"threads: {ThreadCount()}/{m_MaxCamInstances}"
|
||||
Dim nRunningProcess As Integer = 0
|
||||
If Not IsNothing(ThreadDataList) Then
|
||||
For ThreadIndex = 0 To ThreadDataList.Count - 1
|
||||
Dim CurrThread As ThreadData = ThreadDataList(ThreadIndex)
|
||||
If Not IsNothing(CurrThread) Then
|
||||
If CurrThread.ThreadStat.StopThread = DateTime.MinValue Then
|
||||
nRunningProcess += 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
lblRunning.Text = $"threads: {ThreadCount()}/{m_MaxCamInstances}/{nRunningProcess}"
|
||||
lblRunning.Invalidate()
|
||||
DisplayQueueStatus()
|
||||
' colore btn start / stop...
|
||||
If m_bStopProcess Then
|
||||
If m_ProgramStatus = ProgramStatuses.STOP Then
|
||||
|
||||
StartProcess.BackColor = ButtonBase.DefaultBackColor
|
||||
StartProcess.ForeColor = ButtonBase.DefaultForeColor
|
||||
@@ -355,6 +574,7 @@ Public Class ProcMan
|
||||
End Sub
|
||||
|
||||
Private Sub startAllThreads()
|
||||
If m_ProgramStatus = ProgramStatuses.START Then Return
|
||||
m_bStopProcess = False
|
||||
m_bExecutionThreadStoped = False
|
||||
m_ExecutionThread = New Thread(Sub()
|
||||
@@ -364,6 +584,9 @@ Public Class ProcMan
|
||||
m_ExecutionThread.SetApartmentState(ApartmentState.STA)
|
||||
' avvio thread di gestione della macchina che avvia la connessione
|
||||
m_ExecutionThread.Start()
|
||||
|
||||
m_ProgramStatus = ProgramStatuses.START
|
||||
|
||||
#If False Then
|
||||
'' recupero Id dei DDF
|
||||
'Dim sDdfRoot As String = "c:\EgtData\WebDoor\Ddf"
|
||||
@@ -606,9 +829,14 @@ Public Class ProcMan
|
||||
' avvio il timer di refresh
|
||||
TimerProgBar.Enabled = True
|
||||
TimerProgBar.Start()
|
||||
|
||||
|
||||
TimerResetProcessing.Enabled = True
|
||||
TimerResetProcessing.Start()
|
||||
End Sub
|
||||
|
||||
Private Sub stopAllThreads()
|
||||
If m_ProgramStatus = ProgramStatuses.STOP Then Return
|
||||
m_bStopProcess = True
|
||||
While Not m_bExecutionThreadStoped
|
||||
Thread.Sleep(100)
|
||||
@@ -621,9 +849,7 @@ Public Class ProcMan
|
||||
m_ExecutionThread = Nothing
|
||||
End If
|
||||
ThreadList = Nothing
|
||||
' fix timer
|
||||
TimerProgBar.Enabled = False
|
||||
TimerProgBar.Stop()
|
||||
m_ProgramStatus = ProgramStatuses.STOP
|
||||
End Sub
|
||||
|
||||
Private Sub StopProcess_Click(sender As Object, e As EventArgs) Handles StopProcess.Click
|
||||
@@ -647,143 +873,230 @@ Public Class ProcMan
|
||||
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 CurrThreadStat As New ThreadStat(ThreadIndex, DateTime.Now)
|
||||
HistoryThreadDataList.Add(CurrThreadStat)
|
||||
MyThreadData.SetThreadStat(CurrThreadStat)
|
||||
Dim sDrive As String = "c" ' If(ThreadIndex Mod 2 = 0, "A", "B")
|
||||
Dim sCurrDdfDir As String = sDrive & ":\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 processo
|
||||
Dim Proc As Process = New Process()
|
||||
Proc.StartInfo.FileName = sEgtEnginePath
|
||||
Proc.StartInfo.RedirectStandardInput = True
|
||||
Proc.StartInfo.RedirectStandardOutput = True
|
||||
Proc.StartInfo.Arguments = ThreadIndex.ToString() & " """ & sDrive & ":\EgtData\WebDoor\TestPipe.lua"""
|
||||
Proc.StartInfo.UseShellExecute = False
|
||||
Proc.StartInfo.CreateNoWindow = True
|
||||
AddHandler Proc.OutputDataReceived, AddressOf Thread_OutputDataReceived
|
||||
|
||||
' 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
|
||||
If Proc.Start() Then
|
||||
Dim CurrPocStat As New ProcStat(DateTime.Now)
|
||||
CurrThreadStat.ProcExecutionList.Add(CurrPocStat)
|
||||
Proc.BeginOutputReadLine()
|
||||
MyThreadData.SetProcess(Proc)
|
||||
|
||||
' 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
|
||||
Dim nProc0Wait As Integer = 0
|
||||
' ciclo per leggere coda ed eseguire
|
||||
While Not m_bStopProcess AndAlso Not Proc.HasExited
|
||||
Select Case MyThreadData.WaitProcAnswer
|
||||
Case ThreadData.ProcComm.Null
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.WaitingData)
|
||||
' se c'e' qualcosa da processare
|
||||
Dim nNumTaskToProcess As Integer = 0
|
||||
If ThreadIndex = 0 Then
|
||||
nNumTaskToProcess = currWDC.numTask2proc
|
||||
If nNumTaskToProcess > 0 Then
|
||||
If Not m_bCheckOrder Then m_bCheckOrder = True
|
||||
Else
|
||||
If m_bCheckOrder Then m_bCheckOrder = False
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
ElseIf m_bCheckOrder Then
|
||||
nNumTaskToProcess = currWDC.numTask2proc
|
||||
If nNumTaskToProcess = 0 Then
|
||||
m_bCheckOrder = False
|
||||
End If
|
||||
stopWatch.Stop()
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
If m_bCheckOrder Then
|
||||
Dim LastRequest As Dictionary(Of String, CalcReqtDTO) = currWDC.queueList(1)
|
||||
If LastRequest.Count > 0 Then
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.FoundRequest)
|
||||
|
||||
' ToDo !!!
|
||||
' gestione cablata x soli svg...
|
||||
' da qui implementazione svg/3dm...
|
||||
If LastRequest.First().Value.MimeType = "3dm" Then
|
||||
End If
|
||||
|
||||
Dim ConvItem As KeyValuePair(Of String, String)
|
||||
ConvItem = New KeyValuePair(Of String, String)(LastRequest.First().Key, LastRequest.First().Value.DDF)
|
||||
MyThreadData.SetCurrRequest(ConvItem)
|
||||
|
||||
' vecchia versione
|
||||
'MyThreadData.SetCurrRequest(LastRequest.First())
|
||||
|
||||
Dim Item As KeyValuePair(Of String, String) = MyThreadData.CurrRequest
|
||||
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
|
||||
Try
|
||||
File.Delete(sFile)
|
||||
Catch ex As Exception
|
||||
End Try
|
||||
Next
|
||||
End If
|
||||
|
||||
' scrivo ddf
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.WritingDdf)
|
||||
MyThreadData.SetDdfPath(sCurrDdfDir & "\" & Item.Key & ".ddf")
|
||||
Dim sDdfPath As String = MyThreadData.sDdfPath
|
||||
Try
|
||||
File.WriteAllText(sDdfPath, Item.Value)
|
||||
Catch ex As Exception
|
||||
bOk = False
|
||||
End Try
|
||||
|
||||
If bOk Then
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.ProcessingDdf)
|
||||
|
||||
Proc.StandardInput.WriteLine(ThreadIndex & "," & sDdfPath)
|
||||
|
||||
MyThreadData.SetWaitProcAnswer(ThreadData.ProcComm.WaitingAnswer)
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
Else
|
||||
Thread.Sleep(100)
|
||||
End If
|
||||
Case ThreadData.ProcComm.WaitingAnswer
|
||||
Thread.Sleep(10)
|
||||
Case ThreadData.ProcComm.AnswerReceived
|
||||
Dim Item As KeyValuePair(Of String, String) = MyThreadData.CurrRequest
|
||||
Dim sDdfPath As String = MyThreadData.sDdfPath
|
||||
Dim bOk As Boolean = True
|
||||
' 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)
|
||||
' !!! ToDo: inserire TIPO di richiesta secondo quanto ricevuto....
|
||||
' invio risposta
|
||||
currRes.Validated = MyThreadData.nProcResult = 0 AndAlso bOk
|
||||
currRes.DoorIdVers = Item.Key
|
||||
' per ora cablato a svg, prendere da MimeType richiesta...
|
||||
currRes.MimeType = "svg"
|
||||
|
||||
' se NON fosse validato --> messo il messaggio...
|
||||
If (currRes.Validated) Then
|
||||
currRes.RawContent = 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
|
||||
CurrPocStat.IncrementDoneRequest()
|
||||
' 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
|
||||
MyThreadData.SetWaitProcAnswer(ThreadData.ProcComm.Null)
|
||||
End Select
|
||||
|
||||
End While
|
||||
CurrPocStat.SetStopProc(DateTime.Now)
|
||||
If m_bStopProcess Then
|
||||
Proc.StandardInput.WriteLine("quit")
|
||||
End If
|
||||
End While
|
||||
End If
|
||||
|
||||
CurrThreadStat.SetStopThread(DateTime.Now)
|
||||
MyThreadData.SetProcess(Nothing)
|
||||
MyThreadData.SetThreadOperation(ThreadOperations.Closed)
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Thread_OutputDataReceived(sender As Object, e As DataReceivedEventArgs)
|
||||
Dim sResult As String = e.Data
|
||||
If Not String.IsNullOrWhiteSpace(sResult) AndAlso sResult.StartsWith("#42315#,") Then
|
||||
Dim Results() As String = sResult.Split(","c)
|
||||
If Results.Count >= 2 Then
|
||||
Dim nIndex As Integer = -1
|
||||
Dim nResult As Integer = -1
|
||||
If Integer.TryParse(Results(1), nIndex) AndAlso nIndex >= 0 Then
|
||||
If Integer.TryParse(Results(2), nResult) AndAlso nResult >= 0 Then
|
||||
ThreadDataList(nIndex).SetProcResult(nResult)
|
||||
End If
|
||||
ThreadDataList(nIndex).SetWaitProcAnswer(ThreadData.ProcComm.AnswerReceived)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub TimerProgBar_Tick(sender As Object, e As EventArgs) Handles TimerProgBar.Tick
|
||||
' esegue refresh prog bar
|
||||
performBarAdvance()
|
||||
@@ -947,7 +1260,17 @@ Public Class ProcMan
|
||||
|
||||
Private Sub ProcMan_FormClosing(sender As Object, e As FormClosingEventArgs) Handles MyBase.FormClosing
|
||||
' forzo chiusura threads!
|
||||
stopAllThreads()
|
||||
If m_ProgramStatus = ProgramStatuses.START Then stopAllThreads()
|
||||
EgtExit()
|
||||
' fix timer
|
||||
TimerProgBar.Stop()
|
||||
TimerProgBar.Enabled = False
|
||||
TimerResetProcessing.Stop()
|
||||
TimerResetProcessing.Enabled = False
|
||||
TimerUI.Stop()
|
||||
TimerUI.Enabled = False
|
||||
TimerCheck.Stop()
|
||||
TimerCheck.Enabled = False
|
||||
End Sub
|
||||
|
||||
Private Sub chkAutoRestart_CheckedChanged(sender As Object, e As EventArgs) Handles chkAutoRestart.CheckedChanged
|
||||
@@ -991,6 +1314,151 @@ Public Class ProcMan
|
||||
startAllThreads()
|
||||
End Sub
|
||||
|
||||
Private Sub ProcMan_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
m_IniFilePath = AppDomain.CurrentDomain.BaseDirectory & INI_FILE_NAME
|
||||
ManageInstance()
|
||||
'' Imposto tipo di chiave
|
||||
'EgtSetLockType(KEY_TYPE.HW)
|
||||
'' Leggo e imposto chiave di protezione
|
||||
'Dim sLicFileName As String = String.Empty
|
||||
'GetPrivateProfileString(S_GENERAL, K_LICENCE, LIC_FILE_NAME, sLicFileName, m_IniFilePath)
|
||||
'Dim sLicFile As String = AppDomain.CurrentDomain.BaseDirectory & sLicFileName
|
||||
'Dim sKey As String = String.Empty
|
||||
'EgtUILib.GetPrivateProfileString(S_LICENCE, K_KEY, "", sKey, sLicFile)
|
||||
'EgtSetKey(sKey)
|
||||
'Dim bNetHwKey As Boolean = (GetPrivateProfileInt(S_GENERAL, K_NETKEY, 0, m_IniFilePath) = 1)
|
||||
'EgtSetNetHwKey(bNetHwKey)
|
||||
'Dim sLockId As String = ""
|
||||
'EgtUILib.GetPrivateProfileString(S_LICENCE, K_LOCKID, "", sLockId, sLicFile)
|
||||
'If Not String.IsNullOrEmpty(sLockId) Then
|
||||
' Dim x = EgtSetLockId(sLockId)
|
||||
'End If
|
||||
'' Recupero livello e opzioni della chiave
|
||||
'Dim nKeyLevel As Integer = 0
|
||||
'Dim nKeyOptions As Integer = 0
|
||||
'Dim bKey As Boolean = EgtGetKeyLevel(9935, 2505, 1, nKeyLevel) And
|
||||
' EgtGetKeyOptions(9935, 2505, 1, nKeyOptions)
|
||||
' Inizializzazione generale di EgtInterface
|
||||
m_sLogFile = AppDomain.CurrentDomain.BaseDirectory & GENLOG_FILE_NAME.Replace("#", m_nInstance.ToString())
|
||||
Dim sLogMsg As String = "User " & Environment.MachineName & "\" & Environment.UserName & " (" & m_nInstance.ToString() & ")" & vbLf &
|
||||
My.Application.Info.Title.ToString() & " ver. " &
|
||||
My.Application.Info.Version.Major.ToString() &
|
||||
"." & My.Application.Info.Version.Minor.ToString() &
|
||||
(ChrW(97 - 1 + My.Application.Info.Version.Build)).ToString() &
|
||||
My.Application.Info.Version.Revision.ToString()
|
||||
EgtInit(0, m_sLogFile, sLogMsg)
|
||||
'If Not bKey Then
|
||||
' MessageBox.Show("No licences available!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||
' End
|
||||
'End If
|
||||
|
||||
' leggo sorgente richieste rest da ini
|
||||
GetPrivateProfileString(S_GENERAL, K_BASEIP, "", baseIp, m_IniFilePath)
|
||||
GetPrivateProfileString(S_GENERAL, K_BASEURL, "", baseUrl, m_IniFilePath)
|
||||
|
||||
' inizializzo oggetto web
|
||||
currWDC = New WDC(baseIp, baseUrl, codPost)
|
||||
txtNumThread.Text = GetPrivateProfileInt(S_GENERAL, K_STARTINSTANCES, 1, m_IniFilePath).ToString()
|
||||
|
||||
' recupero path EgtEngine
|
||||
GetPrivateProfileString(S_GENERAL, K_PROCESSPATH, "", sEgtEnginePath, m_IniFilePath)
|
||||
|
||||
MyBase.Text = baseUrl
|
||||
End Sub
|
||||
|
||||
Dim m_objMutex As Mutex
|
||||
Dim m_bFirstInstance As Boolean
|
||||
Dim m_nInstance As Integer
|
||||
Dim m_IniFilePath As String = ""
|
||||
Dim m_sLogFile As String = ""
|
||||
|
||||
Private Sub ManageInstance()
|
||||
Dim bCreated As Boolean
|
||||
Try
|
||||
Dim sMutexName As String = "Global\WebDoorCreator.CamSrv"
|
||||
GetPrivateProfileString(S_GENERAL, K_MUTEXNAME, sMutexName, sMutexName, m_IniFilePath)
|
||||
m_objMutex = New Mutex(False, sMutexName, bCreated)
|
||||
Catch
|
||||
bCreated = False
|
||||
End Try
|
||||
m_bFirstInstance = bCreated
|
||||
If bCreated Then
|
||||
' Prima istanza
|
||||
m_nInstance = 1
|
||||
' Aggiorno stato istanze attive
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, m_nInstance.ToString(), m_IniFilePath)
|
||||
Else
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Const MAX_INST As Integer = 32
|
||||
Dim nMaxInst As Integer = GetPrivateProfileInt(S_GENERAL, K_MAXINST, 1, m_IniFilePath)
|
||||
nMaxInst = Math.Max(1, Math.Min(nMaxInst, MAX_INST))
|
||||
' Cerco il primo indice di istanza libero
|
||||
Dim nTmp As Integer = GetPrivateProfileInt(S_GENERAL, K_INSTANCES, 0, m_IniFilePath)
|
||||
m_nInstance = 1
|
||||
Dim nMask As Integer = 1
|
||||
While (nTmp And nMask) <> 0 And m_nInstance <= MAX_INST
|
||||
m_nInstance += 1
|
||||
nMask *= 2
|
||||
End While
|
||||
' Se l'indice supera il massimo
|
||||
If m_nInstance > nMaxInst Then
|
||||
' porto in primo piano la prima istanza
|
||||
Dim bFound As Boolean = False
|
||||
' processi del programma a 32 bit
|
||||
Dim localProc As Process() = Process.GetProcessesByName("WebDoorCreator.CamSrv")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
ShowWindow(p.MainWindowHandle, 1)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
' se non trovati processi a 32 bit provo a 64 bit
|
||||
If Not bFound Then
|
||||
localProc = Process.GetProcessesByName("IcarusR64")
|
||||
For Each p As Process In localProc
|
||||
If p.Id <> Process.GetCurrentProcess().Id Then
|
||||
bFound = True
|
||||
ShowWindow(p.MainWindowHandle, SW.RESTORE)
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
' esco dal programma
|
||||
End
|
||||
End If
|
||||
' Aggiorno stato istanze attive
|
||||
nTmp += (1 << (m_nInstance - 1))
|
||||
WritePrivateProfileString(S_GENERAL, K_INSTANCES, nTmp.ToString(), m_IniFilePath)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Friend Function GetMaxInstances() As Integer
|
||||
' Leggo il massimo numero di istanze ammesse
|
||||
Dim nMaxInst As Integer = GetPrivateProfileInt(S_GENERAL, K_MAXINST, 1, m_IniFilePath)
|
||||
Return 1 ' Max(1, Min(nMaxInst, MAX_INST))
|
||||
End Function
|
||||
|
||||
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||
' chiudo tutti i processi EgtEngine
|
||||
' processi del programma a 32 bit
|
||||
Dim localProc As Process() = Process.GetProcessesByName("EgtEngineR32")
|
||||
For Each p As Process In localProc
|
||||
p.Kill()
|
||||
Next
|
||||
localProc = Process.GetProcessesByName("EgtEngineR64")
|
||||
For Each p As Process In localProc
|
||||
p.Kill()
|
||||
Next
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub TimerResetProcessing_Tick(sender As Object, e As EventArgs) Handles TimerResetProcessing.Tick
|
||||
If Not IsNothing(currWDC) Then
|
||||
currWDC.ResetQueueProcessing()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
@@ -50,7 +50,32 @@
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>Resources\Temp.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DefineDebug>true</DefineDebug>
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DocumentationFile>WebDoorCreator.CamSrv.xml</DocumentationFile>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DefineTrace>true</DefineTrace>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DocumentationFile>WebDoorCreator.CamSrv.xml</DocumentationFile>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>42016,41999,42017,42018,42019,42032,42036,42020,42021,42022</NoWarn>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="EgtUILib, Version=2.5.5.1, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
<HintPath>..\ExtLib\EgtUILib.dll</HintPath>
|
||||
</Reference>
|
||||
<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>
|
||||
@@ -96,6 +121,7 @@
|
||||
<Import Include="System.Threading.Tasks" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="ConstIni.vb" />
|
||||
<Compile Include="ProcMan.vb">
|
||||
<SubType>Form</SubType>
|
||||
</Compile>
|
||||
|
||||
@@ -24,8 +24,14 @@ namespace WebDoorCreator.Core
|
||||
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_TYPE = $"{BASE_HASH}:CalcRequests:Type";
|
||||
public static readonly string CALC_REQ_DDF_CACHE = $"{BASE_HASH}:CalcRequests:CacheDDF";
|
||||
public static readonly string CALC_REQ_SVG_CACHE = $"{BASE_HASH}:CalcRequests:CacheSVG";
|
||||
public static readonly string CALC_REQ_VETO_REC = $"{BASE_HASH}:CalcRequests:VetoRecalc";
|
||||
public static readonly string DOOR_TPL_LIST = $"{BASE_HASH}:Template:DoorList";
|
||||
|
||||
// REDIS KEY dati x registrazione statistiche esecuzione
|
||||
public static readonly string STATS_DATA = $"{BASE_HASH}:CallStats";
|
||||
|
||||
// REDIS Channels messaggi x QueueMan (verso UI/srv)
|
||||
public static readonly string CALC_REQ_QUEUE = $"CalcRequest";
|
||||
@@ -45,15 +51,23 @@ namespace WebDoorCreator.Core
|
||||
public const string rKeyListValues = $"{redisBaseAddr}:Cache:ListValues";
|
||||
public const string rKeyDoorLast = $"{redisBaseAddr}:Cache:DoorList";
|
||||
public const string rKeyDoorsByOrder = $"{redisBaseAddr}:Cache:DoorsByOrder";
|
||||
public const string rKeyOrderByComp = $"{redisBaseAddr}:Cache:OrderByComp";
|
||||
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 rKeyUsersAll = $"{redisBaseAddr}:Cache:UsersAll";
|
||||
public const string rKeyUsersDataId = $"{redisBaseAddr}:Cache:UsersData:Id";
|
||||
public const string rKeyUsersDataSearch = $"{redisBaseAddr}:Cache:UsersData:Search";
|
||||
public const string rKeyUsersData = $"{redisBaseAddr}:Cache:UsersData";
|
||||
public const string rKeyUsersDataSearch = $"{rKeyUsersData}:Search";
|
||||
public const string rKeyUsersView = $"{redisBaseAddr}:Cache:UsersView";
|
||||
public const string rKeyVocLemma = $"{redisBaseAddr}:Cache:VocLemma";
|
||||
public const string rKeyVocLemmaTEMP = $"{redisBaseAddr}:Cache:VocLemmaTEMP";
|
||||
public const string rKeyLanguage = $"{redisBaseAddr}:Cache:Languages";
|
||||
public const string rKeyDirsScan = $"{redisBaseAddr}:Cache:Scan";
|
||||
|
||||
/// <summary>
|
||||
/// variabili accessorie ulteriori
|
||||
/// </summary>
|
||||
public const int StatusIdTemplate = 10000;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{
|
||||
#region Public Enums
|
||||
|
||||
|
||||
|
||||
|
||||
public enum UserLevel
|
||||
{
|
||||
@@ -32,6 +32,14 @@
|
||||
CodeDescending
|
||||
}
|
||||
|
||||
public enum fileStatus
|
||||
{
|
||||
none = 0,
|
||||
add,
|
||||
mod,
|
||||
rem
|
||||
}
|
||||
|
||||
#endregion Public Enums
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,50 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Core
|
||||
{
|
||||
public class ExecStats
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// Numero chiamate registrate
|
||||
/// </summary>
|
||||
public int NumCall { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Durata totale chiamate
|
||||
/// </summary>
|
||||
public TimeSpan TotalTime { get; set; } = new TimeSpan(0, 0, 0);
|
||||
|
||||
/// <summary>
|
||||
/// Tempo medio (calcolato)
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public TimeSpan AvgTime
|
||||
{
|
||||
get
|
||||
{
|
||||
TimeSpan answ = TotalTime;
|
||||
if (NumCall > 1)
|
||||
{
|
||||
answ = TotalTime / NumCall;
|
||||
}
|
||||
return answ;
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// Init classe
|
||||
/// </summary>
|
||||
/// <param name="numCall"></param>
|
||||
/// <param name="duration"></param>
|
||||
public ExecStats(int numCall, TimeSpan duration)
|
||||
{
|
||||
this.NumCall = numCall;
|
||||
this.TotalTime = duration;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace WebDoorCreator.Core.ReportViewer
|
||||
{
|
||||
public class ReportItem
|
||||
{
|
||||
public string Description { get; set; }
|
||||
public decimal Price { get; set; }
|
||||
public int Qty { get; set; }
|
||||
public string Description { get; set; } = "";
|
||||
public decimal Price { get; set; } = 0;
|
||||
public int Qty { get; set; } = 0;
|
||||
public decimal Total => Price * Qty;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -15,9 +15,8 @@
|
||||
</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="Microsoft.EntityFrameworkCore" Version="6.0.27" />
|
||||
<PackageReference Include="NLog" Version="5.2.2" />
|
||||
<PackageReference Include="ReportViewerCore.NETCore" Version="15.1.17" />
|
||||
<PackageReference Include="ToDataTable" Version="0.1.2" />
|
||||
<PackageReference Include="YamlDotNet" Version="13.1.0" />
|
||||
|
||||
@@ -3,6 +3,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using NLog;
|
||||
using NLog.Fluent;
|
||||
using YamlDotNet.Serialization;
|
||||
|
||||
namespace WebDoorCreator.Data
|
||||
{
|
||||
@@ -13,13 +14,16 @@ namespace WebDoorCreator.Data
|
||||
private IConfiguration _configuration { get; set; } = null!;
|
||||
public ApplicationDbContext()
|
||||
{
|
||||
Log.Info($"ApplicationDbContext Init");
|
||||
try
|
||||
{
|
||||
// se non ci fosse... crea o migra!
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext() init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
public ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) : base(options)
|
||||
{
|
||||
@@ -34,7 +38,9 @@ namespace WebDoorCreator.Data
|
||||
Database.Migrate();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{ }
|
||||
{
|
||||
Log.Error($"Exc during ApplicationDbContext(DbContextOptions<ApplicationDbContext> options, IConfiguration configuration) init:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
}
|
||||
protected override void OnModelCreating(ModelBuilder builder)
|
||||
|
||||
@@ -21,11 +21,11 @@ namespace WebDoorCreator.Data
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
protected ConfigModel seedConfig(string chaive, string valore, string valoreStd, string note)
|
||||
protected ConfigModel seedConfig(string chiave, string valore, string valoreStd, string note)
|
||||
{
|
||||
var newRec = new ConfigModel()
|
||||
{
|
||||
chiave = chaive,
|
||||
chiave = chiave,
|
||||
valore = valore,
|
||||
valoreStd = valoreStd,
|
||||
note = note
|
||||
|
||||
@@ -21,59 +21,6 @@ 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>
|
||||
@@ -211,7 +158,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
public void Dispose()
|
||||
{
|
||||
// Clear database context
|
||||
//Log.Info("Dispose di GWMSController");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -248,6 +194,60 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door list 2 delete
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorModel>? DoorGet2Del()
|
||||
{
|
||||
List<DoorModel>? dbResult = new List<DoorModel>();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx.DbSetDoor
|
||||
.Where(x => x.isLogicDel)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorGet2Del:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Getting door data by key
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public DoorModel? DoorGetByKey(int doorId)
|
||||
{
|
||||
DoorModel? dbResult = new DoorModel();
|
||||
// retrieving data from db
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx.DbSetDoor
|
||||
.Where(x => x.DoorId == doorId)
|
||||
.Include(o => o.OrderNav)
|
||||
.OrderBy(x => x.DoorId)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorGetByKey:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new door
|
||||
/// </summary>
|
||||
@@ -282,52 +282,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return newId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding or removing a single door
|
||||
/// </summary>
|
||||
/// <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 NewQty, int doorId, bool isAdd)
|
||||
{
|
||||
/* crea nuovo metodo per modifica singola quantità porta: DOORMODQTY */
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == doorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
if (NewQty > 0)
|
||||
{
|
||||
currRec.Quantity = NewQty;
|
||||
}
|
||||
else if (isAdd)
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
currRec.Quantity = currRec.Quantity - 1;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorModQty: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete doorOp instance
|
||||
/// </summary>
|
||||
@@ -496,6 +450,45 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding new DoorOpType data
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeAdd(List<DoorOpTypeTempModel> addList)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// stored di reset ListValues
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Prepare");
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// import massivo dati in tab temp
|
||||
localDbCtx
|
||||
.DbSetDoorOpTypeTemp
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in DoorOpType
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_DoorOpType_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new DoorOpType
|
||||
/// </summary>
|
||||
@@ -547,6 +540,31 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by path
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetByPath(string path)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.OpCode.StartsWith(path))
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetByPath:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public async Task<List<DoorOpTypeModel>> DoorOpTypeGetDefault()
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
@@ -568,6 +586,117 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieving data from door operation type table filtered by Hw Code
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public List<DoorOpTypeModel> DoorOpTypeGetFiltered(string hwCode, int parentId)
|
||||
{
|
||||
List<DoorOpTypeModel> dbResult = new List<DoorOpTypeModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
if (hwCode == "*" && parentId == -1)
|
||||
{
|
||||
// extracting entire set
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId == -1)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode == "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.ParentId == parentId)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
else if (hwCode != "*" && parentId >= 0)
|
||||
{
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => (x.ParentId == parentId) && x.HwCode == hwCode)
|
||||
.OrderBy(x => x.DoorOpTypId)
|
||||
.ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in DoorOpTypeGetAll:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying doorOpType
|
||||
/// </summary>
|
||||
/// <param name="addEditRec">Record to edit</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorOpTypeUpdate(DoorOpTypeModel addEditRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
//List<ItemModel> dbResult = new List<ItemModel>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Where(x => x.DoorOpTypId == addEditRec.DoorOpTypId)
|
||||
.FirstOrDefault();
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
currRec.OpCode = addEditRec.OpCode;
|
||||
currRec.Description = addEditRec.Description;
|
||||
currRec.IsDefault = addEditRec.IsDefault;
|
||||
currRec.HasHw = addEditRec.HasHw;
|
||||
currRec.IsConcrete = addEditRec.IsConcrete;
|
||||
currRec.HwCode = addEditRec.HwCode;
|
||||
currRec.HwDescription = addEditRec.HwDescription;
|
||||
currRec.DisplayUrl = addEditRec.DisplayUrl;
|
||||
currRec.FPath = addEditRec.FPath;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
currRec.ExtOpCode = addEditRec.ExtOpCode;
|
||||
currRec.ExtDescript = addEditRec.ExtDescript;
|
||||
currRec.Rev = addEditRec.Rev;
|
||||
currRec.ValidFrom = addEditRec.ValidFrom;
|
||||
currRec.ValidUntil = addEditRec.ValidUntil;
|
||||
currRec.FileMD5 = addEditRec.FileMD5;
|
||||
currRec.FileDim = addEditRec.FileDim;
|
||||
currRec.LastMod = addEditRec.LastMod;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoorOpType
|
||||
.Add(addEditRec);
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorOpTypeUpdate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update door's OP
|
||||
/// </summary>
|
||||
@@ -623,7 +752,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetDoor
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderBy(x => x.DoorId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
@@ -652,7 +780,6 @@ namespace WebDoorCreator.Data.Controllers
|
||||
dbResult = localDbCtx
|
||||
.DbSetDoor
|
||||
.Include(o => o.OrderNav)
|
||||
.Include(t => t.TypeNav)
|
||||
.OrderByDescending(x => x.DoorId)
|
||||
.Take(numRec)
|
||||
.AsNoTracking()
|
||||
@@ -666,6 +793,43 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Update costing for dictionary of doors
|
||||
/// </summary>
|
||||
/// <param name="DoorUnitCosts"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> DoorUpdateCosts(Dictionary<int, decimal> DoorUnitCosts)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// ciclo x ogni porta...
|
||||
|
||||
foreach (var item in DoorUnitCosts)
|
||||
{
|
||||
var currRec = localDbCtx
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == item.Key)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
{
|
||||
currRec.UnitCost = item.Value;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante DoorUpdateCosts: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Modifying or adding a new door
|
||||
/// </summary>
|
||||
@@ -683,12 +847,19 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetDoor
|
||||
.Where(x => x.DoorId == addEditRec.DoorId)
|
||||
.FirstOrDefault();
|
||||
if (currRec != null) //if is not null edit the record found
|
||||
//if is not null edit the record found
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Quantity = addEditRec.Quantity;
|
||||
currRec.DoorExtCode = addEditRec.DoorExtCode;
|
||||
currRec.DoorDescript = addEditRec.DoorDescript;
|
||||
currRec.ParentId = addEditRec.ParentId;
|
||||
currRec.isLogicDel = addEditRec.isLogicDel;
|
||||
currRec.UnitCost = addEditRec.UnitCost;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
else //if is null add the record as new in the table
|
||||
//if is null add the record as new in the table
|
||||
else
|
||||
{
|
||||
localDbCtx
|
||||
.DbSetDoor
|
||||
@@ -730,7 +901,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adding a new list value
|
||||
/// Adding new list value set
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
@@ -753,12 +924,15 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.AddRange(addList);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
// stored di merge dati in ListVal
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_Import");
|
||||
|
||||
fatto = true;
|
||||
// stored x pulizia folder rimaste in giro
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_ListVal_FixDix");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
@@ -820,10 +994,10 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// Adding a new order
|
||||
/// </summary>
|
||||
/// <param name="addRec">Record to add</param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderAdd(OrderModel addRec)
|
||||
/// <returns>OrderId</returns>
|
||||
public async Task<int> OrderAdd(OrderModel addRec)
|
||||
{
|
||||
bool fatto = false;
|
||||
int newOrdId = 0;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
@@ -832,16 +1006,75 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.DbSetOrders
|
||||
.Add(addRec);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
newOrdId = addRec.OrderId;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderAdd: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return newOrdId;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Duplicazione di un ordine da SRC a DEST (Doors + DoorOp)
|
||||
/// </summary>
|
||||
/// <param name="OrdIdSrc"></param>
|
||||
/// <param name="OrdIdDest"></param>
|
||||
/// <param name="UsrIdMod"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderDuplicate(int OrdIdSrc, int OrdIdDest, string UsrIdMod)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var OrderIdSrc = new SqlParameter("@OrderIdSrc", OrdIdSrc);
|
||||
var OrderIdDest = new SqlParameter("@OrderIdDest", OrdIdDest);
|
||||
var UserIdMod = new SqlParameter("@UserIdMod", UsrIdMod);
|
||||
|
||||
// stored di cloning dati ordine
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_OrderClone @OrderIdSrc, @OrderIdDest, @UserIdMod", OrderIdSrc, OrderIdDest, UserIdMod);
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderDuplicate:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public List<OrderModel> OrderGetByCompStatus(int CompanyId, int StatusId)
|
||||
{
|
||||
List<OrderModel> dbResult = new List<OrderModel>();
|
||||
using (var dbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.CompanyId == CompanyId && x.Status == StatusId)
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
if (rawData != null)
|
||||
{
|
||||
dbResult = rawData;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in OrderGetByCompStatus:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public OrderModel OrderGetByKey(int orderId)
|
||||
{
|
||||
OrderModel dbResult = new OrderModel();
|
||||
@@ -852,6 +1085,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
var rawData = dbCtx
|
||||
.DbSetOrders
|
||||
.Where(x => x.OrderId == orderId)
|
||||
.Include(c => c.CompanyNav)
|
||||
.AsNoTracking()
|
||||
.FirstOrDefault();
|
||||
if (rawData != null)
|
||||
@@ -932,13 +1166,83 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order code/description
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="newCode"></param>
|
||||
/// <param name="newDescript"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdateDescript(int orderId, string newCode, string newDescript)
|
||||
{
|
||||
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.OrderExtCode = newCode;
|
||||
currRec.OrderDescript = newDescript;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdateDescript: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Updating an order promised date
|
||||
/// </summary>
|
||||
/// <param name="orderId"></param>
|
||||
/// <param name="dateProm"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> OrderUpdatePromDate(int orderId, DateTime dateProm)
|
||||
{
|
||||
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.DateProm = dateProm;
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdatePromDate: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
/// <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)
|
||||
public async Task<bool> OrderUpdateStatus(int orderId, int newStatus)
|
||||
{
|
||||
bool fatto = false;
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
@@ -953,6 +1257,19 @@ namespace WebDoorCreator.Data.Controllers
|
||||
if (currRec != null)
|
||||
{
|
||||
currRec.Status = newStatus;
|
||||
// controllo gli stati speciali...
|
||||
if (newStatus == 10)
|
||||
{
|
||||
currRec.DateOrd = DateTime.MinValue;
|
||||
}
|
||||
else if (newStatus == 40)
|
||||
{
|
||||
currRec.DateOrd = DateTime.Now;
|
||||
}
|
||||
else if (newStatus == 70)
|
||||
{
|
||||
currRec.DateDelivery = DateTime.Now;
|
||||
}
|
||||
localDbCtx.Entry(currRec).State = EntityState.Modified;
|
||||
}
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
@@ -960,7 +1277,7 @@ namespace WebDoorCreator.Data.Controllers
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante OrderUpdate: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante OrderUpdateStatus: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
@@ -1095,6 +1412,59 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
/// <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>
|
||||
/// Populating DTO to handle users
|
||||
/// </summary>
|
||||
@@ -1205,6 +1575,33 @@ namespace WebDoorCreator.Data.Controllers
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public async Task<VocabularyTempModel> VocLemmaFindByKeys(string lingua, string lemma)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
VocabularyTempModel dbResult = new VocabularyTempModel();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
dbResult = termSearch;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaCheckConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return dbResult;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
@@ -1245,14 +1642,39 @@ namespace WebDoorCreator.Data.Controllers
|
||||
/// <summary>
|
||||
/// Aggiunta di un nuovo set di lemmi
|
||||
/// </summary>
|
||||
/// <param name="listNewTerms"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> VocLemmaInsert(List<VocabularyTempModel> listNewTerms)
|
||||
public async Task<bool> VocLemmaInsert()
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
|
||||
//var o = listNewTerms.Where(x => x.Traduzione.Length > 200).ToList();
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
//bool isOk = await VocLemmaInsertPrepare(listNewTerms);
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
var storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_Voc_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaInsert: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public async Task<bool> VocLemmaInsertPrepare(List<VocabularyTempModel> listNewTerms)
|
||||
{
|
||||
bool fatto = false;
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
@@ -1269,26 +1691,90 @@ namespace WebDoorCreator.Data.Controllers
|
||||
.AddRange(listNewTerms);
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
|
||||
// stored di merge dati in vocabolario
|
||||
storedRes = localDbCtx
|
||||
.Database
|
||||
.ExecuteSqlRaw("exec dbo.stp_Voc_Import");
|
||||
|
||||
fatto = true;
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaInsert: {Environment.NewLine}{exc}");
|
||||
Log.Error($"Eccezione durante VocLemmaInsertPrepare: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public async Task<bool> VocLemmaSetConf(string lingua, string lemma, bool isConf)
|
||||
{
|
||||
await Task.Delay(1);
|
||||
bool fatto = false;
|
||||
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
// import massivo dati in tab temp
|
||||
var termSearch = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.Where(x => x.Lingua == lingua && x.Lemma == lemma)
|
||||
.FirstOrDefault();
|
||||
|
||||
if (termSearch != null)
|
||||
{
|
||||
termSearch.IsConfSave = isConf;
|
||||
|
||||
localDbCtx.Entry(termSearch).State = EntityState.Modified;
|
||||
await localDbCtx.SaveChangesAsync();
|
||||
fatto = true;
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Eccezione durante VocLemmaSetConf: {Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return fatto;
|
||||
}
|
||||
|
||||
public Dictionary<string, Dictionary<string, string>> VocLemmaTEMPGetAll()
|
||||
{
|
||||
Dictionary<string, Dictionary<string, string>> DTOResult = new Dictionary<string, Dictionary<string, string>>();
|
||||
using (WDCDataContext localDbCtx = new WDCDataContext(_configuration))
|
||||
{
|
||||
try
|
||||
{
|
||||
List<string> lingue = new List<string>()
|
||||
{
|
||||
"IT",
|
||||
"EN"
|
||||
};
|
||||
|
||||
// extracting entire set
|
||||
var allVoc = localDbCtx
|
||||
.DbSetVocabularyTemp
|
||||
.AsNoTracking()
|
||||
.ToList();
|
||||
|
||||
foreach (var lingua in lingue)
|
||||
{
|
||||
Dictionary<string, string> dict = new Dictionary<string, string>();
|
||||
foreach (var lemma in allVoc.Where(x => x.Lingua == lingua))
|
||||
{
|
||||
dict.Add(lemma.Lemma, lemma.Traduzione);
|
||||
}
|
||||
DTOResult.Add(lingua, dict);
|
||||
}
|
||||
}
|
||||
catch (Exception exc)
|
||||
{
|
||||
Log.Error($"Error in VocLemmaTEMPGetAll:{Environment.NewLine}{exc}");
|
||||
}
|
||||
}
|
||||
return DTOResult;
|
||||
}
|
||||
|
||||
#endregion Public Methods
|
||||
|
||||
#region Private Fields
|
||||
|
||||
private static IConfiguration _configuration;
|
||||
private static IConfiguration _configuration = null!;
|
||||
private static NLog.Logger Log = LogManager.GetCurrentClassLogger();
|
||||
|
||||
#endregion Private Fields
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace WebDoorCreator.Data.DDF
|
||||
{
|
||||
string outDdf = "";
|
||||
try
|
||||
{
|
||||
{
|
||||
DoorOpsDTO CurrentDoorOp = new DoorOpsDTO();
|
||||
EdgesDto CurrentEdges = new EdgesDto();
|
||||
SizeDto CurrentSize = new SizeDto();
|
||||
@@ -46,10 +46,13 @@ namespace WebDoorCreator.Data.DDF
|
||||
FinishingDto CurrentFinishing = new FinishingDto();
|
||||
DDFDto CurrentConf = new DDFDto();
|
||||
ListValuesModel CurrentCompoOrder = new ListValuesModel();
|
||||
Dictionary<string, List<Dictionary<string, string>>> dictDoorOP = new Dictionary<string, List<Dictionary<string, string>>>();
|
||||
Dictionary<string, Dictionary<string, string>> dictBaseDoorOp = new Dictionary<string, Dictionary<string, string>>();
|
||||
Dictionary<string, Dictionary<string, string>> dictBaseSwing = new Dictionary<string, Dictionary<string, string>>();
|
||||
// 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"))
|
||||
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)
|
||||
@@ -122,7 +125,7 @@ namespace WebDoorCreator.Data.DDF
|
||||
}
|
||||
i++;
|
||||
}
|
||||
CurrentSize.size = dictBaseDoorOp;
|
||||
CurrentSize.size = dictBaseDoorOp;
|
||||
string sizeSer = CurrentSize.GetSerialized(RemDoorOp);
|
||||
//dictBaseDoorOp.Clear();
|
||||
foreach (var item in listOp.Where(x => x.ObjectId == "Swing"))
|
||||
@@ -148,9 +151,6 @@ namespace WebDoorCreator.Data.DDF
|
||||
|
||||
#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>();
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Oggetto contenitore richiesta calcolo
|
||||
/// </summary>
|
||||
public class CalcReqtDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// DDF file content (origin)
|
||||
/// </summary>
|
||||
public string DDF { get; set; } = "";
|
||||
/// <summary>
|
||||
/// MimeType (out) requested: svg / 3dm...
|
||||
/// </summary>
|
||||
public string MimeType { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -24,11 +24,15 @@ namespace WebDoorCreator.Data.DTO
|
||||
/// </summary>
|
||||
public string ErrorMsg { get; set; } = "";
|
||||
/// <summary>
|
||||
/// SVG generated
|
||||
/// Object RAW generated output ( was SvgGen )
|
||||
/// </summary>
|
||||
public string SvgGen { get; set; } = "";
|
||||
public string RawContent { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Articat path (ex 3d zip/pack)
|
||||
/// MimeType: svg / 3dm...
|
||||
/// </summary>
|
||||
public string MimeType { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Artifats path (ex 3d zip/pack)
|
||||
/// </summary>
|
||||
public string artifactPath { get; set; } = "";
|
||||
}
|
||||
|
||||
@@ -13,13 +13,10 @@ namespace WebDoorCreator.Data.DTO
|
||||
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 int Quantity { get; set; } = 1;
|
||||
|
||||
public double EstimatedWorkTime { get; set; } = 0;
|
||||
|
||||
public Dictionary<string, double> BOMList { get; set; }= new Dictionary<string, double>();
|
||||
public Dictionary<string, List<string>> BOMList { get; set; }= new Dictionary<string, List<string>>();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
/// Door cost data DTO
|
||||
/// </summary>
|
||||
public class DoorPriceDTO
|
||||
{
|
||||
/// <summary>
|
||||
/// Door UID
|
||||
/// </summary>
|
||||
public int OrderId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Door UID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Articat path (ex 3d zip/pack)
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Valid = true / cannot deliver = false
|
||||
/// </summary>
|
||||
public bool Valid { get; set; } = true;
|
||||
/// <summary>
|
||||
/// Error message (optional)
|
||||
/// </summary>
|
||||
public string ErrorMsg { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -35,7 +35,6 @@ namespace WebDoorCreator.Data.DTO
|
||||
}
|
||||
if (item.Contains("Separator"))
|
||||
{
|
||||
//sb.Remove(item);
|
||||
sb.AppendLine(" ");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using static WebDoorCreator.Core.Enum;
|
||||
|
||||
namespace WebDoorCreator.Data.DTO
|
||||
{
|
||||
/// <summary>
|
||||
/// File data DTO
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class FileDTO
|
||||
{
|
||||
//public string HwCode { get; set; } = "";
|
||||
public string FileBaseDir { get; set; } = "";
|
||||
//public string FileAbsPath { get; set; } = "";
|
||||
public string FileRelPath { get; set; } = "";
|
||||
public string FileMD5 { get; set; } = "";
|
||||
public long FileDim { get; set; } = 0;
|
||||
public DateTime lastModTime { get; set; } = DateTime.Now;
|
||||
public fileStatus status { get; set; } = fileStatus.none;
|
||||
public bool action { get; set; } = false;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -22,6 +22,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Parent element ID
|
||||
/// </summary>
|
||||
public int ParentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Ordine cui è associata la porta
|
||||
/// </summary>
|
||||
@@ -32,11 +37,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string MeasureUnit { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
/// </summary>
|
||||
@@ -88,11 +88,16 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string UserIdLock { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Valore booleano per indicare se è in stato cancellazione logica
|
||||
/// </summary>
|
||||
public bool isLogicDel { get; set; } = false;
|
||||
|
||||
[ForeignKey("OrderId")]
|
||||
public virtual OrderModel? OrderNav { get; set; }
|
||||
|
||||
[ForeignKey("TypeId")]
|
||||
public virtual DoorTypeModel? TypeNav { get; set; }
|
||||
//[ForeignKey("TypeId")]
|
||||
// public virtual DoorTypeModel? TypeNav { get; set; }
|
||||
|
||||
|
||||
public DoorModel ObjClone(string userId)
|
||||
@@ -102,7 +107,7 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
MeasureUnit = MeasureUnit,
|
||||
OrderId = OrderId,
|
||||
TypeId = TypeId,
|
||||
ParentId = ParentId,
|
||||
DoorExtCode = DoorExtCode,
|
||||
DateIns = adesso,
|
||||
UserIdIns = userId,
|
||||
@@ -116,5 +121,40 @@ namespace WebDoorCreator.Data.DbModels
|
||||
};
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
public override bool Equals(object? obj)
|
||||
{
|
||||
if (obj == null)
|
||||
return false;
|
||||
|
||||
if (!(obj is DoorModel item))
|
||||
return false;
|
||||
|
||||
if (Quantity != item.Quantity)
|
||||
return false;
|
||||
|
||||
if (DoorExtCode != item.DoorExtCode)
|
||||
return false;
|
||||
|
||||
if (DoorDescript != item.DoorDescript)
|
||||
return false;
|
||||
|
||||
if (UnitCost != item.UnitCost)
|
||||
return false;
|
||||
|
||||
//if (MeasureUnit != item.MeasureUnit)
|
||||
// return false;
|
||||
|
||||
//if (UnitCost != item.UnitCost)
|
||||
// return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return base.GetHashCode();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -131,11 +131,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
}
|
||||
}
|
||||
/// <summary>
|
||||
/// COmparazione tra il dizionario currVal corrente e quello ricevuto
|
||||
/// 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)
|
||||
public bool JsonActValEquals(Dictionary<string, string> newDict)
|
||||
{
|
||||
string JsonNewVal = JsonConvert.SerializeObject(newDict);
|
||||
bool answ = JsoncActVal.Equals(JsonNewVal);
|
||||
@@ -156,9 +156,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// Clone oggetto
|
||||
/// </summary>
|
||||
/// <param name="userId"></param>
|
||||
/// <param name="userName"></param>
|
||||
/// <param name="doorId"></param>
|
||||
/// <returns></returns>
|
||||
public DoorOpModel ObjClone(string userId, int doorId)
|
||||
public DoorOpModel ObjClone(string userName, int doorId)
|
||||
{
|
||||
DoorOpModel answ = new DoorOpModel();
|
||||
DateTime adesso = DateTime.Now;
|
||||
@@ -168,8 +169,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
UserIdIns = userName,
|
||||
UserIdMod = userName,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = DoorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
@@ -184,8 +185,8 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
DateIns = adesso,
|
||||
DateMod = adesso,
|
||||
UserIdIns = userId,
|
||||
UserIdMod = userId,
|
||||
UserIdIns = userName,
|
||||
UserIdMod = userName,
|
||||
ObjectId = ObjectId,
|
||||
DoorId = doorId,
|
||||
JsoncConfigVal = JsoncConfigVal,
|
||||
@@ -197,6 +198,5 @@ namespace WebDoorCreator.Data.DbModels
|
||||
return answ;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,6 +21,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorOpTypId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indica Id del parent: se 0 sono root, altrimenti indica il type parent
|
||||
/// </summary>
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco dell'operazione da svolgere (calcolato, idealmente 4 char da 36 val 0..Z)
|
||||
/// </summary>
|
||||
@@ -68,20 +73,14 @@ namespace WebDoorCreator.Data.DbModels
|
||||
public string FPath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
public HierarchyId? DoorOpIdPathFromPatriarch { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Oggetto Json per specifica configurazione (template)
|
||||
/// </summary>
|
||||
public string JsoncConfig { get; set; } = "";
|
||||
///// <summary>
|
||||
///// Oggetto Json per specifica configurazione (template)
|
||||
///// </summary>
|
||||
//public string JsoncConfig { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno (opzionale)
|
||||
@@ -108,6 +107,21 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
@@ -116,7 +130,11 @@ namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
get => DateTime.Today >= ValidFrom && DateTime.Today <= ValidUntil;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stato della door operation {-1=DELETED, 0=UNCHANGED, 1=ADDED, 2=MODIFIED}
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public int status { get; set; } = 0;
|
||||
/// <summary>
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
|
||||
@@ -0,0 +1,144 @@
|
||||
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 Microsoft.EntityFrameworkCore;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Tabella dati Door Operation Type (astratte) TEMP
|
||||
/// </summary>
|
||||
[Table("DoorOpTypeTemp")]
|
||||
public class DoorOpTypeTempModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorOpTypId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco dell'operazione da svolgere (calcolato, idealmente 4 char da 36 val 0..Z)
|
||||
/// </summary>
|
||||
public string OpCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia da creare sempre
|
||||
/// </summary>
|
||||
public bool IsDefault { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se ci sia un hardware correlato all'operazione
|
||||
/// </summary>
|
||||
public bool HasHw { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Indica se sia un oggetto concreto (= con un file, che si può produrre) o abstract (ha figli, è un gruppo logico)
|
||||
/// </summary>
|
||||
public bool IsConcrete { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Codice dell'HW collegato
|
||||
/// </summary>
|
||||
public string HwCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione dell'HW collegato
|
||||
/// </summary>
|
||||
public string HwDescription { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// URL dell'immagine/link di riferimento
|
||||
/// </summary>
|
||||
public string DisplayUrl { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Path folder/file di riferimento
|
||||
/// </summary>
|
||||
public string FPath { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Idx univoco dell'elemento parent (se 0 = root)
|
||||
/// </summary>
|
||||
public int ParentDoorOpId { get; set; } = 0;
|
||||
|
||||
///// <summary>
|
||||
///// Idx univoco dell'elemento parent (se 0 = root)
|
||||
///// </summary>
|
||||
//public HierarchyId? DoorOpIdPathFromPatriarch { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Unit cost for the door
|
||||
/// </summary>
|
||||
public decimal UnitCost { get; set; } = 0;
|
||||
|
||||
///// <summary>
|
||||
///// Oggetto Json per specifica configurazione (template)
|
||||
///// </summary>
|
||||
//public string JsoncConfig { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno (opzionale)
|
||||
/// </summary>
|
||||
public string ExtOpCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione esterna (opzionale)
|
||||
/// </summary>
|
||||
public string ExtDescript { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Revisione dell'item
|
||||
/// </summary>
|
||||
public string Rev { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Inizio validità item
|
||||
/// </summary>
|
||||
public DateTime ValidFrom { get; set; } = new DateTime(2000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// Fine validità item
|
||||
/// </summary>
|
||||
public DateTime ValidUntil { get; set; } = new DateTime(3000, 1, 1);
|
||||
|
||||
/// <summary>
|
||||
/// MD5 Calcolato per controllo uguaglianze
|
||||
/// </summary>
|
||||
public string FileMD5 { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Dimensione file corrente
|
||||
/// </summary>
|
||||
public long FileDim { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Data ultima modifica
|
||||
/// </summary>
|
||||
public DateTime LastMod { get; set; } = DateTime.Today;
|
||||
|
||||
/// <summary>
|
||||
/// Check validità item
|
||||
/// </summary>
|
||||
[NotMapped]
|
||||
public bool IsActive
|
||||
{
|
||||
get => DateTime.Today >= ValidFrom && DateTime.Today <= ValidUntil;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Numero massimo associabile a singola Door
|
||||
/// </summary>
|
||||
public int MaxAllowed { get; set; } = 1;
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
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;
|
||||
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
/// <summary>
|
||||
/// Tabella dati Door Type
|
||||
/// </summary>
|
||||
[Table("DoorType")]
|
||||
public class DoorTypeModel
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int TypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Codice univoco del modello
|
||||
/// </summary>
|
||||
public string TypeCode { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Descrizione
|
||||
/// </summary>
|
||||
public string Description { get; set; } = "";
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace WebDoorCreator.Data.DbModels
|
||||
{
|
||||
[Table("TestTable")]
|
||||
public class IdentityTableSeedTest
|
||||
{
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int IdUni { get; set; } = 0;
|
||||
|
||||
[MaxLength(50)]
|
||||
public string Campo1 { get; set; } = "";
|
||||
|
||||
[MaxLength(500)]
|
||||
public string Campo2 { get; set; } = "";
|
||||
}
|
||||
}
|
||||
@@ -12,18 +12,33 @@ namespace WebDoorCreator.Data.DbModels
|
||||
// <Auto-Generated>
|
||||
// This is here so CodeMaid doesn't reorganize this document
|
||||
// </Auto-Generated>
|
||||
[Table("SerializedDoors")]
|
||||
public partial class SerializedDoorsModel
|
||||
[Table("ListValues")]
|
||||
public partial class ListValuesModel
|
||||
{
|
||||
#region Public Properties
|
||||
|
||||
[Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int DoorTmpId { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string TableName { get; set; }
|
||||
|
||||
|
||||
public string DoorSerVal { get; set; }
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
public bool Lock { get; set; }
|
||||
[MaxLength(250)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(250)]
|
||||
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
|
||||
}
|
||||
|
||||
@@ -23,10 +23,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
[MaxLength(50)]
|
||||
public string FieldName { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[MaxLength(250)]
|
||||
public string Value { get; set; }
|
||||
|
||||
[MaxLength(50)]
|
||||
[MaxLength(250)]
|
||||
public string Label { get; set; }
|
||||
|
||||
public int Ordinal { get; set; }
|
||||
|
||||
@@ -51,6 +51,26 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string UserIdMod { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Data promessa di consegna
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Stato globale dell'ordine
|
||||
/// </summary>
|
||||
@@ -61,9 +81,10 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string OrderDescript { get; set; } = "";
|
||||
|
||||
|
||||
|
||||
|
||||
[ForeignKey("CompanyId")]
|
||||
public virtual CompanyModel? CompanyNav { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// <summary>
|
||||
/// View to retrieve data from multiple tables
|
||||
/// </summary>
|
||||
//[Table("v_OrderStatus")]
|
||||
public class OrderStatusViewModel
|
||||
{
|
||||
/// <summary>
|
||||
@@ -70,5 +69,25 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// TotCost represent the total cost of the order
|
||||
/// </summary>
|
||||
public decimal TotCost { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Expected order delivery from DCA
|
||||
/// </summary>
|
||||
public DateTime DateProm { get; set; } = DateTime.Now.AddDays(60);
|
||||
|
||||
/// <summary>
|
||||
/// Date Order confirmed by customer from Order table
|
||||
/// </summary>
|
||||
public DateTime DateOrd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Effective order delivery date
|
||||
/// </summary>
|
||||
public DateTime DateDelivery { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Eventuale sconto globale
|
||||
/// </summary>
|
||||
public double Discount { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,12 +90,15 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
public string VAT { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Current Door ID
|
||||
/// </summary>
|
||||
public int DoorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Door's Type
|
||||
/// Door's parent ID
|
||||
/// </summary>
|
||||
public int TypeId { get; set; } = 0;
|
||||
public int ParentId { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
/// Codice esterno x riferimento (es ERP)
|
||||
|
||||
@@ -12,33 +12,17 @@ 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; }
|
||||
|
||||
public string DoorSerVal { 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; }
|
||||
public bool Lock { get; set; }
|
||||
|
||||
#endregion Public Properties
|
||||
}
|
||||
|
||||
@@ -35,5 +35,9 @@ namespace WebDoorCreator.Data.DbModels
|
||||
/// </summary>
|
||||
[MaxLength(500)]
|
||||
public string Traduzione { get; set; } = "";
|
||||
/// <summary>
|
||||
/// Indica se è da salvare su db o no
|
||||
/// </summary>
|
||||
public bool IsConfSave { get; set; } = false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace WebDoorCreator.Data
|
||||
|
||||
public MessagePipe(IConnectionMultiplexer redisConn, string channelName, bool enableLog = false)
|
||||
{
|
||||
_channel = channelName;
|
||||
_channel = new RedisChannel(channelName, RedisChannel.PatternMode.Literal); ;
|
||||
redis = redisConn;
|
||||
redisDb = redis.GetDatabase();
|
||||
this.enableLog = enableLog;
|
||||
@@ -28,6 +28,11 @@ namespace WebDoorCreator.Data
|
||||
|
||||
#region Public 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 bool saveAndSendMessage(string memKey, string message)
|
||||
{
|
||||
bool answ = false;
|
||||
@@ -94,7 +99,7 @@ namespace WebDoorCreator.Data
|
||||
/// <summary>
|
||||
/// Canale associato al gestore pipeline messaggi
|
||||
/// </summary>
|
||||
private string _channel { get; set; } = "";
|
||||
private RedisChannel _channel { get; set; } = new RedisChannel("Default", RedisChannel.PatternMode.Literal);
|
||||
|
||||
#endregion Private Properties
|
||||
|
||||
@@ -108,7 +113,7 @@ namespace WebDoorCreator.Data
|
||||
{
|
||||
Log.Trace($"ch {channel} | {message}");
|
||||
// messaggio
|
||||
PubSubEventArgs mea = new PubSubEventArgs(message);
|
||||
PubSubEventArgs mea = new PubSubEventArgs($"{message}");
|
||||
// se qualcuno ascolta sollevo evento nuovo valore...
|
||||
if (EA_NewMessage != null)
|
||||
{
|
||||
@@ -119,12 +124,6 @@ namespace WebDoorCreator.Data
|
||||
}
|
||||
|
||||
#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
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "2d778017-0768-47f4-b807-9094d4aa39c7",
|
||||
ConcurrencyStamp = "b83e70eb-09cd-4ac7-8571-c821029ae152",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
{ "0bef594b-861c-4c48-b967-c408174074c6", "a470e2f3-6c5e-4123-bf2e-f6f8b4d11328", "Undef", "UNDEF" },
|
||||
{ "2bdc3737-48c3-4340-b55d-1739eec7aede", "980f5e55-80d8-466d-8451-746acfa837d4", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "Admin", "ADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "DcaAdmin", "DCAADMIN" },
|
||||
{ "585875c2-1787-4c33-aa4d-dfa37ada8766", "0b6d6096-d9b8-4abe-a6b7-4adac55afc37", "CompAdmin", "COMPADMIN" },
|
||||
{ "7444754d-5643-461b-a3c1-aeb8665631d7", "9e3fac4e-50ec-437d-a968-a976ecdc27b5", "CompUser", "COMPUSER" },
|
||||
{ "9c1c4523-526d-4efa-af94-a24cb04312b8", "9ab5dd98-2d81-4baf-b01c-62c0c893c086", "User", "USER" }
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "be0e13af-b32e-490d-b798-36e090e91727",
|
||||
ConcurrencyStamp = "8bf806ed-63c9-4f86-b20e-836296469772",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "31011aea-c9a3-4f34-a9fd-7b7a4bcbefa6", "32cd475f-bbe2-4940-bfd1-fe26cafd4fae", "Undef", "UNDEF" },
|
||||
{ "a5ab56f6-fba3-434d-b316-e5bac2631411", "22a4245e-1026-4990-97ce-9e4a851b0f23", "CompAdmin", "COMPADMIN" },
|
||||
{ "b904f672-414e-4782-b0a5-30c4a0d952f5", "f5e19beb-0c79-41b7-9dee-9b276454eaf8", "CompUser", "COMPUSER" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "Admin", "ADMIN" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "DcaAdmin", "DCAADMIN" },
|
||||
{ "c9cb6d11-c9a5-43d8-bd04-70be1724ba4a", "07b2ba6d-4f23-43d1-b48c-5b05d14b7e7e", "SuperAdmin", "SUPERADMIN" }
|
||||
});
|
||||
|
||||
@@ -110,7 +110,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
{ "0bef594b-861c-4c48-b967-c408174074c6", "a470e2f3-6c5e-4123-bf2e-f6f8b4d11328", "Undef", "UNDEF" },
|
||||
{ "2bdc3737-48c3-4340-b55d-1739eec7aede", "980f5e55-80d8-466d-8451-746acfa837d4", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "Admin", "ADMIN" },
|
||||
{ "2d778017-0768-47f4-b807-9094d4aa39c7", "b83e70eb-09cd-4ac7-8571-c821029ae152", "DcaAdmin", "DCAADMIN" },
|
||||
{ "585875c2-1787-4c33-aa4d-dfa37ada8766", "0b6d6096-d9b8-4abe-a6b7-4adac55afc37", "CompAdmin", "COMPADMIN" },
|
||||
{ "7444754d-5643-461b-a3c1-aeb8665631d7", "9e3fac4e-50ec-437d-a968-a976ecdc27b5", "CompUser", "COMPUSER" },
|
||||
{ "9c1c4523-526d-4efa-af94-a24cb04312b8", "9ab5dd98-2d81-4baf-b01c-62c0c893c086", "User", "USER" }
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "f5f76968-2225-482a-82ac-f54bd05390b3",
|
||||
ConcurrencyStamp = "b54f1873-a97b-4bb1-9e61-7bd2db0a2316",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -58,7 +58,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "549ec954-a966-484c-8db8-c7d839e8c4af", "84b61e19-8786-45e4-8977-af6466a87878", "User", "USER" },
|
||||
{ "6abfe01f-48f9-4a48-8e49-ac5f29a8753a", "e981295d-29b1-4805-a70e-3c83dc4bcfd7", "CompAdmin", "COMPADMIN" },
|
||||
{ "7fb23328-c054-4b3d-92e0-f949745c8924", "d795b502-0429-4271-a12d-2549f1eb1b17", "Undef", "UNDEF" },
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "Admin", "ADMIN" }
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "DcaAdmin", "DCAADMIN" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
@@ -122,7 +122,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "31011aea-c9a3-4f34-a9fd-7b7a4bcbefa6", "32cd475f-bbe2-4940-bfd1-fe26cafd4fae", "Undef", "UNDEF" },
|
||||
{ "a5ab56f6-fba3-434d-b316-e5bac2631411", "22a4245e-1026-4990-97ce-9e4a851b0f23", "CompAdmin", "COMPADMIN" },
|
||||
{ "b904f672-414e-4782-b0a5-30c4a0d952f5", "f5e19beb-0c79-41b7-9dee-9b276454eaf8", "CompUser", "COMPUSER" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "Admin", "ADMIN" },
|
||||
{ "be0e13af-b32e-490d-b798-36e090e91727", "8bf806ed-63c9-4f86-b20e-836296469772", "DcaAdmin", "DCAADMIN" },
|
||||
{ "c9cb6d11-c9a5-43d8-bd04-70be1724ba4a", "07b2ba6d-4f23-43d1-b48c-5b05d14b7e7e", "SuperAdmin", "SUPERADMIN" }
|
||||
});
|
||||
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "0fe4015b-cf98-4229-a120-57eb9c2ca945",
|
||||
ConcurrencyStamp = "ccb4b655-3619-463d-a702-d0c9497e772c",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "Admin", "ADMIN" },
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "DcaAdmin", "DCAADMIN" },
|
||||
{ "1f63e241-4a96-437c-9af9-55748e0f6ed5", "684c9e79-7c20-4e25-ade2-66529980ef38", "Undef", "UNDEF" },
|
||||
{ "34e09fbe-45db-4225-af17-793b4a0f90a1", "3895c7f6-8f63-4c30-9f93-0af0504f5e91", "CompUser", "COMPUSER" },
|
||||
{ "9dfb7941-838f-483e-b1c2-10e01abb3d2d", "15368102-cd08-46cf-a376-dbbc8c6a8f71", "User", "USER" },
|
||||
@@ -135,7 +135,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{ "549ec954-a966-484c-8db8-c7d839e8c4af", "84b61e19-8786-45e4-8977-af6466a87878", "User", "USER" },
|
||||
{ "6abfe01f-48f9-4a48-8e49-ac5f29a8753a", "e981295d-29b1-4805-a70e-3c83dc4bcfd7", "CompAdmin", "COMPADMIN" },
|
||||
{ "7fb23328-c054-4b3d-92e0-f949745c8924", "d795b502-0429-4271-a12d-2549f1eb1b17", "Undef", "UNDEF" },
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "Admin", "ADMIN" }
|
||||
{ "f5f76968-2225-482a-82ac-f54bd05390b3", "b54f1873-a97b-4bb1-9e61-7bd2db0a2316", "DcaAdmin", "DCAADMIN" }
|
||||
});
|
||||
|
||||
migrationBuilder.InsertData(
|
||||
|
||||
@@ -69,8 +69,8 @@ namespace WebDoorCreator.Data.Migrations
|
||||
{
|
||||
Id = "4225aeef-4a9b-4629-bbb2-4f3ea6c93595",
|
||||
ConcurrencyStamp = "2a53a882-ccfd-46f5-8c31-04e5945bfc07",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "Admin", "ADMIN" },
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "DcaAdmin", "DCAADMIN" },
|
||||
{ "7d3b9719-8a33-4790-b0ce-9df3552458f3", "f271ed2d-48dc-4293-b485-15cfb28b3ce7", "Undef", "UNDEF" },
|
||||
{ "7f512221-c37f-438c-920a-76458e217611", "315f6b4a-8700-4ae7-a74b-37a70fbc1c90", "User", "USER" },
|
||||
{ "820b2520-2f28-47cc-8453-ea6871f6e0e6", "0ea8eb3e-972e-4a40-b265-f892335e3db0", "CompUser", "COMPUSER" },
|
||||
@@ -140,7 +140,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "Admin", "ADMIN" },
|
||||
{ "0fe4015b-cf98-4229-a120-57eb9c2ca945", "ccb4b655-3619-463d-a702-d0c9497e772c", "DcaAdmin", "DCAADMIN" },
|
||||
{ "1f63e241-4a96-437c-9af9-55748e0f6ed5", "684c9e79-7c20-4e25-ade2-66529980ef38", "Undef", "UNDEF" },
|
||||
{ "34e09fbe-45db-4225-af17-793b4a0f90a1", "3895c7f6-8f63-4c30-9f93-0af0504f5e91", "CompUser", "COMPUSER" },
|
||||
{ "9dfb7941-838f-483e-b1c2-10e01abb3d2d", "15368102-cd08-46cf-a376-dbbc8c6a8f71", "User", "USER" },
|
||||
|
||||
@@ -97,7 +97,7 @@ namespace WebDoorCreator.Data.Migrations
|
||||
columns: new[] { "Id", "ConcurrencyStamp", "Name", "NormalizedName" },
|
||||
values: new object[,]
|
||||
{
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "Admin", "ADMIN" },
|
||||
{ "4225aeef-4a9b-4629-bbb2-4f3ea6c93595", "2a53a882-ccfd-46f5-8c31-04e5945bfc07", "DcaAdmin", "DCAADMIN" },
|
||||
{ "7d3b9719-8a33-4790-b0ce-9df3552458f3", "f271ed2d-48dc-4293-b485-15cfb28b3ce7", "Undef", "UNDEF" },
|
||||
{ "7f512221-c37f-438c-920a-76458e217611", "315f6b4a-8700-4ae7-a74b-37a70fbc1c90", "User", "USER" },
|
||||
{ "820b2520-2f28-47cc-8453-ea6871f6e0e6", "0ea8eb3e-972e-4a40-b265-f892335e3db0", "CompUser", "COMPUSER" },
|
||||
|
||||
+2
-2
@@ -62,8 +62,8 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
Id = "851dd9d6-570c-48b0-ac48-e494c5fac5d7",
|
||||
ConcurrencyStamp = "13d724e3-b415-4719-8387-e21952306ce3",
|
||||
Name = "Admin",
|
||||
NormalizedName = "ADMIN"
|
||||
Name = "DcaAdmin",
|
||||
NormalizedName = "DCAADMIN"
|
||||
},
|
||||
new
|
||||
{
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{ "246c1608-059d-4f2b-98b2-f57ab47de3b7", "1b81eff5-4ff6-4756-9bb5-983869fd4b41", "CompAdmin", "COMPADMIN" },
|
||||
{ "695e212d-f79c-45dd-931d-6390c4533c6e", "a4788fda-3f24-41dc-b492-a621de69f031", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "805c6051-0372-4e2b-9b94-f5c8881ef7cb", "a73832bd-be3e-4a48-8b0a-475c8930b4c5", "CompUser", "COMPUSER" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "Admin", "ADMIN" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "DcaAdmin", "DCAADMIN" },
|
||||
{ "d0cafb49-7d19-4d4f-a280-6837e5842e8b", "7f94eb48-1f91-4e88-bae6-bb655dba168b", "User", "USER" }
|
||||
});
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{ "246c1608-059d-4f2b-98b2-f57ab47de3b7", "1b81eff5-4ff6-4756-9bb5-983869fd4b41", "CompAdmin", "COMPADMIN" },
|
||||
{ "695e212d-f79c-45dd-931d-6390c4533c6e", "a4788fda-3f24-41dc-b492-a621de69f031", "SuperAdmin", "SUPERADMIN" },
|
||||
{ "805c6051-0372-4e2b-9b94-f5c8881ef7cb", "a73832bd-be3e-4a48-8b0a-475c8930b4c5", "CompUser", "COMPUSER" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "Admin", "ADMIN" },
|
||||
{ "851dd9d6-570c-48b0-ac48-e494c5fac5d7", "13d724e3-b415-4719-8387-e21952306ce3", "DcaAdmin", "DCAADMIN" },
|
||||
{ "d0cafb49-7d19-4d4f-a280-6837e5842e8b", "7f94eb48-1f91-4e88-bae6-bb655dba168b", "User", "USER" }
|
||||
});
|
||||
}
|
||||
|
||||
+3
-1
@@ -287,8 +287,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
@@ -25,11 +25,13 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
name: "TreeCode",
|
||||
table: "DoorOpType");
|
||||
|
||||
#if false
|
||||
migrationBuilder.AddColumn<HierarchyId>(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType",
|
||||
type: "hierarchyid",
|
||||
nullable: true);
|
||||
#endif
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "GraphicParams",
|
||||
@@ -75,9 +77,11 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
migrationBuilder.DropTable(
|
||||
name: "Hardware");
|
||||
|
||||
#if false
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
name: "DoorOpIdPathFromPatriarch",
|
||||
table: "DoorOpType");
|
||||
#endif
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "ParentDoorOpId",
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -298,8 +298,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
Generated
+3
-1
@@ -302,8 +302,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -306,8 +306,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -301,8 +301,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -305,8 +305,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -312,8 +312,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+3
-1
@@ -334,8 +334,10 @@ namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
b.Property<string>("ExtDescript")
|
||||
.IsRequired()
|
||||
|
||||
+994
@@ -0,0 +1,994 @@
|
||||
// <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("20230601135441_fixDoorTypeId")]
|
||||
partial class fixDoorTypeId
|
||||
{
|
||||
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.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)");
|
||||
|
||||
#if false
|
||||
b.Property<HierarchyId>("DoorOpIdPathFromPatriarch")
|
||||
.HasColumnType("hierarchyid");
|
||||
#endif
|
||||
|
||||
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")
|
||||
.HasColumnType("int");
|
||||
|
||||
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("v_OrderStatus");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("WebDoorCreator.Data.DbModels.PrtRepOrderModel", b =>
|
||||
{
|
||||
b.Property<int>("OrderId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("DoorId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectKey")
|
||||
.HasColumnType("nvarchar(450)");
|
||||
|
||||
b.Property<string>("Address")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("City")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("CompanyExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("CompanyId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("CompanyName")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<DateTime>("DateIns")
|
||||
.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>("ObjectQty")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ObjectType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ObjectVal")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderDescript")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("OrderExtCode")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Quantity")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("State")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("Status")
|
||||
.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>("UserIdMod")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("VAT")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<int>("ZipCode")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("OrderId", "DoorId", "ObjectKey");
|
||||
|
||||
b.ToTable("DbSetPrtRepOrder");
|
||||
});
|
||||
|
||||
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<int>("ClaimId")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("ClaimType")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
b.Property<string>("ClaimValue")
|
||||
.IsRequired()
|
||||
.HasColumnType("nvarchar(max)");
|
||||
|
||||
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", "ClaimId");
|
||||
|
||||
b.ToView("v_UserRolesClaims");
|
||||
});
|
||||
|
||||
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.Navigation("OrderNav");
|
||||
});
|
||||
|
||||
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,40 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
#nullable disable
|
||||
|
||||
namespace WebDoorCreator.Data.Migrations.WDCData
|
||||
{
|
||||
public partial class fixDoorTypeId : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_Door_DoorType_TypeId",
|
||||
table: "Door");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_Door_TypeId",
|
||||
table: "Door");
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_Door_TypeId",
|
||||
table: "Door",
|
||||
column: "TypeId");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_Door_DoorType_TypeId",
|
||||
table: "Door",
|
||||
column: "TypeId",
|
||||
principalTable: "DoorType",
|
||||
principalColumn: "TypeId",
|
||||
onDelete: ReferentialAction.Cascade);
|
||||
}
|
||||
}
|
||||
}
|
||||
Generated
+1000
File diff suppressed because it is too large
Load Diff
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user