public ActionResult ReadSource(int index)
        {
            TaskManager = (ImportMetadataStructureTaskManager)Session["TaskManager"];
            //set current stepinfo based on index
            if (TaskManager != null)
            {
                TaskManager.SetCurrent(index);
                TaskManager.RemoveExecutedStep(TaskManager.Current());
                TaskManager.Current().notExecuted = true;
            }

            ReadSourceModel model = new ReadSourceModel(TaskManager.Current());

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.IS_GENERATE))
            {
                model.IsGenerated = (bool)TaskManager.Bus[ImportMetadataStructureTaskManager.IS_GENERATE];
            }

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.ROOT_NODE))
            {
                model.RootNode = TaskManager.Bus[ImportMetadataStructureTaskManager.ROOT_NODE].ToString();
            }

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.SCHEMA_NAME))
            {
                model.SchemaName = TaskManager.Bus[ImportMetadataStructureTaskManager.SCHEMA_NAME].ToString();
            }

            return(PartialView(model));
        }
Beispiel #2
0
        public ActionResult Summary(int index)
        {
            TaskManager = (ImportMetadataStructureTaskManager)Session["TaskManager"];
            //set current stepinfo based on index
            if (TaskManager != null)
            {
                TaskManager.SetCurrent(index);
            }

            SummaryModel model = new SummaryModel(TaskManager.Current());

            model.StepInfo = TaskManager.Current();


            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.ROOT_NODE))
            {
                model.RootName = TaskManager.Bus[ImportMetadataStructureTaskManager.ROOT_NODE].ToString();
            }

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.SCHEMA_NAME))
            {
                model.SchemaName = TaskManager.Bus[ImportMetadataStructureTaskManager.SCHEMA_NAME].ToString();
            }



            return(PartialView(model));
        }
Beispiel #3
0
        public ActionResult SelectAFile(int index)
        {
            TaskManager = (ImportMetadataStructureTaskManager)Session["TaskManager"];

            //set current stepinfo based on index
            if (TaskManager != null)
            {
                TaskManager.SetCurrent(index);
            }

            //Get Bus infomations
            SelectFileViewModel model = new SelectFileViewModel();

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.FILENAME))
            {
                model.SelectedFileName = TaskManager.Bus[ImportMetadataStructureTaskManager.FILENAME].ToString();
            }

            //get datastuctureType
            model.SupportedFileExtentions = ImportMetadataStructureWizardHelper.GetExtentionList();

            //Get StepInfo
            model.StepInfo = TaskManager.Current();

            model.serverFileList = GetServerFileList();

            return(PartialView(model));
        }
Beispiel #4
0
        public ActionResult SetParameters(int index)
        {
            TaskManager = (ImportMetadataStructureTaskManager)Session["TaskManager"];
            long metadatstructureId = 0;

            ParametersModel model = new ParametersModel();

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.METADATASTRUCTURE_ID))
            {
                metadatstructureId = Convert.ToInt64(TaskManager.Bus[ImportMetadataStructureTaskManager.METADATASTRUCTURE_ID]);

                //set current stepinfo based on index
                if (TaskManager != null)
                {
                    TaskManager.SetCurrent(index);
                }

                model.MetadataNodes = GetMetadataNodes();
                model.Entities      = GetEntityList();
            }
            else
            {
                ModelState.AddModelError("", "MetadataStructure not exist");
            }

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.TITLE_NODE))
            {
                model.TitleNode = GetDisplayName((string)TaskManager.Bus[ImportMetadataStructureTaskManager.TITLE_NODE]);
            }

            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.DESCRIPTION_NODE))
            {
                model.DescriptionNode =
                    GetDisplayName((string)TaskManager.Bus[ImportMetadataStructureTaskManager.DESCRIPTION_NODE]);
            }
            if (TaskManager.Bus.ContainsKey(ImportMetadataStructureTaskManager.ENTITY_TYPE_NODE))
            {
                model.EntityType = TaskManager.Bus[ImportMetadataStructureTaskManager.ENTITY_TYPE_NODE].ToString();
            }

            model.StepInfo             = TaskManager.Current();
            model.StepInfo.notExecuted = true;

            return(PartialView(model));
        }