Beispiel #1
0
        public PartialViewResult FileDetails()
        {
            EmployeeImageService      imgService = new EmployeeImageService();
            List <EmployeeImageModel> DetList    = imgService.GetAllFiles();

            return(PartialView("FileDetails", DetList));
        }
Beispiel #2
0
        public FileResult DownLoadFile()
        {
            EmployeeImageService      imgService = new EmployeeImageService();
            List <EmployeeImageModel> ObjFiles   = imgService.GetAllFiles();

            var FileById = (from FC in ObjFiles
                            where FC.EmployeeNumber.Equals((Int64)Session["empId"])
                            select new { FC.FileName, FC.FileContent }).ToList().FirstOrDefault();

            return(File(FileById.FileContent, "image/jpg"));
        }