You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
using Swift.web.Library; using System; using System.IO; using System.Web;
namespace Swift.web.Handler { /// <summary>
/// Summary description for CustomerSignature
/// </summary>
public class CustomerSignature : IHttpHandler { public void ProcessRequest(HttpContext context) { var registerDate = context.Request.QueryString["registerDate"]; var customerId = context.Request.QueryString["customerId"]; var membershipNo = context.Request.QueryString["membershipNo"]; var fileName = context.Request.QueryString["fileName"]; var showType = context.Request.QueryString["showType"]; var isForMobileTempUpload = context.Request.QueryString["showType"]; var fileDescription = context.Request.QueryString["fileDescription"]; var isMoved = context.Request.QueryString["isMoved"]; DateTime txnDate = Convert.ToDateTime(registerDate);
string fileUrl = ""; if (context.Request.QueryString["fileDesc"] == "Compliance Document") { fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipNo + "\\ComplianceDocument\\" + fileName; } else { if (isForMobileTempUpload == "Y" && isMoved == "N") fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\VerifyDocumentUpload\\" + fileName;
else if (showType == "D") fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\DepositSlip\\" + fileName; else if(fileDescription == "Deposit Slip") fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipNo + "\\" + "CustomerDepositSlip\\" + fileName;
else fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipNo + "\\" + fileName;
if (!string.IsNullOrEmpty(showType) && showType == "compliance") fileUrl = GetStatic.GetCustomerFilePath() + "CustomerDocument\\" + registerDate.Replace("-", "\\") + "\\" + membershipNo + "\\ComplianceDocument\\" + fileName;
}
if (File.Exists(fileUrl)) { context.Response.ContentType = fileUrl.GetFileExtension().GetMimeType();
} else { fileUrl = (GetStatic.ReadWebConfig("root", "") + "Images\\na.gif"); context.Response.ContentType = fileUrl.GetFileExtension().GetMimeType(); } context.Response.WriteFile(fileUrl); }
public bool IsReusable { get { return false; } } } }
|