public bool Compare(RecordingDayView view) { for (int i = 0; i < _recordingTimes.Length; i++) { if ((_recordingTimes[i].State != view._recordingTimes[i].State) || (_recordingTimes[i].AbsenceEntity != view._recordingTimes[i].AbsenceEntity)) { return(false); } } return(true); }
public void CopyTo(RecordingDayView view) { for (int i = 0; i < MAXRANGES; i++) { if (_recordingTimes[i].AbsenceEntity != null) { view._recordingTimes[i].AbsenceEntity = _recordingTimes[i].AbsenceEntity; } else { view._recordingTimes[i].State = _recordingTimes[i].State; } } }
public RecordingDayRow(EmployeeWeek week, RecordingDayView dayview, EmployeeWeek actualweek, RecordingDayView actualdayview, long orderHwgr) { _plannedWeek = week; _plannedDayView = dayview; _actualWeek = actualweek; _actualDayView = actualdayview; if (_plannedDayView != null) _plannedDay = _plannedDayView.RecordingDay; if (_actualDayView != null) _actualDay = _actualDayView.RecordingDay; if (_plannedWeek.FullName != null) _fullname = _plannedWeek.FullName; _OrderHWGR = orderHwgr; }
public void CopyTo(RecordingDayView view) { for (int i = 0; i < MAXRANGES; i++) { if (_recordingTimes[i].AbsenceEntity != null) view._recordingTimes[i].AbsenceEntity = _recordingTimes[i].AbsenceEntity; else view._recordingTimes[i].State = _recordingTimes[i].State; } }
public bool Compare(RecordingDayView view) { for (int i = 0; i < _recordingTimes.Length; i++) { if ((_recordingTimes[i].State != view._recordingTimes[i].State) || (_recordingTimes[i].AbsenceEntity != view._recordingTimes[i].AbsenceEntity)) return false; } return true; }
public static void DrawDailyViewCell2(RowCellCustomDrawEventArgs e, int index, DailyViewStyle view, StoreDay storeday, RecordingDayView dayView) { Rectangle cellBound = Rectangle.Inflate(e.Bounds, 1, 1); e.Cache.FillRectangle(Color.White, cellBound); Rectangle rect; int squareWidth = cellBound.Width; Color squareColor = Color.White; //int index = infoColumn.FromTime / 15; int squareCount = 1; if (view == DailyViewStyle.View30) { cellBound = Rectangle.Inflate(cellBound, -2, 0); squareWidth = ((cellBound.Width - 1) / 2); squareCount = 2; } else if (view == DailyViewStyle.View60) { cellBound = Rectangle.Inflate(cellBound, -2, 0); squareWidth = ((cellBound.Width - 3) / 4); squareCount = 4; } int positionX = cellBound.X; int currentTime = index * 15; Color backColor = Color.White; for (int i = 0; i < squareCount; i++) { currentTime = (index + i) * 15; if (!storeday.IsOpeningTime((short)currentTime)) { backColor = Color.LightGray; } else backColor = Color.White; squareColor = dayView.GetColorByTime((short)currentTime);// (index + i); rect = new Rectangle(positionX, cellBound.Y, squareWidth, cellBound.Height); if (squareColor == Color.White) squareColor = backColor; e.Cache.FillRectangle(squareColor, rect); positionX += squareWidth + 1; } e.Handled = true; }
private void BeforePrintRecordingTable(object sender, PrintEventArgs e) { _plannedDayView = _actualDayView = null; if (DataSource != null && ((IList)DataSource).Count > 0) { EmployeeWeek ew = GetCurrentEmployee(); _plannedDayView = new RecordingDayView(); _plannedDayView.RecordingDay = ew.GetDay(_recordingContext.ViewDate); _actualDayView = new RecordingDayView(); EmployeeWeek emplWeek = _recordingContext.WorldActualState[ew.EmployeeId]; if (emplWeek != null) _actualDayView.RecordingDay = emplWeek.GetDay(_recordingContext.ViewDate); } }