public ViewResult DownloadFile(List <FileDownloadViewModel> list) { bool check = true; if (list != null && list.Count() > 0) { DownloadFileFromFTP download = new DownloadFileFromFTP(); SettingsData data = repository.GetSettings(); foreach (var file in list) { if (file.Download == "Download") { bool succes = download.DownloadFile(file.FileName, data.FTP_Login, data.FTP_Password, data.RequestUriString); if (succes == false) { check = succes; } } } } if (check) { return(View("Message", "File Download Succes")); } else { return(View("Message", "File Download Error")); } }
public ViewResult DownloadFile() { SettingsData data = repository.GetSettings(); DownloadFileFromFTP download = new DownloadFileFromFTP(); List <string> list = download.GetListOfFiles(data.FTP_Login, data.FTP_Password, data.RequestUriString); return(View(list)); }