예제 #1
0
 public TimeSheetRecord(TimeSheetRecord tsRecord)
 {
     _fromTime      = tsRecord.FromTime;
     _toTime        = tsRecord.ToTime;
     _timeSheetType = tsRecord.TimeSheetType;
     _status        = tsRecord.Status;
 }
예제 #2
0
        public Color GetColorByTimeSheetStatus(TimeSheetStatus status)
        {
            if (this.StatusColors != null && this.StatusColors.Count > 0)
            {
                foreach (TimeSheetStatusColor statusColor in this.StatusColors)
                {
                    if (statusColor.Status == status)
                    {
                        return(statusColor.Color);
                    }
                }
            }

            return(Color.Empty);
        }
예제 #3
0
        public TimeSheetDay(TimeSheetDay tsDay)
        {
            // Copy status
            _status  = tsDay.Status;
            _catalog = tsDay.Catalog;

            // Copy shifts
            if (tsDay.ShiftItems != null)
            {
                this.ShiftItems = new List <ShiftRecord>();
                this.ShiftItems.AddRange(tsDay.ShiftItems);
            }

            // Copy leaves
            if (tsDay.LeaveItems != null)
            {
                this.LeaveItems = new List <LeaveRecord>();
                this.LeaveItems.AddRange(tsDay.LeaveItems);
            }

            // Copy day
            _day = tsDay.Day;
        }
예제 #4
0
 public TimeSheetStatusColor(TimeSheetStatus status, Color color)
 {
     this.Status = status;
     this.Color  = color;
 }