C# Class EventManagerPro.ViewModels.EventsViewModel

ViewModel class to be used for EventsView, which displays a list of events to the user who is currently logged in.
Inheritance: BaseViewModel
Show file Open project: sagittaros/EventManagerModel Class Usage Examples

Public Methods

Method Description
DeleteEvent ( int id ) : void

Deletes an event based on ID from the database.

EventsViewModel ( ) : System

Constructor for EventsViewModel class.

RegisterGuest ( int eventId ) : bool

Registers the current logged in user for an event.

UnregisterGuest ( int eventId ) : bool

Unregisters the current logged in user for the event.

UpdateCreatedEvents ( ) : void

Get events created by the logged in user from the database and update the List for created events.

UpdateRegisteredEvents ( ) : void

Get events registered by the logged in user from the database and update the List for registered events.

UpdateUpcomingEvents ( ) : void

Get upcoming events from the database and update the List for upcoming events.

Method Details

DeleteEvent() public method

Deletes an event based on ID from the database.
public DeleteEvent ( int id ) : void
id int Event ID
return void

EventsViewModel() public method

Constructor for EventsViewModel class.
public EventsViewModel ( ) : System
return System

RegisterGuest() public method

Registers the current logged in user for an event.
public RegisterGuest ( int eventId ) : bool
eventId int Event ID
return bool

UnregisterGuest() public method

Unregisters the current logged in user for the event.
public UnregisterGuest ( int eventId ) : bool
eventId int Event ID
return bool

UpdateCreatedEvents() public method

Get events created by the logged in user from the database and update the List for created events.
public UpdateCreatedEvents ( ) : void
return void

UpdateRegisteredEvents() public method

Get events registered by the logged in user from the database and update the List for registered events.
public UpdateRegisteredEvents ( ) : void
return void

UpdateUpcomingEvents() public method

Get upcoming events from the database and update the List for upcoming events.
public UpdateUpcomingEvents ( ) : void
return void