private void PrintDataCell(XRTableCell cell) { XRPanel panel = ReportPainter.GetPanelControl(cell); panel.Dock = XRDockStyle.Fill; panel.Controls.Clear(); EmployeePlanningDay planningDay = ProcessDayCell(cell); if (planningDay.HasLongAbsence) { string s = _planningContext.GetLongTimeAbbreviation(planningDay.LongAbsenceId); if (!String.IsNullOrEmpty(s)) { XRLabel label = ReportPainter.AddLabelLine(panel, s, Color.Black, 0, false); label.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; int?color = _planningContext.GetLongTimeAbsenceColor(planningDay.LongAbsenceId); if (color.HasValue) { label.BackColor = Color.FromArgb(color.Value); cell.BackColor = Color.FromArgb(color.Value); } //cell.Text = s; //cell.ForeColor = Color.White; //cell.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleCenter; } return; } else { cell.ForeColor = Color.Black; } int y = 0; foreach (__TimeRange range in GetDayTimes(planningDay)) { XRLabel label = ReportPainter.AddLabelLine(panel, range.AsTimeString, String.IsNullOrEmpty(range.AbsenceCode) ? Color.Black : range.BeginColor, y, false); y = y + label.Height + 1; } }
private void PrintPlannedDayCell(XRTableCell cell) { XRPanel panel = ReportPainter.GetPanelControl(cell); panel.Width = cell.Width; panel.Dock = XRDockStyle.Fill; panel.Controls.Clear(); EmployeeDay employeeDay = null; EmployeeWeekView employeeWeek = GetCurrentWeekView(); StoreDay storeDay = _recordingContext.StoreDays[(DateTime)cell.Tag]; if (employeeWeek != null && storeDay != null && employeeWeek.PlanningWeek != null) { employeeDay = employeeWeek.PlanningWeek.GetDay(storeDay.Date); } ReportPainter.ApplyEmployeeDayStyle(cell, storeDay, employeeDay, StoreToWorldID, _recordingContext); ReportPainter.PrintDayCellValues(panel, employeeDay, _recordingContext); }