static PointPairList getData(string site_code, string var_code, DateTime dStart, DateTime dEnd, dbConnection dataObject, double lBnd, double upBnd)
        {
            PointPairList graphPoints = new PointPairList();

            DataTable values1yr = dataObject.getDVCstm(site_code, var_code, dStart, dEnd, lBnd, upBnd);
            Double NoDV = dataObject.getNoDV(var_code);

            double testBnds;
            foreach (DataRow row in values1yr.Rows)
            {
                testBnds = Convert.ToDouble(row["DataValue1"]);
                DateTime dateShowing = convDate(row["LocalDateTime"].ToString());

                try
                {
                    if (!(Convert.ToDouble(row["DataValue1"]) == NoDV || Convert.ToDouble(row["DataValue1"]) < lBnd || Convert.ToDouble(row["DataValue1"]) > upBnd))
                    {
                        graphPoints.Add((double)new XDate(dateShowing.Year, dateShowing.Month, dateShowing.Day, dateShowing.Hour, dateShowing.Minute, dateShowing.Second), Convert.ToDouble(row["DataValue1"]));
                    }
                    else
                    {
                        graphPoints.Add((double)new XDate(dateShowing.Year, dateShowing.Month, dateShowing.Day, dateShowing.Hour, dateShowing.Minute, dateShowing.Second), double.NaN);
                    }
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine("found error " +ex.Message);
                }

            }
            graphPoints = cleanValues(graphPoints, values1yr);
            return graphPoints;
        }
        static PointPairList getDataTyp(string site_code, string var_code,  dbConnection dataObject, double lBnd, double upBnd)
        {
            PointPairList graphPoints = new PointPairList();

            DataTable values1yr = dataObject.getDVCstmAvg(site_code, var_code, lBnd, upBnd);
            Double NoDV = dataObject.getNoDV(var_code);
            foreach (DataRow row in values1yr.Rows)
            {
                DateTime dateShowing;
                try
                {
                    dateShowing = new DateTime(DateTime.Now.Year, (int)row["Month"], (int)row["Day"]);
                }
                catch (Exception ex)
                {
                    System.Console.WriteLine("Leap Year");
                    dateShowing = new DateTime(DateTime.Now.Year, (int)row["Month"], ((int)row["Day"]) - 1, 23, 59, 59);
                }

                try
                {
                    double? curValue = (double)row["DataValue1"];
                    double curDate = (double)new XDate(dateShowing.Year, dateShowing.Month, dateShowing.Day, dateShowing.Hour, dateShowing.Minute, dateShowing.Second);
                    graphPoints.Add(curDate, curValue.Value);

                }
                catch(Exception ex )
                {
                }
            }
            graphPoints = cleanValues(graphPoints, values1yr);
            return graphPoints;
        }