Beispiel #1
0
        private void BuildDailyReport(EmployeeDayViewList dayViewList)
        {
            TimePlanningDaily report = new TimePlanningDaily();

            report.PlanningContext = _planningContext;
            report.DayViewList     = dayViewList;

            report.ViewDate       = _viewDate;
            report.ManualFill     = _additionalManual;
            report.ManualFillOnly = _manualOnly;
            report.HideSums       = _hideSums;

            subreportDetails.ReportSource = report;
        }
Beispiel #2
0
        private void subreportDetails_BeforePrint(object sender, PrintEventArgs e)
        {
            StoreToWorld currentWorld = (StoreToWorld)GetCurrentRow();
            StoreWorldWeekPlanningState weekPlanningState = _bindingHash[currentWorld];

            if (weekPlanningState != null)
            {
                weekPlanningState.Calculate();
            }
            else
            {
                e.Cancel = true;
                return;
            }

            object dataSource;

            if (_viewType == ViewType.Weekly)
            {
                // acpro #125528
                dataSource = SortUtils <EmployeePlanningWeek> .Sort(weekPlanningState.List, _sortFields);

                BuildWeeklyReport(currentWorld.ID);
            }
            else
            {
                EmployeeDayViewList dayViewList = weekPlanningState.GetDailyListView(_viewDate);
                if (dayViewList == null)
                {
                    e.Cancel = true;
                    return;
                }

                // acpro #125528
                dataSource = SortUtils <EmployeePlanningWeek> .Sort(dayViewList.DayWeeklyList, _sortFields);

                BuildDailyReport(dayViewList);
            }


            subreportDetails.ReportSource.PaperKind = PaperKind;
            subreportDetails.ReportSource.Landscape = Landscape;

            subreportDetails.ReportSource.DataSource = dataSource;
        }
Beispiel #3
0
        protected virtual void OnChangedDate()
        {
            if (Context != null)
            {
                Context.LoadByDate(ViewDate);
                PrepareColumnsView();

                m_dailyView = Context.GetDailyEmployeeList();


                if (Context.WeeklyWorldState != null && Context.WeeklyWorldState.StoreWorldInfo != null &&
                    (Context.WeeklyWorldState.StoreWorldInfo is CashDeskPlanningInfo))
                {
                    panelControl4.Visible = true;
                    bCashDesk             = true;
                    ucCashDeskDailyPlannedInfo1.ViewDate     = Context.ViewDate;
                    ucCashDeskDailyPlannedInfo1.CashDeskInfo = Context.WeeklyWorldState.StoreWorldInfo as CashDeskPlanningInfo;
                    ucCashDeskDailyPlannedInfo1.ColorManager = Context.CountryColors;
                    m_dailyView._bCashDesk = true;
                    //    ucCashDeskDailyPlannedInfo1.AssignPlannedInfo(m_dailyView.GetUnitsPerHour());
                }
                else
                {
                    if (m_dailyView != null)
                    {
                        m_dailyView._bCashDesk = false;
                    }
                    bCashDesk             = false;
                    panelControl4.Visible = false;
                    ucCashDeskDailyPlannedInfo1.CashDeskInfo = null; // Context.WeeklyWorldState.StoreWorldInfo as CashDeskPlanningInfo;
                    ucCashDeskDailyPlannedInfo1.ColorManager = null; // Context.CountryColors;
                }
                UpdatePersonMinMaxInfo();
                UpdateEmployeePlanningDays();

                gridControl.DataSource = null;
                if (m_dailyView != null)
                {
                    gridControl.DataSource = m_dailyView.DayWeeklyList;
                }
            }
        }
Beispiel #4
0
        public virtual void OnChangedContext()
        {
            if (Context != null)
            {
                m_absenceList = Context.Absences;


                m_viewDate      = Context.ViewDate;
                deDate.DateTime = m_viewDate;


                OnChangedDate();
            }
            else
            {
                gridControl.DataSource = null;

                m_dailyView           = null;
                panelControl4.Visible = false;
            }

            UpdatePersonMinMaxInfo();
        }
        public EmployeeDayViewList GetDailyListView(DateTime date)
        {
            EmployeeDayViewList lst = new EmployeeDayViewList(this, date);

            return(lst);
        }
        public EmployeeDayViewList GetDailyListView(DateTime date)
        {
            EmployeeDayViewList lst = new EmployeeDayViewList(this, date);

             return lst;
        }
        private void BuildDailyReport(EmployeeDayViewList dayViewList)
        {
            TimePlanningDaily report = new TimePlanningDaily();
            report.PlanningContext = _planningContext;
            report.DayViewList = dayViewList;

            report.ViewDate = _viewDate;
            report.ManualFill = _additionalManual;
            report.ManualFillOnly = _manualOnly;
            report.HideSums = _hideSums;

            subreportDetails.ReportSource = report;
        }