internal VideoStorageServerType GetVideoStorageServerType(string Description) { try { VideoStorageServerType X = null; string sSQL = "Select ID FROM tblVideoStorageServerType WHERE Description = '" + Description + "'"; DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; if(DT.Rows.Count > 0) { X = new VideoStorageServerType(); X = GetVideoStorageServerType(Convert.ToInt32((object)DT.Rows[0])); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
/*internal VideoStorageServerType GetVideoStorageServerType(char[] StreamHeader) { try { string sStreamHeader = StreamHeader.ToString(); VideoStorageServerType X = new VideoStorageServerType(); string sSQL = "Select * FROM tblVideoStorageServerType WHERE StreamHeader = '" + sStreamHeader + "'"; DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; if(DT.Rows.Count > 0) { DataRow r = DT.Rows[0]; X.mvarID = Convert.ToInt32((object)r[0]); X.mvarDescription = Convert.ToString((object)r[1]); X.mvarStreamHeader = Convert.ToString((object)r[2]); } else X = null; DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } } */ internal VideoStorageServerType GetVideoStorageServerType(int ID) { try { VideoStorageServerType X = null; string sSQL = "Select * FROM tblVideoStorageServerType WHERE ID = " + ID; DataSet DS = RF.GetDataSet(sSQL); DataTable DT = DS.Tables[0]; if(DT.Rows.Count > 0) { X = new VideoStorageServerType(); DataRow r = DT.Rows[0]; //int count = 0; // X.mvarDictionary = new OysterDictionary(); // foreach(DataColumn c in DT.Columns) // { // string sKey = c.ColumnName; // object oValue = (object)r[count]; // X.mvarDictionary.Add(sKey.ToUpper(),oValue); // count++; // } X.mvarID = Convert.ToInt32((object)r[0]); X.mvarDescription = Convert.ToString((object)r[1]); X.mvarStreamFormat = Convert.ToString((object)r[2]); X.mvarUseStreamAddress = Convert.ToBoolean((object)r[3]); X.mvarUseStreamPort = Convert.ToBoolean((object)r[4]); X.mvarUseStreamHeader = Convert.ToBoolean((object)r[5]); X.mvarUseConstant1 = Convert.ToBoolean((object)r[6]); X.mvarUseConstant2 = Convert.ToBoolean((object)r[7]); X.mvarUseConstant3 = Convert.ToBoolean((object)r[8]); X.mvarUseConstant4 = Convert.ToBoolean((object)r[9]); X.mvarConstant1 = Convert.ToString((object)r[10]); X.mvarConstant2 = Convert.ToString((object)r[11]); X.mvarConstant3 = Convert.ToString((object)r[12]); X.mvarConstant4 = Convert.ToString((object)r[13]); X.mvarUseRecordingName = Convert.ToBoolean((object)r[14]); X.mvarUseFileStorageDirectory = Convert.ToBoolean((object)r[15]); X.mvarIsOysterServer = Convert.ToBoolean((object)r[16]); X.mvarIsDefault = Convert.ToBoolean((object)r[17]); } DT.Dispose(); return X; } catch(Exception Err) { throw new ApplicationException(Err.Message); } }
public void Add(VideoStorageServerType X) { List.Add(X); }