private bool Equals(DatesPeriod other)
 {
     return(this.StartDate.Equals(other.StartDate) &&
            this.EndDate.Equals(other.EndDate) &&
            (this.StartWorkingHour == other.StartWorkingHour) &&
            (this.FinishWorkingHour == other.FinishWorkingHour));
 }
예제 #2
0
 public CalendarEvent(string eventId, string type, DatesPeriod dates, string status, string employeeId)
 {
     this.EventId    = eventId;
     this.Dates      = dates;
     this.Status     = status;
     this.Type       = type;
     this.EmployeeId = employeeId;
     this.IsPending  = new CalendarEventStatuses().PendingForType(type).Contains(status);
 }
        public bool DatesIntersectsWith(DatesPeriod period)
        {
            if (period == null)
            {
                return(false);
            }

            if (this.EndDate < period.StartDate || period.EndDate < this.StartDate)
            {
                return(false);
            }

            return(true);
        }
예제 #4
0
 public CalendarEvent(
     string eventId,
     string type,
     DatesPeriod dates,
     string status,
     string employeeId,
     CalendarEventAdditionalDataEntry[] additionalData = null)
 {
     this.EventId        = eventId;
     this.Dates          = dates;
     this.Status         = status;
     this.Type           = type;
     this.EmployeeId     = employeeId;
     this.AdditionalData = additionalData ?? new CalendarEventAdditionalDataEntry[0];
     this.IsPending      = new CalendarEventStatuses().PendingForType(type).Contains(status);
 }