The MVC5 Starterkit showcases how to embed Izenda in a MVC5 application.
Download the v1.24.4 (https://downloads.izenda.com/v1.24.4/) of the API and EmbeddedUI and copy the following:
All files & folders in API\bin -> Mvc5StarterKit\IzendaReferences
API\Content -> Mvc5StarterKit\IzendaResources API\EmailTemplates -> Mvc5StarterKit\IzendaResources API\Export -> Mvc5StarterKit\IzendaResources
EmbeddedUI -> Mvc5StarterKit\Scripts\izenda
Open SSMS
- Create a new database named Retail
- Run script located at Mvc5StarterKit\SQLScript\RetailDbScript.sql
Run Application and login by System Admin Account below:
- Tenant : System
- Username: IzendaAdmin@system.com
- Password: Izenda@123
After start up and logging in as Admin Go to Settings on top Nav
-
Add Izenda License Key and Token (leave Izenda Configuration Database Connection string set this is using an MDF file included in this kit)
-
Go to Data Setup > Connection String add the connection string to the Retail database created above for system and all tenants and move tables/views to visible More Info here: How To Set Up A Connection String
-
In Data Setup > Advanced Settings > Security Set the Tenant Field to [CustomerID] (please ensure you use the brackets) for each Tenant / CustomerID in the Retail Database are the tenants (DELDG/NATWR/RETCL) and this will filter data based on the current user's TenantID More Info here: Updating settings in Performance, Security/Additive Fields and Others group
-
For each Role in the tenant set datamodel access (what tables / views each role can access) More Info here: How To Set Up A Role
For each Tenant the following users / roles are configured all use the same password: Izenda@123
Tenant: DELDG
User: employee@deldg.com Role: employee
User: manager@deldg.com Role: manager
User: vp@deldg.com Role: VP
Tenant: NATWR
User: employee@natwr.com Role: employee
User: manager@natwr.com Role: manager
User: VP@natwr.com Role: VP
Tenant: RETCL
User: employee@retcl.com Role: employee
User: manager@retcl.com Role: manager
User: vp@retcl.com Role: VP
When registering a new user in this sample all users are hardcoded to the manager role here: Mvc5StarterKit\Controllers\AccountController.cs (Line 177)
Please review the following file: mvc5starterkit\mvc5starterkit\izendaboundary\customadhocreport.cs This is where you can find samples for: Hidden Filters Filter Dropdown Overrides See more information here: All About IAdhocExtension, Hidden Filters, and Filter Dropdown Overrides
The CSS can be configured per tenant and an example is provided see below: This is configured here ~\mvc5starterkit\Mvc5StarterKit\Views\Shared_Layout.cshtml And folder structures are located here ~\mvc5starterkit\Mvc5StarterKit\Content
The MVC5Starterkit is pre-set to use locally installed instances of SQL LocalDB (mdf) for the Izenda database and the MVC5Starterkit database. You can configure the kit to use full-fledged sql server instances by following the instructions below.
This is the database for the Izenda configuration. It contains report definitions, dashboards,etc.
- Create a database named 'IzendaMVC'. You may use any name of your choosing, just be sure to modify the script below to use the new database name.
- Download and execute the IzendaMVC.sql script.
- Modify the izendadb.config file with a valid connection string to this new database.
{"ServerTypeId":"572bd576-8c92-4901-ab2a-b16e38144813","ServerTypeName":"[MSSQL] SQLServer","ConnectionString":"[your connection string here]","ConnectionId":"00000000-0000-0000-0000-000000000000"}
This is the database for the Mvc5 application. It contains the users, roles, tenants used to login.
- Create a database named 'Mvc5StarterKit'. You may use any name of your choosing, just be sure to modify the script below to use the new database name.
- Download the Mvc5StarterKit.sql script.
- Modify the web.config (Line 86) file with a valid connection string to this new database.
<connectionStrings>
<add name="DefaultConnection" connectionString="[your connection string here]" providerName="System.Data.SqlClient" />
</connectionStrings>