本文整理汇总了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;*/
}
}
示例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();
}
示例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);
}
}