protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINGridViewer1.Driver = TruckGridViewDriver; GINDataEditor1.Driver = GINViewConfigurationReader.GetViewConfiguration("GINProcess", "PUNSummary"); GINDataEditor2.Driver = GINViewConfigurationReader.GetViewConfiguration("GINProcess", "Truck"); GINDataEditor2.Ok += new EventHandler(GINDataEditor2_Ok); GINDataEditor2.Cancel += new EventHandler(GINDataEditor2_Cancel); btnAddTruck.Visible = ((WorkflowTaskType)transferedData.GetTransferedData("WorkflowTask") == WorkflowTaskType.LoadTruck) && ((transferedData.GetTransferedData("IsGINTransaction") == null) || (bool)(transferedData.GetTransferedData("IsGINTransaction"))); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINGridViewer1.Lookup = ginProcess.LookupSource; GINDataEditor1.Lookup = ginProcess.LookupSource; GINDataEditor2.Lookup = ginProcess.LookupSource; GINGridViewer1.DataSource = ginProcess.GINProcessInformation.Trucks; GINDataEditor1.Setup(); GINDataEditor2.Setup(); } catch (Exception ex) { throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); PUNADataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("VerifyGINAvailability", "PUNAcknowledgement"); PUNADataEditor.IsNew = false; //PUNADataEditor.Ok += new EventHandler(PUNADataEditor_Ok); //PUNADataEditor.Cancel += new EventHandler(PUNADataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); PUNADataEditor.Lookup = ginProcess.LookupSource; PUNADataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckLeftCompound", "GIN"); GINDataEditor.IsNew = false; GINDataEditor.Ok += new EventHandler(GINDataEditor_Ok); GINDataEditor.Cancel += new EventHandler(GINDataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
public void Return(string url) { PageDataTransfer transfer = new PageDataTransfer(url); RemoveAllData(); transfer.Navigate(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); TruckLoadEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("EditTruckLoading", "TruckLoad"); StackDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("EditTruckLoading", "Stack"); StackGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("EditTruckLoading", "StackGrid"); StackDataEditor.Ok += new EventHandler(StackDataEditor_Ok); StackDataEditor.Cancel += new EventHandler(StackDataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); TruckLoadEditor.Lookup = ginProcess.LookupSource; StackDataEditor.Lookup = ginProcess.LookupSource; StackGridViewer.Lookup = ginProcess.LookupSource; TruckLoadEditor.Setup(); StackDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
void linkCommand_Command(object sender, CommandEventArgs e) { if (e.CommandName == "Samplers") { PageDataTransfer sampleTransfer = new PageDataTransfer("/GINSamplers.aspx"); sampleTransfer.TransferData["SampleId"] = new Guid((string)e.CommandArgument); sampleTransfer.TransferData["TransactionId"] = transferedData.GetTransferedData("TransactionId"); sampleTransfer.TransferData["IsGINTransaction"] = false; sampleTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; GINProcessWrapper.RemoveGINProcessInformation(); transferedData.RemoveAllData(); sampleTransfer.Navigate(); } else if (e.CommandName == "Results") { PageDataTransfer sampleTransfer = new PageDataTransfer("/GINSamplingResults.aspx"); sampleTransfer.TransferData["SampleId"] = new Guid((string)e.CommandArgument); sampleTransfer.TransferData["TransactionId"] = transferedData.GetTransferedData("TransactionId"); sampleTransfer.TransferData["IsGINTransaction"] = false; sampleTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; GINProcessWrapper.RemoveGINProcessInformation(); transferedData.RemoveAllData(); sampleTransfer.Navigate(); } else if (e.CommandName == "EditSample") { SampleDataEditor.IsNew = false; var sampleToEdit = from sample in ginProcess.GINProcessInformation.Samples where sample.Id == new Guid((string)e.CommandArgument) select sample; SampleDataEditor.DataSource = sampleToEdit.ElementAt(0); SampleDataEditor.DataBind(); SampleDataEditorContainer.Attributes["class"] = "ShowPopupEditor"; } }
public void Return() { PageDataTransfer transfer = new PageDataTransfer((string)GetTransferedData("ReturnPage")); RemoveAllData(); transfer.Navigate(); }
protected void Page_Load(object sender, EventArgs e) { ActiveReport report = ReportFactory.GetReport(); PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); string requestedReport = (string)(transferedData.GetTransferedData("RequestedReport")); report.Run(false); // Response.AddHeader("Cache-Control", "no-cache"); Response.ContentType = "application/pdf"; Response.AddHeader("content-disposition", string.Format("inline; filename={0}.PDF", requestedReport)); // Create the PDF export object PdfExport pdf = new PdfExport(); // Create a new memory stream that will hold the pdf output System.IO.MemoryStream memStream = new System.IO.MemoryStream(); // Export the report to PDF: pdf.Export(report.Document, memStream); // Write the PDF stream out Response.BinaryWrite(memStream.ToArray()); // Send all buffered content to the client Response.End(); transferedData.RemoveAllData(); }
protected void btnOpen_Command(object sender, CommandEventArgs e) { XmlDocument document = new XmlDocument(); document.LoadXml(xdsGINProcessSource.Data); XmlNode statusNode = document.DocumentElement.SelectSingleNode(string.Format("/Catalog/GINProcess[@Id=\"{0}\"]/@Status", e.CommandArgument)); int status = int.Parse(((XmlAttribute)statusNode).Value); if (e.CommandName == "VerifyAgent") { PageDataTransfer confirmationTransfer = new PageDataTransfer(Request.ApplicationPath + "/VerifyGINAvailability.aspx"); confirmationTransfer.RemoveAllData(); GINProcessWrapper.RemoveGINProcessInformation(); confirmationTransfer.TransferData.Add("GINProcessId", new Guid(e.CommandArgument.ToString())); confirmationTransfer.TransferData.Add("ReturnPage", HttpContext.Current.Request.Path); confirmationTransfer.Navigate(); } else if (e.CommandName == "RegisterTruck") { PageDataTransfer confirmationTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/TruckRegistration.aspx"); confirmationTransfer.RemoveAllData(); GINProcessWrapper.RemoveGINProcessInformation(); confirmationTransfer.TransferData["GINProcessId"] = new Guid(e.CommandArgument.ToString()); confirmationTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; confirmationTransfer.Navigate(); } }
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); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "GIN"); GeneralDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "General"); CommodityDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "CommoditySpecifics"); ProcessDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "ProcessSpecifics"); TransportDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GenerateGIN", "TransportSpecifics"); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GeneralDataEditor.Lookup = ginProcess.LookupSource; CommodityDataEditor.Lookup = ginProcess.LookupSource; ProcessDataEditor.Lookup = ginProcess.LookupSource; TransportDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); GeneralDataEditor.Setup(); CommodityDataEditor.Setup(); ProcessDataEditor.Setup(); TransportDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
public static void RejectGINEditRequest() { PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); GINEditingRequest request = (GINEditingRequest)transferedData.GetTransferedData("GINEditingRequest"); ECXWF.ECXEngine engine = new WarehouseApplication.ECXWF.ECXEngine(); engine.CloseTransaction(request.TransactionId); }
protected void btnOpen_Click(object sender, EventArgs e) { PageDataTransfer punAcknowledgementTransfer = new PageDataTransfer(Request.ApplicationPath + "/PickupNoticeAcknowledged.aspx"); punAcknowledgementTransfer.RemoveAllData(); punAcknowledgementTransfer.TransferData["PickupNoticeId"] = new Guid((string)gvPickupNotice.DataKeys[gvPickupNotice.SelectedIndex].Value); punAcknowledgementTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; punAcknowledgementTransfer.Navigate(); }
protected void btnOpen_Click(object sender, EventArgs e) { PageDataTransfer physicalCountTransfer = new PageDataTransfer(Request.ApplicationPath + "/TakePhysicalCount.aspx"); physicalCountTransfer.RemoveAllData(); physicalCountTransfer.TransferData["PhysicalCountId"] = new Guid((string)gvPhysicalCount.DataKeys[gvPhysicalCount.SelectedIndex].Value); physicalCountTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; physicalCountTransfer.Navigate(); }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); TruckDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "Truck"); TruckLoadEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckLoad"); StackGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "StackGrid"); TruckWeightEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckWeight"); ReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "ReturnedBagsGrid"); ProposedTruckDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "Truck"); ProposedTruckLoadEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckLoad"); ProposedStackGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "StackGrid"); ProposedTruckWeightEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "TruckWeight"); ProposedReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("ApproveGINEditRequest", "ReturnedBagsGrid"); TruckDataEditor.IsNew = false; TruckLoadEditor.IsNew = false; TruckWeightEditor.IsNew = false; ProposedTruckDataEditor.IsNew = false; ProposedTruckLoadEditor.IsNew = false; ProposedTruckWeightEditor.IsNew = false; try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); TruckDataEditor.Lookup = ginProcess.LookupSource; TruckLoadEditor.Lookup = ginProcess.LookupSource; StackGridViewer.Lookup = ginProcess.LookupSource; TruckWeightEditor.Lookup = ginProcess.LookupSource; ReturnedBagsGridViewer.Lookup = ginProcess.LookupSource; ProposedTruckDataEditor.Lookup = ginProcess.LookupSource; ProposedTruckLoadEditor.Lookup = ginProcess.LookupSource; ProposedStackGridViewer.Lookup = ginProcess.LookupSource; ProposedTruckWeightEditor.Lookup = ginProcess.LookupSource; ProposedReturnedBagsGridViewer.Lookup = ginProcess.LookupSource; TruckDataEditor.Setup(); TruckLoadEditor.Setup(); TruckWeightEditor.Setup(); ProposedTruckDataEditor.Setup(); ProposedTruckLoadEditor.Setup(); ProposedTruckWeightEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected void btnScalingInfo_Click(object sender, EventArgs e) { PageDataTransfer driverDateTransfer = new PageDataTransfer(HttpContext.Current.Request.ApplicationPath + "/EditTruckScaling.aspx"); driverDateTransfer.TransferData["TransactionId"] = SelectedTransactionId; driverDateTransfer.TransferData["IsGINTransaction"] = true; driverDateTransfer.TransferData["NoWorkflow"] = true; driverDateTransfer.TransferData["ReturnPage"] = Request.Path; driverDateTransfer.Navigate(); }
public void Return(string url, Dictionary <string, object> parameter) { PageDataTransfer transfer = new PageDataTransfer(url); foreach (string key in parameter.Keys) { transfer.TransferData[key] = parameter[key]; } RemoveAllData(); transfer.Navigate(); }
public static void CompleteLoading(Guid truckId) { //check if page being processed outside a workflow context PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); IGINProcess ginProcess = GetGINProcess(true); SqlTransaction transaction = null; try { AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.TruckLoading, "GIN Process"); //GINInfo originalGIN = new GINInfo(); //originalGIN.Copy(ginProcess.GINProcessInformation.Trucks[0].GIN); transaction = ginProcess.CompleteLoading(truckId); GINTruckInfo theTruck = ginProcess.GINProcessInformation.Trucks.Find(trk => trk.TruckId == truckId); foreach (var loadedStack in theTruck.Load.Stacks) { InventoryServices.GetInventoryService().LoadFromStack(loadedStack.StackId, loadedStack.Bags, 0, transaction); auditTrail.AddChange( new TruckLoadInfo(), new TruckLoadInfo(loadedStack.TruckId, theTruck.Load.DateLoaded, theTruck.Load.BagType, string.Empty), AuditTrailWrapper.NewRecord); if (!auditTrail.Save()) { throw new Exception("Unable to log audit trail"); } } //auditTrail.AddChange(originalGIN, ginProcess.GINProcessInformation.Trucks[0].GIN); //if (!auditTrail.Save()) // throw new Exception("Failed to save audit trail!"); CompleteWorkflowTask(ginProcess.GINProcessInformation.Trucks[0].TransactionId); //CompleteWorkflowTask(ginProcess.GINProcessInformation.Trucks[0].TransactionId); transaction.Commit(); } catch (Exception ex) { try { if (transaction != null) { transaction.Rollback(); } } catch (Exception ex2) { throw ex2; } throw ex; } }
public static PhysicalCountInfo GetPhysicalCountInformation(bool isPostBack) { if (!isPostBack) { PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); Guid physicalCountId = (Guid)transferedData.GetTransferedData("PhysicalCountId"); IInventoryServices invertoryServices = InventoryServices.GetInventoryService(); PhysicalCountInfo physicalCountInformation = invertoryServices.OpenPhysicalCount(physicalCountId); HttpContext.Current.Session["Physical-Count-Information"] = physicalCountInformation; return(physicalCountInformation); } else { return((PhysicalCountInfo)HttpContext.Current.Session["Physical-Count-Information"]); } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "GIN"); TruckWeightEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "TruckWeight"); GINIssuanceEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "GINIssuance"); ReturnedBagsDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "ReturnedBags"); ReturnedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "ReturnedBagsGrid"); AddedBagsDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "AddedBags"); AddedBagsGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckScaling", "AddedBagsGrid"); GINDataEditor.IsNew = false; TruckWeightEditor.IsNew = false; GINIssuanceEditor.IsNew = false; ReturnedBagsDataEditor.Ok += new EventHandler(ReturnedBagsDataEditor_Ok); ReturnedBagsDataEditor.Cancel += new EventHandler(ReturnedBagsDataEditor_Cancel); AddedBagsDataEditor.Ok += new EventHandler(AddedBagsDataEditor_Ok); AddedBagsDataEditor.Cancel += new EventHandler(AddedBagsDataEditor_Cancel); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; TruckWeightEditor.Lookup = ginProcess.LookupSource; GINIssuanceEditor.Lookup = ginProcess.LookupSource; ReturnedBagsDataEditor.Lookup = ginProcess.LookupSource; ReturnedBagsGridViewer.Lookup = ginProcess.LookupSource; AddedBagsDataEditor.Lookup = ginProcess.LookupSource; AddedBagsGridViewer.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); TruckWeightEditor.Setup(); GINIssuanceEditor.Setup(); ReturnedBagsDataEditor.Setup(); AddedBagsDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected void btnAdd_Click(object sender, EventArgs e) { PhysicalCountInfo pc = new PhysicalCountInfo() { Id = Guid.NewGuid(), WarehouseId = new Guid(SystemLookup.LookupSource.GetLookup("CurrentWarehouse")["Id"]), IsBeginingCount = false, PhysicalCountDate = DateTime.Now }; InventoryServices.GetInventoryService().CreatePhysicalCount(pc); PageDataTransfer physicalCountTransfer = new PageDataTransfer(Request.ApplicationPath + "/TakePhysicalCount.aspx"); physicalCountTransfer.RemoveAllData(); physicalCountTransfer.TransferData["PhysicalCountId"] = pc.Id; physicalCountTransfer.TransferData["ReturnPage"] = HttpContext.Current.Request.Path; physicalCountTransfer.Navigate(); }
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); }
public static GINProcessInfo GetGINProcessInformation(bool isPostBack) { GINProcessInfo ginProcessInfo; if (!isPostBack) { PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); string transactionId = (string)transferedData.GetTransferedData("TransactionId"); IGINProcess ginProcess = new GINAuditController(transactionId); ginProcessInfo = ginProcess.GINProcessInformation; HttpContext.Current.Session["GIN-Process-Information"] = ginProcessInfo; } else { ginProcessInfo = (GINProcessInfo)HttpContext.Current.Session["GIN-Process-Information"]; } return(ginProcessInfo); }
public static PickupNoticeInformation GetPickupNoticeInformation(bool isPostBack) { PickupNoticeInformation punInfo; if (!isPostBack) { PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); Guid punId = (Guid)transferedData.GetTransferedData("PickupNoticeId"); IPickupNotice pun = new PickupNoticeBLL(punId); punInfo = pun.PickupNoticeInformation; HttpContext.Current.Session["Pickup-Notice-Information"] = punInfo; } else { punInfo = (PickupNoticeInformation)HttpContext.Current.Session["Pickup-Notice-Information"]; } return(punInfo); }
public static void ApproveGINEditRequest() { IGINProcess originalGinProcess = GetGINProcess(true); PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); GINEditingRequest request = (GINEditingRequest)transferedData.GetTransferedData("GINEditingRequest"); XmlSerializer s = new XmlSerializer(typeof(GINProcessInfo)); GINProcessInfo ginProcessInformation = (GINProcessInfo)s.Deserialize(new StringReader(request.ProposedChange)); ginProcessInformation.Trucks[0].TransactionId = request.TransactionId; ginProcessInformation.Trucks[0].Status = (int)GINStatusType.GINGenerated; IGINProcess ginProcess = new GINAuditController(); ginProcess.GINProcessInformation = ginProcessInformation; SqlTransaction transaction = null; try { switch (request.TargetPage) { case "EditTruckInformation.aspx": transaction = ginProcess.SaveTruckInformation(ginProcessInformation.Trucks[0].TruckId); break; case "EditTruckLoading.aspx": transaction = ginProcess.SaveLoading(ginProcessInformation.Trucks[0].TruckId); break; case "EditTruckScaling.aspx": transaction = ginProcess.SaveScaling(ginProcessInformation.Trucks[0].TruckId); break; } transaction.Commit(); CompleteWorkflowTask(request.TransactionId); } catch (Exception ex) { if (transaction != null) { transaction.Rollback(); } throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); PUNADataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("PickupNoticeAkcnowledged", "PUNAcknowledgement"); PUNADataEditor.Ok += new EventHandler(PUNADataEditor_Ok); PUNADataEditor.Cancel += new EventHandler(PUNADataEditor_Cancel); try { pickupNotice = PUNWrapper.GetPUN(IsPostBack); PUNADataEditor.Lookup = pickupNotice.LookupSource; PUNADataEditor.Setup(); } catch (Exception ex) { throw ex; } }
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(); }
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); }
protected override void OnInit(EventArgs e) { errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); base.OnInit(e); transferedData = new PageDataTransfer(Request.Path); GINDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("ClientAcknowledgeGIN", "GIN"); try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); GINDataEditor.Lookup = ginProcess.LookupSource; GINDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); transferedData = new PageDataTransfer(Request.Path); ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); SampleDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GINSamplingResults", "Sample"); SamplingResultDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("GINSamplingResults", "SamplingResult"); SamplerGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("GINSamplingResults", "Sampler"); SampleDataEditor.Lookup = ginProcess.LookupSource; SamplingResultDataEditor.Lookup = ginProcess.LookupSource; SamplerGridViewer.Lookup = ginProcess.LookupSource; SampleDataEditor.IsNew = false; SamplingResultDataEditor.Ok += new EventHandler(SamplingResultDataEditor_Ok); SamplingResultDataEditor.Cancel += new EventHandler(SamplingResultDataEditor_Cancel); SampleDataEditor.Setup(); SamplingResultDataEditor.Setup(); }