Exemplo n.º 1
0
 public VideoStorageServerType GetVideoStorageServerType(int ID)
 {
     try
     {
         VideoStorageServerType X = null;
         string sSQL = "Select * FROM tblVideoStorageServerType WHERE ID = " + ID;
         DataTable DT = GetDataTable(sSQL);
         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.mvarStreamHeader = Convert.ToString((object)r[2]);
             X.mvarUsePort = Convert.ToBoolean((object)r[3]);
         }
         DT.Dispose();
         return X;
     }
     catch(Exception Err)
     {
         throw new ApplicationException(Err.Message);
     }
 }
Exemplo n.º 2
0
 public void Add(VideoStorageServerType X)
 {
     List.Add(X);
 }
Exemplo n.º 3
0
        public VideoStorageServerType GetVideoStorageServerType(char[] StreamHeader)
        {
            try
            {
                string sStreamHeader = StreamHeader.ToString();
                VideoStorageServerType X = new VideoStorageServerType();
                string sSQL = "Select * FROM tblVideoStorageServerType WHERE StreamHeader = '" + sStreamHeader + "'";
                DataTable DT = GetDataTable(sSQL);

                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);
            }
        }