private static void AddRecord(Record record, CoubTarget target, string tempFile) { record.AddNew(); record.Classifications.Add(new Adam.Core.Classifications.ClassificationPath("/Cubus/Coub")); record.Fields.GetField<TextField>("Name").SetValue(target.Name); record.Fields.GetField<TextField>("Author").SetValue(target.Author); record.Fields.GetField<TextField>("Description").SetValue(target.Description); record.Files.AddFile(tempFile); record.Save(); }
private void AddRecord(string path, Guid clId, Dictionary<string, string> descriptions) { var record = new Record(app); record.AddNew(); record.Files.AddFile(path); record.Classifications.Add(clId); Language language = new Language(app); foreach(var item in descriptions) { language.Load(item.Key); Guid id = language.Id; record.Fields.GetField<TextField>("AlexanderChechet_multi", id).SetValue(item.Value); } record.Save(); }