public LineInfo(int l_did, int i_linenum) { try { Hashtable deviceLineMap = DBCache.GetDeviceLineMap(); Hashtable lineCache = DBCache.GetLineCache(); if (deviceLineMap != null && deviceLineMap.Count > 0 && lineCache != null && lineCache.Count > 0 && deviceLineMap.ContainsKey(l_did)) { List <int> list = (List <int>)deviceLineMap[l_did]; if (list != null) { foreach (int current in list) { LineInfo lineInfo = (LineInfo)lineCache[current]; if (lineInfo != null && lineInfo.LineNumber == i_linenum) { this.id = lineInfo.ID; this.device_id = lineInfo.DeviceID; this.line_name = lineInfo.LineName; this.line_number = lineInfo.LineNumber; this.max_voltage = lineInfo.Max_voltage; this.min_voltage = lineInfo.Min_voltage; this.max_power = lineInfo.Max_power; this.min_power = lineInfo.Min_power; this.max_current = lineInfo.Max_current; this.min_current = lineInfo.Min_current; } } } } } catch (Exception ex) { DebugCenter.GetInstance().appendToFile("DBERROR~~~~~~~~~~~DBERROR : " + ex.Message + "\n" + ex.StackTrace); } }