using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Data.SqlClient; using Sensor.Gateway.DataXfer; public partial class GetUploadList : System.Web.UI.Page { //string storeString = "store:"; //string journalString = "globals"; //ArrayList nodeList = new ArrayList(); protected void Page_Load(object sender, EventArgs e) { // Get the last known download times for // the store files and journal files. getLastKnownDataList (); } public void getLastKnownDataList () { // Establish the DB try { // Get the required db ... string connString = System.Configuration.ConfigurationManager.AppSettings["DBConnection"]; string dbName = Request["DB"]; if (dbName == null) { throw new ArgumentNullException("DB"); } string stage = dbName + "Stage"; connString = connString.Replace("XXX", stage); SqlConnection conn = new SqlConnection(connString); StageDBUpdater updater = new StageDBUpdater(conn); if (dbName.ToLower().Contains("weather")) { Response.Write(updater.GetWeatherStationStatus()); } else { Response.Write(updater.GetNodeStatus()); } } catch (Exception ex) { Response.Write(ex.ToString()); } } }