/// <summary> /// 获取友盟KEY列表 /// </summary> /// <returns></returns> public List<table_repark_umeng> get_umeng_key_list() { List<table_repark_umeng> objs = new List<table_repark_umeng>(); string sql = "select * from repark_umeng order by id desc"; SQLiteDataReader reader = SqliteManager.GetManager().get_reader(sql); if (reader != null) { while (reader.Read()) { table_repark_umeng obj = new table_repark_umeng(); obj.id = int.Parse(reader["id"].ToString()); obj.uid = reader["uid"].ToString(); obj.gid = reader["gid"].ToString(); obj.title = reader["title"].ToString(); obj.content = reader["content"].ToString(); obj.umeng_key = reader["umeng_key"].ToString(); obj.umeng_message_key = reader["umeng_message_key"].ToString(); obj.umeng_channel = reader["umeng_channel"].ToString(); obj.ctime = reader["ctime"].ToString(); objs.Add(obj); } reader.Close(); } return objs; }
/// <summary> /// 获取友盟KEY信息 /// </summary> /// <param name="id"></param> /// <returns></returns> public table_repark_umeng get_umeng_key(int id) { string sql = "select * from repark_umeng where id=" + id; SQLiteDataReader reader = SqliteManager.GetManager().get_reader(sql); if (reader != null) { if (reader.Read()) { table_repark_umeng obj = new table_repark_umeng(); obj.id = int.Parse(reader["id"].ToString()); obj.uid = reader["uid"].ToString(); obj.gid = reader["gid"].ToString(); obj.title = reader["title"].ToString(); obj.content = reader["content"].ToString(); obj.umeng_key = reader["umeng_key"].ToString(); obj.umeng_message_key = reader["umeng_message_key"].ToString(); obj.umeng_channel = reader["umeng_channel"].ToString(); obj.ctime = reader["ctime"].ToString(); reader.Close(); return obj; } reader.Close(); } return null; }