Created
May 4, 2018 08:37
-
-
Save smarenich/b4b08d61faf6cdf68fa76f99045a5de3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using PX.Objects; | |
using PX.Data; | |
namespace PX.Data | |
{ | |
public class LEPMaint_Extension : PXGraphExtension<LEPMaint> | |
{ | |
#region Event Handlers | |
public PXAction<PX.Data.ListEntryPoint> ToggleActivation; | |
[PXButton(CommitChanges = true)] | |
[PXUIField(DisplayName = "Toggle Activation")] | |
protected void toggleActivation() | |
{ | |
ListEntryPoint first = Base.Items.Select(); | |
if(first != null) | |
{ | |
bool val = !first.IsActive ?? false; | |
foreach(ListEntryPoint row in Base.Items.Select()) | |
{ | |
row.IsActive = val; | |
Base.Items.Update(row); | |
} | |
} | |
} | |
#endregion | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment