public string ToSQLInsert() { string parentsString = string.Empty; return(string.Format("INSERT INTO `{0}` (`album_style_id`, `album_style_name`, `album_style_description`, `album_style_parents_ids`, `complexity`) VALUES ('{1}', '{2}', '{3}', '{4}', '{5}');", StylesTree.SQLTableName, ID, ConsolidatedName.ToSQLValue(), _styleRebuildedString.ToCamelCase().ToSQLValue(), Parents.Aggregate(parentsString, (current, parent) => current + parent.ID + "|", y => y.TrimEnd('|')), Complexity)); }
public string ConvertToPrintableString() { string parentsString = string.Empty; parentsString = Parents.Aggregate(parentsString, (current, parent) => current + parent.ID + ",", y => y.TrimEnd(',')); if (!string.IsNullOrEmpty(_styleOriginalString)) { return(string.Format("style {0} : '{1}' est parsé en '{2}' et ses parents sont : '{3}' ", ID, _styleOriginalString, _styleRebuildedString, parentsString)); } if (this is RealStylesTreeItem) { return(string.Format("style {0} : '{1}' crée de toutes pièces et ses parents sont : '{2}' ", ID, _styleRebuildedString, parentsString)); } return(string.Format("style {0} : altération '{1}' crée de toutes pièces et ses parents sont : '{2}' ", ID, _styleRebuildedString, parentsString)); }