private void LoadTunerData(SQLiteCommand cmd, string joinTable, string joinFields, Action <HisTransponder, SQLiteDataReader, int> enhanceTransponderInfo) { if (!tableNames.Contains(joinTable.ToLower())) { return; } cmd.CommandText = $"select tuner.tunerid, oid, tid, satellite {joinFields} " + $" from tuner inner join {joinTable} on {joinTable}.tunerid=tuner.tunerid"; using (var r = cmd.ExecuteReader()) { while (r.Read()) { var id = r.GetInt32(0); var trans = new HisTransponder(id); trans.OriginalNetworkId = r.GetInt32(1); trans.TransportStreamId = r.GetInt32(2); trans.Satellite = DataRoot.Satellites.TryGet(r.GetInt32(3)); enhanceTransponderInfo(trans, r, 4); DataRoot.AddTransponder(trans.Satellite, trans); } } }