Exemplo n.º 1
0
        public ActionResult FinishUpload()
        {
            TaskManager = (EasyUploadTaskManager)Session["TaskManager"];
            //TaskManager.SetCurrent(null);


            FinishUploadModel finishModel = new FinishUploadModel();

            if (TaskManager != null)
            {
                finishModel.DatasetTitle = TaskManager.Bus[EasyUploadTaskManager.DATASET_TITLE].ToString();
                finishModel.Filename     = TaskManager.Bus[EasyUploadTaskManager.FILENAME].ToString();
            }

            Session["TaskManager"] = null;
            try
            {
                string      path        = Path.Combine(AppConfiguration.GetModuleWorkspacePath("DCM"), "SubmitTaskInfo.xml");
                XmlDocument xmlTaskInfo = new XmlDocument();
                xmlTaskInfo.Load(path);


                Session["TaskManager"] = EasyUploadTaskManager.Bind(xmlTaskInfo);
            }
            catch (Exception e)
            {
                ModelState.AddModelError(String.Empty, e.Message);
            }


            return(ShowData((long)TaskManager.Bus[EasyUploadTaskManager.DATASET_ID]));
        }
Exemplo n.º 2
0
        public ActionResult UploadWizard()
        {
            ViewBag.Title = PresentationModel.GetViewTitleForTenant("Upload Data", this.Session.GetTenant());

            Session["TaskManager"] = null;
            TaskManager            = null;

            try
            {
                string path = "";

                path = Path.Combine(AppConfiguration.GetModuleWorkspacePath("DCM"), "EasyUploadTaskInfo.xml");

                XmlDocument xmlTaskInfo = new XmlDocument();
                xmlTaskInfo.Load(path);

                Session["TaskManager"] = EasyUploadTaskManager.Bind(xmlTaskInfo);

                TaskManager = (EasyUploadTaskManager)Session["TaskManager"];
            }
            catch (Exception e)
            {
                ModelState.AddModelError(String.Empty, e.Message);
            }

            TaskManager = (EasyUploadTaskManager)Session["TaskManager"];

            return(View((EasyUploadTaskManager)Session["TaskManager"]));
        }