/// <summary>
 ///
 /// </summary>
 /// <param name="step"></param>
 /// <returns></returns>
 private BaseImportHandler GetStep(int step)
 {
     if (step == 1)
     {
         var imfs = new Step.ImportFile(null, Context);
         return(new Step.ChooseComponentView(imfs, Context));
     }
     else if (step == 2)
     {
         var fm = new Step.FieldMap(null, Context);
         return(new Step.ImportFile(fm, Context));
     }
     else if (step == 3)
     {
         var vad = new Step.DataValidation(null, Context);
         return(new Step.FieldMap(vad, Context));
     }
     else if (step == 4)
     {
         var di = new Step.DataImport(null, Context);
         return(new Step.DataValidation(di, Context));
     }
     else if (step == 5)
     {
         return(new Step.DataImport(null, Context));
     }
     else
     {
         return(null);
     }
 }
        public ImportContext Validate(bool enableRecordUpdate, bool enableCreateLookup, List <ComponentCustomAction> ca)
        {
            //var di = new Step.DataImport(null, Context);
            this.Context.EnableCreateLookup    = enableCreateLookup;
            this.Context.EnableUpdateDuplicate = enableRecordUpdate;
            var k = new Step.DataValidation(null, Context);

            return(k.ValidateComponent(LogPath, ca));
        }
 public ImportContext ImportData(List <ComponentCustomAction> ca)
 {
     if (this.Context.Status == ImportStatus.pending)
     {
         var k  = new Step.DataImport(null, Context);
         var dd = new Step.DataValidation(null, Context);
         dd.GetComponentData(LogPath);
         return(k.ImportComponent(LogPath, ca));
     }
     else
     {
         return(this.Context);
     }
 }
        public List <ImportDataStatus> GetStatus()
        {
            var k  = new Step.DataImport(null, Context);
            var dd = new Step.DataValidation(null, Context);

            if (step == 5)
            {
                dd.GetComponentData(LogPath, true);
            }
            else
            {
                dd.GetComponentData(LogPath);
            }
            return(this.Context.GetComponentStatus(this.LogPath));
        }
 public void InitState()
 {
     if (step == 3 || step == 4 || step == 5)
     {
         var k  = new Step.DataImport(null, Context);
         var dd = new Step.DataValidation(null, Context);
         if (step == 5)
         {
             dd.GetComponentData(LogPath, true);
         }
         else
         {
             dd.GetComponentData(LogPath);
         }
     }
     else if (step == 2)
     {
         this.Context.DataColumns = GetSourceColumns();
     }
     else if (step == 1)
     {
     }
 }
        public DataTable GetComponentData(string compID)
        {
            var k = new Step.DataValidation(null, Context);

            return(k.GetComponentData(compID, LogPath));
        }