Пример #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);
            }
        }
Пример #2
0
        void PUNADataEditor_Ok(object sender, EventArgs e)
        {
            try
            {
                PUNAcknowledgementInformation puna = (PUNAcknowledgementInformation)PUNADataEditor.DataSource;
                PUNWrapper.AcknowledgePickupNotice(puna);//, new AuditTrailWrapper("Initiate PUN Process",
                //new object[][]{new object[]{pickupNotice.PUNAInformation, puna}}));

                PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");
                reportTransfer.TransferData["TransactionId"]    = puna.TransactionId;
                reportTransfer.TransferData["IsGINTransaction"] = false;
                reportTransfer.TransferData["RequestedReport"]  = "rptPUNTrackingReport";
                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)
            {
                errorDisplayer.ShowErrorMessage(ex.Message);
            }
        }
Пример #3
0
        protected void btnPrintPUN_Click(object sender, EventArgs e)
        {
            XmlDocument listDocument = xdsPickupNoticeSource.GetXmlDocument();

            try
            {
                XmlElement punElement = (XmlElement)listDocument.DocumentElement.SelectSingleNode(string.Format("/Catalog/PickupNotice[@Id=\"{0}\"]",
                                                                                                                gvPickupNotice.DataKeys[gvPickupNotice.SelectedIndex].Value));
                PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");
                Guid             punId          = new Guid((string)gvPickupNotice.DataKeys[gvPickupNotice.SelectedIndex].Value);
                PickupNoticeBLL  pun            = new PickupNoticeBLL(punId);
                reportTransfer.TransferData["PUNReportData"]   = pun.GetPUNReport(punId);
                reportTransfer.TransferData["RequestedReport"] = "rptPUNReport";
                reportTransfer.TransferData["ReturnPage"]      = HttpContext.Current.Request.Path;
                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);
            }
            catch (Exception ex)
            {
                Utility.LogException(new Exception(string.Format("XML Doc:{0}", listDocument.DocumentElement.OuterXml)));
                throw (ex);
            }
        }
Пример #4
0
        protected void btnPrintGIN_Click(object sender, EventArgs e)
        {
            PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");

            reportTransfer.TransferData["TransactionId"]    = SelectedTransactionId;
            reportTransfer.TransferData["IsGINTransaction"] = true;
            reportTransfer.TransferData["RequestedReport"]  = "rptGINReport";
            reportTransfer.TransferData["ReturnPage"]       = Request.Path;
            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}';", Request.Path) +
                                                "</script>",
                                                false);
        }
Пример #5
0
        private void Confirm()
        {
            GINProcessWrapper.CompleteScaling(GINTruckInformation.TruckId);
            PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");

            reportTransfer.TransferData["TransactionId"]    = GINTruckInformation.TransactionId;
            reportTransfer.TransferData["IsGINTransaction"] = true;
            reportTransfer.TransferData["RequestedReport"]  = "rptGINReport";
            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();
        }
Пример #6
0
        protected void btnPrint_Click(object sender, EventArgs e)
        {
            XmlDocument listDocument = xdsPickupNoticeSource.GetXmlDocument();
            XmlElement  punElement   = (XmlElement)listDocument.DocumentElement.SelectSingleNode(string.Format("/Catalog/PickupNotice[@Id=\"{0}\"]",
                                                                                                               gvPickupNotice.DataKeys[gvPickupNotice.SelectedIndex].Value));
            PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");

            reportTransfer.TransferData["TransactionId"]    = punElement.Attributes["TransactionId"].Value;
            reportTransfer.TransferData["IsGINTransaction"] = false;
            reportTransfer.TransferData["RequestedReport"]  = "rptPUNTrackingReport";
            reportTransfer.TransferData["ReturnPage"]       = HttpContext.Current.Request.Path;
            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);
        }
Пример #7
0
 protected void btnGenerate_Click(object sender, EventArgs e)
 {
     //AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.TruckWeighing);
     if (GINDataEditor.DataSource != null)
     {
         GINInfo editedGin = new GINInfo();
         editedGin.Copy((GINInfo)GINDataEditor.DataSource);
         //auditTrail.AddChange(GINTruckInformation.GIN, editedGin);
         GINTruckInformation.GIN.Copy((GINInfo)GINDataEditor.DataSource);
     }
     try
     {
         GINProcessWrapper.SaveGIN(GINTruckInformation.TruckId);//, auditTrail);
         GINProcessWrapper.GINGenerated(GINTruckInformation.TruckId);
         //GINProcessWrapper.CompleteWorkflowTask(GINTruckInformation.TransactionId);
         PageDataTransfer reportTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/ReportViewerForm.aspx");
         reportTransfer.TransferData["TransactionId"]    = GINTruckInformation.TransactionId;
         reportTransfer.TransferData["IsGINTransaction"] = true;
         reportTransfer.TransferData["RequestedReport"]  = "rptGINReport";
         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)
     {
         errorDisplayer.ShowErrorMessage(ex.Message);
     }
 }