Exemple #1
0
        public ActionResult DownloadReplyAttachMent(long ticketReplyId)
        {
            try
            {
                if (!string.IsNullOrEmpty(Convert.ToString(ticketReplyId)))
                {
                    var document = _attachments.GetReplyAttachmentsByAttachmentId(ticketReplyId);
                    if (document != null)
                    {
                        var documentdetail = _attachments.GetReplyAttachmentDetailsByAttachmentId(document.ReplyAttachmentId);
                        return(File(documentdetail.AttachmentBytes, System.Net.Mime.MediaTypeNames.Application.Octet, document.AttachmentName));
                    }

                    return(RedirectToAction("Dashboard", "AdminDashboard"));
                }
                else
                {
                    return(RedirectToAction("Dashboard", "AdminDashboard"));
                }
            }
            catch (Exception)
            {
                throw;
            }
        }