public void SetStartDates(IList <StationCashSr> dates)
        {
            StartDateFilters.Clear();
            long           idx    = 1;
            DateCollection noDate = new DateCollection()
            {
                Date  = DateTime.MinValue,
                Index = 0,
                Value = TranslationProvider.Translate(MultistringTags.TERMINAL_FROM_CALENDER).ToString()
            };

            StartDateFilters.Add(noDate);

            if (dates != null && dates.Count > 0)
            {
                foreach (StationCashSr cash in dates)
                {
                    DateCollection date = new DateCollection()
                    {
                        Date  = cash.DateModified,
                        Index = idx,
                        Value = cash.DateModified.ToString("dd.MM.yyyy HH:mm") + " (" + (
                            ((OperatorUser)ChangeTracker.CurrentUser).AccountId.ToString() == cash.OperatorID ? ((OperatorUser)ChangeTracker.CurrentUser).Username : StationRepository.StationTyp) + ")"
                    };
                    if (ChangeTracker.CalendarStartDateAccounting <= cash.DateModified)
                    {
                        StartDateFilters.Add(date);
                    }

                    idx++;
                }
            }
            if (idx <= 0)
            {
                DateTime creationDate = DateTimeUtils.DATETIMENULL;
                if (StationRepository.Created_At != null)
                {
                    creationDate = StationRepository.Created_At.Value;
                }
                DateCollection date = new DateCollection()
                {
                    Date  = creationDate,
                    Index = idx,
                    Value = creationDate.ToString("dd.MM.yyyy HH:mm")
                };
                StartDateFilters.Add(date);
            }
            if (StartDate > ChangeTracker.CalendarEndDateAccounting)
            {
                ChangeTracker.CalendarEndDateAccounting = StartDate.Date.Add(new TimeSpan(23, 59, 59));
            }
            SelectedStartDateFilterIndex = StartDateFilters.First();
        }
        public void SetDates(StationCashSr[] start)
        {
            var operatorUser = ChangeTracker.CurrentUser as SportBetting.WPF.Prism.Models.OperatorUser;

            if (ChangeTracker.CurrentUser.GetType() == typeof(SportBetting.WPF.Prism.Models.OperatorUser))
            {
                int startIdx = SelectedStartDateFilterIndex;
                int endIdx   = SelectedEndDateFilterIndex;

                StartDateFilters.Clear();
                EndDateFilters.Clear();
                long           idx    = 1;
                DateCollection noDate = new DateCollection()
                {
                    Date  = DateTimeUtils.DATETIME1700,
                    Index = 0,
                    Value =
                        TranslationProvider.Translate(
                            MultistringTags.TERMINAL_FROM_CALENDER).ToString()
                };
                StartDateFilters.Add(noDate);
                EndDateFilters.Add(noDate);

                if (start != null && start.Length > 0)
                {
                    foreach (StationCashSr cash in start)
                    {
                        DateCollection date = new DateCollection()
                        {
                            Date  = cash.DateModified,
                            Index = idx,
                            Value = cash.DateModified + " (" + (
                                ((SportBetting.WPF.Prism.Models.OperatorUser)ChangeTracker.CurrentUser).Username == cash.OperatorID ? cash.OperatorID : StationRepository.StationTyp) + ")"
                        };
                        if (CalStartDate <= cash.DateModified)
                        {
                            StartDateFilters.Add(date);
                        }
                        if (cash.DateModified > StartDate && CalEndDate <= cash.DateModified)
                        {
                            EndDateFilters.Add(date);
                        }

                        idx++;
                    }
                }
                if (idx <= 1)
                {
                    DateTime creationDate = DateTimeUtils.DATETIMENULL;
                    if (StationRepository.Created_At != null)
                    {
                        creationDate = StationRepository.Created_At.Value;
                    }
                    DateCollection date = new DateCollection()
                    {
                        Date  = creationDate,
                        Index = idx,
                        Value = creationDate.ToString()
                    };
                    StartDateFilters.Add(date);
                    EndDateFilters.Add(date);
                }
                if (StartDate > CalEndDate)
                {
                    CalEndDate = StartDate.Date.Add(new TimeSpan(23, 59, 59));
                }
                if (StartDateFilters.Count - 1 >= startIdx)
                {
                    SelectedStartDateFilterIndex = startIdx;
                }
                else
                {
                    SelectedStartDateFilterIndex = StartDateFilters.Count - 1;
                }
                if (EndDateFilters.Count - 1 >= endIdx)
                {
                    SelectedEndDateFilterIndex = endIdx;
                }
                else
                {
                    SelectedEndDateFilterIndex = EndDateFilters.Count - 1;
                }
            }
        }
        public void SetDates(IList <StationCashSr> dates)
        {
            int startIdx = SelectedStartDateFilterIndex;
            int endIdx   = SelectedEndDateFilterIndex;

            StartDateFilters.Clear();
            EndDateFilters.Clear();
            long           idx    = 1;
            DateCollection noDate = new DateCollection()
            {
                Date  = DateTimeUtils.DATETIME1700,
                Index = 0,
                Value = TranslationProvider.Translate(MultistringTags.TERMINAL_FROM_CALENDER).ToString()
            };

            StartDateFilters.Add(noDate);
            EndDateFilters.Add(noDate);

            if (dates != null && dates.Count > 0)
            {
                foreach (StationCashSr cash in dates)
                {
                    DateCollection date = new DateCollection()
                    {
                        Date  = cash.DateModified,
                        Index = idx,
                        Value = cash.DateModified.ToString("dd.MM.yyyy HH:mm") + " (" + (
                            ((OperatorUser)ChangeTracker.CurrentUser).AccountId.ToString() == cash.OperatorID ? ((OperatorUser)ChangeTracker.CurrentUser).Username : StationRepository.StationTyp) + ")"
                    };
                    if (CalStartDate <= cash.DateModified)
                    {
                        StartDateFilters.Add(date);
                    }
                    if (cash.DateModified > StartDate && cash.DateModified <= CalEndDate)
                    {
                        EndDateFilters.Add(date);
                    }

                    idx++;
                }
            }
            if (idx <= 1)
            {
                DateTime creationDate = DateTimeUtils.DATETIMENULL;
                if (StationRepository.Created_At != null)
                {
                    creationDate = StationRepository.Created_At.Value;
                }
                DateCollection date = new DateCollection()
                {
                    Date  = creationDate,
                    Index = idx,
                    Value = creationDate.ToString("dd.MM.yyyy HH:mm")
                };
                StartDateFilters.Add(date);
                EndDateFilters.Add(date);
            }
            if (StartDate > CalEndDate)
            {
                CalEndDate = StartDate.Date.Add(new TimeSpan(23, 59, 59));
            }
            if (StartDateFilters.Count - 1 >= startIdx)
            {
                SelectedStartDateFilterIndex = startIdx;
            }
            else
            {
                SelectedStartDateFilterIndex = StartDateFilters.Count - 1;
            }
            if (EndDateFilters.Count - 1 >= endIdx)
            {
                SelectedEndDateFilterIndex = endIdx;
            }
            else
            {
                SelectedEndDateFilterIndex = EndDateFilters.Count - 1;
            }
        }