public void RepeatTest() { IList <CalendarCellInfo> list = busCalendar.GetAll(ADOWorkGroup.ID, 1390); ClearSession(); IList <decimal> holiday = new List <decimal>(); holiday.Add(1); holiday.Add(180); IList <CalendarCellInfo> list2 = busCalendar.RepetitionPeriod(1390, 5, 1, 5, 5, null, list); Assert.AreEqual(0, list2.Where(x => x.Month == 5 && x.Day == 4).Count()); Assert.AreEqual(0, list2.Where(x => x.Month == 5 && x.Day == 9).Count()); Assert.AreEqual(1, list2.Where(x => x.Month == 5 && x.Day == 8).Count()); Assert.AreEqual(1, list2.Where(x => x.Month == 5 && x.Day == 10).Count()); }
protected void Button5_Click(object sender, EventArgs e) { BWorkGroupCalendar bus = new BWorkGroupCalendar(); IList <CalendarCellInfo> list = new List <CalendarCellInfo>(); IList <decimal> holidayTypes = new List <decimal>(); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 5 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 6 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 7 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 8 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 9 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 10 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 1 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 12 }); list.Add(new CalendarCellInfo() { Month = 1, ShiftID = 6060, Title = "", Color = null, Day = 13 }); bus.RepetitionPeriod(1391, 1, 7, 1, 1, holidayTypes, list); }