protected ActionResult ReturnELTFile(int FileID) { FileSystemBL fBL = new FileSystemBL(); ELTFileSystemItem file = fBL.GetFileByID(FileID); Stream receiveStream = new MemoryStream(file.Data.ToArray()); return(File(receiveStream, COMMON.Util.GetOutputFileExtension(file.Name), file.Name)); }
public ActionResult DocumentManager(string param) { string RootFolder = string.Empty; ELTFileSystemProvider provider = new ELTFileSystemProvider(RootFolder); FileSystemBL bl = new FileSystemBL(); int id = bl.GetRootFileItemID(User.Identity.Name); var rootfolder = bl.GetFileByID(id); ViewBag.InitialFolder = rootfolder.Name; if (Session["FileFolderToBeSet"] != null) { ViewBag.InitialFolder = (string)Session["FileFolderToBeSet"]; Session["FileFolderToBeSet"] = null; } if (param != null) { param = "?" + param; } ViewBag.Params = param; return(View(provider)); }
public ActionResult FileAttacher() { string ItemID = Request.QueryString["itemid"]; string EmailType = Request.QueryString["EmailType"]; ViewBag.ItemID = ItemID; ViewBag.EmailType = EmailType; //these two will be viewbag item to the client ! string RootFolder = string.Empty; ELTFileSystemProvider provider = new ELTFileSystemProvider(RootFolder); FileSystemBL bl = new FileSystemBL(); int id = bl.GetRootFileItemID(User.Identity.Name); var rootfolder = bl.GetFileByID(id); ViewBag.InitialFolder = rootfolder.Name; if (Session["FileFolderToBeSet"] != null) { ViewBag.InitialFolder = (string)Session["FileFolderToBeSet"]; Session["FileFolderToBeSet"] = null; } return(View("FileAttacher", provider)); }