Example #1
0
 public void Add(ForwardingServer X)
 {
     List.Add(X);
 }
Example #2
0
        public ForwardingServer GetForwardingServer(int ID)
        {
            try
            {
                ForwardingServer X = null;
                string sSQL = "Select * FROM tblForwardingServer WHERE ID = " + ID;
                DataTable DT = GetDataTable(sSQL);
                if(DT.Rows.Count > 0)
                {
                    X = new ForwardingServer();

                    DataRow r = DT.Rows[0];
                    X.mvarID = Convert.ToInt32((object)r[0]);
                    X.mvarAddress = Convert.ToString((object)r[1]);
                    X.mvarCreatedDate = Convert.ToDateTime((object)r[2]);
                    X.mvarVideoStorageServerID = Convert.ToInt32((object)r[3]);
                    X.mvarUniqueIdentifier = r[4].ToString();
                    X.mvarPort = Convert.ToInt32((object)r[5]);
                }
                DT.Dispose();
                return X;
            }
            catch(Exception Err)
            {
                throw new ApplicationException(Err.Message);
            }
        }