Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Overridning MM Security Object
Message
De
10/12/2007 23:06:47
Raihiemie Razak
Smart Brain Sdn. Bhd.
Malaisie
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01274484
Message ID:
01274690
Vues:
9
Hi Bob,

I faced the same problem as yours before. What I did was,

Step 1 : I create a class inside my BO. The codes are as follows:-

Imports System.Data
Imports System.Collections.Generic
Imports System.ComponentModel

Imports OakLeaf.MM.Main.Business
Imports OakLeaf.MM.Main.Collections
Imports OakLeaf.MM.Main.Data
Imports OakLeaf.MM.Main.Security

'''
''' Summary description for Pengguna
'''

Partial Public Class Pengguna
Inherits mmUser


'''
''' Constructor
'''

Public Sub New()
Me.TableName = "Pengguna"
Me.PrimaryKey = "PK_Pengguna"
Me.DefaultCommandType = CommandType.Text
End Sub
End Class

Step 2 : Build the BO.
Step 3 : In Factory.vb, Imports the BO and overrides CreateUserObject function.

Your codes should look like this :-

Imports System

Imports OakLeaf.MM.Main.Security
Imports OakLeaf.MM.Main.Managers
Imports OakLeaf.MM.Main.Patterns
Imports SB.HRMS.Business

' Application-level Factory
Public Class Factory
Inherits mmFactory

' Creates a new User business object
Public Overrides Function CreateUserObject() As mmUser
Return New Pengguna
End Function

End Class

Step 4 : In UserAdmin.aspx.vb, modify LoadUser() and SaveUser() functions depending on your new table structure.

e.g.

User("IDPengguna") = Me.txtUserId.Text
User("KataLaluan") = Me.txtPassword.Text

Have a try. It did work for me.

Regards,
Raihiemie
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform