public VacationList GetListVacaton(DateTime dateTime, int dias) { VacationList list = new VacationList(); DateTime baseTime = dateTime.AddDays(1); if (AddDay(baseTime)) { list.AddDAY(new Dia() { Day = baseTime }); dias--; } for (int i = 0; i < dias;) { baseTime = baseTime.AddDays(1); if (AddDay(baseTime)) { list.AddDAY(new Dia() { Day = baseTime }); i++; } } list.RemainDays(); return(list); }
public void BindVacationList() { if (VacationList == null || VacationList.Count < 1) { tbVacationList.Visible = false; } else { tbVacationList.Visible = true; //排序 Vacation vacation = new Vacation(); SortList <Vacation> sortList = new SortList <Vacation>(vacation, "VacationEndDate", ReverserInfo.Direction.DESC); VacationList.Sort(sortList); gdVacationList.DataSource = VacationList; gdVacationList.DataBind(); } }
public IActionResult addVacationlist([FromBody] VacationList T) { return(Ok(vacationRepository.AddVacationList(T.myList))); }
public Employee() { Vacations = new VacationList(); }
public void Creating_VacationList_Date_Today() { var VacationList = new VacationList(); Assert.True(VacationList.AddedOn.Date == DateTime.Today.Date); }