Compare commits
55 Commits
7cc645c188
...
compile-co
Author | SHA1 | Date | |
---|---|---|---|
83789cdd91 | |||
8bae94de96 | |||
032c971472 | |||
704df4fa8c | |||
e452047dfb | |||
bf3e46a784 | |||
909f358356 | |||
b3fb328b98 | |||
f110fba4cd | |||
c4d29dad4e | |||
2dbde5d70c | |||
2119b31764 | |||
55d3a96228 | |||
aa38d17daf | |||
d4fcbe0dc6 | |||
6a7bc39ff8 | |||
b3a2ee7285 | |||
a2326315a6 | |||
8684e97db7 | |||
1946623c9e | |||
40e7a3f8e0 | |||
f0df620dc9 | |||
6a2bc0b4ab | |||
c4036471f7 | |||
e19cb5fcda | |||
e68a1a4c3b | |||
7ddda56987 | |||
77f45fabb1 | |||
1b22ffa439 | |||
123bbdb9fe | |||
b99b721458 | |||
b1c6903c1c | |||
538b1f817e | |||
89790f4fc1 | |||
9b7e3ef897 | |||
ba8d92ea01 | |||
603052d7e5 | |||
c97ce37238 | |||
10dbd08cd2 | |||
1b7e482ad4 | |||
cbcd3ee53a | |||
fe981c4c04 | |||
3e6fc3fdb3 | |||
1b17cd75c2 | |||
5d701ded55 | |||
0289e62e9f | |||
d6af4b6ef9 | |||
4e04d4666d | |||
88af83cf96 | |||
e8ec36fe3e | |||
4b83a89cb0 | |||
ca651191c8 | |||
ffe6cd7c63 | |||
e1675fe9e9 | |||
a3053eadf6 |
@ -1,74 +0,0 @@
|
|||||||
# EditorConfig is awesome:http://EditorConfig.org
|
|
||||||
|
|
||||||
# top-most EditorConfig file
|
|
||||||
root = true
|
|
||||||
|
|
||||||
[*]
|
|
||||||
# Don't use tabs for indentation.
|
|
||||||
# (Please don't specify an indent_size here; that has too many unintended consequences.)
|
|
||||||
indent_style = space
|
|
||||||
|
|
||||||
charset = utf-8
|
|
||||||
|
|
||||||
# Where supported, trim trailing whitespace on all lines.
|
|
||||||
trim_trailing_whitespace = true
|
|
||||||
|
|
||||||
# Where supported (e.g. in VS Code but not VS), add a final newline to files.
|
|
||||||
insert_final_newline = true
|
|
||||||
|
|
||||||
# Code files
|
|
||||||
[*.{cs,csx,vb,vbx}]
|
|
||||||
indent_size = 4
|
|
||||||
dotnet_sort_system_directives_first = true:warning
|
|
||||||
|
|
||||||
# Xml project files
|
|
||||||
[*.{*proj,vcxproj.filters,projitems}]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# Xml config files
|
|
||||||
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct,tasks,xml,yml}]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# JSON files
|
|
||||||
[*.json]
|
|
||||||
indent_size = 2
|
|
||||||
|
|
||||||
# PowerShell
|
|
||||||
[*.{ps1,psm1}]
|
|
||||||
indent_size = 4
|
|
||||||
|
|
||||||
# Shell
|
|
||||||
[*.sh]
|
|
||||||
indent_size = 4
|
|
||||||
end_of_line = lf
|
|
||||||
|
|
||||||
# Dotnet code style settings:
|
|
||||||
[*.cs]
|
|
||||||
# Sort using and Import directives with System.* appearing first
|
|
||||||
dotnet_sort_system_directives_first = true
|
|
||||||
|
|
||||||
# Don't use this. qualifier
|
|
||||||
dotnet_style_qualification_for_field = false:suggestion
|
|
||||||
dotnet_style_qualification_for_property = false:suggestion
|
|
||||||
|
|
||||||
# use int x = .. over Int32
|
|
||||||
dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
|
|
||||||
|
|
||||||
# use int.MaxValue over Int32.MaxValue
|
|
||||||
dotnet_style_predefined_type_for_member_access = true:suggestion
|
|
||||||
|
|
||||||
# Require var all the time.
|
|
||||||
csharp_style_var_for_built_in_types = false:suggestion
|
|
||||||
csharp_style_var_when_type_is_apparent = false:suggestion
|
|
||||||
csharp_style_var_elsewhere = false:suggestion
|
|
||||||
|
|
||||||
# Disallow throw expressions.
|
|
||||||
csharp_style_throw_expression = false:suggestion
|
|
||||||
|
|
||||||
# Newline settings
|
|
||||||
csharp_new_line_before_open_brace = all
|
|
||||||
csharp_new_line_before_else = true
|
|
||||||
csharp_new_line_before_catch = true
|
|
||||||
csharp_new_line_before_finally = true
|
|
||||||
csharp_new_line_before_members_in_object_initializers = true
|
|
||||||
csharp_new_line_before_members_in_anonymous_types = true
|
|
||||||
|
47
.gitignore
vendored
47
.gitignore
vendored
@ -337,3 +337,50 @@ ASALocalRun/
|
|||||||
!.vscode/tasks.json
|
!.vscode/tasks.json
|
||||||
!.vscode/launch.json
|
!.vscode/launch.json
|
||||||
!.vscode/extensions.json
|
!.vscode/extensions.json
|
||||||
|
|
||||||
|
.env
|
||||||
|
|
||||||
|
/Fab2ApprovalMKLink/App_Start
|
||||||
|
/Fab2ApprovalMKLink/Controllers
|
||||||
|
/Fab2ApprovalMKLink/DMO
|
||||||
|
/Fab2ApprovalMKLink/Jobs
|
||||||
|
/Fab2ApprovalMKLink/JobSchedules
|
||||||
|
/Fab2ApprovalMKLink/Misc
|
||||||
|
/Fab2ApprovalMKLink/Models
|
||||||
|
/Fab2ApprovalMKLink/PdfGenerator
|
||||||
|
/Fab2ApprovalMKLink/Utilities
|
||||||
|
/Fab2ApprovalMKLink/ViewModels
|
||||||
|
|
||||||
|
/Fab2ApprovalMKLink/Views/Account
|
||||||
|
/Fab2ApprovalMKLink/Views/Admin
|
||||||
|
/Fab2ApprovalMKLink/Views/Audit
|
||||||
|
/Fab2ApprovalMKLink/Views/ChangeControl
|
||||||
|
/Fab2ApprovalMKLink/Views/CorrectiveAction
|
||||||
|
/Fab2ApprovalMKLink/Views/ECN
|
||||||
|
/Fab2ApprovalMKLink/Views/Home
|
||||||
|
/Fab2ApprovalMKLink/Views/LotDisposition
|
||||||
|
/Fab2ApprovalMKLink/Views/LotTraveler
|
||||||
|
/Fab2ApprovalMKLink/Views/Manager
|
||||||
|
/Fab2ApprovalMKLink/Views/MRB
|
||||||
|
/Fab2ApprovalMKLink/Views/PartsRequest
|
||||||
|
/Fab2ApprovalMKLink/Views/Reports
|
||||||
|
/Fab2ApprovalMKLink/Views/Shared
|
||||||
|
/Fab2ApprovalMKLink/Views/Training
|
||||||
|
/Fab2ApprovalMKLink/Views/Workflow
|
||||||
|
|
||||||
|
/Fab2ApprovalMKLink/.vscode/.UserSecrets
|
||||||
|
/Fab2ApprovalSystem/.vscode/.UserSecrets
|
||||||
|
/Fab2ApprovalTests/.vscode/.UserSecrets
|
||||||
|
/MesaFabApproval.API/.vscode/.UserSecrets
|
||||||
|
/MesaFabApproval.Client/.vscode/.UserSecrets
|
||||||
|
/MesaFabApproval.Shared/.vscode/.UserSecrets
|
||||||
|
|
||||||
|
fab-001
|
||||||
|
fab-002
|
||||||
|
fab-004
|
||||||
|
fab-004
|
||||||
|
fab-005
|
||||||
|
fab-006
|
||||||
|
fab-007
|
||||||
|
fab-008
|
||||||
|
fab-009
|
83
.vscode/launch.json
vendored
Normal file
83
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,83 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (console) - Fab2ApprovalSystem",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "Fab2ApprovalSystem-build",
|
||||||
|
"program": "${workspaceFolder}/Fab2ApprovalSystem/bin/Debug/net8.0/win-x64/Fab2ApprovalSystem.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (web) - Fab2ApprovalMKLink",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "Fab2ApprovalMKLink-build",
|
||||||
|
"program": "${workspaceFolder}/Fab2ApprovalMKLink/bin/Debug/net8.0/Fab2ApprovalMKLink.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
|
||||||
|
"uriFormat": "%s/swagger/index.html"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (web) - fab-004",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "fab-004-build",
|
||||||
|
"program": "${workspaceFolder}/fab-004/bin/net8.0/fab-004.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"stopAtEntry": false,
|
||||||
|
"serverReadyAction": {
|
||||||
|
"action": "openExternally",
|
||||||
|
"pattern": "\\bNow listening on:\\s+(https?://\\S+)",
|
||||||
|
"uriFormat": "%s/swagger/index.html"
|
||||||
|
},
|
||||||
|
"env": {
|
||||||
|
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||||
|
},
|
||||||
|
"sourceFileMap": {
|
||||||
|
"/Views": "${workspaceFolder}/Views"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (console) - MesaFabApproval.API",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "MesaFabApproval.API-build",
|
||||||
|
"program": "${workspaceFolder}/MesaFabApproval.API/bin/Debug/net8.0/MesaFabApproval.API.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "node Launch Current Opened File",
|
||||||
|
"program": "${file}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
425
.vscode/settings.json
vendored
Normal file
425
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,425 @@
|
|||||||
|
{
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.wordWrap": "off"
|
||||||
|
},
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": false,
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"abutton",
|
||||||
|
"accessibilities",
|
||||||
|
"accodingly",
|
||||||
|
"acknowledgmentby",
|
||||||
|
"Acks",
|
||||||
|
"actionsheet",
|
||||||
|
"Additonal",
|
||||||
|
"Addtional",
|
||||||
|
"againm",
|
||||||
|
"agendaview",
|
||||||
|
"Antlr",
|
||||||
|
"Appover",
|
||||||
|
"Appprrovers",
|
||||||
|
"Approvalog",
|
||||||
|
"Aprovers",
|
||||||
|
"Aproverslist",
|
||||||
|
"asax",
|
||||||
|
"aspnetmvc",
|
||||||
|
"Assignedto",
|
||||||
|
"Atachments",
|
||||||
|
"Attachemnt",
|
||||||
|
"Attachemnts",
|
||||||
|
"Attchment",
|
||||||
|
"auditee",
|
||||||
|
"Auditee",
|
||||||
|
"Auditees",
|
||||||
|
"automaically",
|
||||||
|
"Autthorized",
|
||||||
|
"beacuase",
|
||||||
|
"beforeunload",
|
||||||
|
"Belguim",
|
||||||
|
"bfound",
|
||||||
|
"bgcolor",
|
||||||
|
"Bies",
|
||||||
|
"binded",
|
||||||
|
"blackbackground",
|
||||||
|
"blackhover",
|
||||||
|
"blackpressed",
|
||||||
|
"blueenergy",
|
||||||
|
"blueopal",
|
||||||
|
"buttongroup",
|
||||||
|
"BYMRB",
|
||||||
|
"bytesgot",
|
||||||
|
"CAID",
|
||||||
|
"casection",
|
||||||
|
"CAXXXX",
|
||||||
|
"CCPCR",
|
||||||
|
"CCPCRB",
|
||||||
|
"cellspacing",
|
||||||
|
"Cheeso's",
|
||||||
|
"chkbx",
|
||||||
|
"Clib",
|
||||||
|
"colorpicker",
|
||||||
|
"columnmenu",
|
||||||
|
"columnsreorder",
|
||||||
|
"columnsresize",
|
||||||
|
"comming",
|
||||||
|
"Containmen",
|
||||||
|
"Copmments",
|
||||||
|
"correctiv",
|
||||||
|
"Correctivet",
|
||||||
|
"Creat",
|
||||||
|
"currentd",
|
||||||
|
"Cyle",
|
||||||
|
"dadada",
|
||||||
|
"darkbluehover",
|
||||||
|
"darkbluepressed",
|
||||||
|
"darkred",
|
||||||
|
"datafields",
|
||||||
|
"datasource",
|
||||||
|
"dataviz",
|
||||||
|
"datepicker",
|
||||||
|
"datetimepicker",
|
||||||
|
"dayview",
|
||||||
|
"Deletet",
|
||||||
|
"Delgation",
|
||||||
|
"DENITED",
|
||||||
|
"Deparmtent",
|
||||||
|
"departmentids",
|
||||||
|
"Descirption",
|
||||||
|
"devprog",
|
||||||
|
"dfeffc",
|
||||||
|
"Disp",
|
||||||
|
"Dispo",
|
||||||
|
"Dispoitio",
|
||||||
|
"Dispos",
|
||||||
|
"Dispositon",
|
||||||
|
"Dispostion",
|
||||||
|
"Dispostions",
|
||||||
|
"dispotypevalidation",
|
||||||
|
"Docbase",
|
||||||
|
"Documentum",
|
||||||
|
"Documetum",
|
||||||
|
"dont",
|
||||||
|
"downlaoded",
|
||||||
|
"draganddrop",
|
||||||
|
"dragcancel",
|
||||||
|
"dropdownlist",
|
||||||
|
"Eamils",
|
||||||
|
"ECNPCRB",
|
||||||
|
"Ecns",
|
||||||
|
"edmx",
|
||||||
|
"EECN",
|
||||||
|
"emai",
|
||||||
|
"emailparams",
|
||||||
|
"Emergrncy",
|
||||||
|
"energyblue",
|
||||||
|
"Eran",
|
||||||
|
"Esql",
|
||||||
|
"ETECN",
|
||||||
|
"EXCELOPENXML",
|
||||||
|
"existinglocation",
|
||||||
|
"Expando",
|
||||||
|
"extrafield",
|
||||||
|
"fadc",
|
||||||
|
"fbec",
|
||||||
|
"fcfdfd",
|
||||||
|
"fdff",
|
||||||
|
"fece",
|
||||||
|
"feeebd",
|
||||||
|
"ffdc",
|
||||||
|
"ffdd",
|
||||||
|
"fieldset",
|
||||||
|
"FILIPE",
|
||||||
|
"filtermenu",
|
||||||
|
"Fldr",
|
||||||
|
"flintstone",
|
||||||
|
"FLOWLOCS",
|
||||||
|
"FMEA",
|
||||||
|
"ftplib",
|
||||||
|
"FTPSPN",
|
||||||
|
"GETDATE",
|
||||||
|
"gitea",
|
||||||
|
"globaldocudms",
|
||||||
|
"glyphicons",
|
||||||
|
"groupable",
|
||||||
|
"Guids",
|
||||||
|
"halflings",
|
||||||
|
"Hexsize",
|
||||||
|
"highcontrast",
|
||||||
|
"Hmac",
|
||||||
|
"holdsteps",
|
||||||
|
"hostspecific",
|
||||||
|
"icenium",
|
||||||
|
"IECN",
|
||||||
|
"imagebrowser",
|
||||||
|
"IMRB",
|
||||||
|
"Infineon",
|
||||||
|
"Insertd",
|
||||||
|
"inverseicons",
|
||||||
|
"IPCRB",
|
||||||
|
"ISADMIN",
|
||||||
|
"islast",
|
||||||
|
"ISNULL",
|
||||||
|
"ITAR",
|
||||||
|
"jquery",
|
||||||
|
"jqueryval",
|
||||||
|
"jqwidgets",
|
||||||
|
"jqxbuttongroup",
|
||||||
|
"jqxbuttons",
|
||||||
|
"jqxcalendar",
|
||||||
|
"jqxchart",
|
||||||
|
"jqxcheckbox",
|
||||||
|
"jqxcolorpicker",
|
||||||
|
"jqxcombobox",
|
||||||
|
"jqxcore",
|
||||||
|
"jqxdata",
|
||||||
|
"jqxdatatable",
|
||||||
|
"jqxdatetimeinput",
|
||||||
|
"jqxdocking",
|
||||||
|
"jqxdockpanel",
|
||||||
|
"jqxdragdrop",
|
||||||
|
"jqxdropdownbutton",
|
||||||
|
"jqxdropdownlist",
|
||||||
|
"jqxexpander",
|
||||||
|
"jqxgauge",
|
||||||
|
"jqxgrid",
|
||||||
|
"jqxinput",
|
||||||
|
"jqxknockout",
|
||||||
|
"jqxlistbox",
|
||||||
|
"jqxlistmenu",
|
||||||
|
"jqxmaskedinput",
|
||||||
|
"jqxmenu",
|
||||||
|
"jqxnavigationbar",
|
||||||
|
"jqxnumberinput",
|
||||||
|
"jqxpanel",
|
||||||
|
"jqxpasswordinput",
|
||||||
|
"jqxprogressbar",
|
||||||
|
"jqxradiobutton",
|
||||||
|
"jqxrangeselector",
|
||||||
|
"jqxrating",
|
||||||
|
"jqxresponse",
|
||||||
|
"jqxscrollbar",
|
||||||
|
"jqxscrollview",
|
||||||
|
"jqxslider",
|
||||||
|
"jqxsplitter",
|
||||||
|
"jqxswitchbutton",
|
||||||
|
"jqxtabs",
|
||||||
|
"jqxtooltip",
|
||||||
|
"jqxtouch",
|
||||||
|
"jqxtree",
|
||||||
|
"jqxtreegrid",
|
||||||
|
"jqxtreemap",
|
||||||
|
"jqxvalidator",
|
||||||
|
"jqxwindow",
|
||||||
|
"kendogridcustom",
|
||||||
|
"kendoui",
|
||||||
|
"labelelement",
|
||||||
|
"labelledby",
|
||||||
|
"Leanred",
|
||||||
|
"lightgray",
|
||||||
|
"linkbutton",
|
||||||
|
"Linq",
|
||||||
|
"Listdiv",
|
||||||
|
"listview",
|
||||||
|
"Lnks",
|
||||||
|
"localfilename",
|
||||||
|
"loclist",
|
||||||
|
"logis",
|
||||||
|
"logtext",
|
||||||
|
"loopmis",
|
||||||
|
"lotdispo",
|
||||||
|
"LOTDISPSITION",
|
||||||
|
"Lotfile",
|
||||||
|
"lotlist",
|
||||||
|
"lotstatusoption",
|
||||||
|
"LTRIM",
|
||||||
|
"MADUREIRA",
|
||||||
|
"mailrelay",
|
||||||
|
"MDTM",
|
||||||
|
"meego",
|
||||||
|
"meetingid",
|
||||||
|
"menubutton",
|
||||||
|
"mesafi",
|
||||||
|
"metroblack",
|
||||||
|
"metrodark",
|
||||||
|
"miliseconds",
|
||||||
|
"modalview",
|
||||||
|
"modernizr",
|
||||||
|
"Modernizr",
|
||||||
|
"monthview",
|
||||||
|
"MRBIs",
|
||||||
|
"Mrbs",
|
||||||
|
"msecs",
|
||||||
|
"multipleextended",
|
||||||
|
"Navigatable",
|
||||||
|
"nbsp",
|
||||||
|
"newbase",
|
||||||
|
"newchange",
|
||||||
|
"newdi",
|
||||||
|
"newfilename",
|
||||||
|
"newsource",
|
||||||
|
"Newtonsoft",
|
||||||
|
"notications",
|
||||||
|
"Notifcation",
|
||||||
|
"Notifyf",
|
||||||
|
"NTLM",
|
||||||
|
"Nullcc",
|
||||||
|
"numerictextbox",
|
||||||
|
"objdata",
|
||||||
|
"OCAP",
|
||||||
|
"occured",
|
||||||
|
"odata",
|
||||||
|
"oldfilename",
|
||||||
|
"OLHOLD",
|
||||||
|
"onclick",
|
||||||
|
"onmousemove",
|
||||||
|
"OPDESC",
|
||||||
|
"OPENQUERY",
|
||||||
|
"Oper",
|
||||||
|
"operationslist",
|
||||||
|
"Orginator",
|
||||||
|
"Originatorname",
|
||||||
|
"Ouellette",
|
||||||
|
"Owin",
|
||||||
|
"pageable",
|
||||||
|
"Pageable",
|
||||||
|
"panelbar",
|
||||||
|
"parentid",
|
||||||
|
"parminput",
|
||||||
|
"parms",
|
||||||
|
"Parms",
|
||||||
|
"particula",
|
||||||
|
"pasv",
|
||||||
|
"PASV",
|
||||||
|
"PATINDEX",
|
||||||
|
"PCRB",
|
||||||
|
"PCRBID",
|
||||||
|
"pcrvalues",
|
||||||
|
"pdbonly",
|
||||||
|
"Preventitive",
|
||||||
|
"preventivet",
|
||||||
|
"Prevetative",
|
||||||
|
"proces",
|
||||||
|
"Processedl",
|
||||||
|
"procs",
|
||||||
|
"productfamilies",
|
||||||
|
"progess",
|
||||||
|
"progressbar",
|
||||||
|
"qrcode",
|
||||||
|
"Quanityt",
|
||||||
|
"rangebar",
|
||||||
|
"Recep",
|
||||||
|
"Recepient",
|
||||||
|
"recieved",
|
||||||
|
"recordlock",
|
||||||
|
"remotefilename",
|
||||||
|
"reorderable",
|
||||||
|
"reportform",
|
||||||
|
"reportslist",
|
||||||
|
"reportslistdiv",
|
||||||
|
"Reqquired",
|
||||||
|
"Reqs",
|
||||||
|
"Requiest",
|
||||||
|
"Responsibles",
|
||||||
|
"RETR",
|
||||||
|
"Revisioing",
|
||||||
|
"Revisioned",
|
||||||
|
"Revison",
|
||||||
|
"rgba",
|
||||||
|
"rkotian",
|
||||||
|
"RNFR",
|
||||||
|
"RNTO",
|
||||||
|
"Roless",
|
||||||
|
"roundbg",
|
||||||
|
"RTRIM",
|
||||||
|
"SAMDB",
|
||||||
|
"scroller",
|
||||||
|
"scrollview",
|
||||||
|
"seleced",
|
||||||
|
"selectionlog",
|
||||||
|
"Selectpart",
|
||||||
|
"sess",
|
||||||
|
"Sfisharepoint",
|
||||||
|
"shinyblack",
|
||||||
|
"showpassword",
|
||||||
|
"SIGNON",
|
||||||
|
"simpleparser",
|
||||||
|
"slddrw",
|
||||||
|
"sldprt",
|
||||||
|
"sortasc",
|
||||||
|
"sortascbutton",
|
||||||
|
"sortdesc",
|
||||||
|
"sortdescbutton",
|
||||||
|
"sortremove",
|
||||||
|
"sparkline",
|
||||||
|
"splitview",
|
||||||
|
"SPNMRB",
|
||||||
|
"SPNPDB",
|
||||||
|
"SSRS",
|
||||||
|
"Sssign",
|
||||||
|
"Staus",
|
||||||
|
"stylesheet",
|
||||||
|
"Submited",
|
||||||
|
"subrole",
|
||||||
|
"subroles",
|
||||||
|
"Succefully",
|
||||||
|
"Succesfully",
|
||||||
|
"sucessfully",
|
||||||
|
"SURP",
|
||||||
|
"Swashbuckle",
|
||||||
|
"SWRN",
|
||||||
|
"tabindex",
|
||||||
|
"tabstrip",
|
||||||
|
"Tahoma",
|
||||||
|
"taskcompleted",
|
||||||
|
"Tasklist",
|
||||||
|
"Taveler",
|
||||||
|
"TECN",
|
||||||
|
"TECNs",
|
||||||
|
"TEMIRWAP",
|
||||||
|
"tempecd",
|
||||||
|
"tempimplement",
|
||||||
|
"templabel",
|
||||||
|
"tempvalue",
|
||||||
|
"TEMSA",
|
||||||
|
"timepicker",
|
||||||
|
"Tobe",
|
||||||
|
"Toplevel",
|
||||||
|
"Totrav",
|
||||||
|
"trainingby",
|
||||||
|
"Traininglist",
|
||||||
|
"traininglistdiv",
|
||||||
|
"transanction",
|
||||||
|
"Trav",
|
||||||
|
"Traveller",
|
||||||
|
"Traverler",
|
||||||
|
"TRAVLELER",
|
||||||
|
"Travler",
|
||||||
|
"TREEVIEW",
|
||||||
|
"trigerred",
|
||||||
|
"ttinclude",
|
||||||
|
"Uhandled",
|
||||||
|
"Updat",
|
||||||
|
"Uplaod",
|
||||||
|
"Upto",
|
||||||
|
"userevents",
|
||||||
|
"userids",
|
||||||
|
"userlist",
|
||||||
|
"Validatable",
|
||||||
|
"valueelement",
|
||||||
|
"Variabls",
|
||||||
|
"Verdana",
|
||||||
|
"vgrid",
|
||||||
|
"viewmodel",
|
||||||
|
"vsdoc",
|
||||||
|
"whethere",
|
||||||
|
"windowsphone",
|
||||||
|
"Winsock",
|
||||||
|
"worlflow"
|
||||||
|
],
|
||||||
|
"dotnet.preferCSharpExtension": true
|
||||||
|
}
|
529
.vscode/tasks.json
vendored
Normal file
529
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,529 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "MSBuild-Debug",
|
||||||
|
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"/target:Build",
|
||||||
|
"/restore:True",
|
||||||
|
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://api.nuget.org/v3/index.json",
|
||||||
|
"/detailedsummary",
|
||||||
|
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||||
|
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||||
|
"Fab2ApprovalSystem/Fab2ApprovalSystem.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MSBuild-Release",
|
||||||
|
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"/target:Build",
|
||||||
|
"/restore:True",
|
||||||
|
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://api.nuget.org/v3/index.json",
|
||||||
|
"/detailedsummary",
|
||||||
|
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||||
|
"/property:Configuration=Release;TargetFrameworkVersion=v4.8",
|
||||||
|
"Fab2ApprovalSystem/Fab2ApprovalSystem.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-User Secrets Init",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"init"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-User Secrets Set",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"set",
|
||||||
|
"_UserSecretsId",
|
||||||
|
"f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "fab-004-build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/fab-004/fab-004.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalMKLink-Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"-r",
|
||||||
|
"win-x64",
|
||||||
|
"-c",
|
||||||
|
"Release",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-User Secrets Init",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"init"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-User Secrets Set",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"set",
|
||||||
|
"_UserSecretsId",
|
||||||
|
"3942d1fb-d585-40ae-8985-d276d1b94b77"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-testDebug",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-testRelease",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"-c",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Fab2ApprovalTests-Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"-r",
|
||||||
|
"win-x64",
|
||||||
|
"-c",
|
||||||
|
"Release",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalTests/Fab2ApprovalTests.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-User Secrets Init",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"init"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-User Secrets Set",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"set",
|
||||||
|
"_UserSecretsId",
|
||||||
|
"0b98e1f2-95ed-4edd-8149-58cce51ca059"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-testDebug",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-testRelease",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"-c",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.API-Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"-r",
|
||||||
|
"win-x64",
|
||||||
|
"-c",
|
||||||
|
"Release",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.API/MesaFabApproval.API.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-User Secrets Init",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"init"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-testDebug",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-testRelease",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"test",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary",
|
||||||
|
"-c",
|
||||||
|
"Release"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "MesaFabApproval.Client-Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"-r",
|
||||||
|
"win-x64",
|
||||||
|
"-c",
|
||||||
|
"Release",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"${workspaceFolder}/MesaFabApproval.Client/MesaFabApproval.Client.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
381
Fab2ApprovalMKLink/.editorconfig
Normal file
381
Fab2ApprovalMKLink/.editorconfig
Normal file
@ -0,0 +1,381 @@
|
|||||||
|
[*.md]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
|
[*.csproj]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
|
[*.cs]
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
csharp_new_line_before_catch = false
|
||||||
|
csharp_new_line_before_else = false
|
||||||
|
csharp_new_line_before_finally = false
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = none
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
csharp_prefer_braces = false
|
||||||
|
csharp_prefer_qualified_reference = true:error
|
||||||
|
csharp_prefer_simple_default_expression = true:warning
|
||||||
|
csharp_prefer_simple_using_statement = true:warning
|
||||||
|
csharp_prefer_static_local_function = true:warning
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = false
|
||||||
|
csharp_space_after_cast = false
|
||||||
|
csharp_space_after_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_after_comma = true
|
||||||
|
csharp_space_after_dot = false
|
||||||
|
csharp_space_after_keywords_in_control_flow_statements = true
|
||||||
|
csharp_space_after_semicolon_in_for_statement = true
|
||||||
|
csharp_space_around_binary_operators = before_and_after
|
||||||
|
csharp_space_around_declaration_statements = false
|
||||||
|
csharp_space_before_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_before_comma = false
|
||||||
|
csharp_space_before_dot = false
|
||||||
|
csharp_space_before_open_square_brackets = false
|
||||||
|
csharp_space_before_semicolon_in_for_statement = false
|
||||||
|
csharp_space_between_empty_square_brackets = false
|
||||||
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||||
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||||
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_parentheses = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
csharp_style_conditional_delegate_call = true
|
||||||
|
csharp_style_deconstructed_variable_declaration = false
|
||||||
|
csharp_style_expression_bodied_accessors = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_constructors = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_indexers = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_local_functions = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_methods = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_operators = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_properties = when_on_single_line:warning
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
||||||
|
csharp_style_inlined_variable_declaration = false
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
csharp_style_pattern_local_over_anonymous_function = true:warning
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true:warning
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||||
|
csharp_style_prefer_index_operator = true:warning
|
||||||
|
csharp_style_prefer_not_pattern = true:warning
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
|
csharp_style_prefer_pattern_matching = true:warning
|
||||||
|
csharp_style_prefer_range_operator = true:warning
|
||||||
|
csharp_style_prefer_switch_expression = true:warning
|
||||||
|
csharp_style_throw_expression = true
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||||
|
csharp_style_var_elsewhere = false:warning
|
||||||
|
csharp_style_var_for_built_in_types = false:warning
|
||||||
|
csharp_style_var_when_type_is_apparent = false:warning
|
||||||
|
csharp_using_directive_placement = outside_namespace
|
||||||
|
dotnet_analyzer_diagnostic.category-Design.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Documentation.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Globalization.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Interoperability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Maintainability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Naming.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Performance.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Reliability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Security.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-SingleFile.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Style.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Usage.severity = error
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
dotnet_code_quality_unused_parameters = non_public
|
||||||
|
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||||
|
dotnet_diagnostic.CA1001.severity = error # CA1001: Types that own disposable fields should be disposable
|
||||||
|
dotnet_diagnostic.CA1051.severity = error # CA1051: Do not declare visible instance fields
|
||||||
|
dotnet_diagnostic.CA1511.severity = warning # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance
|
||||||
|
dotnet_diagnostic.CA1513.severity = warning # Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance
|
||||||
|
dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
|
||||||
|
dotnet_diagnostic.CA1829.severity = error # CA1829: Use Length/Count property instead of Count() when available
|
||||||
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
|
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
||||||
|
dotnet_diagnostic.CA1862.severity = warning # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
|
||||||
|
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
||||||
|
dotnet_diagnostic.CA2201.severity = none # CA2201: Exception type System.NullReferenceException is reserved by the runtime
|
||||||
|
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
||||||
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
|
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||||
|
dotnet_diagnostic.IDE0005.severity = error # Using directive is unnecessary
|
||||||
|
dotnet_diagnostic.IDE0010.severity = none # Add missing cases to switch statement (IDE0010)
|
||||||
|
dotnet_diagnostic.IDE0028.severity = error # IDE0028: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||||
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
|
dotnet_diagnostic.IDE0048.severity = none # Parentheses preferences (IDE0047 and IDE0048)
|
||||||
|
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||||
|
dotnet_diagnostic.IDE0051.severity = error # Private member '' is unused [, ]
|
||||||
|
dotnet_diagnostic.IDE0058.severity = error # IDE0058: Expression value is never used
|
||||||
|
dotnet_diagnostic.IDE0060.severity = error # IDE0060: Remove unused parameter
|
||||||
|
dotnet_diagnostic.IDE0074.severity = warning # IDE0074: Use compound assignment
|
||||||
|
dotnet_diagnostic.IDE0130.severity = none # Namespace does not match folder structure (IDE0130)
|
||||||
|
dotnet_diagnostic.IDE0270.severity = warning # IDE0270: Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
||||||
|
dotnet_diagnostic.IDE0300.severity = error # IDE0300: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0301.severity = error #IDE0301: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE2000.severity = error # IDE2000: Allow multiple blank lines
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.symbols = class
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.symbols = delegate
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.symbols = enum
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.symbols = event
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.symbols = private_method
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.symbols = private_or_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.symbols = private_or_internal_static_field
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.symbols = property
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.symbols = public_or_protected_field
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.symbols = static_method
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.symbols = struct
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.private_of_internal_field.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.private_of_internal_field.required_prefix = _
|
||||||
|
dotnet_naming_style.private_of_internal_field.required_suffix =
|
||||||
|
dotnet_naming_style.private_of_internal_field.word_separator =
|
||||||
|
dotnet_naming_symbols.abstract_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.abstract_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.abstract_method.required_modifiers = abstract
|
||||||
|
dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.class.applicable_kinds = class
|
||||||
|
dotnet_naming_symbols.class.required_modifiers =
|
||||||
|
dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.delegate.applicable_kinds = delegate
|
||||||
|
dotnet_naming_symbols.delegate.required_modifiers =
|
||||||
|
dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.enum.applicable_kinds = enum
|
||||||
|
dotnet_naming_symbols.enum.required_modifiers =
|
||||||
|
dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.event.applicable_kinds = event
|
||||||
|
dotnet_naming_symbols.event.required_modifiers =
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
dotnet_naming_symbols.method.applicable_accessibilities = public
|
||||||
|
dotnet_naming_symbols.method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.method.required_modifiers =
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_method.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.private_method.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.property.applicable_kinds = property
|
||||||
|
dotnet_naming_symbols.property.required_modifiers =
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.required_modifiers =
|
||||||
|
dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.static_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.static_field.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.static_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.static_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.static_method.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.struct.applicable_kinds = struct
|
||||||
|
dotnet_naming_symbols.struct.required_modifiers =
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = 0
|
||||||
|
dotnet_separate_import_directive_groups = true
|
||||||
|
dotnet_sort_system_directives_first = true
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true:warning
|
||||||
|
dotnet_style_explicit_tuple_names = true:warning
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true:warning
|
||||||
|
dotnet_style_object_initializer = true:warning
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true:warning
|
||||||
|
dotnet_style_prefer_auto_properties = true:warning
|
||||||
|
dotnet_style_prefer_compound_assignment = true:warning
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = false
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = false
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true:warning
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true:warning
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
dotnet_style_qualification_for_event = false:error
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false:error
|
||||||
|
dotnet_style_qualification_for_property = false:error
|
||||||
|
dotnet_style_readonly_field = true:warning
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 4
|
||||||
|
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
|
||||||
|
# https://github.com/dotnet/aspnetcore/blob/main/.editorconfig
|
||||||
|
# https://github.com/dotnet/project-system/blob/main/.editorconfig
|
||||||
|
|
||||||
|
# Question
|
||||||
|
csharp_prefer_simple_using_statement = false # Question
|
||||||
|
csharp_style_expression_bodied_constructors = when_on_single_line:none # Question
|
||||||
|
csharp_style_expression_bodied_properties = true # Question
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning # Question
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = false # Question
|
||||||
|
csharp_style_prefer_pattern_matching = false # Question
|
||||||
|
csharp_style_prefer_range_operator = false # Question
|
||||||
|
csharp_style_prefer_switch_expression = false # Question
|
||||||
|
csharp_style_unused_value_assignment_preference = unused_local_variable # Question
|
||||||
|
csharp_style_unused_value_expression_statement_preference = false # Question
|
||||||
|
csharp_style_var_elsewhere = false:none # Question
|
||||||
|
csharp_style_var_for_built_in_types = false:none # Question
|
||||||
|
csharp_style_var_when_type_is_apparent = false:warning # Question
|
||||||
|
dotnet_diagnostic.CA1001.severity = none # Question - Types that own disposable fields should be disposable
|
||||||
|
dotnet_diagnostic.CA1051.severity = none # Question - Do not declare visible instance fields
|
||||||
|
dotnet_diagnostic.CA1416.severity = none # Question - This call site is reachable on all platforms.
|
||||||
|
dotnet_diagnostic.CA1510.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.CA1834.severity = none # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
|
dotnet_diagnostic.CA1860.severity = none # Question - Avoid using
|
||||||
|
dotnet_diagnostic.CA1862.severity = none # Question - Prefer using
|
||||||
|
dotnet_diagnostic.CA2208.severity = none # Question - Instantiate argument exceptions correctly
|
||||||
|
dotnet_diagnostic.CA2211.severity = none # Question - Non-constant fields should not be visible
|
||||||
|
dotnet_diagnostic.CA2249.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.CA2253.severity = none # Question - Named placeholders should not be numeric values
|
||||||
|
dotnet_diagnostic.CS0103.severity = none # Question - The name
|
||||||
|
dotnet_diagnostic.CS0168.severity = none # Question - The variable
|
||||||
|
dotnet_diagnostic.CS0219.severity = none # Question - The variable
|
||||||
|
dotnet_diagnostic.CS0612.severity = none # Question - is obsolete
|
||||||
|
dotnet_diagnostic.CS0618.severity = none # Question - Compiler Warning (level 2)
|
||||||
|
dotnet_diagnostic.CS0659.severity = none # Question - Compiler Warning (level 3)
|
||||||
|
dotnet_diagnostic.CS8019.severity = warning # Question - Unnecessary using directive.
|
||||||
|
dotnet_diagnostic.CS8600.severity = none # Question - Converting null literal or possible null value to non-nullable type
|
||||||
|
dotnet_diagnostic.CS8602.severity = none # Question - Dereference of a possibly null reference.
|
||||||
|
dotnet_diagnostic.CS8603.severity = none # Question - Possible null reference return
|
||||||
|
dotnet_diagnostic.CS8604.severity = none # Question - Possible null reference argument for parameter.
|
||||||
|
dotnet_diagnostic.CS8618.severity = none # Question - Non-nullable variable must contain a non-null value when exiting constructor
|
||||||
|
dotnet_diagnostic.CS8625.severity = none # Question - Cannot convert null literal to non-nullable reference type.
|
||||||
|
dotnet_diagnostic.CS8629.severity = none # Question - Nullable value type may be null
|
||||||
|
dotnet_diagnostic.CS8765.severity = none # Question - Nullability of type of parameter
|
||||||
|
dotnet_diagnostic.IDE0005.severity = none # Question - Remove unnecessary using directives
|
||||||
|
dotnet_diagnostic.IDE0008.severity = warning # Question - Use explicit type instead of
|
||||||
|
dotnet_diagnostic.IDE0017.severity = none # Question - Object initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0019.severity = none # Question - Use pattern matching
|
||||||
|
dotnet_diagnostic.IDE0021.severity = none # Question - Use expression body for constructor
|
||||||
|
dotnet_diagnostic.IDE0022.severity = none # Question - Use expression body for method
|
||||||
|
dotnet_diagnostic.IDE0025.severity = none # Question - Use expression body for property
|
||||||
|
dotnet_diagnostic.IDE0027.severity = none # Question - Use expression body for accessor
|
||||||
|
dotnet_diagnostic.IDE0028.severity = none # Question - Use collection initializers or expressions
|
||||||
|
dotnet_diagnostic.IDE0031.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0032.severity = none # Question - Use auto property
|
||||||
|
dotnet_diagnostic.IDE0037.severity = none # Question - Member name can be simplified
|
||||||
|
dotnet_diagnostic.IDE0041.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0047.severity = none # Question - Parentheses preferences
|
||||||
|
dotnet_diagnostic.IDE0049.severity = warning # Question - Name can be simplified
|
||||||
|
dotnet_diagnostic.IDE0051.severity = none # Question - Remove unused private member
|
||||||
|
dotnet_diagnostic.IDE0053.severity = none # Question - Use expression body for lambdas
|
||||||
|
dotnet_diagnostic.IDE0054.severity = none # Question - Use compound assignment
|
||||||
|
dotnet_diagnostic.IDE0055.severity = none # Question - Formatting rule
|
||||||
|
dotnet_diagnostic.IDE0057.severity = none # Question - Substring can be simplified
|
||||||
|
dotnet_diagnostic.IDE0058.severity = none # Question - Remove unnecessary expression value
|
||||||
|
dotnet_diagnostic.IDE0059.severity = none # Question - Unnecessary assignment of a value to
|
||||||
|
dotnet_diagnostic.IDE0060.severity = none # Question - Remove unused parameter
|
||||||
|
dotnet_diagnostic.IDE0063.severity = none # Question - Use simple
|
||||||
|
dotnet_diagnostic.IDE0065.severity = none # Question -
|
||||||
|
dotnet_diagnostic.IDE0066.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.IDE0078.severity = none # Question - Use pattern matching (may change code meaning)
|
||||||
|
dotnet_diagnostic.IDE0090.severity = warning # Question - Simplify new expression
|
||||||
|
dotnet_diagnostic.IDE0100.severity = error # Question - Remove redundant equality
|
||||||
|
dotnet_diagnostic.IDE0160.severity = warning # Question - Use block-scoped namespace
|
||||||
|
dotnet_diagnostic.IDE0161.severity = warning # Question - Namespace declaration preferences
|
||||||
|
dotnet_diagnostic.IDE0270.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0300.severity = none # Question - Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE1006.severity = none # Question - Use collection expression for builder dotnet_style_prefer_collection_expression
|
||||||
|
dotnet_style_null_propagation = false # Question
|
||||||
|
dotnet_style_object_initializer = false # Question
|
||||||
|
dotnet_style_prefer_auto_properties = false # Question
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true # Question
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = false:warning # Question
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = false # Question
|
1
Fab2ApprovalMKLink/.vscode/format-report.json
vendored
Normal file
1
Fab2ApprovalMKLink/.vscode/format-report.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
33
Fab2ApprovalMKLink/.vscode/launch.json
vendored
Normal file
33
Fab2ApprovalMKLink/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (console)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
"program": "${workspaceFolder}/bin/Debug/net8.0/Fab2ApprovalMKLink.dll",
|
||||||
|
"args": [
|
||||||
|
"s",
|
||||||
|
"test"
|
||||||
|
],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "node Launch Current Opened File",
|
||||||
|
"program": "${file}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
71
Fab2ApprovalMKLink/.vscode/mklink.md
vendored
Normal file
71
Fab2ApprovalMKLink/.vscode/mklink.md
vendored
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
# mklink
|
||||||
|
|
||||||
|
```bash 1731546128283 = 638671429282830000 = Wed Nov 13 2024 18:02:07 GMT-0700 (Mountain Standard Time)
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\App_Start" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\App_Start"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\bin" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\bin"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Content" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Content"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Controllers" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Controllers"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\DMO" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\DMO"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\EmailTemplates" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\EmailTemplates"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\fonts" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\fonts"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\FTPBatch" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\FTPBatch"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Jobs" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Jobs"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\JobSchedules" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\JobSchedules"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Lib" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Lib"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Misc" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Misc"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Models" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Models"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\obj" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\obj"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\PdfGenerator" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\PdfGenerator"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Properties" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Properties"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\SafeModels" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\SafeModels"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Scripts" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Scripts"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Utilities" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Utilities"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\View" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\View"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\ViewModels" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\ViewModels"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash 1731615429577 = 638672122295770000 = Thu Nov 14 2024 13:17:09 GMT-0700 (Mountain Standard Time)
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\.vscode\.UserSecrets" "C:\Users\phares\AppData\Roaming\Microsoft\UserSecrets\f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\ViewModels" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\ViewModels"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Models" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Models"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Misc" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Misc"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\DMO" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\DMO"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Utilities" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Utilities"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\PdfGenerator" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\PdfGenerator"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\Jobs" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\Jobs"
|
||||||
|
mklink /J "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalMKLink\JobSchedules" "L:\DevOps\Mesa_FI\MesaFabApproval\Fab2ApprovalSystem\JobSchedules"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash 1747242128286 = 638828389282860000 = 2025-2.Spring = Wed May 14 2025 10:02:07 GMT-0700 (Mountain Standard Time)
|
||||||
|
mklink /J "Fab2ApprovalMKLink\.vscode\.UserSecrets" "%AppData%\Microsoft\UserSecrets\f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Controllers" "Fab2ApprovalSystem\Controllers"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\DMO" "Fab2ApprovalSystem\DMO"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Jobs" "Fab2ApprovalSystem\Jobs"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\JobSchedules" "Fab2ApprovalSystem\JobSchedules"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Misc" "Fab2ApprovalSystem\Misc"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Models" "Fab2ApprovalSystem\Models"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\PdfGenerator" "Fab2ApprovalSystem\PdfGenerator"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Utilities" "Fab2ApprovalSystem\Utilities"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\ViewModels" "Fab2ApprovalSystem\ViewModels"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\ViewModels" "Fab2ApprovalSystem\ViewModels"
|
||||||
|
```
|
||||||
|
|
||||||
|
```bash 1747249935803 = 638828467358030000 = 2025-2.Spring = Wed May 14 2025 12:12:15 GMT-0700 (Mountain Standard Time)
|
||||||
|
mkdir "Fab2ApprovalMKLink\Views"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Account" "Fab2ApprovalSystem\Views\Account"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Admin" "Fab2ApprovalSystem\Views\Admin"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Audit" "Fab2ApprovalSystem\Views\Audit"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\ChangeControl" "Fab2ApprovalSystem\Views\ChangeControl"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\CorrectiveAction" "Fab2ApprovalSystem\Views\CorrectiveAction"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\ECN" "Fab2ApprovalSystem\Views\ECN"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Home" "Fab2ApprovalSystem\Views\Home"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\LotDisposition" "Fab2ApprovalSystem\Views\LotDisposition"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\LotTraveler" "Fab2ApprovalSystem\Views\LotTraveler"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Manager" "Fab2ApprovalSystem\Views\Manager"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\MRB" "Fab2ApprovalSystem\Views\MRB"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\PartsRequest" "Fab2ApprovalSystem\Views\PartsRequest"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Reports" "Fab2ApprovalSystem\Views\Reports"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Shared" "Fab2ApprovalSystem\Views\Shared"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Training" "Fab2ApprovalSystem\Views\Training"
|
||||||
|
mklink /J "Fab2ApprovalMKLink\Views\Workflow" "Fab2ApprovalSystem\Views\Workflow"
|
||||||
|
```
|
424
Fab2ApprovalMKLink/.vscode/settings.json
vendored
Normal file
424
Fab2ApprovalMKLink/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
{
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.wordWrap": "off"
|
||||||
|
},
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": false,
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"abutton",
|
||||||
|
"accessibilities",
|
||||||
|
"accodingly",
|
||||||
|
"acknowledgmentby",
|
||||||
|
"Acks",
|
||||||
|
"actionsheet",
|
||||||
|
"Additonal",
|
||||||
|
"Addtional",
|
||||||
|
"againm",
|
||||||
|
"agendaview",
|
||||||
|
"Antlr",
|
||||||
|
"Appover",
|
||||||
|
"Appprrovers",
|
||||||
|
"Approvalog",
|
||||||
|
"Aprovers",
|
||||||
|
"Aproverslist",
|
||||||
|
"asax",
|
||||||
|
"aspnetmvc",
|
||||||
|
"Assignedto",
|
||||||
|
"Atachments",
|
||||||
|
"Attachemnt",
|
||||||
|
"Attachemnts",
|
||||||
|
"Attchment",
|
||||||
|
"auditee",
|
||||||
|
"Auditee",
|
||||||
|
"Auditees",
|
||||||
|
"automaically",
|
||||||
|
"Autthorized",
|
||||||
|
"beacuase",
|
||||||
|
"beforeunload",
|
||||||
|
"Belguim",
|
||||||
|
"bfound",
|
||||||
|
"bgcolor",
|
||||||
|
"Bies",
|
||||||
|
"binded",
|
||||||
|
"blackbackground",
|
||||||
|
"blackhover",
|
||||||
|
"blackpressed",
|
||||||
|
"blueenergy",
|
||||||
|
"blueopal",
|
||||||
|
"buttongroup",
|
||||||
|
"BYMRB",
|
||||||
|
"bytesgot",
|
||||||
|
"CAID",
|
||||||
|
"casection",
|
||||||
|
"CAXXXX",
|
||||||
|
"CCPCR",
|
||||||
|
"CCPCRB",
|
||||||
|
"cellspacing",
|
||||||
|
"Cheeso's",
|
||||||
|
"chkbx",
|
||||||
|
"Clib",
|
||||||
|
"colorpicker",
|
||||||
|
"columnmenu",
|
||||||
|
"columnsreorder",
|
||||||
|
"columnsresize",
|
||||||
|
"comming",
|
||||||
|
"Containmen",
|
||||||
|
"Copmments",
|
||||||
|
"correctiv",
|
||||||
|
"Correctivet",
|
||||||
|
"Creat",
|
||||||
|
"currentd",
|
||||||
|
"Cyle",
|
||||||
|
"dadada",
|
||||||
|
"darkbluehover",
|
||||||
|
"darkbluepressed",
|
||||||
|
"darkred",
|
||||||
|
"datafields",
|
||||||
|
"datasource",
|
||||||
|
"dataviz",
|
||||||
|
"datepicker",
|
||||||
|
"datetimepicker",
|
||||||
|
"dayview",
|
||||||
|
"Deletet",
|
||||||
|
"Delgation",
|
||||||
|
"DENITED",
|
||||||
|
"Deparmtent",
|
||||||
|
"departmentids",
|
||||||
|
"Descirption",
|
||||||
|
"devprog",
|
||||||
|
"dfeffc",
|
||||||
|
"Disp",
|
||||||
|
"Dispo",
|
||||||
|
"Dispoitio",
|
||||||
|
"Dispos",
|
||||||
|
"Dispositon",
|
||||||
|
"Dispostion",
|
||||||
|
"Dispostions",
|
||||||
|
"dispotypevalidation",
|
||||||
|
"Docbase",
|
||||||
|
"Documentum",
|
||||||
|
"Documetum",
|
||||||
|
"dont",
|
||||||
|
"downlaoded",
|
||||||
|
"draganddrop",
|
||||||
|
"dragcancel",
|
||||||
|
"dropdownlist",
|
||||||
|
"Eamils",
|
||||||
|
"ECNPCRB",
|
||||||
|
"Ecns",
|
||||||
|
"edmx",
|
||||||
|
"EECN",
|
||||||
|
"emai",
|
||||||
|
"emailparams",
|
||||||
|
"Emergrncy",
|
||||||
|
"energyblue",
|
||||||
|
"Eran",
|
||||||
|
"Esql",
|
||||||
|
"ETECN",
|
||||||
|
"EXCELOPENXML",
|
||||||
|
"existinglocation",
|
||||||
|
"Expando",
|
||||||
|
"extrafield",
|
||||||
|
"fadc",
|
||||||
|
"fbec",
|
||||||
|
"fcfdfd",
|
||||||
|
"fdff",
|
||||||
|
"fece",
|
||||||
|
"feeebd",
|
||||||
|
"ffdc",
|
||||||
|
"ffdd",
|
||||||
|
"fieldset",
|
||||||
|
"FILIPE",
|
||||||
|
"filtermenu",
|
||||||
|
"Fldr",
|
||||||
|
"flintstone",
|
||||||
|
"FLOWLOCS",
|
||||||
|
"FMEA",
|
||||||
|
"ftplib",
|
||||||
|
"FTPSPN",
|
||||||
|
"GETDATE",
|
||||||
|
"gitea",
|
||||||
|
"globaldocudms",
|
||||||
|
"glyphicons",
|
||||||
|
"groupable",
|
||||||
|
"Guids",
|
||||||
|
"halflings",
|
||||||
|
"Hexsize",
|
||||||
|
"highcontrast",
|
||||||
|
"Hmac",
|
||||||
|
"holdsteps",
|
||||||
|
"hostspecific",
|
||||||
|
"icenium",
|
||||||
|
"IECN",
|
||||||
|
"imagebrowser",
|
||||||
|
"IMRB",
|
||||||
|
"Infineon",
|
||||||
|
"Insertd",
|
||||||
|
"inverseicons",
|
||||||
|
"IPCRB",
|
||||||
|
"ISADMIN",
|
||||||
|
"islast",
|
||||||
|
"ISNULL",
|
||||||
|
"ITAR",
|
||||||
|
"jquery",
|
||||||
|
"jqueryval",
|
||||||
|
"jqwidgets",
|
||||||
|
"jqxbuttongroup",
|
||||||
|
"jqxbuttons",
|
||||||
|
"jqxcalendar",
|
||||||
|
"jqxchart",
|
||||||
|
"jqxcheckbox",
|
||||||
|
"jqxcolorpicker",
|
||||||
|
"jqxcombobox",
|
||||||
|
"jqxcore",
|
||||||
|
"jqxdata",
|
||||||
|
"jqxdatatable",
|
||||||
|
"jqxdatetimeinput",
|
||||||
|
"jqxdocking",
|
||||||
|
"jqxdockpanel",
|
||||||
|
"jqxdragdrop",
|
||||||
|
"jqxdropdownbutton",
|
||||||
|
"jqxdropdownlist",
|
||||||
|
"jqxexpander",
|
||||||
|
"jqxgauge",
|
||||||
|
"jqxgrid",
|
||||||
|
"jqxinput",
|
||||||
|
"jqxknockout",
|
||||||
|
"jqxlistbox",
|
||||||
|
"jqxlistmenu",
|
||||||
|
"jqxmaskedinput",
|
||||||
|
"jqxmenu",
|
||||||
|
"jqxnavigationbar",
|
||||||
|
"jqxnumberinput",
|
||||||
|
"jqxpanel",
|
||||||
|
"jqxpasswordinput",
|
||||||
|
"jqxprogressbar",
|
||||||
|
"jqxradiobutton",
|
||||||
|
"jqxrangeselector",
|
||||||
|
"jqxrating",
|
||||||
|
"jqxresponse",
|
||||||
|
"jqxscrollbar",
|
||||||
|
"jqxscrollview",
|
||||||
|
"jqxslider",
|
||||||
|
"jqxsplitter",
|
||||||
|
"jqxswitchbutton",
|
||||||
|
"jqxtabs",
|
||||||
|
"jqxtooltip",
|
||||||
|
"jqxtouch",
|
||||||
|
"jqxtree",
|
||||||
|
"jqxtreegrid",
|
||||||
|
"jqxtreemap",
|
||||||
|
"jqxvalidator",
|
||||||
|
"jqxwindow",
|
||||||
|
"kendogridcustom",
|
||||||
|
"kendoui",
|
||||||
|
"labelelement",
|
||||||
|
"labelledby",
|
||||||
|
"Leanred",
|
||||||
|
"lightgray",
|
||||||
|
"linkbutton",
|
||||||
|
"Linq",
|
||||||
|
"Listdiv",
|
||||||
|
"listview",
|
||||||
|
"Lnks",
|
||||||
|
"localfilename",
|
||||||
|
"loclist",
|
||||||
|
"logis",
|
||||||
|
"logtext",
|
||||||
|
"loopmis",
|
||||||
|
"lotdispo",
|
||||||
|
"LOTDISPSITION",
|
||||||
|
"Lotfile",
|
||||||
|
"lotlist",
|
||||||
|
"lotstatusoption",
|
||||||
|
"LTRIM",
|
||||||
|
"MADUREIRA",
|
||||||
|
"mailrelay",
|
||||||
|
"MDTM",
|
||||||
|
"meego",
|
||||||
|
"meetingid",
|
||||||
|
"menubutton",
|
||||||
|
"mesafi",
|
||||||
|
"metroblack",
|
||||||
|
"metrodark",
|
||||||
|
"miliseconds",
|
||||||
|
"modalview",
|
||||||
|
"modernizr",
|
||||||
|
"Modernizr",
|
||||||
|
"monthview",
|
||||||
|
"MRBIs",
|
||||||
|
"Mrbs",
|
||||||
|
"msecs",
|
||||||
|
"multipleextended",
|
||||||
|
"Navigatable",
|
||||||
|
"nbsp",
|
||||||
|
"newbase",
|
||||||
|
"newchange",
|
||||||
|
"newdi",
|
||||||
|
"newfilename",
|
||||||
|
"newsource",
|
||||||
|
"Newtonsoft",
|
||||||
|
"notications",
|
||||||
|
"Notifcation",
|
||||||
|
"Notifyf",
|
||||||
|
"NTLM",
|
||||||
|
"Nullcc",
|
||||||
|
"numerictextbox",
|
||||||
|
"objdata",
|
||||||
|
"OCAP",
|
||||||
|
"occured",
|
||||||
|
"odata",
|
||||||
|
"oldfilename",
|
||||||
|
"OLHOLD",
|
||||||
|
"onclick",
|
||||||
|
"onmousemove",
|
||||||
|
"OPDESC",
|
||||||
|
"OPENQUERY",
|
||||||
|
"Oper",
|
||||||
|
"operationslist",
|
||||||
|
"Orginator",
|
||||||
|
"Originatorname",
|
||||||
|
"Ouellette",
|
||||||
|
"Owin",
|
||||||
|
"pageable",
|
||||||
|
"Pageable",
|
||||||
|
"panelbar",
|
||||||
|
"parentid",
|
||||||
|
"parminput",
|
||||||
|
"parms",
|
||||||
|
"Parms",
|
||||||
|
"particula",
|
||||||
|
"pasv",
|
||||||
|
"PASV",
|
||||||
|
"PATINDEX",
|
||||||
|
"PCRB",
|
||||||
|
"PCRBID",
|
||||||
|
"pcrvalues",
|
||||||
|
"pdbonly",
|
||||||
|
"Preventitive",
|
||||||
|
"preventivet",
|
||||||
|
"Prevetative",
|
||||||
|
"proces",
|
||||||
|
"Processedl",
|
||||||
|
"procs",
|
||||||
|
"productfamilies",
|
||||||
|
"progess",
|
||||||
|
"progressbar",
|
||||||
|
"qrcode",
|
||||||
|
"Quanityt",
|
||||||
|
"rangebar",
|
||||||
|
"Recep",
|
||||||
|
"Recepient",
|
||||||
|
"recieved",
|
||||||
|
"recordlock",
|
||||||
|
"remotefilename",
|
||||||
|
"reorderable",
|
||||||
|
"reportform",
|
||||||
|
"reportslist",
|
||||||
|
"reportslistdiv",
|
||||||
|
"Reqquired",
|
||||||
|
"Reqs",
|
||||||
|
"Requiest",
|
||||||
|
"Responsibles",
|
||||||
|
"RETR",
|
||||||
|
"Revisioing",
|
||||||
|
"Revisioned",
|
||||||
|
"Revison",
|
||||||
|
"rgba",
|
||||||
|
"rkotian",
|
||||||
|
"RNFR",
|
||||||
|
"RNTO",
|
||||||
|
"Roless",
|
||||||
|
"roundbg",
|
||||||
|
"RTRIM",
|
||||||
|
"SAMDB",
|
||||||
|
"scroller",
|
||||||
|
"scrollview",
|
||||||
|
"seleced",
|
||||||
|
"selectionlog",
|
||||||
|
"Selectpart",
|
||||||
|
"sess",
|
||||||
|
"Sfisharepoint",
|
||||||
|
"shinyblack",
|
||||||
|
"showpassword",
|
||||||
|
"SIGNON",
|
||||||
|
"simpleparser",
|
||||||
|
"slddrw",
|
||||||
|
"sldprt",
|
||||||
|
"sortasc",
|
||||||
|
"sortascbutton",
|
||||||
|
"sortdesc",
|
||||||
|
"sortdescbutton",
|
||||||
|
"sortremove",
|
||||||
|
"sparkline",
|
||||||
|
"splitview",
|
||||||
|
"SPNMRB",
|
||||||
|
"SPNPDB",
|
||||||
|
"SSRS",
|
||||||
|
"Sssign",
|
||||||
|
"Staus",
|
||||||
|
"stylesheet",
|
||||||
|
"Submited",
|
||||||
|
"subrole",
|
||||||
|
"subroles",
|
||||||
|
"Succefully",
|
||||||
|
"Succesfully",
|
||||||
|
"sucessfully",
|
||||||
|
"SURP",
|
||||||
|
"Swashbuckle",
|
||||||
|
"SWRN",
|
||||||
|
"tabindex",
|
||||||
|
"tabstrip",
|
||||||
|
"Tahoma",
|
||||||
|
"taskcompleted",
|
||||||
|
"Tasklist",
|
||||||
|
"Taveler",
|
||||||
|
"TECN",
|
||||||
|
"TECNs",
|
||||||
|
"TEMIRWAP",
|
||||||
|
"tempecd",
|
||||||
|
"tempimplement",
|
||||||
|
"templabel",
|
||||||
|
"tempvalue",
|
||||||
|
"TEMSA",
|
||||||
|
"timepicker",
|
||||||
|
"Tobe",
|
||||||
|
"Toplevel",
|
||||||
|
"Totrav",
|
||||||
|
"trainingby",
|
||||||
|
"Traininglist",
|
||||||
|
"traininglistdiv",
|
||||||
|
"transanction",
|
||||||
|
"Trav",
|
||||||
|
"Traveller",
|
||||||
|
"Traverler",
|
||||||
|
"TRAVLELER",
|
||||||
|
"Travler",
|
||||||
|
"TREEVIEW",
|
||||||
|
"trigerred",
|
||||||
|
"ttinclude",
|
||||||
|
"Uhandled",
|
||||||
|
"Updat",
|
||||||
|
"Uplaod",
|
||||||
|
"Upto",
|
||||||
|
"userevents",
|
||||||
|
"userids",
|
||||||
|
"userlist",
|
||||||
|
"Validatable",
|
||||||
|
"valueelement",
|
||||||
|
"Variabls",
|
||||||
|
"Verdana",
|
||||||
|
"vgrid",
|
||||||
|
"viewmodel",
|
||||||
|
"vsdoc",
|
||||||
|
"whethere",
|
||||||
|
"windowsphone",
|
||||||
|
"Winsock",
|
||||||
|
"worlflow"
|
||||||
|
]
|
||||||
|
}
|
109
Fab2ApprovalMKLink/.vscode/tasks.json
vendored
Normal file
109
Fab2ApprovalMKLink/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,109 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "User Secrets Init",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj",
|
||||||
|
"init"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "User Secrets Set",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"user-secrets",
|
||||||
|
"-p",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj",
|
||||||
|
"set",
|
||||||
|
"_UserSecretsId",
|
||||||
|
"f2da5035-aba9-4676-9f8d-d6689f84663d"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Format",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"--report",
|
||||||
|
".vscode",
|
||||||
|
"--verbosity",
|
||||||
|
"detailed",
|
||||||
|
"--severity",
|
||||||
|
"warn"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Format-Whitespaces",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"format",
|
||||||
|
"whitespace"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "build",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"build",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "publish",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "watch",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"watch",
|
||||||
|
"run",
|
||||||
|
"--project",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"label": "Publish AOT",
|
||||||
|
"command": "dotnet",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"publish",
|
||||||
|
"-r",
|
||||||
|
"win-x64",
|
||||||
|
"-c",
|
||||||
|
"Release",
|
||||||
|
"-p:PublishAot=true",
|
||||||
|
"${workspaceFolder}/Fab2ApprovalMKLink.csproj",
|
||||||
|
"/property:GenerateFullPaths=true",
|
||||||
|
"/consoleloggerparameters:NoSummary"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
74
Fab2ApprovalMKLink/Extensions/ControllerExtensions.cs
Normal file
74
Fab2ApprovalMKLink/Extensions/ControllerExtensions.cs
Normal file
@ -0,0 +1,74 @@
|
|||||||
|
#if NET8
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.IO;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.PdfGenerator;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ViewEngines;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Extensions;
|
||||||
|
|
||||||
|
public static class ControllerExtensions {
|
||||||
|
|
||||||
|
public static ActionResult GetBinaryContentResult<TModel>(this Controller controller, string viewName, string contentType, TModel model) {
|
||||||
|
string pageTitle = string.Empty;
|
||||||
|
|
||||||
|
string htmlText = RenderViewToString(controller, viewName, model);
|
||||||
|
|
||||||
|
StandardPdfRenderer standardPdfRenderer = new();
|
||||||
|
// Let the html be rendered into a PDF document through iTextSharp.
|
||||||
|
byte[] buffer = standardPdfRenderer.Render(htmlText, pageTitle);
|
||||||
|
|
||||||
|
// Return the PDF as a binary stream to the client.
|
||||||
|
return new BinaryContentResult(buffer, contentType);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static string RenderViewToString<TModel>(this Controller controller, string viewName, TModel model) {
|
||||||
|
if (string.IsNullOrEmpty(viewName))
|
||||||
|
viewName = controller.ControllerContext.ActionDescriptor.ActionName;
|
||||||
|
|
||||||
|
controller.ViewData.Model = model;
|
||||||
|
|
||||||
|
using (StringWriter writer = new()) {
|
||||||
|
try {
|
||||||
|
CompositeViewEngine compositeViewEngine = controller.HttpContext.RequestServices.GetRequiredService(typeof(ICompositeViewEngine)) as CompositeViewEngine;
|
||||||
|
if (compositeViewEngine is null || compositeViewEngine.ViewEngines.Count == 0) { }
|
||||||
|
|
||||||
|
ViewEngineResult viewResult = null;
|
||||||
|
|
||||||
|
if (viewName.EndsWith(".cshtml"))
|
||||||
|
viewResult = compositeViewEngine.GetView(viewName, viewName, false);
|
||||||
|
else
|
||||||
|
viewResult = compositeViewEngine.FindView(controller.ControllerContext, viewName, false);
|
||||||
|
|
||||||
|
if (!viewResult.Success)
|
||||||
|
return $"A view with the name '{viewName}' could not be found";
|
||||||
|
|
||||||
|
ViewContext viewContext = new(
|
||||||
|
controller.ControllerContext,
|
||||||
|
viewResult.View,
|
||||||
|
controller.ViewData,
|
||||||
|
controller.TempData,
|
||||||
|
writer,
|
||||||
|
new HtmlHelperOptions()
|
||||||
|
);
|
||||||
|
|
||||||
|
Task task = viewResult.View.RenderAsync(viewContext);
|
||||||
|
task.Wait();
|
||||||
|
|
||||||
|
return writer.GetStringBuilder().ToString();
|
||||||
|
} catch (Exception ex) {
|
||||||
|
return $"Failed - {ex.Message}";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
58
Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj
Normal file
58
Fab2ApprovalMKLink/Fab2ApprovalMKLink.csproj
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
<Project Sdk="Microsoft.NET.Sdk.Web">
|
||||||
|
<PropertyGroup Label="Globals">
|
||||||
|
<SccProjectName>SAK</SccProjectName>
|
||||||
|
<SccProvider>SAK</SccProvider>
|
||||||
|
<SccAuxPath>SAK</SccAuxPath>
|
||||||
|
<SccLocalPath>SAK</SccLocalPath>
|
||||||
|
<UserSecretsId>f2da5035-aba9-4676-9f8d-d6689f84663d</UserSecretsId>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup>
|
||||||
|
<EnforceCodeStyleInBuild>true</EnforceCodeStyleInBuild>
|
||||||
|
<ImplicitUsings>disable</ImplicitUsings>
|
||||||
|
<IsPackable>false</IsPackable>
|
||||||
|
<Nullable>enable</Nullable>
|
||||||
|
<OutputType>Exe</OutputType>
|
||||||
|
<RuntimeIdentifiers>win-x64;linux-x64</RuntimeIdentifiers>
|
||||||
|
<TargetFramework>net8.0</TargetFramework>
|
||||||
|
</PropertyGroup>
|
||||||
|
<PropertyGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||||
|
<DefineConstants>NET8</DefineConstants>
|
||||||
|
</PropertyGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<AssemblyAttribute Include="System.Runtime.CompilerServices.InternalsVisibleTo">
|
||||||
|
<_Parameter1>Fab2ApprovalTests</_Parameter1>
|
||||||
|
</AssemblyAttribute>
|
||||||
|
</ItemGroup>
|
||||||
|
<ItemGroup>
|
||||||
|
<PackageReference Include="Dapper.Contrib" Version="2.0.78" />
|
||||||
|
<PackageReference Include="Dapper" Version="2.1.44" />
|
||||||
|
<PackageReference Include="DocumentFormat.OpenXml" Version="3.3.0" />
|
||||||
|
<PackageReference Include="EntityFramework" Version="6.5.1" />
|
||||||
|
<PackageReference Include="ExcelDataReader" Version="3.7.0" />
|
||||||
|
<PackageReference Include="jQuery" Version="3.7.1" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
|
||||||
|
<PackageReference Include="Microsoft.AspNetCore.Components.WebAssembly.Server" Version="8.0.10" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.0" />
|
||||||
|
<PackageReference Include="Microsoft.Data.Sqlite" Version="8.0.2" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting.WindowsServices" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Hosting" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging.Console" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Logging.EventLog" Version="8.0.1" />
|
||||||
|
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
|
||||||
|
<PackageReference Include="NLog.Extensions.Logging" Version="5.3.8" />
|
||||||
|
<PackageReference Include="NLog" Version="5.2.8" />
|
||||||
|
<PackageReference Include="Quartz.Extensions.Hosting" Version="3.8.1" />
|
||||||
|
<PackageReference Include="Quartz" Version="3.8.1" />
|
||||||
|
<PackageReference Include="SharpZipLib" Version="1.4.2" />
|
||||||
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.8.1" />
|
||||||
|
<PackageReference Include="System.Data.SqlClient" Version="4.8.6" />
|
||||||
|
<PackageReference Include="System.DirectoryServices.AccountManagement" Version="9.0.0" />
|
||||||
|
<PackageReference Include="System.DirectoryServices" Version="9.0.0" />
|
||||||
|
<PackageReference Include="System.Drawing.Common" Version="8.0.7" />
|
||||||
|
</ItemGroup>
|
||||||
|
</Project>
|
134
Fab2ApprovalMKLink/Program.cs
Normal file
134
Fab2ApprovalMKLink/Program.cs
Normal file
@ -0,0 +1,134 @@
|
|||||||
|
using System;
|
||||||
|
using System.Diagnostics;
|
||||||
|
using System.Text;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
using Fab2ApprovalSystem.Services;
|
||||||
|
|
||||||
|
using Microsoft.AspNetCore.Authentication.JwtBearer;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ViewEngines;
|
||||||
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
using Microsoft.Extensions.Hosting.WindowsServices;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.IdentityModel.Tokens;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalMKLink;
|
||||||
|
|
||||||
|
public class Program {
|
||||||
|
|
||||||
|
public static int Main(string[] args) {
|
||||||
|
ILogger<Program>? logger = null;
|
||||||
|
WebApplicationBuilder webApplicationBuilder = WebApplication.CreateBuilder(args);
|
||||||
|
_ = webApplicationBuilder.Configuration.AddUserSecrets<Program>();
|
||||||
|
AppSettings appSettings = AppSettings.Get(webApplicationBuilder.Configuration);
|
||||||
|
if (string.IsNullOrEmpty(appSettings.Company))
|
||||||
|
throw new Exception("Company name must have a value!");
|
||||||
|
if (string.IsNullOrEmpty(appSettings.WorkingDirectoryName))
|
||||||
|
throw new Exception("Working directory name must have a value!");
|
||||||
|
GlobalVars.AppSettings = appSettings;
|
||||||
|
GlobalVars.AttachmentUrl = appSettings.AttachmentUrl is null ? string.Empty : appSettings.AttachmentUrl;
|
||||||
|
GlobalVars.CA_BlankFormsLocation = appSettings.CABlankFormsLocation;
|
||||||
|
GlobalVars.DBConnection = appSettings.DBConnection;
|
||||||
|
GlobalVars.DB_CONNECTION_STRING = appSettings.DBConnectionString;
|
||||||
|
GlobalVars.hostURL = appSettings.HostURL;
|
||||||
|
GlobalVars.IS_INFINEON_DOMAIN = appSettings.IsInfineonDomain;
|
||||||
|
GlobalVars.MesaTemplateFiles = appSettings.MesaTemplateFiles;
|
||||||
|
GlobalVars.NDriveURL = appSettings.NDriveURL;
|
||||||
|
GlobalVars.SENDER_EMAIL = appSettings.SenderEmail;
|
||||||
|
GlobalVars.USER_ID = appSettings.UserId;
|
||||||
|
GlobalVars.USER_ISADMIN = appSettings.UserIsAdmin;
|
||||||
|
GlobalVars.WSR_URL = appSettings.WSR_URL;
|
||||||
|
try {
|
||||||
|
_ = webApplicationBuilder.Services.Configure<ApiBehaviorOptions>(options => options.SuppressModelStateInvalidFilter = true);
|
||||||
|
_ = webApplicationBuilder.Services.AddControllers();
|
||||||
|
_ = webApplicationBuilder.Services.AddControllersWithViews();
|
||||||
|
_ = webApplicationBuilder.Services.AddDistributedMemoryCache();
|
||||||
|
_ = webApplicationBuilder.Services.AddHttpClient();
|
||||||
|
_ = webApplicationBuilder.Services.AddMemoryCache();
|
||||||
|
_ = webApplicationBuilder.Services.AddSingleton(_ => appSettings);
|
||||||
|
_ = webApplicationBuilder.Services.AddSingleton<ICompositeViewEngine, CompositeViewEngine>();
|
||||||
|
// _ = webApplicationBuilder.Services.AddTransient<IViewRenderingService, ViewRenderingService>();
|
||||||
|
// _ = webApplicationBuilder.Services.AddScoped<IViewRenderService, ViewRenderService>();
|
||||||
|
// _ = webApplicationBuilder.Services.AddSingleton<ITempDataProvider, ITempDataProvider>();
|
||||||
|
_ = webApplicationBuilder.Services.AddSingleton<IHttpContextAccessor, HttpContextAccessor>();
|
||||||
|
_ = webApplicationBuilder.Services.AddScoped<IAuthenticationService, AuthenticationService>();
|
||||||
|
_ = webApplicationBuilder.Services.AddScoped<IDalService, DalService>();
|
||||||
|
_ = webApplicationBuilder.Services.AddScoped<IDbConnectionService, DbConnectionService>();
|
||||||
|
_ = webApplicationBuilder.Services.AddScoped<IUserService, UserService>();
|
||||||
|
_ = webApplicationBuilder.Services.AddSwaggerGen();
|
||||||
|
_ = webApplicationBuilder.Services.AddSession(sessionOptions => {
|
||||||
|
sessionOptions.IdleTimeout = TimeSpan.FromSeconds(2000);
|
||||||
|
sessionOptions.Cookie.HttpOnly = true;
|
||||||
|
sessionOptions.Cookie.IsEssential = true;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
_ = webApplicationBuilder.Services.AddAuthentication(options => {
|
||||||
|
options.DefaultAuthenticateScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
options.DefaultChallengeScheme = JwtBearerDefaults.AuthenticationScheme;
|
||||||
|
})
|
||||||
|
.AddJwtBearer(options => {
|
||||||
|
options.RequireHttpsMetadata = false;
|
||||||
|
options.SaveToken = true;
|
||||||
|
options.TokenValidationParameters = new TokenValidationParameters {
|
||||||
|
ValidateIssuerSigningKey = true,
|
||||||
|
ValidIssuer = appSettings.JwtIssuer,
|
||||||
|
ValidateAudience = false,
|
||||||
|
IssuerSigningKey = new SymmetricSecurityKey(Encoding.UTF8.GetBytes(appSettings.JwtKey)),
|
||||||
|
ClockSkew = TimeSpan.Zero
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
_ = webApplicationBuilder.Services.AddAuthorization(options => {
|
||||||
|
options.DefaultPolicy = new AuthorizationPolicyBuilder()
|
||||||
|
.AddAuthenticationSchemes(JwtBearerDefaults.AuthenticationScheme)
|
||||||
|
.RequireAuthenticatedUser()
|
||||||
|
.Build();
|
||||||
|
});
|
||||||
|
if (WindowsServiceHelpers.IsWindowsService()) {
|
||||||
|
_ = webApplicationBuilder.Services.AddSingleton<IHostLifetime, WindowsServiceLifetime>();
|
||||||
|
_ = webApplicationBuilder.Logging.AddEventLog(settings => {
|
||||||
|
#pragma warning disable CA1416
|
||||||
|
if (string.IsNullOrEmpty(settings.SourceName))
|
||||||
|
settings.SourceName = webApplicationBuilder.Environment.ApplicationName;
|
||||||
|
#pragma warning restore
|
||||||
|
});
|
||||||
|
}
|
||||||
|
WebApplication webApplication = webApplicationBuilder.Build();
|
||||||
|
if (Debugger.IsAttached)
|
||||||
|
webApplication.Services.GetRequiredService<AppSettings>();
|
||||||
|
logger = webApplication.Services.GetRequiredService<ILogger<Program>>();
|
||||||
|
_ = webApplication.UseCors(corsPolicyBuilder => corsPolicyBuilder.AllowAnyOrigin().AllowAnyHeader().AllowAnyMethod());
|
||||||
|
if (!webApplicationBuilder.Environment.IsDevelopment()) {
|
||||||
|
_ = webApplication.UseExceptionHandler("/Error");
|
||||||
|
_ = webApplication.UseHttpsRedirection();
|
||||||
|
_ = webApplication.UseHsts();
|
||||||
|
} else {
|
||||||
|
if (string.IsNullOrEmpty(appSettings.URLs)) {
|
||||||
|
Environment.ExitCode = -1;
|
||||||
|
webApplication.Lifetime.StopApplication();
|
||||||
|
}
|
||||||
|
_ = webApplication.UseSwagger();
|
||||||
|
_ = webApplication.UseSwaggerUI(c => c.SwaggerEndpoint("/swagger/v1/swagger.json", "Server V1"));
|
||||||
|
}
|
||||||
|
_ = webApplication.UseSession();
|
||||||
|
_ = webApplication.MapControllers();
|
||||||
|
_ = webApplication.UseAuthentication();
|
||||||
|
_ = webApplication.UseAuthorization();
|
||||||
|
logger.LogInformation("Starting Web Application");
|
||||||
|
webApplication.Run();
|
||||||
|
return 0;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
try { logger?.LogCritical(ex, "Host terminated unexpectedly"); } catch (Exception) { }
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
266
Fab2ApprovalMKLink/Services/AuthenticationService.cs
Normal file
266
Fab2ApprovalMKLink/Services/AuthenticationService.cs
Normal file
@ -0,0 +1,266 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.DirectoryServices.AccountManagement;
|
||||||
|
using System.IdentityModel.Tokens.Jwt;
|
||||||
|
using System.Security.Authentication;
|
||||||
|
using System.Security.Claims;
|
||||||
|
using System.Security.Cryptography;
|
||||||
|
using System.Security.Principal;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
using Microsoft.IdentityModel.Tokens;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Services;
|
||||||
|
|
||||||
|
public interface IAuthenticationService {
|
||||||
|
public Task<LoginResult> AuthenticateUser(AuthAttempt login);
|
||||||
|
public Task<LoginResult> AttemptLocalUserAuth(WindowsIdentity identity);
|
||||||
|
public AuthTokens GenerateAuthTokens(AuthAttempt authAttempt, IEnumerable<string> roles);
|
||||||
|
public Task<LoginResult> RefreshAuthTokens(AuthAttempt authAttempt);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class AuthenticationService : IAuthenticationService {
|
||||||
|
private readonly ILogger<AuthenticationService> _logger;
|
||||||
|
private readonly IMemoryCache _cache;
|
||||||
|
private readonly IUserService _userService;
|
||||||
|
|
||||||
|
private readonly string? _jwtIssuer;
|
||||||
|
private readonly string? _jwtAudience;
|
||||||
|
private readonly string? _jwtKey;
|
||||||
|
|
||||||
|
public AuthenticationService(ILogger<AuthenticationService> logger, IMemoryCache cache, IUserService userService, AppSettings appSettings) {
|
||||||
|
_logger = logger ?? throw new ArgumentNullException("ILogger not injected");
|
||||||
|
_cache = cache ?? throw new ArgumentNullException("IMemoryCache not injected");
|
||||||
|
_userService = userService ?? throw new ArgumentNullException("IUserService not injected");
|
||||||
|
_jwtKey = appSettings.JwtKey;
|
||||||
|
_jwtIssuer = appSettings.JwtIssuer;
|
||||||
|
_jwtAudience = appSettings.JwtAudience;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<LoginResult> AuthenticateUser(AuthAttempt login) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to authenticate user");
|
||||||
|
|
||||||
|
if (login is null)
|
||||||
|
throw new ArgumentNullException("Login cannot be null");
|
||||||
|
|
||||||
|
string domain = "infineon.com";
|
||||||
|
|
||||||
|
using (PrincipalContext pc = new(ContextType.Domain, domain)) {
|
||||||
|
bool isValid = pc.ValidateCredentials(login.LoginID, login.Password);
|
||||||
|
|
||||||
|
if (isValid) {
|
||||||
|
User? user = _cache.Get<User>($"user{login.LoginID}");
|
||||||
|
|
||||||
|
if (user is null) {
|
||||||
|
user = await _userService.GetUserByLoginId(login.LoginID);
|
||||||
|
|
||||||
|
_cache.Set($"user{login.LoginID}", user, DateTimeOffset.Now.AddDays(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> roles = new();
|
||||||
|
|
||||||
|
if (user.IsManager)
|
||||||
|
roles.Add("manager");
|
||||||
|
if (user.IsAdmin)
|
||||||
|
roles.Add("admin");
|
||||||
|
|
||||||
|
AuthTokens tokens = GenerateAuthTokens(login, roles);
|
||||||
|
|
||||||
|
return new LoginResult {
|
||||||
|
IsAuthenticated = true,
|
||||||
|
AuthTokens = tokens,
|
||||||
|
User = user
|
||||||
|
};
|
||||||
|
} else {
|
||||||
|
return new LoginResult() {
|
||||||
|
IsAuthenticated = false,
|
||||||
|
AuthTokens = new() {
|
||||||
|
JwtToken = "",
|
||||||
|
RefreshToken = ""
|
||||||
|
},
|
||||||
|
User = null
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred when attempting to authenticate user. Exception: {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<LoginResult> AttemptLocalUserAuth(WindowsIdentity identity) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to authenticate local Windows system user");
|
||||||
|
|
||||||
|
if (identity is null)
|
||||||
|
throw new ArgumentNullException("WindowsIdentity cannot be null");
|
||||||
|
|
||||||
|
User user = await _userService.GetUserByLoginId(identity.Name);
|
||||||
|
|
||||||
|
List<string> roles = new();
|
||||||
|
|
||||||
|
if (user.IsManager)
|
||||||
|
roles.Add("manager");
|
||||||
|
if (user.IsAdmin)
|
||||||
|
roles.Add("admin");
|
||||||
|
|
||||||
|
AuthAttempt authAttempt = new() {
|
||||||
|
LoginID = user.LoginID,
|
||||||
|
};
|
||||||
|
|
||||||
|
AuthTokens tokens = GenerateAuthTokens(authAttempt, roles);
|
||||||
|
|
||||||
|
return new LoginResult {
|
||||||
|
IsAuthenticated = true,
|
||||||
|
AuthTokens = tokens,
|
||||||
|
User = user
|
||||||
|
};
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"Unable to authenticate local Windows system user, because {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public AuthTokens GenerateAuthTokens(AuthAttempt authAttempt, IEnumerable<string> roles) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to generate JWT");
|
||||||
|
|
||||||
|
if (authAttempt is null)
|
||||||
|
throw new ArgumentNullException("AuthAttempt cannot be null");
|
||||||
|
if (string.IsNullOrWhiteSpace(authAttempt.LoginID))
|
||||||
|
throw new ArgumentException("UserName cannot be null or empty");
|
||||||
|
if (roles is null)
|
||||||
|
throw new ArgumentNullException("roles cannot be null");
|
||||||
|
|
||||||
|
byte[] key = Encoding.ASCII.GetBytes(_jwtKey);
|
||||||
|
|
||||||
|
List<Claim> claims = new() {
|
||||||
|
new Claim(nameof(authAttempt.LoginID), authAttempt.LoginID)
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (string role in roles) {
|
||||||
|
claims.Add(new Claim(ClaimTypes.Role, role));
|
||||||
|
}
|
||||||
|
|
||||||
|
ClaimsIdentity identity = new(claims);
|
||||||
|
|
||||||
|
SecurityTokenDescriptor tokenDescriptor = new() {
|
||||||
|
Issuer = _jwtIssuer,
|
||||||
|
Audience = _jwtAudience,
|
||||||
|
Subject = identity,
|
||||||
|
NotBefore = DateTime.Now,
|
||||||
|
Expires = DateTime.Now.AddHours(8),
|
||||||
|
SigningCredentials = new SigningCredentials(new SymmetricSecurityKey(key), SecurityAlgorithms.HmacSha256Signature)
|
||||||
|
};
|
||||||
|
|
||||||
|
JwtSecurityTokenHandler tokenHandler = new();
|
||||||
|
|
||||||
|
JwtSecurityToken token = tokenHandler.CreateJwtSecurityToken(tokenDescriptor);
|
||||||
|
|
||||||
|
string jwt = tokenHandler.WriteToken(token);
|
||||||
|
|
||||||
|
string refreshToken = GenerateRefreshToken();
|
||||||
|
|
||||||
|
List<string>? refreshTokensForUser = _cache.Get<List<string>>(authAttempt.LoginID);
|
||||||
|
|
||||||
|
refreshTokensForUser ??= new List<string>();
|
||||||
|
|
||||||
|
if (refreshTokensForUser.Count > 9)
|
||||||
|
refreshTokensForUser.RemoveRange(9, refreshTokensForUser.Count - 9);
|
||||||
|
|
||||||
|
refreshTokensForUser.Insert(0, refreshToken);
|
||||||
|
|
||||||
|
_cache.Set(authAttempt.LoginID, refreshTokensForUser, DateTimeOffset.Now.AddHours(4));
|
||||||
|
|
||||||
|
return new AuthTokens {
|
||||||
|
JwtToken = jwt,
|
||||||
|
RefreshToken = refreshToken
|
||||||
|
};
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred when attempting to generate JWT. Exception: {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<LoginResult> RefreshAuthTokens(AuthAttempt authAttempt) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to refresh auth tokens");
|
||||||
|
|
||||||
|
if (authAttempt is null)
|
||||||
|
throw new ArgumentNullException("AuthAttempt cannot be null");
|
||||||
|
if (authAttempt.AuthTokens is null)
|
||||||
|
throw new ArgumentNullException("AuthTokens cannot be null");
|
||||||
|
|
||||||
|
bool refreshTokenIsValid = IsRefreshTokenValid(authAttempt.LoginID, authAttempt.AuthTokens.RefreshToken);
|
||||||
|
|
||||||
|
if (refreshTokenIsValid) {
|
||||||
|
User? user = _cache.Get<User>($"user{authAttempt.LoginID}");
|
||||||
|
|
||||||
|
if (user is null) {
|
||||||
|
user = await _userService.GetUserByLoginId(authAttempt.LoginID);
|
||||||
|
|
||||||
|
_cache.Set($"user{authAttempt.LoginID}", user, DateTimeOffset.Now.AddDays(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
List<string> roles = new();
|
||||||
|
|
||||||
|
if (user.IsManager)
|
||||||
|
roles.Add("manager");
|
||||||
|
if (user.IsAdmin)
|
||||||
|
roles.Add("admin");
|
||||||
|
|
||||||
|
AuthTokens refreshedTokens = GenerateAuthTokens(authAttempt, roles);
|
||||||
|
|
||||||
|
LoginResult loginResult = new() {
|
||||||
|
IsAuthenticated = true,
|
||||||
|
AuthTokens = refreshedTokens,
|
||||||
|
User = user
|
||||||
|
};
|
||||||
|
|
||||||
|
return loginResult;
|
||||||
|
} else {
|
||||||
|
throw new AuthenticationException("Invalid refresh token");
|
||||||
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred when attempting to refresh auth tokens. Exception: {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private string GenerateRefreshToken() {
|
||||||
|
byte[] randomNumber = new byte[32];
|
||||||
|
using (RandomNumberGenerator rng = RandomNumberGenerator.Create()) {
|
||||||
|
rng.GetBytes(randomNumber);
|
||||||
|
return Convert.ToBase64String(randomNumber);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool IsRefreshTokenValid(string loginId, string refreshToken) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to determine if refresh token is valid");
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(loginId))
|
||||||
|
throw new ArgumentNullException("LoginID cannot be null or empty");
|
||||||
|
if (string.IsNullOrWhiteSpace(refreshToken))
|
||||||
|
throw new ArgumentNullException("Refresh token cannot be null or empty");
|
||||||
|
|
||||||
|
List<string>? cachedRefreshTokensForUser = _cache.Get<List<string>>(loginId);
|
||||||
|
|
||||||
|
if (cachedRefreshTokensForUser is null || !cachedRefreshTokensForUser.Contains(refreshToken)) {
|
||||||
|
_logger.LogInformation($"Could not find cached refresh tokens for user {loginId}");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred when attempting to validate refresh token. Exception: {ex.Message}");
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
168
Fab2ApprovalMKLink/Services/DalService.cs
Normal file
168
Fab2ApprovalMKLink/Services/DalService.cs
Normal file
@ -0,0 +1,168 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Data;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
using Dapper;
|
||||||
|
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Services;
|
||||||
|
|
||||||
|
public interface IDalService {
|
||||||
|
Task<IEnumerable<T>> QueryAsync<T>(string sql);
|
||||||
|
Task<IEnumerable<T>> QueryAsync<T>(string sql, object parameters);
|
||||||
|
Task<int> ExecuteAsync(string sql);
|
||||||
|
Task<int> ExecuteAsync<T>(string sql, T parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DalService : IDalService {
|
||||||
|
private static readonly int RETRIES = 3;
|
||||||
|
private static readonly int BACKOFF_SECONDS_INTERVAL = 30;
|
||||||
|
|
||||||
|
private readonly ILogger<DalService> _logger;
|
||||||
|
private readonly IDbConnectionService _dbConnectionService;
|
||||||
|
|
||||||
|
public DalService(IDbConnectionService dbConnectionService, ILogger<DalService> logger) {
|
||||||
|
_dbConnectionService = dbConnectionService ??
|
||||||
|
throw new ArgumentNullException("IDbConnectionService not injected");
|
||||||
|
_logger = logger ??
|
||||||
|
throw new ArgumentNullException("ILogger not injected");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<T>> QueryAsync<T>(string sql) {
|
||||||
|
if (sql is null) throw new ArgumentNullException("sql cannot be null");
|
||||||
|
|
||||||
|
int remainingRetries = RETRIES;
|
||||||
|
bool queryWasSuccessful = false;
|
||||||
|
Exception exception = null;
|
||||||
|
IEnumerable<T> result = new List<T>();
|
||||||
|
while (!queryWasSuccessful && remainingRetries > 0) {
|
||||||
|
int backoffSeconds = (RETRIES - remainingRetries--) * BACKOFF_SECONDS_INTERVAL;
|
||||||
|
Task.Delay(backoffSeconds * 1000).Wait();
|
||||||
|
|
||||||
|
try {
|
||||||
|
_logger.LogInformation($"Attempting to perform query with {sql}. Remaining retries: {remainingRetries}");
|
||||||
|
|
||||||
|
using (IDbConnection conn = _dbConnectionService.GetConnection()) {
|
||||||
|
result = await conn.QueryAsync<T>(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWasSuccessful = true;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred while attempting to perform a query. Exception: {ex.Message}");
|
||||||
|
exception = ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!queryWasSuccessful && exception is not null) {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<T>> QueryAsync<T>(string sql, object parameters) {
|
||||||
|
if (sql is null) throw new ArgumentNullException("sql cannot be null");
|
||||||
|
if (parameters is null) throw new ArgumentNullException("parameters cannot be null");
|
||||||
|
|
||||||
|
StringBuilder logBuilder = new();
|
||||||
|
|
||||||
|
int remainingRetries = RETRIES;
|
||||||
|
bool queryWasSuccessful = false;
|
||||||
|
Exception exception = null;
|
||||||
|
IEnumerable<T> result = new List<T>();
|
||||||
|
while (!queryWasSuccessful && remainingRetries > 0) {
|
||||||
|
int backoffSeconds = (RETRIES - remainingRetries--) * BACKOFF_SECONDS_INTERVAL;
|
||||||
|
Task.Delay(backoffSeconds * 1000).Wait();
|
||||||
|
|
||||||
|
try {
|
||||||
|
logBuilder.Clear();
|
||||||
|
logBuilder.Append($"Attempting to perform query with {sql} ");
|
||||||
|
logBuilder.Append($"and parameters {parameters.ToString()}. ");
|
||||||
|
logBuilder.Append($"Remaining retries: {remainingRetries}");
|
||||||
|
_logger.LogInformation(logBuilder.ToString());
|
||||||
|
|
||||||
|
using (IDbConnection conn = _dbConnectionService.GetConnection()) {
|
||||||
|
result = await conn.QueryAsync<T>(sql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWasSuccessful = true;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred while attempting to perform a query. Exception: {ex.Message}");
|
||||||
|
exception = ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!queryWasSuccessful && exception is not null) {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> ExecuteAsync(string sql) {
|
||||||
|
if (sql is null) throw new ArgumentNullException("sql cannot be null");
|
||||||
|
|
||||||
|
int remainingRetries = RETRIES;
|
||||||
|
bool queryWasSuccessful = false;
|
||||||
|
Exception exception = null;
|
||||||
|
int rowsAffected = 0;
|
||||||
|
while (!queryWasSuccessful && remainingRetries > 0) {
|
||||||
|
int backoffSeconds = (RETRIES - remainingRetries--) * BACKOFF_SECONDS_INTERVAL;
|
||||||
|
Task.Delay(backoffSeconds * 1000).Wait();
|
||||||
|
|
||||||
|
try {
|
||||||
|
_logger.LogInformation($"Attempting to execute {sql}. Remaining retries: {remainingRetries}");
|
||||||
|
|
||||||
|
using (IDbConnection conn = _dbConnectionService.GetConnection()) {
|
||||||
|
rowsAffected = await conn.ExecuteAsync(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWasSuccessful = true;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred while attempting to execute a query. Exception: {ex.Message}");
|
||||||
|
exception = ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!queryWasSuccessful && exception is not null) {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rowsAffected;
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<int> ExecuteAsync<T>(string sql, T parameters) {
|
||||||
|
if (sql is null) throw new ArgumentNullException("sql cannot be null");
|
||||||
|
|
||||||
|
int remainingRetries = RETRIES;
|
||||||
|
bool queryWasSuccessful = false;
|
||||||
|
Exception exception = null;
|
||||||
|
int rowsAffected = 0;
|
||||||
|
while (!queryWasSuccessful && remainingRetries > 0) {
|
||||||
|
int backoffSeconds = (RETRIES - remainingRetries--) * BACKOFF_SECONDS_INTERVAL;
|
||||||
|
Task.Delay(backoffSeconds * 1000).Wait();
|
||||||
|
|
||||||
|
try {
|
||||||
|
_logger.LogInformation($"Attempting to execute {sql} with parameters. Remaining retries: {remainingRetries}");
|
||||||
|
|
||||||
|
using (IDbConnection conn = _dbConnectionService.GetConnection()) {
|
||||||
|
rowsAffected = await conn.ExecuteAsync(sql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
queryWasSuccessful = true;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
_logger.LogError($"An exception occurred while attempting to execute a query. Exception: {ex.Message}");
|
||||||
|
exception = ex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!queryWasSuccessful && exception is not null) {
|
||||||
|
throw exception;
|
||||||
|
}
|
||||||
|
|
||||||
|
return rowsAffected;
|
||||||
|
}
|
||||||
|
}
|
22
Fab2ApprovalMKLink/Services/DbConnectionService.cs
Normal file
22
Fab2ApprovalMKLink/Services/DbConnectionService.cs
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
using System.Data;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
using Microsoft.Data.SqlClient;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Services;
|
||||||
|
|
||||||
|
public interface IDbConnectionService {
|
||||||
|
IDbConnection GetConnection();
|
||||||
|
}
|
||||||
|
|
||||||
|
public class DbConnectionService : IDbConnectionService {
|
||||||
|
private readonly string _dbConnectionString;
|
||||||
|
|
||||||
|
public DbConnectionService(AppSettings appSettings) {
|
||||||
|
_dbConnectionString = appSettings.DBConnectionString;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IDbConnection GetConnection() =>
|
||||||
|
new SqlConnection(_dbConnectionString);
|
||||||
|
}
|
150
Fab2ApprovalMKLink/Services/UserService.cs
Normal file
150
Fab2ApprovalMKLink/Services/UserService.cs
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Services;
|
||||||
|
|
||||||
|
public interface IUserService {
|
||||||
|
Task<IEnumerable<User>> GetAllActiveUsers();
|
||||||
|
Task<User> GetUserByLoginId(string loginId);
|
||||||
|
Task<User> GetUserByUserId(int userId);
|
||||||
|
Task<IEnumerable<int>> GetApproverUserIdsBySubRoleCategoryItem(string item);
|
||||||
|
}
|
||||||
|
|
||||||
|
public class UserService : IUserService {
|
||||||
|
private readonly ILogger<UserService> _logger;
|
||||||
|
private readonly IDalService _dalService;
|
||||||
|
private readonly IMemoryCache _cache;
|
||||||
|
|
||||||
|
public UserService(ILogger<UserService> logger, IDalService dalService, IMemoryCache cache) {
|
||||||
|
_logger = logger ??
|
||||||
|
throw new ArgumentNullException("ILogger not injected");
|
||||||
|
_dalService = dalService ??
|
||||||
|
throw new ArgumentNullException("IDalService not injected");
|
||||||
|
_cache = cache ??
|
||||||
|
throw new ArgumentNullException("IMemoryCache not injected");
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<User>> GetAllActiveUsers() {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to get all active users");
|
||||||
|
|
||||||
|
IEnumerable<User>? allActiveUsers = _cache.Get<IEnumerable<User>>("allActiveUsers");
|
||||||
|
|
||||||
|
if (allActiveUsers is null) {
|
||||||
|
string sql = "select * from Users where IsActive = 1";
|
||||||
|
|
||||||
|
allActiveUsers = (await _dalService.QueryAsync<User>(sql)).ToList();
|
||||||
|
|
||||||
|
_cache.Set("allActiveUsers", allActiveUsers, DateTimeOffset.Now.AddHours(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allActiveUsers is null || allActiveUsers.Count() == 0) {
|
||||||
|
throw new Exception("No users found");
|
||||||
|
}
|
||||||
|
|
||||||
|
return allActiveUsers;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
string errMsg = $"An exception occurred when attempting to get all users. Exception: {ex.Message}";
|
||||||
|
_logger.LogError(errMsg);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<User> GetUserByLoginId(string loginId) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to get user by LoginId");
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(loginId))
|
||||||
|
throw new ArgumentException("LoginId cannot be null or empty");
|
||||||
|
|
||||||
|
User? user = _cache.Get<User>($"userByLoginId{loginId}");
|
||||||
|
|
||||||
|
user ??= _cache.Get<IEnumerable<User>>("allActiveUsers")?.FirstOrDefault(u => u.LoginID == loginId);
|
||||||
|
|
||||||
|
if (user is null) {
|
||||||
|
string sql = $"select * from Users where LoginID = '{loginId}';";
|
||||||
|
|
||||||
|
user = (await _dalService.QueryAsync<User>(sql)).FirstOrDefault();
|
||||||
|
|
||||||
|
_cache.Set($"userByLoginId{loginId}", user, DateTimeOffset.Now.AddHours(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user is null) throw new Exception($"No user found with LoginID {loginId}");
|
||||||
|
|
||||||
|
return user;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
string errMsg = $"An exception occurred when attempting to get user for LoginID {loginId}. Exception: {ex.Message}";
|
||||||
|
_logger.LogError(errMsg);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<User> GetUserByUserId(int userId) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to get user by user ID");
|
||||||
|
|
||||||
|
if (userId <= 0) throw new ArgumentException($"{userId} is not a valid user ID");
|
||||||
|
|
||||||
|
User? user = _cache.Get<User>($"userByUserId{userId}");
|
||||||
|
|
||||||
|
user ??= _cache.Get<IEnumerable<User>>("allActiveUsers")?.FirstOrDefault(u => u.UserID == userId);
|
||||||
|
|
||||||
|
if (user is null) {
|
||||||
|
string sql = $"select * from Users where UserID = '{userId}';";
|
||||||
|
|
||||||
|
user = (await _dalService.QueryAsync<User>(sql)).FirstOrDefault();
|
||||||
|
|
||||||
|
_cache.Set($"userByUserId{userId}", user, DateTimeOffset.Now.AddHours(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user is null) throw new Exception($"No user found with UserID {userId}");
|
||||||
|
|
||||||
|
return user;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
string errMsg = $"An exception occurred when attempting to get user for UserID {userId}. Exception: {ex.Message}";
|
||||||
|
_logger.LogError(errMsg);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public async Task<IEnumerable<int>> GetApproverUserIdsBySubRoleCategoryItem(string item) {
|
||||||
|
try {
|
||||||
|
_logger.LogInformation("Attempting to get approver user IDs");
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(item)) throw new ArgumentException("SubRoleCategoryItem cannot be null or empty");
|
||||||
|
|
||||||
|
IEnumerable<int>? userIds = _cache.Get<IEnumerable<int>>($"approverUserIdsBySubRollCategory{item}");
|
||||||
|
|
||||||
|
if (userIds is null) {
|
||||||
|
StringBuilder queryBuilder = new();
|
||||||
|
queryBuilder.Append("select us.UserID ");
|
||||||
|
queryBuilder.Append("from SubRole as sr ");
|
||||||
|
queryBuilder.Append("join UserSubRole as us on sr.SubRoleID=us.SubRoleID ");
|
||||||
|
queryBuilder.Append("join SubRoleCategory as sc on sr.SubRoleCategoryID=sc.SubRoleCategoryID ");
|
||||||
|
queryBuilder.Append($"where sc.SubRoleCategoryItem='{item}'");
|
||||||
|
|
||||||
|
userIds = (await _dalService.QueryAsync<int>(queryBuilder.ToString())).ToList();
|
||||||
|
|
||||||
|
_cache.Set($"approverUserIdsBySubRollCategory{item}", userIds, DateTimeOffset.Now.AddHours(1));
|
||||||
|
}
|
||||||
|
|
||||||
|
if (userIds is null || userIds.Count() == 0) {
|
||||||
|
throw new Exception($"No users found for SubRoleCategoryItem {item}");
|
||||||
|
}
|
||||||
|
|
||||||
|
return userIds;
|
||||||
|
} catch (Exception ex) {
|
||||||
|
string errMsg = $"An exception occurred when attempting to get approver user IDs. Exception: {ex.Message}";
|
||||||
|
_logger.LogError(errMsg);
|
||||||
|
throw;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
8
Fab2ApprovalMKLink/Views/_ViewImports.cshtml
Normal file
8
Fab2ApprovalMKLink/Views/_ViewImports.cshtml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
@using Fab2ApprovalSystem.DMO
|
||||||
|
@using Fab2ApprovalSystem.JobSchedules
|
||||||
|
@using Fab2ApprovalSystem.Misc
|
||||||
|
@using Fab2ApprovalSystem.Models
|
||||||
|
@using Fab2ApprovalSystem.PdfGenerator
|
||||||
|
@using Fab2ApprovalSystem.Utilities
|
||||||
|
@using Fab2ApprovalSystem.ViewModels
|
||||||
|
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
3
Fab2ApprovalMKLink/Views/_ViewStart.cshtml
Normal file
3
Fab2ApprovalMKLink/Views/_ViewStart.cshtml
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
@{
|
||||||
|
Layout = null;
|
||||||
|
}
|
@ -1,105 +0,0 @@
|
|||||||
trigger:
|
|
||||||
branches:
|
|
||||||
include:
|
|
||||||
- Development
|
|
||||||
paths:
|
|
||||||
include:
|
|
||||||
- "Fab2ApprovalSystem/*"
|
|
||||||
exclude:
|
|
||||||
- "**/*.yaml"
|
|
||||||
- "**/*.yml"
|
|
||||||
- "SQL/*"
|
|
||||||
- "references/*"
|
|
||||||
- "packages/*"
|
|
||||||
- "Kendo/*"
|
|
||||||
|
|
||||||
pool:
|
|
||||||
name: Mesa-IIS
|
|
||||||
demands: Fab2ApprovalSystem-Development
|
|
||||||
|
|
||||||
variables:
|
|
||||||
# solution: '**/*.sln'
|
|
||||||
# buildPlatform: 'Any CPU'
|
|
||||||
buildConfiguration: "Debug"
|
|
||||||
ASPNETCORE_ENVIRONMENT: "Development"
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- script: |
|
|
||||||
set assemblyTitle=Fab2ApprovalSystem
|
|
||||||
echo %assemblyTitle%
|
|
||||||
echo ##vso[task.setvariable variable=AssemblyTitle;]%assemblyTitle%
|
|
||||||
echo $(AssemblyTitle)
|
|
||||||
displayName: AssemblyTitle
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set targetFrameworkVersion=v4.8
|
|
||||||
echo %targetFrameworkVersion%
|
|
||||||
echo ##vso[task.setvariable variable=TargetFrameworkVersion;]%targetFrameworkVersion%
|
|
||||||
echo $(TargetFrameworkVersion)
|
|
||||||
displayName: TargetFrameworkVersion
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set coreVersion=na
|
|
||||||
echo %coreVersion%
|
|
||||||
echo ##vso[task.setvariable variable=CoreVersion;]%coreVersion%
|
|
||||||
echo $(CoreVersion)
|
|
||||||
displayName: CoreVersion
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set configuration=Debug
|
|
||||||
echo %configuration%
|
|
||||||
echo ##vso[task.setvariable variable=Configuration;]%configuration%
|
|
||||||
echo $(Configuration)
|
|
||||||
displayName: Configuration
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
REM set nugetSource=https://messa017.infineon.com/v3/index.json
|
|
||||||
set nugetSource=https://eaf-prod.mes.infineon.com/v3/index.json
|
|
||||||
echo %nugetSource%
|
|
||||||
echo ##vso[task.setvariable variable=NugetSource;]%nugetSource%
|
|
||||||
echo $(NugetSource)
|
|
||||||
displayName: NugetSource
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
set gitCommit=$(Build.SourceVersion)
|
|
||||||
set gitCommitSeven=%gitCommit:~0,7%
|
|
||||||
echo %gitCommitSeven%
|
|
||||||
echo ##vso[task.setvariable variable=GitCommitSeven;]%gitCommitSeven%
|
|
||||||
echo $(GitCommitSeven)
|
|
||||||
displayName: GitCommitSeven
|
|
||||||
|
|
||||||
- script: |
|
|
||||||
echo $(AssemblyTitle)
|
|
||||||
echo $(Build.BuildId)
|
|
||||||
echo $(Build.Reason)
|
|
||||||
echo $(Build.Repository.Id)
|
|
||||||
echo $(Build.Repository.Name)
|
|
||||||
echo $(Build.SourceVersion)
|
|
||||||
echo $(CoreVersion)
|
|
||||||
echo $(Configuration)
|
|
||||||
echo $(NugetSource)
|
|
||||||
echo $(GitCommitSeven)
|
|
||||||
echo $(TargetFrameworkVersion)
|
|
||||||
REM echo $(pipelinePassword)
|
|
||||||
displayName: "Echo Check"
|
|
||||||
|
|
||||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Restore /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:RestoreSources=$(NugetSource) $(AssemblyTitle).csproj'
|
|
||||||
workingDirectory: Fab2ApprovalSystem
|
|
||||||
displayName: "Framework Restore"
|
|
||||||
|
|
||||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /target:Build /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) $(AssemblyTitle).csproj'
|
|
||||||
workingDirectory: Fab2ApprovalSystem
|
|
||||||
displayName: "Framework Build"
|
|
||||||
|
|
||||||
- script: '"C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe" /DetailedSummary /ConsoleLoggerParameters:PerformanceSummary;ErrorsOnly; /p:Configuration=$(Configuration);TargetFrameworkVersion=$(TargetFrameworkVersion) /p:DebugSymbols=false /p:DeleteExistingFiles=true /p:DeployOnBuild=true /p:EnableUpdateAble=true /p:ExcludeApp_Data=true /p:LastUsedBuildConfiguration=$(Configuration) /p:LastUsedPlatform="Any CPU" /p:LaunchSiteAfterPublish=true /p:OutputPath="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)" /p:PreCompileBeforePublish=true /p:PublishProvider=FileSystem /p:PublishUrl="D:/PublishUrl" /p:SiteUrlToLaunchAfterPublish="" /p:WDPMergeOption=DoNotMerge /p:WebPublishMethod=FileSystem $(AssemblyTitle).csproj'
|
|
||||||
workingDirectory: Fab2ApprovalSystem
|
|
||||||
displayName: "Framework Pack"
|
|
||||||
|
|
||||||
- script: '"C:/Program Files (x86)/IIS/Microsoft Web Deploy V3/MSDeploy.exe" -AllowUntrusted -dest:auto -disableLink:AppPoolExtension -disableLink:CertificateExtension -disableLink:ContentExtension -setParam:name="IIS Web Application Name",value=$(Build.Repository.Name) -setParamFile:"D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)" "/_PublishedWebsites/$(Build.Repository.Name)_Package/$(Build.Repository.Name).SetParameters.xml" -source:package="D:\$(TargetFrameworkVersion)\$(Build.Repository.Name)\$(GitCommitSeven)-$(Build.BuildId)-$(Build.Repository.Name)-$(Configuration)" "/_PublishedWebsites/$(AssemblyTitle)_Package/$(AssemblyTitle).zip" -verb:sync'
|
|
||||||
workingDirectory: Fab2ApprovalSystem
|
|
||||||
displayName: "Framework Deploy"
|
|
||||||
enabled: false
|
|
||||||
|
|
||||||
- script: 'echo $(Build.SourceVersion)-$(Build.BuildId)>bin_x_x_\$(Configuration)\$(CoreVersion)\win-x64\$(Build.Repository.Name).txt'
|
|
||||||
displayName: "Force Fail"
|
|
||||||
enabled: false
|
|
@ -1,20 +1,35 @@
|
|||||||
|
|
||||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio 15
|
# Visual Studio Version 17
|
||||||
VisualStudioVersion = 15.0.27130.2020
|
VisualStudioVersion = 17.9.34616.47
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fab2ApprovalSystem", "Fab2ApprovalSystem\Fab2ApprovalSystem.csproj", "{AAE52608-4DD1-4732-92BD-CC8915DEC71E}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Fab2ApprovalSystem", "Fab2ApprovalSystem\Fab2ApprovalSystem.csproj", "{AAE52608-4DD1-4732-92BD-CC8915DEC71E}"
|
||||||
EndProject
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MesaFabApproval.API", "MesaFabApproval.API\MesaFabApproval.API.csproj", "{852E528D-015A-43B5-999D-F281E3359E5E}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339} = {2C16014D-B04E-46AF-AB4C-D2691D44A339}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MesaFabApproval.Shared", "MesaFabApproval.Shared\MesaFabApproval.Shared.csproj", "{2C16014D-B04E-46AF-AB4C-D2691D44A339}"
|
||||||
|
EndProject
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "MesaFabApproval.Client", "MesaFabApproval.Client\MesaFabApproval.Client.csproj", "{34D52F44-A81F-4247-8180-16E204824A07}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339} = {2C16014D-B04E-46AF-AB4C-D2691D44A339}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesaFabApproval.API.Test", "MesaFabApproval.API.Test\MesaFabApproval.API.Test.csproj", "{D03AB305-BA29-4EB1-AC66-ABBF76FBF5C1}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339} = {2C16014D-B04E-46AF-AB4C-D2691D44A339}
|
||||||
|
{852E528D-015A-43B5-999D-F281E3359E5E} = {852E528D-015A-43B5-999D-F281E3359E5E}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MesaFabApproval.Client.Test", "MesaFabApproval.Client.Test\MesaFabApproval.Client.Test.csproj", "{A0E5BD7D-3910-43BD-BBA3-3820AD524423}"
|
||||||
|
ProjectSection(ProjectDependencies) = postProject
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339} = {2C16014D-B04E-46AF-AB4C-D2691D44A339}
|
||||||
|
{34D52F44-A81F-4247-8180-16E204824A07} = {34D52F44-A81F-4247-8180-16E204824A07}
|
||||||
|
EndProjectSection
|
||||||
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(TeamFoundationVersionControl) = preSolution
|
|
||||||
SccNumberOfProjects = 2
|
|
||||||
SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
|
|
||||||
SccTeamFoundationServer = http://tfs.intra.infineon.com:8080/tfs/manufacturingit
|
|
||||||
SccLocalPath0 = .
|
|
||||||
SccProjectUniqueName1 = Fab2ApprovalSystem\\Fab2ApprovalSystem.csproj
|
|
||||||
SccProjectName1 = Fab2ApprovalSystem
|
|
||||||
SccLocalPath1 = Fab2ApprovalSystem
|
|
||||||
EndGlobalSection
|
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
Debug|Any CPU = Debug|Any CPU
|
Debug|Any CPU = Debug|Any CPU
|
||||||
Release|Any CPU = Release|Any CPU
|
Release|Any CPU = Release|Any CPU
|
||||||
@ -24,8 +39,31 @@ Global
|
|||||||
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Release|Any CPU.Build.0 = Release|Any CPU
|
{AAE52608-4DD1-4732-92BD-CC8915DEC71E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{852E528D-015A-43B5-999D-F281E3359E5E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{852E528D-015A-43B5-999D-F281E3359E5E}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{852E528D-015A-43B5-999D-F281E3359E5E}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{852E528D-015A-43B5-999D-F281E3359E5E}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{2C16014D-B04E-46AF-AB4C-D2691D44A339}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{34D52F44-A81F-4247-8180-16E204824A07}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{34D52F44-A81F-4247-8180-16E204824A07}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{34D52F44-A81F-4247-8180-16E204824A07}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{34D52F44-A81F-4247-8180-16E204824A07}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{D03AB305-BA29-4EB1-AC66-ABBF76FBF5C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{D03AB305-BA29-4EB1-AC66-ABBF76FBF5C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{D03AB305-BA29-4EB1-AC66-ABBF76FBF5C1}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{D03AB305-BA29-4EB1-AC66-ABBF76FBF5C1}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
{A0E5BD7D-3910-43BD-BBA3-3820AD524423}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{A0E5BD7D-3910-43BD-BBA3-3820AD524423}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{A0E5BD7D-3910-43BD-BBA3-3820AD524423}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{A0E5BD7D-3910-43BD-BBA3-3820AD524423}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
GlobalSection(SolutionProperties) = preSolution
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
HideSolutionNode = FALSE
|
HideSolutionNode = FALSE
|
||||||
EndGlobalSection
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {A966A184-1FCD-4B6A-978C-5907CC12406B}
|
||||||
|
EndGlobalSection
|
||||||
EndGlobal
|
EndGlobal
|
||||||
|
380
Fab2ApprovalSystem/.editorconfig
Normal file
380
Fab2ApprovalSystem/.editorconfig
Normal file
@ -0,0 +1,380 @@
|
|||||||
|
[*.md]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
|
[*.csproj]
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 2
|
||||||
|
[*.cs]
|
||||||
|
csharp_indent_block_contents = true
|
||||||
|
csharp_indent_braces = false
|
||||||
|
csharp_indent_case_contents = true
|
||||||
|
csharp_indent_case_contents_when_block = true
|
||||||
|
csharp_indent_labels = one_less_than_current
|
||||||
|
csharp_indent_switch_labels = true
|
||||||
|
csharp_new_line_before_catch = false
|
||||||
|
csharp_new_line_before_else = false
|
||||||
|
csharp_new_line_before_finally = false
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = none
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
csharp_prefer_braces = false
|
||||||
|
csharp_prefer_qualified_reference = true:error
|
||||||
|
csharp_prefer_simple_default_expression = true:warning
|
||||||
|
csharp_prefer_simple_using_statement = true:warning
|
||||||
|
csharp_prefer_static_local_function = true:warning
|
||||||
|
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
|
||||||
|
csharp_preserve_single_line_blocks = true
|
||||||
|
csharp_preserve_single_line_statements = false
|
||||||
|
csharp_space_after_cast = false
|
||||||
|
csharp_space_after_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_after_comma = true
|
||||||
|
csharp_space_after_dot = false
|
||||||
|
csharp_space_after_keywords_in_control_flow_statements = true
|
||||||
|
csharp_space_after_semicolon_in_for_statement = true
|
||||||
|
csharp_space_around_binary_operators = before_and_after
|
||||||
|
csharp_space_around_declaration_statements = false
|
||||||
|
csharp_space_before_colon_in_inheritance_clause = true
|
||||||
|
csharp_space_before_comma = false
|
||||||
|
csharp_space_before_dot = false
|
||||||
|
csharp_space_before_open_square_brackets = false
|
||||||
|
csharp_space_before_semicolon_in_for_statement = false
|
||||||
|
csharp_space_between_empty_square_brackets = false
|
||||||
|
csharp_space_between_method_call_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_call_name_and_opening_parenthesis = false
|
||||||
|
csharp_space_between_method_call_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_method_declaration_name_and_open_parenthesis = false
|
||||||
|
csharp_space_between_method_declaration_parameter_list_parentheses = false
|
||||||
|
csharp_space_between_parentheses = false
|
||||||
|
csharp_space_between_square_brackets = false
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
csharp_style_conditional_delegate_call = true
|
||||||
|
csharp_style_deconstructed_variable_declaration = false
|
||||||
|
csharp_style_expression_bodied_accessors = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_constructors = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_indexers = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_lambdas = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_local_functions = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_methods = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_operators = when_on_single_line:warning
|
||||||
|
csharp_style_expression_bodied_properties = when_on_single_line:warning
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning
|
||||||
|
csharp_style_inlined_variable_declaration = false
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
csharp_style_pattern_local_over_anonymous_function = true:warning
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = true:warning
|
||||||
|
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
|
||||||
|
csharp_style_prefer_index_operator = true:warning
|
||||||
|
csharp_style_prefer_not_pattern = true:warning
|
||||||
|
csharp_style_prefer_null_check_over_type_check = true
|
||||||
|
csharp_style_prefer_pattern_matching = true:warning
|
||||||
|
csharp_style_prefer_range_operator = true:warning
|
||||||
|
csharp_style_prefer_switch_expression = true:warning
|
||||||
|
csharp_style_throw_expression = true
|
||||||
|
csharp_style_unused_value_assignment_preference = discard_variable:warning
|
||||||
|
csharp_style_unused_value_expression_statement_preference = discard_variable:warning
|
||||||
|
csharp_style_var_elsewhere = false:warning
|
||||||
|
csharp_style_var_for_built_in_types = false:warning
|
||||||
|
csharp_style_var_when_type_is_apparent = false:warning
|
||||||
|
csharp_using_directive_placement = outside_namespace
|
||||||
|
dotnet_analyzer_diagnostic.category-Design.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Documentation.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Globalization.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Interoperability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Maintainability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Naming.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Performance.severity = none
|
||||||
|
dotnet_analyzer_diagnostic.category-Reliability.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Security.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-SingleFile.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Style.severity = error
|
||||||
|
dotnet_analyzer_diagnostic.category-Usage.severity = error
|
||||||
|
dotnet_code_quality_unused_parameters = all
|
||||||
|
dotnet_code_quality_unused_parameters = non_public
|
||||||
|
dotnet_code_quality.CAXXXX.api_surface = private, internal
|
||||||
|
dotnet_diagnostic.CA1001.severity = error # CA1001: Types that own disposable fields should be disposable
|
||||||
|
dotnet_diagnostic.CA1051.severity = error # CA1051: Do not declare visible instance fields
|
||||||
|
dotnet_diagnostic.CA1511.severity = warning # CA1511: Use 'ArgumentException.ThrowIfNullOrEmpty' instead of explicitly throwing a new exception instance
|
||||||
|
dotnet_diagnostic.CA1513.severity = warning # Use 'ObjectDisposedException.ThrowIf' instead of explicitly throwing a new exception instance
|
||||||
|
dotnet_diagnostic.CA1825.severity = warning # CA1825: Avoid zero-length array allocations
|
||||||
|
dotnet_diagnostic.CA1829.severity = error # CA1829: Use Length/Count property instead of Count() when available
|
||||||
|
dotnet_diagnostic.CA1834.severity = warning # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
|
dotnet_diagnostic.CA1860.severity = error # CA1860: Prefer comparing 'Count' to 0 rather than using 'Any()', both for clarity and for performance
|
||||||
|
dotnet_diagnostic.CA1862.severity = warning # CA1862: Prefer using 'string.Equals(string, StringComparison)' to perform a case-insensitive comparison, but keep in mind that this might cause subtle changes in behavior, so make sure to conduct thorough testing after applying the suggestion, or if culturally sensitive comparison is not required, consider using 'StringComparison.OrdinalIgnoreCase'
|
||||||
|
dotnet_diagnostic.CA1869.severity = none # CA1869: Avoid creating a new 'JsonSerializerOptions' instance for every serialization operation. Cache and reuse instances instead.
|
||||||
|
dotnet_diagnostic.CA2201.severity = none # CA2201: Exception type System.NullReferenceException is reserved by the runtime
|
||||||
|
dotnet_diagnostic.CA2254.severity = none # CA2254: The logging message template should not vary between calls to 'LoggerExtensions.LogInformation(ILogger, string?, params object?[])'
|
||||||
|
dotnet_diagnostic.IDE0001.severity = warning # IDE0001: Simplify name
|
||||||
|
dotnet_diagnostic.IDE0002.severity = warning # Simplify (member access) - System.Version.Equals("1", "2"); Version.Equals("1", "2");
|
||||||
|
dotnet_diagnostic.IDE0004.severity = warning # IDE0004: Cast is redundant.
|
||||||
|
dotnet_diagnostic.IDE0005.severity = error # Using directive is unnecessary
|
||||||
|
dotnet_diagnostic.IDE0010.severity = none # Add missing cases to switch statement (IDE0010)
|
||||||
|
dotnet_diagnostic.IDE0028.severity = error # IDE0028: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0031.severity = warning # Use null propagation (IDE0031)
|
||||||
|
dotnet_diagnostic.IDE0047.severity = warning # IDE0047: Parentheses can be removed
|
||||||
|
dotnet_diagnostic.IDE0048.severity = none # Parentheses preferences (IDE0047 and IDE0048)
|
||||||
|
dotnet_diagnostic.IDE0049.severity = warning # Use language keywords instead of framework type names for type references (IDE0049)
|
||||||
|
dotnet_diagnostic.IDE0051.severity = error # Private member '' is unused [, ]
|
||||||
|
dotnet_diagnostic.IDE0058.severity = error # IDE0058: Expression value is never used
|
||||||
|
dotnet_diagnostic.IDE0060.severity = error # IDE0060: Remove unused parameter
|
||||||
|
dotnet_diagnostic.IDE0074.severity = warning # IDE0074: Use compound assignment
|
||||||
|
dotnet_diagnostic.IDE0130.severity = none # Namespace does not match folder structure (IDE0130)
|
||||||
|
dotnet_diagnostic.IDE0270.severity = warning # IDE0270: Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0290.severity = none # Use primary constructor [Distance]csharp(IDE0290)
|
||||||
|
dotnet_diagnostic.IDE0300.severity = error # IDE0300: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0301.severity = error #IDE0301: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0305.severity = none # IDE0305: Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE2000.severity = error # IDE2000: Allow multiple blank lines
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.abstract_method_should_be_pascal_case.symbols = abstract_method
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.class_should_be_pascal_case.symbols = class
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.delegate_should_be_pascal_case.symbols = delegate
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.enum_should_be_pascal_case.symbols = enum
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.event_should_be_pascal_case.symbols = event
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
|
||||||
|
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.method_should_be_pascal_case.symbols = method
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.private_method_should_be_pascal_case.symbols = private_method
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_field_should_be_private_of_internal_field.symbols = private_or_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.private_or_internal_static_field_should_be_private_of_internal_field.symbols = private_or_internal_static_field
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.property_should_be_pascal_case.symbols = property
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.severity = warning
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.style = private_of_internal_field
|
||||||
|
dotnet_naming_rule.public_or_protected_field_should_be_private_of_internal_field.symbols = public_or_protected_field
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.static_field_should_be_pascal_case.symbols = static_field
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.static_method_should_be_pascal_case.symbols = static_method
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.struct_should_be_pascal_case.symbols = struct
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
|
||||||
|
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
|
||||||
|
dotnet_naming_style.begins_with_i.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.begins_with_i.required_prefix = I
|
||||||
|
dotnet_naming_style.begins_with_i.required_suffix =
|
||||||
|
dotnet_naming_style.begins_with_i.word_separator =
|
||||||
|
dotnet_naming_style.pascal_case.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.pascal_case.required_prefix =
|
||||||
|
dotnet_naming_style.pascal_case.required_suffix =
|
||||||
|
dotnet_naming_style.pascal_case.word_separator =
|
||||||
|
dotnet_naming_style.private_of_internal_field.capitalization = pascal_case
|
||||||
|
dotnet_naming_style.private_of_internal_field.required_prefix = _
|
||||||
|
dotnet_naming_style.private_of_internal_field.required_suffix =
|
||||||
|
dotnet_naming_style.private_of_internal_field.word_separator =
|
||||||
|
dotnet_naming_symbols.abstract_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.abstract_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.abstract_method.required_modifiers = abstract
|
||||||
|
dotnet_naming_symbols.class.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.class.applicable_kinds = class
|
||||||
|
dotnet_naming_symbols.class.required_modifiers =
|
||||||
|
dotnet_naming_symbols.delegate.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.delegate.applicable_kinds = delegate
|
||||||
|
dotnet_naming_symbols.delegate.required_modifiers =
|
||||||
|
dotnet_naming_symbols.enum.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.enum.applicable_kinds = enum
|
||||||
|
dotnet_naming_symbols.enum.required_modifiers =
|
||||||
|
dotnet_naming_symbols.event.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.event.applicable_kinds = event
|
||||||
|
dotnet_naming_symbols.event.required_modifiers =
|
||||||
|
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.interface.applicable_kinds = interface
|
||||||
|
dotnet_naming_symbols.interface.required_modifiers =
|
||||||
|
dotnet_naming_symbols.method.applicable_accessibilities = public
|
||||||
|
dotnet_naming_symbols.method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.method.required_modifiers =
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
|
||||||
|
dotnet_naming_symbols.non_field_members.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_method.applicable_accessibilities = private
|
||||||
|
dotnet_naming_symbols.private_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.private_method.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_field.required_modifiers =
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.applicable_accessibilities = internal, private, private_protected
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.private_or_internal_static_field.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.property.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.property.applicable_kinds = property
|
||||||
|
dotnet_naming_symbols.property.required_modifiers =
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.applicable_accessibilities = public, protected
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.public_or_protected_field.required_modifiers =
|
||||||
|
dotnet_naming_symbols.static_field.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.static_field.applicable_kinds = field
|
||||||
|
dotnet_naming_symbols.static_field.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.static_method.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.static_method.applicable_kinds = method
|
||||||
|
dotnet_naming_symbols.static_method.required_modifiers = static
|
||||||
|
dotnet_naming_symbols.struct.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.struct.applicable_kinds = struct
|
||||||
|
dotnet_naming_symbols.struct.required_modifiers =
|
||||||
|
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
|
||||||
|
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
|
||||||
|
dotnet_naming_symbols.types.required_modifiers =
|
||||||
|
dotnet_remove_unnecessary_suppression_exclusions = 0
|
||||||
|
dotnet_separate_import_directive_groups = true
|
||||||
|
dotnet_sort_system_directives_first = true
|
||||||
|
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true
|
||||||
|
dotnet_style_coalesce_expression = true
|
||||||
|
dotnet_style_collection_initializer = true:warning
|
||||||
|
dotnet_style_explicit_tuple_names = true:warning
|
||||||
|
dotnet_style_namespace_match_folder = true
|
||||||
|
dotnet_style_null_propagation = true:warning
|
||||||
|
dotnet_style_object_initializer = true:warning
|
||||||
|
dotnet_style_operator_placement_when_wrapping = beginning_of_line
|
||||||
|
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
|
||||||
|
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
|
||||||
|
dotnet_style_predefined_type_for_locals_parameters_members = true
|
||||||
|
dotnet_style_predefined_type_for_member_access = true:warning
|
||||||
|
dotnet_style_prefer_auto_properties = true:warning
|
||||||
|
dotnet_style_prefer_compound_assignment = true:warning
|
||||||
|
dotnet_style_prefer_conditional_expression_over_assignment = false
|
||||||
|
dotnet_style_prefer_conditional_expression_over_return = false
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
|
||||||
|
dotnet_style_prefer_inferred_tuple_names = true:warning
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
|
||||||
|
dotnet_style_prefer_simplified_boolean_expressions = true:warning
|
||||||
|
dotnet_style_prefer_simplified_interpolation = true
|
||||||
|
dotnet_style_qualification_for_event = false:error
|
||||||
|
dotnet_style_qualification_for_field = false
|
||||||
|
dotnet_style_qualification_for_method = false:error
|
||||||
|
dotnet_style_qualification_for_property = false:error
|
||||||
|
dotnet_style_readonly_field = true:warning
|
||||||
|
dotnet_style_require_accessibility_modifiers = for_non_interface_members
|
||||||
|
end_of_line = crlf
|
||||||
|
file_header_template = unset
|
||||||
|
indent_size = 4
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
root = true
|
||||||
|
tab_width = 4
|
||||||
|
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822
|
||||||
|
# https://github.com/dotnet/aspnetcore/blob/main/.editorconfig
|
||||||
|
# https://github.com/dotnet/project-system/blob/main/.editorconfig
|
||||||
|
|
||||||
|
# Question
|
||||||
|
csharp_prefer_simple_using_statement = false # Question
|
||||||
|
csharp_style_expression_bodied_constructors = when_on_single_line:none # Question
|
||||||
|
csharp_style_expression_bodied_properties = true # Question
|
||||||
|
csharp_style_implicit_object_creation_when_type_is_apparent = true:warning # Question
|
||||||
|
csharp_style_pattern_matching_over_as_with_null_check = false # Question
|
||||||
|
csharp_style_prefer_pattern_matching = false # Question
|
||||||
|
csharp_style_prefer_range_operator = false # Question
|
||||||
|
csharp_style_prefer_switch_expression = false # Question
|
||||||
|
csharp_style_unused_value_assignment_preference = unused_local_variable # Question
|
||||||
|
csharp_style_unused_value_expression_statement_preference = false # Question
|
||||||
|
csharp_style_var_elsewhere = false:none # Question
|
||||||
|
csharp_style_var_for_built_in_types = false:none # Question
|
||||||
|
csharp_style_var_when_type_is_apparent = false:warning # Question
|
||||||
|
dotnet_diagnostic.CA1001.severity = none # Question - Types that own disposable fields should be disposable
|
||||||
|
dotnet_diagnostic.CA1051.severity = none # Question - Do not declare visible instance fields
|
||||||
|
dotnet_diagnostic.CA1416.severity = none # Question - This call site is reachable on all platforms.
|
||||||
|
dotnet_diagnostic.CA1510.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.CA1834.severity = none # CA1834: Consider using 'StringBuilder.Append(char)' when applicable
|
||||||
|
dotnet_diagnostic.CA1860.severity = none # Question - Avoid using
|
||||||
|
dotnet_diagnostic.CA1862.severity = none # Question - Prefer using
|
||||||
|
dotnet_diagnostic.CA2208.severity = none # Question - Instantiate argument exceptions correctly
|
||||||
|
dotnet_diagnostic.CA2211.severity = none # Question - Non-constant fields should not be visible
|
||||||
|
dotnet_diagnostic.CA2249.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.CA2253.severity = none # Question - Named placeholders should not be numeric values
|
||||||
|
dotnet_diagnostic.CS0103.severity = none # Question - The name
|
||||||
|
dotnet_diagnostic.CS0168.severity = none # Question - The variable
|
||||||
|
dotnet_diagnostic.CS0219.severity = none # Question - The variable
|
||||||
|
dotnet_diagnostic.CS0612.severity = none # Question - is obsolete
|
||||||
|
dotnet_diagnostic.CS0618.severity = none # Question - Compiler Warning (level 2)
|
||||||
|
dotnet_diagnostic.CS0659.severity = none # Question - Compiler Warning (level 3)
|
||||||
|
dotnet_diagnostic.CS8019.severity = warning # Question - Unnecessary using directive.
|
||||||
|
dotnet_diagnostic.CS8600.severity = none # Question - Converting null literal or possible null value to non-nullable type
|
||||||
|
dotnet_diagnostic.CS8602.severity = none # Question - Dereference of a possibly null reference.
|
||||||
|
dotnet_diagnostic.CS8603.severity = none # Question - Possible null reference return
|
||||||
|
dotnet_diagnostic.CS8604.severity = none # Question - Possible null reference argument for parameter.
|
||||||
|
dotnet_diagnostic.CS8618.severity = none # Question - Non-nullable variable must contain a non-null value when exiting constructor
|
||||||
|
dotnet_diagnostic.CS8625.severity = none # Question - Cannot convert null literal to non-nullable reference type.
|
||||||
|
dotnet_diagnostic.CS8629.severity = none # Question - Nullable value type may be null
|
||||||
|
dotnet_diagnostic.CS8765.severity = none # Question - Nullability of type of parameter
|
||||||
|
dotnet_diagnostic.IDE0005.severity = none # Question - Remove unnecessary using directives
|
||||||
|
dotnet_diagnostic.IDE0008.severity = warning # Question - Use explicit type instead of
|
||||||
|
dotnet_diagnostic.IDE0017.severity = none # Question - Object initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE0019.severity = none # Question - Use pattern matching
|
||||||
|
dotnet_diagnostic.IDE0021.severity = none # Question - Use expression body for constructor
|
||||||
|
dotnet_diagnostic.IDE0022.severity = none # Question - Use expression body for method
|
||||||
|
dotnet_diagnostic.IDE0025.severity = none # Question - Use expression body for property
|
||||||
|
dotnet_diagnostic.IDE0027.severity = none # Question - Use expression body for accessor
|
||||||
|
dotnet_diagnostic.IDE0028.severity = none # Question - Use collection initializers or expressions
|
||||||
|
dotnet_diagnostic.IDE0031.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0032.severity = none # Question - Use auto property
|
||||||
|
dotnet_diagnostic.IDE0037.severity = none # Question - Member name can be simplified
|
||||||
|
dotnet_diagnostic.IDE0041.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0047.severity = none # Question - Parentheses preferences
|
||||||
|
dotnet_diagnostic.IDE0049.severity = warning # Question - Name can be simplified
|
||||||
|
dotnet_diagnostic.IDE0051.severity = none # Question - Remove unused private member
|
||||||
|
dotnet_diagnostic.IDE0053.severity = none # Question - Use expression body for lambdas
|
||||||
|
dotnet_diagnostic.IDE0054.severity = none # Question - Use compound assignment
|
||||||
|
dotnet_diagnostic.IDE0055.severity = none # Question - Formatting rule
|
||||||
|
dotnet_diagnostic.IDE0057.severity = none # Question - Substring can be simplified
|
||||||
|
dotnet_diagnostic.IDE0058.severity = none # Question - Remove unnecessary expression value
|
||||||
|
dotnet_diagnostic.IDE0059.severity = none # Question - Unnecessary assignment of a value to
|
||||||
|
dotnet_diagnostic.IDE0060.severity = none # Question - Remove unused parameter
|
||||||
|
dotnet_diagnostic.IDE0063.severity = none # Question - Use simple
|
||||||
|
dotnet_diagnostic.IDE0065.severity = none # Question -
|
||||||
|
dotnet_diagnostic.IDE0066.severity = none # Question - Use
|
||||||
|
dotnet_diagnostic.IDE0078.severity = none # Question - Use pattern matching (may change code meaning)
|
||||||
|
dotnet_diagnostic.IDE0090.severity = warning # Question - Simplify new expression
|
||||||
|
dotnet_diagnostic.IDE0160.severity = warning # Question - Use block-scoped namespace
|
||||||
|
dotnet_diagnostic.IDE0161.severity = warning # Question - Namespace declaration preferences
|
||||||
|
dotnet_diagnostic.IDE0270.severity = none # Question - Null check can be simplified
|
||||||
|
dotnet_diagnostic.IDE0300.severity = none # Question - Collection initialization can be simplified
|
||||||
|
dotnet_diagnostic.IDE1006.severity = none # Question - Use collection expression for builder dotnet_style_prefer_collection_expression
|
||||||
|
dotnet_style_null_propagation = false # Question
|
||||||
|
dotnet_style_object_initializer = false # Question
|
||||||
|
dotnet_style_prefer_auto_properties = false # Question
|
||||||
|
dotnet_style_allow_statement_immediately_after_block_experimental = true # Question
|
||||||
|
dotnet_style_prefer_is_null_check_over_reference_equality_method = false # Question
|
||||||
|
dotnet_style_prefer_inferred_anonymous_type_member_names = false:warning # Question
|
1
Fab2ApprovalSystem/.vscode/format-report.json
vendored
Normal file
1
Fab2ApprovalSystem/.vscode/format-report.json
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
[]
|
30
Fab2ApprovalSystem/.vscode/launch.json
vendored
Normal file
30
Fab2ApprovalSystem/.vscode/launch.json
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
{
|
||||||
|
// Use IntelliSense to learn about possible attributes.
|
||||||
|
// Hover to view descriptions of existing attributes.
|
||||||
|
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||||
|
"version": "0.2.0",
|
||||||
|
"configurations": [
|
||||||
|
{
|
||||||
|
"name": ".NET Core Launch (console)",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "launch",
|
||||||
|
"preLaunchTask": "build",
|
||||||
|
"program": "${workspaceFolder}/bin/Debug/net8.0/win-x64/Fab2ApprovalSystem.dll",
|
||||||
|
"args": [],
|
||||||
|
"cwd": "${workspaceFolder}",
|
||||||
|
"console": "integratedTerminal",
|
||||||
|
"stopAtEntry": false
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": ".NET Core Attach",
|
||||||
|
"type": "coreclr",
|
||||||
|
"request": "attach"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "node",
|
||||||
|
"request": "launch",
|
||||||
|
"name": "node Launch Current Opened File",
|
||||||
|
"program": "${file}"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
424
Fab2ApprovalSystem/.vscode/settings.json
vendored
Normal file
424
Fab2ApprovalSystem/.vscode/settings.json
vendored
Normal file
@ -0,0 +1,424 @@
|
|||||||
|
{
|
||||||
|
"[markdown]": {
|
||||||
|
"editor.wordWrap": "off"
|
||||||
|
},
|
||||||
|
"files.exclude": {
|
||||||
|
"**/.git": false,
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"files.watcherExclude": {
|
||||||
|
"**/node_modules": true
|
||||||
|
},
|
||||||
|
"cSpell.words": [
|
||||||
|
"abutton",
|
||||||
|
"accessibilities",
|
||||||
|
"accodingly",
|
||||||
|
"acknowledgmentby",
|
||||||
|
"Acks",
|
||||||
|
"actionsheet",
|
||||||
|
"Additonal",
|
||||||
|
"Addtional",
|
||||||
|
"againm",
|
||||||
|
"agendaview",
|
||||||
|
"Antlr",
|
||||||
|
"Appover",
|
||||||
|
"Appprrovers",
|
||||||
|
"Approvalog",
|
||||||
|
"Aprovers",
|
||||||
|
"Aproverslist",
|
||||||
|
"asax",
|
||||||
|
"aspnetmvc",
|
||||||
|
"Assignedto",
|
||||||
|
"Atachments",
|
||||||
|
"Attachemnt",
|
||||||
|
"Attachemnts",
|
||||||
|
"Attchment",
|
||||||
|
"auditee",
|
||||||
|
"Auditee",
|
||||||
|
"Auditees",
|
||||||
|
"automaically",
|
||||||
|
"Autthorized",
|
||||||
|
"beacuase",
|
||||||
|
"beforeunload",
|
||||||
|
"Belguim",
|
||||||
|
"bfound",
|
||||||
|
"bgcolor",
|
||||||
|
"Bies",
|
||||||
|
"binded",
|
||||||
|
"blackbackground",
|
||||||
|
"blackhover",
|
||||||
|
"blackpressed",
|
||||||
|
"blueenergy",
|
||||||
|
"blueopal",
|
||||||
|
"buttongroup",
|
||||||
|
"BYMRB",
|
||||||
|
"bytesgot",
|
||||||
|
"CAID",
|
||||||
|
"casection",
|
||||||
|
"CAXXXX",
|
||||||
|
"CCPCR",
|
||||||
|
"CCPCRB",
|
||||||
|
"cellspacing",
|
||||||
|
"Cheeso's",
|
||||||
|
"chkbx",
|
||||||
|
"Clib",
|
||||||
|
"colorpicker",
|
||||||
|
"columnmenu",
|
||||||
|
"columnsreorder",
|
||||||
|
"columnsresize",
|
||||||
|
"comming",
|
||||||
|
"Containmen",
|
||||||
|
"Copmments",
|
||||||
|
"correctiv",
|
||||||
|
"Correctivet",
|
||||||
|
"Creat",
|
||||||
|
"currentd",
|
||||||
|
"Cyle",
|
||||||
|
"dadada",
|
||||||
|
"darkbluehover",
|
||||||
|
"darkbluepressed",
|
||||||
|
"darkred",
|
||||||
|
"datafields",
|
||||||
|
"datasource",
|
||||||
|
"dataviz",
|
||||||
|
"datepicker",
|
||||||
|
"datetimepicker",
|
||||||
|
"dayview",
|
||||||
|
"Deletet",
|
||||||
|
"Delgation",
|
||||||
|
"DENITED",
|
||||||
|
"Deparmtent",
|
||||||
|
"departmentids",
|
||||||
|
"Descirption",
|
||||||
|
"devprog",
|
||||||
|
"dfeffc",
|
||||||
|
"Disp",
|
||||||
|
"Dispo",
|
||||||
|
"Dispoitio",
|
||||||
|
"Dispos",
|
||||||
|
"Dispositon",
|
||||||
|
"Dispostion",
|
||||||
|
"Dispostions",
|
||||||
|
"dispotypevalidation",
|
||||||
|
"Docbase",
|
||||||
|
"Documentum",
|
||||||
|
"Documetum",
|
||||||
|
"dont",
|
||||||
|
"downlaoded",
|
||||||
|
"draganddrop",
|
||||||
|
"dragcancel",
|
||||||
|
"dropdownlist",
|
||||||
|
"Eamils",
|
||||||
|
"ECNPCRB",
|
||||||
|
"Ecns",
|
||||||
|
"edmx",
|
||||||
|
"EECN",
|
||||||
|
"emai",
|
||||||
|
"emailparams",
|
||||||
|
"Emergrncy",
|
||||||
|
"energyblue",
|
||||||
|
"Eran",
|
||||||
|
"Esql",
|
||||||
|
"ETECN",
|
||||||
|
"EXCELOPENXML",
|
||||||
|
"existinglocation",
|
||||||
|
"Expando",
|
||||||
|
"extrafield",
|
||||||
|
"fadc",
|
||||||
|
"fbec",
|
||||||
|
"fcfdfd",
|
||||||
|
"fdff",
|
||||||
|
"fece",
|
||||||
|
"feeebd",
|
||||||
|
"ffdc",
|
||||||
|
"ffdd",
|
||||||
|
"fieldset",
|
||||||
|
"FILIPE",
|
||||||
|
"filtermenu",
|
||||||
|
"Fldr",
|
||||||
|
"flintstone",
|
||||||
|
"FLOWLOCS",
|
||||||
|
"FMEA",
|
||||||
|
"ftplib",
|
||||||
|
"FTPSPN",
|
||||||
|
"GETDATE",
|
||||||
|
"gitea",
|
||||||
|
"globaldocudms",
|
||||||
|
"glyphicons",
|
||||||
|
"groupable",
|
||||||
|
"Guids",
|
||||||
|
"halflings",
|
||||||
|
"Hexsize",
|
||||||
|
"highcontrast",
|
||||||
|
"Hmac",
|
||||||
|
"holdsteps",
|
||||||
|
"hostspecific",
|
||||||
|
"icenium",
|
||||||
|
"IECN",
|
||||||
|
"imagebrowser",
|
||||||
|
"IMRB",
|
||||||
|
"Infineon",
|
||||||
|
"Insertd",
|
||||||
|
"inverseicons",
|
||||||
|
"IPCRB",
|
||||||
|
"ISADMIN",
|
||||||
|
"islast",
|
||||||
|
"ISNULL",
|
||||||
|
"ITAR",
|
||||||
|
"jquery",
|
||||||
|
"jqueryval",
|
||||||
|
"jqwidgets",
|
||||||
|
"jqxbuttongroup",
|
||||||
|
"jqxbuttons",
|
||||||
|
"jqxcalendar",
|
||||||
|
"jqxchart",
|
||||||
|
"jqxcheckbox",
|
||||||
|
"jqxcolorpicker",
|
||||||
|
"jqxcombobox",
|
||||||
|
"jqxcore",
|
||||||
|
"jqxdata",
|
||||||
|
"jqxdatatable",
|
||||||
|
"jqxdatetimeinput",
|
||||||
|
"jqxdocking",
|
||||||
|
"jqxdockpanel",
|
||||||
|
"jqxdragdrop",
|
||||||
|
"jqxdropdownbutton",
|
||||||
|
"jqxdropdownlist",
|
||||||
|
"jqxexpander",
|
||||||
|
"jqxgauge",
|
||||||
|
"jqxgrid",
|
||||||
|
"jqxinput",
|
||||||
|
"jqxknockout",
|
||||||
|
"jqxlistbox",
|
||||||
|
"jqxlistmenu",
|
||||||
|
"jqxmaskedinput",
|
||||||
|
"jqxmenu",
|
||||||
|
"jqxnavigationbar",
|
||||||
|
"jqxnumberinput",
|
||||||
|
"jqxpanel",
|
||||||
|
"jqxpasswordinput",
|
||||||
|
"jqxprogressbar",
|
||||||
|
"jqxradiobutton",
|
||||||
|
"jqxrangeselector",
|
||||||
|
"jqxrating",
|
||||||
|
"jqxresponse",
|
||||||
|
"jqxscrollbar",
|
||||||
|
"jqxscrollview",
|
||||||
|
"jqxslider",
|
||||||
|
"jqxsplitter",
|
||||||
|
"jqxswitchbutton",
|
||||||
|
"jqxtabs",
|
||||||
|
"jqxtooltip",
|
||||||
|
"jqxtouch",
|
||||||
|
"jqxtree",
|
||||||
|
"jqxtreegrid",
|
||||||
|
"jqxtreemap",
|
||||||
|
"jqxvalidator",
|
||||||
|
"jqxwindow",
|
||||||
|
"kendogridcustom",
|
||||||
|
"kendoui",
|
||||||
|
"labelelement",
|
||||||
|
"labelledby",
|
||||||
|
"Leanred",
|
||||||
|
"lightgray",
|
||||||
|
"linkbutton",
|
||||||
|
"Linq",
|
||||||
|
"Listdiv",
|
||||||
|
"listview",
|
||||||
|
"Lnks",
|
||||||
|
"localfilename",
|
||||||
|
"loclist",
|
||||||
|
"logis",
|
||||||
|
"logtext",
|
||||||
|
"loopmis",
|
||||||
|
"lotdispo",
|
||||||
|
"LOTDISPSITION",
|
||||||
|
"Lotfile",
|
||||||
|
"lotlist",
|
||||||
|
"lotstatusoption",
|
||||||
|
"LTRIM",
|
||||||
|
"MADUREIRA",
|
||||||
|
"mailrelay",
|
||||||
|
"MDTM",
|
||||||
|
"meego",
|
||||||
|
"meetingid",
|
||||||
|
"menubutton",
|
||||||
|
"mesafi",
|
||||||
|
"metroblack",
|
||||||
|
"metrodark",
|
||||||
|
"miliseconds",
|
||||||
|
"modalview",
|
||||||
|
"modernizr",
|
||||||
|
"Modernizr",
|
||||||
|
"monthview",
|
||||||
|
"MRBIs",
|
||||||
|
"Mrbs",
|
||||||
|
"msecs",
|
||||||
|
"multipleextended",
|
||||||
|
"Navigatable",
|
||||||
|
"nbsp",
|
||||||
|
"newbase",
|
||||||
|
"newchange",
|
||||||
|
"newdi",
|
||||||
|
"newfilename",
|
||||||
|
"newsource",
|
||||||
|
"Newtonsoft",
|
||||||
|
"notications",
|
||||||
|
"Notifcation",
|
||||||
|
"Notifyf",
|
||||||
|
"NTLM",
|
||||||
|
"Nullcc",
|
||||||
|
"numerictextbox",
|
||||||
|
"objdata",
|
||||||
|
"OCAP",
|
||||||
|
"occured",
|
||||||
|
"odata",
|
||||||
|
"oldfilename",
|
||||||
|
"OLHOLD",
|
||||||
|
"onclick",
|
||||||
|
"onmousemove",
|
||||||
|
"OPDESC",
|
||||||
|
"OPENQUERY",
|
||||||
|
"Oper",
|
||||||
|
"operationslist",
|
||||||
|
"Orginator",
|
||||||
|
"Originatorname",
|
||||||
|
"Ouellette",
|
||||||
|
"Owin",
|
||||||
|
"pageable",
|
||||||
|
"Pageable",
|
||||||
|
"panelbar",
|
||||||
|
"parentid",
|
||||||
|
"parminput",
|
||||||
|
"parms",
|
||||||
|
"Parms",
|
||||||
|
"particula",
|
||||||
|
"pasv",
|
||||||
|
"PASV",
|
||||||
|
"PATINDEX",
|
||||||
|
"PCRB",
|
||||||
|
"PCRBID",
|
||||||
|
"pcrvalues",
|
||||||
|
"pdbonly",
|
||||||
|
"Preventitive",
|
||||||
|
"preventivet",
|
||||||
|
"Prevetative",
|
||||||
|
"proces",
|
||||||
|
"Processedl",
|
||||||
|
"procs",
|
||||||
|
"productfamilies",
|
||||||
|
"progess",
|
||||||
|
"progressbar",
|
||||||
|
"qrcode",
|
||||||
|
"Quanityt",
|
||||||
|
"rangebar",
|
||||||
|
"Recep",
|
||||||
|
"Recepient",
|
||||||
|
"recieved",
|
||||||
|
"recordlock",
|
||||||
|
"remotefilename",
|
||||||
|
"reorderable",
|
||||||
|
"reportform",
|
||||||
|
"reportslist",
|
||||||
|
"reportslistdiv",
|
||||||
|
"Reqquired",
|
||||||
|
"Reqs",
|
||||||
|
"Requiest",
|
||||||
|
"Responsibles",
|
||||||
|
"RETR",
|
||||||
|
"Revisioing",
|
||||||
|
"Revisioned",
|
||||||
|
"Revison",
|
||||||
|
"rgba",
|
||||||
|
"rkotian",
|
||||||
|
"RNFR",
|
||||||
|
"RNTO",
|
||||||
|
"Roless",
|
||||||
|
"roundbg",
|
||||||
|
"RTRIM",
|
||||||
|
"SAMDB",
|
||||||
|
"scroller",
|
||||||
|
"scrollview",
|
||||||
|
"seleced",
|
||||||
|
"selectionlog",
|
||||||
|
"Selectpart",
|
||||||
|
"sess",
|
||||||
|
"Sfisharepoint",
|
||||||
|
"shinyblack",
|
||||||
|
"showpassword",
|
||||||
|
"SIGNON",
|
||||||
|
"simpleparser",
|
||||||
|
"slddrw",
|
||||||
|
"sldprt",
|
||||||
|
"sortasc",
|
||||||
|
"sortascbutton",
|
||||||
|
"sortdesc",
|
||||||
|
"sortdescbutton",
|
||||||
|
"sortremove",
|
||||||
|
"sparkline",
|
||||||
|
"splitview",
|
||||||
|
"SPNMRB",
|
||||||
|
"SPNPDB",
|
||||||
|
"SSRS",
|
||||||
|
"Sssign",
|
||||||
|
"Staus",
|
||||||
|
"stylesheet",
|
||||||
|
"Submited",
|
||||||
|
"subrole",
|
||||||
|
"subroles",
|
||||||
|
"Succefully",
|
||||||
|
"Succesfully",
|
||||||
|
"sucessfully",
|
||||||
|
"SURP",
|
||||||
|
"Swashbuckle",
|
||||||
|
"SWRN",
|
||||||
|
"tabindex",
|
||||||
|
"tabstrip",
|
||||||
|
"Tahoma",
|
||||||
|
"taskcompleted",
|
||||||
|
"Tasklist",
|
||||||
|
"Taveler",
|
||||||
|
"TECN",
|
||||||
|
"TECNs",
|
||||||
|
"TEMIRWAP",
|
||||||
|
"tempecd",
|
||||||
|
"tempimplement",
|
||||||
|
"templabel",
|
||||||
|
"tempvalue",
|
||||||
|
"TEMSA",
|
||||||
|
"timepicker",
|
||||||
|
"Tobe",
|
||||||
|
"Toplevel",
|
||||||
|
"Totrav",
|
||||||
|
"trainingby",
|
||||||
|
"Traininglist",
|
||||||
|
"traininglistdiv",
|
||||||
|
"transanction",
|
||||||
|
"Trav",
|
||||||
|
"Traveller",
|
||||||
|
"Traverler",
|
||||||
|
"TRAVLELER",
|
||||||
|
"Travler",
|
||||||
|
"TREEVIEW",
|
||||||
|
"trigerred",
|
||||||
|
"ttinclude",
|
||||||
|
"Uhandled",
|
||||||
|
"Updat",
|
||||||
|
"Uplaod",
|
||||||
|
"Upto",
|
||||||
|
"userevents",
|
||||||
|
"userids",
|
||||||
|
"userlist",
|
||||||
|
"Validatable",
|
||||||
|
"valueelement",
|
||||||
|
"Variabls",
|
||||||
|
"Verdana",
|
||||||
|
"vgrid",
|
||||||
|
"viewmodel",
|
||||||
|
"vsdoc",
|
||||||
|
"whethere",
|
||||||
|
"windowsphone",
|
||||||
|
"Winsock",
|
||||||
|
"worlflow"
|
||||||
|
]
|
||||||
|
}
|
20
Fab2ApprovalSystem/.vscode/tasks.json
vendored
Normal file
20
Fab2ApprovalSystem/.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
{
|
||||||
|
"version": "2.0.0",
|
||||||
|
"tasks": [
|
||||||
|
{
|
||||||
|
"label": "MSBuild",
|
||||||
|
"command": "C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Current/Bin/MSBuild.exe",
|
||||||
|
"type": "process",
|
||||||
|
"args": [
|
||||||
|
"/target:Build",
|
||||||
|
"/restore:True",
|
||||||
|
"/p:RestoreSources=https://artifactory.intra.infineon.com/artifactory/api/nuget/ngt-fi-package-main-vir/%3Bhttps://packagemanagement.eu.infineon.com:4430/api/v2/%3Bhttps://api.nuget.org/v3/index.json",
|
||||||
|
"/detailedsummary",
|
||||||
|
"/consoleloggerparameters:PerformanceSummary;ErrorsOnly;",
|
||||||
|
"/property:Configuration=Debug;TargetFrameworkVersion=v4.8",
|
||||||
|
"Fab2ApprovalSystem.csproj"
|
||||||
|
],
|
||||||
|
"problemMatcher": "$msCompile"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
31
Fab2ApprovalSystem/App_Start/.editorconfig
Normal file
31
Fab2ApprovalSystem/App_Start/.editorconfig
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
#### .NET Coding Conventions ####
|
||||||
|
|
||||||
|
# Organize usings
|
||||||
|
dotnet_separate_import_directive_groups = true
|
||||||
|
dotnet_sort_system_directives_first = true
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
|
||||||
|
#### C# Formatting Rules ####
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_new_line_before_catch = false
|
||||||
|
csharp_new_line_before_else = false
|
||||||
|
csharp_new_line_before_finally = false
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = none
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
insert_final_newline = false
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
dotnet_diagnostic.IDE0161.severity = warning # Question - Namespace declaration preferences
|
||||||
|
dotnet_diagnostic.IDE2000.severity = error # IDE2000: Allow multiple blank lines
|
@ -1,66 +1,58 @@
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Optimization;
|
using System.Web.Optimization;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem
|
namespace Fab2ApprovalSystem;
|
||||||
{
|
|
||||||
public class BundleConfig
|
|
||||||
{
|
|
||||||
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
|
|
||||||
public static void RegisterBundles(BundleCollection bundles)
|
|
||||||
{
|
|
||||||
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
|
||||||
"~/Scripts/jquery-{version}.js",
|
|
||||||
"~/Scripts/jquery-ui-{version}.js")
|
|
||||||
);
|
|
||||||
|
|
||||||
//bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
public class BundleConfig {
|
||||||
// "~/Scripts/jquery.validate*"));
|
// For more information on bundling, visit http://go.microsoft.com/fwlink/?LinkId=301862
|
||||||
|
public static void RegisterBundles(BundleCollection bundles) {
|
||||||
|
bundles.Add(new ScriptBundle("~/bundles/jquery").Include(
|
||||||
|
"~/Scripts/jquery-{version}.js",
|
||||||
|
"~/Scripts/jquery-ui-{version}.js")
|
||||||
|
);
|
||||||
|
|
||||||
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
// bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||||
"~/Scripts/jquery.unobtrusive*",
|
// "~/Scripts/jquery.validate*"));
|
||||||
"~/Scripts/jquery.validate*"));
|
|
||||||
|
|
||||||
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
bundles.Add(new ScriptBundle("~/bundles/jqueryval").Include(
|
||||||
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
|
"~/Scripts/jquery.unobtrusive*",
|
||||||
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
"~/Scripts/jquery.validate*"));
|
||||||
"~/Scripts/modernizr-*"));
|
|
||||||
|
|
||||||
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
|
// Use the development version of Modernizr to develop with and learn from. Then, when you're
|
||||||
"~/Scripts/bootstrap.js",
|
// ready for production, use the build tool at http://modernizr.com to pick only the tests you need.
|
||||||
"~/Scripts/respond.min.js",
|
bundles.Add(new ScriptBundle("~/bundles/modernizr").Include(
|
||||||
"~/Scripts/common.js"));
|
"~/Scripts/modernizr-*"));
|
||||||
|
|
||||||
|
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
|
||||||
|
"~/Scripts/bootstrap.js",
|
||||||
|
"~/Scripts/respond.min.js",
|
||||||
|
"~/Scripts/common.js"));
|
||||||
|
|
||||||
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
|
bundles.Add(new ScriptBundle("~/bundles/kendo").Include(
|
||||||
"~/Scripts/kendo/kendo.all.min.js",
|
"~/Scripts/kendo/kendo.all.min.js",
|
||||||
"~/Scripts/kendo/kendo.aspnetmvc.min.js"));
|
"~/Scripts/kendo/kendo.aspnetmvc.min.js"));
|
||||||
|
|
||||||
bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
|
bundles.Add(new StyleBundle("~/Content/kendo/css").Include(
|
||||||
"~/Content/kendo/kendo.common-bootstrap.min.css",
|
"~/Content/kendo/kendo.common-bootstrap.min.css",
|
||||||
"~/Content/kendo/kendo.bootstrap.min.css"));
|
"~/Content/kendo/kendo.bootstrap.min.css"));
|
||||||
|
|
||||||
bundles.Add(new StyleBundle("~/Content/jqw/css").Include(
|
bundles.Add(new StyleBundle("~/Content/jqw/css").Include(
|
||||||
"~/Scripts/jqwidgets/styles/jqx.base.css",
|
"~/Scripts/jqwidgets/styles/jqx.base.css",
|
||||||
"~/Scripts/jqwidgets/styles/jqx.energyblue.css",
|
"~/Scripts/jqwidgets/styles/jqx.energyblue.css",
|
||||||
"~/Scripts/jqwidgets/styles/jqx.arctic.css",
|
"~/Scripts/jqwidgets/styles/jqx.arctic.css",
|
||||||
"~/Scripts/jqwidgets/styles/jqx.energyblue.css"));
|
"~/Scripts/jqwidgets/styles/jqx.energyblue.css"));
|
||||||
|
|
||||||
|
bundles.Add(new ScriptBundle("~/Content/jqw/jq").Include(
|
||||||
|
"~/Scripts/jqwidgets/jqxcore.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxdata.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxbuttons.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxscrollbar.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxlistbox.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxpanel.js",
|
||||||
|
"~/Scripts/jqwidgets/jqxtree.js"));
|
||||||
|
|
||||||
bundles.Add(new ScriptBundle("~/Content/jqw/jq").Include(
|
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.min.css",
|
||||||
"~/Scripts/jqwidgets/jqxcore.js",
|
"~/Content/site.css",
|
||||||
"~/Scripts/jqwidgets/jqxdata.js",
|
"~/Content/jquery-ui.css"));
|
||||||
"~/Scripts/jqwidgets/jqxbuttons.js",
|
|
||||||
"~/Scripts/jqwidgets/jqxscrollbar.js",
|
|
||||||
"~/Scripts/jqwidgets/jqxlistbox.js",
|
|
||||||
"~/Scripts/jqwidgets/jqxpanel.js",
|
|
||||||
"~/Scripts/jqwidgets/jqxtree.js"));
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bundles.Add(new StyleBundle("~/Content/css").Include("~/Content/bootstrap.min.css",
|
|
||||||
"~/Content/site.css",
|
|
||||||
"~/Content/jquery-ui.css"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,13 +1,12 @@
|
|||||||
using System.Web;
|
using System.Web;
|
||||||
|
#if !NET8
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem
|
namespace Fab2ApprovalSystem;
|
||||||
{
|
|
||||||
public class FilterConfig
|
public class FilterConfig {
|
||||||
{
|
public static void RegisterGlobalFilters(GlobalFilterCollection filters) {
|
||||||
public static void RegisterGlobalFilters(GlobalFilterCollection filters)
|
filters.Add(new HandleErrorAttribute());
|
||||||
{
|
|
||||||
filters.Add(new HandleErrorAttribute());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -3,30 +3,26 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Http;
|
using System.Web.Http;
|
||||||
|
#if !NET8
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
using System.Web.Routing;
|
using System.Web.Routing;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem
|
namespace Fab2ApprovalSystem;
|
||||||
{
|
|
||||||
public class RouteConfig
|
|
||||||
{
|
|
||||||
public static void RegisterRoutes(RouteCollection routes)
|
|
||||||
{
|
|
||||||
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
|
||||||
|
|
||||||
routes.MapRoute(
|
public class RouteConfig {
|
||||||
name: "Default",
|
public static void RegisterRoutes(RouteCollection routes) {
|
||||||
url: "{controller}/{action}/{id}",
|
#if !NET8
|
||||||
// fixing hyperlinks so that the login page will redirect to them
|
routes.IgnoreRoute("{resource}.axd/{*pathInfo}");
|
||||||
// set the default route to the desired landing page, instead of the login page
|
|
||||||
// otherwise MVC generates the wrong form action url
|
routes.MapRoute(
|
||||||
defaults: new { controller = "Home", action = "MyTasks", id = UrlParameter.Optional }
|
name: "Default",
|
||||||
);
|
url: "{controller}/{action}/{id}",
|
||||||
//routes.MapHttpRoute(
|
// fixing hyperlinks so that the login page will redirect to them
|
||||||
// name: "ApiRoute",
|
// set the default route to the desired landing page, instead of the login page
|
||||||
// routeTemplate: "api/{controller}/{id}",
|
// otherwise MVC generates the wrong form action url
|
||||||
// defaults: new { id = RouteParameter.Optional }
|
defaults: new { controller = "Home", action = "MyTasks", id = UrlParameter.Optional }
|
||||||
//);
|
);
|
||||||
}
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,38 +1,20 @@
|
|||||||
using Microsoft.AspNet.Identity;
|
using Microsoft.AspNet.Identity;
|
||||||
using Microsoft.Owin;
|
using Microsoft.Owin;
|
||||||
using Microsoft.Owin.Security.Cookies;
|
using Microsoft.Owin.Security.Cookies;
|
||||||
|
|
||||||
using Owin;
|
using Owin;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem
|
namespace Fab2ApprovalSystem;
|
||||||
{
|
|
||||||
public partial class Startup
|
|
||||||
{
|
|
||||||
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
|
|
||||||
public void ConfigureAuth(IAppBuilder app)
|
|
||||||
{
|
|
||||||
// Enable the application to use a cookie to store information for the signed in user
|
|
||||||
app.UseCookieAuthentication(new CookieAuthenticationOptions
|
|
||||||
{
|
|
||||||
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
|
||||||
LoginPath = new PathString("/Account/Login")
|
|
||||||
});
|
|
||||||
// Use a cookie to temporarily store information about a user logging in with a third party login provider
|
|
||||||
app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
|
|
||||||
|
|
||||||
// Uncomment the following lines to enable logging in with third party login providers
|
public partial class Startup {
|
||||||
//app.UseMicrosoftAccountAuthentication(
|
// For more information on configuring authentication, please visit http://go.microsoft.com/fwlink/?LinkId=301864
|
||||||
// clientId: "",
|
public void ConfigureAuth(IAppBuilder app) {
|
||||||
// clientSecret: "");
|
// Enable the application to use a cookie to store information for the signed in user
|
||||||
|
app.UseCookieAuthentication(new CookieAuthenticationOptions {
|
||||||
//app.UseTwitterAuthentication(
|
AuthenticationType = DefaultAuthenticationTypes.ApplicationCookie,
|
||||||
// consumerKey: "",
|
LoginPath = new PathString("/Account/Login")
|
||||||
// consumerSecret: "");
|
});
|
||||||
|
// Use a cookie to temporarily store information about a user logging in with a third party login provider
|
||||||
//app.UseFacebookAuthentication(
|
// app.UseExternalSignInCookie(DefaultAuthenticationTypes.ExternalCookie);
|
||||||
// appId: "",
|
|
||||||
// appSecret: "");
|
|
||||||
|
|
||||||
//app.UseGoogleAuthentication();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,21 +1,17 @@
|
|||||||
using System;
|
using System.Web.Http;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web.Http;
|
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem
|
namespace Fab2ApprovalSystem;
|
||||||
{
|
|
||||||
public static class WebApiConfig
|
|
||||||
{
|
|
||||||
public static void Register(HttpConfiguration config)
|
|
||||||
{
|
|
||||||
config.MapHttpAttributeRoutes();
|
|
||||||
|
|
||||||
config.Routes.MapHttpRoute(
|
public static class WebApiConfig {
|
||||||
name: "DefaultApi",
|
public static void Register(HttpConfiguration config) {
|
||||||
routeTemplate: "api/{controller}/{id}",
|
config.MapHttpAttributeRoutes();
|
||||||
defaults: new { id = RouteParameter.Optional }
|
|
||||||
);
|
#if !NET8
|
||||||
}
|
config.Routes.MapHttpRoute(
|
||||||
|
name: "DefaultApi",
|
||||||
|
routeTemplate: "api/{controller}/{id}",
|
||||||
|
defaults: new { id = RouteParameter.Optional }
|
||||||
|
);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,18 +1,19 @@
|
|||||||
/*vertical height between form-groups*/
|
/*vertical height between form-groups*/
|
||||||
.my-form .form-group {
|
.my-form .form-group {
|
||||||
margin-bottom: 4px;
|
margin-bottom: 4px;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width:768px) {
|
||||||
|
.my-form .row {
|
||||||
|
margin-left: -1px;
|
||||||
|
margin-right: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width:768px) {
|
.my-form [class*="col-"] {
|
||||||
.my-form .row {
|
padding: 0 2px;
|
||||||
margin-left: -1px;
|
|
||||||
margin-right: -1px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.my-form [class*="col-"] {
|
|
||||||
padding: 0 2px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
padding-top: 50px;
|
padding-top: 50px;
|
||||||
padding-bottom: 20px;
|
padding-bottom: 20px;
|
||||||
@ -29,12 +30,12 @@ body {
|
|||||||
/*input,
|
/*input,
|
||||||
select
|
select
|
||||||
{
|
{
|
||||||
max-width: 280px;
|
max-width: 280px;
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
.row{
|
.row {
|
||||||
margin-top: 2px;
|
margin-top: 2px;
|
||||||
margin-bottom: 2px
|
margin-bottom: 2px
|
||||||
}
|
}
|
||||||
|
|
||||||
textarea {
|
textarea {
|
||||||
@ -68,28 +69,28 @@ input[type="checkbox"].input-validation-error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.navbar-inner {
|
.navbar-inner {
|
||||||
padding-left: 20px;
|
padding-left: 20px;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
background-color: #87b3de;
|
background-color: #87b3de;
|
||||||
background-image: -moz-linear-gradient(top,#87b3de, #4d79a5);
|
background-image: -moz-linear-gradient(top, #87b3de, #4d79a5);
|
||||||
background-image: -ms-linear-gradient(top,#87b3de, #4d79a5);
|
background-image: -ms-linear-gradient(top, #87b3de, #4d79a5);
|
||||||
background-image: -webkit-gradient(linear, 0 0, 0 50%, from( #87b3de), to(#4d79a5));
|
background-image: -webkit-gradient(linear, 0 0, 0 50%, from(#87b3de), to(#4d79a5));
|
||||||
background-image: -webkit-linear-gradient(top,#87b3de, #4d79a5);
|
background-image: -webkit-linear-gradient(top, #87b3de, #4d79a5);
|
||||||
background-image: -o-linear-gradient(top, #87b3de, #4d79a5);
|
background-image: -o-linear-gradient(top, #87b3de, #4d79a5);
|
||||||
background-image: linear-gradient(top, #87b3de, #4d79a5);
|
background-image: linear-gradient(top, #87b3de, #4d79a5);
|
||||||
background-repeat: repeat-x;
|
background-repeat: repeat-x;
|
||||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#87b3de', endColorstr='#4d79a5', GradientType=0);
|
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#87b3de', endColorstr='#4d79a5', GradientType=0);
|
||||||
-webkit-border-radius: 4px;
|
-webkit-border-radius: 4px;
|
||||||
-moz-border-radius: 4px;
|
-moz-border-radius: 4px;
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
-webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||||
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
-moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
|
||||||
}
|
}
|
||||||
|
|
||||||
.label-color {
|
.label-color {
|
||||||
background-color: #e5e0e0;
|
background-color: #e5e0e0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkbutton {
|
.linkbutton {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
@ -101,6 +102,17 @@ input[type="checkbox"].input-validation-error {
|
|||||||
border: 0;
|
border: 0;
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
.linkbutton.edit {
|
.linkbutton.edit {
|
||||||
background: url('/Content/icons/edit.gif');
|
background: url('/Content/icons/edit.gif');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modal-dialog {
|
||||||
|
margin-top: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.affix {
|
||||||
|
position: fixed;
|
||||||
|
top: 55px;
|
||||||
|
left: 25px;
|
||||||
|
}
|
31
Fab2ApprovalSystem/Controllers/.editorconfig
Normal file
31
Fab2ApprovalSystem/Controllers/.editorconfig
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
|
||||||
|
#### .NET Coding Conventions ####
|
||||||
|
|
||||||
|
# Organize usings
|
||||||
|
dotnet_separate_import_directive_groups = true
|
||||||
|
dotnet_sort_system_directives_first = true
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
|
||||||
|
csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
|
||||||
|
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
|
||||||
|
csharp_style_allow_embedded_statements_on_same_line_experimental = true
|
||||||
|
|
||||||
|
#### C# Formatting Rules ####
|
||||||
|
|
||||||
|
# New line preferences
|
||||||
|
csharp_new_line_before_catch = false
|
||||||
|
csharp_new_line_before_else = false
|
||||||
|
csharp_new_line_before_finally = false
|
||||||
|
csharp_new_line_before_members_in_anonymous_types = true
|
||||||
|
csharp_new_line_before_members_in_object_initializers = true
|
||||||
|
csharp_new_line_before_open_brace = none
|
||||||
|
csharp_new_line_between_query_expression_clauses = true
|
||||||
|
|
||||||
|
####
|
||||||
|
|
||||||
|
insert_final_newline = false
|
||||||
|
csharp_style_namespace_declarations = file_scoped:warning
|
||||||
|
dotnet_diagnostic.IDE0161.severity = warning # Question - Namespace declaration preferences
|
||||||
|
dotnet_diagnostic.IDE2000.severity = error # IDE2000: Allow multiple blank lines
|
@ -1,532 +1,401 @@
|
|||||||
using System;
|
#if !NET8
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Security.Claims;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
using System.Web.Security;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
using Fab2ApprovalSystem.DMO;
|
||||||
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
using Microsoft.AspNet.Identity;
|
using Microsoft.AspNet.Identity;
|
||||||
using Microsoft.AspNet.Identity.EntityFramework;
|
using Microsoft.AspNet.Identity.EntityFramework;
|
||||||
|
using Microsoft.AspNet.Identity.Owin;
|
||||||
using Microsoft.Owin.Security;
|
using Microsoft.Owin.Security;
|
||||||
using Fab2ApprovalSystem.Models;
|
#endif
|
||||||
using System.Web.Security;
|
|
||||||
using Fab2ApprovalSystem.Misc;
|
|
||||||
using Fab2ApprovalSystem.DMO;
|
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.Controllers
|
#if !NET8
|
||||||
{
|
using System;
|
||||||
[Authorize]
|
using System.Collections.Generic;
|
||||||
public class AccountController : Controller
|
using System.Net;
|
||||||
{
|
using System.Net.Http;
|
||||||
public AccountController()
|
using System.Security.Claims;
|
||||||
: this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext())))
|
using System.Threading.Tasks;
|
||||||
{
|
using Newtonsoft.Json;
|
||||||
}
|
#endif
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
|
|
||||||
public AccountController(UserManager<ApplicationUser> userManager)
|
[Authorize]
|
||||||
{
|
#if NET8
|
||||||
UserManager = userManager;
|
[Route("[controller]")]
|
||||||
}
|
#endif
|
||||||
|
public class AccountController : Controller {
|
||||||
|
|
||||||
public UserManager<ApplicationUser> UserManager { get; private set; }
|
#if !NET8
|
||||||
|
|
||||||
//
|
public AccountController()
|
||||||
// GET: /Account/Login
|
: this(new UserManager<ApplicationUser>(new UserStore<ApplicationUser>(new ApplicationDbContext()))) {
|
||||||
[AllowAnonymous]
|
}
|
||||||
// try to make the browser refresh the login page every time, to prevent issues with changing usernames and the anti-forgery token validation
|
|
||||||
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
|
|
||||||
public ActionResult Login(string returnUrl)
|
|
||||||
{
|
|
||||||
ViewBag.ReturnUrl = returnUrl;
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
public AccountController(UserManager<ApplicationUser> userManager) {
|
||||||
[AllowAnonymous]
|
UserManager = userManager;
|
||||||
[ValidateAntiForgeryToken]
|
}
|
||||||
public ActionResult Login(LoginModel model, string returnUrl)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
//if (ModelState.IsValid && WebSecurity.Login(model.UserName, model.Password, persistCookie: model.RememberMe))
|
|
||||||
//{
|
|
||||||
// return RedirectToLocal(returnUrl);
|
|
||||||
//}
|
|
||||||
|
|
||||||
UserAccountDMO userDMO = new UserAccountDMO();
|
public UserManager<ApplicationUser> UserManager { get; private set; }
|
||||||
bool isLoginValid;
|
|
||||||
MembershipProvider domainProvider;
|
|
||||||
|
|
||||||
#if(DEBUG)
|
#endif
|
||||||
isLoginValid = true;
|
|
||||||
|
#if !NET8
|
||||||
|
// GET: /Account/Login
|
||||||
|
[AllowAnonymous]
|
||||||
|
// try to make the browser refresh the login page every time, to prevent issues with changing usernames and the anti-forgery token validation
|
||||||
|
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "*")]
|
||||||
|
#endif
|
||||||
|
public ActionResult Login(string returnUrl) {
|
||||||
|
ViewBag.ReturnUrl = returnUrl;
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private void SetSessionParameters(LoginResult loginResult, LoginModel user) {
|
||||||
|
GlobalVars.SetSessionParameters(GetSession(), loginResult, user);
|
||||||
|
|
||||||
|
FormsAuthentication.SetAuthCookie(user.LoginID, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public async Task<ActionResult> Login(LoginModel model, string returnUrl) {
|
||||||
|
try {
|
||||||
|
bool isLoginValid;
|
||||||
|
|
||||||
|
HttpClient httpClient = HttpClientFactory.Create();
|
||||||
|
httpClient.BaseAddress = new Uri(GlobalVars.AppSettings.ApiBaseUrl);
|
||||||
|
|
||||||
|
LoginResult loginResult = await AccountDMO.LoginAsync(httpClient, model);
|
||||||
|
|
||||||
|
#if (DEBUG)
|
||||||
|
isLoginValid = true;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
#if (!DEBUG)
|
#if (!DEBUG)
|
||||||
|
|
||||||
bool isIFX = false;
|
bool isIFX = false;
|
||||||
//domainProvider = Membership.Providers["NA_ADMembershipProvider"];
|
if (GlobalVars.DBConnection.ToUpper() == "TEST" || GlobalVars.DBConnection.ToUpper() == "QUALITY") {
|
||||||
//isLoginValid = domainProvider.ValidateUser(model.LoginID, model.Password);
|
isLoginValid = true;
|
||||||
|
} else {
|
||||||
if (GlobalVars.DBConnection.ToUpper() == "TEST" || GlobalVars.DBConnection.ToUpper() == "QUALITY")
|
isLoginValid = loginResult.IsAuthenticated;
|
||||||
isLoginValid = true;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
isLoginValid = Functions.NA_ADAuthenticate(model.LoginID, model.Password);
|
|
||||||
if (!isLoginValid)
|
|
||||||
{
|
|
||||||
isLoginValid = Functions.IFX_ADAuthenticate(model.LoginID, model.Password);
|
|
||||||
isIFX = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (isLoginValid)
|
if (isLoginValid)
|
||||||
{
|
isIFX = true;
|
||||||
//Check ITAR Permissions from AD group
|
|
||||||
#if(!DEBUG)
|
|
||||||
try
|
|
||||||
{
|
|
||||||
|
|
||||||
bool hasITARAccess = false;
|
}
|
||||||
|
|
||||||
//========TEMP CODE - NEEDS TO BE DELETED
|
|
||||||
//Functions.WriteEvent("Using DB for EC Auth for user " + model.LoginID, System.Diagnostics.EventLogEntryType.Information);
|
|
||||||
//hasITARAccess = userDMO.GetEC_AD_Users(model.LoginID);
|
|
||||||
//=============END OF TEMP CODE
|
|
||||||
|
|
||||||
|
|
||||||
if (GlobalVars.DBConnection.ToUpper() == "TEST" || GlobalVars.DBConnection.ToUpper() == "QUALITY")
|
|
||||||
{
|
|
||||||
hasITARAccess = true;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
hasITARAccess = Functions.NA_HasITARAccess(model.LoginID, model.Password);
|
|
||||||
if (!hasITARAccess) // check the IFX domain
|
|
||||||
hasITARAccess = Functions.IFX_HasITARAccess(model.LoginID, model.Password);
|
|
||||||
}
|
|
||||||
userDMO.UpdateInsertITARAccess(model.LoginID, hasITARAccess ? "1" : "0");
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
ModelState.AddModelError("", "Not a member of the EC Domain" + ex.Message);
|
|
||||||
return View(model);
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LoginModel user = userDMO.GetUser(model.LoginID);
|
if (isLoginValid) {
|
||||||
if (user != null)
|
UserAccountDMO userDMO = new UserAccountDMO();
|
||||||
{
|
LoginModel user = userDMO.GetUser(model.LoginID);
|
||||||
Session[GlobalVars.SESSION_USERID] = user.UserID;
|
if (user != null) {
|
||||||
Session[GlobalVars.SESSION_USERNAME] = user.FullName;
|
SetSessionParameters(loginResult, user);
|
||||||
Session[GlobalVars.IS_ADMIN] = user.IsAdmin;
|
|
||||||
Session[GlobalVars.IS_MANAGER] = user.IsManager;
|
|
||||||
Session[GlobalVars.OOO] = user.OOO;
|
|
||||||
Session[GlobalVars.CAN_CREATE_PARTS_REQUEST] = user.IsAdmin || PartsRequestController.CanCreatePartsRequest(user.UserID);
|
|
||||||
|
|
||||||
FormsAuthentication.SetAuthCookie(user.LoginID, true);
|
|
||||||
return RedirectToLocal(returnUrl);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ModelState.AddModelError("", "The user name does not exist in the DB. Please contact the System Admin");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return RedirectToLocal(returnUrl);
|
||||||
|
} else {
|
||||||
|
ModelState.AddModelError("", "The user name does not exist in the DB. Please contact the System Admin");
|
||||||
}
|
}
|
||||||
else
|
} else {
|
||||||
{
|
ModelState.AddModelError("", "The user name or password provided is incorrect.");
|
||||||
ModelState.AddModelError("", "The user name or password provided is incorrect.");
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Functions.WriteEvent(GlobalVars.AppSettings, GetUserIdentityName() + " " + ex.InnerException, System.Diagnostics.EventLogEntryType.Error);
|
||||||
|
EventLogDMO.Add(new WinEventLog() { IssueID = 99999, UserID = GetUserIdentityName(), DocumentType = "Login", OperationType = "Error", Comments = "Reject - " + ex.Message });
|
||||||
|
ModelState.AddModelError("", ex.Message);
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(model);
|
||||||
|
// If we got this far, something failed, redisplay form
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[AllowAnonymous]
|
||||||
|
public async Task<HttpResponseMessage> ExternalAuthSetup(AuthAttempt authAttempt) {
|
||||||
|
try {
|
||||||
|
bool isLoginValid;
|
||||||
|
|
||||||
|
HttpClient httpClient = HttpClientFactory.Create();
|
||||||
|
httpClient.BaseAddress = new Uri(GlobalVars.AppSettings.ApiBaseUrl);
|
||||||
|
|
||||||
|
LoginResult loginResult = await AccountDMO.ExternalAuthSetupAsync(httpClient, authAttempt);
|
||||||
|
|
||||||
|
#if (DEBUG)
|
||||||
|
isLoginValid = true;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
#if (!DEBUG)
|
||||||
|
|
||||||
|
bool isIFX = false;
|
||||||
|
if (GlobalVars.DBConnection.ToUpper() == "TEST" || GlobalVars.DBConnection.ToUpper() == "QUALITY") {
|
||||||
|
isLoginValid = true;
|
||||||
|
} else {
|
||||||
|
isLoginValid = loginResult.IsAuthenticated;
|
||||||
|
if (isLoginValid)
|
||||||
|
isIFX = true;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (isLoginValid) {
|
||||||
|
UserAccountDMO userDMO = new UserAccountDMO();
|
||||||
|
LoginModel user = userDMO.GetUser(authAttempt.LoginID);
|
||||||
|
if (user != null) {
|
||||||
|
SetSessionParameters(loginResult, user);
|
||||||
|
|
||||||
|
return new HttpResponseMessage(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
ModelState.AddModelError("", "The user name does not exist in the DB. Please contact the System Admin");
|
||||||
|
|
||||||
|
return new HttpResponseMessage(HttpStatusCode.NotFound);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
ModelState.AddModelError("", "The user name or password provided is incorrect.");
|
||||||
|
|
||||||
|
return new HttpResponseMessage(HttpStatusCode.Unauthorized);
|
||||||
}
|
}
|
||||||
|
} catch (Exception ex) {
|
||||||
|
Functions.WriteEvent(GlobalVars.AppSettings, GetUserIdentityName() + " " + ex.InnerException, System.Diagnostics.EventLogEntryType.Error);
|
||||||
|
EventLogDMO.Add(new WinEventLog() { IssueID = 99999, UserID = GetUserIdentityName(), DocumentType = "Login", OperationType = "Error", Comments = "Reject - " + ex.Message });
|
||||||
|
ModelState.AddModelError("", ex.Message);
|
||||||
|
|
||||||
catch (Exception ex)
|
return new HttpResponseMessage(HttpStatusCode.InternalServerError);
|
||||||
{
|
|
||||||
Functions.WriteEvent(@User.Identity.Name + " " + ex.InnerException , System.Diagnostics.EventLogEntryType.Error);
|
|
||||||
EventLogDMO.Add(new WinEventLog() { IssueID = 99999, UserID = @User.Identity.Name, DocumentType = "Login", OperationType = "Error", Comments = "Reject - " + ex.Message });
|
|
||||||
ModelState.AddModelError("", ex.Message);
|
|
||||||
}
|
|
||||||
|
|
||||||
return View(model);
|
|
||||||
// If we got this far, something failed, redisplay form
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
////
|
#endif
|
||||||
//// POST: /Account/Login
|
|
||||||
//[HttpPost]
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[ValidateAntiForgeryToken]
|
|
||||||
//public async Task<ActionResult> Login(LoginViewModel model, string returnUrl)
|
|
||||||
//{
|
|
||||||
// if (ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// var user = await UserManager.FindAsync(model.UserName, model.Password);
|
|
||||||
// if (user != null)
|
|
||||||
// {
|
|
||||||
// await SignInAsync(user, model.RememberMe);
|
|
||||||
// return RedirectToLocal(returnUrl);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// ModelState.AddModelError("", "Invalid username or password.");
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // If we got this far, something failed, redisplay form
|
// GET: /Account/Register
|
||||||
// return View(model);
|
[AllowAnonymous]
|
||||||
//}
|
public ActionResult Register() {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
//
|
#if !NET8
|
||||||
// GET: /Account/Register
|
|
||||||
[AllowAnonymous]
|
// POST: /Account/Disassociate
|
||||||
public ActionResult Register()
|
[HttpPost]
|
||||||
{
|
[ValidateAntiForgeryToken]
|
||||||
return View();
|
public async Task<ActionResult> Disassociate(string loginProvider, string providerKey) {
|
||||||
|
ManageMessageId? message = null;
|
||||||
|
IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
|
||||||
|
if (result.Succeeded) {
|
||||||
|
message = ManageMessageId.RemoveLoginSuccess;
|
||||||
|
} else {
|
||||||
|
message = ManageMessageId.Error;
|
||||||
}
|
}
|
||||||
|
return RedirectToAction("Manage", new { Message = message });
|
||||||
|
}
|
||||||
|
|
||||||
//
|
#endif
|
||||||
// POST: /Account/Register
|
|
||||||
//[HttpPost]
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[ValidateAntiForgeryToken]
|
|
||||||
//public async Task<ActionResult> Register(RegisterViewModel model)
|
|
||||||
//{
|
|
||||||
// if (ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// var user = new ApplicationUser() { UserName = model.UserName };
|
|
||||||
// var result = await UserManager.CreateAsync(user, model.Password);
|
|
||||||
// if (result.Succeeded)
|
|
||||||
// {
|
|
||||||
// await SignInAsync(user, isPersistent: false);
|
|
||||||
// return RedirectToAction("Index", "Home");
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// AddErrors(result);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // If we got this far, something failed, redisplay form
|
// GET: /Account/Manage
|
||||||
// return View(model);
|
#pragma warning disable IDE0060 // Remove unused parameter
|
||||||
//}
|
public ActionResult Manage(ManageMessageId? message) {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
#pragma warning restore IDE0060 // Remove unused parameter
|
||||||
|
|
||||||
//
|
#if !NET8
|
||||||
// POST: /Account/Disassociate
|
|
||||||
[HttpPost]
|
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
public async Task<ActionResult> Disassociate(string loginProvider, string providerKey)
|
|
||||||
{
|
|
||||||
ManageMessageId? message = null;
|
|
||||||
IdentityResult result = await UserManager.RemoveLoginAsync(User.Identity.GetUserId(), new UserLoginInfo(loginProvider, providerKey));
|
|
||||||
if (result.Succeeded)
|
|
||||||
{
|
|
||||||
message = ManageMessageId.RemoveLoginSuccess;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
message = ManageMessageId.Error;
|
|
||||||
}
|
|
||||||
return RedirectToAction("Manage", new { Message = message });
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
// POST: /Account/ExternalLogin
|
||||||
// GET: /Account/Manage
|
[HttpPost]
|
||||||
public ActionResult Manage(ManageMessageId? message)
|
[AllowAnonymous]
|
||||||
{
|
[ValidateAntiForgeryToken]
|
||||||
//ViewBag.StatusMessage =
|
public ActionResult ExternalLogin(string provider, string returnUrl) {
|
||||||
// message == ManageMessageId.ChangePasswordSuccess ? "Your password has been changed."
|
// Request a redirect to the external login provider
|
||||||
// : message == ManageMessageId.SetPasswordSuccess ? "Your password has been set."
|
return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
|
||||||
// : message == ManageMessageId.RemoveLoginSuccess ? "The external login was removed."
|
}
|
||||||
// : message == ManageMessageId.Error ? "An error has occurred."
|
|
||||||
// : "";
|
|
||||||
//ViewBag.HasLocalPassword = HasPassword();
|
|
||||||
//ViewBag.ReturnUrl = Url.Action("Manage");
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
////
|
// POST: /Account/LinkLogin
|
||||||
//// POST: /Account/Manage
|
[HttpPost]
|
||||||
//[HttpPost]
|
[ValidateAntiForgeryToken]
|
||||||
//[ValidateAntiForgeryToken]
|
public ActionResult LinkLogin(string provider) {
|
||||||
//public async Task<ActionResult> Manage(ManageUserViewModel model)
|
// Request a redirect to the external login provider to link a login for the current user
|
||||||
//{
|
return new ChallengeResult(provider, Url.Action("LinkLoginCallback", "Account"), User.Identity.GetUserId());
|
||||||
// bool hasPassword = HasPassword();
|
}
|
||||||
// ViewBag.HasLocalPassword = hasPassword;
|
|
||||||
// ViewBag.ReturnUrl = Url.Action("Manage");
|
|
||||||
// if (hasPassword)
|
|
||||||
// {
|
|
||||||
// if (ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// IdentityResult result = await UserManager.ChangePasswordAsync(User.Identity.GetUserId(), model.OldPassword, model.NewPassword);
|
|
||||||
// if (result.Succeeded)
|
|
||||||
// {
|
|
||||||
// return RedirectToAction("Manage", new { Message = ManageMessageId.ChangePasswordSuccess });
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// AddErrors(result);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// // User does not have a password so remove any validation errors caused by a missing OldPassword field
|
|
||||||
// ModelState state = ModelState["OldPassword"];
|
|
||||||
// if (state != null)
|
|
||||||
// {
|
|
||||||
// state.Errors.Clear();
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (ModelState.IsValid)
|
// GET: /Account/LinkLoginCallback
|
||||||
// {
|
public async Task<ActionResult> LinkLoginCallback() {
|
||||||
// IdentityResult result = await UserManager.AddPasswordAsync(User.Identity.GetUserId(), model.NewPassword);
|
ExternalLoginInfo loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId());
|
||||||
// if (result.Succeeded)
|
if (loginInfo == null) {
|
||||||
// {
|
|
||||||
// return RedirectToAction("Manage", new { Message = ManageMessageId.SetPasswordSuccess });
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// AddErrors(result);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // If we got this far, something failed, redisplay form
|
|
||||||
// return View(model);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Account/ExternalLogin
|
|
||||||
[HttpPost]
|
|
||||||
[AllowAnonymous]
|
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
public ActionResult ExternalLogin(string provider, string returnUrl)
|
|
||||||
{
|
|
||||||
// Request a redirect to the external login provider
|
|
||||||
return new ChallengeResult(provider, Url.Action("ExternalLoginCallback", "Account", new { ReturnUrl = returnUrl }));
|
|
||||||
}
|
|
||||||
|
|
||||||
////
|
|
||||||
//// GET: /Account/ExternalLoginCallback
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//public async Task<ActionResult> ExternalLoginCallback(string returnUrl)
|
|
||||||
//{
|
|
||||||
// var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync();
|
|
||||||
// if (loginInfo == null)
|
|
||||||
// {
|
|
||||||
// return RedirectToAction("Login");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// // Sign in the user with this external login provider if the user already has a login
|
|
||||||
// var user = await UserManager.FindAsync(loginInfo.Login);
|
|
||||||
// if (user != null)
|
|
||||||
// {
|
|
||||||
// await SignInAsync(user, isPersistent: false);
|
|
||||||
// return RedirectToLocal(returnUrl);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// // If the user does not have an account, then prompt the user to create an account
|
|
||||||
// ViewBag.ReturnUrl = returnUrl;
|
|
||||||
// ViewBag.LoginProvider = loginInfo.Login.LoginProvider;
|
|
||||||
// return View("ExternalLoginConfirmation", new ExternalLoginConfirmationViewModel { UserName = loginInfo.DefaultUserName });
|
|
||||||
// }
|
|
||||||
//}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Account/LinkLogin
|
|
||||||
[HttpPost]
|
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
public ActionResult LinkLogin(string provider)
|
|
||||||
{
|
|
||||||
// Request a redirect to the external login provider to link a login for the current user
|
|
||||||
return new ChallengeResult(provider, Url.Action("LinkLoginCallback", "Account"), User.Identity.GetUserId());
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// GET: /Account/LinkLoginCallback
|
|
||||||
public async Task<ActionResult> LinkLoginCallback()
|
|
||||||
{
|
|
||||||
var loginInfo = await AuthenticationManager.GetExternalLoginInfoAsync(XsrfKey, User.Identity.GetUserId());
|
|
||||||
if (loginInfo == null)
|
|
||||||
{
|
|
||||||
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
|
|
||||||
}
|
|
||||||
var result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login);
|
|
||||||
if (result.Succeeded)
|
|
||||||
{
|
|
||||||
return RedirectToAction("Manage");
|
|
||||||
}
|
|
||||||
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
|
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
|
||||||
}
|
}
|
||||||
|
IdentityResult result = await UserManager.AddLoginAsync(User.Identity.GetUserId(), loginInfo.Login);
|
||||||
//
|
if (result.Succeeded) {
|
||||||
// POST: /Account/ExternalLoginConfirmation
|
return RedirectToAction("Manage");
|
||||||
//[HttpPost]
|
|
||||||
//[AllowAnonymous]
|
|
||||||
//[ValidateAntiForgeryToken]
|
|
||||||
//public async Task<ActionResult> ExternalLoginConfirmation(ExternalLoginConfirmationViewModel model, string returnUrl)
|
|
||||||
//{
|
|
||||||
// if (User.Identity.IsAuthenticated)
|
|
||||||
// {
|
|
||||||
// return RedirectToAction("Manage");
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if (ModelState.IsValid)
|
|
||||||
// {
|
|
||||||
// // Get the information about the user from the external login provider
|
|
||||||
// var info = await AuthenticationManager.GetExternalLoginInfoAsync();
|
|
||||||
// if (info == null)
|
|
||||||
// {
|
|
||||||
// return View("ExternalLoginFailure");
|
|
||||||
// }
|
|
||||||
// var user = new ApplicationUser() { UserName = model.UserName };
|
|
||||||
// var result = await UserManager.CreateAsync(user);
|
|
||||||
// if (result.Succeeded)
|
|
||||||
// {
|
|
||||||
// result = await UserManager.AddLoginAsync(user.Id, info.Login);
|
|
||||||
// if (result.Succeeded)
|
|
||||||
// {
|
|
||||||
// await SignInAsync(user, isPersistent: false);
|
|
||||||
// return RedirectToLocal(returnUrl);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// AddErrors(result);
|
|
||||||
// }
|
|
||||||
|
|
||||||
// ViewBag.ReturnUrl = returnUrl;
|
|
||||||
// return View(model);
|
|
||||||
//}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Account/LogOff
|
|
||||||
[HttpPost]
|
|
||||||
[ValidateAntiForgeryToken]
|
|
||||||
public ActionResult LogOff()
|
|
||||||
{
|
|
||||||
//AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
|
||||||
//AuthenticationManager.SignOut();
|
|
||||||
FormsAuthentication.SignOut();
|
|
||||||
return RedirectToAction("Login", "Account");
|
|
||||||
}
|
}
|
||||||
|
return RedirectToAction("Manage", new { Message = ManageMessageId.Error });
|
||||||
//
|
|
||||||
// GET: /Account/ExternalLoginFailure
|
|
||||||
[AllowAnonymous]
|
|
||||||
public ActionResult ExternalLoginFailure()
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
[ChildActionOnly]
|
|
||||||
public ActionResult RemoveAccountList()
|
|
||||||
{
|
|
||||||
var linkedAccounts = UserManager.GetLogins(User.Identity.GetUserId());
|
|
||||||
ViewBag.ShowRemoveButton = HasPassword() || linkedAccounts.Count > 1;
|
|
||||||
return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
if (disposing && UserManager != null)
|
|
||||||
{
|
|
||||||
UserManager.Dispose();
|
|
||||||
UserManager = null;
|
|
||||||
}
|
|
||||||
base.Dispose(disposing);
|
|
||||||
}
|
|
||||||
|
|
||||||
#region Helpers
|
|
||||||
// Used for XSRF protection when adding external logins
|
|
||||||
private const string XsrfKey = "XsrfId";
|
|
||||||
|
|
||||||
private IAuthenticationManager AuthenticationManager
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return HttpContext.GetOwinContext().Authentication;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private async Task SignInAsync(ApplicationUser user, bool isPersistent)
|
|
||||||
{
|
|
||||||
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
|
||||||
var identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
|
|
||||||
AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void AddErrors(IdentityResult result)
|
|
||||||
{
|
|
||||||
foreach (var error in result.Errors)
|
|
||||||
{
|
|
||||||
ModelState.AddModelError("", error);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool HasPassword()
|
|
||||||
{
|
|
||||||
var user = UserManager.FindById(User.Identity.GetUserId());
|
|
||||||
if (user != null)
|
|
||||||
{
|
|
||||||
return user.PasswordHash != null;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
public enum ManageMessageId
|
|
||||||
{
|
|
||||||
ChangePasswordSuccess,
|
|
||||||
SetPasswordSuccess,
|
|
||||||
RemoveLoginSuccess,
|
|
||||||
Error
|
|
||||||
}
|
|
||||||
|
|
||||||
private ActionResult RedirectToLocal(string returnUrl)
|
|
||||||
{
|
|
||||||
if (Url.IsLocalUrl(returnUrl))
|
|
||||||
{
|
|
||||||
return Redirect(returnUrl);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
|
|
||||||
//return RedirectToAction("HierarchicalDataTest", "Home");
|
|
||||||
|
|
||||||
return RedirectToAction("MyTasks", "Home");
|
|
||||||
//return RedirectToAction("Index", "Home", new { tabName = "MyTasks"});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private class ChallengeResult : HttpUnauthorizedResult
|
|
||||||
{
|
|
||||||
public ChallengeResult(string provider, string redirectUri) : this(provider, redirectUri, null)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public ChallengeResult(string provider, string redirectUri, string userId)
|
|
||||||
{
|
|
||||||
LoginProvider = provider;
|
|
||||||
RedirectUri = redirectUri;
|
|
||||||
UserId = userId;
|
|
||||||
}
|
|
||||||
|
|
||||||
public string LoginProvider { get; set; }
|
|
||||||
public string RedirectUri { get; set; }
|
|
||||||
public string UserId { get; set; }
|
|
||||||
|
|
||||||
public override void ExecuteResult(ControllerContext context)
|
|
||||||
{
|
|
||||||
var properties = new AuthenticationProperties() { RedirectUri = RedirectUri };
|
|
||||||
if (UserId != null)
|
|
||||||
{
|
|
||||||
properties.Dictionary[XsrfKey] = UserId;
|
|
||||||
}
|
|
||||||
context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
[ValidateAntiForgeryToken]
|
||||||
|
public ActionResult LogOff() {
|
||||||
|
FormsAuthentication.SignOut();
|
||||||
|
return RedirectToAction("Login", "Account");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[AllowAnonymous]
|
||||||
|
public ActionResult ExternalLoginFailure() {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
[ChildActionOnly]
|
||||||
|
public ActionResult RemoveAccountList() {
|
||||||
|
IList<UserLoginInfo> linkedAccounts = UserManager.GetLogins(User.Identity.GetUserId());
|
||||||
|
ViewBag.ShowRemoveButton = HasPassword() || linkedAccounts.Count > 1;
|
||||||
|
return (ActionResult)PartialView("_RemoveAccountPartial", linkedAccounts);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing) {
|
||||||
|
if (disposing && UserManager != null) {
|
||||||
|
UserManager.Dispose();
|
||||||
|
UserManager = null;
|
||||||
|
}
|
||||||
|
base.Dispose(disposing);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#region Helpers
|
||||||
|
// Used for XSRF protection when adding external logins
|
||||||
|
private const string XsrfKey = "XsrfId";
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private IAuthenticationManager AuthenticationManager {
|
||||||
|
get {
|
||||||
|
return HttpContext.GetOwinContext().Authentication;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private async Task SignInAsync(ApplicationUser user, bool isPersistent) {
|
||||||
|
AuthenticationManager.SignOut(DefaultAuthenticationTypes.ExternalCookie);
|
||||||
|
ClaimsIdentity identity = await UserManager.CreateIdentityAsync(user, DefaultAuthenticationTypes.ApplicationCookie);
|
||||||
|
AuthenticationManager.SignIn(new AuthenticationProperties() { IsPersistent = isPersistent }, identity);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void AddErrors(IdentityResult result) {
|
||||||
|
foreach (string error in result.Errors) {
|
||||||
|
ModelState.AddModelError("", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private bool HasPassword() {
|
||||||
|
ApplicationUser user = UserManager.FindById(User.Identity.GetUserId());
|
||||||
|
if (user != null) {
|
||||||
|
return user.PasswordHash != null;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public enum ManageMessageId {
|
||||||
|
ChangePasswordSuccess,
|
||||||
|
SetPasswordSuccess,
|
||||||
|
RemoveLoginSuccess,
|
||||||
|
Error
|
||||||
|
}
|
||||||
|
|
||||||
|
private ActionResult RedirectToLocal(string returnUrl) {
|
||||||
|
if (Url.IsLocalUrl(returnUrl)) {
|
||||||
|
return Redirect(returnUrl);
|
||||||
|
} else {
|
||||||
|
return RedirectToAction("MyTasks", "Home");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private class ChallengeResult : HttpUnauthorizedResult {
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private class ChallengeResult {
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public ChallengeResult(string provider, string redirectUri) : this(provider, redirectUri, null) {
|
||||||
|
}
|
||||||
|
|
||||||
|
public ChallengeResult(string provider, string redirectUri, string userId) {
|
||||||
|
LoginProvider = provider;
|
||||||
|
RedirectUri = redirectUri;
|
||||||
|
UserId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public string LoginProvider { get; set; }
|
||||||
|
public string RedirectUri { get; set; }
|
||||||
|
public string UserId { get; set; }
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
public override void ExecuteResult(ControllerContext context) {
|
||||||
|
AuthenticationProperties properties = new AuthenticationProperties() { RedirectUri = RedirectUri };
|
||||||
|
if (UserId != null) {
|
||||||
|
properties.Dictionary[XsrfKey] = UserId;
|
||||||
|
}
|
||||||
|
context.HttpContext.GetOwinContext().Authentication.Challenge(properties, LoginProvider);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private System.Web.HttpSessionStateBase GetSession() =>
|
||||||
|
Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data, JsonRequestBehavior.AllowGet);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.IsAjaxRequest();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private Microsoft.AspNetCore.Http.ISession GetSession() =>
|
||||||
|
HttpContext.Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.Headers.TryGetValue("X-Requested-With", out Microsoft.Extensions.Primitives.StringValues strings) && strings[0] == "XMLHttpRequest";
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private string GetUserIdentityName() =>
|
||||||
|
@User.Identity.Name;
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,37 +1,75 @@
|
|||||||
using System;
|
#if !NET8
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
#endif
|
||||||
|
|
||||||
using Fab2ApprovalSystem.DMO;
|
using Fab2ApprovalSystem.DMO;
|
||||||
using Fab2ApprovalSystem.Misc;
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.Controllers
|
#if !NET8
|
||||||
{
|
using System;
|
||||||
[Authorize]
|
using System.Collections.Generic;
|
||||||
[SessionExpireFilter]
|
using System.Linq;
|
||||||
public class ManagerController : Controller
|
using Fab2ApprovalSystem.Models;
|
||||||
{
|
#endif
|
||||||
UserAccountDMO userDMO = new UserAccountDMO();
|
|
||||||
AdminDMO adminDMO = new AdminDMO();
|
|
||||||
TrainingDMO trainingDMO = new TrainingDMO();
|
|
||||||
LotDispositionDMO ldDMO = new LotDispositionDMO();
|
|
||||||
|
|
||||||
/// <summary>
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public ActionResult Index()
|
|
||||||
{
|
|
||||||
|
|
||||||
if ((bool)Session[GlobalVars.IS_MANAGER])
|
[Authorize]
|
||||||
{
|
#if !NET8
|
||||||
var model = userDMO.GetAllUsers();
|
[SessionExpireFilter]
|
||||||
ViewBag.AllActiveUsers = userDMO.GetAllActiveUsers();
|
#endif
|
||||||
return View(model);
|
#if NET8
|
||||||
}
|
[Route("[controller]")]
|
||||||
else
|
#endif
|
||||||
return Content("Not Autthorized");
|
public class ManagerController : Controller {
|
||||||
}
|
|
||||||
|
private readonly UserAccountDMO userDMO = new();
|
||||||
|
private readonly AdminDMO adminDMO = new();
|
||||||
|
private readonly TrainingDMO trainingDMO = new();
|
||||||
|
private readonly LotDispositionDMO ldDMO = new();
|
||||||
|
|
||||||
|
public ActionResult Index() {
|
||||||
|
if (GlobalVars.IsManager(GetSession())) {
|
||||||
|
var model = userDMO.GetAllUsers();
|
||||||
|
ViewBag.AllActiveUsers = userDMO.GetAllActiveUsers();
|
||||||
|
return View(model);
|
||||||
|
} else
|
||||||
|
return Content("Not Autthorized");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private System.Web.HttpSessionStateBase GetSession() =>
|
||||||
|
Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data, JsonRequestBehavior.AllowGet);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.IsAjaxRequest();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private Microsoft.AspNetCore.Http.ISession GetSession() =>
|
||||||
|
HttpContext.Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.Headers.TryGetValue("X-Requested-With", out Microsoft.Extensions.Primitives.StringValues strings) && strings[0] == "XMLHttpRequest";
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private string GetUserIdentityName() =>
|
||||||
|
@User.Identity.Name;
|
||||||
|
|
||||||
}
|
}
|
62
Fab2ApprovalSystem/Controllers/PCRBController.cs
Normal file
62
Fab2ApprovalSystem/Controllers/PCRBController.cs
Normal file
@ -0,0 +1,62 @@
|
|||||||
|
#if !NET8
|
||||||
|
using System;
|
||||||
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
|
|
||||||
|
[Authorize]
|
||||||
|
#if !NET8
|
||||||
|
[SessionExpireFilter]
|
||||||
|
#endif
|
||||||
|
#if NET8
|
||||||
|
[Route("[controller]")]
|
||||||
|
#endif
|
||||||
|
public class PCRBController : Controller {
|
||||||
|
public ActionResult Edit(int issueID) {
|
||||||
|
string jwt = GlobalVars.GetJWT(GetSession());
|
||||||
|
string encodedJwt = System.Net.WebUtility.UrlEncode(jwt);
|
||||||
|
string refreshToken = GlobalVars.GetRefreshToken(GetSession());
|
||||||
|
string encodedRefreshToken = System.Net.WebUtility.UrlEncode(refreshToken);
|
||||||
|
string mrbUrl = $"{GlobalVars.AppSettings.WasmClientUrl}/redirect?jwt={encodedJwt}&refreshToken={encodedRefreshToken}&redirectPath=/pcrb/{issueID}";
|
||||||
|
|
||||||
|
return Redirect(mrbUrl);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private System.Web.HttpSessionStateBase GetSession() =>
|
||||||
|
Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data, JsonRequestBehavior.AllowGet);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.IsAjaxRequest();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private Microsoft.AspNetCore.Http.ISession GetSession() =>
|
||||||
|
HttpContext.Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.Headers.TryGetValue("X-Requested-With", out Microsoft.Extensions.Primitives.StringValues strings) && strings[0] == "XMLHttpRequest";
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private string GetUserIdentityName() =>
|
||||||
|
@User.Identity.Name;
|
||||||
|
|
||||||
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,221 +1,244 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
#if !NET8
|
||||||
using System.Web;
|
using System.Web;
|
||||||
using System.Web.Mvc;
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
using Microsoft.AspNetCore.Authorization;
|
||||||
|
#endif
|
||||||
|
|
||||||
using Fab2ApprovalSystem.DMO;
|
using Fab2ApprovalSystem.DMO;
|
||||||
using Fab2ApprovalSystem.Misc;
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
using System.Collections.Generic;
|
||||||
using Fab2ApprovalSystem.ViewModels;
|
using Fab2ApprovalSystem.ViewModels;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.Controllers
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
{
|
|
||||||
[Authorize]
|
|
||||||
[SessionExpireFilter]
|
|
||||||
public class ReportsController : Controller
|
|
||||||
{
|
|
||||||
public const String specialNullString = "~NULL~";
|
|
||||||
|
|
||||||
// GET: Export
|
[Authorize]
|
||||||
public ActionResult Index()
|
#if !NET8
|
||||||
{
|
[SessionExpireFilter]
|
||||||
UserAccountDMO userDMO = new UserAccountDMO();
|
#endif
|
||||||
ViewBag.HasITARAccess = userDMO.GetITARAccess((int)Session[GlobalVars.SESSION_USERID]);
|
#if NET8
|
||||||
|
[Route("[controller]")]
|
||||||
|
#endif
|
||||||
|
public class ReportsController : Controller {
|
||||||
|
|
||||||
return View();
|
public const string specialNullString = "~NULL~";
|
||||||
}
|
private readonly AppSettings? _AppSettings = GlobalVars.AppSettings;
|
||||||
|
|
||||||
public ActionResult Report(String id, String docType = "")
|
// GET: Export
|
||||||
{
|
public ActionResult Index() {
|
||||||
if (String.IsNullOrEmpty(id))
|
UserAccountDMO userDMO = new();
|
||||||
return RedirectToAction("Index");
|
ViewBag.HasITARAccess = userDMO.GetITARAccess(GlobalVars.GetUserId(GetSession()));
|
||||||
|
|
||||||
UserAccountDMO userDMO = new UserAccountDMO();
|
|
||||||
if (!userDMO.GetITARAccess((int)Session[GlobalVars.SESSION_USERID]))
|
|
||||||
return View("UnAuthorizedAccess");
|
|
||||||
|
|
||||||
var m = new ReportViewModel();
|
|
||||||
var reports = GetReportList(docType);
|
|
||||||
foreach (var report in reports)
|
|
||||||
{
|
|
||||||
if (String.Equals(report.ReportID, id, StringComparison.OrdinalIgnoreCase))
|
|
||||||
{
|
|
||||||
m.ReportID = report.ReportID;
|
|
||||||
m.ReportName = report.Name;
|
|
||||||
m.Description = report.Description;
|
|
||||||
m.DocType = docType;
|
|
||||||
|
|
||||||
var c = SetupSSRSHelperClient();
|
|
||||||
|
|
||||||
m.Parameters = c.GetReportParameters(report.FullPath).Select(parm =>
|
|
||||||
{
|
|
||||||
var r = new ReportParameterViewModel();
|
|
||||||
r.Visible = (parm.PromptUser.HasValue == false || parm.PromptUser == true) && !String.IsNullOrEmpty(parm.Prompt);
|
|
||||||
r.Prompt = parm.Prompt;
|
|
||||||
r.Name = parm.Name;
|
|
||||||
r.HtmlID = "parm_" + parm.Name;
|
|
||||||
|
|
||||||
if (parm.MultiValue.HasValue && parm.MultiValue.Value)
|
|
||||||
r.ControlType = ParameterControlTypes.Multiselect;
|
|
||||||
else if ((parm.ValidValues != null) && (parm.ValidValues.Length > 0))
|
|
||||||
r.ControlType = ParameterControlTypes.Dropdown;
|
|
||||||
else if (parm.DataType.Equals("DateTime", StringComparison.OrdinalIgnoreCase))
|
|
||||||
r.ControlType = ParameterControlTypes.DatePicker;
|
|
||||||
else
|
|
||||||
r.ControlType = ParameterControlTypes.Textbox;
|
|
||||||
|
|
||||||
r.SelectList = null;
|
|
||||||
if (parm.ValidValues != null)
|
|
||||||
{
|
|
||||||
r.SelectList = parm.ValidValues.Select(vv => {
|
|
||||||
return new SelectListItem()
|
|
||||||
{
|
|
||||||
Text = vv.Value,
|
|
||||||
Value = (vv.Key == null ? specialNullString : vv.Key),
|
|
||||||
Selected = (parm.DefaultValues != null && parm.DefaultValues.Contains(vv.Key))
|
|
||||||
};
|
|
||||||
}).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
r.DefaultValue = "";
|
|
||||||
if (parm.DefaultValues != null && parm.DefaultValues.Length > 0)
|
|
||||||
r.DefaultValue = parm.DefaultValues[0];
|
|
||||||
|
|
||||||
return r;
|
|
||||||
|
|
||||||
}).ToArray();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return View(m);
|
|
||||||
}
|
|
||||||
|
|
||||||
public SSRSHelper.SSRSClient SetupSSRSHelperClient()
|
|
||||||
{
|
|
||||||
var useCfgForBindings = false;
|
|
||||||
if (String.Equals(System.Configuration.ConfigurationManager.AppSettings["SSRSBindingsByConfiguration"], "true", StringComparison.OrdinalIgnoreCase))
|
|
||||||
useCfgForBindings = true;
|
|
||||||
|
|
||||||
var c = new SSRSHelper.SSRSClient(
|
|
||||||
Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["SSRSBaseURL"]),
|
|
||||||
Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["SSRSDomain"]),
|
|
||||||
Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["SSRSUsername"]),
|
|
||||||
Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["SSRSPassword"]),
|
|
||||||
useCfgForBindings);
|
|
||||||
c.Initialize();
|
|
||||||
|
|
||||||
return c;
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerable<SSRSHelper.ReportInfo> GetReportList(String docType)
|
|
||||||
{
|
|
||||||
String folderName = Convert.ToString(System.Configuration.ConfigurationManager.AppSettings["SSRSFolder"]);
|
|
||||||
if (folderName.EndsWith("/"))
|
|
||||||
folderName = folderName.TrimEnd('/');
|
|
||||||
if (!String.IsNullOrWhiteSpace(docType))
|
|
||||||
folderName = folderName + "/" + docType;
|
|
||||||
|
|
||||||
var c = SetupSSRSHelperClient();
|
|
||||||
return c.ListReports(folderName);
|
|
||||||
}
|
|
||||||
|
|
||||||
public ActionResult GetReports(String docType)
|
|
||||||
{
|
|
||||||
var reports = GetReportList(docType);
|
|
||||||
|
|
||||||
return Json(new { Data =
|
|
||||||
reports.Select(r => new ReportViewModel()
|
|
||||||
{
|
|
||||||
ReportName = r.Name ?? "",
|
|
||||||
Description = r.Description ?? "",
|
|
||||||
ReportID = r.ReportID ?? "",
|
|
||||||
DocType = docType
|
|
||||||
})
|
|
||||||
},
|
|
||||||
JsonRequestBehavior.AllowGet);
|
|
||||||
}
|
|
||||||
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult ExportReport(String DocType, String ReportID)
|
|
||||||
{
|
|
||||||
var c = SetupSSRSHelperClient();
|
|
||||||
var reports = GetReportList(DocType);
|
|
||||||
|
|
||||||
var report = reports.Where(r => String.Equals(r.ReportID, ReportID, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
|
||||||
if (report == null)
|
|
||||||
return Content("Invalid report ID");
|
|
||||||
|
|
||||||
var reportParms = c.GetReportParameters(report.FullPath);
|
|
||||||
|
|
||||||
var parms = new SSRSHelper.ReportParameterCollection();
|
|
||||||
parms.Add("DocType", DocType);
|
|
||||||
parms.Add("UserID", Convert.ToString(Session[GlobalVars.SESSION_USERID]));
|
|
||||||
parms.Add("BaseURL", GlobalVars.hostURL);
|
|
||||||
|
|
||||||
foreach (var rp in reportParms)
|
|
||||||
{
|
|
||||||
if (rp.MultiValue.HasValue && rp.MultiValue.Value)
|
|
||||||
{
|
|
||||||
foreach (String v in Request.Params.GetValues("parm_" + rp.Name))
|
|
||||||
{
|
|
||||||
parms.Add(rp.Name, v);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
String value = null;
|
|
||||||
|
|
||||||
if (Request.Params.AllKeys.Contains("parm_" + rp.Name))
|
|
||||||
value = Request.Params.GetValues("parm_" + rp.Name).FirstOrDefault();
|
|
||||||
|
|
||||||
if (value == specialNullString)
|
|
||||||
value = null;
|
|
||||||
|
|
||||||
if ((rp.AllowBlank.HasValue == false || rp.AllowBlank.Value == false) && value == "")
|
|
||||||
value = null;
|
|
||||||
|
|
||||||
if (value == null)
|
|
||||||
{
|
|
||||||
if (rp.Nullable.HasValue == false || rp.Nullable.Value == false)
|
|
||||||
{
|
|
||||||
if (rp.DefaultValues != null && rp.DefaultValues.Length > 0)
|
|
||||||
value = rp.DefaultValues[0];
|
|
||||||
if (value == null)
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parms.Add(rp.Name, value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
var b = c.ExportReport(report.FullPath, @User.Identity.Name, parms, "EXCELOPENXML");
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var b2 = c.FreezeExcelHeaders(b);
|
|
||||||
return File(b2, "application/octet-stream", MakeFilename(report.Name) + ".xlsx");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
return File(b, "application/octet-stream", MakeFilename(report.Name) + ".xlsx");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected String MakeFilename(String reportName)
|
|
||||||
{
|
|
||||||
String r = "";
|
|
||||||
var invalidChars = System.IO.Path.GetInvalidFileNameChars();
|
|
||||||
foreach (char c in reportName)
|
|
||||||
{
|
|
||||||
if (invalidChars.Contains(c))
|
|
||||||
r += '_';
|
|
||||||
else
|
|
||||||
r += c;
|
|
||||||
}
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
public ActionResult Report(string id, string docType = "") {
|
||||||
|
if (string.IsNullOrEmpty(id))
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
|
||||||
|
UserAccountDMO userDMO = new();
|
||||||
|
if (!userDMO.GetITARAccess(GlobalVars.GetUserId(GetSession())))
|
||||||
|
return View("UnAuthorizedAccess");
|
||||||
|
|
||||||
|
ReportViewModel<SelectListItem> m = new();
|
||||||
|
var reports = GetReportList(docType);
|
||||||
|
foreach (var report in reports) {
|
||||||
|
if (string.Equals(report.ReportID, id, StringComparison.OrdinalIgnoreCase)) {
|
||||||
|
m.ReportID = report.ReportID;
|
||||||
|
m.ReportName = report.Name;
|
||||||
|
m.Description = report.Description;
|
||||||
|
m.DocType = docType;
|
||||||
|
|
||||||
|
var c = SetupSSRSHelperClient();
|
||||||
|
|
||||||
|
m.Parameters = c.GetReportParameters(report.FullPath).Select(parm => {
|
||||||
|
ReportParameterViewModel<SelectListItem> r = new();
|
||||||
|
r.Visible = (parm.PromptUser.HasValue == false || parm.PromptUser == true) && !string.IsNullOrEmpty(parm.Prompt);
|
||||||
|
r.Prompt = parm.Prompt;
|
||||||
|
r.Name = parm.Name;
|
||||||
|
r.HtmlID = "parm_" + parm.Name;
|
||||||
|
|
||||||
|
if (parm.MultiValue.HasValue && parm.MultiValue.Value)
|
||||||
|
r.ControlType = ParameterControlTypes.Multiselect;
|
||||||
|
else if ((parm.ValidValues != null) && (parm.ValidValues.Length > 0))
|
||||||
|
r.ControlType = ParameterControlTypes.Dropdown;
|
||||||
|
else if (parm.DataType.Equals("DateTime", StringComparison.OrdinalIgnoreCase))
|
||||||
|
r.ControlType = ParameterControlTypes.DatePicker;
|
||||||
|
else
|
||||||
|
r.ControlType = ParameterControlTypes.Textbox;
|
||||||
|
|
||||||
|
r.SelectList = null;
|
||||||
|
if (parm.ValidValues != null) {
|
||||||
|
r.SelectList = parm.ValidValues.Select(vv => {
|
||||||
|
return new SelectListItem() {
|
||||||
|
Text = vv.Value,
|
||||||
|
Value = (vv.Key == null ? specialNullString : vv.Key),
|
||||||
|
Selected = (parm.DefaultValues != null && parm.DefaultValues.Contains(vv.Key))
|
||||||
|
};
|
||||||
|
}).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
r.DefaultValue = "";
|
||||||
|
if (parm.DefaultValues != null && parm.DefaultValues.Length > 0)
|
||||||
|
r.DefaultValue = parm.DefaultValues[0];
|
||||||
|
|
||||||
|
return r;
|
||||||
|
|
||||||
|
}).ToArray();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return View(m);
|
||||||
|
}
|
||||||
|
|
||||||
|
public SSRSHelper.SSRSClient SetupSSRSHelperClient() {
|
||||||
|
var useCfgForBindings = false;
|
||||||
|
if (string.Equals(_AppSettings.SSRSBindingsByConfiguration, "true", StringComparison.OrdinalIgnoreCase))
|
||||||
|
useCfgForBindings = true;
|
||||||
|
|
||||||
|
var c = new SSRSHelper.SSRSClient(
|
||||||
|
Convert.ToString(_AppSettings.SSRSBaseURL),
|
||||||
|
Convert.ToString(_AppSettings.SSRSDomain),
|
||||||
|
Convert.ToString(_AppSettings.SSRSUsername),
|
||||||
|
Convert.ToString(_AppSettings.SSRSPassword),
|
||||||
|
useCfgForBindings);
|
||||||
|
c.Initialize();
|
||||||
|
|
||||||
|
return c;
|
||||||
|
}
|
||||||
|
|
||||||
|
private IEnumerable<SSRSHelper.ReportInfo> GetReportList(String docType) {
|
||||||
|
String folderName = Convert.ToString(_AppSettings.SSRSFolder);
|
||||||
|
if (folderName.EndsWith("/"))
|
||||||
|
folderName = folderName.TrimEnd('/');
|
||||||
|
if (!String.IsNullOrWhiteSpace(docType))
|
||||||
|
folderName = folderName + "/" + docType;
|
||||||
|
|
||||||
|
var c = SetupSSRSHelperClient();
|
||||||
|
return c.ListReports(folderName);
|
||||||
|
}
|
||||||
|
|
||||||
|
public ActionResult GetReports(string docType) {
|
||||||
|
var reports = GetReportList(docType);
|
||||||
|
|
||||||
|
return GetJsonResult(new {
|
||||||
|
Data =
|
||||||
|
reports.Select(r => new ReportViewModel<SelectListItem>() {
|
||||||
|
ReportName = r.Name ?? "",
|
||||||
|
Description = r.Description ?? "",
|
||||||
|
ReportID = r.ReportID ?? "",
|
||||||
|
DocType = docType
|
||||||
|
})
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult ExportReport(string DocType, string ReportID) {
|
||||||
|
var c = SetupSSRSHelperClient();
|
||||||
|
var reports = GetReportList(DocType);
|
||||||
|
|
||||||
|
var report = reports.Where(r => string.Equals(r.ReportID, ReportID, StringComparison.OrdinalIgnoreCase)).FirstOrDefault();
|
||||||
|
if (report == null)
|
||||||
|
return Content("Invalid report ID");
|
||||||
|
|
||||||
|
var reportParms = c.GetReportParameters(report.FullPath);
|
||||||
|
|
||||||
|
var parms = new SSRSHelper.ReportParameterCollection();
|
||||||
|
parms.Add("DocType", DocType);
|
||||||
|
parms.Add("UserID", GlobalVars.GetUserIdValue(GetSession()));
|
||||||
|
parms.Add("BaseURL", GlobalVars.hostURL);
|
||||||
|
|
||||||
|
foreach (var rp in reportParms) {
|
||||||
|
if (rp.MultiValue.HasValue && rp.MultiValue.Value) {
|
||||||
|
foreach (string v in Request.Params.GetValues("parm_" + rp.Name)) {
|
||||||
|
parms.Add(rp.Name, v);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
string value = null;
|
||||||
|
|
||||||
|
if (Request.Params.AllKeys.Contains("parm_" + rp.Name))
|
||||||
|
value = Request.Params.GetValues("parm_" + rp.Name).FirstOrDefault();
|
||||||
|
|
||||||
|
if (value == specialNullString)
|
||||||
|
value = null;
|
||||||
|
|
||||||
|
if ((rp.AllowBlank.HasValue == false || rp.AllowBlank.Value == false) && value == "")
|
||||||
|
value = null;
|
||||||
|
|
||||||
|
if (value == null) {
|
||||||
|
if (rp.Nullable.HasValue == false || rp.Nullable.Value == false) {
|
||||||
|
if (rp.DefaultValues != null && rp.DefaultValues.Length > 0)
|
||||||
|
value = rp.DefaultValues[0];
|
||||||
|
if (value == null)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
parms.Add(rp.Name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var b = c.ExportReport(report.FullPath, GetUserIdentityName(), parms, "EXCELOPENXML");
|
||||||
|
try {
|
||||||
|
var b2 = c.FreezeExcelHeaders(b);
|
||||||
|
return File(b2, "application/octet-stream", MakeFilename(report.Name) + ".xlsx");
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
return File(b, "application/octet-stream", MakeFilename(report.Name) + ".xlsx");
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
protected string MakeFilename(string reportName) {
|
||||||
|
string r = "";
|
||||||
|
char[] invalidChars = System.IO.Path.GetInvalidFileNameChars();
|
||||||
|
foreach (char c in reportName) {
|
||||||
|
if (invalidChars.Contains(c))
|
||||||
|
r += '_';
|
||||||
|
else
|
||||||
|
r += c;
|
||||||
|
}
|
||||||
|
return r;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private System.Web.HttpSessionStateBase GetSession() =>
|
||||||
|
Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data, JsonRequestBehavior.AllowGet);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.IsAjaxRequest();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private Microsoft.AspNetCore.Http.ISession GetSession() =>
|
||||||
|
HttpContext.Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.Headers.TryGetValue("X-Requested-With", out Microsoft.Extensions.Primitives.StringValues strings) && strings[0] == "XMLHttpRequest";
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private string GetUserIdentityName() =>
|
||||||
|
@User.Identity.Name;
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,91 +1,93 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
#if !NET8
|
||||||
|
using System.Web.Http;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
using System;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Net;
|
using System.Net;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Web.Http;
|
#endif
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.Controllers
|
#if !NET8
|
||||||
{
|
public class WebAPIController : ApiController {
|
||||||
|
#endif
|
||||||
|
|
||||||
public class WebAPIController : ApiController
|
#if NET8
|
||||||
{
|
[ApiController]
|
||||||
public TrainingController trainingFunctions = new TrainingController();
|
[Route("[controller]")]
|
||||||
public CorrectiveActionController carFunctions = new CorrectiveActionController();
|
public class WebAPIController : Controller {
|
||||||
public AccountController accountFunctions = new AccountController();
|
#endif
|
||||||
public HomeController homeFunctions = new HomeController();
|
|
||||||
public string Get()
|
public TrainingController trainingFunctions = new();
|
||||||
{
|
public CorrectiveActionController carFunctions = new();
|
||||||
return "Welcome To Web API";
|
public AccountController accountFunctions = new();
|
||||||
}
|
public HomeController homeFunctions = new();
|
||||||
public List<string> Get(int Id)
|
private readonly AppSettings? _AppSettings = GlobalVars.AppSettings;
|
||||||
{
|
|
||||||
return new List<string> {
|
public string Get() {
|
||||||
|
return "Welcome To Web API";
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<string> Get(int Id) {
|
||||||
|
return new List<string> {
|
||||||
"Data1",
|
"Data1",
|
||||||
"Data2"
|
"Data2"
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
public void Post()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
public void Post() {
|
||||||
|
}
|
||||||
|
|
||||||
public HttpResponseMessage Post(HttpRequestMessage request, string action)
|
#if !NET8
|
||||||
{
|
|
||||||
|
|
||||||
switch (action)
|
|
||||||
{
|
|
||||||
case "TrainingReport":
|
|
||||||
if (trainingFunctions.RunTrainingReport())
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.OK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
|
||||||
}
|
|
||||||
case "CARDueDates":
|
|
||||||
if (carFunctions.ProcessCARDueDates())
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.OK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
|
||||||
}
|
|
||||||
case "ProcessOoO":
|
|
||||||
if (homeFunctions.ProcessOoO())
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.OK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
|
||||||
}
|
|
||||||
case "ExpireOoO":
|
|
||||||
if (homeFunctions.ExpireOoO())
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.OK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
|
||||||
}
|
|
||||||
case "ApprovalReminders":
|
|
||||||
if (homeFunctions.ApprovalsReminderNotifications())
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.OK);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
|
||||||
}
|
|
||||||
default:
|
|
||||||
return request.CreateResponse(HttpStatusCode.InternalServerError, "Action Not Found");
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public HttpResponseMessage Post(HttpRequestMessage request, string action) {
|
||||||
|
switch (action) {
|
||||||
|
case "TrainingReport":
|
||||||
|
if (trainingFunctions.RunTrainingReport()) {
|
||||||
|
return request.CreateResponse(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||||
|
}
|
||||||
|
case "CARDueDates":
|
||||||
|
if (carFunctions.ProcessCARDueDates()) {
|
||||||
|
return request.CreateResponse(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||||
|
}
|
||||||
|
case "ProcessOoO":
|
||||||
|
if (homeFunctions.ProcessOoO()) {
|
||||||
|
return request.CreateResponse(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||||
|
}
|
||||||
|
case "ExpireOoO":
|
||||||
|
if (homeFunctions.ExpireOoO()) {
|
||||||
|
return request.CreateResponse(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||||
|
}
|
||||||
|
case "ApprovalReminders":
|
||||||
|
if (homeFunctions.ApprovalsReminderNotifications()) {
|
||||||
|
return request.CreateResponse(HttpStatusCode.OK);
|
||||||
|
} else {
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError);
|
||||||
|
}
|
||||||
|
default:
|
||||||
|
return request.CreateResponse(HttpStatusCode.InternalServerError, "Action Not Found");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
}
|
@ -1,99 +1,127 @@
|
|||||||
using Fab2ApprovalSystem.DMO;
|
#if !NET8
|
||||||
using Fab2ApprovalSystem.Models;
|
using System.Web;
|
||||||
using Kendo.Mvc.UI;
|
using System.Web.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
using Fab2ApprovalSystem.DMO;
|
||||||
using System.Web.Mvc;
|
using Fab2ApprovalSystem.Models;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
using Kendo.Mvc.Extensions;
|
using Kendo.Mvc.Extensions;
|
||||||
|
using Kendo.Mvc.UI;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.Controllers;
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
[Route("[controller]")]
|
||||||
|
#endif
|
||||||
|
public class WorkflowController : Controller {
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.Controllers
|
// GET: /Workflow/Details/5
|
||||||
{
|
public ActionResult Details(int id) {
|
||||||
public class WorkflowController : Controller
|
return View();
|
||||||
{
|
|
||||||
//
|
|
||||||
|
|
||||||
//
|
|
||||||
// GET: /Workflow/Details/5
|
|
||||||
public ActionResult Details(int id)
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// GET: /Workflow/Create
|
|
||||||
public ActionResult Create()
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Workflow/Create
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult Create(FormCollection collection)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// TODO: Add insert logic here
|
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// GET: /Workflow/Edit/5
|
|
||||||
public ActionResult Edit(int id)
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Workflow/Edit/5
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult Edit(int id, FormCollection collection)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// TODO: Add update logic here
|
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// GET: /Workflow/Delete/5
|
|
||||||
public ActionResult Delete(int id)
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
|
||||||
// POST: /Workflow/Delete/5
|
|
||||||
[HttpPost]
|
|
||||||
public ActionResult Delete(int id, FormCollection collection)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
// TODO: Add delete logic here
|
|
||||||
|
|
||||||
return RedirectToAction("Index");
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
return View();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// GET: /Workflow/Create
|
||||||
|
public ActionResult Create() {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
// POST: /Workflow/Create
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Create(FormCollection collection) {
|
||||||
|
try {
|
||||||
|
// TODO: Add insert logic here
|
||||||
|
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
} catch {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// GET: /Workflow/Edit/5
|
||||||
|
public ActionResult Edit(int id) {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
// POST: /Workflow/Edit/5
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Edit(int id, FormCollection collection) {
|
||||||
|
try {
|
||||||
|
// TODO: Add update logic here
|
||||||
|
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
} catch {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
// GET: /Workflow/Delete/5
|
||||||
|
public ActionResult Delete(int id) {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
// POST: /Workflow/Delete/5
|
||||||
|
[HttpPost]
|
||||||
|
public ActionResult Delete(int id, FormCollection collection) {
|
||||||
|
try {
|
||||||
|
// TODO: Add delete logic here
|
||||||
|
|
||||||
|
return RedirectToAction("Index");
|
||||||
|
} catch {
|
||||||
|
return View();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
private System.Web.HttpSessionStateBase GetSession() =>
|
||||||
|
Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data, JsonRequestBehavior.AllowGet);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.IsAjaxRequest();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
private Microsoft.AspNetCore.Http.ISession GetSession() =>
|
||||||
|
HttpContext.Session;
|
||||||
|
|
||||||
|
private JsonResult GetJsonResult(object? data) =>
|
||||||
|
Json(data);
|
||||||
|
|
||||||
|
private bool IsAjaxRequest() =>
|
||||||
|
Request.Headers.TryGetValue("X-Requested-With", out Microsoft.Extensions.Primitives.StringValues strings) && strings[0] == "XMLHttpRequest";
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private string GetUserIdentityName() =>
|
||||||
|
@User.Identity.Name;
|
||||||
|
|
||||||
}
|
}
|
59
Fab2ApprovalSystem/DMO/AccountDMO.cs
Normal file
59
Fab2ApprovalSystem/DMO/AccountDMO.cs
Normal file
@ -0,0 +1,59 @@
|
|||||||
|
using System;
|
||||||
|
using System.Net.Http;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
|
using Newtonsoft.Json;
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
|
|
||||||
|
public class AccountDMO {
|
||||||
|
|
||||||
|
public static async Task<LoginResult> LoginAsync(HttpClient httpClient, LoginModel loginModel) {
|
||||||
|
LoginResult result;
|
||||||
|
|
||||||
|
HttpRequestMessage request = new(HttpMethod.Post, "auth/login");
|
||||||
|
|
||||||
|
AuthAttempt authAttempt = loginModel is null ? null : new AuthAttempt() {
|
||||||
|
LoginID = loginModel.LoginID,
|
||||||
|
Password = loginModel.Password
|
||||||
|
};
|
||||||
|
|
||||||
|
string json = authAttempt is null ? "{}" : JsonConvert.SerializeObject(authAttempt);
|
||||||
|
|
||||||
|
request.Content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponseMessage = await httpClient.SendAsync(request);
|
||||||
|
|
||||||
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
||||||
|
throw new Exception($"The authentication API failed, because {httpResponseMessage.ReasonPhrase}");
|
||||||
|
|
||||||
|
string responseContent = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
result = JsonConvert.DeserializeObject<LoginResult>(responseContent);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static async Task<LoginResult> ExternalAuthSetupAsync(HttpClient httpClient, AuthAttempt authAttempt) {
|
||||||
|
LoginResult result;
|
||||||
|
|
||||||
|
HttpRequestMessage request = new(HttpMethod.Post, "auth/refresh");
|
||||||
|
|
||||||
|
string json = authAttempt is null ? "{}" : JsonConvert.SerializeObject(authAttempt);
|
||||||
|
|
||||||
|
request.Content = new StringContent(json, Encoding.UTF8, "application/json");
|
||||||
|
|
||||||
|
HttpResponseMessage httpResponseMessage = await httpClient.SendAsync(request);
|
||||||
|
|
||||||
|
if (!httpResponseMessage.IsSuccessStatusCode)
|
||||||
|
throw new Exception($"The authentication API failed, because {httpResponseMessage.ReasonPhrase}");
|
||||||
|
|
||||||
|
string responseContent = await httpResponseMessage.Content.ReadAsStringAsync();
|
||||||
|
|
||||||
|
result = JsonConvert.DeserializeObject<LoginResult>(responseContent);
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -1,310 +1,311 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using Dapper;
|
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
using Dapper;
|
||||||
{
|
|
||||||
public class AdminDMO
|
|
||||||
{
|
|
||||||
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
private static FabApprovalTrainingEntities FabApprovalDB = new FabApprovalTrainingEntities();
|
|
||||||
|
|
||||||
/// <summary>
|
using Fab2ApprovalSystem.Misc;
|
||||||
///
|
using Fab2ApprovalSystem.Models;
|
||||||
/// </summary>
|
|
||||||
/// <returns></returns>
|
|
||||||
public List<Role> GetSubRoles()
|
|
||||||
{
|
|
||||||
StringBuilder sql = new StringBuilder();
|
|
||||||
sql.Append(
|
|
||||||
"SELECT R.RoleID, R.RoleName, SubRoleID, SubRoleCategoryItem, SR.RoleID, SR.Inactive " +
|
|
||||||
"FROM vSubRoles SR " +
|
|
||||||
"INNER JOIN Role R ON R.RoleID = SR.RoleID " +
|
|
||||||
"ORDER BY R.RoleID, SubRoleCategoryItem ");
|
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
|
|
||||||
|
public class AdminDMO {
|
||||||
|
private readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
|
#if !NET8
|
||||||
|
private static FabApprovalTrainingEntities FabApprovalDB = new FabApprovalTrainingEntities();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public List<ParentChildModel> GetAllSubRoles(string showInactiveRoles = "") {
|
||||||
|
List<ParentChildModel> results = new();
|
||||||
|
|
||||||
|
List<Role> roles = GetSubRoles();
|
||||||
|
|
||||||
|
ParentChildModel child;
|
||||||
|
ParentChildModel parent;
|
||||||
|
|
||||||
|
foreach (Role r in roles) {
|
||||||
|
parent = new ParentChildModel {
|
||||||
|
id = r.RoleID,
|
||||||
|
parentid = -1,
|
||||||
|
text = r.RoleName,
|
||||||
|
value = r.RoleID.ToString()
|
||||||
|
};
|
||||||
|
|
||||||
|
foreach (SubRole sr in r.SubRoles) {
|
||||||
|
if (sr.Inactive) {
|
||||||
|
// hide inactive roles unless parameter says otherwise
|
||||||
|
if (!showInactiveRoles.Equals("true"))
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
child = new ParentChildModel {
|
||||||
|
id = sr.SubRoleID,
|
||||||
|
parentid = r.RoleID,
|
||||||
|
text = sr.SubRoleCategoryItem + (sr.Inactive ? " (Inactive)" : ""),
|
||||||
|
value = sr.SubRoleID.ToString()
|
||||||
|
};
|
||||||
|
results.Add(child);
|
||||||
|
}
|
||||||
|
|
||||||
|
results.Add(parent);
|
||||||
|
};
|
||||||
|
return results;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Role> GetSubRoles() {
|
||||||
|
StringBuilder sql = new();
|
||||||
|
sql.Append(
|
||||||
|
"SELECT R.RoleID, R.RoleName, SubRoleID, SubRoleCategoryItem, SR.RoleID, SR.Inactive " +
|
||||||
|
"FROM vSubRoles SR " +
|
||||||
|
"INNER JOIN Role R ON R.RoleID = SR.RoleID " +
|
||||||
|
"ORDER BY R.RoleID, SubRoleCategoryItem ");
|
||||||
|
|
||||||
|
db.Open();
|
||||||
|
Dictionary<int, Role> lookup = new();
|
||||||
|
List<Role> data = db.Query<Role, SubRole, Role>(sql.ToString(),
|
||||||
|
(parent, child) => {
|
||||||
|
Role role;
|
||||||
|
if (!lookup.TryGetValue(parent.RoleID, out role)) {
|
||||||
|
lookup.Add(parent.RoleID, role = parent);
|
||||||
|
}
|
||||||
|
role.SubRoles.Add(child);
|
||||||
|
return role;
|
||||||
|
},
|
||||||
|
splitOn: "SubRoleID").Distinct().ToList();
|
||||||
|
|
||||||
|
return data;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<UserSubRoles> GetUserSubRoles(int userId) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserId", userId);
|
||||||
|
List<UserSubRoles> userSubRoleList = db.Query<UserSubRoles>("GetSubRolesByUserId", parameters, commandType: CommandType.StoredProcedure).ToList();
|
||||||
|
return userSubRoleList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<LoginModel> GetAllUsersBySubRole(int subRole) {
|
||||||
|
StringBuilder sql = new();
|
||||||
|
sql.Append("SELECT FirstName + ' ' + LastName AS FullName , LoginID, FirstName, LastName, U.UserID, SubRoleID ");
|
||||||
|
sql.Append("FROM UserSubRole UR ");
|
||||||
|
sql.Append("INNER JOIN Users U ON UR.UserID = U.UserID ");
|
||||||
|
sql.Append("WHERE UR.SubRoleID = " + subRole.ToString() + " ");
|
||||||
|
sql.Append("ORDER BY FirstName");
|
||||||
|
|
||||||
|
return db.Query<LoginModel>(sql.ToString()).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void AddUserRoles(int subRole, string userids) {
|
||||||
|
string sql;
|
||||||
|
|
||||||
|
string[] arrayOfUsers = userids.Split(new char[] { '~' });
|
||||||
|
|
||||||
|
for (int i = 0; i < arrayOfUsers.Length; i++) {
|
||||||
|
sql = "INSERT INTO UserSubRole (UserID, SubRoleID) VALUES (" + arrayOfUsers[i] + ", " + subRole + " )";
|
||||||
|
db.Execute(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteUserFromAllTrainingGroups(int userId) {
|
||||||
|
string sql = "DELETE FROM TrainingGroupMembers WHERE UserId = " + userId;
|
||||||
|
|
||||||
|
db.Open();
|
||||||
|
db.Execute(sql);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteUserRoles(int subRole, string userids) {
|
||||||
|
string sql;
|
||||||
|
|
||||||
|
string[] arrayOfUsers = userids.Split(new char[] { '~' });
|
||||||
|
|
||||||
|
for (int i = 0; i < arrayOfUsers.Length; i++) {
|
||||||
|
sql = "DELETE FROM UserSubRole WHERE UserID = " + arrayOfUsers[i] + " AND SubRoleID = " + subRole;
|
||||||
|
db.Execute(sql);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
public List<TrainingReportUser> GetTrainingReportUsers() {
|
||||||
|
List<TrainingReportUser> CurrentReportUsers = (from a in FabApprovalDB.TrainingReportUsers select a).ToList();
|
||||||
|
return CurrentReportUsers;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
|
||||||
|
public List<TrainingReportUser> GetTrainingReportUsers() =>
|
||||||
|
throw new NotImplementedException();
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
public List<TECNNotificationsUser> GetTECNNotificationUsers() {
|
||||||
|
List<TECNNotificationsUser> currentTECNNotificationUsers = (from a in FabApprovalDB.TECNNotificationsUsers select a).ToList();
|
||||||
|
return currentTECNNotificationUsers;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public void TrainingReportAddUser(int userId) {
|
||||||
|
string sql = "INSERT INTO TrainingReportUsers (UserId) " + "VALUES ('" + userId + "') ";
|
||||||
|
|
||||||
|
db.Open();
|
||||||
|
db.Execute(sql);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TECNExpirationAddUser(int userId) {
|
||||||
|
string sql = "INSERT INTO TECNNotificationsUsers (UserId) " + "VALUES ('" + userId + "') ";
|
||||||
|
|
||||||
|
db.Open();
|
||||||
|
db.Execute(sql);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TrainingReportDeleteUser(int userId) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", userId);
|
||||||
|
|
||||||
|
db.Execute("DeleteUserFromTrainingReport", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TECNExpirationDeleteUser(int userId) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", userId);
|
||||||
|
|
||||||
|
db.Execute("DeleteUserFromTECNReport", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrainingGroup> GetTrainingGroups() {
|
||||||
|
#if !NET8
|
||||||
|
var TrainingGroups = from a in FabApprovalDB.TrainingGroups select a;
|
||||||
|
List<TrainingGroup> GroupsToReturn = TrainingGroups.ToList();
|
||||||
|
|
||||||
|
return GroupsToReturn;
|
||||||
|
#endif
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
#if !NET8
|
||||||
|
|
||||||
|
public void AddNewTrainingGroup(string groupName) {
|
||||||
|
TrainingGroup existing = null;
|
||||||
|
// Check to see that the group name doesn't exist.
|
||||||
|
try {
|
||||||
|
existing = (from a in FabApprovalDB.TrainingGroups where a.TrainingGroupName == groupName select a).FirstOrDefault();
|
||||||
|
} catch {
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
if (existing == null) {
|
||||||
|
string sql = "INSERT INTO TrainingGroups (TrainingGroupName) " + "VALUES ('" + groupName + "') ";
|
||||||
|
|
||||||
|
this.db.Open();
|
||||||
|
this.db.Execute(sql);
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
public void DeleteTrainingGroup(int groupID) {
|
||||||
|
try {
|
||||||
|
string sql = "DELETE FROM TrainingGroups WHERE TrainingGroupID = " + groupID;
|
||||||
db.Open();
|
db.Open();
|
||||||
var lookup = new Dictionary<int, Role>();
|
db.Execute(sql);
|
||||||
List<Role> data = this.db.Query<Role, SubRole, Role>(sql.ToString(),
|
|
||||||
(parent, child) =>
|
|
||||||
{
|
|
||||||
Role role;
|
|
||||||
if (!lookup.TryGetValue(parent.RoleID, out role))
|
|
||||||
{
|
|
||||||
lookup.Add(parent.RoleID, role = parent);
|
|
||||||
}
|
|
||||||
//if (role.RoleID == null)
|
|
||||||
// role.SubRoles = new List<SubRole>();
|
|
||||||
role.SubRoles.Add(child);
|
|
||||||
return role;
|
|
||||||
},
|
|
||||||
splitOn: "SubRoleID").Distinct().ToList();
|
|
||||||
|
|
||||||
|
sql = "DELETE FROM TrainingGroupMembers WHERE TrainingGroupID = " + groupID;
|
||||||
return data;
|
db.Execute(sql);
|
||||||
}
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// /// <param name="userId"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public List<UserSubRoles> GetUserSubRoles(int userId)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserId", userId);
|
|
||||||
var userSubRoleList = this.db.Query<UserSubRoles>("GetSubRolesByUserId", parameters, commandType: CommandType.StoredProcedure).ToList();
|
|
||||||
return userSubRoleList;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="subRole"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
public IEnumerable<LoginModel> GetAllUsersBySubRole(int subRole)
|
|
||||||
{
|
|
||||||
StringBuilder sql = new StringBuilder();
|
|
||||||
sql.Append("SELECT FirstName + ' ' + LastName AS FullName , LoginID, FirstName, LastName, U.UserID, SubRoleID ");
|
|
||||||
sql.Append("FROM UserSubRole UR ");
|
|
||||||
sql.Append("INNER JOIN Users U ON UR.UserID = U.UserID ");
|
|
||||||
sql.Append("WHERE UR.SubRoleID = " + subRole.ToString() + " ");
|
|
||||||
sql.Append("ORDER BY FirstName");
|
|
||||||
|
|
||||||
return this.db.Query<LoginModel>(sql.ToString()).ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="subRole"></param>
|
|
||||||
/// <param name="userids"></param>
|
|
||||||
public void AddUserRoles(int subRole, string userids)
|
|
||||||
{
|
|
||||||
string sql;
|
|
||||||
|
|
||||||
string[] arrayOfUsers = userids.Split(new char[] { '~' });
|
|
||||||
|
|
||||||
for (int i = 0; i < arrayOfUsers.Length; i++)
|
|
||||||
{
|
|
||||||
sql = "INSERT INTO UserSubRole (UserID, SubRoleID) VALUES (" + arrayOfUsers[i] + ", " + subRole + " )";
|
|
||||||
this.db.Execute(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteUserFromAllTrainingGroups(int userId)
|
|
||||||
{
|
|
||||||
string sql = "DELETE FROM TrainingGroupMembers WHERE UserId = " + userId;
|
|
||||||
|
|
||||||
|
|
||||||
this.db.Open();
|
|
||||||
this.db.Execute(sql);
|
|
||||||
return;
|
return;
|
||||||
|
} catch {
|
||||||
}
|
}
|
||||||
/// <summary>
|
}
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="subRole"></param>
|
|
||||||
/// <param name="userids"></param>
|
|
||||||
public void DeleteUserRoles(int subRole, string userids)
|
|
||||||
{
|
|
||||||
string sql;
|
|
||||||
|
|
||||||
string[] arrayOfUsers = userids.Split(new char[] { '~' });
|
#if !NET8
|
||||||
|
public List<TrainingGroupMember> GetTrainingGroupMembers(int GroupID) {
|
||||||
|
return (from a in FabApprovalDB.TrainingGroupMembers where a.TrainingGroupID == GroupID select a).ToList();
|
||||||
|
}
|
||||||
|
|
||||||
for (int i = 0; i < arrayOfUsers.Length; i++)
|
public void AddUserToGroup(int userId, int groupId) {
|
||||||
{
|
UserAccountDMO userDB = new UserAccountDMO();
|
||||||
sql = "DELETE FROM UserSubRole WHERE UserID = " + arrayOfUsers[i] + " AND SubRoleID = " + subRole;
|
string userFullName = userDB.GetUserByID(userId).FullName;
|
||||||
this.db.Execute(sql);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
TrainingGroupMember existing = null;
|
||||||
public List<TrainingReportUser> GetTrainingReportUsers()
|
|
||||||
{
|
|
||||||
List<TrainingReportUser> CurrentReportUsers = (from a in FabApprovalDB.TrainingReportUsers select a).ToList();
|
|
||||||
return CurrentReportUsers;
|
|
||||||
}
|
|
||||||
public List<TECNNotificationsUser> GetTECNNotificationUsers()
|
|
||||||
{
|
|
||||||
List<TECNNotificationsUser> currentTECNNotificationUsers = (from a in FabApprovalDB.TECNNotificationsUsers select a).ToList();
|
|
||||||
return currentTECNNotificationUsers;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void TrainingReportAddUser(int userId)
|
existing = (from a in FabApprovalDB.TrainingGroupMembers where a.TrainingGroupID == groupId && a.UserID == userId select a).FirstOrDefault();
|
||||||
{
|
if (existing == null) {
|
||||||
string sql = "INSERT INTO TrainingReportUsers (UserId) " + "VALUES ('" + userId + "') ";
|
|
||||||
|
|
||||||
|
|
||||||
this.db.Open();
|
|
||||||
this.db.Execute(sql);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
public void TECNExpirationAddUser(int userId)
|
|
||||||
{
|
|
||||||
string sql = "INSERT INTO TECNNotificationsUsers (UserId) " + "VALUES ('" + userId + "') ";
|
|
||||||
|
|
||||||
this.db.Open();
|
|
||||||
this.db.Execute(sql);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
public void TrainingReportDeleteUser(int userId)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userId);
|
|
||||||
|
|
||||||
this.db.Execute("DeleteUserFromTrainingReport", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
public void TECNExpirationDeleteUser(int userId)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userId);
|
|
||||||
|
|
||||||
this.db.Execute("DeleteUserFromTECNReport", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
public List<TrainingGroup> GetTrainingGroups()
|
|
||||||
{
|
|
||||||
//StringBuilder sql = new StringBuilder();
|
|
||||||
//sql.Append(
|
|
||||||
// "SELECT 'TrainingGroupID', TrainingGroupName " +
|
|
||||||
// "FROM TrainingGroups " +
|
|
||||||
// "ORDER BY TrainingGroupID ");
|
|
||||||
|
|
||||||
//db.Open();
|
|
||||||
//var lookup = new Dictionary<int, TrainingGroup>();
|
|
||||||
////List<TrainingGroup> data = this.db.Query<TrainingGroup>(sql.ToString()
|
|
||||||
//return this.db.Query<TrainingGroup>(sql.ToString()).ToList();
|
|
||||||
var TrainingGroups = from a in FabApprovalDB.TrainingGroups select a;
|
|
||||||
List<TrainingGroup> GroupsToReturn = TrainingGroups.ToList();
|
|
||||||
|
|
||||||
return GroupsToReturn;
|
|
||||||
}
|
|
||||||
public void AddNewTrainingGroup(string groupName)
|
|
||||||
{
|
|
||||||
TrainingGroup existing = null;
|
|
||||||
//Check to see that the group name doesn't exist.
|
|
||||||
try
|
|
||||||
{
|
|
||||||
existing = (from a in FabApprovalDB.TrainingGroups where a.TrainingGroupName == groupName select a).FirstOrDefault();
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
// string test = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (existing == null)
|
|
||||||
{
|
|
||||||
//string sql = new StringBuilder();
|
|
||||||
string sql = "INSERT INTO TrainingGroups (TrainingGroupName) " + "VALUES ('" + groupName + "') ";
|
|
||||||
|
|
||||||
|
|
||||||
this.db.Open();
|
|
||||||
this.db.Execute(sql);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteTrainingGroup(int groupID)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
string sql = "DELETE FROM TrainingGroups WHERE TrainingGroupID = " + groupID;
|
|
||||||
this.db.Open();
|
|
||||||
this.db.Execute(sql);
|
|
||||||
|
|
||||||
sql = "DELETE FROM TrainingGroupMembers WHERE TrainingGroupID = " + groupID;
|
|
||||||
this.db.Execute(sql);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
catch
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public List<TrainingGroupMember> GetTrainingGroupMembers(int GroupID)
|
|
||||||
{
|
|
||||||
return (from a in FabApprovalDB.TrainingGroupMembers where a.TrainingGroupID == GroupID select a).ToList();
|
|
||||||
}
|
|
||||||
public void AddUserToGroup(int userId, int groupId)
|
|
||||||
{
|
|
||||||
UserAccountDMO userDB = new UserAccountDMO();
|
|
||||||
string userFullName = userDB.GetUserByID(userId).FullName;
|
|
||||||
|
|
||||||
TrainingGroupMember existing = null;
|
|
||||||
|
|
||||||
existing = (from a in FabApprovalDB.TrainingGroupMembers where a.TrainingGroupID == groupId && a.UserID == userId select a).FirstOrDefault();
|
|
||||||
if (existing == null)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@GroupID", groupId);
|
|
||||||
parameters.Add("@UserID", userId);
|
|
||||||
parameters.Add("@UserFullName", userFullName);
|
|
||||||
|
|
||||||
this.db.Execute("AddUserToTrainingGroup", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
throw new Exception("The user already exists in this training group.");
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//if (existing == null)
|
|
||||||
//{
|
|
||||||
// //string sql = new StringBuilder();
|
|
||||||
|
|
||||||
// string sql = "INSERT INTO TrainingGroupMembers (TrainingGroupID, UserID, FullName) " + "VALUES ('" + groupId + "','" + userId + "','" + userFullName + "') ";
|
|
||||||
|
|
||||||
// try
|
|
||||||
// {
|
|
||||||
// this.db.Open();
|
|
||||||
// this.db.Execute(sql);
|
|
||||||
// }
|
|
||||||
// catch(Exception e)
|
|
||||||
// {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// return;
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// return;
|
|
||||||
|
|
||||||
}
|
|
||||||
public void DeleteFromGroup(int userId, int groupId)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
parameters = new DynamicParameters();
|
||||||
parameters.Add("@GroupID", groupId);
|
parameters.Add("@GroupID", groupId);
|
||||||
parameters.Add("@UserID", userId);
|
parameters.Add("@UserID", userId);
|
||||||
|
parameters.Add("@UserFullName", userFullName);
|
||||||
|
|
||||||
this.db.Execute("DeleteUserFromTrainingGroup", parameters, commandType: CommandType.StoredProcedure);
|
this.db.Execute("AddUserToTrainingGroup", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
} else {
|
||||||
|
throw new Exception("The user already exists in this training group.");
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
}
|
||||||
|
#endif
|
||||||
|
public void DeleteFromGroup(int userId, int groupId) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@GroupID", groupId);
|
||||||
|
parameters.Add("@UserID", userId);
|
||||||
|
|
||||||
|
db.Execute("DeleteUserFromTrainingGroup", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteUser(UserAccountDMO userDMO, TrainingDMO trainingDMO, LoginModel loginModel) {
|
||||||
|
if (loginModel != null) {
|
||||||
|
userDMO.DeleteUser(loginModel);
|
||||||
|
// Remove open trainings
|
||||||
|
// Get a list of all user assigned trainings.
|
||||||
|
List<TrainingAssignment> trainingAssignments = trainingDMO.GetTrainingAssignmentsByUserID(loginModel.UserID);
|
||||||
|
|
||||||
|
// Go Through that list.
|
||||||
|
foreach (var trainingAssignment in trainingAssignments) {
|
||||||
|
// Delete Any document acknowledgements.
|
||||||
|
trainingDMO.DeleteTrainingDocAck(trainingAssignment.ID);
|
||||||
|
// Delete the training assignment itself
|
||||||
|
trainingDMO.DeleteTrainingAssignment(trainingAssignment.ID);
|
||||||
|
// Check the parent Training task to set to to complete if applicable.
|
||||||
|
if (trainingDMO.CheckTrainingStatus(trainingAssignment.ID)) {
|
||||||
|
int TrainingID = trainingAssignment.TrainingID;
|
||||||
|
// Set Training status to complete
|
||||||
|
trainingDMO.UpdateTrainingStatus(TrainingID);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove user from any Training Groups
|
||||||
|
DeleteUserFromAllTrainingGroups(loginModel.UserID);
|
||||||
|
|
||||||
|
// Remove User from training report notifications
|
||||||
|
TrainingReportDeleteUser(loginModel.UserID);
|
||||||
|
// Remove user from TECN Expiration Notifications
|
||||||
|
TECNExpirationDeleteUser(loginModel.UserID);
|
||||||
|
// Get user subroles
|
||||||
|
List<UserSubRoles> userSubRoles = GetUserSubRoles(loginModel.UserID);
|
||||||
|
// Delete user from any subroles
|
||||||
|
foreach (var userSubRole in userSubRoles) {
|
||||||
|
DeleteUserRoles(userSubRole.SubRoleID, loginModel.UserID.ToString());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,32 +1,26 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
using System.Configuration;
|
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
using Fab2ApprovalSystem.Misc;
|
||||||
{
|
using Fab2ApprovalSystem.Models;
|
||||||
public static class ApprovalLogDMO
|
|
||||||
{
|
|
||||||
|
|
||||||
private static IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
|
|
||||||
public static void Add(ApprovalLog appLog)
|
public static class ApprovalLogDMO {
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@IssueID", appLog.IssueID);
|
|
||||||
parameters.Add("@UserID", appLog.UserID);
|
|
||||||
parameters.Add("@OperationType", appLog.OperationType);
|
|
||||||
parameters.Add("@SubRoleID", appLog.SubRoleID);
|
|
||||||
parameters.Add("@OperationLog", appLog.OperationLog);
|
|
||||||
parameters.Add("@DocumentTypeID", appLog.DocumentTypeID);
|
|
||||||
|
|
||||||
db.Execute("InsertApprovalLogByDocument", parameters, commandType: CommandType.StoredProcedure);
|
private static readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
|
|
||||||
}
|
public static void Add(ApprovalLog appLog) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@IssueID", appLog.IssueID);
|
||||||
|
parameters.Add("@UserID", appLog.UserID);
|
||||||
|
parameters.Add("@OperationType", appLog.OperationType);
|
||||||
|
parameters.Add("@SubRoleID", appLog.SubRoleID);
|
||||||
|
parameters.Add("@OperationLog", appLog.OperationLog);
|
||||||
|
parameters.Add("@DocumentTypeID", appLog.DocumentTypeID);
|
||||||
|
|
||||||
|
db.Execute("InsertApprovalLogByDocument", parameters, commandType: CommandType.StoredProcedure);
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,40 +1,24 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Web;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
using System.Configuration;
|
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
using Fab2ApprovalSystem.Misc;
|
||||||
{
|
using Fab2ApprovalSystem.Models;
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
public static class ECNTypeChangeLogDMO
|
|
||||||
{
|
|
||||||
private static IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
|
|
||||||
/// <summary>
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="changeLog"></param>
|
|
||||||
public static void Add(ECNTypeChangeLog changeLog)
|
|
||||||
{
|
|
||||||
|
|
||||||
var parameters = new DynamicParameters();
|
public static class ECNTypeChangeLogDMO {
|
||||||
parameters.Add("@ECNNumber", changeLog.ECNNumber);
|
private static readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
parameters.Add("@UserID", changeLog.UserID);
|
|
||||||
parameters.Add("@ECNTypeFrom", changeLog.ECNTypeFrom);
|
|
||||||
parameters.Add("@ECNTypeTo", changeLog.ECNTypeTo);
|
|
||||||
|
|
||||||
db.Execute("ECNInsertECNTypeChangeLog", parameters, commandType: CommandType.StoredProcedure);
|
public static void Add(ECNTypeChangeLog changeLog) {
|
||||||
}
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@ECNNumber", changeLog.ECNNumber);
|
||||||
|
parameters.Add("@UserID", changeLog.UserID);
|
||||||
|
parameters.Add("@ECNTypeFrom", changeLog.ECNTypeFrom);
|
||||||
|
parameters.Add("@ECNTypeTo", changeLog.ECNTypeTo);
|
||||||
|
|
||||||
|
db.Execute("ECNInsertECNTypeChangeLog", parameters, commandType: CommandType.StoredProcedure);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -1,51 +1,25 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Web;
|
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
using System.Transactions;
|
|
||||||
using Fab2ApprovalSystem.ViewModels;
|
|
||||||
using System.Reflection;
|
|
||||||
using Fab2ApprovalSystem.Misc;
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
{
|
|
||||||
|
|
||||||
public static class EventLogDMO
|
public static class EventLogDMO {
|
||||||
{
|
private static readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
private static IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
|
|
||||||
//public static void Add(WinEventLog eventLog)
|
|
||||||
//{
|
|
||||||
// var parameters = new DynamicParameters();
|
|
||||||
// parameters.Add("@IssueID", eventLog.IssueID);
|
|
||||||
// parameters.Add("@UserID", eventLog.UserID);
|
|
||||||
// parameters.Add("@OperationType", eventLog.OperationType);
|
|
||||||
// parameters.Add("@Comments", eventLog.Comments);
|
|
||||||
|
|
||||||
// db.Execute("InsertEventLog", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
public static void Add(WinEventLog eventLog)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@IssueID", eventLog.IssueID);
|
|
||||||
parameters.Add("@UserID", eventLog.UserID);
|
|
||||||
parameters.Add("@DocumentType", eventLog.DocumentType);
|
|
||||||
parameters.Add("@OperationType", eventLog.OperationType);
|
|
||||||
parameters.Add("@Comments", eventLog.Comments);
|
|
||||||
|
|
||||||
db.Execute("InsertEventLogByDocument", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public static void Add(WinEventLog eventLog) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@IssueID", eventLog.IssueID);
|
||||||
|
parameters.Add("@UserID", eventLog.UserID);
|
||||||
|
parameters.Add("@DocumentType", eventLog.DocumentType);
|
||||||
|
parameters.Add("@OperationType", eventLog.OperationType);
|
||||||
|
parameters.Add("@Comments", eventLog.Comments);
|
||||||
|
|
||||||
|
db.Execute("InsertEventLogByDocument", parameters, commandType: CommandType.StoredProcedure);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,129 +1,112 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
using System.Transactions;
|
|
||||||
using Fab2ApprovalSystem.Misc;
|
using Fab2ApprovalSystem.Misc;
|
||||||
|
using Fab2ApprovalSystem.Models;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
{
|
|
||||||
public class PartsRequestDMO
|
|
||||||
{
|
|
||||||
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
|
|
||||||
WorkflowDMO wfDMO = new WorkflowDMO();
|
public class PartsRequestDMO {
|
||||||
|
|
||||||
public IEnumerable<PartsRequestList> GetPartsRequestList()
|
private readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
{
|
|
||||||
var r = this.db.Query<PartsRequestList>("PartsRequestGetList", commandType: CommandType.StoredProcedure).ToList();
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Insert(PartsRequest pr)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", value: pr.PRNumber, dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
|
||||||
parameters.Add("@OriginatorID", pr.OriginatorID);
|
|
||||||
|
|
||||||
this.db.Execute("PartsRequestInsert", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
pr.PRNumber = parameters.Get<int>("@PRNumber");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Update(PartsRequest pr)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", pr.PRNumber);
|
|
||||||
parameters.Add("@Title", pr.Title);
|
|
||||||
parameters.Add("@RequestorID", pr.RequestorID);
|
|
||||||
parameters.Add("@TechLeadID", pr.TechLeadID);
|
|
||||||
parameters.Add("@Description", pr.Description);
|
|
||||||
|
|
||||||
this.db.Execute("PartsRequestUpdate", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
}
|
|
||||||
|
|
||||||
public PartsRequest Get(int PRNumber)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", value: PRNumber, dbType: DbType.Int32);
|
|
||||||
|
|
||||||
return this.db.Query<PartsRequest>("PartsRequestGet", parameters, commandType: CommandType.StoredProcedure).SingleOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<PartsRequestAttachmentList> GetAttachments(int prNumber)
|
|
||||||
{
|
|
||||||
var attachments = this.db.Query<PartsRequestAttachmentList>(
|
|
||||||
"SELECT AttachmentID, PRNumber, FileName, A.UserID, UploadDate, U.FirstName + ' ' + U.LastName AS FullName " +
|
|
||||||
"FROM PartsRequestAttachment A " +
|
|
||||||
"INNER JOIN Users U ON U.UserID = A.UserID " +
|
|
||||||
"WHERE PRNumber = @PRNumber",
|
|
||||||
new { PRNumber = prNumber }).ToList();
|
|
||||||
return attachments;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void InsertAttachment(PartsRequestAttachment attach)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", attach.PRNumber);
|
|
||||||
parameters.Add("@UserID", attach.UserID);
|
|
||||||
parameters.Add("@FileName", attach.FileName);
|
|
||||||
|
|
||||||
this.db.Execute("PartsRequestInsertAttachment", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetFileName(string attachmentID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@AttachmentID", attachmentID);
|
|
||||||
var fileName = this.db.Query<string>("PartsRequestGetAttachmentFileName", parameters, commandType: CommandType.StoredProcedure).Single();
|
|
||||||
return fileName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteAttachment(int attachmentID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@AttachmentID", attachmentID);
|
|
||||||
this.db.Execute("PartsRequestDeleteAttachment", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void Submit(int prNumber, int userID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", prNumber);
|
|
||||||
parameters.Add("@UserID", userID);
|
|
||||||
this.db.Execute("PartsRequestSubmitForApproval", parameters, commandType: CommandType.StoredProcedure );
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<ApprovalLogHistory> GetApprovalLogHistory(int prNumber)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@PRNumber", prNumber);
|
|
||||||
var approverList = this.db.Query<ApprovalLogHistory>("PartsRequestGetApprovalLogHistory", parameters, commandType: CommandType.StoredProcedure).ToList();
|
|
||||||
return approverList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public IEnumerable<MyPartsRequestList> GetMyPartsRequests(int userID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userID);
|
|
||||||
|
|
||||||
var r = this.db.Query<MyPartsRequestList>("PartsRequestGetListByUser", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
return r.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteDocument(int prNumber, int userid)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userid);
|
|
||||||
parameters.Add("@PRNumber", prNumber);
|
|
||||||
|
|
||||||
this.db.Execute("PartsRequestDelete", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public IEnumerable<PartsRequestList> GetPartsRequestList() {
|
||||||
|
List<PartsRequestList> r = db.Query<PartsRequestList>("PartsRequestGetList", commandType: CommandType.StoredProcedure).ToList();
|
||||||
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void Insert(PartsRequest pr) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", value: pr.PRNumber, dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
||||||
|
parameters.Add("@OriginatorID", pr.OriginatorID);
|
||||||
|
|
||||||
|
db.Execute("PartsRequestInsert", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
|
pr.PRNumber = parameters.Get<int>("@PRNumber");
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Update(PartsRequest pr) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", pr.PRNumber);
|
||||||
|
parameters.Add("@Title", pr.Title);
|
||||||
|
parameters.Add("@RequestorID", pr.RequestorID);
|
||||||
|
parameters.Add("@TechLeadID", pr.TechLeadID);
|
||||||
|
parameters.Add("@Description", pr.Description);
|
||||||
|
|
||||||
|
db.Execute("PartsRequestUpdate", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
}
|
||||||
|
|
||||||
|
public PartsRequest Get(int PRNumber) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", value: PRNumber, dbType: DbType.Int32);
|
||||||
|
|
||||||
|
return db.Query<PartsRequest>("PartsRequestGet", parameters, commandType: CommandType.StoredProcedure).SingleOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<PartsRequestAttachmentList> GetAttachments(int prNumber) {
|
||||||
|
List<PartsRequestAttachmentList> attachments = db.Query<PartsRequestAttachmentList>(
|
||||||
|
"SELECT AttachmentID, PRNumber, FileName, A.UserID, UploadDate, U.FirstName + ' ' + U.LastName AS FullName " +
|
||||||
|
"FROM PartsRequestAttachment A " +
|
||||||
|
"INNER JOIN Users U ON U.UserID = A.UserID " +
|
||||||
|
"WHERE PRNumber = @PRNumber",
|
||||||
|
new { PRNumber = prNumber }).ToList();
|
||||||
|
return attachments;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void InsertAttachment(PartsRequestAttachment attach) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", attach.PRNumber);
|
||||||
|
parameters.Add("@UserID", attach.UserID);
|
||||||
|
parameters.Add("@FileName", attach.FileName);
|
||||||
|
|
||||||
|
db.Execute("PartsRequestInsertAttachment", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetFileName(string attachmentID) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@AttachmentID", attachmentID);
|
||||||
|
var fileName = db.Query<string>("PartsRequestGetAttachmentFileName", parameters, commandType: CommandType.StoredProcedure).Single();
|
||||||
|
return fileName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteAttachment(int attachmentID) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@AttachmentID", attachmentID);
|
||||||
|
db.Execute("PartsRequestDeleteAttachment", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Submit(int prNumber, int userID) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", prNumber);
|
||||||
|
parameters.Add("@UserID", userID);
|
||||||
|
db.Execute("PartsRequestSubmitForApproval", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<ApprovalLogHistory> GetApprovalLogHistory(int prNumber) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@PRNumber", prNumber);
|
||||||
|
List<ApprovalLogHistory> approverList = db.Query<ApprovalLogHistory>("PartsRequestGetApprovalLogHistory", parameters, commandType: CommandType.StoredProcedure).ToList();
|
||||||
|
return approverList;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<MyPartsRequestList> GetMyPartsRequests(int userID) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", userID);
|
||||||
|
|
||||||
|
IEnumerable<MyPartsRequestList> r = db.Query<MyPartsRequestList>("PartsRequestGetListByUser", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
return r.ToList();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteDocument(int prNumber, int userid) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", userid);
|
||||||
|
parameters.Add("@PRNumber", prNumber);
|
||||||
|
|
||||||
|
db.Execute("PartsRequestDelete", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,29 +1,19 @@
|
|||||||
using System;
|
using System.Configuration;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using Dapper;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
using Dapper;
|
||||||
{
|
|
||||||
public class SAM_DMO
|
|
||||||
{
|
|
||||||
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["SAMDBConnectionString"].ConnectionString);
|
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
|
|
||||||
public int HasITARAccess(string userID)
|
public class SAM_DMO {
|
||||||
{
|
private readonly IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["SAMDBConnectionString"].ConnectionString);
|
||||||
|
|
||||||
StringBuilder query = new StringBuilder("SELECT COUNT(*) FROM dbo.fnIsUserITARCompliant(@UserID) ");
|
|
||||||
//query.Append("WHERE UserID = @UserID AND AND EmployeeStatus = 'Active'");
|
|
||||||
return this.db.Query<int>(query.ToString(), new { UserID = userID }).SingleOrDefault();
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
public int HasITARAccess(string userID) {
|
||||||
|
StringBuilder query = new("SELECT COUNT(*) FROM dbo.fnIsUserITARCompliant(@UserID) ");
|
||||||
|
return db.Query<int>(query.ToString(), new { UserID = userID }).SingleOrDefault();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,452 +1,583 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using Dapper;
|
using Dapper;
|
||||||
|
|
||||||
|
using Fab2ApprovalSystem.Misc;
|
||||||
using Fab2ApprovalSystem.Models;
|
using Fab2ApprovalSystem.Models;
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
{
|
|
||||||
public class TrainingDMO
|
|
||||||
{
|
|
||||||
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
private static FabApprovalTrainingEntities FabApprovalDB = new FabApprovalTrainingEntities();
|
|
||||||
|
|
||||||
public int Create(int issueId)
|
public class TrainingDMO {
|
||||||
{
|
private readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
var parameters = new DynamicParameters();
|
#if !NET8
|
||||||
|
private static FabApprovalTrainingEntities FabApprovalDB = new FabApprovalTrainingEntities();
|
||||||
|
#endif
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
public int Create(int issueId) {
|
||||||
parameters.Add("@TrainingId", dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
DynamicParameters parameters = new();
|
||||||
parameters.Add("@ECNNumber", issueId);
|
parameters.Add("@TrainingId", dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
||||||
|
parameters.Add("@ECNNumber", issueId);
|
||||||
|
|
||||||
this.db.Execute("InsertTrainingItem", parameters, commandType: CommandType.StoredProcedure);
|
db.Execute("InsertTrainingItem", parameters, commandType: CommandType.StoredProcedure);
|
||||||
int trainingId = parameters.Get<int>("@TrainingId");
|
int trainingId = parameters.Get<int>("@TrainingId");
|
||||||
|
|
||||||
return trainingId;
|
return trainingId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public int CreateAssignment(int trainingId, int userId) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@TrainingID", trainingId);
|
||||||
|
parameters.Add("@UserID", userId);
|
||||||
|
parameters.Add("@AssignmentID", dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
||||||
|
|
||||||
|
db.Execute("InsertTrainingAssignment", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
int assignmentId = parameters.Get<int>("@AssignmentID");
|
||||||
|
|
||||||
|
return assignmentId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IEnumerable<Training> GetAllTrainings() {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
IEnumerable<Training> allTrainings = (from a in db.Trainings select a).ToList();
|
||||||
|
|
||||||
|
return allTrainings;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public Training GetTraining(int trainingId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
Training trainingRecord = new Training();
|
||||||
|
trainingRecord = (from a in db.Trainings where a.TrainingID == trainingId select a).FirstOrDefault();
|
||||||
|
return trainingRecord;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public TrainingAssignment GetAssignment(int assignmentId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
TrainingAssignment assignmentRecord = (from a in db.TrainingAssignments where a.ID == assignmentId select a).FirstOrDefault();
|
||||||
|
return assignmentRecord;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public int GetTrainingId(int issueId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
int ECNId = issueId;
|
||||||
|
int trainingId = (from a in db.Trainings where a.ECN == ECNId select a.TrainingID).FirstOrDefault();
|
||||||
|
|
||||||
|
return trainingId;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<int> GetTrainees(int groupId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var users = (from a in db.TrainingGroupMembers where a.TrainingGroupID == groupId select a.UserID).ToList();
|
||||||
|
|
||||||
|
return users;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool isUserTrainingMember(int groupId, int userId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var users = (from a in db.TrainingGroupMembers where a.TrainingGroupID == groupId && a.UserID == userId select a).FirstOrDefault();
|
||||||
|
|
||||||
|
if (users == null) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
public int CreateAssignment(int trainingId, int userId)
|
#endif
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
#if NET8
|
||||||
//parameters.Add("@TrainingId", dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
throw new NotImplementedException();
|
||||||
parameters.Add("@TrainingID", trainingId);
|
#endif
|
||||||
parameters.Add("@UserID", userId);
|
}
|
||||||
parameters.Add("@AssignmentID", dbType: DbType.Int32, direction: ParameterDirection.InputOutput);
|
|
||||||
|
|
||||||
this.db.Execute("InsertTrainingAssignment", parameters, commandType: CommandType.StoredProcedure);
|
public List<TrainingGroup> GetTrainingGroups() {
|
||||||
int assignmentId = parameters.Get<int>("@AssignmentID");
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
return (from a in db.TrainingGroups select a).ToList();
|
||||||
|
#endif
|
||||||
|
|
||||||
return assignmentId;
|
#if NET8
|
||||||
}
|
System.Text.StringBuilder query = new("SELECT TrainingGroupID, TrainingGroupName FROM TrainingGroups ORDER BY TrainingGroupID");
|
||||||
public IEnumerable<Training> GetAllTrainings()
|
return db.Query<TrainingGroup>(query.ToString()).ToList();
|
||||||
{
|
#endif
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
}
|
||||||
IEnumerable<Training> allTrainings = (from a in db.Trainings select a).ToList();
|
|
||||||
|
|
||||||
return allTrainings;
|
public TrainingGroup GetTrainingGroupByID(int groupId) {
|
||||||
}
|
#if !NET8
|
||||||
public Training GetTraining(int trainingId)
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
{
|
TrainingGroup groups = (from a in db.TrainingGroups where a.TrainingGroupID == groupId select a).FirstOrDefault();
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
return groups;
|
||||||
Training trainingRecord = new Training();
|
#endif
|
||||||
trainingRecord = (from a in db.Trainings where a.TrainingID == trainingId select a).FirstOrDefault();
|
|
||||||
return trainingRecord;
|
|
||||||
}
|
|
||||||
public TrainingAssignment GetAssignment(int assignmentId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
TrainingAssignment assignmentRecord = (from a in db.TrainingAssignments where a.ID == assignmentId select a).FirstOrDefault();
|
|
||||||
return assignmentRecord;
|
|
||||||
}
|
|
||||||
public int GetTrainingId(int issueId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
int ECNId = issueId;
|
|
||||||
int trainingId = (from a in db.Trainings where a.ECN == ECNId select a.TrainingID).FirstOrDefault();
|
|
||||||
|
|
||||||
return trainingId;
|
#if NET8
|
||||||
}
|
throw new NotImplementedException();
|
||||||
public List<int> GetTrainees(int groupId)
|
#endif
|
||||||
{
|
}
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var users = (from a in db.TrainingGroupMembers where a.TrainingGroupID == groupId select a.UserID).ToList();
|
|
||||||
|
|
||||||
return users;
|
public List<int> GetECNAssignedTrainingGroups(int ECNNumber) {
|
||||||
}
|
#if !NET8
|
||||||
public bool isUserTrainingMember(int groupId, int userId)
|
List<int> trainingGroups = (from a in FabApprovalDB.ECNTrainingBies where a.ECNNumber == ECNNumber select a.AcknowledgementTrainingByID).ToList();
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var users = (from a in db.TrainingGroupMembers where a.TrainingGroupID == groupId && a.UserID == userId select a).FirstOrDefault();
|
|
||||||
|
|
||||||
if (users == null)
|
return trainingGroups;
|
||||||
{
|
#endif
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
#if NET8
|
||||||
public List<TrainingGroup> GetTrainingGroups()
|
throw new NotImplementedException();
|
||||||
{
|
#endif
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
}
|
||||||
return (from a in db.TrainingGroups select a).ToList();
|
|
||||||
}
|
|
||||||
public TrainingGroup GetTrainingGroupByID(int groupId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
TrainingGroup groups = (from a in db.TrainingGroups where a.TrainingGroupID == groupId select a).FirstOrDefault();
|
|
||||||
return groups;
|
|
||||||
}
|
|
||||||
public List<int> GetECNAssignedTrainingGroups(int ECNNumber)
|
|
||||||
{
|
|
||||||
List<int> trainingGroups = (from a in FabApprovalDB.ECNTrainingBies where a.ECNNumber == ECNNumber select a.AcknowledgementTrainingByID).ToList();
|
|
||||||
|
|
||||||
return trainingGroups;
|
public void AddTrainingGroupToECN(int ECNNumber, int groupId) {
|
||||||
}
|
#if !NET8
|
||||||
public void AddTrainingGroupToECN(int ECNNumber, int groupId)
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
//ECNTrainingBy ecnTraining = new ECNTrainingBy();
|
|
||||||
//ecnTraining.AcknowledgementTrainingByID = groupId;
|
|
||||||
//ecnTraining.ECNNumber = ECNNumber;
|
|
||||||
|
|
||||||
var parameters = new DynamicParameters();
|
var parameters = new DynamicParameters();
|
||||||
parameters.Add("@ECNNumber", ECNNumber);
|
parameters.Add("@ECNNumber", ECNNumber);
|
||||||
parameters.Add("@TrainingByID", groupId);
|
parameters.Add("@TrainingByID", groupId);
|
||||||
|
|
||||||
this.db.Execute("ECNInsertTrainingBy", parameters, commandType: CommandType.StoredProcedure);
|
this.db.Execute("ECNInsertTrainingBy", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void SetTrainingFlag(int ECNNumber) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("@ECNNumber", ECNNumber);
|
||||||
|
|
||||||
//db.ECNTrainingBies.Add(ecnTraining);
|
this.db.Execute("ECNSetTrainingFlag", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
}
|
#endif
|
||||||
public void SetTrainingFlag(int ECNNumber)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
//ECNTrainingBy ecnTraining = new ECNTrainingBy();
|
|
||||||
//ecnTraining.AcknowledgementTrainingByID = groupId;
|
|
||||||
//ecnTraining.ECNNumber = ECNNumber;
|
|
||||||
|
|
||||||
var parameters = new DynamicParameters();
|
#if NET8
|
||||||
parameters.Add("@ECNNumber", ECNNumber);
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
this.db.Execute("ECNSetTrainingFlag", parameters, commandType: CommandType.StoredProcedure);
|
public List<TrainingAssignment> GetAllTrainingAssignments(int TrainingID) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
|
||||||
|
|
||||||
|
RefreshTrainingData(TrainingID, TrainingData);
|
||||||
|
|
||||||
|
TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
|
||||||
|
|
||||||
|
return TrainingData.ToList();
|
||||||
|
#endif
|
||||||
|
|
||||||
//db.ECNTrainingBies.Add(ecnTraining);
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
}
|
public List<TrainingAssignment> GetTrainingAssignments(int TrainingID) {
|
||||||
public List<TrainingAssignment> GetAllTrainingAssignments(int TrainingID)
|
#if !NET8
|
||||||
{
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID && a.Deleted != true select a;
|
||||||
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
|
|
||||||
|
|
||||||
return TrainingData.ToList();
|
RefreshTrainingData(TrainingID, TrainingData);
|
||||||
}
|
|
||||||
public List<TrainingAssignment> GetTrainingAssignments(int TrainingID)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID && a.Deleted != true select a;
|
|
||||||
|
|
||||||
return TrainingData.ToList();
|
TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID select a;
|
||||||
}
|
|
||||||
public List<TrainingAssignment> GetTrainingAssignmentsByUser(int TrainingID, int userID)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID && a.UserID == userID select a;
|
|
||||||
|
|
||||||
return TrainingData.ToList();
|
return TrainingData.ToList();
|
||||||
}
|
#endif
|
||||||
public List<TrainingDocAck> GetAssignedDocs(int trainingAssignmentId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var docs = (from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentId && a.Deleted != true select a).ToList();
|
|
||||||
|
|
||||||
return docs;
|
#if NET8
|
||||||
}
|
throw new NotImplementedException();
|
||||||
public void AcknowledgeDocument(int trainingDocAckID)
|
#endif
|
||||||
{
|
}
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
|
|
||||||
parameters = new DynamicParameters();
|
public List<TrainingAssignment> GetTrainingAssignmentsByUser(int TrainingID, int userID) {
|
||||||
parameters.Add("@TrainingDocAckID", trainingDocAckID);
|
#if !NET8
|
||||||
//parameters.Add("@AttachmentID", attachmentID);
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var TrainingData = from a in db.TrainingAssignments where a.TrainingID == TrainingID && a.UserID == userID select a;
|
||||||
|
|
||||||
this.db.Execute("TrainingAcknowledgeDocument", parameters, commandType: CommandType.StoredProcedure);
|
return TrainingData.ToList();
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
#if NET8
|
||||||
public void UpdateAssignmentStatus(int trainingAssignmentID)
|
throw new NotImplementedException();
|
||||||
{
|
#endif
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
}
|
||||||
var RecordToUpdate = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a).SingleOrDefault();
|
|
||||||
if(RecordToUpdate.status != true)
|
|
||||||
{
|
|
||||||
RecordToUpdate.DateCompleted = DateTime.Now;
|
|
||||||
RecordToUpdate.status = true;
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db.SaveChanges();
|
|
||||||
}
|
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
string exception = e.ToString();
|
|
||||||
Console.WriteLine(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
public List<TrainingDocAck> GetAssignedDocs(int trainingAssignmentId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var docs = (from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentId && a.Deleted != true select a).ToList();
|
||||||
|
|
||||||
}
|
return docs;
|
||||||
public int GetTrainingIdByAssignment(int trainingAssignmentID)
|
#endif
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
int trainingID = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a.TrainingID).SingleOrDefault();
|
|
||||||
|
|
||||||
return trainingID;
|
#if NET8
|
||||||
}
|
throw new NotImplementedException();
|
||||||
public void UpdateTrainingStatus(int trainingId)
|
#endif
|
||||||
{
|
}
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).SingleOrDefault();
|
|
||||||
|
|
||||||
if (training != null)
|
public void AcknowledgeDocument(int trainingDocAckID) {
|
||||||
{
|
DynamicParameters parameters = new();
|
||||||
training.CompletedDate = DateTime.Now;
|
parameters.Add("@TrainingDocAckID", trainingDocAckID);
|
||||||
training.Status = true;
|
|
||||||
|
|
||||||
try
|
db.Execute("TrainingAcknowledgeDocument", parameters, commandType: CommandType.StoredProcedure);
|
||||||
{
|
}
|
||||||
db.SaveChanges();
|
|
||||||
}
|
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
string exception = e.ToString();
|
|
||||||
Console.WriteLine(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
public void reOpenTraining(int trainingId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).SingleOrDefault();
|
|
||||||
|
|
||||||
if (training != null)
|
public void UpdateAssignmentStatus(int trainingAssignmentID) {
|
||||||
{
|
#if !NET8
|
||||||
training.CompletedDate = null;
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
training.Status = false;
|
var RecordToUpdate = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a).SingleOrDefault();
|
||||||
|
if (RecordToUpdate.status != true) {
|
||||||
try
|
RecordToUpdate.DateCompleted = DateTime.Now;
|
||||||
{
|
RecordToUpdate.status = true;
|
||||||
db.SaveChanges();
|
try {
|
||||||
}
|
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
string exception = e.ToString();
|
|
||||||
Console.WriteLine(e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CheckTrainingStatus(int trainingAssignmentID)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
bool isFinished = true;
|
|
||||||
int trainingID = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a.TrainingID).SingleOrDefault();
|
|
||||||
var trainingAssignments = from a in db.TrainingAssignments where a.TrainingID == trainingID && a.Deleted != true select a;
|
|
||||||
|
|
||||||
foreach (var training in trainingAssignments)
|
|
||||||
{
|
|
||||||
if (training.status == false)
|
|
||||||
{
|
|
||||||
isFinished = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
return isFinished;
|
|
||||||
}
|
|
||||||
|
|
||||||
public bool CheckTrainingAssignmentStatus(int trainingAssignmentID)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
bool isFinished = true;
|
|
||||||
//TrainingDocAck docsAssigned = null;
|
|
||||||
|
|
||||||
var docsAssigned = from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentID && a.Deleted != true select a;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
foreach (var doc in docsAssigned)
|
|
||||||
{
|
|
||||||
if (doc.Reviewed == false)
|
|
||||||
{
|
|
||||||
isFinished = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return isFinished;
|
|
||||||
}
|
|
||||||
public bool IsUserAssigned(int userId, int trainingId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
bool userHasAssignment = false;
|
|
||||||
|
|
||||||
var assignments = (from a in db.TrainingAssignments where a.TrainingID == trainingId && a.UserID == userId && a.Deleted != true select a).ToList();
|
|
||||||
|
|
||||||
if(assignments.Count() > 0)
|
|
||||||
{
|
|
||||||
userHasAssignment = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
return userHasAssignment;
|
|
||||||
}
|
|
||||||
public List<Training> GetTrainings()
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var trainings = from a in db.Trainings select a;
|
|
||||||
|
|
||||||
return trainings.ToList();
|
|
||||||
}
|
|
||||||
public List<TrainingAssignment> GetTrainingAssignmentsByUserID(int userID)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var trainingAssignments = from a in db.TrainingAssignments where a.UserID == userID && a.Deleted != true select a;
|
|
||||||
|
|
||||||
return trainingAssignments.ToList();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void DeleteTrainingAssignment(int trainingAssignmentId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var trainingAssignments = from a in db.TrainingAssignments where a.ID == trainingAssignmentId select a;
|
|
||||||
|
|
||||||
foreach (var item in trainingAssignments)
|
|
||||||
{
|
|
||||||
item.Deleted = true;
|
|
||||||
item.DeletedDate = DateTime.Now;
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
}
|
} catch (InvalidOperationException e) {
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
string exception = e.ToString();
|
string exception = e.ToString();
|
||||||
Console.WriteLine(e);
|
Console.WriteLine(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void DeleteTrainingDocAck(int trainingAssignmentId)
|
#endif
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
var trainingDocAcks = from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentId select a;
|
|
||||||
|
|
||||||
foreach (var item in trainingDocAcks)
|
#if NET8
|
||||||
{
|
throw new NotImplementedException();
|
||||||
item.Deleted = true;
|
#endif
|
||||||
item.DeletedDate = DateTime.Now;
|
}
|
||||||
}
|
|
||||||
try
|
public int GetTrainingIdByAssignment(int trainingAssignmentID) {
|
||||||
{
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
int trainingID = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a.TrainingID).SingleOrDefault();
|
||||||
|
|
||||||
|
return trainingID;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void UpdateTrainingStatus(int trainingId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).SingleOrDefault();
|
||||||
|
|
||||||
|
if (training != null) {
|
||||||
|
training.CompletedDate = DateTime.Now;
|
||||||
|
training.Status = true;
|
||||||
|
|
||||||
|
try {
|
||||||
db.SaveChanges();
|
db.SaveChanges();
|
||||||
}
|
} catch (InvalidOperationException e) {
|
||||||
catch (InvalidOperationException e)
|
|
||||||
{
|
|
||||||
string exception = e.ToString();
|
string exception = e.ToString();
|
||||||
Console.WriteLine(e);
|
Console.WriteLine(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public void DeleteTraining(int trainingId)
|
#endif
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).FirstOrDefault();
|
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void reOpenTraining(int trainingId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).SingleOrDefault();
|
||||||
|
|
||||||
|
if (training != null) {
|
||||||
|
training.CompletedDate = null;
|
||||||
|
training.Status = false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
db.SaveChanges();
|
||||||
|
} catch (InvalidOperationException e) {
|
||||||
|
string exception = e.ToString();
|
||||||
|
Console.WriteLine(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CheckTrainingStatus(int trainingAssignmentID) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
bool isFinished = true;
|
||||||
|
int trainingID = (from a in db.TrainingAssignments where a.ID == trainingAssignmentID select a.TrainingID).SingleOrDefault();
|
||||||
|
var trainingAssignments = from a in db.TrainingAssignments where a.TrainingID == trainingID && a.Deleted != true select a;
|
||||||
|
|
||||||
|
foreach (var training in trainingAssignments) {
|
||||||
|
if (training.status == false) {
|
||||||
|
isFinished = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return isFinished;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CheckTrainingAssignmentStatus(int trainingAssignmentID) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
bool isFinished = true;
|
||||||
|
// TrainingDocAck docsAssigned = null;
|
||||||
|
|
||||||
|
var docsAssigned = from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentID && a.Deleted != true select a;
|
||||||
|
|
||||||
|
foreach (var doc in docsAssigned) {
|
||||||
|
if (doc.Reviewed == false) {
|
||||||
|
isFinished = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return isFinished;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool IsUserAssigned(int userId, int trainingId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
bool userHasAssignment = false;
|
||||||
|
|
||||||
|
var assignments = (from a in db.TrainingAssignments where a.TrainingID == trainingId && a.UserID == userId && a.Deleted != true select a).ToList();
|
||||||
|
|
||||||
|
if (assignments.Count() > 0) {
|
||||||
|
userHasAssignment = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return userHasAssignment;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<Training> GetTrainings() {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var trainings = from a in db.Trainings select a;
|
||||||
|
|
||||||
|
return trainings.ToList();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrainingAssignment> GetTrainingAssignmentsByUserID(int userID) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var trainingAssignments = from a in db.TrainingAssignments where a.UserID == userID && a.Deleted != true select a;
|
||||||
|
|
||||||
|
return trainingAssignments.ToList();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteTrainingAssignment(int trainingAssignmentId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var trainingAssignments = from a in db.TrainingAssignments where a.ID == trainingAssignmentId select a;
|
||||||
|
|
||||||
|
foreach (var item in trainingAssignments) {
|
||||||
|
item.Deleted = true;
|
||||||
|
item.DeletedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
db.SaveChanges();
|
||||||
|
} catch (InvalidOperationException e) {
|
||||||
|
string exception = e.ToString();
|
||||||
|
Console.WriteLine(e);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteTrainingDocAck(int trainingAssignmentId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
var trainingDocAcks = from a in db.TrainingDocAcks where a.TrainingAssignmentID == trainingAssignmentId select a;
|
||||||
|
|
||||||
|
foreach (var item in trainingDocAcks) {
|
||||||
|
item.Deleted = true;
|
||||||
|
item.DeletedDate = DateTime.Now;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
db.SaveChanges();
|
||||||
|
} catch (InvalidOperationException e) {
|
||||||
|
string exception = e.ToString();
|
||||||
|
Console.WriteLine(e);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public void DeleteTraining(int trainingId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
Training training = (from a in db.Trainings where a.TrainingID == trainingId select a).FirstOrDefault();
|
||||||
|
|
||||||
|
if (training != null) {
|
||||||
training.Deleted = true;
|
training.Deleted = true;
|
||||||
training.DeletedDate = DateTime.Now;
|
training.DeletedDate = DateTime.Now;
|
||||||
|
|
||||||
List<TrainingAssignment> trainingAssignments = (from a in db.TrainingAssignments where a.TrainingID == trainingId select a).ToList();
|
|
||||||
db.SaveChanges();
|
|
||||||
foreach (TrainingAssignment trainingAssignment in trainingAssignments)
|
|
||||||
{
|
|
||||||
DeleteTrainingAssignment(trainingAssignment.ID);
|
|
||||||
DeleteTrainingDocAck(trainingAssignment.ID);
|
|
||||||
//db.SaveChanges();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
public void DeleteAssignmentByUserId(int userId)
|
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
|
|
||||||
var userAssignments = (from a in db.TrainingAssignments where a.UserID == userId select a).ToList();
|
List<TrainingAssignment> trainingAssignments = (from a in db.TrainingAssignments where a.TrainingID == trainingId select a).ToList();
|
||||||
|
db.SaveChanges();
|
||||||
foreach (var item in userAssignments)
|
foreach (TrainingAssignment trainingAssignment in trainingAssignments) {
|
||||||
{
|
DeleteTrainingAssignment(trainingAssignment.ID);
|
||||||
//get document assignments
|
DeleteTrainingDocAck(trainingAssignment.ID);
|
||||||
var docAssignments = (from a in db.TrainingDocAcks where a.TrainingAssignmentID == item.TrainingID select a).ToList();
|
|
||||||
//delete each docAssignment
|
|
||||||
foreach (var docAssignment in docAssignments)
|
|
||||||
{
|
|
||||||
DeleteTrainingDocAck(docAssignment.ID);
|
|
||||||
}
|
|
||||||
DeleteTrainingAssignment(item.ID);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
public bool CheckValidDocAck(int docAckId)
|
#endif
|
||||||
{
|
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
|
||||||
TrainingDocAck ack = (from a in db.TrainingDocAcks where a.ID == docAckId select a).FirstOrDefault();
|
|
||||||
|
|
||||||
//TODO Check the user is valid
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
//Check that the assignment exists
|
public void DeleteAssignmentByUserId(int userId) {
|
||||||
if (ack != null)
|
#if !NET8
|
||||||
{
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
//Check that the assignment isn't deleted
|
|
||||||
if (ack.Deleted == true)
|
var userAssignments = (from a in db.TrainingAssignments where a.UserID == userId select a).ToList();
|
||||||
{
|
|
||||||
return false;
|
foreach (var item in userAssignments) {
|
||||||
}
|
// get document assignments
|
||||||
//Check that the assignment isn't completed
|
var docAssignments = (from a in db.TrainingDocAcks where a.TrainingAssignmentID == item.TrainingID select a).ToList();
|
||||||
else if (ack.Reviewed == true)
|
// delete each docAssignment
|
||||||
{
|
foreach (var docAssignment in docAssignments) {
|
||||||
return false;
|
DeleteTrainingDocAck(docAssignment.ID);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
DeleteTrainingAssignment(item.ID);
|
||||||
{
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public bool CheckValidDocAck(int docAckId) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
TrainingDocAck ack = (from a in db.TrainingDocAcks where a.ID == docAckId select a).FirstOrDefault();
|
||||||
|
|
||||||
|
// TODO Check the user is valid
|
||||||
|
|
||||||
|
// Check that the assignment exists
|
||||||
|
if (ack != null) {
|
||||||
|
// Check that the assignment isn't deleted
|
||||||
|
if (ack.Deleted == true) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
// Check that the assignment isn't completed
|
||||||
|
else if (ack.Reviewed == true) {
|
||||||
|
return false;
|
||||||
|
} else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
}
|
#if NET8
|
||||||
public List<Training> GetAllOpenTrainings()
|
throw new NotImplementedException();
|
||||||
{
|
#endif
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
}
|
||||||
List<Training> openTrainings = (from a in db.Trainings where a.Status != true && a.Deleted != true select a).ToList();
|
|
||||||
return openTrainings;
|
public List<Training> GetAllOpenTrainings() {
|
||||||
}
|
#if !NET8
|
||||||
public List<TrainingAssignment> GetOpenAssignmentsByTrainingID(int trainingID)
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
{
|
List<Training> openTrainings = (from a in db.Trainings where a.Status != true && a.Deleted != true select a).ToList();
|
||||||
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
return openTrainings;
|
||||||
List<TrainingAssignment> openAssignments = (from a in FabApprovalDB.TrainingAssignments where a.TrainingID == trainingID && a.status != true && a.Deleted != true select a).ToList();
|
#endif
|
||||||
return openAssignments;
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<TrainingAssignment> GetOpenAssignmentsByTrainingID(int trainingID) {
|
||||||
|
#if !NET8
|
||||||
|
FabApprovalTrainingEntities db = new FabApprovalTrainingEntities();
|
||||||
|
List<TrainingAssignment> openAssignments = (from a in FabApprovalDB.TrainingAssignments where a.TrainingID == trainingID && a.status != true && a.Deleted != true select a).ToList();
|
||||||
|
return openAssignments;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if NET8
|
||||||
|
throw new NotImplementedException();
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
private void RefreshTrainingData(int TrainingID, IQueryable<TrainingAssignment> TrainingData) {
|
||||||
|
bool assignmentIsIncomplete = false;
|
||||||
|
UserAccountDMO userAccountDMO = new();
|
||||||
|
foreach (TrainingAssignment assignment in TrainingData) {
|
||||||
|
LoginModel userModel = userAccountDMO.GetUserByID(assignment.UserID);
|
||||||
|
if (!userModel.IsActive)
|
||||||
|
UpdateAssignmentStatus(assignment.ID);
|
||||||
|
if (assignment.Deleted != true && (assignment.DateCompleted is null || assignment.DateCompleted > DateTime.Now))
|
||||||
|
assignmentIsIncomplete = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!assignmentIsIncomplete)
|
||||||
|
UpdateTrainingStatus(TrainingID);
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,212 +1,133 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Configuration;
|
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Data.SqlClient;
|
using System.Data.SqlClient;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Web;
|
|
||||||
using Dapper;
|
|
||||||
using Fab2ApprovalSystem.Models;
|
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
|
using Dapper;
|
||||||
|
|
||||||
namespace Fab2ApprovalSystem.DMO
|
using Fab2ApprovalSystem.Misc;
|
||||||
{
|
using Fab2ApprovalSystem.Models;
|
||||||
public class UserAccountDMO
|
|
||||||
{
|
|
||||||
private IDbConnection db = new SqlConnection(ConfigurationManager.ConnectionStrings["FabApprovalConnection"].ConnectionString);
|
|
||||||
|
|
||||||
|
namespace Fab2ApprovalSystem.DMO;
|
||||||
|
|
||||||
//public List<LoginModel> GetUser(string loginID)
|
public class UserAccountDMO {
|
||||||
//{
|
private readonly IDbConnection db = new SqlConnection(GlobalVars.DB_CONNECTION_STRING);
|
||||||
// StringBuilder sql = new StringBuilder();
|
|
||||||
// sql.Append("SELECT * FROM Users WHERE LoginID = '" + loginID + "'");
|
|
||||||
|
|
||||||
// return this.db.Query<LoginModel>(sql.ToString()).ToList();
|
public IEnumerable<LoginModel> GetAllUsers() {
|
||||||
//}
|
StringBuilder sql = new();
|
||||||
|
sql.Append(" SELECT U.FirstName + ' ' + U.LastName AS FullName, U.* , U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName ");
|
||||||
|
sql.Append("FROM Users U LEFT JOIN Users U1 ON U.DelegatedTo = U1.UserID ");
|
||||||
|
sql.Append("ORDER BY FirstName ");
|
||||||
|
|
||||||
public IEnumerable<LoginModel> GetAllUsers()
|
return db.Query<LoginModel>(sql.ToString()).ToList();
|
||||||
{
|
}
|
||||||
StringBuilder sql = new StringBuilder();
|
|
||||||
//sql.Append("SELECT U.FirstName + ' ' + U.LastName AS FullName, U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName, U.* ");
|
|
||||||
//sql.Append("FROM Users U LEFT JOIN Users U1 ");
|
|
||||||
//sql.Append("ON U.UserID = U1.DelegatedTo ORDER BY FirstName ");
|
|
||||||
|
|
||||||
//sql.Append("SELECT FirstName + ' ' + LastName AS FullName, * FROM Users ORDER BY FirstName ");
|
public IEnumerable<LoginModel> GetAllActiveUsers() {
|
||||||
sql.Append(" SELECT U.FirstName + ' ' + U.LastName AS FullName, U.* , U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName ");
|
StringBuilder sql = new();
|
||||||
sql.Append("FROM Users U LEFT JOIN Users U1 ON U.DelegatedTo = U1.UserID ");
|
sql.Append(" SELECT U.FirstName + ' ' + U.LastName AS FullName, U.* , U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName ");
|
||||||
sql.Append("ORDER BY FirstName ");
|
sql.Append("FROM Users U LEFT JOIN Users U1 ON U.DelegatedTo = U1.UserID ");
|
||||||
|
sql.Append("WHERE U.IsActive = 1 ");
|
||||||
|
sql.Append("ORDER BY FirstName ");
|
||||||
|
|
||||||
return this.db.Query<LoginModel>(sql.ToString()).ToList();
|
return db.Query<LoginModel>(sql.ToString()).ToList();
|
||||||
}
|
}
|
||||||
public IEnumerable<LoginModel> GetAllActiveUsers()
|
|
||||||
{
|
|
||||||
StringBuilder sql = new StringBuilder();
|
|
||||||
//sql.Append("SELECT U.FirstName + ' ' + U.LastName AS FullName, U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName, U.* ");
|
|
||||||
//sql.Append("FROM Users U LEFT JOIN Users U1 ");
|
|
||||||
//sql.Append("ON U.UserID = U1.DelegatedTo ORDER BY FirstName ");
|
|
||||||
|
|
||||||
//sql.Append("SELECT FirstName + ' ' + LastName AS FullName, * FROM Users ORDER BY FirstName ");
|
public LoginModel GetUser(string loginID) =>
|
||||||
sql.Append(" SELECT U.FirstName + ' ' + U.LastName AS FullName, U.* , U1.FirstName + ' ' + U1.LastName AS DelegatedToFullName ");
|
db.Query<LoginModel>("SELECT FirstName + ' ' + LastName AS FullName, * FROM Users WHERE LoginID = @loginID AND IsActive = 1 ", new { loginID = loginID }).Take(1).SingleOrDefault();
|
||||||
sql.Append("FROM Users U LEFT JOIN Users U1 ON U.DelegatedTo = U1.UserID ");
|
|
||||||
sql.Append("WHERE U.IsActive = 1 ");
|
|
||||||
sql.Append("ORDER BY FirstName ");
|
|
||||||
|
|
||||||
return this.db.Query<LoginModel>(sql.ToString()).ToList();
|
public LoginModel GetUserByID(int userID) {
|
||||||
}
|
return db.Query<LoginModel>(
|
||||||
|
"SELECT FirstName + ' ' + LastName AS FullName, * FROM Users WHERE UserID = @UserID ",
|
||||||
|
new { UserID = userID }).Take(1).SingleOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
public string GetUserEmailByID(int userID) {
|
||||||
|
return db.Query<string>(
|
||||||
|
"SELECT Email FROM Users WHERE UserID = @UserID ",
|
||||||
|
new { UserID = userID }).Take(1).SingleOrDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void UpdateUser(LoginModel model) {
|
||||||
|
string sql;
|
||||||
|
sql = "UPDATE Users SET LoginID = @LoginID, FirstName = @FirstName, LastName = @LastName, Email = @Email, IsActive = @IsActive, IsAdmin = @IsAdmin WHERE UserID = @UserID";
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", model.UserID);
|
||||||
|
parameters.Add("@LoginID", model.LoginID);
|
||||||
|
parameters.Add("@FirstName", model.FirstName);
|
||||||
|
parameters.Add("@LastName", model.LastName);
|
||||||
|
parameters.Add("@Email", model.Email);
|
||||||
|
parameters.Add("@IsAdmin", model.IsAdmin);
|
||||||
|
parameters.Add("@IsActive", model.IsActive);
|
||||||
|
|
||||||
|
db.Execute(sql, parameters);
|
||||||
|
}
|
||||||
|
|
||||||
|
internal void DeleteUser(LoginModel model) {
|
||||||
|
string sql;
|
||||||
|
sql = "UPDATE Users SET IsActive = 0 WHERE UserID = @UserID";
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", model.UserID);
|
||||||
|
|
||||||
public LoginModel GetUser(string loginID)
|
db.Execute(sql, parameters);
|
||||||
{
|
}
|
||||||
//StringBuilder sql = new StringBuilder();
|
|
||||||
//sql.Append("SELECT * FROM Users WHERE LoginID = '" + loginID + "'");
|
|
||||||
|
|
||||||
//return this.db.Query<LoginModel>(sql.ToString()).SingleOrDefault();
|
internal void InsertUser(LoginModel model) {
|
||||||
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", model.UserID, DbType.Int32, direction: ParameterDirection.InputOutput);
|
||||||
|
parameters.Add("@LoginID", model.LoginID);
|
||||||
|
parameters.Add("@FirstName", model.FirstName);
|
||||||
|
parameters.Add("@LastName", model.LastName);
|
||||||
|
parameters.Add("@Email", model.Email);
|
||||||
|
parameters.Add("@IsAdmin", model.IsAdmin);
|
||||||
|
|
||||||
|
db.Execute("InsertUsers", parameters, commandType: CommandType.StoredProcedure);
|
||||||
|
int userid = parameters.Get<int>("@UserID");
|
||||||
|
model.UserID = userid;
|
||||||
|
}
|
||||||
|
|
||||||
return this.db.Query<LoginModel>("SELECT FirstName + ' ' + LastName AS FullName, * FROM Users WHERE LoginID = @loginID AND IsActive = 1 ", new { loginID = loginID }).Take(1).SingleOrDefault();
|
internal void UpdateInsertITARAccess(string userID, string hasITARAccess) {
|
||||||
}
|
DynamicParameters parameters = new();
|
||||||
|
parameters.Add("@UserID", userID);
|
||||||
|
parameters.Add("@HasITARAccess", hasITARAccess);
|
||||||
|
|
||||||
public LoginModel GetUserByID(int userID)
|
db.Execute("ITARAccessUpdateInsert", parameters, commandType: CommandType.StoredProcedure);
|
||||||
{
|
}
|
||||||
return this.db.Query<LoginModel>(
|
|
||||||
"SELECT FirstName + ' ' + LastName AS FullName, * FROM Users WHERE UserID = @UserID ",
|
|
||||||
new { UserID = userID }).Take(1).SingleOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
public string GetUserEmailByID(string userID)
|
internal bool GetITARAccess(int userID) {
|
||||||
{
|
DynamicParameters parameters = new();
|
||||||
return this.db.Query<string>(
|
parameters.Add("@UserID", userID);
|
||||||
"SELECT Email FROM Users WHERE UserID = @UserID ",
|
|
||||||
new { UserID = userID }).Take(1).SingleOrDefault();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
var results = db.Query<string>(
|
||||||
///
|
"SELECT HasITARAccess FROM SAMUsers, Users WHERE Users.UserID = @UserID AND SAMUsers.UserID = Users.LoginID",
|
||||||
/// </summary>
|
parameters, commandType: CommandType.Text);
|
||||||
/// <param name="model"></param>
|
if ((results != null) && (results.Count() > 0) && (results.First() == "1"))
|
||||||
internal void UpdateUser(LoginModel model)
|
return true;
|
||||||
{
|
|
||||||
string sql;
|
|
||||||
sql = "UPDATE Users SET LoginID = @LoginID, FirstName = @FirstName, LastName = @LastName, Email = @Email, IsActive = @IsActive, IsAdmin = @IsAdmin WHERE UserID = @UserID";
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", model.UserID);
|
|
||||||
parameters.Add("@LoginID", model.LoginID);
|
|
||||||
parameters.Add("@FirstName", model.FirstName);
|
|
||||||
parameters.Add("@LastName", model.LastName );
|
|
||||||
parameters.Add("@Email", model.Email);
|
|
||||||
parameters.Add("@IsAdmin", model.IsAdmin);
|
|
||||||
parameters.Add("@IsActive", model.IsActive);
|
|
||||||
|
|
||||||
this.db.Execute(sql, parameters);
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
internal bool GetEC_AD_Users(string userID) {
|
||||||
///
|
DynamicParameters parameters = new();
|
||||||
/// </summary>
|
parameters.Add("@UserID", userID);
|
||||||
/// <param name="model"></param>
|
|
||||||
internal void DeleteUser(LoginModel model)
|
|
||||||
{
|
|
||||||
string sql;
|
|
||||||
//sql = "DELETE Users WHERE UserID = @UserID";
|
|
||||||
sql = "UPDATE Users SET IsActive = 0 WHERE UserID = @UserID";
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", model.UserID);
|
|
||||||
|
|
||||||
this.db.Execute(sql, parameters);
|
var results = db.Query<string>(
|
||||||
}
|
"SELECT UserID FROM EC_AD_Users WHERE UserID = @UserID",
|
||||||
|
parameters, commandType: CommandType.Text);
|
||||||
|
if ((results != null) && (results.Count() > 0))
|
||||||
|
return true;
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
internal void ProcessOoO() {
|
||||||
///
|
DynamicParameters parameters = new();
|
||||||
/// </summary>
|
db.Execute("ProcesOOOEnableStatus", commandType: CommandType.StoredProcedure);
|
||||||
/// <param name="model"></param>
|
}
|
||||||
internal void InsertUser(LoginModel model)
|
|
||||||
{
|
|
||||||
//string sql;
|
|
||||||
//sql = "INSERT Users (LoginID, FirstName, LastName, IsAdmin) VALUES (@LoginID, @FirstName, @LastName, @IsAdmin )";
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", model.UserID, DbType.Int32, direction: ParameterDirection.InputOutput);
|
|
||||||
parameters.Add("@LoginID", model.LoginID);
|
|
||||||
parameters.Add("@FirstName", model.FirstName);
|
|
||||||
parameters.Add("@LastName", model.LastName);
|
|
||||||
parameters.Add("@Email", model.Email);
|
|
||||||
parameters.Add("@IsAdmin", model.IsAdmin);
|
|
||||||
|
|
||||||
this.db.Execute("InsertUsers", parameters, commandType: CommandType.StoredProcedure);
|
internal void ExpireOoO() {
|
||||||
int userid = parameters.Get<int>("@UserID");
|
DynamicParameters parameters = new();
|
||||||
model.UserID = userid;
|
db.Execute("ProcesOOOExpiration", commandType: CommandType.StoredProcedure);
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userID"></param>
|
|
||||||
/// <param name="hasITARAccess"></param>
|
|
||||||
internal void UpdateInsertITARAccess(string userID, string hasITARAccess)
|
|
||||||
{
|
|
||||||
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userID);
|
|
||||||
parameters.Add("@HasITARAccess", hasITARAccess);
|
|
||||||
|
|
||||||
this.db.Execute("ITARAccessUpdateInsert", parameters, commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userID"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
internal bool GetITARAccess(int userID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userID);
|
|
||||||
|
|
||||||
var results = this.db.Query<string>(
|
|
||||||
"SELECT HasITARAccess FROM SAMUsers, Users WHERE Users.UserID = @UserID AND SAMUsers.UserID = Users.LoginID",
|
|
||||||
parameters, commandType: CommandType.Text);
|
|
||||||
if ((results != null) && (results.Count() > 0) && (results.First() == "1"))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
///
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="userID"></param>
|
|
||||||
/// <returns></returns>
|
|
||||||
internal bool GetEC_AD_Users(string userID)
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
parameters.Add("@UserID", userID);
|
|
||||||
|
|
||||||
var results = this.db.Query<string>(
|
|
||||||
"SELECT UserID FROM EC_AD_Users WHERE UserID = @UserID",
|
|
||||||
parameters, commandType: CommandType.Text);
|
|
||||||
if ((results != null) && (results.Count() > 0))
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
internal void ProcessOoO()
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
this.db.Execute("ProcesOOOEnableStatus", commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
}
|
|
||||||
internal void ExpireOoO()
|
|
||||||
{
|
|
||||||
var parameters = new DynamicParameters();
|
|
||||||
this.db.Execute("ProcesOOOExpiration", commandType: CommandType.StoredProcedure);
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
File diff suppressed because it is too large
Load Diff
@ -13,7 +13,7 @@ Title: {1}
|
|||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
https://messa016ec.ec.local/{0}/Edit?IssueID={2}
|
https://messa016ec.infineon.com/{0}/Edit?IssueID={2}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
Please log on to the Approval website to view the assignment and act accordingly
|
Please log on to the Approval website to view the assignment and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={4}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={4}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Corrective Action# {0} is ready for your approval. Please log on to the Approval website and review this item for <strong>FINAL Approval or Rejection</strong>.
|
Corrective Action# {0} is ready for your approval. Please log on to the Approval website and review this item for <strong>FINAL Approval or Rejection</strong>.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -7,7 +7,7 @@ Corrective Action# {0} has been assigned to you.
|
|||||||
Please log on to the Approval website to view the assignment and act accordingly
|
Please log on to the Approval website to view the assignment and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={3}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={3}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
D3 Due Date: {4}
|
D3 Due Date: {4}
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -6,7 +6,7 @@ Corrective Action {0} has been completed
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={2}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={2}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Thank you for your effort. Follow up date has been set for {3}
|
Thank you for your effort. Follow up date has been set for {3}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
@ -8,7 +8,7 @@ Action needs to be completed by {1}
|
|||||||
Please log on to the Approval website to view the assignment and act accordingly
|
Please log on to the Approval website to view the assignment and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/Audit/Edit?issueID={4}
|
https://messa016ec.infineon.com/Audit/Edit?issueID={4}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Corrective Action# {0} Re-Assigned to you for you approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
Corrective Action# {0} Re-Assigned to you for you approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -9,7 +9,7 @@ Reason For Reject:
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Please log on to the Approval website and review this item for re-submission.
|
Please log on to the Approval website and review this item for re-submission.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -7,7 +7,7 @@ Corrective Action# {0} section {3} has been approved.
|
|||||||
Please log on to the Approval website to view the section and act accordingly
|
Please log on to the Approval website to view the section and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -7,7 +7,7 @@ Corrective Action# {0} section {3} has been assigned to you for approval.
|
|||||||
Please log on to the Approval website to view the assignment and act accordingly
|
Please log on to the Approval website to view the assignment and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -1,13 +1,16 @@
|
|||||||
<font size="2" face="verdana">
|
<font size="2" face="verdana">
|
||||||
*****Please DO NOT reply to this email*****
|
*****Please DO NOT reply to this email*****
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Corrective Action# {0} section {3} has been rejected.
|
Corrective Action# {0} section {3} has been rejected by {4}.
|
||||||
|
<br/><br/>
|
||||||
|
|
||||||
|
Rejection reason: {5}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
Please log on to the Approval website to view the section and act accordingly
|
Please log on to the Approval website to view the section and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
{2}/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -7,7 +7,7 @@ Corrective Action# {1} section D5/D6/D7(Corrective/Preventitive Actions) has bee
|
|||||||
Please log on to the Approval website to view the section and act accordingly
|
Please log on to the Approval website to view the section and act accordingly
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={0}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={0}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Corrective Action# {0} section {4} is {3}. Please log on to the Approval website and review this item for <strong>completion</strong>.
|
Corrective Action# {0} section {4} is {3}. Please log on to the Approval website and review this item for <strong>completion</strong>.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/CorrectiveAction/Edit?issueID={1}
|
https://messa016ec.infineon.com/CorrectiveAction/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
D3 Due Date: {5}
|
D3 Due Date: {5}
|
||||||
<br/>
|
<br/>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{3}# {0} Delegated to you for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
{3}# {0} Delegated to you for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/{3}/Edit?issueID={1}
|
https://messa016ec.infineon.com/{3}/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Rejection Comment: {5}
|
Rejection Comment: {5}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
ECN# {1} was Approved.
|
ECN# {1} was Approved.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Thank you!
|
Thank you!
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{3}# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
{3}# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{3}# {0} Re-Assigned to you for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
{3}# {0} Re-Assigned to you for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Comments: {4}
|
Comments: {4}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Rejection Comment: {5}
|
Rejection Comment: {5}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
A new training assignment has been assigned to you for ECN# {1}
|
A new training assignment has been assigned to you for ECN# {1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
Please click here to view: <a href="https://messa016ec.ec.local/Training/ViewMyTrainingAssignment?assignmentID={0}&ECNNumber={1}">Click Here.</a>
|
Please click here to view: <a href="https://messa016ec.infineon.com/Training/ViewMyTrainingAssignment?assignmentID={0}&ECNNumber={1}">Click Here.</a>
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
{3}# {0} has been Approved. The expiration date is {4}
|
{3}# {0} has been Approved. The expiration date is {4}
|
||||||
Please review the approved ETECN form in the attachment.
|
Please review the approved ETECN form in the attachment.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/ECN/Edit?issueID={1}
|
https://messa016ec.infineon.com/ECN/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Lot Disposition# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
Lot Disposition# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/LotDisposition/Edit?issueID={1}
|
https://messa016ec.infineon.com/LotDisposition/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Lot Disposition# {0} Re-Assigned to you for you approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
Lot Disposition# {0} Re-Assigned to you for you approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/LotDisposition/Edit?issueID={1}
|
https://messa016ec.infineon.com/LotDisposition/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Lot Disposition# {0} was rejected by {3}. Please log on to the Approval website and review this item for re-submission.
|
Lot Disposition# {0} was rejected by {3}. Please log on to the Approval website and review this item for re-submission.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/LotDisposition/Edit?issueID={1}
|
https://messa016ec.infineon.com/LotDisposition/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Lot Traveler for Lot# {3} , Request# {0} has a been created. Please login in to the Fab Approval System to review the change.
|
Lot Traveler for Lot# {3} , Request# {0} has a been created. Please login in to the Fab Approval System to review the change.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/LotTraveler/Edit?issueID={1}
|
https://messa016ec.infineon.com/LotTraveler/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact the site administrator.
|
If you have any questions or trouble logging on please contact the site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
Lot Traveler for Lot# {3} , Request# {0} has a new Revision. Please login in to the Fab Approval System to review the change.
|
Lot Traveler for Lot# {3} , Request# {0} has a new Revision. Please login in to the Fab Approval System to review the change.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/LotTraveler/Edit?issueID={1}
|
https://messa016ec.infineon.com/LotTraveler/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact the site administrator.
|
If you have any questions or trouble logging on please contact the site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
MRB# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval.
|
MRB# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/MRB/Edit?issueID={1}
|
https://messa016ec.infineon.com/MRB/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{3}# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
{3}# {0} is ready for your approval. Please log on to the Approval website and review this item for Approval or Rejection.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/PartsRequest/Edit?issueID={1}
|
https://messa016ec.infineon.com/PartsRequest/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
<br/><br/>
|
<br/><br/>
|
||||||
{3}# {0} has been completed.
|
{3}# {0} has been completed.
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
https://messa016ec.ec.local/PartsRequest/Edit?issueID={1}
|
https://messa016ec.infineon.com/PartsRequest/Edit?issueID={1}
|
||||||
<br/><br/>
|
<br/><br/>
|
||||||
|
|
||||||
If you have any questions or trouble logging on please contact a site administrator.
|
If you have any questions or trouble logging on please contact a site administrator.
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user