Commit 094ccf159f072ee958578309edc299d846e51ec0

Authored by Harpreet Banwait
1 parent e8cf9194

Aia admin license search, license add, license edit, modesty settings, module se…

…ttings, basic settings, site account search, site account add, site account edit, user group all screens completed.
Showing 33 changed files with 2102 additions and 92 deletions
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteLicenseUserGroup.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_DeleteLicenseUserGroup]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 14-Feb-2018
  13 +-- Description: To insert or update a user group users of a license
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_DeleteLicenseUserGroup]
  16 + -- Add the parameters for the stored procedure here
  17 + @UserGroupId int, @Status bit out
  18 +AS
  19 +BEGIN
  20 +SET NOCOUNT ON;
  21 +
  22 + set @Status = 0;
  23 + BEGIN TRY
  24 + BEGIN TRANSACTION
  25 +
  26 + delete from UserGroupToAIAUser where UserGroupId = @UserGroupId;
  27 + delete from UserGroup where Id = @UserGroupId;
  28 +
  29 + COMMIT TRANSACTION
  30 + set @Status = 1;
  31 + END TRY
  32 + BEGIN CATCH
  33 + IF @@TRANCOUNT > 0
  34 + ROLLBACK TRANSACTION
  35 + END CATCH
  36 +
  37 +END
  38 +
  39 +GO
  40 +SET QUOTED_IDENTIFIER OFF
  41 +GO
  42 +SET ANSI_NULLS ON
  43 +GO
0 44 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteSiteAccount.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_DeleteSiteAccount]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 08-Feb-2018
  13 +-- Description: To delete a site account for a license account and site
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_DeleteSiteAccount]
  16 + -- Add the parameters for the stored procedure here
  17 + @iSiteId int, @LicenseId int, @UserId int,
  18 + @Status bit out
  19 +AS
  20 +BEGIN
  21 + -- SET NOCOUNT ON added to prevent extra result sets from
  22 + -- interfering with SELECT statements.
  23 +SET NOCOUNT ON;
  24 +
  25 + set @Status = 0;
  26 + BEGIN TRY
  27 + BEGIN TRANSACTION
  28 +
  29 + delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
  30 + delete from AIAUserToSite where SiteId = @iSiteId and UserId = @UserId;
  31 + delete from Site where Id = @iSiteId;
  32 +
  33 + COMMIT TRANSACTION
  34 + set @Status = 1;
  35 + END TRY
  36 + BEGIN CATCH
  37 + IF @@TRANCOUNT > 0
  38 + ROLLBACK TRANSACTION
  39 + END CATCH
  40 +
  41 +END
  42 +
  43 +GO
  44 +SET QUOTED_IDENTIFIER OFF
  45 +GO
  46 +SET ANSI_NULLS ON
  47 +GO
  48 +
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetAccountNumber.sql renamed to 150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetAccountNumber.sql
... ... @@ -10,19 +10,26 @@ GO
10 10 -- ====================================================
11 11 -- Author: Magic Software
12 12 -- Create date: 23-Dec-2009
13   --- Description: To get the details of all discounts
  13 +-- Description: To get the license id and account no of licenses of a type
14 14 -- ====================================================
15 15 CREATE PROCEDURE [dbo].[usp_GetAccountNumber]
16 16 -- Add the parameters for the stored procedure here
17   -
  17 + @LicenseType int
18 18 AS
19 19 BEGIN
20 20 -- SET NOCOUNT ON added to prevent extra result sets from
21 21 -- interfering with SELECT statements.
22 22 SET NOCOUNT ON;
23   - SELECT License.Id,License.AccountNumber FROM License
24   -INNER JOIN LicenseType ON LicenseType.Id = License.LicenseTypeId
25   -WHERE License.IsActive = 1
  23 + if(@LicenseType = 0)
  24 + begin
  25 + SELECT License.Id,License.AccountNumber FROM License
  26 + WHERE License.IsActive = 1
  27 + end
  28 + else
  29 + begin
  30 + SELECT License.Id,License.AccountNumber FROM License
  31 + WHERE License.IsActive = 1 and License.LicenseTypeId = @LicenseType
  32 + end
26 33 END
27 34  
28 35 GO
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseModestySettings.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_GetLicenseModestySettings]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 05-Feb-2018
  13 +-- Description: To get all the modesty settings of a license and its related editions
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_GetLicenseModestySettings]
  16 + -- Add the parameters for the stored procedure here
  17 + @iLicenseId int, @iBuildingLevelId int
  18 +AS
  19 +BEGIN
  20 +
  21 + IF 1=0 BEGIN
  22 + SET FMTONLY OFF
  23 + END
  24 +
  25 + -- SET NOCOUNT ON added to prevent extra result sets from
  26 + -- interfering with SELECT statements.
  27 + SET NOCOUNT ON;
  28 + IF @iBuildingLevelId = 0
  29 + BEGIN
  30 + SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, LicenseToEdition.IsModesty as IsModesty
  31 + FROM LicenseToEdition
  32 + INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id
  33 + WHERE LicenseToEdition.LicenseId=@iLicenseId and Edition.IsActive=1 ORDER BY Edition.Priority
  34 + END
  35 + ELSE
  36 + BEGIN
  37 + SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, SiteToLicenseEdition.IsModesty as IsModesty
  38 + FROM SiteToLicenseEdition
  39 + INNER JOIN LicenseToEdition ON SiteToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
  40 + INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id
  41 + WHERE SiteToLicenseEdition.SiteId=@iBuildingLevelId and Edition.IsActive=1 ORDER BY Edition.Priority
  42 + END
  43 +
  44 +END
  45 +
  46 +GO
  47 +SET QUOTED_IDENTIFIER OFF
  48 +GO
  49 +SET ANSI_NULLS ON
  50 +GO
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseUserGroups.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseUserGroups]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_GetLicenseUserGroups]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 09-Feb-2018
  13 +-- Description: To get all user groups of a license
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_GetLicenseUserGroups]
  16 + -- Add the parameters for the stored procedure here
  17 + @LicenseId int
  18 +AS
  19 +BEGIN
  20 + -- SET NOCOUNT ON added to prevent extra result sets from
  21 + -- interfering with SELECT statements.
  22 + SET NOCOUNT ON;
  23 +
  24 + -- Insert statements for procedure here
  25 + select UG.*, UGU.TotalUsers from UserGroup UG left outer join
  26 + (select count(*) as TotalUsers, UserGroupId from UserGroupToAIAUser
  27 + group by UserGroupId) UGU on UG.Id = UGU.UserGroupId where UG.LicenseId = @LicenseId;
  28 +
  29 +END
  30 +
  31 +GO
  32 +SET QUOTED_IDENTIFIER OFF
  33 +GO
  34 +SET ANSI_NULLS ON
  35 +GO
  36 +
  37 +
  38 +
  39 +
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteAccountEditions.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteAccountEditions]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_GetSiteAccountEditions]
  8 +GO
  9 +-- ====================================================
  10 +-- Author: Magic Software
  11 +-- Create date: 07-Feb-2018
  12 +-- Description: To get a site account editions on the basis of siteid and licenseid
  13 +-- ====================================================
  14 +create PROCEDURE [dbo].[usp_GetSiteAccountEditions]
  15 + -- Add the parameters for the stored procedure here
  16 + @SiteId int,
  17 + @LicenseId int
  18 +AS
  19 +BEGIN
  20 + -- SET NOCOUNT ON added to prevent extra result sets from
  21 + -- interfering with SELECT statements.
  22 + SET NOCOUNT ON;
  23 +
  24 + Select SLE.LicenseEditionId, E.Id, E.Title from SiteToLicenseEdition SLE
  25 + inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id
  26 + inner join License L on L.Id = LE.LicenseId
  27 + inner join Edition E on LE.EditionId = E.Id
  28 + where L.Id = @LicenseId and SLE.SiteId = @SiteId;
  29 +
  30 +END
  31 +
  32 +GO
  33 +SET QUOTED_IDENTIFIER OFF
  34 +GO
  35 +SET ANSI_NULLS ON
  36 +GO
0 37 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteById.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteById]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_GetSiteById]
  8 +GO
  9 +-- ====================================================
  10 +-- Author: Magic Software
  11 +-- Create date: 07-Feb-2018
  12 +-- Description: To get a site information on the basis of siteid
  13 +-- ====================================================
  14 +create PROCEDURE [dbo].[usp_GetSiteById]
  15 + -- Add the parameters for the stored procedure here
  16 + @SiteId int
  17 +AS
  18 +BEGIN
  19 + -- SET NOCOUNT ON added to prevent extra result sets from
  20 + -- interfering with SELECT statements.
  21 + SET NOCOUNT ON;
  22 +
  23 + Select Site.Id,Site.SiteIp,Site.Title,ISNULL(Site.SiteIPTo,'') as SiteIPTo,ISNULL(Site.SiteMasterIPTo,'') as SiteMasterIPTo, Site.Address1, Site.Address2,
  24 + Site.Zip, Site.Phone, Site.City, Site.StateId, Site.CountryId, Site.IsMaster, Site.IsActive,
  25 + CONVERT(VARCHAR,Site.CreationDate,101) as CreationDate,
  26 + CONVERT(VARCHAR,Site.ModifiedDate,101) as ModifiedDate,
  27 + Site.InstituteName,Site.Department, AIAUser.Id as UserId,AIAUser.FirstName,AIAUser.EmailId
  28 + From ((Site INNER JOIN AIAUserToSite on Site.Id=AIAUserToSite.SiteId)
  29 + INNER JOIN AIAUser on AIAUserToSite.UserId = AIAUser.Id)
  30 + Where Site.id = @SiteId;
  31 +
  32 +
  33 +END
  34 +
  35 +GO
  36 +SET QUOTED_IDENTIFIER OFF
  37 +GO
  38 +SET ANSI_NULLS ON
  39 +GO
0 40 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateLicenseUserGroup.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateLicenseUserGroup]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_InsertUpdateLicenseUserGroup]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 12-Feb-2018
  13 +-- Description: To insert or update a user group of a license
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_InsertUpdateLicenseUserGroup]
  16 + -- Add the parameters for the stored procedure here
  17 + @Id int, @LicenseId int, @Title varchar(100), @CreationDate datetime, @ModifiedDate datetime, @IsActive bit, @Status bit out
  18 +AS
  19 +BEGIN
  20 +
  21 + SET NOCOUNT ON;
  22 + set @Status = 0;
  23 + BEGIN TRY
  24 + BEGIN TRANSACTION
  25 + if(@Id = 0)
  26 + begin
  27 + insert into UserGroup(LicenseId, Title, CreationDate, ModifiedDate, IsActive) values(@LicenseId, @Title, @CreationDate, @ModifiedDate, @IsActive);
  28 + end
  29 + else
  30 + begin
  31 + update UserGroup set Title = @Title, CreationDate = @CreationDate, ModifiedDate = @ModifiedDate, @IsActive = @IsActive where Id = @Id;
  32 + end
  33 + COMMIT TRANSACTION
  34 + set @Status = 1;
  35 + END TRY
  36 + BEGIN CATCH
  37 + IF @@TRANCOUNT > 0
  38 + ROLLBACK TRANSACTION
  39 + END CATCH
  40 +
  41 +END
  42 +
  43 +GO
  44 +SET QUOTED_IDENTIFIER OFF
  45 +GO
  46 +SET ANSI_NULLS ON
  47 +GO
0 48 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateSiteAccount.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_InsertUpdateSiteAccount]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 08-Feb-2018
  13 +-- Description: To insert or update a site account for a license account and site
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_InsertUpdateSiteAccount]
  16 + -- Add the parameters for the stored procedure here
  17 + @iSiteId int, @sSiteIP varchar(2000), @sTitle varchar(100), @sInstituteName varchar(100), @sDepartment varchar(50),
  18 + @sAddress1 varchar(100), @sAddress2 varchar(100), @sCity varchar(50), @Zip varchar(20), @Phone varchar(30),
  19 + @StateId int, @CountryId int, @IsMaster bit, @CreationDate datetime, @ModifiedDate datetime,
  20 + @IsActive bit, @UserId int, @sSiteIPTo varchar(100), @LicenseId int, @SiteEditionIds varchar(1000),
  21 + @Status bit out
  22 +AS
  23 +BEGIN
  24 + -- SET NOCOUNT ON added to prevent extra result sets from
  25 + -- interfering with SELECT statements.
  26 +SET NOCOUNT ON;
  27 +
  28 +DECLARE @list varchar(1000)
  29 +DECLARE @pos INT, @tempEditionId int, @tempLicenseEditionId int;
  30 +DECLARE @len INT, @tempModesty bit;
  31 +DECLARE @value varchar(1000)
  32 +
  33 +CREATE TABLE #LocalTempTable(
  34 +SiteId int,
  35 +LicenseEditionId int,
  36 +IsModesty bit);
  37 +
  38 +if(@SiteEditionIds != '')
  39 +begin
  40 + set @SiteEditionIds = @SiteEditionIds + ',';
  41 +end
  42 +SET @list = @SiteEditionIds
  43 +
  44 + set @Status = 0;
  45 + BEGIN TRY
  46 + BEGIN TRANSACTION
  47 +
  48 + IF @iSiteId = 0
  49 + BEGIN
  50 + INSERT INTO [dbo].[Site]([SiteIP],[Title],[InstituteName],[Department],[Address1],[Address2],
  51 + [City],[Zip],[Phone],[StateId],[CountryId],[IsMaster],[CreationDate],[ModifiedDate],[IsActive],[SiteIPTo])
  52 + VALUES(@sSiteIP, @sTitle, @sInstituteName, @sDepartment, @sAddress1, @sAddress2, @sCity, @Zip, @Phone,
  53 + @StateId, @CountryId, @IsMaster, @CreationDate, @ModifiedDate, @IsActive, @sSiteIPTo);
  54 + -- to get the last inserted identity value in the current session
  55 + SET @iSiteId=SCOPE_IDENTITY();
  56 + insert into AIAUserToSite values(@UserId, @iSiteId);
  57 + END
  58 + ELSE
  59 + BEGIN
  60 + UPDATE [dbo].[Site] SET [SiteIP]=@sSiteIP, [Title]=@sTitle,[InstituteName]=@sInstituteName,
  61 + [Department]=@sDepartment, [Address1]=@sAddress1, [Address2]=@sAddress2,[City]=@sCity,
  62 + [Zip]=@Zip, [Phone]=@Phone, [StateId]=@StateId, [CountryId]=@CountryId,
  63 + [ModifiedDate]=@ModifiedDate, [IsActive]=@IsActive, [SiteIPTo]=@sSiteIPTo
  64 + WHERE [Id]=@iSiteId
  65 + END
  66 +
  67 + insert into #LocalTempTable
  68 + select SLE.* from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where
  69 + SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
  70 +
  71 + delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where
  72 + SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
  73 +
  74 + set @pos = 0
  75 + set @len = 0
  76 +
  77 + WHILE CHARINDEX(',', @list, @pos+1)>0
  78 + BEGIN
  79 + set @len = CHARINDEX(',', @list, @pos+1) - @pos;
  80 + set @value = SUBSTRING(@list, @pos, @len);
  81 + set @tempEditionId = convert(int, @value);
  82 + select @tempLicenseEditionId = Id from LicenseToEdition where LicenseId = @LicenseId and EditionId = @tempEditionId;
  83 + set @tempModesty = 0;
  84 + if(exists(select * from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId))
  85 + begin
  86 + select @tempModesty = IsModesty from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId;
  87 + end
  88 + insert into SiteToLicenseEdition(SiteId, LicenseEditionId, IsModesty) values(@iSiteId, @tempLicenseEditionId, @tempModesty);
  89 + set @pos = CHARINDEX(',', @list, @pos+@len) + 1;
  90 + END
  91 +
  92 + COMMIT TRANSACTION
  93 + set @Status = 1;
  94 + END TRY
  95 + BEGIN CATCH
  96 + IF @@TRANCOUNT > 0
  97 + ROLLBACK TRANSACTION
  98 + END CATCH
  99 +
  100 +END
  101 +
  102 +GO
  103 +SET QUOTED_IDENTIFIER OFF
  104 +GO
  105 +SET ANSI_NULLS ON
  106 +GO
  107 +
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModestySettings.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_UpdateLicenseModestySettings]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 05-Feb-2018
  13 +-- Description: To update the modesty settings of a license edition or its site
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_UpdateLicenseModestySettings]
  16 + -- Add the parameters for the stored procedure here
  17 + @LicenseEditionId int,
  18 + @SiteId int,
  19 + @IsModesty bit,
  20 + @Status bit out
  21 +AS
  22 +BEGIN
  23 + -- SET NOCOUNT ON added to prevent extra result sets from
  24 + -- interfering with SELECT statements.
  25 + SET NOCOUNT ON;
  26 +
  27 + set @Status = 0;
  28 + BEGIN TRY
  29 + BEGIN TRANSACTION
  30 + if(@SiteId = 0)
  31 + begin
  32 + UPDATE LicenseToEdition SET IsModesty = @IsModesty where Id = @LicenseEditionId;
  33 + end
  34 + else
  35 + begin
  36 + UPDATE SiteToLicenseEdition SET IsModesty = @IsModesty where SiteId = @SiteId and LicenseEditionId = @LicenseEditionId;
  37 + end
  38 + COMMIT TRANSACTION
  39 + set @Status = 1;
  40 + END TRY
  41 + BEGIN CATCH
  42 + IF @@TRANCOUNT > 0
  43 + ROLLBACK TRANSACTION
  44 + END CATCH
  45 +
  46 +END
  47 +
  48 +GO
  49 +SET QUOTED_IDENTIFIER OFF
  50 +GO
  51 +SET ANSI_NULLS ON
  52 +GO
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModuleStatus.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModuleStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_UpdateLicenseModuleStatus]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 06-Feb-2018
  13 +-- Description: To insert or update the module status on or off for a license
  14 +-- ====================================================
  15 +CREATE PROCEDURE [dbo].[usp_UpdateLicenseModuleStatus]
  16 + @LicenseId int,
  17 + @ModuleId int,
  18 + @ModuleStatus bit,
  19 + @Status bit out
  20 +AS
  21 +BEGIN
  22 +
  23 + -- SET NOCOUNT ON added to prevent extra result sets from
  24 + -- interfering with SELECT statements.
  25 + SET NOCOUNT ON;
  26 + set @Status = 0;
  27 + BEGIN TRY
  28 + BEGIN TRANSACTION
  29 + if(exists(select * from ModuleToLicense where ModuleId = @ModuleId and LicenseId = @LicenseId))
  30 + begin
  31 + UPDATE ModuleToLicense SET Status = @ModuleStatus where ModuleId = @ModuleId and LicenseId = @LicenseId;
  32 + end
  33 + else
  34 + begin
  35 + insert into ModuleToLicense(LicenseId, ModuleId, Status) values(@LicenseId, @ModuleId, @ModuleStatus);
  36 + end
  37 + COMMIT TRANSACTION
  38 + set @Status = 1;
  39 + END TRY
  40 + BEGIN CATCH
  41 + IF @@TRANCOUNT > 0
  42 + ROLLBACK TRANSACTION
  43 + END CATCH
  44 +
  45 +END
  46 +
  47 +GO
  48 +SET QUOTED_IDENTIFIER OFF
  49 +GO
  50 +SET ANSI_NULLS ON
  51 +GO
0 52 \ No newline at end of file
... ...
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseUserGroupUsers.sql 0 → 100644
  1 +SET QUOTED_IDENTIFIER ON
  2 +GO
  3 +SET ANSI_NULLS ON
  4 +GO
  5 +
  6 +if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseUserGroupUsers]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
  7 +drop procedure [dbo].[usp_UpdateLicenseUserGroupUsers]
  8 +GO
  9 +
  10 +-- ====================================================
  11 +-- Author: Magic Software
  12 +-- Create date: 14-Feb-2018
  13 +-- Description: To insert or update a user group users of a license
  14 +-- ====================================================
  15 +create PROCEDURE [dbo].[usp_UpdateLicenseUserGroupUsers]
  16 + -- Add the parameters for the stored procedure here
  17 + @UserGroupId int, @UserIds varchar(2000), @Status bit out
  18 +AS
  19 +BEGIN
  20 +SET NOCOUNT ON;
  21 +
  22 +DECLARE @pos INT, @tempUserId int;
  23 +DECLARE @len INT;
  24 +DECLARE @value varchar(10);
  25 +
  26 +if(@UserIds != '')
  27 +begin
  28 + set @UserIds = @UserIds + ',';
  29 +end
  30 +
  31 + set @Status = 0;
  32 + BEGIN TRY
  33 + BEGIN TRANSACTION
  34 +
  35 + delete UGU from UserGroupToAIAUser UGU where UserGroupId = @UserGroupId;
  36 +
  37 + set @pos = 0
  38 + set @len = 0
  39 +
  40 + WHILE CHARINDEX(',', @UserIds, @pos+1)>0
  41 + BEGIN
  42 + set @len = CHARINDEX(',', @UserIds, @pos+1) - @pos;
  43 + set @value = SUBSTRING(@UserIds, @pos, @len);
  44 + set @tempUserId = convert(int, @value);
  45 + insert into UserGroupToAIAUser(UserGroupId, UserId) values(@UserGroupId, @tempUserId);
  46 + set @pos = CHARINDEX(',', @UserIds, @pos+@len) + 1;
  47 + END
  48 +
  49 + COMMIT TRANSACTION
  50 + set @Status = 1;
  51 + END TRY
  52 + BEGIN CATCH
  53 + IF @@TRANCOUNT > 0
  54 + ROLLBACK TRANSACTION
  55 + END CATCH
  56 +
  57 +END
  58 +
  59 +GO
  60 +SET QUOTED_IDENTIFIER OFF
  61 +GO
  62 +SET ANSI_NULLS ON
  63 +GO
0 64 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... ... @@ -156,6 +156,8 @@
156 156 <Compile Include="Areas\HelpPage\SampleGeneration\TextSample.cs" />
157 157 <Compile Include="Areas\HelpPage\XmlDocumentationProvider.cs" />
158 158 <Compile Include="Constants\AdminConstant.cs" />
  159 + <Compile Include="Controllers\UserGroupController.cs" />
  160 + <Compile Include="Controllers\SiteController.cs" />
159 161 <Compile Include="Controllers\EditionController.cs" />
160 162 <Compile Include="Controllers\AccountController.cs" />
161 163 <Compile Include="Controllers\CommonController.cs" />
... ... @@ -697,12 +699,18 @@
697 699 <Compile Include="Entity\usp_GetLicenseById_Result.cs">
698 700 <DependentUpon>AIADBEntity.tt</DependentUpon>
699 701 </Compile>
  702 + <Compile Include="Entity\usp_GetLicenseModestySettings_Result.cs">
  703 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  704 + </Compile>
700 705 <Compile Include="Entity\usp_GetLicenses_Result.cs">
701 706 <DependentUpon>AIADBEntity.tt</DependentUpon>
702 707 </Compile>
703 708 <Compile Include="Entity\usp_GetLicenseTypes_Result.cs">
704 709 <DependentUpon>AIADBEntity.tt</DependentUpon>
705 710 </Compile>
  711 + <Compile Include="Entity\usp_GetLicenseUserGroups_Result.cs">
  712 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  713 + </Compile>
706 714 <Compile Include="Entity\usp_GetManageRights_Result.cs">
707 715 <DependentUpon>AIADBEntity.tt</DependentUpon>
708 716 </Compile>
... ... @@ -712,6 +720,12 @@
712 720 <Compile Include="Entity\usp_GetSearchUserList_Result.cs">
713 721 <DependentUpon>AIADBEntity.tt</DependentUpon>
714 722 </Compile>
  723 + <Compile Include="Entity\usp_GetSiteAccountEditions_Result.cs">
  724 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  725 + </Compile>
  726 + <Compile Include="Entity\usp_GetSiteById_Result.cs">
  727 + <DependentUpon>AIADBEntity.tt</DependentUpon>
  728 + </Compile>
715 729 <Compile Include="Entity\usp_GetSubscriptionPlans_Result.cs">
716 730 <DependentUpon>AIADBEntity.tt</DependentUpon>
717 731 </Compile>
... ... @@ -744,6 +758,8 @@
744 758 </Compile>
745 759 <Compile Include="Models\CommonModel.cs" />
746 760 <Compile Include="Models\AccountModel.cs" />
  761 + <Compile Include="Models\UserGroupModel.cs" />
  762 + <Compile Include="Models\SiteModel.cs" />
747 763 <Compile Include="Models\EditionModel.cs" />
748 764 <Compile Include="Models\LicenseModel.cs" />
749 765 <Compile Include="Controllers\SubscriptionPriceController.cs" />
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... ... @@ -217,12 +217,12 @@ namespace AIAHTML5.ADMIN.API.Controllers
217 217  
218 218 [Route("LicenseAccounts")]
219 219 [HttpGet]
220   - public HttpResponseMessage GetLicenseAccounts()
  220 + public HttpResponseMessage GetLicenseAccounts(int LicenseType)
221 221 {
222 222 List<Tuple<int, string>> LicenseAccountList = new List<Tuple<int, string>>();
223 223 try
224 224 {
225   - LicenseAccountList = LicenseModel.GetLicenseAccounts(dbContext);
  225 + LicenseAccountList = LicenseModel.GetLicenseAccounts(dbContext, LicenseType);
226 226 return Request.CreateResponse(HttpStatusCode.OK, LicenseAccountList);
227 227 }
228 228 catch (Exception ex)
... ... @@ -232,6 +232,40 @@ namespace AIAHTML5.ADMIN.API.Controllers
232 232 }
233 233 }
234 234  
  235 + [Route("LicenseSites")]
  236 + [HttpGet]
  237 + public HttpResponseMessage GetLicenseAccounts(string AccountNo)
  238 + {
  239 + List<SiteModel> LicenseSiteList = new List<SiteModel>();
  240 + try
  241 + {
  242 + LicenseSiteList = LicenseModel.GetLicenseSites(dbContext, AccountNo);
  243 + return Request.CreateResponse(HttpStatusCode.OK, LicenseSiteList);
  244 + }
  245 + catch (Exception ex)
  246 + {
  247 + // Log exception code goes here
  248 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  249 + }
  250 + }
  251 +
  252 + [Route("LicenseModestySettings")]
  253 + [HttpGet]
  254 + public HttpResponseMessage GetLicenseModestySettings(int LicenseId, int BuildingLevelId)
  255 + {
  256 + List<Tuple<int, bool, string>> LicenseModestyList = new List<Tuple<int, bool, string>>();
  257 + try
  258 + {
  259 + LicenseModestyList = LicenseModel.GetLicenseModestySettings(dbContext, LicenseId, BuildingLevelId);
  260 + return Request.CreateResponse(HttpStatusCode.OK, LicenseModestyList);
  261 + }
  262 + catch (Exception ex)
  263 + {
  264 + // Log exception code goes here
  265 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  266 + }
  267 + }
  268 +
235 269 [Route("UpdateLicenseBasicSettings")]
236 270 [HttpPost]
237 271 public HttpResponseMessage UpdateLicenseBasicSettings(JObject jsonData)
... ... @@ -270,5 +304,90 @@ namespace AIAHTML5.ADMIN.API.Controllers
270 304 }
271 305 }
272 306  
  307 + [Route("UpdateLicenseModestySettings")]
  308 + [HttpPost]
  309 + public HttpResponseMessage UpdateLicenseModestySettings(JObject jsonData)
  310 + {
  311 + bool Status = false;
  312 + List<Tuple<int, int, bool>> LicenseModestyList = new List<Tuple<int, int, bool>>();
  313 + Tuple<int, int, bool> LicenseModesty;
  314 + for (int i = 0; i < jsonData["obj"].Count(); i++)
  315 + {
  316 + LicenseModesty = new Tuple<int, int, bool>(
  317 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["licenseEditionId"])).Value<int>(),
  318 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["siteId"])).Value<int>(),
  319 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["isModesty"])).Value<bool>());
  320 + LicenseModestyList.Add(LicenseModesty);
  321 + }
  322 + try
  323 + {
  324 + Status = LicenseModel.UpdateLicenseModestySettings(dbContext, LicenseModestyList);
  325 + if (Status)
  326 + {
  327 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  328 + }
  329 + else
  330 + {
  331 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  332 + }
  333 + }
  334 + catch (Exception ex)
  335 + {
  336 + // Log exception code goes here
  337 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  338 + }
  339 + }
  340 +
  341 + [Route("LicenseModulesStatus")]
  342 + [HttpGet]
  343 + public HttpResponseMessage GetLicenseModulesStatus(int LicenseId)
  344 + {
  345 + List<Tuple<int, bool, string>> LicenseModulesStatusList = new List<Tuple<int, bool, string>>();
  346 + try
  347 + {
  348 + LicenseModulesStatusList = LicenseModel.GetLicenseModulesStatus(dbContext, LicenseId);
  349 + return Request.CreateResponse(HttpStatusCode.OK, LicenseModulesStatusList);
  350 + }
  351 + catch (Exception ex)
  352 + {
  353 + // Log exception code goes here
  354 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  355 + }
  356 + }
  357 +
  358 + [Route("UpdateLicenseModulesStatus")]
  359 + [HttpPost]
  360 + public HttpResponseMessage UpdateLicenseModulesStatus(JObject jsonData)
  361 + {
  362 + bool Status = false;
  363 + List<Tuple<int, int, bool>> LicenseModuleStatusList = new List<Tuple<int, int, bool>>();
  364 + Tuple<int, int, bool> LicenseModuleStatus;
  365 + for (int i = 0; i < jsonData["obj"].Count(); i++)
  366 + {
  367 + LicenseModuleStatus = new Tuple<int, int, bool>(
  368 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["licenseId"])).Value<int>(),
  369 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["moduleId"])).Value<int>(),
  370 + ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["status"])).Value<bool>());
  371 + LicenseModuleStatusList.Add(LicenseModuleStatus);
  372 + }
  373 + try
  374 + {
  375 + Status = LicenseModel.UpdateLicenseModulesStatus(dbContext, LicenseModuleStatusList);
  376 + if (Status)
  377 + {
  378 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  379 + }
  380 + else
  381 + {
  382 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  383 + }
  384 + }
  385 + catch (Exception ex)
  386 + {
  387 + // Log exception code goes here
  388 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  389 + }
  390 + }
  391 +
273 392 }
274 393 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SiteController.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Net;
  5 +using System.Net.Http;
  6 +using System.Web.Http;
  7 +using Newtonsoft.Json;
  8 +using Newtonsoft.Json.Linq;
  9 +using AIAHTML5.ADMIN.API.Models;
  10 +using System.Web.Http.Cors;
  11 +using System.Web.Cors;
  12 +using AIAHTML5.Server.Constants;
  13 +using log4net;
  14 +using System.Text;
  15 +using AIAHTML5.ADMIN.API.Entity;
  16 +
  17 +namespace AIAHTML5.ADMIN.API.Controllers
  18 +{
  19 + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")]
  20 + [RoutePrefix("Site")]
  21 + public class SiteController : ApiController
  22 + {
  23 + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities();
  24 +
  25 + [Route("SiteDetail")]
  26 + [HttpGet]
  27 + public HttpResponseMessage GetSiteById(int SiteId)
  28 + {
  29 + SiteModel SiteEntity = new SiteModel();
  30 + try
  31 + {
  32 + SiteEntity = SiteModel.GetSiteById(dbContext, SiteId);
  33 + return Request.CreateResponse(HttpStatusCode.OK, SiteEntity);
  34 + }
  35 + catch (Exception ex)
  36 + {
  37 + // Log exception code goes here
  38 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  39 + }
  40 + }
  41 +
  42 + [Route("SiteAccountEditions")]
  43 + [HttpGet]
  44 + public HttpResponseMessage GetSiteAccountEditions(int SiteId, int LicenseId)
  45 + {
  46 + List<Tuple<int, int, string>> SiteAccountEditionList = new List<Tuple<int, int, string>>();
  47 + try
  48 + {
  49 + SiteAccountEditionList = SiteModel.GetSiteAccountEditions(dbContext, SiteId, LicenseId);
  50 + return Request.CreateResponse(HttpStatusCode.OK, SiteAccountEditionList);
  51 + }
  52 + catch (Exception ex)
  53 + {
  54 + // Log exception code goes here
  55 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  56 + }
  57 + }
  58 +
  59 + [Route("InsertUpdateSiteAccount")]
  60 + [HttpPost]
  61 + public HttpResponseMessage InsertUpdateSiteAccount(JObject jsonData)
  62 + {
  63 + bool Status = false;
  64 + SiteModel SiteEntity = new SiteModel();
  65 + SiteEntity.LicenseId = jsonData["licenseId"].Value<int>();
  66 + SiteEntity.Id = jsonData["siteId"].Value<int>();
  67 + SiteEntity.Title = jsonData["title"].Value<string>();
  68 + SiteEntity.Ip = jsonData["siteUrl"].Value<string>();
  69 + SiteEntity.SiteIpTo = jsonData["siteUrlTo"].Value<string>();
  70 + SiteEntity.MasterIpTo = jsonData["siteMasterUrlTo"].Value<string>();
  71 + SiteEntity.InstituteName = jsonData["institutionName"].Value<string>();
  72 + SiteEntity.Department = jsonData["departmentName"].Value<string>();
  73 + SiteEntity.Address1 = jsonData["address1"].Value<string>();
  74 + SiteEntity.Address2 = jsonData["address2"].Value<string>();
  75 + SiteEntity.City = jsonData["city"].Value<string>();
  76 + SiteEntity.Phone = jsonData["phone"].Value<string>();
  77 + SiteEntity.Zip = jsonData["zip"].Value<string>();
  78 + SiteEntity.CountryId = jsonData["countryId"].Value<int>();
  79 + SiteEntity.StateId = jsonData["stateId"].Value<int>();
  80 + SiteEntity.SiteUserId = jsonData["userId"].Value<int>();
  81 + SiteEntity.IsActive = jsonData["isActive"].Value<bool>();
  82 + SiteEntity.IsMaster = jsonData["isMaster"].Value<bool>();
  83 + SiteEntity.SiteEditionIds = jsonData["siteEditionIds"].Value<string>();
  84 + SiteEntity.CreationDate = jsonData["creationDate"].Value<DateTime>();
  85 + SiteEntity.ModifiedDate = jsonData["modifiedDate"].Value<DateTime>();
  86 + try
  87 + {
  88 + Status = SiteModel.InsertUpdateSiteAccount(dbContext, SiteEntity);
  89 + if (Status)
  90 + {
  91 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  92 + }
  93 + else
  94 + {
  95 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  96 + }
  97 + }
  98 + catch (Exception ex)
  99 + {
  100 + // Log exception code goes here
  101 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  102 + }
  103 + }
  104 +
  105 + [Route("DeleteSiteAccount")]
  106 + [HttpGet]
  107 + public HttpResponseMessage DeleteSiteAccount(int SiteId, int LicenseId, int UserId)
  108 + {
  109 + bool Status = false;
  110 + try
  111 + {
  112 + Status = SiteModel.DeleteSiteAccount(dbContext, SiteId, LicenseId, UserId);
  113 + if (Status)
  114 + {
  115 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  116 + }
  117 + else
  118 + {
  119 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  120 + }
  121 + }
  122 + catch (Exception ex)
  123 + {
  124 + // Log exception code goes here
  125 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  126 + }
  127 + }
  128 +
  129 + protected HttpResponseMessage ToJson(dynamic obj)
  130 + {
  131 + var response = Request.CreateResponse(HttpStatusCode.OK);
  132 + response.Content = new StringContent(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/jsonP");
  133 + return response;
  134 + }
  135 + }
  136 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
... ... @@ -171,7 +171,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
171 171 {
172 172 dbContext.Configuration.ProxyCreationEnabled = false;
173 173 List<usp_GetAccountNumber_Result> AccountNumberList = new List<usp_GetAccountNumber_Result>();
174   - var AccountNumberEntity = dbContext.usp_GetAccountNumber().ToList();
  174 + var AccountNumberEntity = dbContext.usp_GetAccountNumber(0).ToList();
175 175 AccountNumberList = AccountNumberEntity.Select(l => new usp_GetAccountNumber_Result() { Id = l.Id, AccountNumber = l.AccountNumber }).ToList();
176 176 //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" });
177 177 return Ok(AccountNumberList);
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Net;
  5 +using System.Net.Http;
  6 +using System.Web.Http;
  7 +using Newtonsoft.Json;
  8 +using Newtonsoft.Json.Linq;
  9 +using AIAHTML5.ADMIN.API.Models;
  10 +using System.Web.Http.Cors;
  11 +using System.Web.Cors;
  12 +using AIAHTML5.Server.Constants;
  13 +using log4net;
  14 +using System.Text;
  15 +using AIAHTML5.ADMIN.API.Entity;
  16 +
  17 +namespace AIAHTML5.ADMIN.API.Controllers
  18 +{
  19 + [EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")]
  20 + [RoutePrefix("UserGroup")]
  21 + public class UserGroupController : ApiController
  22 + {
  23 + AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities();
  24 +
  25 + [Route("LicenseUserGroups")]
  26 + [HttpGet]
  27 + public HttpResponseMessage GetLicenseUserGroups(int LicenseId)
  28 + {
  29 + List<UserGroupModel> UserGroupList = new List<UserGroupModel>();
  30 + try
  31 + {
  32 + UserGroupList = UserGroupModel.GetLicenseUserGroups(dbContext, LicenseId);
  33 + return Request.CreateResponse(HttpStatusCode.OK, UserGroupList);
  34 + }
  35 + catch (Exception ex)
  36 + {
  37 + // Log exception code goes here
  38 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  39 + }
  40 + }
  41 +
  42 + [Route("LicenseUserGroupUsers")]
  43 + [HttpGet]
  44 + public HttpResponseMessage GetLicenseUserGroupUsers(int LicenseId, int UserGroupId)
  45 + {
  46 + List<UserModel> UserList = new List<UserModel>();
  47 + try
  48 + {
  49 + UserList = UserGroupModel.GetLicenseUserGroupUsers(dbContext, LicenseId, UserGroupId);
  50 + return Request.CreateResponse(HttpStatusCode.OK, UserList);
  51 + }
  52 + catch (Exception ex)
  53 + {
  54 + // Log exception code goes here
  55 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  56 + }
  57 + }
  58 +
  59 + [Route("InsertUpdateLicenseUserGroup")]
  60 + [HttpPost]
  61 + public HttpResponseMessage InsertUpdateLicenseUserGroup(JObject jsonData)
  62 + {
  63 + bool Status = false;
  64 + UserGroupModel UserGroupEntity = new UserGroupModel();
  65 + UserGroupEntity.Id = jsonData["id"].Value<int>();
  66 + UserGroupEntity.LicenseId = jsonData["licenseId"].Value<int>();
  67 + UserGroupEntity.Title = jsonData["title"].Value<string>();
  68 + UserGroupEntity.IsActive = jsonData["isActive"].Value<bool>();
  69 + UserGroupEntity.CreationDate = jsonData["creationDate"].Value<DateTime>();
  70 + UserGroupEntity.ModifiedDate = jsonData["modifiedDate"].Value<DateTime>();
  71 + try
  72 + {
  73 + Status = UserGroupModel.InsertUpdateLicenseUserGroup(dbContext, UserGroupEntity);
  74 + if (Status)
  75 + {
  76 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  77 + }
  78 + else
  79 + {
  80 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  81 + }
  82 + }
  83 + catch (Exception ex)
  84 + {
  85 + // Log exception code goes here
  86 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  87 + }
  88 + }
  89 +
  90 + [Route("UpdateLicenseUserGroupUsers")]
  91 + [HttpPost]
  92 + public HttpResponseMessage UpdateLicenseUserGroupUsers(JObject jsonData)
  93 + {
  94 + bool Status = false;
  95 + int UserGroupId = jsonData["userGroupId"].Value<int>();
  96 + string UserIds = jsonData["userIds"].Value<string>();
  97 + try
  98 + {
  99 + Status = UserGroupModel.UpdateLicenseUserGroupUsers(dbContext, UserGroupId, UserIds);
  100 + if (Status)
  101 + {
  102 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  103 + }
  104 + else
  105 + {
  106 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  107 + }
  108 + }
  109 + catch (Exception ex)
  110 + {
  111 + // Log exception code goes here
  112 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  113 + }
  114 + }
  115 +
  116 + [Route("DeleteLicenseUserGroup")]
  117 + [HttpGet]
  118 + public HttpResponseMessage DeleteLicenseUserGroup(int UserGroupId)
  119 + {
  120 + bool Status = false;
  121 + try
  122 + {
  123 + Status = UserGroupModel.DeleteLicenseUserGroup(dbContext, UserGroupId);
  124 + if (Status)
  125 + {
  126 + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
  127 + }
  128 + else
  129 + {
  130 + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
  131 + }
  132 + }
  133 + catch (Exception ex)
  134 + {
  135 + // Log exception code goes here
  136 + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
  137 + }
  138 + }
  139 + }
  140 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... ... @@ -2880,9 +2880,13 @@ namespace AIAHTML5.ADMIN.API.Entity
2880 2880 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteSubscriptionPlan", idParameter, status);
2881 2881 }
2882 2882  
2883   - public virtual ObjectResult<usp_GetAccountNumber_Result> usp_GetAccountNumber()
  2883 + public virtual ObjectResult<usp_GetAccountNumber_Result> usp_GetAccountNumber(Nullable<int> licenseType)
2884 2884 {
2885   - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetAccountNumber_Result>("usp_GetAccountNumber");
  2885 + var licenseTypeParameter = licenseType.HasValue ?
  2886 + new ObjectParameter("LicenseType", licenseType) :
  2887 + new ObjectParameter("LicenseType", typeof(int));
  2888 +
  2889 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetAccountNumber_Result>("usp_GetAccountNumber", licenseTypeParameter);
2886 2890 }
2887 2891  
2888 2892 public virtual ObjectResult<usp_GetAccountTypeList_Result> usp_GetAccountTypeList(Nullable<int> id)
... ... @@ -2921,35 +2925,6 @@ namespace AIAHTML5.ADMIN.API.Entity
2921 2925 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetUserType_Result>("usp_GetUserType", idParameter);
2922 2926 }
2923 2927  
2924   - public virtual int usp_InsertSubscriptionPlan(Nullable<byte> id, string title, Nullable<decimal> price, Nullable<byte> duration, Nullable<byte> editionId, Nullable<bool> isActive, ObjectParameter status)
2925   - {
2926   - var idParameter = id.HasValue ?
2927   - new ObjectParameter("Id", id) :
2928   - new ObjectParameter("Id", typeof(byte));
2929   -
2930   - var titleParameter = title != null ?
2931   - new ObjectParameter("Title", title) :
2932   - new ObjectParameter("Title", typeof(string));
2933   -
2934   - var priceParameter = price.HasValue ?
2935   - new ObjectParameter("Price", price) :
2936   - new ObjectParameter("Price", typeof(decimal));
2937   -
2938   - var durationParameter = duration.HasValue ?
2939   - new ObjectParameter("Duration", duration) :
2940   - new ObjectParameter("Duration", typeof(byte));
2941   -
2942   - var editionIdParameter = editionId.HasValue ?
2943   - new ObjectParameter("EditionId", editionId) :
2944   - new ObjectParameter("EditionId", typeof(byte));
2945   -
2946   - var isActiveParameter = isActive.HasValue ?
2947   - new ObjectParameter("IsActive", isActive) :
2948   - new ObjectParameter("IsActive", typeof(bool));
2949   -
2950   - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertSubscriptionPlan", idParameter, titleParameter, priceParameter, durationParameter, editionIdParameter, isActiveParameter, status);
2951   - }
2952   -
2953 2928 public virtual int usp_UpdateSubscriptionPlan(Nullable<byte> id, string title, Nullable<decimal> price, Nullable<byte> duration, Nullable<byte> editionId, Nullable<bool> isActive, ObjectParameter status)
2954 2929 {
2955 2930 var idParameter = id.HasValue ?
... ... @@ -3257,5 +3232,286 @@ namespace AIAHTML5.ADMIN.API.Entity
3257 3232  
3258 3233 return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseBasicSettings", iLicenseIdParameter, sLicenseeFnameParameter, sLicenseeLnameParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, status);
3259 3234 }
  3235 +
  3236 + public virtual ObjectResult<usp_GetLicenseModestySettings_Result> usp_GetLicenseModestySettings(Nullable<int> iLicenseId, Nullable<int> iBuildingLevelId)
  3237 + {
  3238 + var iLicenseIdParameter = iLicenseId.HasValue ?
  3239 + new ObjectParameter("iLicenseId", iLicenseId) :
  3240 + new ObjectParameter("iLicenseId", typeof(int));
  3241 +
  3242 + var iBuildingLevelIdParameter = iBuildingLevelId.HasValue ?
  3243 + new ObjectParameter("iBuildingLevelId", iBuildingLevelId) :
  3244 + new ObjectParameter("iBuildingLevelId", typeof(int));
  3245 +
  3246 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetLicenseModestySettings_Result>("usp_GetLicenseModestySettings", iLicenseIdParameter, iBuildingLevelIdParameter);
  3247 + }
  3248 +
  3249 + public virtual int usp_UpdateLicenseModestySettings(Nullable<int> licenseEditionId, Nullable<int> siteId, Nullable<bool> isModesty, ObjectParameter status)
  3250 + {
  3251 + var licenseEditionIdParameter = licenseEditionId.HasValue ?
  3252 + new ObjectParameter("LicenseEditionId", licenseEditionId) :
  3253 + new ObjectParameter("LicenseEditionId", typeof(int));
  3254 +
  3255 + var siteIdParameter = siteId.HasValue ?
  3256 + new ObjectParameter("SiteId", siteId) :
  3257 + new ObjectParameter("SiteId", typeof(int));
  3258 +
  3259 + var isModestyParameter = isModesty.HasValue ?
  3260 + new ObjectParameter("IsModesty", isModesty) :
  3261 + new ObjectParameter("IsModesty", typeof(bool));
  3262 +
  3263 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, status);
  3264 + }
  3265 +
  3266 + public virtual int usp_UpdateLicenseModuleStatus(Nullable<int> licenseId, Nullable<int> moduleId, Nullable<bool> moduleStatus, ObjectParameter status)
  3267 + {
  3268 + var licenseIdParameter = licenseId.HasValue ?
  3269 + new ObjectParameter("LicenseId", licenseId) :
  3270 + new ObjectParameter("LicenseId", typeof(int));
  3271 +
  3272 + var moduleIdParameter = moduleId.HasValue ?
  3273 + new ObjectParameter("ModuleId", moduleId) :
  3274 + new ObjectParameter("ModuleId", typeof(int));
  3275 +
  3276 + var moduleStatusParameter = moduleStatus.HasValue ?
  3277 + new ObjectParameter("ModuleStatus", moduleStatus) :
  3278 + new ObjectParameter("ModuleStatus", typeof(bool));
  3279 +
  3280 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleIdParameter, moduleStatusParameter, status);
  3281 + }
  3282 +
  3283 + public virtual ObjectResult<usp_GetSiteById_Result> usp_GetSiteById(Nullable<int> siteId)
  3284 + {
  3285 + var siteIdParameter = siteId.HasValue ?
  3286 + new ObjectParameter("SiteId", siteId) :
  3287 + new ObjectParameter("SiteId", typeof(int));
  3288 +
  3289 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteById_Result>("usp_GetSiteById", siteIdParameter);
  3290 + }
  3291 +
  3292 + public virtual ObjectResult<usp_GetSiteAccountEditions_Result> usp_GetSiteAccountEditions(Nullable<int> siteId, Nullable<int> licenseId)
  3293 + {
  3294 + var siteIdParameter = siteId.HasValue ?
  3295 + new ObjectParameter("SiteId", siteId) :
  3296 + new ObjectParameter("SiteId", typeof(int));
  3297 +
  3298 + var licenseIdParameter = licenseId.HasValue ?
  3299 + new ObjectParameter("LicenseId", licenseId) :
  3300 + new ObjectParameter("LicenseId", typeof(int));
  3301 +
  3302 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteAccountEditions_Result>("usp_GetSiteAccountEditions", siteIdParameter, licenseIdParameter);
  3303 + }
  3304 +
  3305 + public virtual int usp_DeleteSiteAccount(Nullable<int> iSiteId, Nullable<int> licenseId, Nullable<int> userId, ObjectParameter status)
  3306 + {
  3307 + var iSiteIdParameter = iSiteId.HasValue ?
  3308 + new ObjectParameter("iSiteId", iSiteId) :
  3309 + new ObjectParameter("iSiteId", typeof(int));
  3310 +
  3311 + var licenseIdParameter = licenseId.HasValue ?
  3312 + new ObjectParameter("LicenseId", licenseId) :
  3313 + new ObjectParameter("LicenseId", typeof(int));
  3314 +
  3315 + var userIdParameter = userId.HasValue ?
  3316 + new ObjectParameter("UserId", userId) :
  3317 + new ObjectParameter("UserId", typeof(int));
  3318 +
  3319 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteSiteAccount", iSiteIdParameter, licenseIdParameter, userIdParameter, status);
  3320 + }
  3321 +
  3322 + public virtual int usp_InsertSubscriptionPlan(Nullable<byte> id, string title, Nullable<decimal> price, Nullable<byte> duration, Nullable<byte> editionId, Nullable<bool> isActive, ObjectParameter status)
  3323 + {
  3324 + var idParameter = id.HasValue ?
  3325 + new ObjectParameter("Id", id) :
  3326 + new ObjectParameter("Id", typeof(byte));
  3327 +
  3328 + var titleParameter = title != null ?
  3329 + new ObjectParameter("Title", title) :
  3330 + new ObjectParameter("Title", typeof(string));
  3331 +
  3332 + var priceParameter = price.HasValue ?
  3333 + new ObjectParameter("Price", price) :
  3334 + new ObjectParameter("Price", typeof(decimal));
  3335 +
  3336 + var durationParameter = duration.HasValue ?
  3337 + new ObjectParameter("Duration", duration) :
  3338 + new ObjectParameter("Duration", typeof(byte));
  3339 +
  3340 + var editionIdParameter = editionId.HasValue ?
  3341 + new ObjectParameter("EditionId", editionId) :
  3342 + new ObjectParameter("EditionId", typeof(byte));
  3343 +
  3344 + var isActiveParameter = isActive.HasValue ?
  3345 + new ObjectParameter("IsActive", isActive) :
  3346 + new ObjectParameter("IsActive", typeof(bool));
  3347 +
  3348 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertSubscriptionPlan", idParameter, titleParameter, priceParameter, durationParameter, editionIdParameter, isActiveParameter, status);
  3349 + }
  3350 +
  3351 + public virtual int usp_InsertUpdateSiteAccount(Nullable<int> iSiteId, string sSiteIP, string sTitle, string sInstituteName, string sDepartment, string sAddress1, string sAddress2, string sCity, string zip, string phone, Nullable<int> stateId, Nullable<int> countryId, Nullable<bool> isMaster, Nullable<System.DateTime> creationDate, Nullable<System.DateTime> modifiedDate, Nullable<bool> isActive, Nullable<int> userId, string sSiteIPTo, Nullable<int> licenseId, string siteEditionIds, ObjectParameter status)
  3352 + {
  3353 + var iSiteIdParameter = iSiteId.HasValue ?
  3354 + new ObjectParameter("iSiteId", iSiteId) :
  3355 + new ObjectParameter("iSiteId", typeof(int));
  3356 +
  3357 + var sSiteIPParameter = sSiteIP != null ?
  3358 + new ObjectParameter("sSiteIP", sSiteIP) :
  3359 + new ObjectParameter("sSiteIP", typeof(string));
  3360 +
  3361 + var sTitleParameter = sTitle != null ?
  3362 + new ObjectParameter("sTitle", sTitle) :
  3363 + new ObjectParameter("sTitle", typeof(string));
  3364 +
  3365 + var sInstituteNameParameter = sInstituteName != null ?
  3366 + new ObjectParameter("sInstituteName", sInstituteName) :
  3367 + new ObjectParameter("sInstituteName", typeof(string));
  3368 +
  3369 + var sDepartmentParameter = sDepartment != null ?
  3370 + new ObjectParameter("sDepartment", sDepartment) :
  3371 + new ObjectParameter("sDepartment", typeof(string));
  3372 +
  3373 + var sAddress1Parameter = sAddress1 != null ?
  3374 + new ObjectParameter("sAddress1", sAddress1) :
  3375 + new ObjectParameter("sAddress1", typeof(string));
  3376 +
  3377 + var sAddress2Parameter = sAddress2 != null ?
  3378 + new ObjectParameter("sAddress2", sAddress2) :
  3379 + new ObjectParameter("sAddress2", typeof(string));
  3380 +
  3381 + var sCityParameter = sCity != null ?
  3382 + new ObjectParameter("sCity", sCity) :
  3383 + new ObjectParameter("sCity", typeof(string));
  3384 +
  3385 + var zipParameter = zip != null ?
  3386 + new ObjectParameter("Zip", zip) :
  3387 + new ObjectParameter("Zip", typeof(string));
  3388 +
  3389 + var phoneParameter = phone != null ?
  3390 + new ObjectParameter("Phone", phone) :
  3391 + new ObjectParameter("Phone", typeof(string));
  3392 +
  3393 + var stateIdParameter = stateId.HasValue ?
  3394 + new ObjectParameter("StateId", stateId) :
  3395 + new ObjectParameter("StateId", typeof(int));
  3396 +
  3397 + var countryIdParameter = countryId.HasValue ?
  3398 + new ObjectParameter("CountryId", countryId) :
  3399 + new ObjectParameter("CountryId", typeof(int));
  3400 +
  3401 + var isMasterParameter = isMaster.HasValue ?
  3402 + new ObjectParameter("IsMaster", isMaster) :
  3403 + new ObjectParameter("IsMaster", typeof(bool));
  3404 +
  3405 + var creationDateParameter = creationDate.HasValue ?
  3406 + new ObjectParameter("CreationDate", creationDate) :
  3407 + new ObjectParameter("CreationDate", typeof(System.DateTime));
  3408 +
  3409 + var modifiedDateParameter = modifiedDate.HasValue ?
  3410 + new ObjectParameter("ModifiedDate", modifiedDate) :
  3411 + new ObjectParameter("ModifiedDate", typeof(System.DateTime));
  3412 +
  3413 + var isActiveParameter = isActive.HasValue ?
  3414 + new ObjectParameter("IsActive", isActive) :
  3415 + new ObjectParameter("IsActive", typeof(bool));
  3416 +
  3417 + var userIdParameter = userId.HasValue ?
  3418 + new ObjectParameter("UserId", userId) :
  3419 + new ObjectParameter("UserId", typeof(int));
  3420 +
  3421 + var sSiteIPToParameter = sSiteIPTo != null ?
  3422 + new ObjectParameter("sSiteIPTo", sSiteIPTo) :
  3423 + new ObjectParameter("sSiteIPTo", typeof(string));
  3424 +
  3425 + var licenseIdParameter = licenseId.HasValue ?
  3426 + new ObjectParameter("LicenseId", licenseId) :
  3427 + new ObjectParameter("LicenseId", typeof(int));
  3428 +
  3429 + var siteEditionIdsParameter = siteEditionIds != null ?
  3430 + new ObjectParameter("SiteEditionIds", siteEditionIds) :
  3431 + new ObjectParameter("SiteEditionIds", typeof(string));
  3432 +
  3433 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertUpdateSiteAccount", iSiteIdParameter, sSiteIPParameter, sTitleParameter, sInstituteNameParameter, sDepartmentParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, zipParameter, phoneParameter, stateIdParameter, countryIdParameter, isMasterParameter, creationDateParameter, modifiedDateParameter, isActiveParameter, userIdParameter, sSiteIPToParameter, licenseIdParameter, siteEditionIdsParameter, status);
  3434 + }
  3435 +
  3436 + public virtual ObjectResult<usp_GetLicenseUserGroups_Result> usp_GetLicenseUserGroups(Nullable<int> licenseId)
  3437 + {
  3438 + var licenseIdParameter = licenseId.HasValue ?
  3439 + new ObjectParameter("LicenseId", licenseId) :
  3440 + new ObjectParameter("LicenseId", typeof(int));
  3441 +
  3442 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetLicenseUserGroups_Result>("usp_GetLicenseUserGroups", licenseIdParameter);
  3443 + }
  3444 +
  3445 + public virtual int usp_InsertUpdateLicenseUserGroup(Nullable<int> id, Nullable<int> licenseId, string title, Nullable<System.DateTime> creationDate, Nullable<System.DateTime> modifiedDate, Nullable<bool> isActive, ObjectParameter status)
  3446 + {
  3447 + var idParameter = id.HasValue ?
  3448 + new ObjectParameter("Id", id) :
  3449 + new ObjectParameter("Id", typeof(int));
  3450 +
  3451 + var licenseIdParameter = licenseId.HasValue ?
  3452 + new ObjectParameter("LicenseId", licenseId) :
  3453 + new ObjectParameter("LicenseId", typeof(int));
  3454 +
  3455 + var titleParameter = title != null ?
  3456 + new ObjectParameter("Title", title) :
  3457 + new ObjectParameter("Title", typeof(string));
  3458 +
  3459 + var creationDateParameter = creationDate.HasValue ?
  3460 + new ObjectParameter("CreationDate", creationDate) :
  3461 + new ObjectParameter("CreationDate", typeof(System.DateTime));
  3462 +
  3463 + var modifiedDateParameter = modifiedDate.HasValue ?
  3464 + new ObjectParameter("ModifiedDate", modifiedDate) :
  3465 + new ObjectParameter("ModifiedDate", typeof(System.DateTime));
  3466 +
  3467 + var isActiveParameter = isActive.HasValue ?
  3468 + new ObjectParameter("IsActive", isActive) :
  3469 + new ObjectParameter("IsActive", typeof(bool));
  3470 +
  3471 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertUpdateLicenseUserGroup", idParameter, licenseIdParameter, titleParameter, creationDateParameter, modifiedDateParameter, isActiveParameter, status);
  3472 + }
  3473 +
  3474 + public virtual int usp_InsertDeleteUserManageRights(string roleName, Nullable<int> activityId, Nullable<int> userId, string requestType, ObjectParameter status)
  3475 + {
  3476 + var roleNameParameter = roleName != null ?
  3477 + new ObjectParameter("RoleName", roleName) :
  3478 + new ObjectParameter("RoleName", typeof(string));
  3479 +
  3480 + var activityIdParameter = activityId.HasValue ?
  3481 + new ObjectParameter("ActivityId", activityId) :
  3482 + new ObjectParameter("ActivityId", typeof(int));
  3483 +
  3484 + var userIdParameter = userId.HasValue ?
  3485 + new ObjectParameter("UserId", userId) :
  3486 + new ObjectParameter("UserId", typeof(int));
  3487 +
  3488 + var requestTypeParameter = requestType != null ?
  3489 + new ObjectParameter("RequestType", requestType) :
  3490 + new ObjectParameter("RequestType", typeof(string));
  3491 +
  3492 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertDeleteUserManageRights", roleNameParameter, activityIdParameter, userIdParameter, requestTypeParameter, status);
  3493 + }
  3494 +
  3495 + public virtual int usp_UpdateLicenseUserGroupUsers(Nullable<int> userGroupId, string userIds, ObjectParameter status)
  3496 + {
  3497 + var userGroupIdParameter = userGroupId.HasValue ?
  3498 + new ObjectParameter("UserGroupId", userGroupId) :
  3499 + new ObjectParameter("UserGroupId", typeof(int));
  3500 +
  3501 + var userIdsParameter = userIds != null ?
  3502 + new ObjectParameter("UserIds", userIds) :
  3503 + new ObjectParameter("UserIds", typeof(string));
  3504 +
  3505 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseUserGroupUsers", userGroupIdParameter, userIdsParameter, status);
  3506 + }
  3507 +
  3508 + public virtual int usp_DeleteLicenseUserGroup(Nullable<int> userGroupId, ObjectParameter status)
  3509 + {
  3510 + var userGroupIdParameter = userGroupId.HasValue ?
  3511 + new ObjectParameter("UserGroupId", userGroupId) :
  3512 + new ObjectParameter("UserGroupId", typeof(int));
  3513 +
  3514 + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteLicenseUserGroup", userGroupIdParameter, status);
  3515 + }
3260 3516 }
3261 3517 }
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... ... @@ -2616,11 +2616,23 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2616 2616 <Parameter Name="Status" Type="int" Mode="InOut" />
2617 2617 </Function>
2618 2618 <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  2619 + <Function Name="usp_DeleteLicenseUserGroup" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2620 + <Parameter Name="UserGroupId" Type="int" Mode="In" />
  2621 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2622 + </Function>
  2623 + <Function Name="usp_DeleteSiteAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2624 + <Parameter Name="iSiteId" Type="int" Mode="In" />
  2625 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2626 + <Parameter Name="UserId" Type="int" Mode="In" />
  2627 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2628 + </Function>
2619 2629 <Function Name="usp_DeleteSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2620 2630 <Parameter Name="Id" Type="tinyint" Mode="In" />
2621 2631 <Parameter Name="Status" Type="bit" Mode="InOut" />
2622 2632 </Function>
2623   - <Function Name="usp_GetAccountNumber" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  2633 + <Function Name="usp_GetAccountNumber" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2634 + <Parameter Name="LicenseType" Type="int" Mode="In" />
  2635 + </Function>
2624 2636 <Function Name="usp_GetAccountTypeList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2625 2637 <Parameter Name="Id" Type="int" Mode="In" />
2626 2638 </Function>
... ... @@ -2628,6 +2640,10 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2628 2640 <Function Name="usp_GetLicenseById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2629 2641 <Parameter Name="Id" Type="int" Mode="In" />
2630 2642 </Function>
  2643 + <Function Name="usp_GetLicenseModestySettings" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2644 + <Parameter Name="iLicenseId" Type="int" Mode="In" />
  2645 + <Parameter Name="iBuildingLevelId" Type="int" Mode="In" />
  2646 + </Function>
2631 2647 <Function Name="usp_GetLicenses" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2632 2648 <Parameter Name="sStartDate" Type="varchar" Mode="In" />
2633 2649 <Parameter Name="sEndDate" Type="varchar" Mode="In" />
... ... @@ -2642,6 +2658,9 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2642 2658 <Parameter Name="bisActive" Type="bit" Mode="In" />
2643 2659 </Function>
2644 2660 <Function Name="usp_GetLicenseTypes" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  2661 + <Function Name="usp_GetLicenseUserGroups" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2662 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2663 + </Function>
2645 2664 <Function Name="usp_GetManageRights" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2646 2665 <Parameter Name="UserId" Type="int" Mode="In" />
2647 2666 <Parameter Name="RoleName" Type="varchar" Mode="In" />
... ... @@ -2658,6 +2677,13 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2658 2677 <Parameter Name="iAccountTypeId" Type="int" Mode="In" />
2659 2678 <Parameter Name="iLoginUserType" Type="int" Mode="In" />
2660 2679 </Function>
  2680 + <Function Name="usp_GetSiteAccountEditions" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2681 + <Parameter Name="SiteId" Type="int" Mode="In" />
  2682 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2683 + </Function>
  2684 + <Function Name="usp_GetSiteById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2685 + <Parameter Name="SiteId" Type="int" Mode="In" />
  2686 + </Function>
2661 2687 <Function Name="usp_GetSubscriptionPlans" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2662 2688 <Parameter Name="iEditionId" Type="tinyint" Mode="In" />
2663 2689 </Function>
... ... @@ -2678,6 +2704,13 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2678 2704 <Parameter Name="iEditionId" Type="tinyint" Mode="In" />
2679 2705 <Parameter Name="Status" Type="int" Mode="InOut" />
2680 2706 </Function>
  2707 + <Function Name="usp_InsertDeleteUserManageRights" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2708 + <Parameter Name="RoleName" Type="varchar" Mode="In" />
  2709 + <Parameter Name="ActivityId" Type="int" Mode="In" />
  2710 + <Parameter Name="UserId" Type="int" Mode="In" />
  2711 + <Parameter Name="RequestType" Type="varchar" Mode="In" />
  2712 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2713 + </Function>
2681 2714 <Function Name="usp_InsertSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2682 2715 <Parameter Name="Id" Type="tinyint" Mode="In" />
2683 2716 <Parameter Name="Title" Type="varchar" Mode="In" />
... ... @@ -2687,6 +2720,38 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2687 2720 <Parameter Name="IsActive" Type="bit" Mode="In" />
2688 2721 <Parameter Name="Status" Type="bit" Mode="InOut" />
2689 2722 </Function>
  2723 + <Function Name="usp_InsertUpdateLicenseUserGroup" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2724 + <Parameter Name="Id" Type="int" Mode="In" />
  2725 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2726 + <Parameter Name="Title" Type="varchar" Mode="In" />
  2727 + <Parameter Name="CreationDate" Type="datetime" Mode="In" />
  2728 + <Parameter Name="ModifiedDate" Type="datetime" Mode="In" />
  2729 + <Parameter Name="IsActive" Type="bit" Mode="In" />
  2730 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2731 + </Function>
  2732 + <Function Name="usp_InsertUpdateSiteAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2733 + <Parameter Name="iSiteId" Type="int" Mode="In" />
  2734 + <Parameter Name="sSiteIP" Type="varchar" Mode="In" />
  2735 + <Parameter Name="sTitle" Type="varchar" Mode="In" />
  2736 + <Parameter Name="sInstituteName" Type="varchar" Mode="In" />
  2737 + <Parameter Name="sDepartment" Type="varchar" Mode="In" />
  2738 + <Parameter Name="sAddress1" Type="varchar" Mode="In" />
  2739 + <Parameter Name="sAddress2" Type="varchar" Mode="In" />
  2740 + <Parameter Name="sCity" Type="varchar" Mode="In" />
  2741 + <Parameter Name="Zip" Type="varchar" Mode="In" />
  2742 + <Parameter Name="Phone" Type="varchar" Mode="In" />
  2743 + <Parameter Name="StateId" Type="int" Mode="In" />
  2744 + <Parameter Name="CountryId" Type="int" Mode="In" />
  2745 + <Parameter Name="IsMaster" Type="bit" Mode="In" />
  2746 + <Parameter Name="CreationDate" Type="datetime" Mode="In" />
  2747 + <Parameter Name="ModifiedDate" Type="datetime" Mode="In" />
  2748 + <Parameter Name="IsActive" Type="bit" Mode="In" />
  2749 + <Parameter Name="UserId" Type="int" Mode="In" />
  2750 + <Parameter Name="sSiteIPTo" Type="varchar" Mode="In" />
  2751 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2752 + <Parameter Name="SiteEditionIds" Type="varchar" Mode="In" />
  2753 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2754 + </Function>
2690 2755 <Function Name="usp_UpdateAIAUser" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2691 2756 <Parameter Name="sLoginId" Type="varchar" Mode="In" />
2692 2757 <Parameter Name="sPassword" Type="varchar" Mode="In" />
... ... @@ -2717,6 +2782,23 @@ warning 6002: The table/view &#39;AIADatabaseV5.dbo.VocabTermNumberToSystemMap&#39; does
2717 2782 <Parameter Name="sEmailId" Type="varchar" Mode="In" />
2718 2783 <Parameter Name="Status" Type="bit" Mode="InOut" />
2719 2784 </Function>
  2785 + <Function Name="usp_UpdateLicenseModestySettings" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2786 + <Parameter Name="LicenseEditionId" Type="int" Mode="In" />
  2787 + <Parameter Name="SiteId" Type="int" Mode="In" />
  2788 + <Parameter Name="IsModesty" Type="bit" Mode="In" />
  2789 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2790 + </Function>
  2791 + <Function Name="usp_UpdateLicenseModuleStatus" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2792 + <Parameter Name="LicenseId" Type="int" Mode="In" />
  2793 + <Parameter Name="ModuleId" Type="int" Mode="In" />
  2794 + <Parameter Name="ModuleStatus" Type="bit" Mode="In" />
  2795 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2796 + </Function>
  2797 + <Function Name="usp_UpdateLicenseUserGroupUsers" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
  2798 + <Parameter Name="UserGroupId" Type="int" Mode="In" />
  2799 + <Parameter Name="UserIds" Type="varchar" Mode="In" />
  2800 + <Parameter Name="Status" Type="bit" Mode="InOut" />
  2801 + </Function>
2720 2802 <Function Name="usp_UpdateSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
2721 2803 <Parameter Name="Id" Type="tinyint" Mode="In" />
2722 2804 <Parameter Name="Title" Type="varchar" Mode="In" />
... ... @@ -6156,7 +6238,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6156 6238 <Parameter Name="Id" Mode="In" Type="Byte" />
6157 6239 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
6158 6240 </FunctionImport>
6159   - <FunctionImport Name="usp_GetAccountNumber" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountNumber_Result)" />
  6241 + <FunctionImport Name="usp_GetAccountNumber" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountNumber_Result)" >
  6242 + <Parameter Name="LicenseType" Mode="In" Type="Int32" />
  6243 + </FunctionImport>
6160 6244 <FunctionImport Name="usp_GetAccountTypeList" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountTypeList_Result)">
6161 6245 <Parameter Name="Id" Mode="In" Type="Int32" />
6162 6246 </FunctionImport>
... ... @@ -6169,15 +6253,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6169 6253 <FunctionImport Name="usp_GetUserType" ReturnType="Collection(AIADatabaseV5Model.usp_GetUserType_Result)">
6170 6254 <Parameter Name="id" Mode="In" Type="Int32" />
6171 6255 </FunctionImport>
6172   - <FunctionImport Name="usp_InsertSubscriptionPlan">
6173   - <Parameter Name="Id" Mode="In" Type="Byte" />
6174   - <Parameter Name="Title" Mode="In" Type="String" />
6175   - <Parameter Name="Price" Mode="In" Type="Decimal" />
6176   - <Parameter Name="Duration" Mode="In" Type="Byte" />
6177   - <Parameter Name="EditionId" Mode="In" Type="Byte" />
6178   - <Parameter Name="IsActive" Mode="In" Type="Boolean" />
6179   - <Parameter Name="Status" Mode="InOut" Type="Boolean" />
6180   - </FunctionImport>
6181 6256 <FunctionImport Name="usp_UpdateSubscriptionPlan">
6182 6257 <Parameter Name="Id" Mode="In" Type="Byte" />
6183 6258 <Parameter Name="Title" Mode="In" Type="String" />
... ... @@ -6268,6 +6343,95 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
6268 6343 <Parameter Name="sEmailId" Mode="In" Type="String" />
6269 6344 <Parameter Name="Status" Mode="InOut" Type="Boolean" />
6270 6345 </FunctionImport>
  6346 + <FunctionImport Name="usp_GetLicenseModestySettings" ReturnType="Collection(AIADatabaseV5Model.usp_GetLicenseModestySettings_Result)">
  6347 + <Parameter Name="iLicenseId" Mode="In" Type="Int32" />
  6348 + <Parameter Name="iBuildingLevelId" Mode="In" Type="Int32" />
  6349 + </FunctionImport>
  6350 + <FunctionImport Name="usp_UpdateLicenseModestySettings">
  6351 + <Parameter Name="LicenseEditionId" Mode="In" Type="Int32" />
  6352 + <Parameter Name="SiteId" Mode="In" Type="Int32" />
  6353 + <Parameter Name="IsModesty" Mode="In" Type="Boolean" />
  6354 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6355 + </FunctionImport>
  6356 + <FunctionImport Name="usp_UpdateLicenseModuleStatus">
  6357 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6358 + <Parameter Name="ModuleId" Mode="In" Type="Int32" />
  6359 + <Parameter Name="ModuleStatus" Mode="In" Type="Boolean" />
  6360 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6361 + </FunctionImport>
  6362 + <FunctionImport Name="usp_GetSiteById" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteById_Result)">
  6363 + <Parameter Name="SiteId" Mode="In" Type="Int32" />
  6364 + </FunctionImport>
  6365 + <FunctionImport Name="usp_GetSiteAccountEditions" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteAccountEditions_Result)">
  6366 + <Parameter Name="SiteId" Mode="In" Type="Int32" />
  6367 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6368 + </FunctionImport>
  6369 + <FunctionImport Name="usp_DeleteSiteAccount">
  6370 + <Parameter Name="iSiteId" Mode="In" Type="Int32" />
  6371 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6372 + <Parameter Name="UserId" Mode="In" Type="Int32" />
  6373 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6374 + </FunctionImport>
  6375 + <FunctionImport Name="usp_InsertSubscriptionPlan">
  6376 + <Parameter Name="Id" Mode="In" Type="Byte" />
  6377 + <Parameter Name="Title" Mode="In" Type="String" />
  6378 + <Parameter Name="Price" Mode="In" Type="Decimal" />
  6379 + <Parameter Name="Duration" Mode="In" Type="Byte" />
  6380 + <Parameter Name="EditionId" Mode="In" Type="Byte" />
  6381 + <Parameter Name="IsActive" Mode="In" Type="Boolean" />
  6382 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6383 + </FunctionImport>
  6384 + <FunctionImport Name="usp_InsertUpdateSiteAccount">
  6385 + <Parameter Name="iSiteId" Mode="In" Type="Int32" />
  6386 + <Parameter Name="sSiteIP" Mode="In" Type="String" />
  6387 + <Parameter Name="sTitle" Mode="In" Type="String" />
  6388 + <Parameter Name="sInstituteName" Mode="In" Type="String" />
  6389 + <Parameter Name="sDepartment" Mode="In" Type="String" />
  6390 + <Parameter Name="sAddress1" Mode="In" Type="String" />
  6391 + <Parameter Name="sAddress2" Mode="In" Type="String" />
  6392 + <Parameter Name="sCity" Mode="In" Type="String" />
  6393 + <Parameter Name="Zip" Mode="In" Type="String" />
  6394 + <Parameter Name="Phone" Mode="In" Type="String" />
  6395 + <Parameter Name="StateId" Mode="In" Type="Int32" />
  6396 + <Parameter Name="CountryId" Mode="In" Type="Int32" />
  6397 + <Parameter Name="IsMaster" Mode="In" Type="Boolean" />
  6398 + <Parameter Name="CreationDate" Mode="In" Type="DateTime" />
  6399 + <Parameter Name="ModifiedDate" Mode="In" Type="DateTime" />
  6400 + <Parameter Name="IsActive" Mode="In" Type="Boolean" />
  6401 + <Parameter Name="UserId" Mode="In" Type="Int32" />
  6402 + <Parameter Name="sSiteIPTo" Mode="In" Type="String" />
  6403 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6404 + <Parameter Name="SiteEditionIds" Mode="In" Type="String" />
  6405 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6406 + </FunctionImport>
  6407 + <FunctionImport Name="usp_GetLicenseUserGroups" ReturnType="Collection(AIADatabaseV5Model.usp_GetLicenseUserGroups_Result)">
  6408 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6409 + </FunctionImport>
  6410 + <FunctionImport Name="usp_InsertUpdateLicenseUserGroup">
  6411 + <Parameter Name="Id" Mode="In" Type="Int32" />
  6412 + <Parameter Name="LicenseId" Mode="In" Type="Int32" />
  6413 + <Parameter Name="Title" Mode="In" Type="String" />
  6414 + <Parameter Name="CreationDate" Mode="In" Type="DateTime" />
  6415 + <Parameter Name="ModifiedDate" Mode="In" Type="DateTime" />
  6416 + <Parameter Name="IsActive" Mode="In" Type="Boolean" />
  6417 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6418 + </FunctionImport>
  6419 + <FunctionImport Name="usp_InsertDeleteUserManageRights">
  6420 + <Parameter Name="RoleName" Mode="In" Type="String" />
  6421 + <Parameter Name="ActivityId" Mode="In" Type="Int32" />
  6422 + <Parameter Name="UserId" Mode="In" Type="Int32" />
  6423 + <Parameter Name="RequestType" Mode="In" Type="String" />
  6424 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6425 + </FunctionImport>
  6426 + <FunctionImport Name="usp_UpdateLicenseUserGroupUsers">
  6427 + <Parameter Name="UserGroupId" Mode="In" Type="Int32" />
  6428 + <Parameter Name="UserIds" Mode="In" Type="String" />
  6429 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6430 + </FunctionImport>
  6431 + <FunctionImport Name="usp_DeleteLicenseUserGroup">
  6432 + <Parameter Name="UserGroupId" Mode="In" Type="Int32" />
  6433 + <Parameter Name="Status" Mode="InOut" Type="Boolean" />
  6434 + </FunctionImport>
6271 6435 </EntityContainer>
6272 6436 <ComplexType Name="DA_GetBaseLayer_Result">
6273 6437 <Property Type="Int32" Name="Id" Nullable="false" />
... ... @@ -7180,6 +7344,48 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
7180 7344 <Property Type="Byte" Name="Priority" Nullable="true" />
7181 7345 <Property Type="String" Name="MenuStatus" Nullable="false" MaxLength="1" />
7182 7346 </ComplexType>
  7347 + <ComplexType Name="usp_GetLicenseModestySettings_Result">
  7348 + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" />
  7349 + <Property Type="Boolean" Name="IsModesty" Nullable="true" />
  7350 + <Property Type="Int32" Name="LicenseEditionId" Nullable="false" />
  7351 + </ComplexType>
  7352 + <ComplexType Name="usp_GetSiteById_Result">
  7353 + <Property Type="Int32" Name="Id" Nullable="false" />
  7354 + <Property Type="String" Name="SiteIp" Nullable="true" MaxLength="2000" />
  7355 + <Property Type="String" Name="Title" Nullable="true" MaxLength="100" />
  7356 + <Property Type="String" Name="SiteIPTo" Nullable="false" MaxLength="100" />
  7357 + <Property Type="String" Name="SiteMasterIPTo" Nullable="false" MaxLength="100" />
  7358 + <Property Type="String" Name="Address1" Nullable="true" MaxLength="100" />
  7359 + <Property Type="String" Name="Address2" Nullable="true" MaxLength="100" />
  7360 + <Property Type="String" Name="Zip" Nullable="true" MaxLength="20" />
  7361 + <Property Type="String" Name="Phone" Nullable="true" MaxLength="30" />
  7362 + <Property Type="String" Name="City" Nullable="true" MaxLength="50" />
  7363 + <Property Type="Int32" Name="StateId" Nullable="true" />
  7364 + <Property Type="Int32" Name="CountryId" Nullable="true" />
  7365 + <Property Type="Boolean" Name="IsMaster" Nullable="false" />
  7366 + <Property Type="String" Name="CreationDate" Nullable="true" MaxLength="30" />
  7367 + <Property Type="String" Name="ModifiedDate" Nullable="true" MaxLength="30" />
  7368 + <Property Type="String" Name="InstituteName" Nullable="true" MaxLength="100" />
  7369 + <Property Type="String" Name="Department" Nullable="true" MaxLength="50" />
  7370 + <Property Type="Int32" Name="UserId" Nullable="false" />
  7371 + <Property Type="String" Name="FirstName" Nullable="true" MaxLength="100" />
  7372 + <Property Type="String" Name="EmailId" Nullable="true" MaxLength="50" />
  7373 + <Property Type="Boolean" Name="IsActive" Nullable="true" />
  7374 + </ComplexType>
  7375 + <ComplexType Name="usp_GetSiteAccountEditions_Result">
  7376 + <Property Type="Int32" Name="LicenseEditionId" Nullable="false" />
  7377 + <Property Type="Byte" Name="Id" Nullable="false" />
  7378 + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" />
  7379 + </ComplexType>
  7380 + <ComplexType Name="usp_GetLicenseUserGroups_Result">
  7381 + <Property Type="Int32" Name="Id" Nullable="false" />
  7382 + <Property Type="String" Name="Title" Nullable="false" MaxLength="100" />
  7383 + <Property Type="Int32" Name="LicenseId" Nullable="false" />
  7384 + <Property Type="DateTime" Name="CreationDate" Nullable="false" Precision="23" />
  7385 + <Property Type="DateTime" Name="ModifiedDate" Nullable="true" Precision="23" />
  7386 + <Property Type="Boolean" Name="IsActive" Nullable="false" />
  7387 + <Property Type="Int32" Name="TotalUsers" Nullable="true" />
  7388 + </ComplexType>
7183 7389 </Schema>
7184 7390 </edmx:ConceptualModels>
7185 7391 <!-- C-S mapping content -->
... ... @@ -9516,7 +9722,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
9516 9722 </ComplexTypeMapping>
9517 9723 </ResultMapping>
9518 9724 </FunctionImportMapping>
9519   - <FunctionImportMapping FunctionImportName="usp_InsertSubscriptionPlan" FunctionName="AIADatabaseV5Model.Store.usp_InsertSubscriptionPlan" />
9520 9725 <FunctionImportMapping FunctionImportName="usp_UpdateSubscriptionPlan" FunctionName="AIADatabaseV5Model.Store.usp_UpdateSubscriptionPlan" />
9521 9726 <FunctionImportMapping FunctionImportName="usp_GetLicenseTypes" FunctionName="AIADatabaseV5Model.Store.usp_GetLicenseTypes">
9522 9727 <ResultMapping>
... ... @@ -9641,6 +9846,73 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]&lt;/Definin
9641 9846 </ResultMapping>
9642 9847 </FunctionImportMapping>
9643 9848 <FunctionImportMapping FunctionImportName="usp_UpdateLicenseBasicSettings" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseBasicSettings" />
  9849 + <FunctionImportMapping FunctionImportName="usp_GetLicenseModestySettings" FunctionName="AIADatabaseV5Model.Store.usp_GetLicenseModestySettings">
  9850 + <ResultMapping>
  9851 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetLicenseModestySettings_Result">
  9852 + <ScalarProperty Name="Title" ColumnName="Title" />
  9853 + <ScalarProperty Name="IsModesty" ColumnName="IsModesty" />
  9854 + <ScalarProperty Name="LicenseEditionId" ColumnName="LicenseEditionId" />
  9855 + </ComplexTypeMapping>
  9856 + </ResultMapping>
  9857 + </FunctionImportMapping>
  9858 + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseModestySettings" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseModestySettings" />
  9859 + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseModuleStatus" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseModuleStatus" />
  9860 + <FunctionImportMapping FunctionImportName="usp_GetSiteById" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteById">
  9861 + <ResultMapping>
  9862 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteById_Result">
  9863 + <ScalarProperty Name="Id" ColumnName="Id" />
  9864 + <ScalarProperty Name="SiteIp" ColumnName="SiteIp" />
  9865 + <ScalarProperty Name="Title" ColumnName="Title" />
  9866 + <ScalarProperty Name="SiteIPTo" ColumnName="SiteIPTo" />
  9867 + <ScalarProperty Name="SiteMasterIPTo" ColumnName="SiteMasterIPTo" />
  9868 + <ScalarProperty Name="Address1" ColumnName="Address1" />
  9869 + <ScalarProperty Name="Address2" ColumnName="Address2" />
  9870 + <ScalarProperty Name="Zip" ColumnName="Zip" />
  9871 + <ScalarProperty Name="Phone" ColumnName="Phone" />
  9872 + <ScalarProperty Name="City" ColumnName="City" />
  9873 + <ScalarProperty Name="StateId" ColumnName="StateId" />
  9874 + <ScalarProperty Name="CountryId" ColumnName="CountryId" />
  9875 + <ScalarProperty Name="IsMaster" ColumnName="IsMaster" />
  9876 + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" />
  9877 + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" />
  9878 + <ScalarProperty Name="InstituteName" ColumnName="InstituteName" />
  9879 + <ScalarProperty Name="Department" ColumnName="Department" />
  9880 + <ScalarProperty Name="UserId" ColumnName="UserId" />
  9881 + <ScalarProperty Name="FirstName" ColumnName="FirstName" />
  9882 + <ScalarProperty Name="EmailId" ColumnName="EmailId" />
  9883 + <ScalarProperty Name="IsActive" ColumnName="IsActive" />
  9884 + </ComplexTypeMapping>
  9885 + </ResultMapping>
  9886 + </FunctionImportMapping>
  9887 + <FunctionImportMapping FunctionImportName="usp_GetSiteAccountEditions" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteAccountEditions">
  9888 + <ResultMapping>
  9889 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteAccountEditions_Result">
  9890 + <ScalarProperty Name="LicenseEditionId" ColumnName="LicenseEditionId" />
  9891 + <ScalarProperty Name="Id" ColumnName="Id" />
  9892 + <ScalarProperty Name="Title" ColumnName="Title" />
  9893 + </ComplexTypeMapping>
  9894 + </ResultMapping>
  9895 + </FunctionImportMapping>
  9896 + <FunctionImportMapping FunctionImportName="usp_DeleteSiteAccount" FunctionName="AIADatabaseV5Model.Store.usp_DeleteSiteAccount" />
  9897 + <FunctionImportMapping FunctionImportName="usp_InsertSubscriptionPlan" FunctionName="AIADatabaseV5Model.Store.usp_InsertSubscriptionPlan" />
  9898 + <FunctionImportMapping FunctionImportName="usp_InsertUpdateSiteAccount" FunctionName="AIADatabaseV5Model.Store.usp_InsertUpdateSiteAccount" />
  9899 + <FunctionImportMapping FunctionImportName="usp_GetLicenseUserGroups" FunctionName="AIADatabaseV5Model.Store.usp_GetLicenseUserGroups">
  9900 + <ResultMapping>
  9901 + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetLicenseUserGroups_Result">
  9902 + <ScalarProperty Name="Id" ColumnName="Id" />
  9903 + <ScalarProperty Name="Title" ColumnName="Title" />
  9904 + <ScalarProperty Name="LicenseId" ColumnName="LicenseId" />
  9905 + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" />
  9906 + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" />
  9907 + <ScalarProperty Name="IsActive" ColumnName="IsActive" />
  9908 + <ScalarProperty Name="TotalUsers" ColumnName="TotalUsers" />
  9909 + </ComplexTypeMapping>
  9910 + </ResultMapping>
  9911 + </FunctionImportMapping>
  9912 + <FunctionImportMapping FunctionImportName="usp_InsertUpdateLicenseUserGroup" FunctionName="AIADatabaseV5Model.Store.usp_InsertUpdateLicenseUserGroup" />
  9913 + <FunctionImportMapping FunctionImportName="usp_InsertDeleteUserManageRights" FunctionName="AIADatabaseV5Model.Store.usp_InsertDeleteUserManageRights" />
  9914 + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseUserGroupUsers" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseUserGroupUsers" />
  9915 + <FunctionImportMapping FunctionImportName="usp_DeleteLicenseUserGroup" FunctionName="AIADatabaseV5Model.Store.usp_DeleteLicenseUserGroup" />
9644 9916 </EntityContainerMapping>
9645 9917 </Mapping>
9646 9918 </edmx:Mappings>
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseModestySettings_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetLicenseModestySettings_Result
  15 + {
  16 + public string Title { get; set; }
  17 + public Nullable<bool> IsModesty { get; set; }
  18 + public int LicenseEditionId { get; set; }
  19 + }
  20 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseUserGroups_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetLicenseUserGroups_Result
  15 + {
  16 + public int Id { get; set; }
  17 + public string Title { get; set; }
  18 + public int LicenseId { get; set; }
  19 + public System.DateTime CreationDate { get; set; }
  20 + public Nullable<System.DateTime> ModifiedDate { get; set; }
  21 + public bool IsActive { get; set; }
  22 + public Nullable<int> TotalUsers { get; set; }
  23 + }
  24 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountEditions_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetSiteAccountEditions_Result
  15 + {
  16 + public int LicenseEditionId { get; set; }
  17 + public byte Id { get; set; }
  18 + public string Title { get; set; }
  19 + }
  20 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteById_Result.cs 0 → 100644
  1 +//------------------------------------------------------------------------------
  2 +// <auto-generated>
  3 +// This code was generated from a template.
  4 +//
  5 +// Manual changes to this file may cause unexpected behavior in your application.
  6 +// Manual changes to this file will be overwritten if the code is regenerated.
  7 +// </auto-generated>
  8 +//------------------------------------------------------------------------------
  9 +
  10 +namespace AIAHTML5.ADMIN.API.Entity
  11 +{
  12 + using System;
  13 +
  14 + public partial class usp_GetSiteById_Result
  15 + {
  16 + public int Id { get; set; }
  17 + public string SiteIp { get; set; }
  18 + public string Title { get; set; }
  19 + public string SiteIPTo { get; set; }
  20 + public string SiteMasterIPTo { get; set; }
  21 + public string Address1 { get; set; }
  22 + public string Address2 { get; set; }
  23 + public string Zip { get; set; }
  24 + public string Phone { get; set; }
  25 + public string City { get; set; }
  26 + public Nullable<int> StateId { get; set; }
  27 + public Nullable<int> CountryId { get; set; }
  28 + public bool IsMaster { get; set; }
  29 + public string CreationDate { get; set; }
  30 + public string ModifiedDate { get; set; }
  31 + public string InstituteName { get; set; }
  32 + public string Department { get; set; }
  33 + public int UserId { get; set; }
  34 + public string FirstName { get; set; }
  35 + public string EmailId { get; set; }
  36 + public Nullable<bool> IsActive { get; set; }
  37 + }
  38 +}
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
1 1 using System;
2 2 using System.Collections.Generic;
3 3 using System.Linq;
  4 +using Newtonsoft.Json;
  5 +using Newtonsoft.Json.Linq;
4 6 using System.Web;
5 7 using AIAHTML5.ADMIN.API.Entity;
6 8  
... ... @@ -104,14 +106,14 @@ namespace AIAHTML5.ADMIN.API.Models
104 106 return LicenseList;
105 107 }
106 108  
107   - public static List<Tuple<int, string>> GetLicenseAccounts(AIADatabaseV5Entities dbContext)
  109 + public static List<Tuple<int, string>> GetLicenseAccounts(AIADatabaseV5Entities dbContext, int LicenseType)
108 110 {
109 111 List<Tuple<int, string>> LicenseAccountList = new List<Tuple<int, string>>();
110 112 Tuple<int, string> LicenseAccountObj;
111 113 int i = 0;
112 114 try
113 115 {
114   - var result = dbContext.usp_GetAccountNumber().ToList();
  116 + var result = dbContext.usp_GetAccountNumber(LicenseType).ToList();
115 117 if (result.Count > 0)
116 118 {
117 119 foreach (var item in result)
... ... @@ -174,6 +176,61 @@ namespace AIAHTML5.ADMIN.API.Models
174 176 return LicenseObj;
175 177 }
176 178  
  179 + public static List<SiteModel> GetLicenseSites(AIADatabaseV5Entities dbContext, string AccountNo)
  180 + {
  181 + List<SiteModel> LicenseSiteList = new List<SiteModel>();
  182 + SiteModel SiteModelObj = new SiteModel();
  183 + try
  184 + {
  185 + var result = dbContext.GetSiteAccoutDetail(AccountNo).ToList();
  186 + if (result.Count > 0)
  187 + {
  188 + foreach (var item in result)
  189 + {
  190 + SiteModelObj = new SiteModel();
  191 + SiteModelObj.Id = item.Id;
  192 + SiteModelObj.Ip = item.SiteIp;
  193 + SiteModelObj.SiteIpTo = item.SiteIPTo;
  194 + SiteModelObj.MasterIpTo = item.SiteMasterIPTo;
  195 + SiteModelObj.InstituteName = item.InstituteName;
  196 + SiteModelObj.Department = item.Department;
  197 + SiteModelObj.SiteUserId = item.UserId;
  198 + SiteModelObj.SiteUserEmailId = item.EmailId;
  199 + SiteModelObj.SiteUserFirstName = item.FirstName;
  200 + SiteModelObj.Title = item.Title;
  201 + SiteModelObj.CreationDate = DateTime.ParseExact(item.CreationDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  202 + SiteModelObj.ModifiedDate = DateTime.ParseExact(item.ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  203 + LicenseSiteList.Add(SiteModelObj);
  204 + }
  205 + }
  206 + }
  207 + catch (Exception ex) { }
  208 + return LicenseSiteList;
  209 + }
  210 +
  211 + public static List<Tuple<int, bool, string>> GetLicenseModestySettings(AIADatabaseV5Entities dbContext, int LicenseId, int BuildingLevelId)
  212 + {
  213 + List<Tuple<int, bool, string>> LicenseModestyList = new List<Tuple<int, bool, string>>();
  214 + Tuple<int, bool, string> LicenseModestyObj;
  215 + int i = 0;
  216 + try
  217 + {
  218 + var result = dbContext.usp_GetLicenseModestySettings(LicenseId, BuildingLevelId).ToList();
  219 + if (result.Count > 0)
  220 + {
  221 + foreach (var item in result)
  222 + {
  223 + LicenseModestyObj = new Tuple<int, bool, string>(item.LicenseEditionId, (bool)item.IsModesty, item.Title);
  224 + LicenseModestyList.Add(LicenseModestyObj);
  225 + i++;
  226 + if (i >= 100) break;
  227 + }
  228 + }
  229 + }
  230 + catch (Exception ex) { }
  231 + return LicenseModestyList;
  232 + }
  233 +
177 234 public static bool InsertLicense(AIADatabaseV5Entities dbContext, LicenseModel licenseModel)
178 235 {
179 236 bool status = false;
... ... @@ -308,6 +365,62 @@ namespace AIAHTML5.ADMIN.API.Models
308 365 }
309 366 }
310 367  
  368 + public static bool UpdateLicenseModestySettings(AIADatabaseV5Entities dbContext, List<Tuple<int, int, bool>> LicenseModestyList)
  369 + {
  370 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  371 + try
  372 + {
  373 + foreach (var item in LicenseModestyList)
  374 + {
  375 + dbContext.usp_UpdateLicenseModestySettings(item.Item1, item.Item2, item.Item3, spStatus);
  376 + if (!(bool)spStatus.Value) break;
  377 + }
  378 + return (bool)spStatus.Value;
  379 + }
  380 + catch (Exception ex)
  381 + {
  382 + return false;
  383 + }
  384 + }
  385 +
  386 + public static List<Tuple<int, bool, string>> GetLicenseModulesStatus(AIADatabaseV5Entities dbContext, int LicenseId)
  387 + {
  388 + List<Tuple<int, bool, string>> LicenseModulesStatusList = new List<Tuple<int, bool, string>>();
  389 + Tuple<int, bool, string> LicenseModuleStatusObj;
  390 + try
  391 + {
  392 + var result = dbContext.GetModuleStatusByLicenseId(LicenseId).ToList();
  393 + if (result.Count > 0)
  394 + {
  395 + foreach (var item in result)
  396 + {
  397 + LicenseModuleStatusObj = new Tuple<int, bool, string>(item.Id, (bool)item.Status, item.Title);
  398 + LicenseModulesStatusList.Add(LicenseModuleStatusObj);
  399 + }
  400 + }
  401 + }
  402 + catch (Exception ex) { }
  403 + return LicenseModulesStatusList;
  404 + }
  405 +
  406 + public static bool UpdateLicenseModulesStatus(AIADatabaseV5Entities dbContext, List<Tuple<int, int, bool>> LicenseModuleStatusList)
  407 + {
  408 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  409 + try
  410 + {
  411 + foreach (var item in LicenseModuleStatusList)
  412 + {
  413 + dbContext.usp_UpdateLicenseModuleStatus(item.Item1, item.Item2, item.Item3, spStatus);
  414 + if (!(bool)spStatus.Value) break;
  415 + }
  416 + return (bool)spStatus.Value;
  417 + }
  418 + catch (Exception ex)
  419 + {
  420 + return false;
  421 + }
  422 + }
  423 +
311 424 }
312 425  
313 426 public class LicenseTypeModel
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SiteModel.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Web;
  5 +using AIAHTML5.ADMIN.API.Entity;
  6 +
  7 +namespace AIAHTML5.ADMIN.API.Models
  8 +{
  9 + public class SiteModel
  10 + {
  11 + public int Id { get; set; }
  12 + public int LicenseId { get; set; }
  13 + public string Ip { get; set; }
  14 + public string Title { get; set; }
  15 + public string SiteIpTo { get; set; }
  16 + public string MasterIpTo { get; set; }
  17 + public DateTime CreationDate { get; set; }
  18 + public DateTime ModifiedDate { get; set; }
  19 + public string InstituteName { get; set; }
  20 + public string City { get; set; }
  21 + public string Zip { get; set; }
  22 + public string Phone { get; set; }
  23 + public string Address1 { get; set; }
  24 + public string Address2 { get; set; }
  25 + public int? StateId { get; set; }
  26 + public int? CountryId { get; set; }
  27 + public string Department { get; set; }
  28 + public int SiteUserId { get; set; }
  29 + public string SiteUserFirstName { get; set; }
  30 + public string SiteUserEmailId { get; set; }
  31 + public bool? IsActive { get; set; }
  32 + public bool IsMaster { get; set; }
  33 + public bool? IsModesty { get; set; }
  34 + public string SiteEditionIds { get; set; }
  35 +
  36 + public static SiteModel GetSiteById(AIADatabaseV5Entities dbContext, int SiteId)
  37 + {
  38 + LicenseModel LicenseObj = new LicenseModel();
  39 + SiteModel SiteModelObj = new SiteModel();
  40 + try
  41 + {
  42 + var result = dbContext.usp_GetSiteById(SiteId).ToList();
  43 + SiteModelObj.Id = result[0].Id;
  44 + SiteModelObj.Ip = result[0].SiteIp;
  45 + SiteModelObj.SiteIpTo = result[0].SiteIPTo;
  46 + SiteModelObj.MasterIpTo = result[0].SiteMasterIPTo;
  47 + SiteModelObj.InstituteName = result[0].InstituteName;
  48 + SiteModelObj.Department = result[0].Department;
  49 + SiteModelObj.City = result[0].City;
  50 + SiteModelObj.Phone = result[0].Phone;
  51 + SiteModelObj.Zip = result[0].Zip;
  52 + SiteModelObj.Address1 = result[0].Address1;
  53 + SiteModelObj.Address2 = result[0].Address2;
  54 + SiteModelObj.CountryId = result[0].CountryId;
  55 + SiteModelObj.StateId = result[0].StateId;
  56 + SiteModelObj.SiteUserId = result[0].UserId;
  57 + SiteModelObj.SiteUserEmailId = result[0].EmailId;
  58 + SiteModelObj.IsMaster = result[0].IsMaster;
  59 + SiteModelObj.IsActive = result[0].IsActive;
  60 + SiteModelObj.SiteUserFirstName = result[0].FirstName;
  61 + SiteModelObj.Title = result[0].Title;
  62 + SiteModelObj.CreationDate = DateTime.ParseExact(result[0].CreationDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  63 + SiteModelObj.ModifiedDate = DateTime.ParseExact(result[0].ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
  64 + }
  65 + catch (Exception ex) { }
  66 + return SiteModelObj;
  67 + }
  68 +
  69 + public static List<Tuple<int, int, string>> GetSiteAccountEditions(AIADatabaseV5Entities dbContext, int SiteId, int LicenseId)
  70 + {
  71 + List<Tuple<int, int, string>> SiteAccountEditionList = new List<Tuple<int, int, string>>();
  72 + Tuple<int, int, string> SiteEditionObj;
  73 + try
  74 + {
  75 + var result = dbContext.usp_GetSiteAccountEditions(SiteId, LicenseId).ToList();
  76 + if (result.Count > 0)
  77 + {
  78 + foreach (var item in result)
  79 + {
  80 + SiteEditionObj = new Tuple<int, int, string>(item.LicenseEditionId, item.Id, item.Title);
  81 + SiteAccountEditionList.Add(SiteEditionObj);
  82 + }
  83 + }
  84 + }
  85 + catch (Exception ex) { }
  86 + return SiteAccountEditionList;
  87 + }
  88 +
  89 + public static bool InsertUpdateSiteAccount(AIADatabaseV5Entities dbContext, SiteModel SiteEntity)
  90 + {
  91 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  92 + try
  93 + {
  94 + dbContext.usp_InsertUpdateSiteAccount(SiteEntity.Id, SiteEntity.Ip, SiteEntity.Title,
  95 + SiteEntity.InstituteName, SiteEntity.Department, SiteEntity.Address1, SiteEntity.Address2,
  96 + SiteEntity.City, SiteEntity.Zip, SiteEntity.Phone, SiteEntity.StateId, SiteEntity.CountryId,
  97 + SiteEntity.IsMaster, SiteEntity.CreationDate, SiteEntity.ModifiedDate, SiteEntity.IsActive,
  98 + SiteEntity.SiteUserId, SiteEntity.SiteIpTo, SiteEntity.LicenseId, SiteEntity.SiteEditionIds, spStatus);
  99 + return (bool)spStatus.Value;
  100 + }
  101 + catch (Exception ex)
  102 + {
  103 + return false;
  104 + }
  105 + }
  106 +
  107 + public static bool DeleteSiteAccount(AIADatabaseV5Entities dbContext, int SiteId, int LicenseId, int UserId)
  108 + {
  109 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  110 + try
  111 + {
  112 + dbContext.usp_DeleteSiteAccount(SiteId, LicenseId, UserId, spStatus);
  113 + return (bool)spStatus.Value;
  114 + }
  115 + catch (Exception ex)
  116 + {
  117 + return false;
  118 + }
  119 + }
  120 +
  121 + }
  122 +
  123 +}
0 124 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs 0 → 100644
  1 +using System;
  2 +using System.Collections.Generic;
  3 +using System.Linq;
  4 +using System.Web;
  5 +using AIAHTML5.ADMIN.API.Entity;
  6 +
  7 +namespace AIAHTML5.ADMIN.API.Models
  8 +{
  9 + public class UserGroupModel
  10 + {
  11 + public int Id { get; set; }
  12 + public int LicenseId { get; set; }
  13 + public string Title { get; set; }
  14 + public DateTime? CreationDate { get; set; }
  15 + public DateTime? ModifiedDate { get; set; }
  16 + public bool? IsActive { get; set; }
  17 + public int? TotalUsers { get; set; }
  18 +
  19 + public static List<UserGroupModel> GetLicenseUserGroups(AIADatabaseV5Entities dbContext, int LicenseId)
  20 + {
  21 + List<UserGroupModel> UserGroupList = new List<UserGroupModel>();
  22 + UserGroupModel UserGroupObj = new UserGroupModel();
  23 + try
  24 + {
  25 + var result = dbContext.usp_GetLicenseUserGroups(LicenseId).ToList();
  26 + foreach (var item in result)
  27 + {
  28 + UserGroupObj = new UserGroupModel();
  29 + UserGroupObj.Id = item.Id;
  30 + UserGroupObj.LicenseId = item.LicenseId;
  31 + UserGroupObj.Title = item.Title;
  32 + UserGroupObj.IsActive = item.IsActive;
  33 + UserGroupObj.ModifiedDate = item.ModifiedDate;
  34 + UserGroupObj.CreationDate = item.CreationDate;
  35 + UserGroupObj.TotalUsers = item.TotalUsers;
  36 + UserGroupList.Add(UserGroupObj);
  37 + }
  38 + }
  39 + catch (Exception ex) { }
  40 + return UserGroupList;
  41 + }
  42 +
  43 + public static List<UserModel> GetLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int LicenseId, int UserGroupId)
  44 + {
  45 + List<UserModel> UserList = new List<UserModel>();
  46 + UserModel UserModelObj = new UserModel();
  47 + try
  48 + {
  49 + var result = dbContext.GetAllUserWithGroup(LicenseId, UserGroupId).ToList();
  50 + foreach (var item in result)
  51 + {
  52 + UserModelObj = new UserModel();
  53 + UserModelObj.Id = item.Id;
  54 + UserModelObj.FirstName = item.FirstName;
  55 + UserModelObj.LastName = item.LastName;
  56 + UserModelObj.LoginId = item.LoginId;
  57 + UserModelObj.EmailId = item.EmailId;
  58 + UserModelObj.ProductEdition = item.Title;
  59 + UserModelObj.InGroup = item.InGroup;
  60 + UserList.Add(UserModelObj);
  61 + }
  62 + }
  63 + catch (Exception ex) { }
  64 + return UserList;
  65 + }
  66 +
  67 + public static bool InsertUpdateLicenseUserGroup(AIADatabaseV5Entities dbContext, UserGroupModel UserGroupEntity)
  68 + {
  69 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  70 + try
  71 + {
  72 + dbContext.usp_InsertUpdateLicenseUserGroup(UserGroupEntity.Id, UserGroupEntity.LicenseId, UserGroupEntity.Title,
  73 + UserGroupEntity.CreationDate, UserGroupEntity.ModifiedDate, UserGroupEntity.IsActive, spStatus);
  74 + return (bool)spStatus.Value;
  75 + }
  76 + catch (Exception ex)
  77 + {
  78 + return false;
  79 + }
  80 + }
  81 +
  82 + public static bool UpdateLicenseUserGroupUsers(AIADatabaseV5Entities dbContext, int UserGroupId, string UserIds)
  83 + {
  84 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  85 + try
  86 + {
  87 + dbContext.usp_UpdateLicenseUserGroupUsers(UserGroupId, UserIds, spStatus);
  88 + return (bool)spStatus.Value;
  89 + }
  90 + catch (Exception ex)
  91 + {
  92 + return false;
  93 + }
  94 + }
  95 +
  96 + public static bool DeleteLicenseUserGroup(AIADatabaseV5Entities dbContext, int UserGroupId)
  97 + {
  98 + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
  99 + try
  100 + {
  101 + dbContext.usp_DeleteLicenseUserGroup(UserGroupId, spStatus);
  102 + return (bool)spStatus.Value;
  103 + }
  104 + catch (Exception ex)
  105 + {
  106 + return false;
  107 + }
  108 + }
  109 +
  110 + }
  111 +
  112 +}
0 113 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserModel.cs
... ... @@ -24,6 +24,8 @@ namespace AIAHTML5.ADMIN.API.Models
24 24 public DateTime ModifiedDate { get; set; }
25 25 public int UserTypeId { get; set; }
26 26 public bool IsActive { get; set; }
  27 + public string ProductEdition { get; set; }
  28 + public int InGroup { get; set; }
27 29  
28 30 public static bool UpdateUserProfile(AIADatabaseV5Entities dbContext, int intUserID, string strFirstName, string strLastName, string strEmailID)
29 31 {
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.component.ts
... ... @@ -3,11 +3,12 @@ import { UserService } from &#39;./components/UserEntity/user.service&#39;;
3 3 import { ManageDiscountCodeService } from './components/ManageDiscountCode/managediscountcode.service';
4 4 import { SubscriptionPriceService } from './components/SubscriptionPrice/subscriptionprice.service';
5 5 import { LicenseService } from './components/LicenseEntity/license.service';
  6 +import { ReportService } from './components/Reports/report.service';
6 7  
7 8 @Component({
8 9 selector: 'app-component',
9 10 templateUrl: '../app/app.component.html',
10   - providers: [UserService, ManageDiscountCodeService, SubscriptionPriceService, LicenseService]
  11 + providers: [UserService, ManageDiscountCodeService, SubscriptionPriceService, LicenseService, ReportService]
11 12 })
12 13  
13 14 export class AppComponent implements OnInit {
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
  1 +
  2 +
1 3 import { FormsModule, ReactiveFormsModule } from '@angular/forms';
2 4 import { BrowserModule } from '@angular/platform-browser';
3 5 import { NgModule } from '@angular/core';
... ... @@ -13,11 +15,25 @@ import { ChangeUserPassword } from &#39;./components/UserEntity/changeuserpassword.c
13 15 import { ChangeUserID } from './components/UserEntity/changeuserid.component';
14 16 import { UsersList } from './components/UserEntity/users.component';
15 17 import { AddUser } from './components/UserEntity/adduser.component';
  18 +import { UnblockUser } from './components/UserEntity/unblockuser.component';
16 19 import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
17 20 import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
18 21 import { SearchLicense } from './components/LicenseEntity/searchlicense.component';
19 22 import { AddLicense } from './components/LicenseEntity/addlicense.component';
  23 +import { UsageReport } from './components/Reports/usagereport.component';
  24 +import { CustomerSummaryReport } from './components/Reports/customersummaryreport.component';
  25 +import { ExpiringSubscriptionReport } from './components/Reports/expiringsubscriptionreport.component';
  26 +import { SubscriptionReport } from './components/Reports/subscriptionreport.component';
  27 +import { SubscriptionCancellationReport } from './components/Reports/subscriptioncancellationreport.component';
  28 +import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionreport.component';
  29 +import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component';
  30 +import { DiscountCodeReport } from './components/Reports/discountcodereport.component';
  31 +import { ImageExportReport } from './components/Reports/imageexportreport.component';
20 32 import { EditLicenseBasicSettings } from './components/LicenseEntity/editlicensebasicsettings.component';
  33 +import { LicenseModestySettings } from './components/LicenseEntity/licensemodestysettings.component';
  34 +import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component';
  35 +import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component';
  36 +import { UserGroup } from './components/UserEntity/usergroup.component';
21 37  
22 38 import { AppComponent } from './app.component';
23 39 import { AppRoutingModule } from './app.routing.module';
... ... @@ -30,22 +46,28 @@ import { ConfirmComponent } from &quot;./Shared/Confirm/confirm.component&quot;
30 46 import { BsDatepickerModule, ModalModule } from 'ngx-bootstrap';
31 47 import { BsModalService } from 'ngx-bootstrap/modal';
32 48 import { ContenteditableModelDirective } from './shared/contenteditabledirective';
  49 +import { LoadingService } from './shared/loading.service';
33 50  
34 51 @NgModule({
35 52 declarations: [
36 53 ChangeUserPassword, ChangeUserID,
37 54 UpdateUserProfile, UsersList,
38   - ManageDiscountCode, AddUser,
  55 + ManageDiscountCode, AddUser, UnblockUser,
39 56 AppComponent, ConfirmComponent,
40   - SubscriptionPrice, ManageDiscountCode,
41   - SearchLicense, AddLicense,
42   - EditLicenseBasicSettings, ContenteditableModelDirective
  57 + SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective,
  58 + AddLicense, SearchLicense,
  59 + UsageReport, CustomerSummaryReport,
  60 + ExpiringSubscriptionReport, SubscriptionReport,
  61 + SubscriptionCancellationReport, NetAdSubscriptionReport,
  62 + SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport,
  63 + EditLicenseBasicSettings, LicenseModestySettings,
  64 + LicenseModuleSettings, SiteLicenseAccount, UserGroup
43 65 ],
44 66 imports: [
45 67 BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule,
46   - BsDatepickerModule.forRoot(), ModalModule.forRoot()
  68 + BsDatepickerModule.forRoot(), ModalModule.forRoot()//ModalModule.forRoot()
47 69 ],
48   - providers: [GlobalService, ConfirmService, BsModalService,
  70 + providers: [GlobalService, ConfirmService, BsModalService, LoadingService,
49 71 //AuthService,
50 72 //AuthGuard,
51 73 //{
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.routing.module.ts
... ... @@ -4,12 +4,26 @@ import { UpdateUserProfile } from &#39;./components/UserEntity/updateuserprofile.com
4 4 import { ChangeUserPassword } from './components/UserEntity/changeuserpassword.component';
5 5 import { ChangeUserID } from './components/UserEntity/changeuserid.component';
6 6 import { UsersList } from './components/UserEntity/users.component';
  7 +import { UnblockUser } from './components/UserEntity/unblockuser.component';
7 8 import { ManageDiscountCode } from './components/ManageDiscountCode/managediscountcode.component';
8 9 import { SubscriptionPrice } from './components/SubscriptionPrice/subscriptionprice.component';
9 10 import { AddUser } from './components/UserEntity/adduser.component';
10 11 import { SearchLicense } from './components/LicenseEntity/searchlicense.component';
11 12 import { AddLicense } from './components/LicenseEntity/addlicense.component';
  13 +import { UsageReport } from './components/Reports/usagereport.component';
  14 +import { CustomerSummaryReport } from './components/Reports/customersummaryreport.component';
  15 +import { ExpiringSubscriptionReport } from './components/Reports/expiringsubscriptionreport.component';
  16 +import { SubscriptionReport } from './components/Reports/subscriptionreport.component';
  17 +import { SubscriptionCancellationReport } from './components/Reports/subscriptioncancellationreport.component';
  18 +import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionreport.component';
  19 +import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component';
  20 +import { DiscountCodeReport } from './components/Reports/discountcodereport.component';
  21 +import { ImageExportReport } from './components/Reports/imageexportreport.component';
12 22 import { EditLicenseBasicSettings } from './components/LicenseEntity/editlicensebasicsettings.component';
  23 +import { LicenseModestySettings } from './components/LicenseEntity/licensemodestysettings.component';
  24 +import { LicenseModuleSettings } from './components/LicenseEntity/licensemodulesettings.component';
  25 +import { SiteLicenseAccount } from './components/LicenseEntity/sitelicenseaccount.component';
  26 +import { UserGroup } from './components/UserEntity/usergroup.component';
13 27  
14 28 const appRoutes: Routes = [
15 29 //{ path: '', redirectTo:'updateuserprofile',pathMatch }
... ... @@ -20,10 +34,25 @@ const appRoutes: Routes = [
20 34 { path: 'managediscountcode', component: ManageDiscountCode },
21 35 { path: 'subscriptionprice', component: SubscriptionPrice },
22 36 { path: 'adduser', component: AddUser },
  37 + { path: 'unblockuser', component: UnblockUser },
23 38 { path: 'searchlicense', component: SearchLicense },
24 39 { path: 'addlicense', component: AddLicense },
25 40 { path: 'editlicense', component: AddLicense },
  41 + { path: 'usagereport', component: UsageReport },
  42 + { path: 'customersummaryreport', component: CustomerSummaryReport },
  43 + { path: 'expiringsubscriptionreport', component: ExpiringSubscriptionReport },
  44 + { path: 'subscriptionreport', component: SubscriptionReport },
  45 + { path: 'subscriptioncancellationreport', component: SubscriptionCancellationReport },
  46 + { path: 'netadsubscriptionreport', component: NetAdSubscriptionReport },
  47 + { path: 'sitelicenseusagereport', component: SiteLicenseUsageReport },
  48 + { path: 'discountcodereport', component: DiscountCodeReport },
  49 + { path: 'imageexportreport', component: ImageExportReport },
26 50 { path: 'editlicensebasicsettings', component: EditLicenseBasicSettings },
  51 + { path: 'licensemodestysettings', component: LicenseModestySettings },
  52 + { path: 'licensemodulesettings', component: LicenseModuleSettings },
  53 + { path: 'sitelicenseaccount', component: SiteLicenseAccount },
  54 + { path: 'usergroup', component: UserGroup }
  55 +
27 56 ];
28 57  
29 58 @NgModule({
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/ManageDiscountCode/managediscountcode.component.ts
1 1 import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core';
2 2 import { ManageDiscountCodeService } from './managediscountcode.service';
3 3 import { Router } from '@angular/router';
4   -import { FormControl, FormBuilder, FormGroup, Validators, ValidationErrors } from '@angular/forms';
  4 +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms';
5 5 import { DiscountCode } from '../UserEntity/datamodel';
6 6 import { BsDatepickerModule } from 'ngx-bootstrap';
7 7 import { Http, Response } from '@angular/http';
8 8 import { DatePipe } from '@angular/common';
9 9 import { BsModalService } from 'ngx-bootstrap/modal';
10 10 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
  11 +import { ConfirmService } from '../../Shared/Confirm/confirm.service';
11 12  
12 13 @Component({
13 14 templateUrl: './managediscountcode.component.html'
... ... @@ -34,7 +35,7 @@ bsValue4: Date = new Date();
34 35 selectedId: number = 0;
35 36 modalRef: BsModalRef;
36 37  
37   -constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router, private fb: FormBuilder, private modalService: BsModalService) { }
  38 +constructor(private manageDiscountCodeService: ManageDiscountCodeService, private router: Router, private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { }
38 39  
39 40 ngOnInit(): void {
40 41 this.divClass = 'col-sm-12';
... ... @@ -42,7 +43,7 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
42 43 this.alerts = '';
43 44 this.manageDiscountCodeFrm = this.fb.group({
44 45 searchDiscountCode: [''],
45   - searchStartDate: ['', CustomValidators.DateValidator],
  46 + searchStartDate: [''],
46 47 searchEndDate: [''],
47 48 discountCodes: this.fb.array([])
48 49 });
... ... @@ -105,7 +106,8 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
105 106  
106 107 AfterInsertData(data, template) {
107 108 if (data.Status == "false") {
108   - this.alerts = "<span>Discount code save unsuccessfull</span>";
  109 + //this.alerts = "<span>Discount code save unsuccessfull</span>";
  110 + this._confirmService.activate("Discount code insert unsuccessfull", "alertMsg");
109 111 } else {
110 112 this.modalAlerts = "<p>Discount code saved successfully</p>";
111 113 this.modalRef = this.modalService.show(template);
... ... @@ -114,7 +116,8 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
114 116  
115 117 AfterUpdateData(data, template) {
116 118 if (data.Status == "false") {
117   - this.alerts = "<span>Discount code update unsuccessfull</span>";
  119 + //this.alerts = "<span>Discount code update unsuccessfull</span>";
  120 + this._confirmService.activate("Discount code update unsuccessfull", "alertMsg");
118 121 } else {
119 122 this.modalAlerts = "<p>Discount code updated successfully</p>";
120 123 this.modalRef = this.modalService.show(template);
... ... @@ -169,26 +172,3 @@ constructor(private manageDiscountCodeService: ManageDiscountCodeService, privat
169 172 this.SetClickedRow(this.selectedRow, this.manageDiscountCodeFrm.controls['discountCodes'].value.find(C => C.Id == this.selectedId));
170 173 }
171 174 }
172   -
173   -export class CustomValidators {
174   -
175   - static DateValidator(control: FormControl): ValidationErrors {
176   - var isValid: boolean = true;
177   - var DateRegex = '[0-9]{1,2}[/][0-9]{1,2}[/][0-9]{4}';
178   - if (!control.value.match(/DateRegex/)) {
179   - isValid = false;
180   - }
181   - var numValue = control.value.split('/');
182   - if(parseInt(numValue[0]) > 12 && parseInt(numValue[0]) < 1){
183   - isValid = false;
184   - }
185   - if(parseInt(numValue[1]) > 31 && parseInt(numValue[1]) < 1){
186   - isValid = false;
187   - }
188   - if(parseInt(numValue[2]) < 1){
189   - isValid = false;
190   - }
191   - return isValid ? null : { 'InvalidDate': 'Date is invalid' };
192   - }
193   -
194   -}
195 175 \ No newline at end of file
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
... ... @@ -31,6 +31,7 @@
31 31 <div class="modal-body" [innerHTML]="modalAlerts">
32 32 </div>
33 33 <div class="modal-footer">
  34 + <button type="button" class="btn btn-primary btn-sm" (click)="modalRef.hide()" >Ok</button>
34 35 </div>
35 36 </ng-template>
36 37  
... ...
400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.ts
... ... @@ -10,6 +10,7 @@ import { DatePipe } from &#39;@angular/common&#39;;
10 10 import { ContenteditableModelDirective } from '../../shared/contenteditabledirective'
11 11 import { BsModalService } from 'ngx-bootstrap/modal';
12 12 import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service';
  13 +import { ConfirmService } from '../../Shared/Confirm/confirm.service';
13 14 //import { Global } from '../../Shared/global';
14 15 //import { DBOperation } from 'S';
15 16 //import { Observable } from 'rxjs/Observable';
... ... @@ -35,7 +36,7 @@ selectedEditionId: number = 1;
35 36 divClass: string = '';
36 37 modalRef: BsModalRef;
37 38  
38   -constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private fb: FormBuilder, private modalService: BsModalService) { }
  39 +constructor(private subscriptionPriceService: SubscriptionPriceService, private router: Router, private _confirmService: ConfirmService, private fb: FormBuilder, private modalService: BsModalService) { }
39 40  
40 41 ngOnInit(): void {
41 42 this.divClass = 'col-sm-12';
... ... @@ -80,7 +81,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
80 81  
81 82 AfterDeleteData(data, template) {
82 83 if (data.Status == "false") {
83   - this.alerts = "<span>Subscription prices delete unsuccessfull</span>";
  84 + //this.alerts = "<span>Subscription prices delete unsuccessfull</span>";
  85 + this._confirmService.activate("Subscription prices delete unsuccessfull", "alertMsg");
84 86 } else {
85 87 this.modalAlerts = "<p>Subscription prices deleted successfully</p>";
86 88 this.modalRef = this.modalService.show(template);
... ... @@ -90,7 +92,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
90 92  
91 93 AfterInsertData(data, template) {
92 94 if (data.Status == "false") {
93   - this.alerts = "<span>Subscription price save unsuccessfull</span>";
  95 + // this.alerts = "<span>Subscription price save unsuccessfull</span>";
  96 + this._confirmService.activate("Subscription prices insert unsuccessfull", "alertMsg");
94 97 } else {
95 98 this.modalAlerts = "<p>Subscription price saved successfully</p>";
96 99 this.modalRef = this.modalService.show(template);
... ... @@ -99,7 +102,8 @@ constructor(private subscriptionPriceService: SubscriptionPriceService, private
99 102  
100 103 AfterUpdateData(data, template) {
101 104 if (data.Status == "false") {
102   - this.alerts = "<span>Subscription prices update unsuccessfull</span>\n";
  105 + //this.alerts = "<span>Subscription prices update unsuccessfull</span>\n";
  106 + this._confirmService.activate("Subscription prices update unsuccessfull", "alertMsg");
103 107 } else {
104 108 this.modalAlerts = "<p>Subscription prices updated successfully</p>";
105 109 this.modalRef = this.modalService.show(template);
... ...