void saveSettingsButton_Click(object sender, EventArgs e)
        {
            displayDay  = Convert.ToInt32(displayDayList.SelectedValue);
            displayHour = Convert.ToInt32(displayHourList.SelectedValue);
            onSaleDay   = Convert.ToInt32(onSaleDayList.SelectedValue);
            onSaleHour  = Convert.ToInt32(onSaleHourList.SelectedValue);

            if (displayDay == onSaleDay)
            {
                ErrorMessage = "Cannot set deal to display and go on sale on the same day";
                return;
            }


            DealSettingsTableAdapter settingsAdapter = new DealSettingsTableAdapter();

            DollarSaverDB.DealSettingsDataTable settingsTable = settingsAdapter.GetDealSettings(StationId);

            if (settingsTable.Count == 1)
            {
                DollarSaverDB.DealSettingsRow settings = settingsTable[0];

                settings.DisplayDay  = displayDay;
                settings.DisplayHour = displayHour;
                settings.OnSaleDay   = onSaleDay;
                settings.OnSaleHour  = onSaleHour;

                settingsAdapter.Update(settings);
            }
            else
            {
                settingsAdapter.Insert(StationId, displayDay, displayHour, onSaleDay, onSaleHour);
            }

            InfoMessage = "Settings Updated";
            Response.Redirect("~/admin/DealOfTheWeek.aspx");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            //saveButton.Click += new EventHandler(saveButton_Click);
            saveSettingsButton.Click += new EventHandler(saveSettingsButton_Click);

            dealGrid.PageIndexChanging += new GridViewPageEventHandler(dealGrid_PageIndexChanging);
            dealGrid.RowDataBound      += new GridViewRowEventHandler(dealGrid_RowDataBound);
            //dealGrid.RowCommand += new GridViewCommandEventHandler(dealGrid_RowCommand);

            if (Station.SiteTypeId != (int)SiteType.DealOfTheWeek)
            {
                Response.Redirect("~/admin/Default.aspx");
            }

            if (!Page.IsPostBack)
            {
                DealSettingsTableAdapter            settingsAdapter = new DealSettingsTableAdapter();
                DollarSaverDB.DealSettingsDataTable settingsTable   = settingsAdapter.GetDealSettings(StationId);

                if (settingsTable.Count == 1)
                {
                    DollarSaverDB.DealSettingsRow settings = settingsTable[0];

                    displayDay  = settings.DisplayDay;
                    displayHour = settings.DisplayHour;
                    onSaleDay   = settings.OnSaleDay;
                    onSaleHour  = settings.OnSaleHour;
                }

                displayDayList.SelectedValue  = displayDay.ToString();
                displayHourList.SelectedValue = displayHour.ToString();
                onSaleDayList.SelectedValue   = onSaleDay.ToString();
                onSaleHourList.SelectedValue  = onSaleHour.ToString();


                BindData();


                DateTime dealDate = startDate.AddDays(((7 - (int)startDate.DayOfWeek + onSaleDay) % 7) + 7 * (int)((7 - (int)startDate.DayOfWeek + onSaleDay) / 7));

                // check to make sure deal date's diplay date won't be before latest existing deal's sale date
                DateTime displayDate = dealDate.AddDays(-1 * ((7 + onSaleDay - displayDay) % 7)).AddHours(displayHour - onSaleHour);

                if (displayDate <= startDate)
                {
                    dealDate = dealDate.AddDays(7);
                }

                for (int i = 1; i <= 10; i++)
                {
                    //dealDateList.Items.Add(new ListItem(dealDate.ToString("ddd MMM dd, yyyy"), dealDate.ToString("MM/dd/yyyy")));
                    dealDate = dealDate.AddDays(7);
                }

                /*
                 * CertificateTableAdapter certificateAdapter = new CertificateTableAdapter();
                 * DollarSaverDB.CertificateDataTable certificates = certificateAdapter.GetActive(StationId);
                 *
                 * certificateList.DataSource = certificates;
                 * certificateList.DataTextField = "ShortName";
                 * certificateList.DataValueField = "CertificateId";
                 * certificateList.DataBind();
                 */
            }
        }