Problem:
I am in the process of introducing a planner for my school adviser. The scheduler expects to set an intermediate time interval of 15 minutes from 8:00 to 17:00 from Monday to Friday. In addition, the adviser will have to indicate the start and end dates of the scheduler. The scheduler will also be able to indicate whether a 15-minute time interval is open. So, my adviser will be able to mark a certain time interval as NOT AVAILABLE.
What I still have:
I created a simple class:
public class TimeSlot
{
public DateTime dateTime
{
get;
set;
}
public bool isAvailable
{
get;
set;
}
TimeSlot(DateTime dt, bool Avalible)
{
dateTime = dt;
isAvailable = Avalible;
}
}
. , :
List<TimeSlot> TSList = new List<TimeSlot>();
, :
, , TSList :
private void button_Next_Click(object sender, RoutedEventArgs e)
{
DateTime fromDate = datePicker1.SelectedDate.Value;
DateTime toDate = datePicker2.SelectedDate.Value;
while (fromDate <= toDate)
{
if (fromDate.DayOfWeek.ToString() != "Saturday" && fromDate.DayOfWeek.ToString() != "Sunday")
{
}
fromDate = fromDate.AddDays(1);
}
}
, . , .
:
: