Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


These support forums are now closed for new topics and comments.
Please head on over to http://eureka.ucommerce.net/ for support.

  • Simon Osborne 108 posts 150 karma points
    Nov 10, 2011 @ 13:45
    Simon Osborne
    0

    Subscribe to an Admin Tab "Saving" event

    I am extending the uCommerce Order Admin Tools. I have already created one user control and put it on a tab and it works fine but it simply displays data.

    I now need a new control that will allow the Track and Trace number to be entered and saved via the standard tab save button. I have read the following article but cannot get the syntax correct (in VB) for subscribing to the Saving Event:

    http://blog.lasseeskildsen.net/?tag=/ucommerce+admin

    I presently have the following but it doesn't fire the event:

     

    Imports umbraco.uicontrols
    Imports UCommerce
    Imports UCommerce.Presentation
    Imports UCommerce.Presentation.Views
    Imports UCommerce.Presentation.Views.Catalog
    Imports UCommerce.Presentation.Web.Umbraco
    Imports UCommerce.EntitiesV2
    Imports UCommerce.Transactions.Shipping
    Imports System.Linq
    Imports System.Xml.Linq
    Imports umbraco.Linq
    Imports System.Globalization
    Imports System.Data.SqlClient
    Imports UCommerce.Transactions


    Public Class ShippingControl
        Inherits UCommerce.Presentation.Web.ViewEnabledControl(Of Views.Orders.IEditOrderView)
        Implements IHasTabPage

        Event Saving As EventHandler(Of EntityCommandEventArgs(Of Views.Orders.IEditOrderView))

        Public Sub InitializeTabPage(ByVal tabPage As umbraco.uicontrols.TabPage) Implements IHasTabPage.InitializeTabPage

            AddHandler Saving, AddressOf myEventHandler

        End Sub

        Public Sub myEventHandler(ByVal sender As Object, ByVal e As EntityCommandEventArgs(Of Views.Orders.IEditOrderView))

    I think the Saving event declared does not represent the actual Saving event being fired, but I dont know how to get reference to that event.

     

    Thanks in advance for any help,

    Thanks Simon

     

  • Søren Spelling Lund 1797 posts 2786 karma points
    Nov 10, 2011 @ 14:38
    Søren Spelling Lund
    0

    The event you're hooking up to is your own and thus never fired.

    You want to hook up to the events found on the View property on your user control, e.g AddHandler View.Saving, myEventHandler.

  • Simon Osborne 108 posts 150 karma points
    Nov 10, 2011 @ 17:16
    Simon Osborne
    0

    Thanks Soren, that works fine now - just have an email sending issue (have put in another thread)

Please Sign in or register to post replies

Write your reply to:

Draft