示例#1
0
 private void tsbInitialValidation_Click(object sender, EventArgs e)
 {
     Cursor saveCursor = Cursor.Current;
     try
     {
         Cursor.Current = Cursors.WaitCursor;
         InitialValidation validator = new InitialValidation(SystemDataProvider);
         validator.CheckForNewFiles();
     }
     finally
     {
         Cursor.Current = saveCursor;
     }
 }
示例#2
0
        /// <summary>
        /// Look for rows that have passed Initial Validation successfully and mark them ready to 
        /// be loaded into staging.
        /// </summary>
        //private void CheckForCompletedInitialValidations()
        //{
        //    log.Debug("Checking for rows that passed initial validation");
        //    log.Debug(System.Reflection.MethodBase.GetCurrentMethod().Name);

        //    var list = ImportedFileStatus.GetFilesByTypeStatus(ProcessType.InitialValidation, ProcessStatus.Successful);
        //    log.DebugFormat("{0} rows found.", list.Count());

        //    foreach (var row in list)
        //    {
        //        row.ProcessStatus = ProcessStatus.Ready;
        //        row.ProcessType = ProcessType.FileLoad;
        //        row.Save();
        //    }
        //}

        /// <summary>
        /// Look for newly uploaded files that need to be processed.
        /// Specifically, looks for rows in ImportedFileStatus where
        /// ProcessType = InitialValidation and 
        /// ProcessStatus = Ready
        /// </summary>
        private void CheckForInitialValidations()
        {
            if (options.HasFlag(ImportOptions.InitialValidation))
            {
                log.Debug("Checking for rows that need initial validation");

                InitialValidation validator = new InitialValidation(SystemDataProvider);
                validator.CheckForNewFiles();
            }
        }