public static void ToggleDetailInsert(IRoleDetails form, EventArgs args) { var insertMode = MySlx.MainView.IsInsertMode(); form.btnDelete.Visible = !insertMode; form.btnSave.Visible = !insertMode; form.btnInsert.Visible = insertMode; }
public static void ToggleDetailInsert(IRoleDetails 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.btnInsert.Visible = bInsertMode; } }