Here we’ll be creating the tables and queries for managing our MetroUI screen tiles. Hang in there!
- In Visual Studio
- In LsCoreProject.Server
- Right click and add a table as noted below
- Name it: Icon
- Add another table, name it Menu
- Add our final table, Name it MenuTile
- Add choice lists for the following fields in MenuTile
- Add another choice list for OnClick, value: a, Display: a
- Still on the MenuTile table screen
- Add the following relationships
- Take note of the Navigation Properties!
- Take note of the bottom Foreign Key settings… Important!!!
- Now we need to create one query, still in the Menu Tile table
- Click on Query
- Add the following as noted below, name it TilesForMenu
- After creating the query, in Properties for this Query
- Click on Edit Additional Query Code and add the following
// Get the current user permissions var userPermissions = this.Application.User.EffectivePermissions; // Only pull tiles that meet the requirements, including permission level query = from menuTiles in query where menuTiles.Menu.Name == MenuName && (menuTiles.PermissionId == null || userPermissions.Contains(menuTiles.PermissionId)) orderby menuTiles.Order, menuTiles.Name select menuTiles;
- One last piece… setting defaults
- Still in the MenuTile table
- At the bottom of the screen click on the App tab
- Click on Write Code, select created
- Add the following code into the created method
// Create defaults for our required, except for name of the tile entity.TileColor = "lightblue"; entity.Type = "simple"; entity.Size = "default";
- Save your work and move on!
Database work for the tiles is done!
Next… Screens For Icon Management
Here are the topics and their logical order:
- Create the project
- Add external CSS
- Add external scripts
- Update the default.htm
- Add LogIn/LogOut/Register/ChangePassword
- Create the security data source
- Screens for permissions
- Screens for role management
- Screens for user management
- — You
- Screens for icon management
- Screens for menu management
- Create a tile menu screen
- Create a database project
- How to deploy successfully
- Wrap up