コード例 #1
0
        private void DeleteImpl()
        {
            var formatter = FormattersLocator.Get(SelectedItem.Guid);

            FormattersLocator.Remove(formatter);
            UpdateConverters();
        }
コード例 #2
0
        private static void FillFieldViewModel(RuleFieldViewModel viewModel, ExcelImportRule.Column model)
        {
            if (model == null)
            {
                return;
            }

            viewModel.UpdateCompatableFormatters();
            viewModel.Formatter = FormattersLocator.Get(model.Formatter.Guid);
            viewModel.Active    = model.Active;
            viewModel.Required  = model.Required;
            viewModel.Index     = model.Index;
        }
コード例 #3
0
 protected override ExcelImportRule GetModel(ExcelImportRulePoco entity)
 {
     return(new ExcelImportRule()
     {
         Name = entity.Name,
         Description = entity.Description,
         Identificator = entity.Identificator,
         CsvMode = entity.UseCsvFile,
         RowOffset = entity.RowOffset,
         ColumnOffset = entity.ColumnOffset,
         WorksheetIndex = entity.WorksheetIndex,
         Columns = entity.Properties.Select(p => new ExcelImportRule.Column()
         {
             Index = p.RowIndex,
             Name = p.Property.ToString(),
             Formatter = FormattersLocator.Get(p.FormatterGuid),
             Active = p.Active,
             Required = p.Required
         })
     });
 }
コード例 #4
0
 protected override IFormatter GetModel(FixedFormatterReference entity)
 {
     return(FormattersLocator.Get(entity.Guid));
 }