/// <summary> /// Returns all Streaming Encoders currently in this Room /// </summary> /// <returns></returns> public StreamingEncoders ALLStreamingEncoders(int RoomId) { try { StreamingEncoders X = new StreamingEncoders(); string sSQL = "Select * FROM tblStreamingEncoder WHERE RoomId = " + RoomId + " ORDER BY ControlAddress"; DataTable DT = GetDataTable(sSQL); foreach(DataRow R in DT.Rows) { StreamingEncoder S = null; S = GetStreamingEncoder(Convert.ToInt32((object)R[0])); if(S != null) X.Add(S); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
public StreamingEncoders ALLStreamingEncoders(double GroupId) { try { int iGroupId = Convert.ToInt32(GroupId); StreamingEncoders X = new StreamingEncoders(); string sSQL = "Select s.Description, G.StreamingEncoderId FROM tblGroupStreamingEncoderRel G " + "left outer join tblStreamingEncoder s on s.id = g.StreamingEncoderId " + "WHERE G.GroupId = " + iGroupId + " ORDER BY s.Description"; DataTable DT = GetDataTable(sSQL); foreach(DataRow R in DT.Rows) { StreamingEncoder S = null; S = GetStreamingEncoder(Convert.ToInt32((object)R[1])); if(S != null) X.Add(S); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
/// <summary> /// Returns all Streaming Encoders currently in the System /// </summary> /// <returns></returns> public StreamingEncoders ALLStreamingEncoders() { try { StreamingEncoders X = new StreamingEncoders(); string sSQL = "SELECT tblStreamingEncoder.Id FROM tblStreamingEncoder " + "Left Outer Join tblRoom ON tblRoom.Id=tblStreamingEncoder.RoomId " + "Order By tblRoom.Name"; DataTable DT = GetDataTable(sSQL); foreach(DataRow R in DT.Rows) { StreamingEncoder S = null; S = GetStreamingEncoder(Convert.ToInt32((object)R[0])); if(S != null) X.Add(S); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }