public IActionResult DownloadErrorFile()
        {
            var model = new DownloadErrorFileViewModel();

            model.ErrorFileCreatedDate = DateTime.Now;
            return(View("../DownloadErrorFile/Index", model));
        }
示例#2
0
        public IActionResult DownloadErrorFile()
        {
            var session = HttpContext.Session;

            int?UKPRN;

            if (session.GetInt32("UKPRN") != null)
            {
                UKPRN = session.GetInt32("UKPRN").Value;
            }
            else
            {
                return(RedirectToAction("Index", "Home", new { errmsg = "Please select a Provider." }));
            }

            var model = new DownloadErrorFileViewModel()
            {
                ErrorFileCreatedDate = DateTime.Now, UKPRN = UKPRN
            };
            IEnumerable <BlobFileInfo> list = _blobService.GetFileList(UKPRN + BlobContainerPath).OrderByDescending(x => x.DateUploaded).ToList();

            if (list.Any())
            {
                TimeZoneInfo tzi = TimeZoneInfo.FindSystemTimeZoneById("GMT Standard Time");
                DateTime     dt1 = DateTime.Parse(list.FirstOrDefault().DateUploaded.Value.DateTime.ToString());
                DateTime     dt2 = TimeZoneInfo.ConvertTimeFromUtc(dt1, tzi);

                model.ErrorFileCreatedDate = Convert.ToDateTime(dt2.ToString("dd MMM yyyy HH:mm"));
            }

            return(View("../BulkUploadApprenticeships/DownloadErrorFile/Index", model));
        }
示例#3
0
 public IActionResult DownloadErrorFile(DownloadErrorFileViewModel model)
 {
     return(View("../BulkUploadApprenticeships/WhatDoYouWantToDoNext/Index", new WhatDoYouWantToDoNextViewModel()));
 }
 public IActionResult DownloadErrorFile(DownloadErrorFileViewModel model)
 {
     // where to go????
     return(View("../Bulkupload/WhatDoYouWantToDoNext/Index", new WhatDoYouWantToDoNextViewModel()));
 }