Aktham Mahmoud

Aktham Mahmoud

  • NA
  • 720
  • 37.7k

About that scenario (Many branches,many mangers)

Apr 22 2020 4:48 PM
Greeting all
I had build an asp.net webform project 
I greated project roles by ASP.Net configuration: AS below:
-Manger roles (containe one user)
-Brunch Role(has 3 users, beacuse I created three branches, each branch it got one mangers.
-Editor Role .
-Kitchen role.
  you can see below my hand diagram, which explain what i need.
 
 
 Here you can see  a two created database
 First  (Asp.net database)
Second (my project creted database) 
 
If example my compny it got three branches , each manger will login to comany site by using (login.aspx)page
this page redirerct user depends on his roles like code below:
 
  1. {  
  2.            Login chocLogin = (Login)sender;  
  3.            //Int32 Id;  
  4.            if (System.Web.Security.Roles.IsUserInRole(chocLogin.UserName, "Manager"))  
  5.            {  
  6.                Response.Redirect("~/admin/Default.aspx");  
  7.            }  
  8.            if (System.Web.Security.Roles.IsUserInRole(chocLogin.UserName, "Branch"))  
  9.            {  
  10.                Response.Redirect("~/branch/Default.aspx");  
  11.            }  
  12.        }  
 
 This point here so hard for me, taked long time in thinking to resolve it.
how to show message (welcome"username" depends on branch code).
 
 Thanks if you catch my point.
 

Answers (5)