/// <summary>
        /// Sets the forms toolbar buttons visibility based on the state of the competitor.
        /// </summary>
        /// <param name="form">The competitor details form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnLoadCompetitorForm(ICompetitorDetails form, EventArgs args)
        {
            var insertMode = MySlx.MainView.IsNewEntity();

            form.btnDelete.Visible     = !insertMode;
            form.btnSave.Visible       = !insertMode;
            form.btnInsertSave.Visible = insertMode;
        }
 /// <summary>
 /// Sets the forms toolbar buttons visibility based on the state of the competitor.
 /// </summary>
 /// <param name="form">The competitor details form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void OnLoadCompetitorForm(ICompetitorDetails form, EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart smartpart = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart;
     Sage.Platform.WebPortal.EntityPage page = (Sage.Platform.WebPortal.EntityPage)smartpart.Page;
     if (page != null)
     {
         bool bInsertMode = page.ModeId.ToUpper().Equals("INSERT");
         form.btnDelete.Visible     = !bInsertMode;
         form.btnSave.Visible       = !bInsertMode;
         form.btnInsertSave.Visible = bInsertMode;
     }
 }
 /// <summary>
 /// Sets the forms toolbar buttons visibility based on the state of the competitor.
 /// </summary>
 /// <param name="form">The competitor details form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void OnLoadCompetitorForm(ICompetitorDetails form,  EventArgs args)
 {
     Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart smartpart = form.NativeForm as Sage.Platform.WebPortal.SmartParts.EntityBoundSmartPart;
     Sage.Platform.WebPortal.EntityPage page = (Sage.Platform.WebPortal.EntityPage)smartpart.Page;
     if (page != null)
     {
         bool bInsertMode = page.ModeId.ToUpper().Equals("INSERT");
         form.btnDelete.Visible = !bInsertMode;
         form.btnSave.Visible = !bInsertMode;
         form.btnInsertSave.Visible = bInsertMode;
     }
 }