Пример #1
0
 /// <summary>
 /// Method to check if tribute in user favorite list and set btn string.
 /// </summary>
 private void CheckForFavorite()
 {
     try
     {
         MiscellaneousController _favController = new MiscellaneousController();
         AddToFavorite objFavorite = new AddToFavorite();
         objFavorite.TributeId = _tributeId;
         objFavorite.UserId = _userId;
         isInFavorite = _favController.GetUserTributeFavorites(objFavorite);
         if (isInFavorite > 0)
         {
             lbtnAddToFavorite.Text = ResourceText.GetString("lbtnRemoveFromFavourate_ST_Master");
             toFav = ResourceText.GetString("txtRemoveFromFavorite_ST_Master");
             toFavText = ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourmoments" ? ResourceText.GetString("txtRemoveFavorite_ST_Master1") : ResourceText.GetString("txtRemoveFavorite_ST_Master");
         }
         else
         {
             lbtnAddToFavorite.Text = ResourceText.GetString("lbtnAddFav_ST_Master");
             toFav = ResourceText.GetString("txtAddToFavorite_ST_Master");
             toFavText = ConfigurationManager.AppSettings["ApplicationType"].ToString().ToLower() == "yourmoments" ? ResourceText.GetString("txtAddFavorite_ST_Master1") : ResourceText.GetString("txtAddFavorite_ST_Master");
         }
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }