Beispiel #1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                btnSave.Enabled = false;
                GINProcessWrapper.SaveTruckRegistration();

                PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");
                reportTransfer.TransferData["TransactionId"]         = ginProcess.GINProcessInformation.TransactionId;
                reportTransfer.TransferData["IsGINTransaction"]      = false;
                reportTransfer.TransferData["RequestedReport"]       = "rptGINTrackingReport";
                reportTransfer.TransferData["GINTrackingReportData"] = ginProcess.GINTrackingReportData;
                reportTransfer.TransferData["ReturnPage"]            = transferedData.GetTransferedData("ReturnPage");
                reportTransfer.PersistToSession();
                ScriptManager.RegisterStartupScript(this,
                                                    this.GetType(),
                                                    "ShowReport",
                                                    "<script type=\"text/javascript\">" +
                                                    string.Format("javascript:window.open(\"ReportViewerForm.aspx?id={0}\", \"_blank\",\"height=400px,width=600px,top=0,left=0,resizable=yes,scrollbars=yes\");", Guid.NewGuid()) +
                                                    string.Format("location.href = '{0}';", transferedData.GetTransferedData("ReturnPage")) +
                                                    "</script>",
                                                    false);

                GINProcessWrapper.RemoveGINProcessInformation();
            }
            catch (Exception ex)
            {
                btnSave.Enabled = true;
                errorDisplayer.ShowErrorMessage(ex.Message);
            }
        }