Beispiel #1
0
 public GetFileInformationModel()
 {
     FileInfoModel = new FileInfoModel();
     Extention = "";
     ErrorList = new List<Error>();
     IsSaved = false;
 }
        public ActionResult SaveExcelFileInfos(FileInfoModel info)
        {
            TaskManager TaskManager = (TaskManager)Session["TaskManager"];

            ExcelFileReaderInfo excelFileReaderInfo = new ExcelFileReaderInfo();

            excelFileReaderInfo.Data = info.Data;
            excelFileReaderInfo.Dateformat = "";//info.Dateformat;
            excelFileReaderInfo.Decimal = info.Decimal;
            excelFileReaderInfo.Offset = info.Offset;
            excelFileReaderInfo.Orientation = info.Orientation;
            excelFileReaderInfo.Variables = info.Variables;

            TaskManager.AddToBus(TaskManager.FILE_READER_INFO, excelFileReaderInfo);

            GetFileInformationModel model = new GetFileInformationModel();
            model.StepInfo = TaskManager.Current();
            model.Extention = TaskManager.Bus[TaskManager.EXTENTION].ToString();
            model.FileInfoModel = info;
            model.FileInfoModel.Extention = TaskManager.Bus[TaskManager.EXTENTION].ToString();
            model.IsSaved = true;

            return RedirectToAction("ReloadUploadWizard", new { restart = false });
        }
        private FileInfoModel GetFileInfoModel(AsciiFileReaderInfo info, string extention)
        {
            FileInfoModel FileReaderInfo = new FileInfoModel();

            FileReaderInfo.Data = info.Data;
            FileReaderInfo.Dateformat = info.Dateformat;
            FileReaderInfo.Decimal = info.Decimal;
            FileReaderInfo.Offset = info.Offset;
            FileReaderInfo.Orientation = info.Orientation;
            FileReaderInfo.Variables = info.Variables;
            FileReaderInfo.Separator = info.Seperator;
            FileReaderInfo.TextMarker = info.TextMarker;

            return FileReaderInfo;
        }
        public ActionResult SaveAsciiFileInfos(FileInfoModel info)
        {
            TaskManager TaskManager = (TaskManager)Session["TaskManager"];

            AsciiFileReaderInfo asciiFileReaderInfo = new AsciiFileReaderInfo();

            asciiFileReaderInfo.Data = info.Data;
            asciiFileReaderInfo.Dateformat = "";//info.Dateformat;
            asciiFileReaderInfo.Decimal = info.Decimal;
            asciiFileReaderInfo.Offset = info.Offset;
            asciiFileReaderInfo.Orientation = info.Orientation;
            asciiFileReaderInfo.Seperator = info.Separator;
            asciiFileReaderInfo.Variables = info.Variables;
            asciiFileReaderInfo.TextMarker = info.TextMarker;

            TaskManager.AddToBus(TaskManager.FILE_READER_INFO, asciiFileReaderInfo);

            GetFileInformationModel model = new GetFileInformationModel();
            model.StepInfo = TaskManager.Current();
            model.StepInfo.SetValid(true);
            model.Extention = TaskManager.Bus[TaskManager.EXTENTION].ToString();
            model.FileInfoModel = info;
            model.FileInfoModel.Extention = TaskManager.Bus[TaskManager.EXTENTION].ToString();
            model.IsSaved = true;

            return RedirectToAction("ReloadUploadWizard", new { restart = false });
        }