public ActionResult RenderDocument(int ID)
        {
            Claim claim = new Claim();
            try
            {
                claim.GetDocument(ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return PartialView(claim);
        }
        public ActionResult DownloadDocument(int ID)
        {
            Claim claim = new Claim();
            try
            {
                claim.GetDocument(ID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            string ext = ".txt";
            string ContentType = "text/plain";
            string FileName = (claim.LeadDocument.LeadDocument.LeadDocumentTitle == null) ? "UntitledDocument" : claim.LeadDocument.LeadDocument.LeadDocumentTitle;

            if (claim.LeadDocument.LeadDocument.DocumentBLOB.Length > 0)
            {
                if (claim.LeadDocument.LeadDocument.DocumentFormat == "NOTE")
                {
                    ContentType = "text/plain";
                    ext = ".txt";
                }
                else
                {
                    if (claim.LeadDocument.LeadDocument.FileName != null && claim.LeadDocument.LeadDocument.FileName.Substring(claim.LeadDocument.LeadDocument.FileName.IndexOf(".") + 1) == "pdf")
                    {
                        ContentType = "application/pdf";
                        ext = ".pdf";
                    }
                    else
                    {
                        ContentType = "application/rtf";
                        ext = ".rtf";
                    }
                }
                Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName + ext);
                return File(claim.LeadDocument.LeadDocument.DocumentBLOB, ContentType);
            }
            else
            {
                Response.AppendHeader("Content-Disposition", "attachment;filename=" + FileName + ext);
                return File(System.Text.Encoding.UTF8.GetBytes("No Data found!!!!"), ContentType);
            }
        }