예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //Create proxy
            GetterClient proxy = new GetterClient();

            proxy.Open();

            //Fill array with database rows from WCF
            UnitArrayList = proxy.GetUnitListForTopSpeed();
            SpeedArrayList = proxy.GetSpeedListForTopSpeed();

            HDOPArrayList = proxy.GetHDOPListForQuality();
            SatelliteArrayList = proxy.GetNumSatellitesListForQuality();

            proxy.Close();

            //Serialize arraylists so they can be used in JavaScript
            Serialize(UnitArrayList);
            Serialize(SpeedArrayList);
            Serialize(HDOPArrayList);
            Serialize(SatelliteArrayList);

            if (WebApplication.SiteMaster.LoggedIn)
            {
                AnonymousContent.Visible = false;
                AuthorizedContent.Visible = true;
            }
            else
            {
                AnonymousContent.Visible = true;
                AuthorizedContent.Visible = false;
            }
        }
예제 #2
0
        public void CreateChart4()
        {
            //Create proxy
            GetterClient proxy = new GetterClient();

            //Open connection
            proxy.Open();

            //Get data from database with selected dates and times
            CPUDateArrayList = proxy.GetBeginTimeListForCPUTemp();
            CPUTempArrayList = proxy.GetMaxListForCPUTemp();

            proxy.Close();

            //Serialize arraylists so they can be used in JavaScript
            Serialize(CPUDateArrayList);
            Serialize(CPUTempArrayList);
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (WebApplication.SiteMaster.LoggedIn)
            {
                //Show divs when logged in
                AnonymousContent.Visible = false;
                AuthorizedContent.Visible = true;

                GetterClient proxy = new GetterClient();

                proxy.Open();

                //Fill array with database rows from WCF
                ConnBoolTrueArrayList = proxy.GetQueryList("SELECT COUNT(value) FROM connections WHERE value = 'True'");
                ConnBoolFalseArrayList = proxy.GetQueryList("SELECT COUNT(value) FROM connections WHERE value = 'False'");
                DateArrayList = proxy.GetBeginTimeListForGPSTemp();
                TempArrayList = proxy.GetMaxListForGPSTemp();
                CPUDateArrayList = proxy.GetBeginTimeListForCPUTemp();
                CPUTempArrayList = proxy.GetMaxListForCPUTemp();
                UnitRepairArrayList = proxy.GetUnitListbyRepair();
                CountRepairArrayList = proxy.GetCountListbyRepair();

                proxy.Close();

                //Serialize arraylists so they can be used in JavaScript
                Serialize(ConnBoolTrueArrayList);
                Serialize(ConnBoolFalseArrayList);
                Serialize(DateArrayList);
                Serialize(TempArrayList);
                Serialize(CPUDateArrayList);
                Serialize(CPUTempArrayList);
                Serialize(UnitRepairArrayList);
                Serialize(CountRepairArrayList);
            }
            else
            {
                AnonymousContent.Visible = true;
                AuthorizedContent.Visible = false;
            }
        }