/// <summary> /// Loads the page. /// </summary> /// <remarks></remarks> private void LoadPage() { try { lblDisplayMessage.Visible = false; string strReq = ""; //strReq = Request.RawUrl; strReq = Request.Form["txtPostData"]; // strReq = strReq.Substring(strReq.IndexOf('?') + 1); if (!strReq.Equals("")) { strReq = EncryptDecryptQueryString.Decrypt(strReq, qsk); } string pdfPath = GetFilePath(); string[] arrMsgs = strReq.Split('&'); string[] arrIndMsg; arrIndMsg = arrMsgs[0].Split('='); //Get the Name string filename = arrIndMsg[1].ToString().Trim(); //string FilePath = directory + filename; if (File.Exists(pdfPath + filename)) { Response.ContentType = pdfContentType; Response.AppendHeader(contentDisposition, attachmentFileName + filename); //Response.TransmitFile(Server.MapPath(pdfPath + FileName)); //If path is virtual path Response.TransmitFile(pdfPath + filename); //If path is physical path Response.End(); } } catch { lblDisplayMessage.Visible = true; lblDisplayMessage.InnerText = Constants.ErrorMsg1; } }
/// <summary> /// Loads the page. /// </summary> /// <remarks></remarks> private void LoadPage() { try { lblDisplayMessage.Visible = false; string strReq = ""; strReq = Request.Form["txtPostData"]; if (!strReq.Equals("")) { strReq = EncryptDecryptQueryString.Decrypt(strReq, qsk); } string[] arrMsgs = strReq.Split('&'); string[] arrIndMsg; arrIndMsg = arrMsgs[0].Split('='); //Get the Details string[] Details; Details = arrIndMsg[1].Split(','); if (Details != null) { lblTransactionNum.Text = Convert.ToString(Details[0].Trim()); lbltxnDateTime.Text = Convert.ToString(Details[1].Trim()); lblCardnumber.Text = Convert.ToString(Details[2].Trim()); lblName.Text = Convert.ToString(Details[3].Trim()); lblamount.Text = Convert.ToString(Details[4].Trim()); lblModePayment.Text = Convert.ToString(Details[5].Trim()); } } catch { lblDisplayMessage.Visible = true; lblDisplayMessage.InnerText = Constants.GeneralErrorMessage; } }
private string GetApplicationNum() { ApplicationNum = ""; try { string strReq = ""; strReq = Request.Form["txtPostData"]; if (!strReq.Equals("")) { strReq = EncryptDecryptQueryString.Decrypt(strReq, qsk); } string[] arrMsgs = strReq.Split('&'); string[] arrIndMsg; arrIndMsg = arrMsgs[0].Split('='); //Get the Details ApplicationNum = Convert.ToString(arrIndMsg[1]); return(ApplicationNum); } catch (Exception) { return(ApplicationNum); } }
/// <summary> /// Loads the page. /// </summary> /// <remarks></remarks> private void LoadPage() { //string strReq = ""; //strReq = Request.RawUrl; //strReq = strReq.Substring(strReq.IndexOf('?') + 1); //if (!strReq.Equals("")) // strReq = EncryptDecryptQueryString.Decrypt(strReq, qsk); //string directory = GetFilePath(); //string[] arrMsgs = strReq.Split('&'); //string[] arrIndMsg; //arrIndMsg = arrMsgs[0].Split('='); //Get the Name //string filename = arrIndMsg[1].ToString().Trim(); //string FilePath = directory + filename; //byte[] fileBytes = File.ReadAllBytes(FilePath); //MemoryStream stream = new MemoryStream(fileBytes); //Response.ContentType = pdfContentType; //Response.AddHeader(contentDisposition, inlineAttachment + FilePath); //Response.AddHeader(contentLength, stream.Length.ToString()); //Response.BinaryWrite(stream.ToArray()); //Response.End(); bool IsAccHavePdf = false; string strReq = ""; string AccountNumber = CardHolderManager.GetLoggedInUser().creditcard_acc_number.Decrypt(); if (AccountNumber != "") { //strReq = Request.RawUrl; strReq = Request.Form["txtPostData"]; if (!strReq.Equals("")) { strReq = EncryptDecryptQueryString.Decrypt(strReq, qsk); } string directory = GetFilePath(); string[] arrMsgs = strReq.Split('&'); string[] arrIndMsg; arrIndMsg = arrMsgs[0].Split('='); //Get the Name string filename = arrIndMsg[1].ToString().Trim(); IsAccHavePdf = CardManager.GetPDFnames(AccountNumber, filename); if (IsAccHavePdf == true) { string FilePath = directory + filename; byte[] fileBytes = File.ReadAllBytes(FilePath); MemoryStream stream = new MemoryStream(fileBytes); Response.ContentType = pdfContentType; Response.AddHeader(contentDisposition, inlineAttachment + FilePath); Response.AddHeader(contentLength, stream.Length.ToString()); Response.BinaryWrite(stream.ToArray()); Response.End(); } else { Response.Write(Constants.NoPdfFound); } } //else //{ // string strjava = "<script language='javascript' type='text/javascript'>"; // strjava += "window.parent.location.reload();"; // strjava += "</script>"; // Response.Write(strjava); //} }
private string DecryptQueryString(string strQueryString) { EncryptDecryptQueryString objEDQueryString = new EncryptDecryptQueryString(); return(objEDQueryString.Decrypt(strQueryString, "r0b1nr0y")); }