Exemplo n.º 1
0
 public List <Data> getTestData(Int32 testID)
 {
     if (Authenticated_AorC())
     {
         try
         {
             Movement.Database.Test filler = new Movement.Database.Test(testID);
             List <Data>            rData  = new List <Data>();
             Data dataSample;
             foreach (Movement.Database.TestDataSample sample in filler.Data)
             {
                 dataSample.pressure = sample.Pressure;
                 dataSample.time     = sample.Time;
                 dataSample.x        = sample.X;
                 dataSample.y        = sample.Y;
                 rData.Add(dataSample);
             }
             return(rData);
         }
         catch { return(new List <Data>()); }
     }
     else
     {
         throw new UnauthorizedAccessException("You are not authorized to perform this action!");
     }
 }
Exemplo n.º 2
0
    public List<Data> getTestData(Int32 testID)
    {
        if (Authenticated_AorC())
        {
            try
            {
                Movement.Database.Test filler = new Movement.Database.Test(testID);
                List<Data> rData = new List<Data>();
                Data dataSample;
                foreach (Movement.Database.TestDataSample sample in filler.Data)
                {
                    dataSample.pressure = sample.Pressure;
                    dataSample.time = sample.Time;
                    dataSample.x = sample.X;
                    dataSample.y = sample.Y;
                    rData.Add(dataSample);
                }
                return rData;
            }
            catch { return new List<Data>(); }

        }
        else
        {
            throw new UnauthorizedAccessException("You are not authorized to perform this action!");
        }
    }