Ian Davies

Ian Davies

  • NA
  • 28
  • 1.6k

Access Rights Management

Apr 25 2020 5:39 PM
I am programing and application for work which requires a certain level of access rights to users. Once logged in I get the access level number 1-10 which is then put onto a splash screen in a hidden txt box.
 
on the closure of the splash screen i would like it to go to a menu for that access right.
 
This is the code I am using
  1. private void tmr_splash_Tick(object sender, EventArgs e)  
  2. {  
  3. prb_splash.Increment(1);  
  4. if (prb_splash.Value == 100)  
  5. tmr_splash.Stop();  
  6. if (prb_splash.Value == 100)  
  7. this.Hide();  
  8. if (prb_splash.Value == 100 & (!txt_number.Text.Contains("10")))  
  9. {  
  10. frm_Artemis_admin aa = new frm_Artemis_admin();  
  11. aa.ShowDialog();  
  12. }  
  13. else  
  14. if (prb_splash.Value == 100 & (!txt_number.Text.Contains("09")))  
  15. {  
  16. frm_Employees_edit aa = new frm_Employees_edit();  
  17. aa.ShowDialog();  
  18. }
The application runs but even though I have changed the access rights to 9 to test it its still going to the admin menu?
 
If anyone can help that would be great.
 
Many Thanks :)

Answers (2)