private void button4_Click(object sender, EventArgs e) { games a = new games(); a.Show(); this.Hide(); }
public bool OverGame(games g1) { try { //首先更新游戏数据库内的信息 llk.games.InsertOnSubmit(g1); //提交数据 llk.SubmitChanges(); //修改 //其次再更新user 内的盘数 var result = from r in llk.users where g1.邮箱 == r.邮箱 select r; foreach (var i in result) { i.盘数 = i.盘数 + 1; //加一盘 //由于邮箱是主键,这个使用foreach,如果查到,也只会有一个 //查看是否超越最高分 if (i.最高分 < g1.分数) { i.最高分 = g1.分数; } } return(true); } catch (Exception e) { return(false); } }
private void detach_games(games entity) { this.SendPropertyChanging(); entity.users = null; }
private void attach_games(games entity) { this.SendPropertyChanging(); entity.users = this; }
partial void Deletegames(games instance);
partial void Updategames(games instance);
partial void Insertgames(games instance);