当前位置: 首页>>代码示例>>C#>>正文


C# Usr.UpdateMusicTypesFavouriteCount方法代码示例

本文整理汇总了C#中Bobs.Usr.UpdateMusicTypesFavouriteCount方法的典型用法代码示例。如果您正苦于以下问题:C# Usr.UpdateMusicTypesFavouriteCount方法的具体用法?C# Usr.UpdateMusicTypesFavouriteCount怎么用?C# Usr.UpdateMusicTypesFavouriteCount使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Bobs.Usr的用法示例。


在下文中一共展示了Usr.UpdateMusicTypesFavouriteCount方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: updateFromDetailsData

		static void updateFromDetailsData(Usr u, Hashtable detailsPanelData)
		{

			Place p = new Place((int)detailsPanelData["PlaceK"]);
			u.HomePlaceK = p.K;
			u.AddressCountryK = p.CountryK;

			MusicType mt = new MusicType((int)detailsPanelData["MusicTypeK"]);
			u.FavouriteMusicTypeK = mt.K;

			#region update UsrMusicTypeFavourite table
			try
			{
				UsrMusicTypeFavourite umf = new UsrMusicTypeFavourite();
				umf.UsrK = u.K;
				umf.MusicTypeK = mt.K;
				umf.Update();

				u.UpdateMusicTypesFavouriteCount(false);
			}
			catch { }
			#endregion

			#region update UsrPlaceVisit table
			try
			{
				UsrPlaceVisit upv = new UsrPlaceVisit();
				upv.UsrK = u.K;
				upv.PlaceK = p.K;
				upv.Update();

				u.UpdatePlacesVisitCount(false);
			}
			catch { }
			#endregion

			#region Facebook
			u.FacebookStory = (bool)detailsPanelData["Facebook"];
			u.FacebookStory1 = (bool)detailsPanelData["Facebook"];

			u.FacebookEventAdd = (bool)detailsPanelData["Facebook"];
			u.FacebookEventAttend = (bool)detailsPanelData["Facebook"];

			u.FacebookStoryAttendEvent = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryBuyTicket = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryEventReview = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryFavourite = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryJoinGroup = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryLaugh = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryNewBuddy = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryNewTopic = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryPhotoFeatured = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryPostNews = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryPublishArticle = (bool)detailsPanelData["Facebook"];
			u.FacebookStorySpotted = (bool)detailsPanelData["Facebook"];
			u.FacebookStoryUploadPhoto = (bool)detailsPanelData["Facebook"];

			#endregion

			#region WeeklyEmail
			u.SendSpottedEmails = (bool)detailsPanelData["WeeklyEmail"];
			#endregion

			#region PartyInvites
			u.SendSpottedTexts = (bool)detailsPanelData["PartyInvites"];
			u.SendFlyers = (bool)detailsPanelData["PartyInvites"];
			u.SendInvites = (bool)detailsPanelData["PartyInvites"];
			#endregion

			u.AgreeTerms = true;
			u.LegalTermsUser2 = true;
			u.IsSkeleton = false;
			u.Update();

			#region update Prefs

			if (mt.K != 1)
				Prefs.Current["MusicPref"] = mt.K;

			if (p.CountryK != 224)
				Prefs.Current["HomeCountryK"] = p.CountryK;

			if (mt.K != 1 || p.CountryK != 224)
				Prefs.Current.Update();

			#endregion
		}
开发者ID:davelondon,项目名称:dontstayin,代码行数:87,代码来源:Login.ascx.cs


注:本文中的Bobs.Usr.UpdateMusicTypesFavouriteCount方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。