private void ChangeWindowContext(ContentTab contentTabToChangeTo)
        {
            switch (contentTabToChangeTo)
            {
            case ContentTab.Books:
                DataViewHolder_Grid.Children.Clear();
                ContentFilter_Grid.Children.Clear();
                ContentEditor_Grid.Children.Clear();
                DataViewHolder_Grid.Children.Add(ActiveControls.GetValueOrDefault(typeof(BooksGrid)));
                ContentFilter_Grid.Children.Add(ActiveControls.GetValueOrDefault(typeof(BooksContentFilter)));
                ContentEditor_Grid.Children.Add(new BookContentEditor());
                break;

            case ContentTab.Items:
                throw new NotImplementedException();
                break;

            case ContentTab.Shifts:
                throw new NotImplementedException();
                break;

            case ContentTab.Users:
                throw new NotImplementedException();
                break;
            }
        }
Exemple #2
0
        public void InsertContentTag(long contentId, string tagId)
        {
            var contentTag = new ContentTab();

            contentTag.ContentID = contentId;
            contentTag.TabID     = tagId;
            db.ContentTabs.Add(contentTag);
            db.SaveChanges();
        }