/// <summary> /// Adds actions icon to the toolbar. This ABM does not support delete so that action is ignored. /// </summary> protected override void AddToolBarIcons() { var module = Module; if (module.Add) { ToolBar.AddNewToolbarButton(); ToolBar.AddDuplicateToolbarButton(); if (!module.Edit) { ToolBar.AddSaveToolbarButton(); } } if (module.Edit) { ToolBar.AddSaveToolbarButton(); } ToolBar.AddListToolbarButton(); }
/// <summary> /// Adds tooblbar icons according to user privileges. /// </summary> protected virtual void AddToolBarIcons() { var module = Module; ToolBar.Controls.Clear(); if (module.Add) { if (AddButton) { ToolBar.AddNewToolbarButton(); } if (DuplicateButton && EditMode) { ToolBar.AddDuplicateToolbarButton(); } if (!module.Edit && SaveButton) { ToolBar.AddSaveToolbarButton(); } } if (module.Edit && SaveButton) { ToolBar.AddSaveToolbarButton(); } if (module.Delete && DeleteButton && EditMode) { ToolBar.AddDeleteToolbarButton(); } if (module.Edit && AnularButton) { ToolBar.AddCancelToolbarButton(); } if (ListButton) { ToolBar.AddListToolbarButton(); } if (MapButton) { ToolBar.AddMapToolbarButton(); } if (EventButton) { ToolBar.AddEventToolBarButton(); } if (module.Add && SplitButton) { ToolBar.AddSplitToolbarButton(); } if (module.Edit && RegenerateButton) { ToolBar.AddRegenerateToolbarButton(); } ToolBar.Update(); }