public void testGetShowingsByPlay()
        {
            dataSet = ShowingsClass.getShowingForPlays(2);

            string actualShowingDate             = dataSet.Tables[0].Rows[0]["Date"].ToString();
            double actualShowingUpperCirclePrice = double.Parse(dataSet.Tables[0].Rows[0]["UpperCirclePrice"].ToString());
            double actualShowingDressCirclePrice = double.Parse(dataSet.Tables[0].Rows[0]["DressCirclePrice"].ToString());
            double actualShowingStallPrice       = double.Parse(dataSet.Tables[0].Rows[0]["StallsPrice"].ToString());

            string expectedShowingDate             = "2017-06-22 12:00";
            double expectedShowingUpperCirclePrice = 7;
            double expectedShowingDressCirclePrice = 2;
            double expectedShowingStallPrice       = 1;

            Assert.AreEqual(expectedShowingDate, actualShowingDate);
            Assert.AreEqual(expectedShowingUpperCirclePrice, actualShowingUpperCirclePrice);
            Assert.AreEqual(expectedShowingDressCirclePrice, actualShowingDressCirclePrice);
            Assert.AreEqual(expectedShowingStallPrice, actualShowingStallPrice);
        }
        private void fillDatePicker(DatePicker pDatePicker, int pId)
        {
            pDatePicker.BlackoutDates.Clear();
            pDatePicker.BlackoutDates.AddDatesInPast();
            List <DateTime> dateList = new List <DateTime>();
            DataSet         dataSet  = ShowingsClass.getShowingForPlays(pId);

            //DataSet dataSet = ShowingsClass.getAllShowings();
            foreach (DataRow row in dataSet.Tables[0].Rows)
            {
                int      tempShowingId = int.Parse(row["Showing_Id"].ToString());
                DateTime showingDate   = ShowingsClass.turnSqlLiteDateStringIntoDateTime(row["Date"].ToString());
                if (showingDate >= DateTime.Now)
                {
                    dateList.Add(showingDate);
                }
            }
            dateList.Sort();

            //if (dateList.Count != 0)
            //{
            //    DateTime nextStartDate = DateTime.Now.AddDays(-1);
            //    int count = 1;
            //    foreach (DateTime showingDateFromList in dateList)
            //    {
            //        if (count < dateList.Count)
            //        {
            //            nextStartDate = showingDateFromList;
            //            if (showingDateFromList.AddDays(1).Date == dateList[count].Date)
            //            {
            //                //next date in list is for next day so do nothing
            //            }
            //            else
            //            {
            //                pDatePicker.BlackoutDates.Add(new CalendarDateRange(nextStartDate.AddDays(1), dateList[count].AddDays(-1)));
            //            }
            //            count = count + 1;
            //        }
            //    }
            //    pDatePicker.BlackoutDates.Add(new CalendarDateRange(dateList[count - 1].AddDays(1), nextStartDate.AddYears(500)));
            //    pDatePicker.BlackoutDates.Add(new CalendarDateRange(DateTime.Now, dateList[0].AddDays(-1)));
            //}
            //else
            //{
            //    pDatePicker.BlackoutDates.Add(new CalendarDateRange(DateTime.Now, DateTime.Now.AddYears(500)));
            //}

            if (dateList.Count == 0)
            {
                pDatePicker.BlackoutDates.Add(new CalendarDateRange(DateTime.Now, DateTime.Now.AddYears(1)));
            }
            else
            {
                DateTime startDate = DateTime.Now;
                for (int i = 0; i < dateList.Count; i++)
                {
                    if (startDate.Date != dateList[i].Date)
                    {
                        pDatePicker.BlackoutDates.Add(new CalendarDateRange(startDate, dateList[i].AddDays(-1)));
                    }
                    startDate = dateList[i].AddDays(1);
                }
                pDatePicker.BlackoutDates.Add(new CalendarDateRange(startDate, startDate.AddMonths(12)));
            }
        }