public void InsertStoryLang(StoryLangInfo storyLang, int tabId)
{
using (IDataContext ctx = DataContext.Instance())
{
string sqlCmd = "INSERT INTO {databaseOwner}[{objectQualifier}" + Prefix + "StoryLang]" +
" (StoryId,Language,Title,Story) VALUES (@0,@1,@2,@3)";
ctx.Execute(CommandType.Text, sqlCmd,storyLang.StoryId, storyLang.Language, storyLang.Title, storyLang.Story);
}
StoryInfo story = GetStory((int) storyLang.StoryId);
if (story.ContentItemID != null)
{
ContentItem contentItem = Util.GetContentController().GetContentItem((int)story.ContentItemID);
contentItem.TabID = tabId;
contentItem.Content = GetStoryContent(story.StoryId);
Util.GetContentController().UpdateContentItem(contentItem);
}
}