private XPCursor GetPatternStudyEvents(XPCollection <ContingentUnit> contingentUnits)
        {
            var cursor = new XPCursor(_session, typeof(Event), new GroupOperator(CriteriaHelper.PatternEvent,
                                                                                 new InOperator("ContingentUnit", contingentUnits)));

            cursor.PageSize = 10;
            return(cursor);
        }
Exemple #2
0
        public XPCursor GetCursor(int pagesize)
        {
            SortingCollection sortingCollection = Sorting;
            var sortProperties = new SortProperty[Sorting.Count];

            for (int i = 0; i < sortProperties.Length; i++)
            {
                sortProperties[i] = sortingCollection[i];
            }

            var xpCursor = new XPCursor(Session, ObjectType, Criteria, sortProperties)
            {
                PageSize = pagesize
            };

            return(xpCursor);
        }
        private void Migrate()
        {
            using (_session = new TimeTableSession {
                ConnectionString = Configuration.GetConnectionStringByName(ConnectionStringName)
            })
            {
                var cursor = new XPCursor(_session, typeof(Event), CriteriaHelper.PatternEvent);
                foreach (Event patternEvnt in cursor)
                {
                    var patternExceptionEvents = FindExceptions(patternEvnt);

                    ProcessWholePattern(patternEvnt, patternExceptionEvents);
                }
                _session.Delete(cursor);
                _session.Save(cursor);
            }
        }
        protected MainViewModel()
        {
            session = new UnitOfWork();

            AvailablePersonCollection        = new XPCollection <Person_Person>(session);
            AvailablePersonCollection.Filter =
                new BinaryOperator(
                    nameof(Person_Person.PersonType),
                    "EM",
                    BinaryOperatorType.NotEqual
                    );

            SelectedPersonCollection = new ObservableCollection <Person_Person>();
            AvailablePersonCursor    = new XPCursor(
                session,
                typeof(Person_Person)
                );
        }
Exemple #5
0
        public XPCursor GetCursor(int pagesize)
        {
            SortingCollection sortingCollection = Sorting;
            var sortProperties = new SortProperty[Sorting.Count];
            for (int i = 0; i < sortProperties.Length; i++)
                sortProperties[i] = sortingCollection[i];

            var xpCursor = new XPCursor(Session, ObjectType, Criteria, sortProperties) {PageSize = pagesize};
            return xpCursor;
        }