Replace User class with EGUser across the codebase

This commit introduces the new `EGUser` class, which replaces the existing `User` class in multiple files, including `EnvelopeModel.vb`, `State.vb`, and `UserModel.vb`. The `EGUser` class extends `User`, adding new properties while maintaining existing functionality.

Key changes include:
- Updated property types from `User` to `EGUser` in relevant models.
- Method signatures in `UserModel.vb` modified to accept and return `EGUser`.
- Domain entities in `Envelope.cs` and `EnvelopeHistory.cs` now reference `EGUser`.
- Complete removal of the `User.cs` file.
- Added a new package reference for `UserManager.Domain` in the project file.
- Updated `MYUSER` variable in `ModuleSettings.vb` to use `EGUser`.

These changes enhance the user model to better meet application requirements.
This commit is contained in:
2025-06-26 14:26:21 +02:00
parent db05183137
commit ff1e9f27af
9 changed files with 61 additions and 123 deletions

View File

@@ -9,8 +9,8 @@ Public Class UserModel
MyBase.New(pState)
End Sub
Private Function ToUser(pRow As DataRow) As User
Dim oUser = New User() With {
Private Function ToUser(pRow As DataRow) As EGUser
Dim oUser = New EGUser() With {
.Id = pRow.ItemEx("GUID", 0),
.Prename = pRow.ItemEx("PRENAME", ""),
.Name = pRow.ItemEx("NAME", ""),
@@ -22,7 +22,7 @@ Public Class UserModel
Return oUser
End Function
Public Function CheckUserLogin(pUser As User) As User
Public Function CheckUserLogin(pUser As EGUser) As EGUser
Try
Dim oSql = $"SELECT * FROM [dbo].[FNDD_LOGIN_USER_MODULE] ('{pUser.Username}', 'SIG_ENV_CR', 1)"
Dim oTable As DataTable = Database.GetDatatable(oSql)
@@ -45,7 +45,7 @@ Public Class UserModel
End Try
End Function
Public Function SelectUser() As User
Public Function SelectUser() As EGUser
Try
Dim oSql = $"SELECT * FROM [dbo].[TBDD_USER] WHERE GUID = {State.UserId}"
Dim oTable = Database.GetDatatable(oSql)
@@ -58,7 +58,7 @@ Public Class UserModel
End Try
End Function
Public Function SelectUser(pUserID As Integer) As User
Public Function SelectUser(pUserID As Integer) As EGUser
Try
Dim oSql = $"SELECT * FROM [dbo].[TBDD_USER] WHERE GUID = {pUserID}"
Dim oTable = Database.GetDatatable(oSql)