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


C# UserInfo.Save方法代码示例

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


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

示例1: Page_Load

        protected void Page_Load(object sender, EventArgs e)
        {
            string code = Request.QueryString["reference"];

            FacebookClient client = new FacebookClient(code);
            dynamic result = client.Get("me", new { fields = "name,id,email" });

            if (!string.IsNullOrEmpty(code))
            {
                UserInfo user = new UserInfo();
                user.GetUserByEmail(result.email);
                if (!(user.RowCount > 0))
                {
                    user.AddNew();
                    user.UserName = result.email;
                    user.Email = result.email;
                    user.Save();
                }

                Session["CurrentUser"] = user;
                Response.Redirect(Request.QueryString["back"]);

                /*
                lblId.Text = faceBookUser.Id;
                lblUserName.Text = faceBookUser.UserName;
                lblName.Text = faceBookUser.Name;
                lblEmail.Text = faceBookUser.Email;
                ProfileImage.ImageUrl = faceBookUser.PictureUrl;
                btnLogin.Enabled = false;*/
            }
        }
开发者ID:menasbeshay,项目名称:ivalley-svn,代码行数:31,代码来源:loginFB.aspx.cs

示例2: btnAdd_Click

 void btnAdd_Click(object sender, EventArgs e)
 {
     UserInfo user = new UserInfo
     {
         UserName = Request.Form["UserName"],
         Password = Request.Form["Password"],
         Question = Request.Form["Question"],
         Answer = Request.Form["Answer"],
         Email = Request.Form["Email"]
     };
     user.Insert();
     user.Save();
     BindData();
 }
开发者ID:keily,项目名称:DLite,代码行数:14,代码来源:Default.aspx.cs

示例3: Load

	public void Load()
	{
		int length;

        //PlayerPrefs.DeleteAll();
        //userInfo = new UserInfo();

		userInfo = userInfo.Load<UserInfo>();
        dragonInfo = dragonInfo.Load<PlayerDragon>();
        tutorialInfo.resetValue();

        // reset lai tutorial trong game, chi xuat hien mot lan duy nhat trong 1 lan choi game cua nguoi choi
		userInfo.checkTutorialLevel = 0;
		userInfo.checkTutorialPlay = 0;

		userInfo.Save();

		if (userInfo.check == 0)
		{
			reset();
			//openAllMap();
		}
		else
		{
			updateVersion();
		}

		maps.DeleteAll();
		enemies.DeleteAll();
		dailyQuests.DeleteAll();
		achievements.DeleteAll();

		PlayerMap[] tempMap = this.maps.Load<PlayerMap>();
		length = tempMap.Length;
		for (int i = 0; i < length; i++)
		{
			maps.Add(tempMap[i]);
			listMap.Add(tempMap[i].id, new PlayerMap(tempMap[i].id, tempMap[i].starSuccess, tempMap[i].starTotal));
		}

		PlayerEnemy[] tempEnemy = this.enemies.Load<PlayerEnemy>();
		length = tempEnemy.Length;
		for (int i = 0; i < length; i++)
		{
			enemies.Add(tempEnemy[i]);
			listEnemy.Add(tempEnemy[i].id, tempEnemy[i].visible);
		}

		PlayerDailyQuest[] tempDailyQuest = this.dailyQuests.Load<PlayerDailyQuest>();
		length = tempDailyQuest.Length;
		for (int i = 0; i < length; i++)
		{
			dailyQuests.Add(tempDailyQuest[i]);
			listDailyQuest.Add(tempDailyQuest[i].id, tempDailyQuest[i].Amount);

		}

		PlayerAchievement[] tempAchievement = this.achievements.Load<PlayerAchievement> ();
		length = tempAchievement.Length;

		for(int i=0;i<length;i++)
		{
			achievements.Add(tempAchievement[i]);
			listAchievement.Add(tempAchievement[i].id, tempAchievement[i].value);
		}

	}
开发者ID:royalknight2902,项目名称:AgeOfFreedom,代码行数:67,代码来源:PlayerInfo.cs


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