if(sFunctionToCall != "") { //bReturnStatus = CallCWSFunctionNoBind(sFunctionToCall, out sCWSresponse, m_objMessageElement); //igupta3 Mits : 28566 To restrict duplicate requests while print checks. PageLoad() is called twice. if ((sFunctionToCall != "PrintChecksAdaptor.UpdateStatusForPrintedChecks") || (sFunctionToCall == "PrintChecksAdaptor.UpdateStatusForPrintedChecks" && this.hdnRequest.Value != "START")) { this.hdnRequest.Value = "START"; bReturnStatus = CallCWS(sFunctionToCall, m_objMessageElement, out sCWSresponse, false, true); if (sFunctionToCall == "PrintChecksAdaptor.PostCheckDetail" || sFunctionToCall == "PrintChecksAdaptor.PostCheckSummary" || sFunctionToCall == "PrintChecksAdaptor.PostCheckSubAccount") { objTempElement = XElement.Parse(sCWSresponse); objTempElement = objTempElement.XPathSelectElement("./Document/PrintChecks/File"); //TextBox txtPdfFile = (TextBox)this.Form.FindControl("File"); byte[] pdfbytes = Convert.FromBase64String(objTempElement.Value); Response.Buffer = true; Response.Clear(); Response.ClearContent(); Response.ClearHeaders(); Response.Charset = ""; Response.AppendHeader("Content-Encoding", "none;"); Response.ContentType = "application/pdf"; Response.AddHeader("Content-Disposition", string.Format("attachment; filename=PrintCheck.pdf")); Response.AddHeader("Accept-Ranges", "bytes"); Response.BinaryWrite(pdfbytes); Response.Flush(); Response.Close(); } // if //igupta3 Mits : 28566 Changes starts string TemError = String.Empty; XmlDocument usersXDocTemp = new XmlDocument(); usersXDocTemp.LoadXml(sCWSresponse); if (usersXDocTemp.SelectSingleNode("//WorklossError") != null) { lblError.Visible = true; lblError.Text = usersXDocTemp.SelectSingleNode("//WorklossError").InnerText; } this.hdnRequest.Value = string.Empty; //igupta3 Mits : 28566 Changes ends } } // if
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)