예제 #1
0
 /// <summary>
 /// Handles the Click event of the Add To Favorites control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 void BtnAddToFavorites_Click(object sender, EventArgs e)
 {
     string strFavroites = hdnSelectedAsFavorite.Value;
     strSiteURL = SPContext.Current.Site.Url.ToString();
     /// Update the DWB User list with the favorites selected.
     strUserName = GetUserName();
     objWellBook = new WellBookBLL();
     if (string.Compare(btnAddToFavorites.Text, ADDTOFAVORITES, true) == 0)
     {
         objWellBook.AddToFavorites(strSiteURL, strFavroites, USERLIST, strUserName, true);
     }
     else if (string.Compare(btnAddToFavorites.Text, REMOVEFROMFAVORITES, true) == 0)
     {
         objWellBook.AddToFavorites(strSiteURL, strFavroites, USERLIST, strUserName, false);
     }
 }