G
Guest
Hi,
Im make an application to register users...
This application first check if the user exists, and if not, add the user to
database.
I have:
------------- class database---------------:
- A method to verify if the user exists.
* if the user exists call a method that fire an event (UserExists event)
* if the user dont exists call a method that fire an event
(UsernotExists event)
- A method to add a user.
* IF the user was added call a method that fire an event(Useradded event)
* IF the user was added call a method that fire an event(Usernotadded
event)
----------------class User---------------------:
- this class is suscribed to the UserExists and UserDontExists events.
- this class is suscribed to the UserAdded and UsernotAdded events.
- A method called Manage User:
* Makes an instance of the database class, and call to the userexist
method
----------------------------------------------------
I would like to know what its the best way to do that, cause following this
way i follow, i need to have 4 events in the database class (user exists,
user dont exists, user added, user dont added), and comunicate this events
with the class user, and then have another 4 events for the user class to
comunicate these events to the WebForm.aspx.cs that its the page that makes
an instance of the User Class when the button of register its clicked.
Any advice would be grateful.
Im make an application to register users...
This application first check if the user exists, and if not, add the user to
database.
I have:
------------- class database---------------:
- A method to verify if the user exists.
* if the user exists call a method that fire an event (UserExists event)
* if the user dont exists call a method that fire an event
(UsernotExists event)
- A method to add a user.
* IF the user was added call a method that fire an event(Useradded event)
* IF the user was added call a method that fire an event(Usernotadded
event)
----------------class User---------------------:
- this class is suscribed to the UserExists and UserDontExists events.
- this class is suscribed to the UserAdded and UsernotAdded events.
- A method called Manage User:
* Makes an instance of the database class, and call to the userexist
method
----------------------------------------------------
I would like to know what its the best way to do that, cause following this
way i follow, i need to have 4 events in the database class (user exists,
user dont exists, user added, user dont added), and comunicate this events
with the class user, and then have another 4 events for the user class to
comunicate these events to the WebForm.aspx.cs that its the page that makes
an instance of the User Class when the button of register its clicked.
Any advice would be grateful.