Exemplo n.º 1
0
 protected virtual void OnAppointmentDrop(AppointmentColumn originalColumn, AppointmentColumn targetColumn, Appointment appointment, DateTime startTime, DateTime endTime)
 {
     RescheduleAppointment(appointment, originalColumn, targetColumn, startTime, endTime);
 }
Exemplo n.º 2
0
 protected virtual void OnAppointmentDrag(AppointmentColumn column, Appointment appointment)
 {
 }
Exemplo n.º 3
0
        protected virtual bool OnAppointmentDropStarting(AppointmentColumn originalColumn, AppointmentColumn targetColumn, Appointment appointment, DateTime startTime, DateTime endTime)
        {
            // Check 1 - start is less than or equal to finish
            // REMOVED Check 2 - appointment starts and finishes on same day (or midnight of next day)
            // Check 3 - no appointments overlap period
            var check1 = startTime <= endTime;
            //var check2 = startTime.Day == endTime.Day || endTime == startTime.Add(TimeSpan.FromDays(1)).ToMidnight();
            var check3 = IsTimeAvailable(targetColumn, appointment, startTime, endTime);

            return(check1 && true && check3);
        }
Exemplo n.º 4
0
 protected virtual bool OnAppointmentDragging(Appointment appointment, AppointmentColumn overColumn, DateTime startTime, DateTime endTime)
 {
     return(IsTimeAvailable(overColumn, appointment, startTime, endTime));
 }
Exemplo n.º 5
0
 protected virtual bool OnAppointmentDragStarting(AppointmentColumn column, Appointment appointment)
 {
     return(true);
 }
Exemplo n.º 6
0
 protected virtual void OnAppointmentResizing(AppointmentColumn column, Appointment appointment, DateTime newTime, DateTime endTime)
 {
 }
Exemplo n.º 7
0
 protected virtual bool OnAppointmentRescheduled(AppointmentColumn column, Appointment appointment, DateTime newTime, DateTime endTime, out string errorMessage)
 {
     errorMessage = null;
     return(true);
 }
Exemplo n.º 8
0
 protected void OnAppointmentDeselected(AppointmentColumn column, Appointment appointment)
 {
 }
Exemplo n.º 9
0
 protected virtual void OnAppointmentResizingStart(AppointmentColumn column, Appointment appointment)
 {
 }
Exemplo n.º 10
0
 protected virtual bool IsTimeAvailable(AppointmentColumn column, Appointment appointment, DateTime startTime, DateTime endTime)
 {
     return(DataSource.IsTimeAvailable(column, appointment, startTime, endTime));
 }
Exemplo n.º 11
0
 protected void OnAppointmentDoubleClicked(AppointmentColumn column, Appointment appointment)
 {
 }
Exemplo n.º 12
0
 protected virtual void RescheduleAppointment(Appointment appointment, AppointmentColumn sourceColumn, AppointmentColumn destColumn, DateTime newStartTime, DateTime newEndTime)
 {
     DataSource.Reschedule(appointment, sourceColumn, destColumn, newStartTime, newEndTime);
     RefreshFromDataSource();
 }
Exemplo n.º 13
0
 protected virtual void DeleteAppointment(AppointmentColumn column, Appointment appointment)
 {
     DataSource.DeleteAppointment(column, appointment);
     RefreshFromDataSource();
 }
Exemplo n.º 14
0
 protected bool Equals(Appointment other)
 {
     return(ID == other.ID);
 }
Exemplo n.º 15
0
 protected override bool OnAppointmentDropStarting(AppointmentColumn originalColumn, AppointmentColumn targetColumn, Appointment appointment, DateTime startTime, DateTime endTime)
 {
     return(true);
 }
Exemplo n.º 16
0
 protected override bool IsTimeAvailable(AppointmentColumn column, Appointment appointment, DateTime startTime, DateTime endTime)
 {
     return(true);
 }