PostTransactionEvent sender, CEWebFormRendererEventArgs

The PostTransaction Event is raised after the CE Web Form Renderer has called the Transaction() method.

Note: If the programmer of the hosting page bypassed the transaction() method in the PreTransaction event (that is, they processed the transaction themselves) the PostTransactionEvent is not raised.

If intercepted, the programmer of the hosting page can access the Session and Status objects, and manipulate the data, that is, check the data the host has just returned, change that data if required, send one or more transactions to the host, etc. The normal processing of the CE Web Form Renderer can be altered via properties on the CEWebFormRendererEventArgs object.

By setting the CancelFormRendering property to true, the client programmer can stop the CE Web Form Renderer processing, and can take control of all processing.

By setting/leaving the value as false, the CE Web Form Renderer carries on processing as normal, that is, using any new data the client programmer might have altered.

The programmer of the hosting page can examine or change the response code by accessing the ReturnCode property of CEWebFormRendererEventArgs.

Example hosting page PostTransaction event handler. (C#)

private void OnPostTransaction(object sender, CEWebForm.CEWebFormRendererEventArgs e)
{
      CEWindowsAPI.IspecModel currIspec = e.HostSession.GetCurrentIspec();
      if (currIspec.IspecModelName == "CUST")
      {     
            currIspec.SetFieldValue("POSTADD1", "Not Available");
            currIspec.SetFieldValue("POSTADD2", "Not Available");
            currIspec.SetFieldValue("POSTADD3", "Not Available");
      }
}