public GambleStoneRoundInfo GetLastGambleStoneRoundInfo() { GambleStoneRoundInfo lastRound = null; MyDBHelper.Instance.ConnectionCommandSelect(mycmd => { string sqlText = "select * from gamblestoneroundinfo order by id desc limit 1"; mycmd.CommandText = sqlText; DataTable table = new DataTable(); MySqlDataAdapter adapter = new MySqlDataAdapter(mycmd); adapter.Fill(table); GambleStoneRoundInfo[] rounds = MetaDBAdapter <GambleStoneRoundInfo> .GetGambleStoneRoundInfoFromDataTable(table); if (rounds != null && rounds.Length == 1) { lastRound = rounds[0]; } table.Clear(); table.Dispose(); adapter.Dispose(); }); return(lastRound); }