private void protocolTypeReverseIpType() { localdb = new DataClasses1DataContext(streamType.LocalConnString); //using (DataClasses1DataContext localdb = new DataClasses1DataContext(streamType.LocalConnString)) //{ protocolType _protocolType = new protocolType(); //协议取下行包 ip_s var protocol = from p in localdb.IP_stream select new { cpro = p.mmse != null ? "MMSE" : null + p.rtsp_type != null ? "rtsp" : null + p.smtp_type != null ? "smtp" : null + p.bittorrent != null ? "BitTorrent" : null + p.edonkey != null ? "eDonkey" : null + p.oicqVersion != null ? "oicq" : null, p.ip_s }; var protocolL = protocol.Where(e => e.cpro != null).ToLookup(e => e.cpro); foreach (var t in protocolL) foreach (var t1 in t) if (_protocolType.d.ContainsKey(t.Key)) if (!dIP.ContainsKey(t1.ip_s)) dIP.Add(t1.ip_s, _protocolType.ConvertProtocol2trType(t.Key)); //} }
//private decimal _messageid = 0; //private decimal messageid { get { return _messageid; } set { _messageid = value; } } //private static decimal messageid = 0; public mLocatingConvert() { localdb.CommandTimeout = 0; _ciType = new ciType(false); _imeiTypeClass = new imeiTypeClass(false); _uriType = new uriType(); _portType = new portType(); _responseType = new responseType(); _protocolType = new protocolType(); _ipType = new ipType(); //--删除 //alter table 你的表 drop constraint 主键名 }