0
我正在嘗試預約系統。唯一的問題是,如果接受另一個約會,我不想讓客戶創建約會。使用DateTime實例比較2次
我要離開預約之間1小時和另一個說,如果任命一個是在12:00你12:00和13:00
這裏與着書任命是我的代碼:
List<Appointment> acceptedAppointments = new Service1Client().getAllAcceptedAppointments();
獲得所有接受的約會。
foreach (Appointment item in acceptedAppointments)
{
if (item.Appointment_DateTime.Date == myDate.Date)
{
if (myDate.AddHours(1) > item.Appointment_DateTime)
{
}
}
}
我不知道到底是什麼,我需要在這裏做,如果有人能夠幫助這將是巨大的感謝!