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 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 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("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; } }
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); } }
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"; } }
protected void btnAddTruck_Click(object sender, EventArgs e) { bool bPunClosed = (ginProcess.GINProcessInformation.RemainingWeight <= 0); if (bPunClosed) { GINProcessWrapper.ClosePun(); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } else { DriverDataEditor.IsNew = true; TruckDataEditor.IsNew = true; TrailerDataEditor.IsNew = true; TruckRegistrationInfo truckRegistration = new TruckRegistrationInfo() { GINTruck = ginProcess.GetBlankTruck() }; DriverDataEditor.DataSource = truckRegistration.GINTruck; DriverDataEditor.DataBind(); TruckDataEditor.DataSource = truckRegistration.Truck; TruckDataEditor.DataBind(); TrailerDataEditor.DataSource = truckRegistration.Trailer; TrailerDataEditor.DataBind(); mpeTruckDataEditorExtender.Show(); } }
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; } }
protected override void OnInit(EventArgs e) { base.OnInit(e); errorDisplayer = new ErrorMessageDisplayer(lblMessage); errorDisplayer.ClearErrorMessage(); transferedData = new PageDataTransfer(Request.Path); PUNADataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "PUNAcknowledgement"); DriverDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "RegisteredTruck"); TruckDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "TruckData"); TrailerDataEditor.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "TrailerData"); TruckGridViewer.Driver = GINViewConfigurationReader.GetViewConfiguration("TruckRegistration", "RegisteredTruckGrid"); PUNADataEditor.IsNew = false; try { ginProcess = GINProcessWrapper.GetGINProcess(IsPostBack); PUNADataEditor.Lookup = ginProcess.LookupSource; TruckDataEditor.Lookup = ginProcess.LookupSource; DriverDataEditor.Lookup = ginProcess.LookupSource; TrailerDataEditor.Lookup = ginProcess.LookupSource; TruckGridViewer.Lookup = ginProcess.LookupSource; PUNADataEditor.Setup(); TruckDataEditor.Setup(); DriverDataEditor.Setup(); TrailerDataEditor.Setup(); } catch (Exception ex) { throw ex; } }
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); } }
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 static void AcknowledgePickupNotice(PUNAcknowledgementInformation puna)//, AuditTrailWrapper auditTrail) { IPickupNotice pun = GetPUN(true); AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.PUNInitiation, "PUN Process"); PUNAcknowledgementInformation originalPUN = new PUNAcknowledgementInformation(); originalPUN.Copy(pun.PUNAInformation); auditTrail.AddChange(new object[][] { new object[] { originalPUN, puna, AuditTrailWrapper.NewRecord } }); SqlTransaction transaction = null; string transactionId = null; try { transaction = pun.AcknowledgePickupNotice(puna); transactionId = StartPUNWorkflow(); if (transactionId != string.Empty) { puna.TransactionId = transactionId; pun.AcknowledgePickupNotice(puna, transaction); if (!WarehouseTrackingNoBLL.Save(transactionId, transaction)) { GINProcessWrapper.RemoveWorkflowTask(transactionId); throw new Exception("Failed to start PUN Transaction"); } } else { throw new Exception("Failed to start PUN Transaction"); } if (!auditTrail.Save()) { throw new Exception("Failed to save audit trail"); } transaction.Commit(); } catch (Exception ex) { try { if ((transactionId != null) && (transactionId != string.Empty)) { GINProcessWrapper.RemoveWorkflowTask(transactionId); } } catch (Exception ex2) { throw ex2; } finally { 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); 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 btnReject_Click(object sender, EventArgs e) { try { GINProcessWrapper.RejectGINEditRequest(); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
private void Save() { if (GINIssuanceEditor.DataSource != null) { GINTruckInformation.GIN.Copy((GINInfo)GINIssuanceEditor.DataSource); } if (TruckWeightEditor.DataSource != null) { TruckWeightInfo truckWeight = (TruckWeightInfo)TruckWeightEditor.DataSource; GINTruckInformation.Weight.Copy(truckWeight); } GINProcessWrapper.SaveScaling(GINTruckInformation.TruckId); GINProcessWrapper.SaveGIN(GINTruckInformation.TruckId); }
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; } }
void TruckDataEditor_Ok(object sender, EventArgs e) { try { //AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.TruckRegistration); //GINTruckInfo original = new GINTruckInfo(); //original.Copy(GINTruckInformation); //auditTrail.AddChange(original, TruckDataEditor.DataSource); GINTruckInformation.Copy((GINTruckInfo)TruckDataEditor.DataSource); GINProcessWrapper.SaveTruckInformation(GINTruckInformation.TruckId);//, auditTrail); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
protected void btnOk_Click(object sender, EventArgs e) { try { //AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.TruckWeighing); TruckWeightInfo originalWeight = new TruckWeightInfo(); originalWeight.Copy(GINTruckInformation.Weight); GINTruckInformation.Weight.Copy((TruckWeightInfo)TruckWeightEditor.DataSource); //auditTrail.AddChange(originalWeight, GINTruckInformation.Weight); GINProcessWrapper.SaveScaling(GINTruckInformation.TruckId);//, auditTrail); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
void GINDataEditor_Ok(object sender, EventArgs e) { try { if (GINDataEditor.DataSource != null) { GINInfo originalGIN = new GINInfo(); originalGIN.Copy(GINTruckInformation.GIN); GINTruckInformation.GIN.Copy(((LeavingTruck)GINDataEditor.DataSource).GIN); GINProcessWrapper.TruckLeftCompound(GINTruckInformation.TruckId); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
protected void btnConfirm_Click(object sender, EventArgs e) { try { PUNAcknowledgementInformation acknowledgement = (PUNAcknowledgementInformation)PUNADataEditor.DataSource; PUNAcknowledgementInformation originalAcknowledgement = ginProcess.GINProcessInformation.PUNAcknowledgement; //AuditTrailWrapper auditTrail = new AuditTrailWrapper("Inverntory Verification", // new object[][]{new object[]{originalAcknowledgement, acknowledgement}}); GINProcessWrapper.SaveAvailabilityVerification(acknowledgement);//, auditTrail); GINProcessWrapper.CompleteAvailabilityVerification(); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { Utility.LogException(ex); errorDisplayer.ShowErrorMessage(ex.Message); } }
protected void btnSave_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.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
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 btnOk_Click(object sender, EventArgs e) { try { //AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.TruckLoading); if (TruckLoadEditor.DataSource != null) { TruckLoadInfo originalLoad = new TruckLoadInfo(); originalLoad.Copy(GINTruckInformation.Load); GINTruckInformation.Load.Copy((TruckLoadInfo)TruckLoadEditor.DataSource); //auditTrail.AddChange(originalLoad, GINTruckInformation.Load); } GINProcessWrapper.SaveLoading(GINTruckInformation.TruckId);//, auditTrail); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
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(); }
protected void btnConfirm_Click(object sender, EventArgs e) { //AuditTrailWrapper auditTrail = new AuditTrailWrapper(AuditTrailWrapper.GINAcceptance); 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.GINSigned(GINTruckInformation.TruckId); //GINProcessWrapper.CompleteWorkflowTask(GINTruckInformation.TransactionId); GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); } catch (Exception ex) { errorDisplayer.ShowErrorMessage(ex.Message); } }
public static ActiveReport GetReport() { ActiveReport report = null; PageDataTransfer transferedData = new PageDataTransfer(HttpContext.Current.Request.Path); string requestedReport = (string)(transferedData.GetTransferedData("RequestedReport")); IGINProcess ginProcess = null; switch (requestedReport) { case "rptGINReport": ginProcess = GINProcessWrapper.GetGINProcess(false); ILookupSource lookupSource = ginProcess.LookupSource; report = new Reports.rptGINReport(); report.DataSource = new GINReportDataCollection(ginProcess.GetGINReport(ginProcess.GINProcessInformation.Trucks[0].TruckId), lookupSource); return(report); case "rptPUNTrackingReport": ginProcess = GINProcessWrapper.GetGINProcess(false); report = new Reports.rptPUNTrackingReport(); report.DataSource = new TrackingReportDataCollection(ginProcess.PUNTrackingReportData); return(report); case "rptGINTrackingReport": report = new Reports.rptGINTrackingReport(); GINTrackingReportDataCollection gtrDataSource = new GINTrackingReportDataCollection(); gtrDataSource.AddList((List <GINTrackingReportData>)transferedData.GetTransferedData("GINTrackingReportData")); report.DataSource = gtrDataSource; return(report); case "rptPUNReport": report = new Reports.rptPUNReport(); PUNReportDataCollection puDataSource = new PUNReportDataCollection((PUNReportData)transferedData.GetTransferedData("PUNReportData")); report.DataSource = puDataSource; return(report); } return(null); }
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); } }
protected void btnCancelEdit_Click(object sender, EventArgs e) { GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); }
void PUNADataEditor_Cancel(object sender, EventArgs e) { GINProcessWrapper.RemoveGINProcessInformation(); transferedData.Return(); }