-
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
"Create Security Privilege" util added
- Loading branch information
Showing
9 changed files
with
629 additions
and
0 deletions.
There are no files selected for viewing
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
10 changes: 10 additions & 0 deletions
10
...taSources/TRUDUtilsD365.SecurityPrivilegeBuilder.SecurityPrivilegeBuilderParms.datasource
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<!-- | ||
This file is automatically generated by Visual Studio .Net. It is | ||
used to store generic object data source configuration information. | ||
Renaming the file extension or editing the content of this file may | ||
cause the file to be unrecognizable by the program. | ||
--> | ||
<GenericObjectDataSource DisplayName="SecurityPrivilegeBuilderParms" Version="1.0" xmlns="urn:schemas-microsoft-com:xml-msdatasource"> | ||
<TypeInfo>TRUDUtilsD365.SecurityPrivilegeBuilder.SecurityPrivilegeBuilderParms, TRUDUtilsD365, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null</TypeInfo> | ||
</GenericObjectDataSource> |
204 changes: 204 additions & 0 deletions
204
TRUDUtilsD365/SecurityPrivilegeBuilder/SecurityPrivilegeBuilderDialog.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
52 changes: 52 additions & 0 deletions
52
TRUDUtilsD365/SecurityPrivilegeBuilder/SecurityPrivilegeBuilderDialog.cs
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
using System; | ||
using System.Windows.Forms; | ||
|
||
namespace TRUDUtilsD365.SecurityPrivilegeBuilder | ||
{ | ||
public partial class SecurityPrivilegeBuilderDialog : Form | ||
{ | ||
private SecurityPrivilegeBuilderParms _parms; | ||
|
||
public SecurityPrivilegeBuilderDialog() | ||
{ | ||
InitializeComponent(); | ||
} | ||
public void SetParameters(SecurityPrivilegeBuilderParms parms) | ||
{ | ||
AccessLevelComboBox.DataSource = Enum.GetValues(parms.AccessLevel.GetType()); | ||
MenuItemTypeComboBox.DataSource = Enum.GetValues(parms.MenuItemType.GetType()); | ||
|
||
_parms = parms; | ||
|
||
securityPrivilegeBuilderParmsBindingSource.Add(parms); | ||
|
||
securityPrivilegeBuilderParmsBindingSource.ResetBindings(false); | ||
} | ||
|
||
private void button1_Click(object sender, EventArgs e) | ||
{ | ||
try | ||
{ | ||
_parms.Run(); | ||
|
||
_parms.DisplayLog(); | ||
|
||
DialogResult = DialogResult.OK; | ||
Close(); | ||
} | ||
catch (Exception ex) | ||
{ | ||
MessageBox.Show(ex.Message, @"An exception occurred:", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
} | ||
} | ||
|
||
private void AccessLevelComboBox_SelectedIndexChanged(object sender, EventArgs e) | ||
{ | ||
if (_parms != null ) | ||
{ | ||
_parms.GenerateNames(); | ||
securityPrivilegeBuilderParmsBindingSource.ResetBindings(false); | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.