Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Ordering User Table
Message
De
27/04/2005 12:03:59
Bill Benton
North Florida Software Services
Middleburg, Floride, États-Unis
 
 
À
26/04/2005 16:50:52
Jason Mesches
Ocean Systems Engineering Corporation
Carlsbad, Californie, États-Unis
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
Environment:
C# 1.1
OS:
Windows 2000 SP4
Network:
Windows 2000 Pro
Database:
MS SQL Server
Divers
Thread ID:
01007872
Message ID:
01008895
Vues:
15
>PMFJI, Bill,
>
>I think this should be:
>
>
>public override mmUser CreateUserObject()
>{
>   return new YourUserObject();
>}
>
>
>
>If that doesn't work, I would suggest stepping through the code that's calling CreateUserObject() to see where the disconnect occurs.
>
>FYI, we haven't had the need to subclass mmUser, but we have subclassed several other objects this way and it works for us as advertised.
>
>Hope that helps,
>---J
>
>>Kevin,
>>
>>I created a new MyUser.cs, and copied everything from mmUser.cs. I changed the reference in the factory.cs to read:
>>
>>public virtual MyUser CreateUserObject()
>> {
>> return new MyUser();
>> }
>>
>>The application is still looking at mmUser.cs for everything.
>>
>>I must be doing something wrong.
>>
>>
>>
>>>Bill,
>>>ck
>>>>I attempted to modify the method "GetAllUserNamesCmd" in mmuser, but it still regers to the initial method. This is the mmuser.cs that was brought up in the debugger. Is it possible that it could be returning the valus from other mmUser.cs?
>>>
>>>Are you talking about the Users maintenance form (mmUsersForm)? If so, the command that's being called is mmUser.GetAllUsers(). If you want to change the command that's being executed, do the following:
>>>
>>>1. Sublcass mmUser
>>>
>>>2. In the constructor of your subclass, set the GetAllUserNamesCmd property value to the SELECT command you need
>>>
>>>3. In your application's Factory.cs file, override the CreateUserObject() method and return a reference to your subclass of mmUser. For example:
>>>
>>>
return new MyUser();
>>>
>>>Regards,




I have modified Factory.cs (not mmFactory.cs) with the fillowing code:

public class Factory : OakLeaf.MM.Main.Patterns.mmFactory
{
public override mmUser CreateUserObject()
{
return new MyUser();
}

}


I am getting the following error:



c:\inetpub\wwwroot\PMR\Factory.cs(15): Cannot implicitly convert type 'OakLeaf.MM.Main.Security.MyUser' to 'OakLeaf.MM.Main.Security.mmUser'

I have no idea where to go from hers!
Bill Benton
Senior Systems Analyst
Nuvell Financial Services
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform