Example #1
0
 public AdminMenuViewModel(StoreFront storeFront, UserProfile userProfile, string currentArea)
 {
     this.UserProfile = userProfile;
     if (currentArea.ToLower() != "blogadmin")
     {
         this.ShowBlogAdminLink = storeFront.ShowBlogAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "catalogadmin")
     {
         this.ShowCatalogAdminLink = storeFront.ShowCatalogAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "orderadmin")
     {
         this.ShowOrderAdminLink = storeFront.ShowOrderAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "storeadmin")
     {
         this.ShowStoreAdminLink = storeFront.ShowStoreAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "systemadmin")
     {
         this.ShowSystemAdminLink = userProfile.AspNetIdentityUserIsInRoleSystemAdmin();
     }
 }
Example #2
0
 public AdminMenuViewModel(StoreFront storeFront, UserProfile userProfile, string currentArea)
 {
     this.UserProfile = userProfile;
     if (currentArea.ToLower() != "blogadmin")
     {
         this.ShowBlogAdminLink = storeFront.ShowBlogAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "catalogadmin")
     {
         this.ShowCatalogAdminLink = storeFront.ShowCatalogAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "orderadmin")
     {
         this.ShowOrderAdminLink = storeFront.ShowOrderAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "storeadmin")
     {
         this.ShowStoreAdminLink = storeFront.ShowStoreAdminLink(userProfile);
     }
     if (currentArea.ToLower() != "systemadmin")
     {
         this.ShowSystemAdminLink = userProfile.AspNetIdentityUserIsInRoleSystemAdmin();
     }
 }