Beispiel #1
0
        private void button4_Click(object sender, EventArgs e)
        {
            games a = new games();

            a.Show();
            this.Hide();
        }
Beispiel #2
0
        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);
            }
        }
Beispiel #3
0
 private void detach_games(games entity)
 {
     this.SendPropertyChanging();
     entity.users = null;
 }
Beispiel #4
0
 private void attach_games(games entity)
 {
     this.SendPropertyChanging();
     entity.users = this;
 }
Beispiel #5
0
 partial void Deletegames(games instance);
Beispiel #6
0
 partial void Updategames(games instance);
Beispiel #7
0
 partial void Insertgames(games instance);