public static Guid xmlDB_Create_Article(this TM_Xml_Database tmDatabase, TeamMentor_Article article) { article.Metadata.Id = Guid.NewGuid(); if(article.xmlDB_Save_Article(tmDatabase)) return article.Metadata.Id; return Guid.Empty; }
public static TeamMentor_Article xmlDB_NewGuidanceItem(this TM_Xml_Database tmDatabase, Guid guidanceItemId, string title, string images, // DateTime lastUpdate, string topic, string technology, string category, string ruleType, string priority, string status, string author, string phase, string htmlContent, Guid libraryId) { var article = new TeamMentor_Article(); article.Metadata = new TeamMentor_Article_Metadata() { Id = (guidanceItemId == Guid.Empty) ? Guid.NewGuid() : guidanceItemId, Library_Id = libraryId, Author = author, Category = category, Priority = priority, Type = ruleType, //.Source ; Status = status, Technology = technology, Title = title, Phase = phase, // .Type1; // .type; }; article.Content = new TeamMentor_Article_Content() { DataType = "html" //Sanitized = false }; article.Content.Data.Value = htmlContent; /*var guidanceItem = new guidanceItem() * { * id = (guidanceItemId == Guid.Empty) * ? Guid.NewGuid().str() * : guidanceItemId.str(), * Author = author, * Category = category, * content = htmlContent, * // Date = lastUpdate.str(), * Priority = priority, * Rule_Type = ruleType, * //.Source ; * Status = status, * Technology = technology, * title = title, * Topic = topic, * phase = phase, * libraryId = libraryId.str() * // .Type1; * // .type; * }; */ article.xmlDB_Save_Article(libraryId, tmDatabase); return(article.htmlEncode()); //this was causing double encoding problems with some properties (like the Title) }
public static Guid xmlDB_Create_Article(this TM_Xml_Database tmDatabase, TeamMentor_Article article) { article.Metadata.Id = Guid.NewGuid(); if (article.xmlDB_Save_Article(tmDatabase)) { return(article.Metadata.Id); } return(Guid.Empty); }
public static TeamMentor_Article xmlDB_NewGuidanceItem(this TM_Xml_Database tmDatabase, Guid guidanceItemId, string title, string images, // DateTime lastUpdate, string topic, string technology, string category, string ruleType, string priority, string status, string author,string phase, string htmlContent, Guid libraryId) { var article = new TeamMentor_Article(); article.Metadata = new TeamMentor_Article_Metadata() { Id = (guidanceItemId == Guid.Empty) ? Guid.NewGuid() : guidanceItemId, Library_Id = libraryId, Author = author, Category = category, Priority = priority, Type = ruleType, //.Source ; Status = status, Technology = technology, Title = title, Phase = phase, // .Type1; // .type; }; article.Content = new TeamMentor_Article_Content() { DataType = "html" //Sanitized = false }; article.Content.Data.Value = htmlContent; /*var guidanceItem = new guidanceItem() { id = (guidanceItemId == Guid.Empty) ? Guid.NewGuid().str() : guidanceItemId.str(), Author = author, Category = category, content = htmlContent, // Date = lastUpdate.str(), Priority = priority, Rule_Type = ruleType, //.Source ; Status = status, Technology = technology, title = title, Topic = topic, phase = phase, libraryId = libraryId.str() // .Type1; // .type; }; */ article.xmlDB_Save_Article(libraryId, tmDatabase); return article.htmlEncode(); }
public bool UpdateGuidanceItem(TeamMentor_Article article) { return article.xmlDB_Save_Article(tmXmlDatabase); }
public bool UpdateGuidanceItem(TeamMentor_Article article) { return(article.xmlDB_Save_Article(tmXmlDatabase)); }
public static bool xmlDB_Save_Article(this TeamMentor_Article article, TM_Xml_Database tmDatabase) { return(article.xmlDB_Save_Article(article.Metadata.Library_Id, tmDatabase)); }