示例#1
0
        private static void CreateAndAddNewAttribute(string title)
        {
            LogAttributeRecord record = LogAttributeRecord.CreateRecord();

            record.Value = title;
            AttributeIds.Add(title, record.Id);
            record.Save();
        }
示例#2
0
        private static void CreateAndAddNewAttribute(string title)
        {
            var newAttribute = LogAttributeRecord.CreateRecord();

            newAttribute.Value = title;
            AttributeIds.Add(title, newAttribute.Id);
            newAttribute.Save();
        }
示例#3
0
        private static void LoadAttributes()
        {
            var attrs = LogAttributeRecord.FindAll();

            foreach (var attr in attrs)
            {
                if (AttributeIds.ContainsKey(attr.Value))
                {
                    attr.DeleteLater();
                    continue;
                }
                AttributeIds.Add(attr.Value, attr.Id);
            }
        }