Click here to Skip to main content
15,885,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: Extract ConnectionString from App.Config Pin
Bernhard Hiller12-Apr-12 21:06
Bernhard Hiller12-Apr-12 21:06 
QuestionMultiple Inhertance solution Pin
zeeShan anSari12-Apr-12 3:54
zeeShan anSari12-Apr-12 3:54 
AnswerRe: Multiple Inhertance solution Pin
zeeShan anSari12-Apr-12 4:06
zeeShan anSari12-Apr-12 4:06 
GeneralRe: Multiple Inhertance solution Pin
PIEBALDconsult12-Apr-12 4:50
mvePIEBALDconsult12-Apr-12 4:50 
GeneralRe: Multiple Inhertance solution Pin
BobJanova12-Apr-12 5:01
BobJanova12-Apr-12 5:01 
GeneralRe: Multiple Inhertance solution Pin
BobJanova12-Apr-12 23:31
BobJanova12-Apr-12 23:31 
AnswerRe: Multiple Inhertance solution Pin
RobCroll12-Apr-12 14:40
RobCroll12-Apr-12 14:40 
QuestionSetting users access permissions on tabs in C# tabcontrol Pin
Xonel11-Apr-12 22:46
Xonel11-Apr-12 22:46 
Hi
I have a desktop C# application that is basically built on Tab control. I have 8 tabs and i need to have different domains to be selected(e.g Admin, clerk, bursar, secretary) on my login where when a user under a specific domain clicks on a certain tab, an event is generated that prevents him from viewing the content of that tab. I was thinking of it this way...
C#
    private void Form1_Load(object sender, EventArgs e)

    {
    if ((Thread.CurrentPrincipal.IsInRole("admin"))) // admin in this case should be a domain name.
    {
    tabPage4.Hide();
    }
    else
    {
        MessageBox.Show("You must be a member of the Manager or Administrator's roles to view username and password information", "Insufficient Permissions",
            MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
    }
}


But now instead of
C#
CurrentPrincipal.IsInRole
put something that will read the domain name. Something of that sort.
I'll appreciate any help
Thank you
AnswerRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 0:05
professionalMycroft Holmes12-Apr-12 0:05 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Xonel12-Apr-12 0:22
Xonel12-Apr-12 0:22 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 4:29
professionalMycroft Holmes12-Apr-12 4:29 
NewsRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen12-Apr-12 1:05
professionalEddy Vluggen12-Apr-12 1:05 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 4:33
professionalMycroft Holmes12-Apr-12 4:33 
AnswerRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen12-Apr-12 8:54
professionalEddy Vluggen12-Apr-12 8:54 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 12:36
professionalMycroft Holmes12-Apr-12 12:36 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen13-Apr-12 7:51
professionalEddy Vluggen13-Apr-12 7:51 
Questionweb config for spring frame work Pin
SFORavi11-Apr-12 16:55
SFORavi11-Apr-12 16:55 
QuestionA Question Of Structure Pin
Roger Wright11-Apr-12 9:54
professionalRoger Wright11-Apr-12 9:54 
AnswerRe: A Question Of Structure Pin
Wes Aday11-Apr-12 10:05
professionalWes Aday11-Apr-12 10:05 
GeneralRe: A Question Of Structure Pin
Alan Balkany12-Apr-12 4:34
Alan Balkany12-Apr-12 4:34 
GeneralRe: A Question Of Structure Pin
Jason McBurney12-Apr-12 14:14
Jason McBurney12-Apr-12 14:14 
GeneralRe: A Question Of Structure Pin
Roger Wright12-Apr-12 19:47
professionalRoger Wright12-Apr-12 19:47 
AnswerRe: A Question Of Structure Pin
Big Daddy Farang11-Apr-12 10:14
Big Daddy Farang11-Apr-12 10:14 
GeneralRe: A Question Of Structure Pin
Roger Wright11-Apr-12 21:52
professionalRoger Wright11-Apr-12 21:52 
AnswerRe: A Question Of Structure Pin
PIEBALDconsult11-Apr-12 11:30
mvePIEBALDconsult11-Apr-12 11:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.