Exemple #1
0
        public void Blackout_Date_Delete()
        {
            ScheduleController controller = new ScheduleController();
            Schedule           schedule   = CreateSchedule();

            controller.CreateBlackoutDate(schedule, "Test blackout date", DateTime.Now, "test user");

            BlackoutDate blackoutDate   = schedule.BlackoutDates.First();
            int          blackoutDateID = blackoutDate.BlackoutDateID;

            controller.DeleteBlackoutDate(schedule, blackoutDateID);
            string key = KeyHelper.GetKey <IBlackoutDateRepository>();

            Assert.IsFalse(RepositoryFactory.GetRepository <IBlackoutDateRepository>(key).Exists(blackoutDateID));
        }
Exemple #2
0
 private void btnDelete_Click(object sender, EventArgs e)
 {
     scheduleController.DeleteBlackoutDate(schedule, blackoutDate.BlackoutDateID);
     Response.Redirect(string.Format("~/default.aspx?page={0}&schedule={1}",
                                     ScheduleItemListPageSetting, schedule.ScheduleID));
 }