コード例 #1
0
ファイル: CoubJob.cs プロジェクト: IgorDemidov/Coubus.UI.3
 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();
 }
コード例 #2
0
ファイル: Task3Library.cs プロジェクト: AlexanderChechet/ADAM
        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();
        }