private void MockSeasons() { DateTime date = DateUtils.Now().AddDays(-1); FeedbackSeason season = new FeedbackSeason { StartDate = date, EndDate = date.AddDays(5) }; _feedbackSeasonDataAccess.Save(season); FeedbackSeason season2 = new FeedbackSeason { StartDate = date.AddDays(5), EndDate = date.AddDays(15) }; _feedbackSeasonDataAccess.Save(season2); FeedbackSeason season3 = new FeedbackSeason { StartDate = date.AddDays(15), EndDate = date.AddDays(30) }; _feedbackSeasonDataAccess.Save(season3); FeedbackSeason season4 = new FeedbackSeason { StartDate = date.AddDays(30), EndDate = date.AddDays(60) }; _feedbackSeasonDataAccess.Save(season3); }
public FeedbackSeason GetCurrent() { FeedbackSeason fs = _feedbackSeasonDataAccess.GetByDate(DateUtils.Now()); if (fs == null) { throw new Exception("No Season been made"); } return(fs); }
public FeedbackSeasonDTO(FeedbackSeason model) : base(model) { startDate = model.StartDate; endDate = model.EndDate; }