コード例 #1
0
 public void Save()
 {
     _attribute.description = Text;
     if (_attribute.id == 0)
     {
         _attribute.key_id = _key.id;
         _iKeyManager.Insert(_attribute, AttributeChoices.ToList());
     }
     else
     {
         _iKeyManager.Update(_attribute, AttributeChoices.ToList());
     }
 }
コード例 #2
0
        private void Move(int indexFrom, int indexTo)
        {
            var literatureMoved = LiteratureItems[indexFrom];
            var literature      = LiteratureItems[indexTo];

            LiteratureItems.RemoveAt(indexFrom);
            LiteratureItems.Insert(indexTo, literatureMoved);

            literatureMoved.position = (Int16)indexTo;
            literature.position      = (Int16)indexFrom;
            IKeyManager.Update(literatureMoved);
            IKeyManager.Update(literature);
            SelectedLiterature = LiteratureItems[indexTo];
        }