protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); ApplyRowStyle(xrRow1); ApplyRowStyle(xrDetailRow); }
public WorldsTimeRecordingWeekly() { InitializeComponent(); // if (ClientEnvironment.IsRuntimeMode) { ReportLocalizer.Localize(this); } }
public ManpowerTimePlanningPrintout() { InitializeComponent(); if (ClientEnvironment.IsRuntimeMode) { ReportLocalizer.Localize(this); } }
protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tc_World.Text = Localizer.GetLocalized("world") + " :"; fieldStore.Text = string.Format("{0}: {1}", Localizer.GetLocalized("Store"), _Props.StoreName); fieldWorld.Text = _Props.WorldName; if (_Props.WordID <= 0) { tc_World.Text = fieldWorld.Text = string.Empty; } tc_TimeRange.Text += string.Format("{0} {1}:\t{2} - {3}", Localizer.GetLocalized("year"), _Props.Year, _Props.StartDate.ToShortDateString(), _Props.EndDate.ToShortDateString()); switch (_Props.View) { case AbsencePlanningView.YearlyView: _DataTable = new YearTableFactory(AdaptToList(), _Props.Year, _Props.OnlyHolidays, _Props.ShowSummary); xrSubreport.ReportSource = (_Props.IsAustria ? new AbsenceYearlyAustria() as AbsenceYearly : new AbsenceYearly()).Bind(_DataTable as YearTableFactory); break; case AbsencePlanningView.MonthlyView: _DataTable = new MonthTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek, _Props.OnlyHolidays, _Props.ShowSummary); if (PaperKind == PaperKind.A3) { if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustria().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQartly().Bind(_DataTable as MonthTableFactory); } } else if (_Props.IsAustria) { xrSubreport.ReportSource = new AbsenceQuartlyAustriaA4().Bind(_DataTable as MonthTableFactory); } else { xrSubreport.ReportSource = new AbsenceQuartlyA4().Bind(_DataTable as MonthTableFactory); } break; case AbsencePlanningView.WeeklyView: _DataTable = new WeekTableFactory(AdaptToList(), _Props.Year, _Props.MonthOrWeek); xrSubreport.ReportSource = new AbsenceWeekly(); break; } }
public TimePlanningDaily() { InitializeComponent(); if (ClientEnvironment.IsRuntimeMode) { fieldCell_EmployeeName.DataBindings.Add("Text", DataSource, "FullName"); ReportLocalizer.Localize(this); } }
protected override void OnBeforePrint(PrintEventArgs e) { base.OnBeforePrint(e); ReportLocalizer.Localize(this); tblCaptionMonths.Height = 25; int month = 0; XRTableCell monthCell = null; XRTableCell weekCaptionCell = null; XRTableCell weekDataCell = null; int weekWidth = CalcWeekWidth(); CalculateWidth(weekWidth); int monthWeeksCount = 1; for (int monthNumer = 1; monthNumer < 13; monthNumer++) { foreach (int weekNumber in m_Data.Wrapper.GetWeekNumbersByMonths(monthNumer)) { if (month != monthNumer) { if (monthCell == null) { monthCell = lbCell_January; } else { tblCaptionMonths.InsertColumnToRight(monthCell); monthCell.Width = weekWidth * monthWeeksCount; monthCell = monthCell.NextCell; monthCell.Font = m_HeadFont; monthCell.Text = ReportLocalizer.GetMonthName(monthNumer); } monthCell.TextAlignment = TextAlignment.MiddleCenter; month = monthNumer; monthWeeksCount = 1; } else { monthWeeksCount++; } if (weekCaptionCell == null) { weekCaptionCell = lbCell_Week01; } else { tblCaptionWeeks.InsertColumnToRight(weekCaptionCell); weekCaptionCell.Width = weekWidth; weekCaptionCell = weekCaptionCell.NextCell; } weekCaptionCell.TextAlignment = TextAlignment.MiddleCenter; weekCaptionCell.Text = weekNumber.ToString(); weekCaptionCell.Font = m_HeadFont; if (weekDataCell == null) { weekDataCell = fieldCellWeek01; weekDataCell.Font = m_DataFont; } else { tblData.InsertColumnToRight(weekDataCell); weekDataCell.Width = weekWidth; weekDataCell.Font = m_DataFont; weekDataCell = weekDataCell.NextCell; } m_Data.BindDynamicCell(weekDataCell, weekNumber); weekDataCell.Name = PrintoutConst.DynName(weekNumber); weekDataCell.BeforePrint += new PrintEventHandler(weekDataCell_BeforePrint); } } }