This stored procedure adds a new tab to the database for the specific portal. The input parameters include PortalID and TabName. The output parameter is the TabID of the new database record.
Definition:
CREATE PROCEDURE AddTab
(
@PortalID int,
@TabName nvarchar(50),
@TabOrder int,
@AuthorizedRoles nvarchar (256),
@MobileTabName nvarchar(50),
@TabID int OUTPUT
)
AS
INSERT INTO Tabs
(
PortalID,
TabName,
TabOrder,
ShowMobile,
MobileTabName,
AuthorizedRoles
)
VALUES
(
@PortalID,
@TabName,
@TabOrder,
0, /* false */
@MobileTabName,
@AuthorizedRoles
)
SELECT
@TabID = @@Identity
Database Tables Used:
Tabs: Each record in the Tabs table defines the name and access permissions for a tab in the selected portal. The primary key in this table is the TabID identity field.