internal static void SaveIdsToSdf(MemoIdCollection ids, string tableName, SqlServerAccessor accessor)
        {
            var buf = new StringBuilder();

            using (var writer = XmlWriter.Create(buf)) {
                var serializer = new DataContractSerializer(typeof(MemoIdCollection));
                serializer.WriteObject(writer, ids);
            }

            var xml = buf.ToString();

            if (accessor.IsTextDataExists(tableName))
            {
                accessor.UpdateTextData(tableName, xml);
            }
            else
            {
                accessor.InsertTextData(tableName, xml);
            }
        }
Beispiel #2
0
        internal static void SaveRemovedMemoInfos(MemoInfoCollection removedMemoInfos, SqlServerAccessor accessor)
        {
            var buf = new StringBuilder();

            using (var writer = XmlWriter.Create(buf)) {
                var serializer = new DataContractSerializer(typeof(MemoInfoCollection));
                serializer.WriteObject(writer, removedMemoInfos);
            }

            var xml = buf.ToString();

            if (accessor.IsTextDataExists("RemovedMemoInfo"))
            {
                accessor.UpdateTextData("RemovedMemoInfo", xml);
            }
            else
            {
                accessor.InsertTextData("RemovedMemoInfo", xml);
            }
        }