public ControllerBase(IDataContext context)
        {
            DataContext = context;

            PageIndex = 0;
            PageSize  = ConfigurationSettings.GetInteger("DefaultPageSize");
        }
        private void ProcessQueuedItem()
        {
            Exception errorState = null;

            try
            {
                var settings = new ImportFileSettings()
                {
                    SkipFirstXRows = ConfigurationSettings.GetInteger("SkipFirstXRowsInImportFile")
                };
                if (!(CurrentQueuedItem is EmptyImportQueue))
                {
                    Result = DataContext.Import.ProcessImportQueue(CurrentQueuedItem, settings);
                }
            }
            catch (Exception ex)
            {
                errorState = ex;
                throw ex;
            }
            finally
            {
                if (errorState != null)
                {
                    DataContext.Import.UpdateStatus(new ImportQueueFilter()
                    {
                        ImportQueueId = CurrentQueuedItem.ImportQueueId,
                        ImportStatus  = enums.ImportStatus.Error,
                        ErrorMessage  = errorState.Message
                    });
                }
            }
        }