Thursday, October 1, 2009
How To Hide BO Model For Normal User
SimpleUser Su = (SimpleUser)SecuritySystem.CurrentUser;
if (!Su.IsAdministrator)
{
Frame.GetController().Action.SetActiveByKey("EditModel", false);}
Or
Add a Window Controller
And wrete Code
private void WindowController1_Activated(object sender, EventArgs e)
{
// Window.ViewChanged += new EventHandler(Window_ViewChanged);
}
void Window_ViewChanged(object sender, EventArgs e)
{
IBarManagerHolder template = Window.Template as IBarManagerHolder;
SimpleUser Su = (SimpleUser)SecuritySystem.CurrentUser;
if (Su.IsAdministrator)
{
if (template != null && Window.View != null)
{
foreach (object actionContainer in Window.Template.GetContainers())
{
ActionContainerMenuBarItem mn = actionContainer as ActionContainerMenuBarItem;
{
if (mn != null)
{
if (mn.Actions.Count > 0)
if (mn.Actions[0].Caption == "Edit Model")
{
mn.Actions[0].SetEnabledByKey("Edit Model", false);
}}}}}}}
Subscribe to:
Post Comments (Atom)
Mat Table Angular
Mat Table in Angular Mat table is used to display data . its a material designed styled data-table . For using Material Table MatTableMo...
-
Angular is a JavaScript open-source front-end web application framework. Learn and Start Angular 6 https://youtu.be/iCczsazLY-E ...
-
Learn the Project Structure of Angular 6 Shubh Techno Expert https://www.youtube.com/watch?v=povG03z340E you will able to understand ...
-
Build Angular App for Production while you plan for production release then keep these things in Mind ng build --prod --base--hre...
No comments:
Post a Comment