refacto(EGUser): rename FormUser

This commit is contained in:
2025-06-26 16:49:56 +02:00
parent 07381e78b4
commit 0800e4d13e
6 changed files with 12 additions and 14 deletions

View File

@@ -37,7 +37,7 @@ Public Class EnvelopeModel
.AddedWhen = pRow.Item("ADDED_WHEN"), .AddedWhen = pRow.Item("ADDED_WHEN"),
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing), .ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
.CertificationType = ObjectEx.ToEnum(Of CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", CertificationType.AdvancedElectronicSignature.ToString())), .CertificationType = ObjectEx.ToEnum(Of CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", CertificationType.AdvancedElectronicSignature.ToString())),
.User = New EGUser(), .User = New FormUser(),
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing), .ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
.ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing), .ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing),
.ExpiresWhenDays = pRow.ItemEx("EXPIRES_WHEN_DAYS", 0), .ExpiresWhenDays = pRow.ItemEx("EXPIRES_WHEN_DAYS", 0),

View File

@@ -4,7 +4,7 @@ Imports EnvelopeGenerator.Domain.Entities
Public Class State Public Class State
Public Property UserId As Integer Public Property UserId As Integer
Public Property User As EGUser Public Property User As FormUser
Public Property Config As Config Public Property Config As Config
Public Property DbConfig As DbConfig Public Property DbConfig As DbConfig
Public Property LogConfig As LogConfig Public Property LogConfig As LogConfig

View File

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

View File

@@ -2,11 +2,11 @@
namespace EnvelopeGenerator.Domain.Entities namespace EnvelopeGenerator.Domain.Entities
{ {
public static class EGUserExtensions public static class FormExtensions
{ {
public static EGUser ToEGUser(this User user) public static FormUser ToEGUser(this User user)
{ {
return new EGUser() return new FormUser()
{ {
Id = user.Id, Id = user.Id,
Prename = user.Prename, Prename = user.Prename,

View File

@@ -4,9 +4,8 @@ using DigitalData.UserManager.Domain.Entities;
namespace EnvelopeGenerator.Domain.Entities namespace EnvelopeGenerator.Domain.Entities
{ {
[Table("TBDD_USER", Schema = "dbo")] [Table("TBDD_USER", Schema = "dbo")]
public class EGUser : User public class FormUser : User
{ {
#region FORM_APP
[NotMapped] [NotMapped]
public bool HasAccess { get; set; } public bool HasAccess { get; set; }
@@ -18,6 +17,5 @@ namespace EnvelopeGenerator.Domain.Entities
[NotMapped] [NotMapped]
public string FullName => $"{Prename} {Name}"; public string FullName => $"{Prename} {Name}";
#endregion
} }
} }

View File

@@ -11,7 +11,7 @@ Module ModuleSettings
Public DB_DD_ECM As MSSQLServer = Nothing Public DB_DD_ECM As MSSQLServer = Nothing
Public DEF_TF_ENABLED As Boolean = False Public DEF_TF_ENABLED As Boolean = False
Public DEF_TF_ENABLED_WITH_PHONE As Boolean = False Public DEF_TF_ENABLED_WITH_PHONE As Boolean = False
Public MYUSER As EGUser Public MYUSER As FormUser
Public MyTempFiles As TempFiles Public MyTempFiles As TempFiles
Public SQL_REP_ENV_USER_LM As String = "" Public SQL_REP_ENV_USER_LM As String = ""
Public SQL_REP_ENV_USER_TM As String = "" Public SQL_REP_ENV_USER_TM As String = ""