refacto(EGUser): rename FormUser
This commit is contained in:
parent
07381e78b4
commit
0800e4d13e
@ -37,7 +37,7 @@ Public Class EnvelopeModel
|
||||
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
||||
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
|
||||
.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),
|
||||
.ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing),
|
||||
.ExpiresWhenDays = pRow.ItemEx("EXPIRES_WHEN_DAYS", 0),
|
||||
|
||||
@ -4,7 +4,7 @@ Imports EnvelopeGenerator.Domain.Entities
|
||||
|
||||
Public Class State
|
||||
Public Property UserId As Integer
|
||||
Public Property User As EGUser
|
||||
Public Property User As FormUser
|
||||
Public Property Config As Config
|
||||
Public Property DbConfig As DbConfig
|
||||
Public Property LogConfig As LogConfig
|
||||
|
||||
@ -9,8 +9,8 @@ Public Class UserModel
|
||||
MyBase.New(pState)
|
||||
End Sub
|
||||
|
||||
Private Function ToUser(pRow As DataRow) As EGUser
|
||||
Dim oUser = New EGUser() With {
|
||||
Private Function ToUser(pRow As DataRow) As FormUser
|
||||
Dim oUser = New FormUser() 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 EGUser) As EGUser
|
||||
Public Function CheckUserLogin(pUser As FormUser) As FormUser
|
||||
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 EGUser
|
||||
Public Function SelectUser() As FormUser
|
||||
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 EGUser
|
||||
Public Function SelectUser(pUserID As Integer) As FormUser
|
||||
Try
|
||||
Dim oSql = $"SELECT * FROM [dbo].[TBDD_USER] WHERE GUID = {pUserID}"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
|
||||
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,
|
||||
Prename = user.Prename,
|
||||
@ -4,9 +4,8 @@ using DigitalData.UserManager.Domain.Entities;
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBDD_USER", Schema = "dbo")]
|
||||
public class EGUser : User
|
||||
public class FormUser : User
|
||||
{
|
||||
#region FORM_APP
|
||||
[NotMapped]
|
||||
public bool HasAccess { get; set; }
|
||||
|
||||
@ -18,6 +17,5 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[NotMapped]
|
||||
public string FullName => $"{Prename} {Name}";
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@ -11,7 +11,7 @@ Module ModuleSettings
|
||||
Public DB_DD_ECM As MSSQLServer = Nothing
|
||||
Public DEF_TF_ENABLED 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 SQL_REP_ENV_USER_LM As String = ""
|
||||
Public SQL_REP_ENV_USER_TM As String = ""
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user