Click here to Skip to main content
15,844,156 members
Home / Discussions / C#
   

C#

 
AnswerRe: Extract ConnectionString from App.Config Pin
Bernhard Hiller12-Apr-12 22:06
Bernhard Hiller12-Apr-12 22:06 
QuestionMultiple Inhertance solution Pin
zeeShan anSari12-Apr-12 4:54
zeeShan anSari12-Apr-12 4:54 
AnswerRe: Multiple Inhertance solution Pin
zeeShan anSari12-Apr-12 5:06
zeeShan anSari12-Apr-12 5:06 
GeneralRe: Multiple Inhertance solution Pin
PIEBALDconsult12-Apr-12 5:50
mvePIEBALDconsult12-Apr-12 5:50 
GeneralRe: Multiple Inhertance solution Pin
BobJanova12-Apr-12 6:01
BobJanova12-Apr-12 6:01 
GeneralRe: Multiple Inhertance solution Pin
BobJanova13-Apr-12 0:31
BobJanova13-Apr-12 0:31 
AnswerRe: Multiple Inhertance solution Pin
RobCroll12-Apr-12 15:40
RobCroll12-Apr-12 15:40 
QuestionSetting users access permissions on tabs in C# tabcontrol Pin
Xonel11-Apr-12 23:46
Xonel11-Apr-12 23: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 1:05
professionalMycroft Holmes12-Apr-12 1:05 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Xonel12-Apr-12 1:22
Xonel12-Apr-12 1:22 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 5:29
professionalMycroft Holmes12-Apr-12 5:29 
NewsRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen12-Apr-12 2:05
professionalEddy Vluggen12-Apr-12 2:05 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 5:33
professionalMycroft Holmes12-Apr-12 5:33 
AnswerRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen12-Apr-12 9:54
professionalEddy Vluggen12-Apr-12 9:54 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Mycroft Holmes12-Apr-12 13:36
professionalMycroft Holmes12-Apr-12 13:36 
GeneralRe: Setting users access permissions on tabs in C# tabcontrol Pin
Eddy Vluggen13-Apr-12 8:51
professionalEddy Vluggen13-Apr-12 8:51 
Questionweb config for spring frame work Pin
SFORavi11-Apr-12 17:55
SFORavi11-Apr-12 17:55 
QuestionA Question Of Structure Pin
Roger Wright11-Apr-12 10:54
professionalRoger Wright11-Apr-12 10:54 
AnswerRe: A Question Of Structure Pin
Wes Aday11-Apr-12 11:05
professionalWes Aday11-Apr-12 11:05 
GeneralRe: A Question Of Structure Pin
Alan Balkany12-Apr-12 5:34
Alan Balkany12-Apr-12 5:34 
GeneralRe: A Question Of Structure Pin
Jason McBurney12-Apr-12 15:14
Jason McBurney12-Apr-12 15:14 
GeneralRe: A Question Of Structure Pin
Roger Wright12-Apr-12 20:47
professionalRoger Wright12-Apr-12 20:47 
AnswerRe: A Question Of Structure Pin
Big Daddy Farang11-Apr-12 11:14
Big Daddy Farang11-Apr-12 11:14 
GeneralRe: A Question Of Structure Pin
Roger Wright11-Apr-12 22:52
professionalRoger Wright11-Apr-12 22:52 
AnswerRe: A Question Of Structure Pin
PIEBALDconsult11-Apr-12 12:30
mvePIEBALDconsult11-Apr-12 12: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.