Ejemplo n.º 1
0
        /// <summary>
        /// Sets the forms toolbar buttons visibility based on the state of the lead source.
        /// </summary>
        /// <param name="form">The lead source details form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnLoad1Step(ILeadSourceDetails form, EventArgs args)
        {
            var insertMode = MySlx.MainView.IsInsertMode();

            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 lead source.
 /// </summary>
 /// <param name="form">The lead source details form.</param>
 /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
 public static void OnLoad1Step(ILeadSourceDetails 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 lead source.
        /// </summary>
        /// <param name="form">The lead source details form.</param>
        /// <param name="args">The <see cref="System.EventArgs"/> instance containing the event data.</param>
        public static void OnLoad1Step(ILeadSourceDetails 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;

            }
        }