C# Class RockWeb.Blocks.Prayer.PrayerSession

Inheritance: Rock.Web.UI.RockBlock
Show file Open project: CentralAZ/Rockit-CentralAZ

Protected Methods

Method Description
OnInit ( EventArgs e ) : void

Handles the E:System.Web.UI.Control.Init event.

OnLoad ( EventArgs e ) : void

Handles the E:System.Web.UI.Control.Load event.

lbFlag_Click ( object sender, EventArgs e ) : void

Called when the user clicks on the "Flag" button.

lbNext_Click ( object sender, EventArgs e ) : void

Handler that gets the next prayer request and updates its prayer count.

lbStartAgain_Click ( object sender, EventArgs e ) : void

Handler for when/if the user wants to start a new prayer session.

lbStart_Click ( object sender, EventArgs e ) : void

Handler that saves the user's category preferences and starts a prayer session for their selected categories.

lbStop_Click ( object sender, EventArgs e ) : void

Handler for when the user has decided to call it quits for their current prayer session.

mdFlag_SaveClick ( object sender, EventArgs e ) : void

Handles the SaveClick event of the mdFlag control and flags the prayer request and moves to the next.

Private Methods

Method Description
BindCategories ( string categoryGuid ) : bool

Binds the 'active' categories for the given top-level category GUID to the list for the user to choose.

DisplayCategories ( ) : void

Displays any 'active' prayer categories or shows a message if there are none.

SaveUserPreferences ( string settingPrefix ) : void

Saves the users selected prayer categories for use during the next prayer session.

SetAndDisplayPrayerRequests ( RockCheckBoxList categoriesList ) : void

Finds all approved prayer requests for the given selected categories and orders them by least prayed-for. Also updates the prayer count for the first item in the list.

SetNoteType ( ) : void

Sets the type of the note.

ShowPrayerRequest ( PrayerRequest prayerRequest, RockContext rockContext ) : void

Displays the details for a single, given prayer request.

UpdateSessionCountLabel ( int currentNumber, int total ) : void

Updates the Hightlight label that shows how many prayers have been made out of the total for this session.

Method Details

OnInit() protected method

Handles the E:System.Web.UI.Control.Init event.
protected OnInit ( EventArgs e ) : void
e System.EventArgs An object that contains the event data.
return void

OnLoad() protected method

Handles the E:System.Web.UI.Control.Load event.
protected OnLoad ( EventArgs e ) : void
e System.EventArgs The object that contains the event data.
return void

lbFlag_Click() protected method

Called when the user clicks on the "Flag" button.
protected lbFlag_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

lbNext_Click() protected method

Handler that gets the next prayer request and updates its prayer count.
protected lbNext_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

lbStartAgain_Click() protected method

Handler for when/if the user wants to start a new prayer session.
protected lbStartAgain_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

lbStart_Click() protected method

Handler that saves the user's category preferences and starts a prayer session for their selected categories.
protected lbStart_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

lbStop_Click() protected method

Handler for when the user has decided to call it quits for their current prayer session.
protected lbStop_Click ( object sender, EventArgs e ) : void
sender object
e System.EventArgs
return void

mdFlag_SaveClick() protected method

Handles the SaveClick event of the mdFlag control and flags the prayer request and moves to the next.
protected mdFlag_SaveClick ( object sender, EventArgs e ) : void
sender object The source of the event.
e System.EventArgs The instance containing the event data.
return void