예제 #1
0
        private static void ApplyCellStyle(IExcelWorker worker, Level1Fields field, int column)
        {
            var type = field.ToType();

            if (type != null && !type.IsEnum)
            {
                worker.SetStyle(column, type);
            }
        }
예제 #2
0
        private static void ApplyCellStyle(IExcelWorker worker, PositionChangeTypes type, int column)
        {
            switch (type)
            {
            case PositionChangeTypes.Currency:
            case PositionChangeTypes.State:
                worker.SetStyle(column, typeof(string));
                break;

            default:
                worker.SetStyle(column, typeof(decimal));
                break;
            }
        }
예제 #3
0
 public PeopleUploadViewModel(
     IAmSpaceClient client,
     IMapper mapper,
     IExcelWorker excelWorker,
     SearchPeopleViewModel searchVm,
     ProgressIndicatorViewModel progressVm,
     ChangePasswordViewModel changePasswordVm,
     IActiveDirectoryProvider activeDirectoryProvider)
 {
     ProgressVM                   = progressVm;
     _client                      = client;
     _mapper                      = mapper;
     _excelWorker                 = excelWorker;
     OpenFileCommand              = new RelayCommand(OpenFile);
     UploadDataCommand            = new RelayCommand(UploadData);
     _searchVm                    = searchVm;
     InputRows                    = new ObservableCollection <SapPersonExcelRow>();
     InputRows.CollectionChanged += InputRows_CollectionChanged;
     _changePasswordVm            = changePasswordVm;
     _activeDirectoryProvider     = activeDirectoryProvider;
     _activeDirectoryProvider.ConnectionStatusChanged += _activeDirectoryProvider_ConnectionStatusChanged;
 }
예제 #4
0
 public ExcelWorkerDecorator(IExcelWorker decoratee, ILog logger)
 {
     _decoratee = decoratee;
     _logger    = logger;
 }