Esempio n. 1
0
        static void Update(TriggersModel value)
        {
            //Сохраняю схему в json файл
            JsonSchemaToFileWriter.SaveSchemaToFile(value, FilePath);

            _uidDict = value;
        }
        static void GenerateOverdueDaysTemplatesSettings(List <DebtorTemplateBlock> models, string directory)
        {
            var nModel = models.Select(x => new { x.OverdueDays, x.TemplateBlock.TriggerName, x.TemplateBlock.TriggerGroupName })
                         .Select(x => x.OverdueDays.Select(day => new TemplateWithOverdueDaysSetting
            {
                DayOfOverdue     = day,
                TriggerGroupName = x.TriggerGroupName,
                TriggerName      = x.TriggerName
            })).SelectMany(x => x).ToList();

            JsonSchemaToFileWriter.SaveSchemaToFile(nModel, $"{directory}/OverdueDayTriggers.json");
        }
        public static void GenerateSchema(string directory)
        {
            //Получили модели для генерации
            var models = GetModelsFromFiles();

            foreach (var m in models)
            {
                EccTemplateListGenerator.AddOrIgnore(m);
                EccCodeGuidProvider.GetOrAddGuid(m.TriggerGroupName, m.TriggerName);
            }

            //Сохраняю схему в json файл
            JsonSchemaToFileWriter.SaveSchemaToFile(models, FilePath(directory));
        }
Esempio n. 4
0
        public static void GenerateSchema(string directory)
        {
            var data = TableBody.GetTableBodyFromJsonFileSchema($"JsonSchemas/Masks/0.json");

            var masks = data.Rows.Select(x => new EccMaskModel
            {
                Mask                = Unwrap(x.Elements[TemplateNameIndex]),
                Description         = x.Elements[2],
                EnglishDescription  = x.Elements[3],
                SpanishDescription  = x.Elements[4],
                DefaultValue        = x.Elements[DefaultValueIndex],
                ShowInUserInterface = x.Elements[7].Replace("\n", string.Empty) == "+"
            }).Select(x => EccMaskModel.Process(x)).ToList();

            JsonSchemaToFileWriter.SaveSchemaToFile(masks, FilePath(directory));
        }
Esempio n. 5
0
        public static void Update(List <TemplateBlockJustTextModel> value)
        {
            JsonSchemaToFileWriter.SaveSchemaToFile(value, FilePath);

            _templates = value;
        }