public void MovePersonDown(PersonItemsElement personItem)
        {
            var toChange = this.PersonItems.IndexOf(personItem);

            if (toChange >= this.PersonItems.Count - 1)
            {
                return;
            }

            Db.Transact(() => {
                (this.PersonItems[toChange + 1].Person.Data as Person).SequenceNumber -= 1;
                (personItem.Person.Data as Person).SequenceNumber += 1;
            });
            PersonItems.RemoveAt(toChange);
            PersonItems.Insert(toChange + 1, personItem);
        }
 public bool IsLast(PersonItemsElement personItem)
 {
     return(PersonItems.IndexOf(personItem) == PersonItems.Count - 1);
 }
 public bool IsFirst(PersonItemsElement personItem)
 {
     return(PersonItems.IndexOf(personItem) == 0);
 }