Commit d8f491a895ad8d5f2c5e73b70726ece2bc213427
Merge branch 'Develop-IPAD-MAC' of http://gitlab.ebix.com/ADAM/AIAHTML5 into Develop-IPAD-MAC
Showing
60 changed files
with
3687 additions
and
673 deletions
150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetSearchUserList.sql
0 โ 100644
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/usp_GetAccountNumber.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_GetAccountNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | |
7 | +drop procedure [dbo].[usp_GetAccountNumber] | |
8 | +GO | |
9 | + | |
10 | +-- ==================================================== | |
11 | +-- Author: Magic Software | |
12 | +-- Create date: 23-Dec-2009 | |
13 | +-- Description: To get the license id and account no of licenses of a type | |
14 | +-- ==================================================== | |
15 | +CREATE PROCEDURE [dbo].[usp_GetAccountNumber] | |
16 | + -- Add the parameters for the stored procedure here | |
17 | + @LicenseType 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 | + 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 | |
33 | +END | |
34 | + | |
35 | +GO | |
36 | +SET QUOTED_IDENTIFIER OFF | |
37 | +GO | |
38 | +SET ANSI_NULLS ON | |
39 | +GO | |
40 | + | ... | ... |
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_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_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_UpdateLicenseBasicSettings.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_UpdateLicenseBasicSettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | |
7 | +drop procedure [dbo].[usp_UpdateLicenseBasicSettings] | |
8 | +GO | |
9 | + | |
10 | +-- ==================================================== | |
11 | +-- Author: Magic Software | |
12 | +-- Create date: 02-Feb-2018 | |
13 | +-- Description: To update a license account basic values | |
14 | +-- ==================================================== | |
15 | +create PROCEDURE [dbo].[usp_UpdateLicenseBasicSettings] | |
16 | + -- Add the parameters for the stored procedure here | |
17 | + @iLicenseId int, @sLicenseeFname varchar(50), @sLicenseeLname varchar(50), | |
18 | + @sInstitutionName varchar(100)='', @sAddress1 varchar(100)='', | |
19 | + @sAddress2 varchar(100)='', @sCity varchar(50)='', @sZip varchar(20)='', @iStateId int, @iCountryId int, | |
20 | + @sPhone varchar(30) = '', @sEmailId varchar(50), | |
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 | + set @Status = 0; | |
29 | + BEGIN TRY | |
30 | + BEGIN TRANSACTION | |
31 | + UPDATE License SET LicenseeFirstName = @sLicenseeFname, LicenseeLastName = @sLicenseeLname, | |
32 | + InstitutionName = @sInstitutionName, Address1 = @sAddress1, Address2 = @sAddress2, EmailId = @sEmailId, | |
33 | + City = @sCity, Zip = @sZip, Phone = @sPhone, StateId = @iStateId, CountryId = @iCountryId | |
34 | + where Id = @iLicenseId; | |
35 | + COMMIT TRANSACTION | |
36 | + set @Status = 1; | |
37 | + END TRY | |
38 | + BEGIN CATCH | |
39 | + IF @@TRANCOUNT > 0 | |
40 | + ROLLBACK TRANSACTION | |
41 | + END CATCH | |
42 | + | |
43 | +END | |
44 | + | |
45 | +GO | |
46 | +SET QUOTED_IDENTIFIER OFF | |
47 | +GO | |
48 | +SET ANSI_NULLS ON | |
49 | +GO | ... | ... |
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 | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
... | ... | @@ -160,11 +160,11 @@ |
160 | 160 | <Compile Include="Controllers\AccountController.cs" /> |
161 | 161 | <Compile Include="Controllers\AddLicenseController.cs" /> |
162 | 162 | <Compile Include="Controllers\CommonController.cs" /> |
163 | - <Compile Include="Controllers\CountryController.cs" /> | |
164 | 163 | <Compile Include="Controllers\EditionController.cs" /> |
165 | 164 | <Compile Include="Controllers\LicenseController.cs" /> |
166 | 165 | <Compile Include="Controllers\ReportController.cs" /> |
167 | 166 | <Compile Include="Controllers\DiscountCodeController.cs" /> |
167 | + <Compile Include="Controllers\SiteController.cs" /> | |
168 | 168 | <Compile Include="Controllers\SubscriptionPriceController.cs" /> |
169 | 169 | <Compile Include="Controllers\UserController.cs" /> |
170 | 170 | <Compile Include="Entity\AccountType.cs"> |
... | ... | @@ -722,6 +722,9 @@ |
722 | 722 | <Compile Include="Entity\usp_GetLicenseById_Result.cs"> |
723 | 723 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
724 | 724 | </Compile> |
725 | + <Compile Include="Entity\usp_GetLicenseModestySettings_Result.cs"> | |
726 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | |
727 | + </Compile> | |
725 | 728 | <Compile Include="Entity\usp_GetLicenses_Result.cs"> |
726 | 729 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
727 | 730 | </Compile> |
... | ... | @@ -737,6 +740,12 @@ |
737 | 740 | <Compile Include="Entity\usp_GetSearchUserList_Result.cs"> |
738 | 741 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
739 | 742 | </Compile> |
743 | + <Compile Include="Entity\usp_GetSiteAccountEditions_Result.cs"> | |
744 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | |
745 | + </Compile> | |
746 | + <Compile Include="Entity\usp_GetSiteById_Result.cs"> | |
747 | + <DependentUpon>AIADBEntity.tt</DependentUpon> | |
748 | + </Compile> | |
740 | 749 | <Compile Include="Entity\usp_GetSubscriptionPlans_Result.cs"> |
741 | 750 | <DependentUpon>AIADBEntity.tt</DependentUpon> |
742 | 751 | </Compile> |
... | ... | @@ -777,6 +786,7 @@ |
777 | 786 | <Compile Include="Models\SharedModel.cs" /> |
778 | 787 | <Compile Include="Models\AppReponse.cs" /> |
779 | 788 | <Compile Include="Models\DbModel.cs" /> |
789 | + <Compile Include="Models\SiteModel.cs" /> | |
780 | 790 | <Compile Include="Models\StringExtensions.cs" /> |
781 | 791 | <Compile Include="Models\SubscriptionPriceModel.cs" /> |
782 | 792 | <Compile Include="Models\User.cs" /> | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... | ... | @@ -38,12 +38,12 @@ namespace AIAHTML5.ADMIN.API.Controllers |
38 | 38 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); |
39 | 39 | } |
40 | 40 | } |
41 | - | |
41 | + | |
42 | 42 | [Route("Licenses")] |
43 | 43 | [HttpGet] |
44 | 44 | public HttpResponseMessage GetLicenses(string accountNumber, string licenseeFirstName, string licenseeLastName, byte licenseTypeId, |
45 | - string institutionName, int stateId, int countryId, string emailId, DateTime subscriptionStartDate, DateTime subscriptionEndDate, | |
46 | - bool isActive) | |
45 | + string institutionName, int stateId, int countryId, string emailId, DateTime subscriptionStartDate, DateTime subscriptionEndDate, | |
46 | + bool isActive) | |
47 | 47 | { |
48 | 48 | List<LicenseModel> LicenseList = new List<LicenseModel>(); |
49 | 49 | try |
... | ... | @@ -214,5 +214,180 @@ namespace AIAHTML5.ADMIN.API.Controllers |
214 | 214 | return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); |
215 | 215 | } |
216 | 216 | } |
217 | + | |
218 | + [Route("LicenseAccounts")] | |
219 | + [HttpGet] | |
220 | + public HttpResponseMessage GetLicenseAccounts(int LicenseType) | |
221 | + { | |
222 | + List<Tuple<int, string>> LicenseAccountList = new List<Tuple<int, string>>(); | |
223 | + try | |
224 | + { | |
225 | + LicenseAccountList = LicenseModel.GetLicenseAccounts(dbContext, LicenseType); | |
226 | + return Request.CreateResponse(HttpStatusCode.OK, LicenseAccountList); | |
227 | + } | |
228 | + catch (Exception ex) | |
229 | + { | |
230 | + // Log exception code goes here | |
231 | + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | |
232 | + } | |
233 | + } | |
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 | + | |
269 | + [Route("UpdateLicenseBasicSettings")] | |
270 | + [HttpPost] | |
271 | + public HttpResponseMessage UpdateLicenseBasicSettings(JObject jsonData) | |
272 | + { | |
273 | + bool Status = false; | |
274 | + LicenseModel licenseModel = new LicenseModel(); | |
275 | + licenseModel.LicenseId = jsonData["licenseId"].Value<int>(); | |
276 | + licenseModel.AccountNumber = jsonData["accountNumber"].Value<string>(); | |
277 | + licenseModel.LicenseeFirstName = jsonData["licenseeFirstName"].Value<string>(); | |
278 | + licenseModel.LicenseeLastName = jsonData["licenseeLastName"].Value<string>(); | |
279 | + licenseModel.InstitutionName = jsonData["institutionName"].Value<string>(); | |
280 | + licenseModel.Address1 = jsonData["address1"].Value<string>(); | |
281 | + licenseModel.Address2 = jsonData["address2"].Value<string>(); | |
282 | + licenseModel.City = jsonData["city"].Value<string>(); | |
283 | + licenseModel.Zip = jsonData["zip"].Value<string>(); | |
284 | + licenseModel.StateId = jsonData["stateId"].Value<int?>(); | |
285 | + licenseModel.CountryId = jsonData["countryId"].Value<int?>(); | |
286 | + licenseModel.Phone = jsonData["phone"].Value<string>(); | |
287 | + licenseModel.EmailId = jsonData["email"].Value<string>(); | |
288 | + try | |
289 | + { | |
290 | + Status = LicenseModel.UpdateLicenseBasicSettings(dbContext, licenseModel); | |
291 | + if (Status) | |
292 | + { | |
293 | + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); | |
294 | + } | |
295 | + else | |
296 | + { | |
297 | + return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString()); | |
298 | + } | |
299 | + } | |
300 | + catch (Exception ex) | |
301 | + { | |
302 | + // Log exception code goes here | |
303 | + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | |
304 | + } | |
305 | + } | |
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 | + | |
217 | 392 | } |
218 | 393 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
... | ... | @@ -20,13 +20,15 @@ namespace AIAHTML5.ADMIN.API.Controllers |
20 | 20 | public class ReportController : ApiController |
21 | 21 | { |
22 | 22 | AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities(); |
23 | + [Route("GetUsageReport")] | |
24 | + [HttpGet] | |
23 | 25 | public IHttpActionResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, int iState, int iCountry) |
24 | 26 | { |
25 | 27 | var lstUsageReport = dbContext.GetUsageReport(sFromDate, sToDate, sAccoutNumber, sZip, iState, iCountry).ToList(); |
26 | 28 | return Ok(lstUsageReport); |
27 | 29 | } |
28 | 30 | |
29 | - [Route("Api/GetCustomerSummeryReport")] | |
31 | + [Route("GetCustomerSummeryReport")] | |
30 | 32 | [HttpGet] |
31 | 33 | public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry) |
32 | 34 | { |
... | ... | @@ -35,7 +37,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
35 | 37 | } |
36 | 38 | |
37 | 39 | |
38 | - [Route("Api/GetExpiringSubscriptionReport")] | |
40 | + [Route("GetExpiringSubscriptionReport")] | |
39 | 41 | [HttpGet] |
40 | 42 | public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) |
41 | 43 | { |
... | ... | @@ -43,7 +45,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
43 | 45 | return Ok(lstExpiringSubscriptionReport); |
44 | 46 | } |
45 | 47 | |
46 | - [Route("Api/GetSubscriptionReport")] | |
48 | + [Route("GetSubscriptionReport")] | |
47 | 49 | [HttpGet] |
48 | 50 | public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) |
49 | 51 | { |
... | ... | @@ -51,7 +53,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
51 | 53 | var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); |
52 | 54 | return Ok(lstExpiringSubscriptionReport); |
53 | 55 | } |
54 | - [Route("Api/GetSubscriptionCancellationReport")] | |
56 | + [Route("GetSubscriptionCancellationReport")] | |
55 | 57 | [HttpGet] |
56 | 58 | public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) |
57 | 59 | { |
... | ... | @@ -60,7 +62,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
60 | 62 | return Ok(lstExpiringSubscriptionReport); |
61 | 63 | } |
62 | 64 | |
63 | - [Route("Api/GetNetAdSummaryReport")] | |
65 | + [Route("GetNetAdSummaryReport")] | |
64 | 66 | [HttpGet] |
65 | 67 | public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId) |
66 | 68 | { |
... | ... | @@ -75,7 +77,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
75 | 77 | } |
76 | 78 | } |
77 | 79 | |
78 | - [Route("Api/GetSiteLicenseUsageReport")] | |
80 | + [Route("GetSiteLicenseUsageReport")] | |
79 | 81 | [HttpGet] |
80 | 82 | public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition) |
81 | 83 | { |
... | ... | @@ -90,7 +92,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
90 | 92 | } |
91 | 93 | } |
92 | 94 | |
93 | - [Route("Api/GetDiscountReport")] | |
95 | + [Route("GetDiscountReport")] | |
94 | 96 | [HttpGet] |
95 | 97 | public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber) |
96 | 98 | { |
... | ... | @@ -105,7 +107,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
105 | 107 | } |
106 | 108 | } |
107 | 109 | |
108 | - [Route("Api/GetImageExportReport")] | |
110 | + [Route("GetImageExportReport")] | |
109 | 111 | [HttpGet] |
110 | 112 | public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber) |
111 | 113 | { | ... | ... |
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
... | ... | @@ -237,7 +237,7 @@ namespace AIAHTML5.ADMIN.API.Controllers |
237 | 237 | { |
238 | 238 | dbContext.Configuration.ProxyCreationEnabled = false; |
239 | 239 | List<usp_GetAccountNumber_Result> AccountNumberList = new List<usp_GetAccountNumber_Result>(); |
240 | - var AccountNumberEntity = dbContext.usp_GetAccountNumber().ToList(); | |
240 | + var AccountNumberEntity = dbContext.usp_GetAccountNumber(0).ToList(); | |
241 | 241 | AccountNumberList = AccountNumberEntity.Select(l => new usp_GetAccountNumber_Result() { Id = l.Id, AccountNumber = l.AccountNumber }).ToList(); |
242 | 242 | //userTypelist.Insert(0, new UserType { Id = 0, Title = "All" }); |
243 | 243 | return Ok(AccountNumberList); | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... | ... | @@ -2923,9 +2923,13 @@ namespace AIAHTML5.ADMIN.API.Entity |
2923 | 2923 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserId", idParameter, userIdParameter, olduserIdParameter, status); |
2924 | 2924 | } |
2925 | 2925 | |
2926 | - public virtual ObjectResult<usp_GetAccountNumber_Result> usp_GetAccountNumber() | |
2926 | + public virtual ObjectResult<usp_GetAccountNumber_Result> usp_GetAccountNumber(Nullable<int> licenseType) | |
2927 | 2927 | { |
2928 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetAccountNumber_Result>("usp_GetAccountNumber"); | |
2928 | + var licenseTypeParameter = licenseType.HasValue ? | |
2929 | + new ObjectParameter("LicenseType", licenseType) : | |
2930 | + new ObjectParameter("LicenseType", typeof(int)); | |
2931 | + | |
2932 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetAccountNumber_Result>("usp_GetAccountNumber", licenseTypeParameter); | |
2929 | 2933 | } |
2930 | 2934 | |
2931 | 2935 | public virtual ObjectResult<usp_GetProductEditionByLicense_Result> usp_GetProductEditionByLicense(Nullable<int> iLicenseId) |
... | ... | @@ -3221,5 +3225,229 @@ namespace AIAHTML5.ADMIN.API.Entity |
3221 | 3225 | |
3222 | 3226 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetManageRights_Result>("usp_GetManageRights", userIdParameter, roleNameParameter); |
3223 | 3227 | } |
3228 | + | |
3229 | + public virtual int usp_DeleteSiteAccount(Nullable<int> iSiteId, Nullable<int> licenseId, Nullable<int> userId, ObjectParameter status) | |
3230 | + { | |
3231 | + var iSiteIdParameter = iSiteId.HasValue ? | |
3232 | + new ObjectParameter("iSiteId", iSiteId) : | |
3233 | + new ObjectParameter("iSiteId", typeof(int)); | |
3234 | + | |
3235 | + var licenseIdParameter = licenseId.HasValue ? | |
3236 | + new ObjectParameter("LicenseId", licenseId) : | |
3237 | + new ObjectParameter("LicenseId", typeof(int)); | |
3238 | + | |
3239 | + var userIdParameter = userId.HasValue ? | |
3240 | + new ObjectParameter("UserId", userId) : | |
3241 | + new ObjectParameter("UserId", typeof(int)); | |
3242 | + | |
3243 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteSiteAccount", iSiteIdParameter, licenseIdParameter, userIdParameter, status); | |
3244 | + } | |
3245 | + | |
3246 | + public virtual ObjectResult<usp_GetLicenseModestySettings_Result> usp_GetLicenseModestySettings(Nullable<int> iLicenseId, Nullable<int> iBuildingLevelId) | |
3247 | + { | |
3248 | + var iLicenseIdParameter = iLicenseId.HasValue ? | |
3249 | + new ObjectParameter("iLicenseId", iLicenseId) : | |
3250 | + new ObjectParameter("iLicenseId", typeof(int)); | |
3251 | + | |
3252 | + var iBuildingLevelIdParameter = iBuildingLevelId.HasValue ? | |
3253 | + new ObjectParameter("iBuildingLevelId", iBuildingLevelId) : | |
3254 | + new ObjectParameter("iBuildingLevelId", typeof(int)); | |
3255 | + | |
3256 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetLicenseModestySettings_Result>("usp_GetLicenseModestySettings", iLicenseIdParameter, iBuildingLevelIdParameter); | |
3257 | + } | |
3258 | + | |
3259 | + public virtual ObjectResult<usp_GetSiteAccountEditions_Result> usp_GetSiteAccountEditions(Nullable<int> siteId, Nullable<int> licenseId) | |
3260 | + { | |
3261 | + var siteIdParameter = siteId.HasValue ? | |
3262 | + new ObjectParameter("SiteId", siteId) : | |
3263 | + new ObjectParameter("SiteId", typeof(int)); | |
3264 | + | |
3265 | + var licenseIdParameter = licenseId.HasValue ? | |
3266 | + new ObjectParameter("LicenseId", licenseId) : | |
3267 | + new ObjectParameter("LicenseId", typeof(int)); | |
3268 | + | |
3269 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteAccountEditions_Result>("usp_GetSiteAccountEditions", siteIdParameter, licenseIdParameter); | |
3270 | + } | |
3271 | + | |
3272 | + public virtual ObjectResult<usp_GetSiteById_Result> usp_GetSiteById(Nullable<int> siteId) | |
3273 | + { | |
3274 | + var siteIdParameter = siteId.HasValue ? | |
3275 | + new ObjectParameter("SiteId", siteId) : | |
3276 | + new ObjectParameter("SiteId", typeof(int)); | |
3277 | + | |
3278 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteById_Result>("usp_GetSiteById", siteIdParameter); | |
3279 | + } | |
3280 | + | |
3281 | + 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) | |
3282 | + { | |
3283 | + var iSiteIdParameter = iSiteId.HasValue ? | |
3284 | + new ObjectParameter("iSiteId", iSiteId) : | |
3285 | + new ObjectParameter("iSiteId", typeof(int)); | |
3286 | + | |
3287 | + var sSiteIPParameter = sSiteIP != null ? | |
3288 | + new ObjectParameter("sSiteIP", sSiteIP) : | |
3289 | + new ObjectParameter("sSiteIP", typeof(string)); | |
3290 | + | |
3291 | + var sTitleParameter = sTitle != null ? | |
3292 | + new ObjectParameter("sTitle", sTitle) : | |
3293 | + new ObjectParameter("sTitle", typeof(string)); | |
3294 | + | |
3295 | + var sInstituteNameParameter = sInstituteName != null ? | |
3296 | + new ObjectParameter("sInstituteName", sInstituteName) : | |
3297 | + new ObjectParameter("sInstituteName", typeof(string)); | |
3298 | + | |
3299 | + var sDepartmentParameter = sDepartment != null ? | |
3300 | + new ObjectParameter("sDepartment", sDepartment) : | |
3301 | + new ObjectParameter("sDepartment", typeof(string)); | |
3302 | + | |
3303 | + var sAddress1Parameter = sAddress1 != null ? | |
3304 | + new ObjectParameter("sAddress1", sAddress1) : | |
3305 | + new ObjectParameter("sAddress1", typeof(string)); | |
3306 | + | |
3307 | + var sAddress2Parameter = sAddress2 != null ? | |
3308 | + new ObjectParameter("sAddress2", sAddress2) : | |
3309 | + new ObjectParameter("sAddress2", typeof(string)); | |
3310 | + | |
3311 | + var sCityParameter = sCity != null ? | |
3312 | + new ObjectParameter("sCity", sCity) : | |
3313 | + new ObjectParameter("sCity", typeof(string)); | |
3314 | + | |
3315 | + var zipParameter = zip != null ? | |
3316 | + new ObjectParameter("Zip", zip) : | |
3317 | + new ObjectParameter("Zip", typeof(string)); | |
3318 | + | |
3319 | + var phoneParameter = phone != null ? | |
3320 | + new ObjectParameter("Phone", phone) : | |
3321 | + new ObjectParameter("Phone", typeof(string)); | |
3322 | + | |
3323 | + var stateIdParameter = stateId.HasValue ? | |
3324 | + new ObjectParameter("StateId", stateId) : | |
3325 | + new ObjectParameter("StateId", typeof(int)); | |
3326 | + | |
3327 | + var countryIdParameter = countryId.HasValue ? | |
3328 | + new ObjectParameter("CountryId", countryId) : | |
3329 | + new ObjectParameter("CountryId", typeof(int)); | |
3330 | + | |
3331 | + var isMasterParameter = isMaster.HasValue ? | |
3332 | + new ObjectParameter("IsMaster", isMaster) : | |
3333 | + new ObjectParameter("IsMaster", typeof(bool)); | |
3334 | + | |
3335 | + var creationDateParameter = creationDate.HasValue ? | |
3336 | + new ObjectParameter("CreationDate", creationDate) : | |
3337 | + new ObjectParameter("CreationDate", typeof(System.DateTime)); | |
3338 | + | |
3339 | + var modifiedDateParameter = modifiedDate.HasValue ? | |
3340 | + new ObjectParameter("ModifiedDate", modifiedDate) : | |
3341 | + new ObjectParameter("ModifiedDate", typeof(System.DateTime)); | |
3342 | + | |
3343 | + var isActiveParameter = isActive.HasValue ? | |
3344 | + new ObjectParameter("IsActive", isActive) : | |
3345 | + new ObjectParameter("IsActive", typeof(bool)); | |
3346 | + | |
3347 | + var userIdParameter = userId.HasValue ? | |
3348 | + new ObjectParameter("UserId", userId) : | |
3349 | + new ObjectParameter("UserId", typeof(int)); | |
3350 | + | |
3351 | + var sSiteIPToParameter = sSiteIPTo != null ? | |
3352 | + new ObjectParameter("sSiteIPTo", sSiteIPTo) : | |
3353 | + new ObjectParameter("sSiteIPTo", typeof(string)); | |
3354 | + | |
3355 | + var licenseIdParameter = licenseId.HasValue ? | |
3356 | + new ObjectParameter("LicenseId", licenseId) : | |
3357 | + new ObjectParameter("LicenseId", typeof(int)); | |
3358 | + | |
3359 | + var siteEditionIdsParameter = siteEditionIds != null ? | |
3360 | + new ObjectParameter("SiteEditionIds", siteEditionIds) : | |
3361 | + new ObjectParameter("SiteEditionIds", typeof(string)); | |
3362 | + | |
3363 | + 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); | |
3364 | + } | |
3365 | + | |
3366 | + public virtual int usp_UpdateLicenseBasicSettings(Nullable<int> iLicenseId, string sLicenseeFname, string sLicenseeLname, string sInstitutionName, string sAddress1, string sAddress2, string sCity, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, string sPhone, string sEmailId, ObjectParameter status) | |
3367 | + { | |
3368 | + var iLicenseIdParameter = iLicenseId.HasValue ? | |
3369 | + new ObjectParameter("iLicenseId", iLicenseId) : | |
3370 | + new ObjectParameter("iLicenseId", typeof(int)); | |
3371 | + | |
3372 | + var sLicenseeFnameParameter = sLicenseeFname != null ? | |
3373 | + new ObjectParameter("sLicenseeFname", sLicenseeFname) : | |
3374 | + new ObjectParameter("sLicenseeFname", typeof(string)); | |
3375 | + | |
3376 | + var sLicenseeLnameParameter = sLicenseeLname != null ? | |
3377 | + new ObjectParameter("sLicenseeLname", sLicenseeLname) : | |
3378 | + new ObjectParameter("sLicenseeLname", typeof(string)); | |
3379 | + | |
3380 | + var sInstitutionNameParameter = sInstitutionName != null ? | |
3381 | + new ObjectParameter("sInstitutionName", sInstitutionName) : | |
3382 | + new ObjectParameter("sInstitutionName", typeof(string)); | |
3383 | + | |
3384 | + var sAddress1Parameter = sAddress1 != null ? | |
3385 | + new ObjectParameter("sAddress1", sAddress1) : | |
3386 | + new ObjectParameter("sAddress1", typeof(string)); | |
3387 | + | |
3388 | + var sAddress2Parameter = sAddress2 != null ? | |
3389 | + new ObjectParameter("sAddress2", sAddress2) : | |
3390 | + new ObjectParameter("sAddress2", typeof(string)); | |
3391 | + | |
3392 | + var sCityParameter = sCity != null ? | |
3393 | + new ObjectParameter("sCity", sCity) : | |
3394 | + new ObjectParameter("sCity", typeof(string)); | |
3395 | + | |
3396 | + var sZipParameter = sZip != null ? | |
3397 | + new ObjectParameter("sZip", sZip) : | |
3398 | + new ObjectParameter("sZip", typeof(string)); | |
3399 | + | |
3400 | + var iStateIdParameter = iStateId.HasValue ? | |
3401 | + new ObjectParameter("iStateId", iStateId) : | |
3402 | + new ObjectParameter("iStateId", typeof(int)); | |
3403 | + | |
3404 | + var iCountryIdParameter = iCountryId.HasValue ? | |
3405 | + new ObjectParameter("iCountryId", iCountryId) : | |
3406 | + new ObjectParameter("iCountryId", typeof(int)); | |
3407 | + | |
3408 | + var sPhoneParameter = sPhone != null ? | |
3409 | + new ObjectParameter("sPhone", sPhone) : | |
3410 | + new ObjectParameter("sPhone", typeof(string)); | |
3411 | + | |
3412 | + var sEmailIdParameter = sEmailId != null ? | |
3413 | + new ObjectParameter("sEmailId", sEmailId) : | |
3414 | + new ObjectParameter("sEmailId", typeof(string)); | |
3415 | + | |
3416 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseBasicSettings", iLicenseIdParameter, sLicenseeFnameParameter, sLicenseeLnameParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, status); | |
3417 | + } | |
3418 | + | |
3419 | + public virtual int usp_UpdateLicenseModestySettings(Nullable<int> licenseEditionId, Nullable<int> siteId, Nullable<bool> isModesty, ObjectParameter status) | |
3420 | + { | |
3421 | + var licenseEditionIdParameter = licenseEditionId.HasValue ? | |
3422 | + new ObjectParameter("LicenseEditionId", licenseEditionId) : | |
3423 | + new ObjectParameter("LicenseEditionId", typeof(int)); | |
3424 | + | |
3425 | + var siteIdParameter = siteId.HasValue ? | |
3426 | + new ObjectParameter("SiteId", siteId) : | |
3427 | + new ObjectParameter("SiteId", typeof(int)); | |
3428 | + | |
3429 | + var isModestyParameter = isModesty.HasValue ? | |
3430 | + new ObjectParameter("IsModesty", isModesty) : | |
3431 | + new ObjectParameter("IsModesty", typeof(bool)); | |
3432 | + | |
3433 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, status); | |
3434 | + } | |
3435 | + | |
3436 | + public virtual int usp_UpdateLicenseModuleStatus(Nullable<int> licenseId, Nullable<int> moduleId, Nullable<bool> moduleStatus, ObjectParameter status) | |
3437 | + { | |
3438 | + var licenseIdParameter = licenseId.HasValue ? | |
3439 | + new ObjectParameter("LicenseId", licenseId) : | |
3440 | + new ObjectParameter("LicenseId", typeof(int)); | |
3441 | + | |
3442 | + var moduleIdParameter = moduleId.HasValue ? | |
3443 | + new ObjectParameter("ModuleId", moduleId) : | |
3444 | + new ObjectParameter("ModuleId", typeof(int)); | |
3445 | + | |
3446 | + var moduleStatusParameter = moduleStatus.HasValue ? | |
3447 | + new ObjectParameter("ModuleStatus", moduleStatus) : | |
3448 | + new ObjectParameter("ModuleStatus", typeof(bool)); | |
3449 | + | |
3450 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleIdParameter, moduleStatusParameter, status); | |
3451 | + } | |
3224 | 3452 | } |
3225 | 3453 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... | ... | @@ -2616,11 +2616,19 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' 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_DeleteSiteAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2620 | + <Parameter Name="iSiteId" Type="int" Mode="In" /> | |
2621 | + <Parameter Name="LicenseId" Type="int" Mode="In" /> | |
2622 | + <Parameter Name="UserId" Type="int" Mode="In" /> | |
2623 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2624 | + </Function> | |
2619 | 2625 | <Function Name="usp_DeleteSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2620 | 2626 | <Parameter Name="Id" Type="tinyint" Mode="In" /> |
2621 | 2627 | <Parameter Name="Status" Type="bit" Mode="InOut" /> |
2622 | 2628 | </Function> |
2623 | - <Function Name="usp_GetAccountNumber" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> | |
2629 | + <Function Name="usp_GetAccountNumber" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2630 | + <Parameter Name="LicenseType" Type="int" Mode="In" /> | |
2631 | + </Function> | |
2624 | 2632 | <Function Name="usp_GetAccountTypeList" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2625 | 2633 | <Parameter Name="Id" Type="int" Mode="In" /> |
2626 | 2634 | </Function> |
... | ... | @@ -2628,6 +2636,10 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2628 | 2636 | <Function Name="usp_GetLicenseById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2629 | 2637 | <Parameter Name="Id" Type="int" Mode="In" /> |
2630 | 2638 | </Function> |
2639 | + <Function Name="usp_GetLicenseModestySettings" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2640 | + <Parameter Name="iLicenseId" Type="int" Mode="In" /> | |
2641 | + <Parameter Name="iBuildingLevelId" Type="int" Mode="In" /> | |
2642 | + </Function> | |
2631 | 2643 | <Function Name="usp_GetLicenses" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2632 | 2644 | <Parameter Name="sStartDate" Type="varchar" Mode="In" /> |
2633 | 2645 | <Parameter Name="sEndDate" Type="varchar" Mode="In" /> |
... | ... | @@ -2658,6 +2670,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2658 | 2670 | <Parameter Name="iAccountTypeId" Type="int" Mode="In" /> |
2659 | 2671 | <Parameter Name="iLoginUserType" Type="int" Mode="In" /> |
2660 | 2672 | </Function> |
2673 | + <Function Name="usp_GetSiteAccountEditions" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2674 | + <Parameter Name="SiteId" Type="int" Mode="In" /> | |
2675 | + <Parameter Name="LicenseId" Type="int" Mode="In" /> | |
2676 | + </Function> | |
2677 | + <Function Name="usp_GetSiteById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2678 | + <Parameter Name="SiteId" Type="int" Mode="In" /> | |
2679 | + </Function> | |
2661 | 2680 | <Function Name="usp_GetSubscriptionPlans" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2662 | 2681 | <Parameter Name="iEditionId" Type="tinyint" Mode="In" /> |
2663 | 2682 | </Function> |
... | ... | @@ -2687,6 +2706,29 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2687 | 2706 | <Parameter Name="IsActive" Type="bit" Mode="In" /> |
2688 | 2707 | <Parameter Name="Status" Type="bit" Mode="InOut" /> |
2689 | 2708 | </Function> |
2709 | + <Function Name="usp_InsertUpdateSiteAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2710 | + <Parameter Name="iSiteId" Type="int" Mode="In" /> | |
2711 | + <Parameter Name="sSiteIP" Type="varchar" Mode="In" /> | |
2712 | + <Parameter Name="sTitle" Type="varchar" Mode="In" /> | |
2713 | + <Parameter Name="sInstituteName" Type="varchar" Mode="In" /> | |
2714 | + <Parameter Name="sDepartment" Type="varchar" Mode="In" /> | |
2715 | + <Parameter Name="sAddress1" Type="varchar" Mode="In" /> | |
2716 | + <Parameter Name="sAddress2" Type="varchar" Mode="In" /> | |
2717 | + <Parameter Name="sCity" Type="varchar" Mode="In" /> | |
2718 | + <Parameter Name="Zip" Type="varchar" Mode="In" /> | |
2719 | + <Parameter Name="Phone" Type="varchar" Mode="In" /> | |
2720 | + <Parameter Name="StateId" Type="int" Mode="In" /> | |
2721 | + <Parameter Name="CountryId" Type="int" Mode="In" /> | |
2722 | + <Parameter Name="IsMaster" Type="bit" Mode="In" /> | |
2723 | + <Parameter Name="CreationDate" Type="datetime" Mode="In" /> | |
2724 | + <Parameter Name="ModifiedDate" Type="datetime" Mode="In" /> | |
2725 | + <Parameter Name="IsActive" Type="bit" Mode="In" /> | |
2726 | + <Parameter Name="UserId" Type="int" Mode="In" /> | |
2727 | + <Parameter Name="sSiteIPTo" Type="varchar" Mode="In" /> | |
2728 | + <Parameter Name="LicenseId" Type="int" Mode="In" /> | |
2729 | + <Parameter Name="SiteEditionIds" Type="varchar" Mode="In" /> | |
2730 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2731 | + </Function> | |
2690 | 2732 | <Function Name="usp_UpdateAIAUser" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2691 | 2733 | <Parameter Name="sLoginId" Type="varchar" Mode="In" /> |
2692 | 2734 | <Parameter Name="sPassword" Type="varchar" Mode="In" /> |
... | ... | @@ -2702,6 +2744,33 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2702 | 2744 | <Parameter Name="Id" Type="int" Mode="In" /> |
2703 | 2745 | <Parameter Name="Status" Type="int" Mode="InOut" /> |
2704 | 2746 | </Function> |
2747 | + <Function Name="usp_UpdateLicenseBasicSettings" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2748 | + <Parameter Name="iLicenseId" Type="int" Mode="In" /> | |
2749 | + <Parameter Name="sLicenseeFname" Type="varchar" Mode="In" /> | |
2750 | + <Parameter Name="sLicenseeLname" Type="varchar" Mode="In" /> | |
2751 | + <Parameter Name="sInstitutionName" Type="varchar" Mode="In" /> | |
2752 | + <Parameter Name="sAddress1" Type="varchar" Mode="In" /> | |
2753 | + <Parameter Name="sAddress2" Type="varchar" Mode="In" /> | |
2754 | + <Parameter Name="sCity" Type="varchar" Mode="In" /> | |
2755 | + <Parameter Name="sZip" Type="varchar" Mode="In" /> | |
2756 | + <Parameter Name="iStateId" Type="int" Mode="In" /> | |
2757 | + <Parameter Name="iCountryId" Type="int" Mode="In" /> | |
2758 | + <Parameter Name="sPhone" Type="varchar" Mode="In" /> | |
2759 | + <Parameter Name="sEmailId" Type="varchar" Mode="In" /> | |
2760 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2761 | + </Function> | |
2762 | + <Function Name="usp_UpdateLicenseModestySettings" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2763 | + <Parameter Name="LicenseEditionId" Type="int" Mode="In" /> | |
2764 | + <Parameter Name="SiteId" Type="int" Mode="In" /> | |
2765 | + <Parameter Name="IsModesty" Type="bit" Mode="In" /> | |
2766 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2767 | + </Function> | |
2768 | + <Function Name="usp_UpdateLicenseModuleStatus" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2769 | + <Parameter Name="LicenseId" Type="int" Mode="In" /> | |
2770 | + <Parameter Name="ModuleId" Type="int" Mode="In" /> | |
2771 | + <Parameter Name="ModuleStatus" Type="bit" Mode="In" /> | |
2772 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2773 | + </Function> | |
2705 | 2774 | <Function Name="usp_UpdateSubscriptionPlan" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2706 | 2775 | <Parameter Name="Id" Type="tinyint" Mode="In" /> |
2707 | 2776 | <Parameter Name="Title" Type="varchar" Mode="In" /> |
... | ... | @@ -6154,7 +6223,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
6154 | 6223 | <Parameter Name="olduserId" Mode="In" Type="String" /> |
6155 | 6224 | <Parameter Name="Status" Mode="InOut" Type="Int32" /> |
6156 | 6225 | </FunctionImport> |
6157 | - <FunctionImport Name="usp_GetAccountNumber" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountNumber_Result)" /> | |
6226 | + <FunctionImport Name="usp_GetAccountNumber" ReturnType="Collection(AIADatabaseV5Model.usp_GetAccountNumber_Result)" > | |
6227 | + <Parameter Name="LicenseType" Mode="In" Type="Int32" /> | |
6228 | + </FunctionImport> | |
6158 | 6229 | <FunctionImport Name="usp_GetProductEditionByLicense" ReturnType="Collection(AIADatabaseV5Model.usp_GetProductEditionByLicense_Result)"> |
6159 | 6230 | <Parameter Name="iLicenseId" Mode="In" Type="Int32" /> |
6160 | 6231 | </FunctionImport> |
... | ... | @@ -6223,7 +6294,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
6223 | 6294 | </FunctionImport> |
6224 | 6295 | <FunctionImport Name="usp_GetEditions" ReturnType="Collection(AIADatabaseV5Model.usp_GetEditions_Result)" /> |
6225 | 6296 | <FunctionImport Name="usp_GetLicenseById" ReturnType="Collection(AIADatabaseV5Model.usp_GetLicenseById_Result)"> |
6226 | - <Parameter Name="Id" Mode="In" Type="Int32" /> | |
6297 | + <Parameter Name="Id" Mode="In" Type="Int32" /> | |
6227 | 6298 | </FunctionImport> |
6228 | 6299 | <FunctionImport Name="usp_GetLicenses" ReturnType="Collection(AIADatabaseV5Model.usp_GetLicenses_Result)"> |
6229 | 6300 | <Parameter Name="sStartDate" Mode="In" Type="String" /> |
... | ... | @@ -6243,6 +6314,73 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
6243 | 6314 | <Parameter Name="UserId" Mode="In" Type="Int32" /> |
6244 | 6315 | <Parameter Name="RoleName" Mode="In" Type="String" /> |
6245 | 6316 | </FunctionImport> |
6317 | + <FunctionImport Name="usp_DeleteSiteAccount"> | |
6318 | + <Parameter Name="iSiteId" Mode="In" Type="Int32" /> | |
6319 | + <Parameter Name="LicenseId" Mode="In" Type="Int32" /> | |
6320 | + <Parameter Name="UserId" Mode="In" Type="Int32" /> | |
6321 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6322 | + </FunctionImport> | |
6323 | + <FunctionImport Name="usp_GetLicenseModestySettings" ReturnType="Collection(AIADatabaseV5Model.usp_GetLicenseModestySettings_Result)"> | |
6324 | + <Parameter Name="iLicenseId" Mode="In" Type="Int32" /> | |
6325 | + <Parameter Name="iBuildingLevelId" Mode="In" Type="Int32" /> | |
6326 | + </FunctionImport> | |
6327 | + <FunctionImport Name="usp_GetSiteAccountEditions" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteAccountEditions_Result)"> | |
6328 | + <Parameter Name="SiteId" Mode="In" Type="Int32" /> | |
6329 | + <Parameter Name="LicenseId" Mode="In" Type="Int32" /> | |
6330 | + </FunctionImport> | |
6331 | + <FunctionImport Name="usp_GetSiteById" ReturnType="Collection(AIADatabaseV5Model.usp_GetSiteById_Result)"> | |
6332 | + <Parameter Name="SiteId" Mode="In" Type="Int32" /> | |
6333 | + </FunctionImport> | |
6334 | + <FunctionImport Name="usp_InsertUpdateSiteAccount"> | |
6335 | + <Parameter Name="iSiteId" Mode="In" Type="Int32" /> | |
6336 | + <Parameter Name="sSiteIP" Mode="In" Type="String" /> | |
6337 | + <Parameter Name="sTitle" Mode="In" Type="String" /> | |
6338 | + <Parameter Name="sInstituteName" Mode="In" Type="String" /> | |
6339 | + <Parameter Name="sDepartment" Mode="In" Type="String" /> | |
6340 | + <Parameter Name="sAddress1" Mode="In" Type="String" /> | |
6341 | + <Parameter Name="sAddress2" Mode="In" Type="String" /> | |
6342 | + <Parameter Name="sCity" Mode="In" Type="String" /> | |
6343 | + <Parameter Name="Zip" Mode="In" Type="String" /> | |
6344 | + <Parameter Name="Phone" Mode="In" Type="String" /> | |
6345 | + <Parameter Name="StateId" Mode="In" Type="Int32" /> | |
6346 | + <Parameter Name="CountryId" Mode="In" Type="Int32" /> | |
6347 | + <Parameter Name="IsMaster" Mode="In" Type="Boolean" /> | |
6348 | + <Parameter Name="CreationDate" Mode="In" Type="DateTime" /> | |
6349 | + <Parameter Name="ModifiedDate" Mode="In" Type="DateTime" /> | |
6350 | + <Parameter Name="IsActive" Mode="In" Type="Boolean" /> | |
6351 | + <Parameter Name="UserId" Mode="In" Type="Int32" /> | |
6352 | + <Parameter Name="sSiteIPTo" Mode="In" Type="String" /> | |
6353 | + <Parameter Name="LicenseId" Mode="In" Type="Int32" /> | |
6354 | + <Parameter Name="SiteEditionIds" Mode="In" Type="String" /> | |
6355 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6356 | + </FunctionImport> | |
6357 | + <FunctionImport Name="usp_UpdateLicenseBasicSettings"> | |
6358 | + <Parameter Name="iLicenseId" Mode="In" Type="Int32" /> | |
6359 | + <Parameter Name="sLicenseeFname" Mode="In" Type="String" /> | |
6360 | + <Parameter Name="sLicenseeLname" Mode="In" Type="String" /> | |
6361 | + <Parameter Name="sInstitutionName" Mode="In" Type="String" /> | |
6362 | + <Parameter Name="sAddress1" Mode="In" Type="String" /> | |
6363 | + <Parameter Name="sAddress2" Mode="In" Type="String" /> | |
6364 | + <Parameter Name="sCity" Mode="In" Type="String" /> | |
6365 | + <Parameter Name="sZip" Mode="In" Type="String" /> | |
6366 | + <Parameter Name="iStateId" Mode="In" Type="Int32" /> | |
6367 | + <Parameter Name="iCountryId" Mode="In" Type="Int32" /> | |
6368 | + <Parameter Name="sPhone" Mode="In" Type="String" /> | |
6369 | + <Parameter Name="sEmailId" Mode="In" Type="String" /> | |
6370 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6371 | + </FunctionImport> | |
6372 | + <FunctionImport Name="usp_UpdateLicenseModestySettings"> | |
6373 | + <Parameter Name="LicenseEditionId" Mode="In" Type="Int32" /> | |
6374 | + <Parameter Name="SiteId" Mode="In" Type="Int32" /> | |
6375 | + <Parameter Name="IsModesty" Mode="In" Type="Boolean" /> | |
6376 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6377 | + </FunctionImport> | |
6378 | + <FunctionImport Name="usp_UpdateLicenseModuleStatus"> | |
6379 | + <Parameter Name="LicenseId" Mode="In" Type="Int32" /> | |
6380 | + <Parameter Name="ModuleId" Mode="In" Type="Int32" /> | |
6381 | + <Parameter Name="ModuleStatus" Mode="In" Type="Boolean" /> | |
6382 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6383 | + </FunctionImport> | |
6246 | 6384 | </EntityContainer> |
6247 | 6385 | <ComplexType Name="DA_GetBaseLayer_Result"> |
6248 | 6386 | <Property Type="Int32" Name="Id" Nullable="false" /> |
... | ... | @@ -7163,6 +7301,39 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
7163 | 7301 | <Property Type="Byte" Name="Priority" Nullable="true" /> |
7164 | 7302 | <Property Type="String" Name="MenuStatus" Nullable="false" MaxLength="1" /> |
7165 | 7303 | </ComplexType> |
7304 | + <ComplexType Name="usp_GetLicenseModestySettings_Result"> | |
7305 | + <Property Type="Int32" Name="LicenseEditionId" Nullable="false" /> | |
7306 | + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | |
7307 | + <Property Type="Boolean" Name="IsModesty" Nullable="true" /> | |
7308 | + </ComplexType> | |
7309 | + <ComplexType Name="usp_GetSiteAccountEditions_Result"> | |
7310 | + <Property Type="Int32" Name="LicenseEditionId" Nullable="false" /> | |
7311 | + <Property Type="Byte" Name="Id" Nullable="false" /> | |
7312 | + <Property Type="String" Name="Title" Nullable="false" MaxLength="50" /> | |
7313 | + </ComplexType> | |
7314 | + <ComplexType Name="usp_GetSiteById_Result"> | |
7315 | + <Property Type="Int32" Name="Id" Nullable="false" /> | |
7316 | + <Property Type="String" Name="SiteIp" Nullable="true" MaxLength="2000" /> | |
7317 | + <Property Type="String" Name="Title" Nullable="true" MaxLength="100" /> | |
7318 | + <Property Type="String" Name="SiteIPTo" Nullable="false" MaxLength="100" /> | |
7319 | + <Property Type="String" Name="SiteMasterIPTo" Nullable="false" MaxLength="100" /> | |
7320 | + <Property Type="String" Name="Address1" Nullable="true" MaxLength="100" /> | |
7321 | + <Property Type="String" Name="Address2" Nullable="true" MaxLength="100" /> | |
7322 | + <Property Type="String" Name="Zip" Nullable="true" MaxLength="20" /> | |
7323 | + <Property Type="String" Name="Phone" Nullable="true" MaxLength="30" /> | |
7324 | + <Property Type="String" Name="City" Nullable="true" MaxLength="50" /> | |
7325 | + <Property Type="Int32" Name="StateId" Nullable="true" /> | |
7326 | + <Property Type="Int32" Name="CountryId" Nullable="true" /> | |
7327 | + <Property Type="Boolean" Name="IsMaster" Nullable="false" /> | |
7328 | + <Property Type="Boolean" Name="IsActive" Nullable="true" /> | |
7329 | + <Property Type="String" Name="CreationDate" Nullable="true" MaxLength="30" /> | |
7330 | + <Property Type="String" Name="ModifiedDate" Nullable="true" MaxLength="30" /> | |
7331 | + <Property Type="String" Name="InstituteName" Nullable="true" MaxLength="100" /> | |
7332 | + <Property Type="String" Name="Department" Nullable="true" MaxLength="50" /> | |
7333 | + <Property Type="Int32" Name="UserId" Nullable="false" /> | |
7334 | + <Property Type="String" Name="FirstName" Nullable="true" MaxLength="100" /> | |
7335 | + <Property Type="String" Name="EmailId" Nullable="true" MaxLength="50" /> | |
7336 | + </ComplexType> | |
7166 | 7337 | </Schema> |
7167 | 7338 | </edmx:ConceptualModels> |
7168 | 7339 | <!-- C-S mapping content --> |
... | ... | @@ -9624,6 +9795,56 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
9624 | 9795 | </ComplexTypeMapping> |
9625 | 9796 | </ResultMapping> |
9626 | 9797 | </FunctionImportMapping> |
9798 | + <FunctionImportMapping FunctionImportName="usp_DeleteSiteAccount" FunctionName="AIADatabaseV5Model.Store.usp_DeleteSiteAccount" /> | |
9799 | + <FunctionImportMapping FunctionImportName="usp_GetLicenseModestySettings" FunctionName="AIADatabaseV5Model.Store.usp_GetLicenseModestySettings"> | |
9800 | + <ResultMapping> | |
9801 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetLicenseModestySettings_Result"> | |
9802 | + <ScalarProperty Name="LicenseEditionId" ColumnName="LicenseEditionId" /> | |
9803 | + <ScalarProperty Name="Title" ColumnName="Title" /> | |
9804 | + <ScalarProperty Name="IsModesty" ColumnName="IsModesty" /> | |
9805 | + </ComplexTypeMapping> | |
9806 | + </ResultMapping> | |
9807 | + </FunctionImportMapping> | |
9808 | + <FunctionImportMapping FunctionImportName="usp_GetSiteAccountEditions" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteAccountEditions"> | |
9809 | + <ResultMapping> | |
9810 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteAccountEditions_Result"> | |
9811 | + <ScalarProperty Name="LicenseEditionId" ColumnName="LicenseEditionId" /> | |
9812 | + <ScalarProperty Name="Id" ColumnName="Id" /> | |
9813 | + <ScalarProperty Name="Title" ColumnName="Title" /> | |
9814 | + </ComplexTypeMapping> | |
9815 | + </ResultMapping> | |
9816 | + </FunctionImportMapping> | |
9817 | + <FunctionImportMapping FunctionImportName="usp_GetSiteById" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteById"> | |
9818 | + <ResultMapping> | |
9819 | + <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteById_Result"> | |
9820 | + <ScalarProperty Name="Id" ColumnName="Id" /> | |
9821 | + <ScalarProperty Name="SiteIp" ColumnName="SiteIp" /> | |
9822 | + <ScalarProperty Name="Title" ColumnName="Title" /> | |
9823 | + <ScalarProperty Name="SiteIPTo" ColumnName="SiteIPTo" /> | |
9824 | + <ScalarProperty Name="SiteMasterIPTo" ColumnName="SiteMasterIPTo" /> | |
9825 | + <ScalarProperty Name="Address1" ColumnName="Address1" /> | |
9826 | + <ScalarProperty Name="Address2" ColumnName="Address2" /> | |
9827 | + <ScalarProperty Name="Zip" ColumnName="Zip" /> | |
9828 | + <ScalarProperty Name="Phone" ColumnName="Phone" /> | |
9829 | + <ScalarProperty Name="City" ColumnName="City" /> | |
9830 | + <ScalarProperty Name="StateId" ColumnName="StateId" /> | |
9831 | + <ScalarProperty Name="CountryId" ColumnName="CountryId" /> | |
9832 | + <ScalarProperty Name="IsMaster" ColumnName="IsMaster" /> | |
9833 | + <ScalarProperty Name="IsActive" ColumnName="IsActive" /> | |
9834 | + <ScalarProperty Name="CreationDate" ColumnName="CreationDate" /> | |
9835 | + <ScalarProperty Name="ModifiedDate" ColumnName="ModifiedDate" /> | |
9836 | + <ScalarProperty Name="InstituteName" ColumnName="InstituteName" /> | |
9837 | + <ScalarProperty Name="Department" ColumnName="Department" /> | |
9838 | + <ScalarProperty Name="UserId" ColumnName="UserId" /> | |
9839 | + <ScalarProperty Name="FirstName" ColumnName="FirstName" /> | |
9840 | + <ScalarProperty Name="EmailId" ColumnName="EmailId" /> | |
9841 | + </ComplexTypeMapping> | |
9842 | + </ResultMapping> | |
9843 | + </FunctionImportMapping> | |
9844 | + <FunctionImportMapping FunctionImportName="usp_InsertUpdateSiteAccount" FunctionName="AIADatabaseV5Model.Store.usp_InsertUpdateSiteAccount" /> | |
9845 | + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseBasicSettings" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseBasicSettings" /> | |
9846 | + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseModestySettings" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseModestySettings" /> | |
9847 | + <FunctionImportMapping FunctionImportName="usp_UpdateLicenseModuleStatus" FunctionName="AIADatabaseV5Model.Store.usp_UpdateLicenseModuleStatus" /> | |
9627 | 9848 | </EntityContainerMapping> |
9628 | 9849 | </Mapping> |
9629 | 9850 | </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 int LicenseEditionId { get; set; } | |
17 | + public string Title { get; set; } | |
18 | + public Nullable<bool> IsModesty { get; set; } | |
19 | + } | |
20 | +} | ... | ... |
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 Nullable<bool> IsActive { get; set; } | |
30 | + public string CreationDate { get; set; } | |
31 | + public string ModifiedDate { get; set; } | |
32 | + public string InstituteName { get; set; } | |
33 | + public string Department { get; set; } | |
34 | + public int UserId { get; set; } | |
35 | + public string FirstName { get; set; } | |
36 | + public string EmailId { 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 | |
... | ... | @@ -16,7 +18,7 @@ namespace AIAHTML5.ADMIN.API.Models |
16 | 18 | public string LicenseeLastName { get; set; } |
17 | 19 | public string LicenseeName { get; set; } |
18 | 20 | public byte LicenseTypeId { get; set; } |
19 | - public string LicenseTypeName { get; set; } | |
21 | + public string LicenseTypeName { get; set; } | |
20 | 22 | public string InstitutionName { get; set; } |
21 | 23 | public int? StateId { get; set; } |
22 | 24 | public int? CountryId { get; set; } |
... | ... | @@ -54,8 +56,8 @@ namespace AIAHTML5.ADMIN.API.Models |
54 | 56 | public byte? TestLicenseEditionId { get; set; } |
55 | 57 | public bool IsRenew { get; set; } |
56 | 58 | |
57 | - public static List<LicenseModel> GetLicenses(AIADatabaseV5Entities dbContext, string accountNumber, string licenseeFirstName, | |
58 | - string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId, | |
59 | + public static List<LicenseModel> GetLicenses(AIADatabaseV5Entities dbContext, string accountNumber, string licenseeFirstName, | |
60 | + string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId, | |
59 | 61 | DateTime subscriptionStartDate, DateTime subscriptionEndDate, bool isActive) |
60 | 62 | { |
61 | 63 | List<LicenseModel> LicenseList = new List<LicenseModel>(); |
... | ... | @@ -65,9 +67,9 @@ namespace AIAHTML5.ADMIN.API.Models |
65 | 67 | { |
66 | 68 | var result = dbContext.usp_GetLicenses( |
67 | 69 | (subscriptionStartDate > DateTime.MinValue ? subscriptionStartDate.ToShortDateString() : "01/01/01"), |
68 | - (subscriptionEndDate > DateTime.MinValue ? subscriptionEndDate.ToShortDateString() : "01/01/01"), | |
70 | + (subscriptionEndDate > DateTime.MinValue ? subscriptionEndDate.ToShortDateString() : "01/01/01"), | |
69 | 71 | (accountNumber == null ? "" : accountNumber), (licenseeFirstName == null ? "" : licenseeFirstName), |
70 | - (licenseeLastName == null ? "" : licenseeLastName), licenseTypeId, (institutionName == null ? "" : institutionName), | |
72 | + (licenseeLastName == null ? "" : licenseeLastName), licenseTypeId, (institutionName == null ? "" : institutionName), | |
71 | 73 | (emailId == null ? "" : emailId), stateId, countryId, isActive).ToList(); |
72 | 74 | if (result.Count > 0) |
73 | 75 | { |
... | ... | @@ -104,6 +106,29 @@ namespace AIAHTML5.ADMIN.API.Models |
104 | 106 | return LicenseList; |
105 | 107 | } |
106 | 108 | |
109 | + public static List<Tuple<int, string>> GetLicenseAccounts(AIADatabaseV5Entities dbContext, int LicenseType) | |
110 | + { | |
111 | + List<Tuple<int, string>> LicenseAccountList = new List<Tuple<int, string>>(); | |
112 | + Tuple<int, string> LicenseAccountObj; | |
113 | + int i = 0; | |
114 | + try | |
115 | + { | |
116 | + var result = dbContext.usp_GetAccountNumber(LicenseType).ToList(); | |
117 | + if (result.Count > 0) | |
118 | + { | |
119 | + foreach (var item in result) | |
120 | + { | |
121 | + LicenseAccountObj = new Tuple<int, string>(item.Id, item.AccountNumber); | |
122 | + LicenseAccountList.Add(LicenseAccountObj); | |
123 | + i++; | |
124 | + if (i >= 100) break; | |
125 | + } | |
126 | + } | |
127 | + } | |
128 | + catch (Exception ex) { } | |
129 | + return LicenseAccountList; | |
130 | + } | |
131 | + | |
107 | 132 | public static LicenseModel GetLicenseById(AIADatabaseV5Entities dbContext, int LicenseId) |
108 | 133 | { |
109 | 134 | LicenseModel LicenseObj = new LicenseModel(); |
... | ... | @@ -151,6 +176,61 @@ namespace AIAHTML5.ADMIN.API.Models |
151 | 176 | return LicenseObj; |
152 | 177 | } |
153 | 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 | + | |
154 | 234 | public static bool InsertLicense(AIADatabaseV5Entities dbContext, LicenseModel licenseModel) |
155 | 235 | { |
156 | 236 | bool status = false; |
... | ... | @@ -163,7 +243,7 @@ namespace AIAHTML5.ADMIN.API.Models |
163 | 243 | licenseModel.LicenseTypeId, licenseModel.AccountTypeId, licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, |
164 | 244 | licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, |
165 | 245 | licenseModel.TotalLogins, licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), |
166 | - licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.SiteUrlTo, | |
246 | + licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.SiteUrlTo, | |
167 | 247 | licenseModel.SiteUrlFrom, licenseModel.NoOfImages); |
168 | 248 | if (result.Count() > 0) |
169 | 249 | { |
... | ... | @@ -174,8 +254,8 @@ namespace AIAHTML5.ADMIN.API.Models |
174 | 254 | result = dbContext.InsertSingleLicenseAccount(licenseModel.AccountNumber, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName, licenseModel.AccountTypeId, |
175 | 255 | licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, licenseModel.City, licenseModel.Zip, |
176 | 256 | licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, licenseModel.TotalLogins, |
177 | - licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
178 | - licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.LoginId, licenseModel.Password, | |
257 | + licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
258 | + licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.LoginId, licenseModel.Password, | |
179 | 259 | licenseModel.SecurityQuestionId, licenseModel.Answer, licenseModel.CreatorId, licenseModel.NoOfImages); |
180 | 260 | if (result.Count() > 0) |
181 | 261 | { |
... | ... | @@ -209,7 +289,7 @@ namespace AIAHTML5.ADMIN.API.Models |
209 | 289 | result = dbContext.InsertTestLicenseAccount(licenseModel.AccountNumber, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName, |
210 | 290 | licenseModel.LoginId, licenseModel.Password, licenseModel.EmailId, licenseModel.AccountTypeId, licenseModel.TestLicenseEditionId, |
211 | 291 | licenseModel.Address1, licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, |
212 | - licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
292 | + licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
213 | 293 | licenseModel.CreatorId, licenseModel.NoOfImages); |
214 | 294 | if (result.Count() > 0) |
215 | 295 | { |
... | ... | @@ -233,9 +313,9 @@ namespace AIAHTML5.ADMIN.API.Models |
233 | 313 | var result = dbContext.UpdateLicenseAccount(licenseModel.LicenseId, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName, |
234 | 314 | licenseModel.LicenseTypeId, licenseModel.AccountTypeId, licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, |
235 | 315 | licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, |
236 | - (byte)(licenseModel.IsActive == false ? 0 : 1), licenseModel.TotalLogins, (byte)(licenseModel.IsRenew == false ? 0 : 1), | |
237 | - licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
238 | - licenseModel.RenewDate.ToString("MM/dd/yyyy"), licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, | |
316 | + (byte)(licenseModel.IsActive == false ? 0 : 1), licenseModel.TotalLogins, (byte)(licenseModel.IsRenew == false ? 0 : 1), | |
317 | + licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"), | |
318 | + licenseModel.RenewDate.ToString("MM/dd/yyyy"), licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, | |
239 | 319 | licenseModel.ProductKey, licenseModel.SiteUrlTo, licenseModel.SiteUrlFrom, licenseModel.NoOfImages); |
240 | 320 | if (result.Count() > 0) |
241 | 321 | { |
... | ... | @@ -254,20 +334,93 @@ namespace AIAHTML5.ADMIN.API.Models |
254 | 334 | try |
255 | 335 | { |
256 | 336 | var spStatus = dbContext.DeleteLicense(LicenseId); |
257 | - if (spStatus.Count() > 0) | |
258 | - { | |
259 | - return true; | |
260 | - } | |
261 | - else | |
262 | - { | |
263 | - return false; | |
264 | - } | |
337 | + if (spStatus.Count() > 0) | |
338 | + { | |
339 | + return true; | |
340 | + } | |
341 | + else | |
342 | + { | |
343 | + return false; | |
344 | + } | |
265 | 345 | } |
266 | 346 | catch (Exception ex) |
267 | 347 | { |
268 | 348 | return false; |
269 | 349 | } |
270 | 350 | } |
351 | + | |
352 | + public static bool UpdateLicenseBasicSettings(AIADatabaseV5Entities dbContext, LicenseModel licenseModel) | |
353 | + { | |
354 | + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); | |
355 | + try | |
356 | + { | |
357 | + var result = dbContext.usp_UpdateLicenseBasicSettings(licenseModel.LicenseId, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName, | |
358 | + licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, licenseModel.City, licenseModel.Zip, | |
359 | + licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, spStatus); | |
360 | + return (bool)spStatus.Value; | |
361 | + } | |
362 | + catch (Exception ex) | |
363 | + { | |
364 | + return false; | |
365 | + } | |
366 | + } | |
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 | + | |
271 | 424 | } |
272 | 425 | |
273 | 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.Web/app/widget/MainMenu.html
1 | - | |
2 | -<div class="bodyWrap row container-fluid" > | |
3 | - <div class="col-sm-12 col-md-12 pageHeading"> | |
4 | - <!--<button type="button" class="btn btn-success pull-left toggleBar btn-sm" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </button>--> | |
5 | - <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar" style="padding-left: 15px; "> <i class="fa fa-bars"></i> </div> | |
6 | - <h4 class="pull-left" data-ng-bind="currentActiveModuleTitle"><!--{{currentActiveModuleTitle}}--></h4> | |
7 | - <div class="pull-right paddTop4 "> | |
8 | - <!--<div class="pull-right paddTop4 ">--> | |
9 | - <div role="group" ng-show="showTabButton" class="btn-group"> | |
10 | - <ul class="listgrid-view" role="tablist"> | |
11 | - <!--<li role="presentation" class="active" title="Image View"><a href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab" class="" ><i class=" fa fa-image"></i></a></li> | |
12 | - <li role="presentation" title="List View"><a href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab" class="" ><i class="fa fa-list-alt"></i></a></li>--> | |
13 | - <!--Working--> | |
14 | - <!--<li role="presentation" class="active" title="Image View"><i class=" fa fa-image txt-white cur-pot" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
15 | - <li role="presentation" title="List View"><i class="fa fa-list-alt txt-white cur-pot" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>--> | |
16 | - | |
17 | - <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==1}" title="Image View"><i class=" fa fa-image txt-white cur-pot" ng-click="setActiveTab(1)" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
18 | - <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==2}" title="List View"><i class="fa fa-list-alt txt-white cur-pot" ng-click="setActiveTab(2)" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li> | |
19 | - | |
20 | - </ul> | |
21 | - </div> | |
22 | - </div> | |
23 | - <div class="clearfix" style=""></div> | |
24 | - </div> | |
25 | - <!--Sidebar--> | |
26 | - <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> | |
27 | - <!--{{name}}--> | |
28 | - <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> | |
29 | - <li ng-repeat="module in userModules" ng-disabled="module.id==7|| module.id==8 || module.id==10 || module.id==13"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible();getModuleScrollPosition()" data-ng-bind="module.name" ng-class="HightLightModuleSelection('{{module.slug}}')" ng-disabled="module.id==7|| module.id==8 || module.id==10 || module.id==13"><!--{{module.name}}--></a></li> | |
30 | - </ul> | |
31 | - </div> | |
32 | - | |
33 | -</div> | |
34 | -<script src="../controllers/HomeController.js"></script> | |
35 | -<script src="app/services/AuthenticationService.js"></script> | |
36 | - | |
37 | - | |
38 | -<script> | |
39 | - $(function () { | |
40 | - | |
41 | - $(function () { | |
42 | - $('[data-toggle="tooltip"]').tooltip(); | |
43 | - }) | |
44 | - | |
45 | - }); | |
46 | -</script> | |
47 | -<script> | |
48 | - (function ($) { | |
49 | - $(window).load(function () { | |
50 | - $(".sidebar").mCustomScrollbar({ | |
51 | - autoHideScrollbar: true, | |
52 | - //theme:"rounded" | |
53 | - }); | |
54 | - }); | |
55 | - })(jQuery); | |
56 | -</script> | |
57 | -<script> | |
58 | - $(function () { | |
59 | - $(".modal").draggable(); | |
60 | - }); | |
61 | -</script> | |
62 | -<script> | |
63 | - $(function () { | |
64 | - "use strict"; | |
65 | - /*** Sidebar Toggle ***/ | |
66 | - var barPos = 0; | |
67 | - var bar = $('.sidebar'); | |
68 | - var main = $('.main'); | |
69 | - $('.toggleBar').click(function () { | |
70 | - | |
71 | - bar.toggleClass('active'); | |
72 | - main.toggleClass('active'); | |
73 | - }); | |
74 | - }); | |
75 | -</script> | |
76 | -<script> | |
77 | - $(".tooltip-custom").tooltip({ | |
78 | - tooltipClass: 'customTooltip' | |
79 | - }); | |
80 | -</script> | |
81 | - | |
1 | + | |
2 | +<div class="bodyWrap row container-fluid" > | |
3 | + <div class="col-sm-12 col-md-12 pageHeading"> | |
4 | + <!--<button type="button" class="btn btn-success pull-left toggleBar btn-sm" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar"> <i class="fa fa-bars"></i> </button>--> | |
5 | + <div class=" pull-left toggleBar toggleHeadingButton" data-toggle="tooltip" data-placement="top" title="Show/Hide Sidebar" style="padding-left: 15px; "> <i class="fa fa-bars"></i> </div> | |
6 | + <h4 class="pull-left" data-ng-bind="currentActiveModuleTitle"><!--{{currentActiveModuleTitle}}--></h4> | |
7 | + <div class="pull-right paddTop4 "> | |
8 | + <!--<div class="pull-right paddTop4 ">--> | |
9 | + <div role="group" ng-show="showTabButton" class="btn-group"> | |
10 | + <ul class="listgrid-view" role="tablist"> | |
11 | + <!--<li role="presentation" class="active" title="Image View"><a href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab" class="" ><i class=" fa fa-image"></i></a></li> | |
12 | + <li role="presentation" title="List View"><a href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab" class="" ><i class="fa fa-list-alt"></i></a></li>--> | |
13 | + <!--Working--> | |
14 | + <!--<li role="presentation" class="active" title="Image View"><i class=" fa fa-image txt-white cur-pot" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
15 | + <li role="presentation" title="List View"><i class="fa fa-list-alt txt-white cur-pot" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li>--> | |
16 | + | |
17 | + <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==1}" title="Image View"><i class=" fa fa-image txt-white cur-pot" ng-click="setActiveTab(1)" href="#grid-view" aria-controls="grid-view" role="tab" data-toggle="tab"></i></li> | |
18 | + <li role="presentation" class="tooltip-custom" ng-class="{'active':activeTab==2}" title="List View"><i class="fa fa-list-alt txt-white cur-pot" ng-click="setActiveTab(2)" href="#list-view" aria-controls="list-view" role="tab" data-toggle="tab"></i></li> | |
19 | + | |
20 | + </ul> | |
21 | + </div> | |
22 | + </div> | |
23 | + <div class="clearfix" style=""></div> | |
24 | + </div> | |
25 | + <!--Sidebar--> | |
26 | + <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> | |
27 | + <!--{{name}}--> | |
28 | + <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> | |
29 | + <li ng-repeat="module in userModules" ng-disabled="module.id==7|| module.id==8 || module.id==13"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible();getModuleScrollPosition()" data-ng-bind="module.name" ng-class="HightLightModuleSelection('{{module.slug}}')" ng-disabled="module.id==7|| module.id==8 || module.id==13"><!--{{module.name}}--></a></li> | |
30 | + </ul> | |
31 | + </div> | |
32 | + | |
33 | +</div> | |
34 | +<script src="../controllers/HomeController.js"></script> | |
35 | +<script src="app/services/AuthenticationService.js"></script> | |
36 | + | |
37 | + | |
38 | +<script> | |
39 | + $(function () { | |
40 | + | |
41 | + $(function () { | |
42 | + $('[data-toggle="tooltip"]').tooltip(); | |
43 | + }) | |
44 | + | |
45 | + }); | |
46 | +</script> | |
47 | +<script> | |
48 | + (function ($) { | |
49 | + $(window).load(function () { | |
50 | + $(".sidebar").mCustomScrollbar({ | |
51 | + autoHideScrollbar: true, | |
52 | + //theme:"rounded" | |
53 | + }); | |
54 | + }); | |
55 | + })(jQuery); | |
56 | +</script> | |
57 | +<script> | |
58 | + $(function () { | |
59 | + $(".modal").draggable(); | |
60 | + }); | |
61 | +</script> | |
62 | +<script> | |
63 | + $(function () { | |
64 | + "use strict"; | |
65 | + /*** Sidebar Toggle ***/ | |
66 | + var barPos = 0; | |
67 | + var bar = $('.sidebar'); | |
68 | + var main = $('.main'); | |
69 | + $('.toggleBar').click(function () { | |
70 | + | |
71 | + bar.toggleClass('active'); | |
72 | + main.toggleClass('active'); | |
73 | + }); | |
74 | + }); | |
75 | +</script> | |
76 | +<script> | |
77 | + $(".tooltip-custom").tooltip({ | |
78 | + tooltipClass: 'customTooltip' | |
79 | + }); | |
80 | +</script> | |
81 | + | ... | ... |
400-SOURCECODE/AIAHTML5.Web/index.html
... | ... | @@ -1255,9 +1255,6 @@ |
1255 | 1255 | <div class="form-group" id="moduleDiv8"> |
1256 | 1256 | <div class="col-sm-8"><i>โข Anatomy Test</i></div> <!--(To be available by 08/28/2017)--> |
1257 | 1257 | </div> |
1258 | - <div class="form-group" id="moduleDiv10"> | |
1259 | - <div class="col-sm-8"><i>โข Lab Exercises</i></div> <!--(To be available by 08/16/2017)--> | |
1260 | - </div> | |
1261 | 1258 | <div class="form-group" id="moduleDiv13"> |
1262 | 1259 | <div class="col-sm-8">โข A.D.A.M Images</div> |
1263 | 1260 | </div> | ... | ... |
400-SOURCECODE/Admin/dist/assets/styles/admin-custom.css
400-SOURCECODE/Admin/dist/index.html
1 | - | |
2 | -<!DOCTYPE html> | |
3 | -<html lang="en"> | |
4 | -<head> | |
5 | - <meta charset="utf-8"> | |
6 | - <meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
7 | - <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no"> | |
8 | - <title>A.D.A.M. Interactive Anatomy</title> | |
9 | - <link href="assets/styles/bootstrap.css" rel="stylesheet"> | |
10 | - <link href="assets/styles/main.css" rel="stylesheet"> | |
11 | - <link href="assets/styles/admin-custom.css" rel="stylesheet"> | |
12 | - <link href="assets/styles/angular-custom.css" rel="stylesheet"> | |
13 | - <link href="assets/styles/bootstrap-datetimepicker.min.css" rel="stylesheet"> | |
14 | - <link href="assets/styles/bootstrap-spinner.css" rel="stylesheet"> | |
15 | - <link rel="stylesheet" href="https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css" /> | |
16 | - <link href="assets/styles/fixed_table_rc.css" type="text/css" rel="stylesheet" media="all" /> | |
17 | - <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"> | |
18 | - <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic"> | |
19 | - | |
20 | - <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> | |
21 | - <!-- WARNING: Respond.js doesn't work if you view the page via file:// --> | |
22 | - <!--[if lt IE 9]> | |
1 | +<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no"><title>A.D.A.M. Interactive Anatomy</title><link href="assets/styles/bootstrap.css" rel="stylesheet"><link href="assets/styles/main.css" rel="stylesheet"><link href="assets/styles/admin-custom.css" rel="stylesheet"><link href="assets/styles/angular-custom.css" rel="stylesheet"><link href="assets/styles/bootstrap-datetimepicker.min.css" rel="stylesheet"><link href="assets/styles/bootstrap-spinner.css" rel="stylesheet"><link rel="stylesheet" href="https://unpkg.com/ngx-bootstrap/datepicker/bs-datepicker.css"/><link href="assets/styles/fixed_table_rc.css" type="text/css" rel="stylesheet" media="all"/><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css"><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:400,800,700,600,400italic"><!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --><!-- WARNING: Respond.js doesn't work if you view the page via file:// --><!--[if lt IE 9]> | |
23 | 2 | <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> |
24 | 3 | <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> |
25 | - <![endif]--> | |
26 | - | |
27 | -</head> | |
28 | -<body> | |
29 | - <div class="container-fluid"> | |
30 | - <div id="global-loading"></div> | |
31 | - <div id="loading-mask"></div> | |
32 | - <app-component></app-component> | |
33 | - </div> | |
34 | - | |
35 | - <script src="assets/scripts/jquery-1.11.3.min.js"></script> | |
36 | - <script src="assets/scripts/bootstrap.js"></script> | |
37 | - <script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script> | |
38 | - <script src="https://meetselva.github.io/fixed-table-rows-cols/js/sortable_table.js" type="text/javascript"></script> | |
39 | - <script src="assets/scripts/fixed_table_rc.js" type="text/javascript"></script> | |
40 | - <!--Nav--> | |
41 | - <script> | |
42 | - $(function () { | |
4 | + <![endif]--><link href="styles.d41d8cd98f00b204e980.bundle.css" rel="stylesheet"/></head><body><div class="container-fluid"><div id="global-loading"></div><div id="loading-mask"></div><app-component></app-component></div><script src="assets/scripts/jquery-1.11.3.min.js"></script><script src="assets/scripts/bootstrap.js"></script><script src="http://code.jquery.com/ui/1.11.4/jquery-ui.js"></script><script src="https://meetselva.github.io/fixed-table-rows-cols/js/sortable_table.js" type="text/javascript"></script><script src="assets/scripts/fixed_table_rc.js" type="text/javascript"></script><!--Nav--><script>$(function () { | |
43 | 5 | $("#slider-range-min-2").slider({ |
44 | 6 | range: "min", |
45 | 7 | min: 1, |
... | ... | @@ -51,10 +13,7 @@ |
51 | 13 | }); |
52 | 14 | $("#amount-2").val($("#slider-vertical-2").slider("value")); |
53 | 15 | |
54 | - }); | |
55 | - </script> | |
56 | - <script> | |
57 | - $(function () { | |
16 | + });</script><script>$(function () { | |
58 | 17 | |
59 | 18 | |
60 | 19 | //$('#fixed_hdr2').fxdHdrCol({ |
... | ... | @@ -76,14 +35,6 @@ |
76 | 35 | // ], |
77 | 36 | // sort: true |
78 | 37 | //}); |
79 | - }); | |
80 | - </script> | |
81 | - <!--Nav--> | |
82 | - | |
83 | - <script> | |
84 | - $('.modal').draggable({ | |
38 | + });</script><!--Nav--><script>$('.modal').draggable({ | |
85 | 39 | handle: '.modal-header' |
86 | - }) | |
87 | - </script> | |
88 | -<script type="text/javascript" src="inline.bundle.js"></script><script type="text/javascript" src="polyfills.bundle.js"></script><script type="text/javascript" src="styles.bundle.js"></script><script type="text/javascript" src="vendor.bundle.js"></script><script type="text/javascript" src="main.bundle.js"></script></body> | |
89 | -</html> | |
40 | + })</script><script type="text/javascript" src="inline.e3bb4443248108769d6d.bundle.js"></script><script type="text/javascript" src="polyfills.35726d60cdf25fecc5f1.bundle.js"></script><script type="text/javascript" src="vendor.a409cb1c2d64015b0bed.bundle.js"></script><script type="text/javascript" src="main.15a80b0c5f7c541ad212.bundle.js"></script></body></html> | |
90 | 41 | \ No newline at end of file | ... | ... |
400-SOURCECODE/Admin/src/app/app.component.html
... | ... | @@ -33,10 +33,10 @@ |
33 | 33 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Profile<span class="caret"></span></a> |
34 | 34 | <ul class="dropdown-menu"> |
35 | 35 | <li><a [routerLink]="['updateuserprofile']">Update Profile</a></li> |
36 | - | |
36 | + | |
37 | 37 | <li><a [routerLink]="['changeuserpassword']">Change Password</a></li> |
38 | - | |
39 | - <li><a [routerLink]="['changeuserid']">Change User ID</a></li> | |
38 | + | |
39 | + <li><a [routerLink]="['changeuserid']">Change User ID</a></li> | |
40 | 40 | <li><!--<a href="admin-change-user-id.html">Change User ID</a>--></li> |
41 | 41 | </ul> |
42 | 42 | </li> |
... | ... | @@ -81,15 +81,15 @@ |
81 | 81 | <li class="dropdown"> |
82 | 82 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Site Account<span class="caret"></span></a> |
83 | 83 | <ul class="dropdown-menu"> |
84 | - <li><a href="admin-add-building-level-account.html">Add Building Level Account</a></li> | |
84 | + <li><a [routerLink]="['sitelicenseaccount']">Add Building Level Account</a></li> | |
85 | 85 | </ul> |
86 | 86 | </li> |
87 | 87 | <li class="dropdown"> |
88 | 88 | <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Profile<span class="caret"></span></a> |
89 | 89 | <ul class="dropdown-menu"> |
90 | - <li><a href="admin-view-update-profile.html">View/Update Profile</a></li> | |
91 | - <li><a href="admin-manage-modesty-settings.html">Manage Modesty Settings</a></li> | |
92 | - <li><a href="admin-manage-module.html">Manage Module</a></li> | |
90 | + <li><a [routerLink]="['editlicensebasicsettings']">View/Update Profile</a></li> | |
91 | + <li><a [routerLink]="['licensemodestysettings']">Manage Modesty Settings</a></li> | |
92 | + <li><a [routerLink]="['licensemodulesettings']">Manage Module</a></li> | |
93 | 93 | </ul> |
94 | 94 | </li> |
95 | 95 | <li><a href="#">Product</a></li> | ... | ... |
400-SOURCECODE/Admin/src/app/app.module.ts
... | ... | @@ -29,6 +29,10 @@ import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionr |
29 | 29 | import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component'; |
30 | 30 | import { DiscountCodeReport } from './components/Reports/discountcodereport.component'; |
31 | 31 | import { ImageExportReport } from './components/Reports/imageexportreport.component'; |
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'; | |
32 | 36 | import { AppComponent } from './app.component'; |
33 | 37 | import { AppRoutingModule } from './app.routing.module'; |
34 | 38 | //import { AuthGuard } from '../app/authguard.service'; |
... | ... | @@ -50,7 +54,11 @@ import { LoadingService } from './shared/loading.service'; |
50 | 54 | AppComponent, ConfirmComponent, |
51 | 55 | SubscriptionPrice, ManageDiscountCode, ContenteditableModelDirective, AddLicense, SearchLicense, |
52 | 56 | UsageReport, CustomerSummaryReport, |
53 | - ExpiringSubscriptionReport, SubscriptionReport, SubscriptionCancellationReport, NetAdSubscriptionReport, SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport | |
57 | + ExpiringSubscriptionReport, SubscriptionReport, | |
58 | + SubscriptionCancellationReport, NetAdSubscriptionReport, | |
59 | + SiteLicenseUsageReport, DiscountCodeReport, ImageExportReport, | |
60 | + EditLicenseBasicSettings, LicenseModestySettings, | |
61 | + LicenseModuleSettings, SiteLicenseAccount, | |
54 | 62 | ], |
55 | 63 | imports: [ |
56 | 64 | BrowserModule, AppRoutingModule, HttpClientModule, FormsModule, ReactiveFormsModule, HttpModule, Ng2Bs3ModalModule, | ... | ... |
400-SOURCECODE/Admin/src/app/app.routing.module.ts
... | ... | @@ -19,6 +19,10 @@ import { NetAdSubscriptionReport } from './components/Reports/netadsubscriptionr |
19 | 19 | import { SiteLicenseUsageReport } from './components/Reports/sitelicenseusagereport.component'; |
20 | 20 | import { DiscountCodeReport } from './components/Reports/discountcodereport.component'; |
21 | 21 | import { ImageExportReport } from './components/Reports/imageexportreport.component'; |
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'; | |
22 | 26 | const appRoutes: Routes = [ |
23 | 27 | //{ path: '', redirectTo:'updateuserprofile',pathMatch } |
24 | 28 | { path: 'updateuserprofile', component: UpdateUserProfile }, |
... | ... | @@ -40,7 +44,11 @@ const appRoutes: Routes = [ |
40 | 44 | { path: 'netadsubscriptionreport', component: NetAdSubscriptionReport }, |
41 | 45 | { path: 'sitelicenseusagereport', component: SiteLicenseUsageReport }, |
42 | 46 | { path: 'discountcodereport', component: DiscountCodeReport }, |
43 | - { path: 'imageexportreport', component: ImageExportReport } | |
47 | + { path: 'imageexportreport', component: ImageExportReport }, | |
48 | + { path: 'editlicensebasicsettings', component: EditLicenseBasicSettings }, | |
49 | + { path: 'licensemodestysettings', component: LicenseModestySettings }, | |
50 | + { path: 'licensemodulesettings', component: LicenseModuleSettings }, | |
51 | + { path: 'sitelicenseaccount', component: SiteLicenseAccount } | |
44 | 52 | ]; |
45 | 53 | |
46 | 54 | @NgModule({ | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.html
... | ... | @@ -18,474 +18,171 @@ |
18 | 18 | </div> |
19 | 19 | </ng-template> |
20 | 20 | |
21 | - <div class="col-sm-12"> | |
22 | - | |
23 | - <div class="container-fluid main-full"> | |
24 | - | |
25 | - <form class="row" [formGroup]="updateLicenseBasicSettingsFrm" (submit)="UpdateLicenseBasicSettings(templatesuccess)"> | |
26 | - | |
27 | - <div class="well marginBtm12"> | |
28 | - | |
29 | - <div class="row" *ngIf="alerts != ''"> | |
30 | - <div class="col-xs-12"> | |
31 | - <div class="alert alert-danger" [innerHTML]="alerts"> | |
32 | - </div> | |
33 | - </div> | |
34 | - </div> | |
35 | - | |
21 | + <!-- container --> | |
22 | + <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> | |
23 | + <div class="container-fluid main-full"> | |
36 | 24 | <div class="row"> |
37 | 25 | |
38 | - <div class="col-sm-8"> | |
39 | - | |
40 | - <div class="row"> | |
41 | - <input type="hidden" formControlName="licenseId"/> | |
42 | - <input type="hidden" formControlName="creatorId"/> | |
43 | - | |
44 | - <div class="row"> | |
45 | - <div class="col-sm-12"> | |
46 | - <div class="form-group marginTop5"> | |
47 | - <label for="LicenseType" class="col-sm-12 col-lg-3 control-label text-right-lg paddTop7 padd-left0"> License Type <span class="red">*</span> : </label> | |
48 | - <div class="col-sm-12 col-lg-3 padd-left0 padd-right0"> | |
49 | - <select *ngIf="license.LicenseId > 0" class="form-control input-sm" id="LicenseType" formControlName="licenseTypeId" (change)="LicenseTypeChanged($event.target.value)" disabled> | |
50 | - <option *ngFor="let item of lstLicenceType" value="{{item.Id}}"> | |
51 | - {{item.Title}} | |
52 | - </option> | |
53 | - </select> | |
54 | - <select *ngIf="license.LicenseId == 0" class="form-control input-sm" id="LicenseType" formControlName="licenseTypeId" (change)="LicenseTypeChanged($event.target.value)"> | |
55 | - <option *ngFor="let item of lstLicenceType" value="{{item.Id}}"> | |
56 | - {{item.Title}} | |
57 | - </option> | |
58 | - </select> | |
59 | - </div> | |
60 | - </div> | |
61 | - </div> | |
62 | - </div> | |
63 | - | |
64 | - <div class="col-sm-12" *ngIf="(license.LicenseId > 0) || (license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value != 5)"> | |
65 | - <div class="table-responsive"> | |
66 | - <table class="table table-condensed table-bordered table-striped table-hover marginTop10"> | |
67 | - <thead> | |
68 | - <tr> | |
69 | - <th> </th> | |
70 | - <th>Product</th> | |
71 | - <th [style.visibility]="(this.insertUpdateLicenseFrm.controls['licenseTypeId'].value != 3) ? 'visible' : 'hidden'">No of Login</th> | |
72 | - </tr> | |
73 | - </thead> | |
74 | - <tbody> | |
75 | - <tr *ngFor="let item of this.insertUpdateLicenseFrm.controls['editionLoginArr'].value; let i = index"> | |
76 | - <td align="center"> | |
77 | - <input type="checkbox" (change)="onChange(item, $event.target.checked)" [checked]="item.Login"> | |
78 | - </td> | |
79 | - <td>{{item.Title}}</td> | |
80 | - <td contenteditable="true" [(contenteditableModel)]="item.Login" (blur)="OnLoginBlur()" [style.visibility]="(this.insertUpdateLicenseFrm.controls['licenseTypeId'].value != 3) ? 'visible' : 'hidden'">{{item.Login}}</td> | |
81 | - </tr> | |
82 | - </tbody> | |
83 | - </table> | |
84 | - </div> | |
85 | - </div> | |
86 | - | |
87 | - <div class="col-sm-12"> | |
88 | - <div class="form-group"> | |
89 | - <div class="col-sm-4" *ngIf="(license.LicenseId > 0 || license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value != 5)"> | |
90 | - <label>Total Login : </label> | |
91 | - <input type="hidden" formControlName="totalLogins"/> | |
92 | - <span class="text-primary font-bold">{{license.TotalLogins}}</span> | |
93 | - </div> | |
94 | - <div class="col-sm-4" *ngIf="license.LicenseId > 0"> | |
95 | - <label>Total Renewals : </label> | |
96 | - <input type="hidden" formControlName="totalRenewals"/> | |
97 | - <span class="text-primary font-bold">{{license.TotalRenewals}}</span> | |
98 | - </div> | |
99 | - <div class="checkbox" *ngIf="license.LicenseId > 0"> | |
100 | - <label> | |
101 | - <input formControlName="renew" type="checkbox"> <span style="font-weight: bold">Renew</span> | |
102 | - </label> | |
103 | - </div> | |
104 | - </div> | |
105 | - </div> | |
106 | - | |
107 | - <div class="row"> | |
108 | - | |
109 | - <div class="col-sm-12"> | |
110 | - | |
111 | - <div class="col-sm-6"> | |
112 | - <div class="form-group marginTop5"> | |
113 | - <label for="AccountNo" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account No <span class="red">*</span> : </label> | |
114 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
115 | - <input type="text" class="form-control input-sm" id="AccountNo" formControlName="accountNumber" maxlength="16"> | |
116 | - <div *ngIf="insertUpdateLicenseFrm.controls.accountNumber.hasError('required') && insertUpdateLicenseFrm.controls.accountNumber.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Account number is required</div> | |
117 | - </div> | |
118 | - </div> | |
119 | - </div> | |
26 | + <div class="well"> | |
120 | 27 | |
121 | - <div class="col-sm-6" *ngIf="license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 5"> | |
122 | - <div class="form-group marginTop5"> | |
123 | - <label for="TestLicenseEdition" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Edition <span class="red">*</span> : </label> | |
124 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
125 | - <select class="form-control input-sm" id="TestLicenseEdition" formControlName="testLicenseEditionId"> | |
126 | - <option *ngFor="let item of this.lstEdition; let i = index" value="{{item.Id}}"> | |
127 | - {{item.Title}} | |
128 | - </option> | |
129 | - </select> | |
130 | - </div> | |
131 | - </div> | |
132 | - </div> | |
133 | - | |
134 | - <div class="col-sm-6"> | |
135 | - <div class="form-group marginTop5"> | |
136 | - <label for="ProductKey" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Product Key : </label> | |
137 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
138 | - <input type="text" class="form-control input-sm" id="ProductKey" formControlName="productId" maxlength="50"> | |
139 | - </div> | |
28 | + <div class="row" *ngIf="alerts != ''"> | |
29 | + <div class="col-xs-12"> | |
30 | + <div class="alert alert-danger" [innerHTML]="alerts"> | |
140 | 31 | </div> |
141 | 32 | </div> |
142 | - | |
143 | 33 | </div> |
144 | 34 | |
145 | - </div> | |
146 | - | |
147 | - <div class="row"> | |
148 | - | |
149 | - <div class="col-sm-12"> | |
150 | - | |
151 | - <div class="col-sm-6"> | |
152 | - <div class="form-group marginTop5"> | |
153 | - <label for="LicenseeFirstName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Licensee First Name <span class="red">*</span> : </label> | |
154 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
155 | - <input type="text" class="form-control input-sm" id="LicenseeFirstName" formControlName="licenseeFirstName" maxlength="50"> | |
156 | - <div *ngIf="insertUpdateLicenseFrm.controls.licenseeFirstName.hasError('required') && insertUpdateLicenseFrm.controls.licenseeFirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Licensee first name is required</div> | |
157 | - </div> | |
158 | - </div> | |
159 | - </div> | |
160 | - | |
161 | - <div class="col-sm-6"> | |
162 | - <div class="form-group marginTop5"> | |
163 | - <label for="LicenseelastName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Licensee Last Name <span class="red">*</span> : </label> | |
164 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
165 | - <input type="text" class="form-control input-sm" id="LicenseelastName" formControlName="licenseeLastName" maxlength="50"> | |
166 | - <div *ngIf="insertUpdateLicenseFrm.controls.licenseeLastName.hasError('required') && insertUpdateLicenseFrm.controls.licenseeLastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Licensee last name is required</div> | |
167 | - </div> | |
168 | - </div> | |
169 | - </div> | |
170 | - | |
171 | - </div> | |
35 | + <div class="row"> | |
172 | 36 | |
173 | - </div> | |
37 | + <div class="col-sm-12"> | |
174 | 38 | |
175 | - <div class="row"> | |
176 | - <div class="col-sm-12"> | |
177 | - <div class="col-sm-6"> | |
178 | - <div class="form-group marginTop5"> | |
179 | - <label for="AccountType" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Account Type <span class="red">*</span> : </label> | |
180 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
181 | - <select class="form-control input-sm" id="AccountType" formControlName="accountTypeId"> | |
182 | - <option *ngFor="let item of lstAccountType" value="{{item.Id}}"> | |
183 | - {{item.Title}} | |
184 | - </option> | |
185 | - </select> | |
186 | - </div> | |
187 | - </div> | |
188 | - </div> | |
189 | - <div class="col-sm-6"> | |
190 | - <div class="form-group marginTop5"> | |
191 | - <label for="InstitutionName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Institution Name <span class="red">*</span> : </label> | |
192 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
193 | - <input type="text" class="form-control input-sm" id="InstitutionName" formControlName="institutionName" maxlength="100"> | |
194 | - <div *ngIf="insertUpdateLicenseFrm.controls.institutionName.hasError('required') && insertUpdateLicenseFrm.controls.institutionName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Institution name is required</div> | |
195 | - </div> | |
196 | - </div> | |
197 | - </div> | |
198 | - </div> | |
199 | - </div> | |
39 | + <div class="panel-body"> | |
200 | 40 | |
201 | - <div class="row"> | |
202 | - <div class="col-sm-12"> | |
203 | - <div class="col-sm-6"> | |
204 | - <div class="form-group marginTop5"> | |
205 | - <label for="Address" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Address <span class="red">*</span> : </label> | |
206 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
207 | - <input type="text" class="form-control input-sm" id="Address" formControlName="address1" maxlength="100"> | |
208 | - <div *ngIf="insertUpdateLicenseFrm.controls.address1.hasError('required') && insertUpdateLicenseFrm.controls.address1.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Address is required</div> | |
209 | - </div> | |
210 | - </div> | |
211 | - </div> | |
212 | - <div class="col-sm-6"> | |
213 | - <div class="form-group marginTop5"> | |
214 | - <label for="City" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">City <span class="red">*</span> : </label> | |
215 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
216 | - <input type="text" class="form-control input-sm" id="City" formControlName="city" maxlength="50"> | |
217 | - <div *ngIf="insertUpdateLicenseFrm.controls.city.hasError('required') && insertUpdateLicenseFrm.controls.city.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">City is required</div> | |
218 | - </div> | |
219 | - </div> | |
220 | - </div> | |
41 | + <!-- form --> | |
42 | + <form class="form-horizontal" [formGroup]="updateLicenseBasicSettingsFrm" (submit)="UpdateLicenseBasicSettings(templatesuccess)"> | |
43 | + | |
44 | + <div class="form-group"> | |
45 | + <label for="inputEmail3" class="col-sm-4 control-label">Account Number :</label> | |
46 | + <div class="col-sm-7"> | |
47 | + <select class="form-control input-sm" id="LicenseId" formControlName="licenseId" (change)="AccountNumberChanged($event.target.value)"> | |
48 | + <option value="0">Select</option> | |
49 | + <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}"> | |
50 | + {{item.m_Item2}} | |
51 | + </option> | |
52 | + </select> | |
221 | 53 | </div> |
222 | 54 | </div> |
223 | 55 | |
224 | - | |
225 | - <div class="row"> | |
226 | - <div class="col-sm-12"> | |
227 | - <div class="col-sm-6"> | |
228 | - <div class="form-group marginTop5"> | |
229 | - <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">State (only U.S.) <span class="red">*</span> :</label> | |
230 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
231 | - <select class="form-control input-sm " id="State" formControlName="stateId"> | |
232 | - <option *ngFor="let item of lstState" value="{{item.Id}}"> | |
233 | - {{item.StateName}} | |
234 | - </option> | |
235 | - </select> | |
236 | - </div> | |
237 | - </div> | |
238 | - </div> | |
239 | - <div class="col-sm-6"> | |
240 | - <div class="form-group marginTop5"> | |
241 | - <label for="Country" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Country <span class="red">*</span> :</label> | |
242 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
243 | - <select class="form-control input-sm" id="Country" formControlName="countryId"> | |
244 | - <option *ngFor="let item of lstCountry" value="{{item.Id}}"> | |
245 | - {{item.CountryName}} | |
246 | - </option> | |
247 | - </select> | |
248 | - </div> | |
249 | - </div> | |
56 | + <div class="form-group"> | |
57 | + <label for="inputPassword3" class="col-sm-4 control-label">Licensee First Name <span class="red">*</span> :</label> | |
58 | + <div class="col-sm-7"> | |
59 | + <input type="text" class="form-control input-sm" id="LicenseeFirstName" formControlName="licenseeFirstName" maxlength="50"> | |
60 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.licenseeFirstName.hasError('required') && updateLicenseBasicSettingsFrm.controls.licenseeFirstName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Licensee first name is required</div> | |
250 | 61 | </div> |
251 | - </div> | |
252 | 62 | </div> |
253 | 63 | |
254 | - <div class="row"> | |
255 | - <div class="col-sm-12"> | |
256 | - <div class="col-sm-6"> | |
257 | - <div class="form-group marginTop5"> | |
258 | - <label for="Zip" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Zip <span class="red">*</span> : </label> | |
259 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
260 | - <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> | |
261 | - <div *ngIf="insertUpdateLicenseFrm.controls.zip.hasError('required') && insertUpdateLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> | |
262 | - </div> | |
263 | - </div> | |
264 | - </div> | |
265 | - <div class="col-sm-6"> | |
266 | - <div class="form-group marginTop5"> | |
267 | - <label for="Phone" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Phone <span class="red">*</span> : </label> | |
268 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
269 | - <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30"> | |
270 | - <div *ngIf="insertUpdateLicenseFrm.controls.phone.hasError('required') && insertUpdateLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> | |
271 | - </div> | |
272 | - </div> | |
273 | - </div> | |
64 | + <div class="form-group"> | |
65 | + <label for="inputPassword3" class="col-sm-4 control-label">Licensee Last Name <span class="red">*</span> :</label> | |
66 | + <div class="col-sm-7"> | |
67 | + <input type="text" class="form-control input-sm" id="LicenseeLastName" formControlName="licenseeFirstName" maxlength="50"> | |
68 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.licenseeLastName.hasError('required') && updateLicenseBasicSettingsFrm.controls.licenseeLastName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Licensee first name is required</div> | |
274 | 69 | </div> |
275 | 70 | </div> |
276 | 71 | |
277 | - <div class="row"> | |
278 | - <div class="col-sm-12"> | |
279 | - <div class="col-sm-6"> | |
280 | - <div class="form-group marginTop5"> | |
281 | - <label for="Email" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Email ID <span class="red">*</span> : </label> | |
282 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
283 | - <input type="email" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50"> | |
284 | - <div *ngIf="insertUpdateLicenseFrm.controls.emailId.hasError('required') && insertUpdateLicenseFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is required</div> | |
285 | - </div> | |
286 | - </div> | |
287 | - </div> | |
72 | + <div class="form-group"> | |
73 | + <label for="inputPassword3" class="col-sm-4 control-label">Institution Name <span class="red">*</span> :</label> | |
74 | + <div class="col-sm-7"> | |
75 | + <input type="text" class="form-control input-sm" id="InstitutionName" formControlName="institutionName" maxlength="100"> | |
76 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.institutionName.hasError('required') && updateLicenseBasicSettingsFrm.controls.institutionName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Institution name is required</div> | |
288 | 77 | </div> |
289 | 78 | </div> |
290 | - </div> | |
291 | - </div> | |
292 | 79 | |
293 | - <div class="col-sm-4"> | |
294 | - <div class="row"> | |
295 | - | |
296 | - <div class="col-sm-12"> | |
297 | - <div class="form-group marginTop5"> | |
298 | - <label for="SubscriptionStartDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Subscription Start Date<span class="red">*</span>:</label> | |
299 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
300 | - <div id="datetimepicker1" class="input-group input-group-sm input-append date"> | |
301 | - <input type="text" class="form-control" id="SubscriptionStartDate" formControlName="subscriptionStartDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | |
302 | - <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionStartDate.hasError('required') && insertUpdateLicenseFrm.controls.subscriptionStartDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription start date is required</div> | |
303 | - <span class="input-group-btn add-on"> | |
304 | - <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | |
305 | - </span> | |
306 | - </div> | |
307 | - </div> | |
80 | + <div class="form-group"> | |
81 | + <label for="inputEmail3" class="col-sm-4 control-label">Email ID <span class="red">*</span> :</label> | |
82 | + <div class="col-sm-7"> | |
83 | + <input type="email" class="form-control input-sm" id="Email" formControlName="emailId" maxlength="50"> | |
84 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.emailId.hasError('required') && updateLicenseBasicSettingsFrm.controls.emailId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Email is required</div> | |
308 | 85 | </div> |
309 | 86 | </div> |
310 | 87 | |
311 | - <div class="col-sm-12"> | |
312 | - <div class="form-group marginTop5"> | |
313 | - <label for="SubscriptionEndDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Subscription End Date <span class="red">*</span> :</label> | |
314 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
315 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | |
316 | - <input type="text" class="form-control" id="SubscriptionEndDate" formControlName="subscriptionEndDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | |
317 | - <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionEndDate.hasError('required') && insertUpdateLicenseFrm.controls.subscriptionEndDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription start date is required</div> | |
318 | - <span class="input-group-btn add-on"> | |
319 | - <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | |
320 | - </span> | |
321 | - </div> | |
322 | - </div> | |
88 | + <div class="form-group"> | |
89 | + <label for="inputEmail3" class="col-sm-4 control-label">Address 1 <span class="red">*</span> :</label> | |
90 | + <div class="col-sm-7"> | |
91 | + <input type="text" class="form-control input-sm" id="Address1" formControlName="address1" maxlength="100"> | |
92 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.address1.hasError('required') && updateLicenseBasicSettingsFrm.controls.address1.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Address 1 is required</div> | |
323 | 93 | </div> |
324 | 94 | </div> |
325 | 95 | |
326 | - <div class="col-sm-12" *ngIf="(license.LicenseId > 0 && insertUpdateLicenseFrm.controls.renew.value)"> | |
327 | - <div class="form-group marginTop5"> | |
328 | - <label for="RenewDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Renew Date <span class="red">*</span> :</label> | |
329 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
330 | - <div id="datetimepicker3" class="input-group input-group-sm input-append date"> | |
331 | - <input type="text" class="form-control" id="RenewDate" formControlName="renewDate" #dp3="bsDatepicker" bsDatepicker [(bsValue)]="bsValue3"> | |
332 | - <div *ngIf="insertUpdateLicenseFrm.controls.renewDate.hasError('required') && insertUpdateLicenseFrm.controls.renewDate.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Renew date is required</div> | |
333 | - <span class="input-group-btn add-on"> | |
334 | - <button class="btn btn-default" type="button" (click)="dp3.toggle()"><i class="fa fa-calendar"></i></button> | |
335 | - </span> | |
336 | - </div> | |
337 | - </div> | |
96 | + <div class="form-group"> | |
97 | + <label for="inputEmail3" class="col-sm-4 control-label">Address 2 :</label> | |
98 | + <div class="col-sm-7"> | |
99 | + <input type="text" class="form-control input-sm" id="Address2" formControlName="address2" maxlength="100"> | |
338 | 100 | </div> |
339 | 101 | </div> |
340 | 102 | |
341 | - <div class="col-sm-12"> | |
342 | - <div class="form-group marginTop5"> | |
343 | - <label for="SubscriptionPrice" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Subscription Price <span class="red">*</span> : </label> | |
344 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
345 | - <input type="text" class="form-control input-sm" id="SubscriptionPrice" formControlName="subscriptionPrice" maxlength="5"> | |
346 | - <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionPrice.hasError('required') && insertUpdateLicenseFrm.controls.subscriptionPrice.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price is required</div> | |
347 | - <div *ngIf="insertUpdateLicenseFrm.controls.subscriptionPrice.hasError('pattern') && insertUpdateLicenseFrm.controls.subscriptionPrice.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Subscription price must be numeric</div> | |
348 | - </div> | |
103 | + <div class="form-group"> | |
104 | + <label for="inputEmail3" class="col-sm-4 control-label">City <span class="red">*</span> :</label> | |
105 | + <div class="col-sm-7"> | |
106 | + <input type="text" class="form-control input-sm" id="City" formControlName="city" maxlength="50"> | |
107 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.city.hasError('required') && updateLicenseBasicSettingsFrm.controls.city.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">City is required</div> | |
349 | 108 | </div> |
350 | 109 | </div> |
351 | 110 | |
352 | - <div class="col-sm-12"> | |
353 | - <div class="form-group marginTop5"> | |
354 | - <label for="ExportImages" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">No. of Export Images <span class="red">*</span> : </label> | |
355 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
356 | - <input type="text" class="form-control input-sm" id="ExportImages" formControlName="noOfImages" maxlength="5"> | |
357 | - <div *ngIf="insertUpdateLicenseFrm.controls.noOfImages.hasError('required') && insertUpdateLicenseFrm.controls.noOfImages.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Number of export images is required</div> | |
358 | - <div *ngIf="insertUpdateLicenseFrm.controls.noOfImages.hasError('pattern') && insertUpdateLicenseFrm.controls.noOfImages.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Number of export images must be numeric</div> | |
359 | - </div> | |
111 | + <div class="form-group"> | |
112 | + <label for="inputEmail3" class="col-sm-4 control-label">Zip <span class="red">*</span> :</label> | |
113 | + <div class="col-sm-7"> | |
114 | + <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> | |
115 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.zip.hasError('required') && updateLicenseBasicSettingsFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> | |
360 | 116 | </div> |
361 | 117 | </div> |
362 | 118 | |
363 | - <div class="col-sm-12" *ngIf="this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 3"> | |
364 | - <div class="form-group marginTop5"> | |
365 | - <label for="MasterSiteURL" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Master Site URL <span class="red">*</span> : </label> | |
366 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
367 | - <input type="text" class="form-control input-sm" id="MasterSiteURL" formControlName="masterSiteUrl"> | |
368 | - </div> | |
369 | - </div> | |
370 | - </div> | |
371 | - | |
372 | - <div class="col-sm-12" *ngIf="this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 3"> | |
373 | - <div class="form-group marginTop5"> | |
374 | - <label for="SiteURLfrom" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Site URL (From) : </label> | |
375 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
376 | - <input type="text" class="form-control input-sm" id="SiteURLfrom" formControlName="siteUrlFrom"> | |
377 | - </div> | |
378 | - </div> | |
379 | - </div> | |
380 | - | |
381 | - <div class="col-sm-12" *ngIf="this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 3"> | |
382 | - <div class="form-group marginTop5"> | |
383 | - <label for="SiteURLto" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Site URL (To) : </label> | |
384 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
385 | - <input type="text" class="form-control input-sm" id="SiteURLto" formControlName="siteUrlTo"> | |
386 | - </div> | |
119 | + <div class="form-group"> | |
120 | + <label for="inputEmail3" class="col-sm-4 control-label">State (only U.S.) <span class="red">*</span> :</label> | |
121 | + <div class="col-sm-7"> | |
122 | + <select class="form-control input-sm " id="State" formControlName="stateId"> | |
123 | + <option value="0">Select</option> | |
124 | + <option *ngFor="let item of lstState" value="{{item.Id}}"> | |
125 | + {{item.StateName}} | |
126 | + </option> | |
127 | + </select> | |
387 | 128 | </div> |
388 | 129 | </div> |
389 | 130 | |
390 | - <div class="col-sm-12" *ngIf="license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2"> | |
391 | - <div class="form-group marginTop5"> | |
392 | - <label for="UserName1" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">User Name <span class="red">*</span> : </label> | |
393 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
394 | - <input type="text" class="form-control input-sm" id="UserName" formControlName="login" maxlength="50"> | |
395 | - <div *ngIf="insertUpdateLicenseFrm.controls.login.hasError('required') && insertUpdateLicenseFrm.controls.login.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">User name is required</div> | |
396 | - </div> | |
131 | + <div class="form-group"> | |
132 | + <label for="inputEmail3" class="col-sm-4 control-label">Country <span class="red">*</span> :</label> | |
133 | + <div class="col-sm-7"> | |
134 | + <select class="form-control input-sm" id="Country" formControlName="countryId"> | |
135 | + <option value="0">Select</option> | |
136 | + <option *ngFor="let item of lstCountry" value="{{item.Id}}"> | |
137 | + {{item.CountryName}} | |
138 | + </option> | |
139 | + </select> | |
397 | 140 | </div> |
398 | 141 | </div> |
399 | 142 | |
400 | - <div class="col-sm-12" *ngIf="license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2"> | |
401 | - <div class="form-group marginTop5"> | |
402 | - <label for="Password" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Password <span class="red">*</span> : </label> | |
403 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
404 | - <input type="password" class="form-control input-sm" id="Password" formControlName="password" maxlength="50"> | |
405 | - <div *ngIf="insertUpdateLicenseFrm.controls.password.hasError('required') && insertUpdateLicenseFrm.controls.password.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Password is required</div> | |
406 | - </div> | |
143 | + <div class="form-group"> | |
144 | + <label for="inputEmail3" class="col-sm-4 control-label">Phone <span class="red">*</span> :</label> | |
145 | + <div class="col-sm-7"> | |
146 | + <input type="text" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30"> | |
147 | + <div *ngIf="updateLicenseBasicSettingsFrm.controls.phone.hasError('required') && updateLicenseBasicSettingsFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> | |
407 | 148 | </div> |
408 | - </div> | |
149 | + </div> | |
409 | 150 | |
410 | - <div class="col-sm-12" *ngIf="license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2"> | |
411 | - <div class="form-group marginTop5"> | |
412 | - <label for="SecurityQuestion" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Security Question <span class="red">*</span> : </label> | |
413 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
414 | - <select class="form-control input-sm" id="SecurityQuestion" formControlName="securityQuestionId"> | |
415 | - <option value="0" selected>Select</option> | |
416 | - <option *ngFor="let item of lstSecurityQuestion" value="{{item.Id}}"> | |
417 | - {{item.Title}} | |
418 | - </option> | |
419 | - </select> | |
420 | - </div> | |
151 | + <div class="row"> | |
152 | + <div class="col-sm-12 marginTop20 text-center"> | |
153 | + <button type="submit" class="btn btn-primary btn-sm" [disabled]="!updateLicenseBasicSettingsFrm.valid"><i class="fa fa-check"></i> Update</button> | |
421 | 154 | </div> |
422 | 155 | </div> |
423 | 156 | |
424 | - <div class="col-sm-12" *ngIf="license.LicenseId == 0 && this.insertUpdateLicenseFrm.controls['licenseTypeId'].value == 2"> | |
425 | - <div class="form-group marginTop5"> | |
426 | - <label for="Answer" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Answer <span class="red">*</span> : </label> | |
427 | - <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
428 | - <input type="text" class="form-control input-sm" id="Answer" formControlName="answer" maxlength="50"> | |
429 | - <div *ngIf="insertUpdateLicenseFrm.controls.answer.hasError('required') && insertUpdateLicenseFrm.controls.answer.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Answer is required</div> | |
157 | + </form> | |
158 | + <!-- form --> | |
159 | + <!--modal--> | |
160 | + <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | |
161 | + <div class="modal-dialog modal-sm" role="document"> | |
162 | + <div class="modal-content"> | |
163 | + <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
164 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
165 | + <h4 class="modal-title" id="">Alert</h4> | |
430 | 166 | </div> |
431 | - </div> | |
432 | - </div> | |
433 | - | |
434 | - <div class="col-sm-12" *ngIf="license.LicenseId > 0"> | |
435 | - <div class="form-group marginTop5"> | |
436 | - <label for="status" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0" title="">Status : </label> | |
437 | - <div class="col-sm-6 marginTop5"> | |
438 | - <label class="radio-inline"> | |
439 | - <input name="isActive" value="true" type="radio" formControlName="isActive"> | |
440 | - Active | |
441 | - </label> | |
442 | - <label class="radio-inline"> | |
443 | - <input name="isActive" value="false" type="radio" formControlName="isActive"> | |
444 | - Inactive | |
445 | - </label> | |
446 | - </div> | |
167 | + <div class="modal-body"> | |
168 | + <h5>Please select your license account number.</h5> | |
447 | 169 | </div> |
448 | - </div> | |
449 | - | |
450 | - <div class="col-sm-12"> | |
451 | - <div class="row"> | |
452 | - <div class="col-sm-12 marginTop10 text-right"> | |
453 | - <button class="btn btn-primary btn-sm" type="submit" [disabled]="!insertUpdateLicenseFrm.valid"><i class="fa fa-plus-circle "></i> Save</button> | |
454 | - <button *ngIf="license.LicenseId > 0" class="btn btn-primary btn-sm" type="button" (click)="CancelAddEdit()"><i class="fa fa-close"></i> Cancel</button> | |
170 | + <div class="modal-footer"> | |
171 | + <div class="row"> | |
172 | + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
173 | + </div> | |
455 | 174 | </div> |
456 | - </div> | |
457 | - </div> | |
458 | - | |
175 | + | |
176 | + </div><!-- /.modal-content --> | |
177 | + </div><!-- /.modal-dialog --> | |
178 | + </div> | |
179 | + </div> | |
459 | 180 | </div> |
460 | 181 | </div> |
461 | 182 | </div> |
462 | 183 | </div> |
463 | - <!--modal--> | |
464 | - <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | |
465 | - <div class="modal-dialog modal-sm" role="document"> | |
466 | - <div class="modal-content"> | |
467 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
468 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
469 | - <h4 class="modal-title" id="">Alert</h4> | |
470 | - </div> | |
471 | - <div class="modal-body"> | |
472 | - <h5>Please select edition</h5> | |
473 | - </div> | |
474 | - <div class="modal-footer"> | |
475 | - <div class="row"> | |
476 | - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
477 | - </div> | |
478 | - </div> | |
479 | - | |
480 | - </div> | |
481 | - <!-- /.modal-content --> | |
482 | - </div> | |
483 | - <!-- /.modal-dialog --> | |
484 | - </div> | |
485 | - <!--modal--> | |
486 | - | |
487 | - </form> | |
488 | 184 | </div> |
489 | - </div> | |
185 | + </div> | |
186 | + <!-- container --> | |
490 | 187 | </div> |
491 | 188 | <!-- main-heading --> |
492 | 189 | \ No newline at end of file | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts
0 โ 100644
1 | +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; | |
2 | +import { LicenseService } from './license.service'; | |
3 | +import { GlobalService } from '../../Shared/global'; | |
4 | +import { Router, ActivatedRoute } from '@angular/router'; | |
5 | +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
6 | +import { License } from '../UserEntity/datamodel'; | |
7 | +import { BsDatepickerModule } from 'ngx-bootstrap'; | |
8 | +import { Http, Response } from '@angular/http'; | |
9 | +import { DatePipe } from '@angular/common'; | |
10 | +import { BsModalService } from 'ngx-bootstrap/modal'; | |
11 | +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; | |
12 | +import { ContenteditableModelDirective } from '../../shared/contenteditabledirective' | |
13 | + | |
14 | +@Component({ | |
15 | + templateUrl: './editlicensebasicsettings.component.html' | |
16 | +}) | |
17 | + | |
18 | +export class EditLicenseBasicSettings implements OnInit { | |
19 | + | |
20 | + lstAccountNumbers: any; | |
21 | + lstCountry: any; | |
22 | + lstState: any; | |
23 | + license: License; | |
24 | + updateLicenseBasicSettingsFrm: FormGroup; | |
25 | + error: any; | |
26 | + alerts: string; | |
27 | + modalAlerts: string; | |
28 | + modalRef: BsModalRef; | |
29 | + | |
30 | + constructor(private licenseService: LicenseService, private globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } | |
31 | + | |
32 | + ngOnInit(): void | |
33 | + { | |
34 | + this.license = new License(); | |
35 | + this.alerts = ''; | |
36 | + this.updateLicenseBasicSettingsFrm = this.fb.group({ | |
37 | + licenseId: [0], | |
38 | + accountNumber: ['', Validators.required], | |
39 | + licenseeFirstName: ['', Validators.required], | |
40 | + licenseeLastName: ['', Validators.required], | |
41 | + institutionName: ['', Validators.required], | |
42 | + address1: ['', Validators.required], | |
43 | + address2: [''], | |
44 | + city: ['', Validators.required], | |
45 | + stateId: [0], | |
46 | + countryId: [0], | |
47 | + zip: ['', Validators.required], | |
48 | + emailId: ['', Validators.required], | |
49 | + phone: ['', Validators.required], | |
50 | + }); | |
51 | + this.GetCountry(); | |
52 | + this.GetState(); | |
53 | + this.GetLicenseAccounts(); | |
54 | + } | |
55 | + | |
56 | + openModal(template: TemplateRef<any>) { | |
57 | + this.modalRef = this.modalService.show(template); | |
58 | + } | |
59 | + | |
60 | + GetCountry() { | |
61 | + this.licenseService.GetCountry() | |
62 | + .subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); | |
63 | + } | |
64 | + | |
65 | + GetState() { | |
66 | + this.licenseService.GetState() | |
67 | + .subscribe(st => { this.lstState = st; }, error => this.error = <any>error); | |
68 | + } | |
69 | + | |
70 | + GetLicenseAccounts() { | |
71 | + this.licenseService.GetLicenseAccounts(0) | |
72 | + .subscribe(st => { this.lstAccountNumbers = st; console.log(this.lstAccountNumbers); }, error => this.error = <any>error); | |
73 | + } | |
74 | + | |
75 | + GetLicenseById() { | |
76 | + if(this.license.LicenseId != 0) | |
77 | + { | |
78 | + this.licenseService.GetLicenseById(this.license.LicenseId) | |
79 | + .subscribe(st => { | |
80 | + this.license = st; | |
81 | + this.updateLicenseBasicSettingsFrm.controls['licenseId'].setValue(this.license.LicenseId); | |
82 | + this.updateLicenseBasicSettingsFrm.controls['accountNumber'].setValue(this.license.AccountNumber); | |
83 | + this.updateLicenseBasicSettingsFrm.controls['licenseeFirstName'].setValue(this.license.LicenseeFirstName); | |
84 | + this.updateLicenseBasicSettingsFrm.controls['licenseeLastName'].setValue(this.license.LicenseeLastName); | |
85 | + this.updateLicenseBasicSettingsFrm.controls['institutionName'].setValue(this.license.InstitutionName); | |
86 | + this.updateLicenseBasicSettingsFrm.controls['address1'].setValue(this.license.Address1); | |
87 | + this.updateLicenseBasicSettingsFrm.controls['address2'].setValue(this.license.Address2); | |
88 | + this.updateLicenseBasicSettingsFrm.controls['city'].setValue(this.license.City); | |
89 | + this.updateLicenseBasicSettingsFrm.controls['stateId'].setValue(this.license.StateId); | |
90 | + this.updateLicenseBasicSettingsFrm.controls['countryId'].setValue(this.license.CountryId); | |
91 | + this.updateLicenseBasicSettingsFrm.controls['zip'].setValue(this.license.Zip); | |
92 | + this.updateLicenseBasicSettingsFrm.controls['emailId'].setValue(this.license.EmailId); | |
93 | + this.updateLicenseBasicSettingsFrm.controls['phone'].setValue(this.license.Phone); | |
94 | + }, | |
95 | + error => this.error = <any>error); | |
96 | + } | |
97 | + } | |
98 | + | |
99 | + AccountNumberChanged(LicenseId: number){ | |
100 | + this.license.LicenseId = LicenseId; | |
101 | + this.GetLicenseById(); | |
102 | + } | |
103 | + | |
104 | + AfterUpdateData(data, template) { | |
105 | + if (data.Status == "false") { | |
106 | + this.alerts = "<span>License update unsuccessfull</span>"; | |
107 | + } else { | |
108 | + this.modalAlerts = "<p>License updated successfully</p>"; | |
109 | + this.modalRef = this.modalService.show(template); | |
110 | + } | |
111 | + } | |
112 | + | |
113 | + UpdateLicenseBasicSettings(template: TemplateRef<any>){ | |
114 | + this.alerts = ''; | |
115 | + if(this.alerts == ''){ | |
116 | + var obj = this.updateLicenseBasicSettingsFrm.value; | |
117 | + return this.licenseService.UpdateLicenseBasicSettings(obj) | |
118 | + .subscribe( | |
119 | + n => (this.AfterUpdateData(n, template)), | |
120 | + error => this.error = <any>error); | |
121 | + } | |
122 | + } | |
123 | + | |
124 | + | |
125 | +} | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts
... | ... | @@ -79,6 +79,42 @@ export class LicenseService{ |
79 | 79 | .catch((res: Response) => this.handleError(res)); |
80 | 80 | } |
81 | 81 | |
82 | + GetLicenseAccounts(licenseType: Number) { | |
83 | + return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseAccounts?LicenseType=" + licenseType) | |
84 | + .map(this.extractData) | |
85 | + .catch((res: Response) => this.handleError(res)); | |
86 | + } | |
87 | + | |
88 | + GetSiteById(siteId: number) { | |
89 | + return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteDetail?SiteId=" + siteId) | |
90 | + .map(this.extractData) | |
91 | + .catch((res: Response) => this.handleError(res)); | |
92 | + } | |
93 | + | |
94 | + GetSiteAccountEditions(siteId: number, licenseId: number) { | |
95 | + return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteAccountEditions?SiteId=" + siteId + "&LicenseId=" + licenseId) | |
96 | + .map(this.extractData) | |
97 | + .catch((res: Response) => this.handleError(res)); | |
98 | + } | |
99 | + | |
100 | + GetLicenseSites(accountNo: string) { | |
101 | + return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseSites?AccountNo=" + accountNo) | |
102 | + .map(this.extractData) | |
103 | + .catch((res: Response) => this.handleError(res)); | |
104 | + } | |
105 | + | |
106 | + GetLicenseModestySettings(licenseId: number, buildingLevelId: number) { | |
107 | + return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModestySettings?LicenseId=" + licenseId + "&BuildingLevelId=" + buildingLevelId) | |
108 | + .map(this.extractData) | |
109 | + .catch((res: Response) => this.handleError(res)); | |
110 | + } | |
111 | + | |
112 | + GetLicenseModulesStatus(licenseId: number) { | |
113 | + return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModulesStatus?LicenseId=" + licenseId) | |
114 | + .map(this.extractData) | |
115 | + .catch((res: Response) => this.handleError(res)); | |
116 | + } | |
117 | + | |
82 | 118 | InsertLicense(obj: any) { |
83 | 119 | //let options = new RequestOptions({ headers: this.headers }); |
84 | 120 | var jsonData = { |
... | ... | @@ -174,11 +210,138 @@ export class LicenseService{ |
174 | 210 | .catch((res: Response) => this.handleError(res)); |
175 | 211 | } |
176 | 212 | |
213 | + UpdateLicenseBasicSettings(obj: any) { | |
214 | + //let options = new RequestOptions({ headers: this.headers }); | |
215 | + var jsonData = { | |
216 | + 'licenseId': obj.licenseId, | |
217 | + 'accountNumber': obj.accountNumber, | |
218 | + 'licenseeFirstName': obj.licenseeFirstName, | |
219 | + 'licenseeLastName': obj.licenseeLastName, | |
220 | + 'institutionName': obj.institutionName, | |
221 | + 'address1': obj.address1, | |
222 | + 'address2': obj.address2, | |
223 | + 'city': obj.city, | |
224 | + 'zip': obj.zip, | |
225 | + 'stateId': obj.stateId, | |
226 | + 'countryId': obj.countryId, | |
227 | + 'phone': obj.phone, | |
228 | + 'email': obj.emailId | |
229 | + }; | |
230 | + var headers = new Headers({ | |
231 | + 'Content-Type': 'application/json' | |
232 | + }); | |
233 | + return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseBasicSettings", | |
234 | + JSON.stringify(jsonData), {headers: headers}) | |
235 | + .map(this.extractData) | |
236 | + .catch((res: Response) => this.handleError(res)); | |
237 | + } | |
238 | + | |
239 | + UpdateLicenseModestySettings(jsonObj: any) { | |
240 | + //let options = new RequestOptions({ headers: this.headers }); | |
241 | + var obj = []; | |
242 | + jsonObj.lstModesty.forEach(element => { | |
243 | + obj.push( | |
244 | + { | |
245 | + 'siteId': jsonObj.siteId, | |
246 | + 'licenseEditionId': element.m_Item1, | |
247 | + 'isModesty': element.m_Item2 | |
248 | + } | |
249 | + ); | |
250 | + }); | |
251 | + var jsonData = { obj }; | |
252 | + var headers = new Headers({ | |
253 | + 'Content-Type': 'application/json' | |
254 | + }); | |
255 | + return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModestySettings", | |
256 | + JSON.stringify(jsonData), {headers: headers}) | |
257 | + .map(this.extractData) | |
258 | + .catch((res: Response) => this.handleError(res)); | |
259 | + } | |
260 | + | |
261 | + UpdateLicenseModulesStatus(jsonObj: any) { | |
262 | + //let options = new RequestOptions({ headers: this.headers }); | |
263 | + var obj = []; | |
264 | + jsonObj.lstModuleStatus.forEach(element => { | |
265 | + obj.push( | |
266 | + { | |
267 | + 'licenseId': jsonObj.licenseId, | |
268 | + 'moduleId': element.m_Item1, | |
269 | + 'status': element.m_Item2 | |
270 | + } | |
271 | + ); | |
272 | + }); | |
273 | + var jsonData = { obj }; | |
274 | + var headers = new Headers({ | |
275 | + 'Content-Type': 'application/json' | |
276 | + }); | |
277 | + return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModulesStatus", | |
278 | + JSON.stringify(jsonData), {headers: headers}) | |
279 | + .map(this.extractData) | |
280 | + .catch((res: Response) => this.handleError(res)); | |
281 | + } | |
282 | + | |
177 | 283 | DeleteLicense(obj: any) { |
178 | 284 | return this.http.get(this.commonService.resourceBaseUrl + "/License/DeleteLicense?LicenseId=" + obj.LicenseId) |
179 | 285 | .map(this.extractData) |
180 | 286 | .catch((res: Response) => this.handleError(res)); |
181 | - } | |
287 | + } | |
288 | + | |
289 | + InsertUpdateSiteAccount(obj: any) { | |
290 | + //let options = new RequestOptions({ headers: this.headers }); | |
291 | + var temptext = ''; | |
292 | + obj.editionLoginArr.forEach(element => { | |
293 | + if(element.Login == 1){ | |
294 | + temptext += element.Id + ','; | |
295 | + } | |
296 | + }); | |
297 | + if(temptext != ''){ | |
298 | + temptext = temptext.substr(0, temptext.length - 1); | |
299 | + } | |
300 | + if(obj.siteId == 0){ | |
301 | + obj.creationDate = new Date(); | |
302 | + obj.modifiedDate = new Date(); | |
303 | + } | |
304 | + else{ | |
305 | + obj.modifiedDate = new Date(); | |
306 | + } | |
307 | + var jsonData = { | |
308 | + 'licenseId': obj.licenseId, | |
309 | + 'siteId': obj.siteId, | |
310 | + 'title': obj.buildAccName, | |
311 | + 'siteUrl': obj.siteUrl, | |
312 | + 'siteUrlTo': obj.siteUrlTo, | |
313 | + 'siteMasterUrlTo': obj.siteMasterUrlTo, | |
314 | + 'institutionName': obj.institutionName, | |
315 | + 'departmentName': obj.departmentName, | |
316 | + 'address1': obj.address1, | |
317 | + 'address2': obj.address2, | |
318 | + 'city': obj.city, | |
319 | + 'phone': obj.phone, | |
320 | + 'zip': obj.zip, | |
321 | + 'countryId': obj.countryId, | |
322 | + 'stateId': obj.stateId, | |
323 | + 'userId': obj.clientAdminId, | |
324 | + 'isActive': obj.isActive, | |
325 | + 'isMaster': obj.isMaster, | |
326 | + 'creationDate': obj.creationDate, | |
327 | + 'modifiedDate': obj.modifiedDate, | |
328 | + 'siteEditionIds': temptext | |
329 | + }; | |
330 | + var headers = new Headers({ | |
331 | + 'Content-Type': 'application/json' | |
332 | + }); | |
333 | + return this.http.post(this.commonService.resourceBaseUrl + "/Site/InsertUpdateSiteAccount", | |
334 | + JSON.stringify(jsonData), {headers: headers}) | |
335 | + .map(this.extractData) | |
336 | + .catch((res: Response) => this.handleError(res)); | |
337 | + } | |
338 | + | |
339 | + DeleteSiteAccount(obj: any) { | |
340 | + return this.http.get(this.commonService.resourceBaseUrl + "/Site/DeleteSiteAccount?SiteId=" + | |
341 | + obj.Id + "&LicenseId=" + obj.LicenseId + "&UserId=" + obj.SiteUserId) | |
342 | + .map(this.extractData) | |
343 | + .catch((res: Response) => this.handleError(res)); | |
344 | + } | |
182 | 345 | |
183 | 346 | extractData(res: Response) { |
184 | 347 | //debugger; | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.html
0 โ 100644
1 | +<!-- main-heading --> | |
2 | +<div class="row"> | |
3 | + | |
4 | + <div class="col-sm-12 pageHeading" style="margin-left: 15px;"> | |
5 | + <h4>Manage Modesty Settings</h4> | |
6 | + </div> | |
7 | + | |
8 | + <ng-template #templatesuccess> | |
9 | + <div class="modal-header"> | |
10 | + <h4 class="modal-title pull-left">Confirmation</h4> | |
11 | + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()"> | |
12 | + <span aria-hidden="true">×</span> | |
13 | + </button> | |
14 | + </div> | |
15 | + <div class="modal-body" [innerHTML]="modalAlerts"> | |
16 | + </div> | |
17 | + <div class="modal-footer"> | |
18 | + </div> | |
19 | + </ng-template> | |
20 | + | |
21 | + <div class="col-sm-12"> | |
22 | + | |
23 | + <div class="container-fluid main-full"> | |
24 | + | |
25 | + <div class="row"> | |
26 | + <div class="well no-margin-btm"> | |
27 | + <div class="row"> | |
28 | + <div class="col-lg-4 col-sm-6"> | |
29 | + <div class="row"> | |
30 | + <div class="col-sm-12"> | |
31 | + <div class="form-group marginTop5"> | |
32 | + <label for="Account Number" class="col-sm-6 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label> | |
33 | + </div> | |
34 | + <div class="col-sm-6 col-lg-6 padd-left0 padd-right0"> | |
35 | + <select class="form-control input-sm" id="AccountNumber" (change)="AccountNumberChanged($event.target.value)"> | |
36 | + <option>Select</option> | |
37 | + <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}"> | |
38 | + {{item.m_Item2}} | |
39 | + </option> | |
40 | + </select> | |
41 | + </div> | |
42 | + </div> | |
43 | + </div> | |
44 | + </div> | |
45 | + | |
46 | + <div class="col-lg-4 col-sm-8"> | |
47 | + | |
48 | + <form class="form-inline marginTop10"> | |
49 | + <div class="form-group"> | |
50 | + <label class="radio-inline"> | |
51 | + <input name="inlineRadioOptions" id="inlineRadio1" [value]="false" [(ngModel)]="isBuildingLevel" type="radio"> License Account </label> | |
52 | + </div> | |
53 | + | |
54 | + <div class="form-group"> | |
55 | + <label class="radio-inline mar-left0"> | |
56 | + <input name="inlineRadioOptions" id="inlineRadio2" [value]="true" [(ngModel)]="isBuildingLevel" type="radio"> Building Level Account </label> | |
57 | + </div> | |
58 | + | |
59 | + <button class="btn btn-primary btn-sm" type="button" (click)="ShowModestyorSites()">Go <i class="fa fa-arrow-right"></i></button> | |
60 | + </form> | |
61 | + | |
62 | + </div> | |
63 | + </div> | |
64 | + | |
65 | + </div> | |
66 | + | |
67 | + <div class="col-sm-12 padd-left0 padd-right0"> | |
68 | + <div class="well"> | |
69 | + <div class="row"> | |
70 | + <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> | |
71 | + <div class="panel-body"> | |
72 | + <!-- form --> | |
73 | + <form class="form-horizontal" [formGroup]="updateModestySettingsFrm" (submit)="UpdateLicenseModestySettings(templatesuccess)"> | |
74 | + <div class="form-group"> | |
75 | + <label for="AccountNumber" class="col-sm-5 control-label">Account Number :</label> | |
76 | + <div class="col-sm-6"> | |
77 | + <input class="form-control" id="AccountNumber" type="text" formControlName="accountNumber"> | |
78 | + </div> | |
79 | + </div> | |
80 | + <div class="form-group"> | |
81 | + <label for="inputPassword3" class="col-sm-5 control-label">Building Level Account Name :</label> | |
82 | + <div class="col-sm-6"> | |
83 | + <select class="form-control input-sm" id="SiteId" formControlName="siteId" (change)="LicenseSiteChanged($event.target.value)"> | |
84 | + <option value="0">Select</option> | |
85 | + <option *ngFor="let item of lstLicenseSites" value="{{item.Id}}"> | |
86 | + {{item.Title}} | |
87 | + </option> | |
88 | + </select> | |
89 | + </div> | |
90 | + </div> | |
91 | + <div class="form-group" *ngIf="lstLicenseEditionModesty!=null"> | |
92 | + <label for="inputPassword3" class="col-sm-4 control-label">Modesty Settings :</label> | |
93 | + <div class="col-sm-8"> | |
94 | + | |
95 | + <div class="row" *ngFor="let item of this.updateModestySettingsFrm.controls['lstModesty'].value; let i = index"> | |
96 | + <div class="col-sm-8"> | |
97 | + <span class="help-block">{{item.m_Item3}}</span> | |
98 | + </div> | |
99 | + | |
100 | + <div class="col-sm-4"> | |
101 | + <label class="radio-inline"> | |
102 | + <input name="{{item.m_Item3}}" [value]="true" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> On </label> | |
103 | + | |
104 | + <label class="radio-inline"> | |
105 | + <input name="{{item.m_Item3}}" [value]="false" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> Off </label> | |
106 | + </div> | |
107 | + </div> | |
108 | + | |
109 | + </div> | |
110 | + </div> | |
111 | + <div class="row"> | |
112 | + <div class="col-sm-12 marginTop20 text-center"> | |
113 | + <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> Save</button> | |
114 | + | |
115 | + | |
116 | + </div> | |
117 | + | |
118 | + </div> | |
119 | + </form> | |
120 | + <!-- form --> | |
121 | + </div> | |
122 | + | |
123 | + | |
124 | + | |
125 | + <!--save-button--> | |
126 | + <div class="modal fade bs-example-modal-sm ui-draggable text-left" tabindex="-1" role="dialog" id="mymodal"> | |
127 | + <div class="modal-dialog modal-sm" role="document"> | |
128 | + <div class="modal-content"> | |
129 | + <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
130 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
131 | + <h4 class="modal-title" id="">Alert</h4> | |
132 | + </div> | |
133 | + <div class="modal-body"> | |
134 | + <h5>Modules has been updated successfully.</h5> | |
135 | + </div> | |
136 | + <div class="modal-footer"> | |
137 | + <div class="row"> | |
138 | + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
139 | + </div> | |
140 | + </div> | |
141 | + | |
142 | + </div> | |
143 | + <!-- /.modal-content --> | |
144 | + </div> | |
145 | + <!-- /.modal-dialog --> | |
146 | + </div> | |
147 | + <!-- /.modal --> | |
148 | + <!--Save-button--> | |
149 | + | |
150 | + | |
151 | + | |
152 | + </div> | |
153 | + </div> | |
154 | + </div> | |
155 | + </div> | |
156 | + </div> | |
157 | + </div> | |
158 | + </div> | |
159 | + <!-- main-heading --> | |
160 | + | |
161 | + <!--container--> | |
162 | + | |
163 | +</div> | |
164 | +<!-- main-heading --> | |
0 | 165 | \ No newline at end of file | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts
0 โ 100644
1 | +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; | |
2 | +import { LicenseService } from './license.service'; | |
3 | +import { GlobalService } from '../../Shared/global'; | |
4 | +import { Router, ActivatedRoute } from '@angular/router'; | |
5 | +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
6 | +import { License } from '../UserEntity/datamodel'; | |
7 | +import { BsDatepickerModule } from 'ngx-bootstrap'; | |
8 | +import { Http, Response } from '@angular/http'; | |
9 | +import { DatePipe } from '@angular/common'; | |
10 | +import { BsModalService } from 'ngx-bootstrap/modal'; | |
11 | +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; | |
12 | +import { ContenteditableModelDirective } from '../../shared/contenteditabledirective' | |
13 | + | |
14 | +@Component({ | |
15 | + templateUrl: './licensemodestysettings.component.html' | |
16 | +}) | |
17 | + | |
18 | +export class LicenseModestySettings implements OnInit { | |
19 | + | |
20 | + lstAccountNumbers: any; | |
21 | + lstLicenseSites: any; | |
22 | + lstLicenseEditionModesty: any; | |
23 | + license: License; | |
24 | + updateModestySettingsFrm: FormGroup; | |
25 | + error: any; | |
26 | + alerts: string; | |
27 | + modalAlerts: string; | |
28 | + modalRef: BsModalRef; | |
29 | + selectedSiteId: number = 0; | |
30 | + isBuildingLevel: boolean = false; | |
31 | + | |
32 | + constructor(private licenseService: LicenseService, private globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } | |
33 | + | |
34 | + ngOnInit(): void | |
35 | + { | |
36 | + this.license = new License(); | |
37 | + this.alerts = ''; | |
38 | + this.updateModestySettingsFrm = this.fb.group({ | |
39 | + licenseId: [0], | |
40 | + accountNumber: ['', Validators.required], | |
41 | + siteId: [0], | |
42 | + lstModesty: [this.fb.array([])], | |
43 | + }); | |
44 | + this.GetLicenseAccounts(); | |
45 | + } | |
46 | + | |
47 | + openModal(template: TemplateRef<any>) { | |
48 | + this.modalRef = this.modalService.show(template); | |
49 | + } | |
50 | + | |
51 | + GetLicenseAccounts() { | |
52 | + this.licenseService.GetLicenseAccounts(0) | |
53 | + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = <any>error); | |
54 | + } | |
55 | + | |
56 | + ShowModestyorSites() { | |
57 | + this.lstLicenseEditionModesty = null; | |
58 | + this.lstLicenseSites = null; | |
59 | + this.selectedSiteId = 0; | |
60 | + if(!this.isBuildingLevel){ | |
61 | + this.GetLicenseEditionModesty(); | |
62 | + } | |
63 | + else{ | |
64 | + this.licenseService.GetLicenseSites(this.license.AccountNumber) | |
65 | + .subscribe(st => { this.lstLicenseSites = st; }, error => this.error = <any>error); | |
66 | + } | |
67 | + } | |
68 | + | |
69 | + GetLicenseEditionModesty() { | |
70 | + this.licenseService.GetLicenseModestySettings(this.license.LicenseId, this.selectedSiteId) | |
71 | + .subscribe(st => { | |
72 | + this.lstLicenseEditionModesty = st; | |
73 | + this.updateModestySettingsFrm.setControl('lstModesty', this.fb.array(this.lstLicenseEditionModesty)); | |
74 | + }, error => this.error = <any>error); | |
75 | + } | |
76 | + | |
77 | + LicenseSiteChanged(siteId: number){ | |
78 | + this.selectedSiteId = siteId; | |
79 | + if(this.selectedSiteId == 0) { | |
80 | + this.lstLicenseEditionModesty = null; | |
81 | + return; | |
82 | + } | |
83 | + this.GetLicenseEditionModesty(); | |
84 | + } | |
85 | + | |
86 | + GetLicenseById() { | |
87 | + if(this.license.LicenseId != 0) | |
88 | + { | |
89 | + this.licenseService.GetLicenseById(this.license.LicenseId) | |
90 | + .subscribe(st => { | |
91 | + this.license = st; | |
92 | + this.updateModestySettingsFrm.controls['licenseId'].setValue(this.license.LicenseId); | |
93 | + this.updateModestySettingsFrm.controls['accountNumber'].setValue(this.license.AccountNumber); | |
94 | + }, | |
95 | + error => this.error = <any>error); | |
96 | + } | |
97 | + } | |
98 | + | |
99 | + AccountNumberChanged(LicenseId: number){ | |
100 | + this.license.LicenseId = LicenseId; | |
101 | + this.lstLicenseEditionModesty = null; | |
102 | + this.lstLicenseSites = null; | |
103 | + this.selectedSiteId = 0; | |
104 | + this.isBuildingLevel = false; | |
105 | + this.GetLicenseById(); | |
106 | + } | |
107 | + | |
108 | + AfterUpdateData(data, template) { | |
109 | + if (data.Status == "false") { | |
110 | + this.alerts = "<span>License modesty setings update unsuccessfull</span>"; | |
111 | + } else { | |
112 | + this.modalAlerts = "<p>License modesty setings updated successfully</p>"; | |
113 | + this.modalRef = this.modalService.show(template); | |
114 | + } | |
115 | + } | |
116 | + | |
117 | + UpdateLicenseModestySettings(template: TemplateRef<any>){ | |
118 | + this.alerts = ''; | |
119 | + if(this.alerts == ''){ | |
120 | + var obj = this.updateModestySettingsFrm.value; | |
121 | + return this.licenseService.UpdateLicenseModestySettings(obj) | |
122 | + .subscribe( | |
123 | + n => (this.AfterUpdateData(n, template)), | |
124 | + error => this.error = <any>error); | |
125 | + } | |
126 | + } | |
127 | + | |
128 | + | |
129 | +} | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.html
0 โ 100644
1 | +<!-- main-heading --> | |
2 | +<div class="row"> | |
3 | + | |
4 | + <div class="col-sm-12 pageHeading" style="margin-left: 15px;"> | |
5 | + <h4>Manage Modesty Settings</h4> | |
6 | + </div> | |
7 | + | |
8 | + <ng-template #templatesuccess> | |
9 | + <div class="modal-header"> | |
10 | + <h4 class="modal-title pull-left">Confirmation</h4> | |
11 | + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()"> | |
12 | + <span aria-hidden="true">×</span> | |
13 | + </button> | |
14 | + </div> | |
15 | + <div class="modal-body" [innerHTML]="modalAlerts"> | |
16 | + </div> | |
17 | + <div class="modal-footer"> | |
18 | + </div> | |
19 | + </ng-template> | |
20 | + | |
21 | + <div class="col-sm-12"> | |
22 | + | |
23 | + <div class="container-fluid main-full"> | |
24 | + | |
25 | + <div class="row"> | |
26 | + | |
27 | + <div class="well no-margin-btm"> | |
28 | + <div class="row"> | |
29 | + <div class="col-lg-4 col-sm-4"> | |
30 | + <div class="row"> | |
31 | + <div class="col-sm-12"> | |
32 | + <div class="form-group marginTop5"> | |
33 | + <label for="Account Number" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label> | |
34 | + </div> | |
35 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
36 | + <select class="form-control input-sm" id="AccountNumber" (change)="AccountNumberChanged($event.target.value)"> | |
37 | + <option>Select</option> | |
38 | + <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}"> | |
39 | + {{item.m_Item2}} | |
40 | + </option> | |
41 | + </select> | |
42 | + </div> | |
43 | + </div> | |
44 | + </div> | |
45 | + </div> | |
46 | + </div> | |
47 | + </div> | |
48 | + | |
49 | + <div class="col-sm-12 padd-left0 padd-right0"> | |
50 | + | |
51 | + <div class="well"> | |
52 | + <div class="row"> | |
53 | + <div class="col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3"> | |
54 | + <div class="panel-body"> | |
55 | + <!-- form --> | |
56 | + <form class="form-horizontal" [formGroup]="updateModuleSettingsFrm" (submit)="UpdateLicenseModulesStatus(templatesuccess)"> | |
57 | + <div class="form-group" *ngIf="lstModuleStatus!=null"> | |
58 | + <label for="inputPassword3" class="col-sm-3 control-label">Module :</label> | |
59 | + <div class="col-sm-9"> | |
60 | + <div class="row" *ngFor="let item of this.updateModuleSettingsFrm.controls['lstModuleStatus'].value; let i = index"> | |
61 | + <div class="col-sm-6"> | |
62 | + <span class="help-block">{{item.m_Item3}}</span> | |
63 | + </div> | |
64 | + | |
65 | + <div class="col-sm-6"> | |
66 | + <label class="radio-inline"> | |
67 | + <input name="{{item.m_Item3}}" [value]="true" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> On </label> | |
68 | + <label class="radio-inline"> | |
69 | + <input name="{{item.m_Item3}}" [value]="false" type="radio" [(ngModel)]="item.m_Item2" [ngModelOptions]="{standalone: true}"> Off </label> | |
70 | + </div> | |
71 | + </div> | |
72 | + </div> | |
73 | + </div> | |
74 | + | |
75 | + <div class="row"> | |
76 | + <div class="col-sm-12 marginTop20 text-center"> | |
77 | + <button type="submit" class="btn btn-primary btn-sm"><i class="fa fa-check"></i> Save</button> | |
78 | + </div> | |
79 | + </div> | |
80 | + </form> | |
81 | + <!-- form --> | |
82 | + </div> | |
83 | + </div> | |
84 | + | |
85 | + <!--save-button--> | |
86 | + <div class="modal fade bs-example-modal-sm ui-draggable text-left" tabindex="-1" role="dialog" id="mymodal"> | |
87 | + <div class="modal-dialog modal-sm" role="document"> | |
88 | + <div class="modal-content"> | |
89 | + <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
90 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
91 | + <h4 class="modal-title" id="">Alert</h4> | |
92 | + </div> | |
93 | + <div class="modal-body"> | |
94 | + <h5>Modules has been updated successfully.</h5> | |
95 | + </div> | |
96 | + <div class="modal-footer"> | |
97 | + <div class="row"> | |
98 | + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
99 | + </div> | |
100 | + </div> | |
101 | + | |
102 | + </div> | |
103 | + <!-- /.modal-content --> | |
104 | + </div> | |
105 | + <!-- /.modal-dialog --> | |
106 | + </div> | |
107 | + <!-- /.modal --> | |
108 | + <!--Save-button--> | |
109 | + | |
110 | + </div> | |
111 | + </div> | |
112 | + </div> | |
113 | + </div> | |
114 | + <!-- main-heading --> | |
115 | + <!--container--> | |
116 | + | |
117 | + </div> | |
118 | + </div> | |
119 | +</div> | |
120 | +<!-- main-heading --> | |
0 | 121 | \ No newline at end of file | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodulesettings.component.ts
0 โ 100644
1 | +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; | |
2 | +import { LicenseService } from './license.service'; | |
3 | +import { GlobalService } from '../../Shared/global'; | |
4 | +import { Router, ActivatedRoute } from '@angular/router'; | |
5 | +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
6 | +import { License } from '../UserEntity/datamodel'; | |
7 | +import { BsDatepickerModule } from 'ngx-bootstrap'; | |
8 | +import { Http, Response } from '@angular/http'; | |
9 | +import { DatePipe } from '@angular/common'; | |
10 | +import { BsModalService } from 'ngx-bootstrap/modal'; | |
11 | +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; | |
12 | +import { ContenteditableModelDirective } from '../../shared/contenteditabledirective' | |
13 | + | |
14 | +@Component({ | |
15 | + templateUrl: './licensemodulesettings.component.html' | |
16 | +}) | |
17 | + | |
18 | +export class LicenseModuleSettings implements OnInit { | |
19 | + | |
20 | + lstAccountNumbers: any; | |
21 | + lstModuleStatus: any; | |
22 | + license: License; | |
23 | + updateModuleSettingsFrm: FormGroup; | |
24 | + error: any; | |
25 | + alerts: string; | |
26 | + modalAlerts: string; | |
27 | + modalRef: BsModalRef; | |
28 | + | |
29 | + constructor(private licenseService: LicenseService, private globalService: GlobalService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } | |
30 | + | |
31 | + ngOnInit(): void | |
32 | + { | |
33 | + this.license = new License(); | |
34 | + this.alerts = ''; | |
35 | + this.updateModuleSettingsFrm = this.fb.group({ | |
36 | + licenseId: [0], | |
37 | + accountNumber: [''], | |
38 | + lstModuleStatus: [this.fb.array([])], | |
39 | + }); | |
40 | + this.GetLicenseAccounts(); | |
41 | + } | |
42 | + | |
43 | + openModal(template: TemplateRef<any>) { | |
44 | + this.modalRef = this.modalService.show(template); | |
45 | + } | |
46 | + | |
47 | + GetLicenseAccounts() { | |
48 | + this.licenseService.GetLicenseAccounts(0) | |
49 | + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = <any>error); | |
50 | + } | |
51 | + | |
52 | + GetLicenseModulesStatus() { | |
53 | + this.licenseService.GetLicenseModulesStatus(this.license.LicenseId) | |
54 | + .subscribe(st => { | |
55 | + this.lstModuleStatus = st; | |
56 | + this.updateModuleSettingsFrm.setControl('lstModuleStatus', this.fb.array(this.lstModuleStatus)); | |
57 | + }, error => this.error = <any>error); | |
58 | + } | |
59 | + | |
60 | + GetLicenseById() { | |
61 | + if(this.license.LicenseId != 0) | |
62 | + { | |
63 | + this.licenseService.GetLicenseById(this.license.LicenseId) | |
64 | + .subscribe(st => { | |
65 | + this.license = st; | |
66 | + this.updateModuleSettingsFrm.controls['licenseId'].setValue(this.license.LicenseId); | |
67 | + this.updateModuleSettingsFrm.controls['accountNumber'].setValue(this.license.AccountNumber); | |
68 | + this.GetLicenseModulesStatus(); | |
69 | + }, | |
70 | + error => this.error = <any>error); | |
71 | + } | |
72 | + } | |
73 | + | |
74 | + AccountNumberChanged(LicenseId: number){ | |
75 | + this.license.LicenseId = LicenseId; | |
76 | + this.lstModuleStatus = null; | |
77 | + this.GetLicenseById(); | |
78 | + } | |
79 | + | |
80 | + AfterUpdateData(data, template) { | |
81 | + if (data.Status == "false") { | |
82 | + this.alerts = "<span>License module status update unsuccessfull</span>"; | |
83 | + } else { | |
84 | + this.modalAlerts = "<p>License module status updated successfully</p>"; | |
85 | + this.modalRef = this.modalService.show(template); | |
86 | + } | |
87 | + } | |
88 | + | |
89 | + UpdateLicenseModulesStatus(template: TemplateRef<any>){ | |
90 | + this.alerts = ''; | |
91 | + if(this.alerts == ''){ | |
92 | + var obj = this.updateModuleSettingsFrm.value; | |
93 | + return this.licenseService.UpdateLicenseModulesStatus(obj) | |
94 | + .subscribe( | |
95 | + n => (this.AfterUpdateData(n, template)), | |
96 | + error => this.error = <any>error); | |
97 | + } | |
98 | + } | |
99 | + | |
100 | + | |
101 | +} | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.html
0 โ 100644
1 | +<!-- main-heading --> | |
2 | +<div class="row"> | |
3 | + | |
4 | + <div class="col-sm-12 pageHeading" style="margin-left: 15px;"> | |
5 | + <h4>Add Building Level Account</h4> | |
6 | + </div> | |
7 | + | |
8 | + <ng-template #template> | |
9 | + <div class="modal-header"> | |
10 | + <h4 class="modal-title pull-left">Delete</h4> | |
11 | + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()"> | |
12 | + <span aria-hidden="true">×</span> | |
13 | + </button> | |
14 | + </div> | |
15 | + <div class="modal-body"> | |
16 | + <p>Do you want to delete the selected site account?</p> | |
17 | + </div> | |
18 | + <div class="modal-footer"> | |
19 | + <button type="button" class="btn btn-primary btn-sm" (click)="DeleteSiteAccount(templatesuccess)" >Yes</button> | |
20 | + <button type="button" class="btn btn-primary btn-sm" (click)="modalRef.hide()" >No</button> | |
21 | + </div> | |
22 | + </ng-template> | |
23 | + | |
24 | + <ng-template #templatesuccess> | |
25 | + <div class="modal-header"> | |
26 | + <h4 class="modal-title pull-left">Confirmation</h4> | |
27 | + <button type="button" class="close pull-right" aria-label="Close" (click)="modalRef.hide()"> | |
28 | + <span aria-hidden="true">×</span> | |
29 | + </button> | |
30 | + </div> | |
31 | + <div class="modal-body" [innerHTML]="modalAlerts"> | |
32 | + </div> | |
33 | + <div class="modal-footer"> | |
34 | + </div> | |
35 | + </ng-template> | |
36 | + | |
37 | + <div class="col-sm-12"> | |
38 | + | |
39 | + <div class="container-fluid main-full"> | |
40 | + <div class="row"> | |
41 | + <div class="well no-margin-btm" [style.visibility]="(mode == 'Search') ? 'visible' : 'hidden'"> | |
42 | + <div class="row"> | |
43 | + <div class="col-lg-4 col-sm-4 padd-right0"> | |
44 | + <div class="row"> | |
45 | + <div class="col-sm-12"> | |
46 | + <div class="form-group marginTop5"> | |
47 | + <label for="AccountNo" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label> | |
48 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
49 | + <select class="form-control input-sm" id="AccountNumber" (change)="AccountNumberChanged($event.target.value)"> | |
50 | + <option>Select</option> | |
51 | + <option *ngFor="let item of lstAccountNumbers" value="{{item.m_Item1}}"> | |
52 | + {{item.m_Item2}} | |
53 | + </option> | |
54 | + </select> | |
55 | + </div> | |
56 | + </div> | |
57 | + </div> | |
58 | + </div> | |
59 | + </div> | |
60 | + | |
61 | + <div class="col-lg-4 col-sm-4"> | |
62 | + <div class="row"> | |
63 | + <div class="col-sm-2 padd-left0"> | |
64 | + <div class="form-group marginTop5"> | |
65 | + <label for="New Group" class="col-sm-12 col-md-1 paddTop7 padd-left0 padd-right0 hidden-xs"> </label> | |
66 | + </div> | |
67 | + <div class="col-sm-12 col-lg-2 padd-left0 padd-right0 mar-left6 mobile_1"> | |
68 | + <button class="btn btn-primary btn-sm" type="button" (click)="GetLicenseSites()">Go <i class="fa fa-arrow-right"></i></button> | |
69 | + </div> | |
70 | + </div> | |
71 | + </div> | |
72 | + </div> | |
73 | + | |
74 | + </div> | |
75 | + | |
76 | + </div> | |
77 | + | |
78 | + <div class="well" [style.visibility]="(mode == 'Search') ? 'visible' : 'hidden'"> | |
79 | + <table id="fixed_hdr2" class="table-hover"> | |
80 | + <thead> | |
81 | + <tr> | |
82 | + <th>Site Url</th> | |
83 | + <th>Site Url To</th> | |
84 | + <th>Account Name</th> | |
85 | + <th>Institution Name</th> | |
86 | + <th>Department Name</th> | |
87 | + <th>Client Admin</th> | |
88 | + <th>Client Admin Email ID</th> | |
89 | + <th>Original Entry Date</th> | |
90 | + <th>Last Modified Date</th> | |
91 | + </tr> | |
92 | + </thead> | |
93 | + <tbody> | |
94 | + <tr *ngFor="let item of lstLicenseSites; let i = index" (click)="SetClickedRow(i, item)" [class.active]="i == selectedRow" | |
95 | + [class.inactive]="i != selectedRow"> | |
96 | + <td style="width: 200px; text-align: center;"> | |
97 | + <input type="hidden" value="{{item.Id}}"> {{item.Ip}} | |
98 | + </td> | |
99 | + <td style="text-align: center;">{{item.SiteIpTo}}</td> | |
100 | + <td style="text-align: center;">{{item.Title}}</td> | |
101 | + <td style="text-align: center;">{{item.InstituteName}}</td> | |
102 | + <td style="text-align: center;">{{item.Department}}</td> | |
103 | + <td style="text-align: center;">{{item.SiteUserFirstName}}</td> | |
104 | + <td style="text-align: center;">{{item.SiteUserEmailId}}</td> | |
105 | + <td style="text-align: center;">{{item.CreationDate | date: 'MM/dd/yyyy'}}</td> | |
106 | + <td style="text-align: center;">{{item.ModifiedDate | date: 'MM/dd/yyyy'}}</td> | |
107 | + </tr> | |
108 | + </tbody> | |
109 | + </table> | |
110 | + <div class="row"> | |
111 | + <div class="col-sm-12 marginTop20 text-center"> | |
112 | + <button class="btn btn-primary btn-sm" type="button" (click)="AddLicenseSite()"><i class="fa fa-plus-circle"></i> Add</button> | |
113 | + <button class="btn btn-primary btn-sm" type="button" (click)="EditLicenseSite()"><i class="fa fa-edit"></i> Edit</button> | |
114 | + <button class="btn btn-primary btn-sm" type="button" (click)="openModal(template)"><i class="fa fa-trash"></i> Delete</button> | |
115 | + </div> | |
116 | + </div> | |
117 | + </div> | |
118 | + <!--modal--> | |
119 | + <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | |
120 | + <div class="modal-dialog modal-sm" role="document"> | |
121 | + <div class="modal-content"> | |
122 | + <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
123 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
124 | + <h4 class="modal-title" id="">Alert</h4> | |
125 | + </div> | |
126 | + <div class="modal-body"> | |
127 | + <h5>Please select a site account to edit.</h5> | |
128 | + </div> | |
129 | + <div class="modal-footer"> | |
130 | + <div class="row"> | |
131 | + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
132 | + </div> | |
133 | + </div> | |
134 | + </div> | |
135 | + <!-- /.modal-content --> | |
136 | + </div> | |
137 | + <!-- /.modal-dialog --> | |
138 | + </div> | |
139 | + <!--modal--> | |
140 | + <!--modal--> | |
141 | + <div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal1"> | |
142 | + <div class="modal-dialog modal-sm" role="document"> | |
143 | + <div class="modal-content"> | |
144 | + <div class="modal-header annotation-modal-header ui-draggable-handle"> | |
145 | + <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | |
146 | + <h4 class="modal-title" id="">Alert</h4> | |
147 | + </div> | |
148 | + <div class="modal-body"> | |
149 | + <h5>Please select a site account to delete.</h5> | |
150 | + </div> | |
151 | + <div class="modal-footer"> | |
152 | + <div class="row"> | |
153 | + <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | |
154 | + </div> | |
155 | + </div> | |
156 | + </div> | |
157 | + <!-- /.modal-content --> | |
158 | + </div> | |
159 | + <!-- /.modal-dialog --> | |
160 | + </div> | |
161 | + <!--modal--> | |
162 | + | |
163 | + <div class="well marginBtm12" style="position: absolute; z-index: 100;" [style.top]="topPos" [style.visibility]="(mode=='Add' || mode=='Edit') ? 'visible' : 'hidden'"> | |
164 | + | |
165 | + <form class="row" [formGroup]="insertUpdateSiteLicenseFrm" (submit)="InsertUpdateSiteAccount(templatesuccess)"> | |
166 | + | |
167 | + <div class="form-group" *ngIf="alerts != ''"> | |
168 | + <div class="col-xs-12"> | |
169 | + <div class="alert alert-danger" [innerHTML]="alerts"> | |
170 | + </div> | |
171 | + </div> | |
172 | + </div> | |
173 | + | |
174 | + <div class="col-lg-4 col-sm-4"> | |
175 | + <div class="row"> | |
176 | + | |
177 | + <div class="col-sm-12"> | |
178 | + <div class="form-group marginTop5"> | |
179 | + <label for="SiteUrl" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Site Url(From) <span class="red">*</span> : </label> | |
180 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
181 | + <input type="text" class="form-control input-sm" id="SiteUrl" formControlName="siteUrl" maxlength="2000"> | |
182 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.siteUrl.hasError('required') && insertUpdateSiteLicenseFrm.controls.siteUrl.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Site url is required</div> | |
183 | + </div> | |
184 | + </div> | |
185 | + </div> | |
186 | + | |
187 | + <div class="col-sm-12"> | |
188 | + <div class="form-group marginTop5"> | |
189 | + <label for="SiteUrlTo" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Site Url to :</label> | |
190 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
191 | + <input type="text" class="form-control input-sm" id="SiteUrlTo" formControlName="siteUrlTo" maxlength="100"> | |
192 | + </div> | |
193 | + </div> | |
194 | + </div> | |
195 | + | |
196 | + <div class="col-sm-12"> | |
197 | + <div class="form-group marginTop5"> | |
198 | + <label for="BuildingLevel" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Building Level Account Name :</label> | |
199 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
200 | + <input type="text" class="form-control input-sm" id="BuildingLevel" formControlName="buildAccName" maxlength="100"> | |
201 | + </div> | |
202 | + </div> | |
203 | + </div> | |
204 | + | |
205 | + <div class="col-sm-12"> | |
206 | + <div class="form-group marginTop5"> | |
207 | + <label for="AccountNumber1" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Account Number :</label> | |
208 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
209 | + <input type="text" class="form-control input-sm" id="AccountNumber1" formControlName="accountNumber" maxlength="100"> | |
210 | + </div> | |
211 | + </div> | |
212 | + </div> | |
213 | + | |
214 | + <div class="col-sm-12"> | |
215 | + <div class="form-group marginTop5"> | |
216 | + <label for="ProductEdition" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0"> | |
217 | + Product Edition <span class="red">*</span> :</label> | |
218 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
219 | + <form> | |
220 | + <div class="checkbox" *ngFor="let item of this.insertUpdateSiteLicenseFrm.controls['editionLoginArr'].value; let i = index"> | |
221 | + <label> | |
222 | + <input value="{{item.Id}}" type="checkbox" (change)="onChange(item, $event.target.checked)" [checked]="item.Login == 1"> {{item.Title}} | |
223 | + </label> | |
224 | + </div> | |
225 | + </form> | |
226 | + </div> | |
227 | + </div> | |
228 | + </div> | |
229 | + | |
230 | + </div> | |
231 | + </div> | |
232 | + | |
233 | + <div class="col-lg-4 col-sm-4"> | |
234 | + <div class="row"> | |
235 | + | |
236 | + <div class="col-sm-12"> | |
237 | + <div class="form-group marginTop5"> | |
238 | + <label for="InstitutionName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Institution Name <span class="red">*</span> : </label> | |
239 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
240 | + <input type="text" class="form-control input-sm" id="InstitutionName" formControlName="institutionName" maxlength="100"> | |
241 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.institutionName.hasError('required') && insertUpdateSiteLicenseFrm.controls.institutionName.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Institution name is required</div> | |
242 | + </div> | |
243 | + </div> | |
244 | + </div> | |
245 | + | |
246 | + <div class="col-sm-12"> | |
247 | + <div class="form-group marginTop5"> | |
248 | + <label for="DepartmentName" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Department Name :</label> | |
249 | + </div> | |
250 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
251 | + <input type="text" class="form-control input-sm" id="DepartmentName" formControlName="departmentName" maxlength="50"> | |
252 | + </div> | |
253 | + </div> | |
254 | + | |
255 | + <div class="col-sm-12"> | |
256 | + <div class="form-group marginTop5"> | |
257 | + <label for="Address1" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Address <span class="red">*</span> : </label> | |
258 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
259 | + <input type="text" class="form-control input-sm" id="Address1" formControlName="address1" maxlength="100"> | |
260 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.address1.hasError('required') && insertUpdateSiteLicenseFrm.controls.address1.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Address is required</div> | |
261 | + </div> | |
262 | + </div> | |
263 | + </div> | |
264 | + | |
265 | + <div class="col-sm-12"> | |
266 | + <div class="form-group marginTop5"> | |
267 | + <label for="Address2" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0"></label> | |
268 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
269 | + <input type="text" class="form-control input-sm" id="Address2" formControlName="address2" maxlength="100"> | |
270 | + </div> | |
271 | + </div> | |
272 | + </div> | |
273 | + | |
274 | + <div class="col-sm-12"> | |
275 | + <div class="form-group marginTop5"> | |
276 | + <label for="City" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">City <span class="red">*</span> :</label> | |
277 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
278 | + <input type="text" class="form-control input-sm" id="City" formControlName="city" maxlength="50"> | |
279 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.city.hasError('required') && insertUpdateSiteLicenseFrm.controls.city.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">City is required</div> | |
280 | + </div> | |
281 | + </div> | |
282 | + </div> | |
283 | + | |
284 | + <div class="col-sm-12"> | |
285 | + <div class="form-group marginTop5"> | |
286 | + <label for="State" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">State(only U.S.) <span class="red">*</span> :</label> | |
287 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
288 | + <select class="form-control input-sm " id="State" formControlName="stateId"> | |
289 | + <option value="0">Select</option> | |
290 | + <option *ngFor="let item of lstState" value="{{item.Id}}"> | |
291 | + {{item.StateName}} | |
292 | + </option> | |
293 | + </select> | |
294 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.stateId.errors?.min && insertUpdateSiteLicenseFrm.controls.stateId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">State is required</div> | |
295 | + </div> | |
296 | + </div> | |
297 | + </div> | |
298 | + | |
299 | + </div> | |
300 | + </div> | |
301 | + | |
302 | + <div class="col-lg-4 col-sm-4"> | |
303 | + <div class="row"> | |
304 | + | |
305 | + <div class="col-sm-12"> | |
306 | + <div class="form-group marginTop5"> | |
307 | + <label for="Country" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Country <span class="red">*</span> :</label> | |
308 | + </div> | |
309 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
310 | + <select class="form-control input-sm " id="State" formControlName="countryId"> | |
311 | + <option value="0">Select</option> | |
312 | + <option *ngFor="let item of lstCountry" value="{{item.Id}}"> | |
313 | + {{item.CountryName}} | |
314 | + </option> | |
315 | + </select> | |
316 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.countryId.errors?.min && insertUpdateSiteLicenseFrm.controls.countryId.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Country is required</div> | |
317 | + </div> | |
318 | + </div> | |
319 | + | |
320 | + <div class="col-sm-12"> | |
321 | + <div class="form-group marginTop5"> | |
322 | + <label for="Zip" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Zip <span class="red">*</span> : </label> | |
323 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
324 | + <input type="text" class="form-control input-sm" id="Zip" formControlName="zip" maxlength="20"> | |
325 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.zip.hasError('required') && insertUpdateSiteLicenseFrm.controls.zip.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Zip is required</div> | |
326 | + </div> | |
327 | + </div> | |
328 | + </div> | |
329 | + | |
330 | + <div class="col-sm-12"> | |
331 | + <div class="form-group marginTop5"> | |
332 | + <label for="Phone" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Phone <span class="red">*</span> :</label> | |
333 | + </div> | |
334 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
335 | + <input type="phone" class="form-control input-sm" id="Phone" formControlName="phone" maxlength="30"> | |
336 | + <div *ngIf="insertUpdateSiteLicenseFrm.controls.phone.hasError('required') && insertUpdateSiteLicenseFrm.controls.phone.dirty" class="alert alert-danger" style="padding: 2px; margin-bottom: 2px;">Phone is required</div> | |
337 | + </div> | |
338 | + </div> | |
339 | + | |
340 | + <div class="col-sm-12"> | |
341 | + <div class="form-group marginTop5"> | |
342 | + <label for="ClientAdmin" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Client Admin <span class="red">*</span> :</label> | |
343 | + </div> | |
344 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
345 | + <select class="form-control input-sm" id="ClientAdmin" formControlName="clientAdminId"> | |
346 | + <option value="0">Select</option> | |
347 | + <option *ngFor="let item of lstClientAdmin" value="{{item.Id}}"> | |
348 | + {{item.Name}} | |
349 | + </option> | |
350 | + </select> | |
351 | + </div> | |
352 | + </div> | |
353 | + | |
354 | + <div class="col-sm-12"> | |
355 | + <div class="form-group marginTop5"> | |
356 | + <label for="ClientAdminEmail" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">Client Admin Email ID :</label> | |
357 | + <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | |
358 | + <input type="email" class="form-control input-sm" id="ClientAdminEmail" formControlName="clientAdminEmail" maxlength="50"> | |
359 | + </div> | |
360 | + </div> | |
361 | + </div> | |
362 | + </div> | |
363 | + </div> | |
364 | + | |
365 | + <div class="col-sm-12 marginTop10 text-right"> | |
366 | + <button class="btn btn-primary btn-sm" type="submit" [disabled]="!insertUpdateSiteLicenseFrm.valid"> <i class="fa fa-arrow-circle-right"></i> Submit</button> | |
367 | + <button type="button" class="btn btn-primary btn-sm" (click)="CancelAddEdit()"><i class="fa fa-times-circle"></i> Cancel</button> | |
368 | + </div> | |
369 | + | |
370 | + </form> | |
371 | + </div> | |
372 | + </div> | |
373 | + </div> | |
374 | + </div> | |
375 | + </div> | |
376 | +<!-- main-heading --> | |
0 | 377 | \ No newline at end of file | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/sitelicenseaccount.component.ts
0 โ 100644
1 | +import { Component, OnInit, AfterViewInit, Input, Output, EventEmitter, Pipe, PipeTransform, TemplateRef } from '@angular/core'; | |
2 | +import { LicenseService } from './license.service'; | |
3 | +import { Router, ActivatedRoute } from '@angular/router'; | |
4 | +import { FormControl, FormBuilder, FormGroup, Validators } from '@angular/forms'; | |
5 | +import { License } from '../UserEntity/datamodel'; | |
6 | +import { BsDatepickerModule } from 'ngx-bootstrap'; | |
7 | +import { Http, Response } from '@angular/http'; | |
8 | +import { DatePipe } from '@angular/common'; | |
9 | +import { BsModalService } from 'ngx-bootstrap/modal'; | |
10 | +import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; | |
11 | + | |
12 | +declare var $:any; | |
13 | + | |
14 | +@Component({ | |
15 | + templateUrl: './sitelicenseaccount.component.html' | |
16 | +}) | |
17 | + | |
18 | +export class SiteLicenseAccount implements OnInit { | |
19 | + | |
20 | + lstCountry: any; | |
21 | + lstState: any; | |
22 | + lstAccountNumbers: any; | |
23 | + lstLicenseSites: any; | |
24 | + licenseSite: any; | |
25 | + mode: string = 'Search'; | |
26 | + license: License; | |
27 | + insertUpdateSiteLicenseFrm: FormGroup; | |
28 | + error: any; | |
29 | + alerts: string; | |
30 | + modalAlerts: string; | |
31 | + divClass: string = ''; | |
32 | + topPos: string = '2000px'; | |
33 | + selectedRow: number = 0; | |
34 | + selectedId: number = 0; | |
35 | + modalRef: BsModalRef; | |
36 | + lstEdition: any; | |
37 | + lstEditionLogins: any; | |
38 | + lstSiteAccountEditions: any; | |
39 | + lstClientAdmin: any; | |
40 | + | |
41 | + constructor(private licenseService: LicenseService, private router: Router, private activeRoute: ActivatedRoute, private fb: FormBuilder, private modalService: BsModalService) { } | |
42 | + | |
43 | + ngOnInit(): void | |
44 | + { | |
45 | + this.divClass = 'col-sm-12'; | |
46 | + this.license = new License(); | |
47 | + this.alerts = ''; | |
48 | + this.insertUpdateSiteLicenseFrm = this.fb.group({ | |
49 | + licenseId: [0], | |
50 | + accountNumber: [{value: '', disabled: true}], | |
51 | + siteId: [0], | |
52 | + siteUrl: ['', Validators.required], | |
53 | + siteUrlTo: [''], | |
54 | + siteMasterUrlTo: [''], | |
55 | + buildAccName: [''], | |
56 | + institutionName: ['', Validators.required], | |
57 | + departmentName: [''], | |
58 | + address1: ['', Validators.required], | |
59 | + address2: [''], | |
60 | + city: ['', Validators.required], | |
61 | + countryId: [0, Validators.min(1)], | |
62 | + stateId: [0, Validators.min(1)], | |
63 | + zip: ['', Validators.required], | |
64 | + phone: ['', Validators.required], | |
65 | + clientAdminId: [0, Validators.min(1)], | |
66 | + clientAdminEmail: [{value: '', disabled: true}, Validators.email], | |
67 | + isActive: [0], | |
68 | + isMaster: [0], | |
69 | + creationDate: [''], | |
70 | + modifiedDate: [''], | |
71 | + editionLoginArr: this.fb.array([]), | |
72 | + }); | |
73 | + this.GetCountry(); | |
74 | + this.GetState(); | |
75 | + this.GetEditions(); | |
76 | + this.GetLicenseAccounts(); | |
77 | + $('#fixed_hdr2').fxdHdrCol({ | |
78 | + fixedCols: 0, | |
79 | + width: "100%", | |
80 | + height: 330, | |
81 | + colModal: [ | |
82 | + { width: 200, align: 'center' }, | |
83 | + { width: 200, align: 'center' }, | |
84 | + { width: 200, align: 'Center' }, | |
85 | + { width: 200, align: 'Center' }, | |
86 | + { width: 250, align: 'Center' }, | |
87 | + { width: 200, align: 'Center' }, | |
88 | + { width: 200, align: 'Center' }, | |
89 | + { width: 200, align: 'Center' }, | |
90 | + { width: 200, align: 'Center' }, | |
91 | + ], | |
92 | + sort: true | |
93 | + }); | |
94 | + | |
95 | + document.getElementById("fixed_table_rc").remove(); | |
96 | + var testScript = document.createElement("script"); | |
97 | + testScript.setAttribute("id", "fixed_table_rc"); | |
98 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
99 | + testScript.setAttribute("type", "text/javascript"); | |
100 | + document.body.appendChild(testScript); | |
101 | + } | |
102 | + | |
103 | + openModal(template: TemplateRef<any>) { | |
104 | + this.modalRef = this.modalService.show(template); | |
105 | + } | |
106 | + | |
107 | + public SetClickedRow(i: number, item: any) { | |
108 | + this.selectedRow = i; | |
109 | + this.selectedId = item['Id']; | |
110 | + this.licenseSite = item; | |
111 | + } | |
112 | + | |
113 | + BindFormFields(data){ | |
114 | + this.selectedRow = 0; | |
115 | + this.lstLicenseSites = data; | |
116 | + this.selectedId = this.lstLicenseSites[this.selectedRow].siteId; | |
117 | + } | |
118 | + | |
119 | + GetLicenseAccounts() { | |
120 | + this.licenseService.GetLicenseAccounts(3) | |
121 | + .subscribe(st => { this.lstAccountNumbers = st; }, error => this.error = <any>error); | |
122 | + } | |
123 | + | |
124 | + AccountNumberChanged(LicenseId: number){ | |
125 | + this.license.LicenseId = LicenseId; | |
126 | + this.lstLicenseSites = null; | |
127 | + this.GetLicenseById(); | |
128 | + } | |
129 | + | |
130 | + GetCountry() { | |
131 | + this.licenseService.GetCountry() | |
132 | + .subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); | |
133 | + } | |
134 | + | |
135 | + GetState() { | |
136 | + this.licenseService.GetState() | |
137 | + .subscribe(st => { this.lstState = st; }, error => this.error = <any>error); | |
138 | + } | |
139 | + | |
140 | + GetSiteById(){ | |
141 | + this.licenseService.GetSiteById(this.selectedId) | |
142 | + .subscribe(st => { | |
143 | + this.licenseSite = st; | |
144 | + this.insertUpdateSiteLicenseFrm.controls['siteId'].setValue(this.licenseSite.Id); | |
145 | + this.insertUpdateSiteLicenseFrm.controls['buildAccName'].setValue(this.licenseSite.Title); | |
146 | + this.insertUpdateSiteLicenseFrm.controls['siteUrl'].setValue(this.licenseSite.Ip); | |
147 | + this.insertUpdateSiteLicenseFrm.controls['siteUrlTo'].setValue(this.licenseSite.SiteIpTo); | |
148 | + this.insertUpdateSiteLicenseFrm.controls['siteMasterUrlTo'].setValue(this.licenseSite.MasterIpTo); | |
149 | + this.insertUpdateSiteLicenseFrm.controls['institutionName'].setValue(this.licenseSite.InstituteName); | |
150 | + this.insertUpdateSiteLicenseFrm.controls['departmentName'].setValue(this.licenseSite.Department); | |
151 | + this.insertUpdateSiteLicenseFrm.controls['address1'].setValue(this.licenseSite.Address1); | |
152 | + this.insertUpdateSiteLicenseFrm.controls['address2'].setValue(this.licenseSite.Address2); | |
153 | + this.insertUpdateSiteLicenseFrm.controls['city'].setValue(this.licenseSite.City); | |
154 | + this.insertUpdateSiteLicenseFrm.controls['phone'].setValue(this.licenseSite.Phone); | |
155 | + this.insertUpdateSiteLicenseFrm.controls['zip'].setValue(this.licenseSite.Zip); | |
156 | + this.insertUpdateSiteLicenseFrm.controls['countryId'].setValue(this.licenseSite.CountryId); | |
157 | + this.insertUpdateSiteLicenseFrm.controls['stateId'].setValue(this.licenseSite.StateId); | |
158 | + this.insertUpdateSiteLicenseFrm.controls['isActive'].setValue(this.licenseSite.IsActive); | |
159 | + this.insertUpdateSiteLicenseFrm.controls['isMaster'].setValue(this.licenseSite.IsMaster); | |
160 | + this.insertUpdateSiteLicenseFrm.controls['creationDate'].setValue(this.licenseSite.CreationDate); | |
161 | + this.insertUpdateSiteLicenseFrm.controls['modifiedDate'].setValue(this.licenseSite.ModifiedDate); | |
162 | + this.insertUpdateSiteLicenseFrm.controls['clientAdminId'].setValue(this.lstLicenseSites[0].SiteUserId); | |
163 | + this.GetSiteAccountEditions(); | |
164 | + }, error => this.error = <any>error); | |
165 | + } | |
166 | + | |
167 | + GetSiteAccountEditions(){ | |
168 | + this.licenseService.GetSiteAccountEditions(this.licenseSite.Id, this.license.LicenseId) | |
169 | + .subscribe(st => { | |
170 | + this.lstSiteAccountEditions = st; | |
171 | + this.lstEditionLogins.forEach(element => { | |
172 | + this.lstSiteAccountEditions.forEach(elm => { | |
173 | + if(elm.m_Item2 == element.Id){ | |
174 | + element.Login = 1; | |
175 | + } | |
176 | + }); | |
177 | + }); | |
178 | + this.insertUpdateSiteLicenseFrm.setControl('editionLoginArr', this.fb.array(this.lstEditionLogins)); | |
179 | + }, error => this.error = <any>error); | |
180 | + } | |
181 | + | |
182 | + GetLicenseSites(){ | |
183 | + this.licenseService.GetLicenseSites(this.license.AccountNumber) | |
184 | + .subscribe(st => { | |
185 | + this.lstLicenseSites = st; | |
186 | + this.insertUpdateSiteLicenseFrm.controls['clientAdminId'].setValue(this.lstLicenseSites[0].SiteUserId); | |
187 | + this.insertUpdateSiteLicenseFrm.controls['clientAdminEmail'].setValue(this.lstLicenseSites[0].SiteUserEmailId); | |
188 | + var tempArr = []; | |
189 | + tempArr.push( | |
190 | + { | |
191 | + "Id": this.lstLicenseSites[0].SiteUserId, | |
192 | + "Name": this.lstLicenseSites[0].SiteUserFirstName | |
193 | + }); | |
194 | + this.lstClientAdmin = tempArr; | |
195 | + }, error => this.error = <any>error); | |
196 | + } | |
197 | + | |
198 | + GetEditions() { | |
199 | + this.licenseService.GetEditions() | |
200 | + .subscribe(x => { | |
201 | + this.lstEdition = x; | |
202 | + }, error => this.error = <any>error); | |
203 | + } | |
204 | + | |
205 | + onChange(item: any, isChecked: boolean){ | |
206 | + if(this.license.LicenseTypeId == 3){ | |
207 | + if(isChecked){ | |
208 | + item.Login = 1; | |
209 | + } | |
210 | + else{ | |
211 | + item.Login = 0; | |
212 | + } | |
213 | + } | |
214 | + } | |
215 | + | |
216 | + GetLicenseById() { | |
217 | + if(this.license.LicenseId != 0) | |
218 | + { | |
219 | + this.licenseService.GetLicenseById(this.license.LicenseId) | |
220 | + .subscribe(st => { | |
221 | + this.license = st; | |
222 | + this.insertUpdateSiteLicenseFrm.controls['licenseId'].setValue(this.license.LicenseId); | |
223 | + this.insertUpdateSiteLicenseFrm.controls['accountNumber'].setValue(this.license.AccountNumber); | |
224 | + if(this.license.EditionLogins == null) return; | |
225 | + var TempArr = this.license.EditionLogins.split('|'); | |
226 | + this.lstEditionLogins = new Array(); | |
227 | + this.lstEdition.forEach(element => { | |
228 | + TempArr.forEach(elm => { | |
229 | + var TempInnerArr = elm.split('-'); | |
230 | + if(TempInnerArr[0] == element.Id){ | |
231 | + this.lstEditionLogins.push({Id: element.Id, Title: element.Title, Login: 0}); | |
232 | + } | |
233 | + }); | |
234 | + }); | |
235 | + this.insertUpdateSiteLicenseFrm.setControl('editionLoginArr', this.fb.array(this.lstEditionLogins)); | |
236 | + }, | |
237 | + error => this.error = <any>error); | |
238 | + } | |
239 | + } | |
240 | + | |
241 | + AfterDeleteData(data, template) { | |
242 | + if (data.Status == "false") { | |
243 | + this.alerts = "<span>Site account delete unsuccessfull</span>"; | |
244 | + } else { | |
245 | + this.modalAlerts = "<p>Site account deleted successfully</p>"; | |
246 | + this.modalRef = this.modalService.show(template); | |
247 | + this.GetLicenseSites(); | |
248 | + } | |
249 | + } | |
250 | + | |
251 | + AfterInsertData(data, template) { | |
252 | + if (data.Status == "false") { | |
253 | + this.alerts = "<span>License site save unsuccessfull</span>"; | |
254 | + } else { | |
255 | + this.modalAlerts = "<p>License site saved successfully</p>"; | |
256 | + this.modalRef = this.modalService.show(template); | |
257 | + } | |
258 | + } | |
259 | + | |
260 | + AfterUpdateData(data, template) { | |
261 | + if (data.Status == "false") { | |
262 | + this.alerts = "<span>License site update unsuccessfull</span>"; | |
263 | + } else { | |
264 | + this.modalAlerts = "<p>License site updated successfully</p>"; | |
265 | + this.modalRef = this.modalService.show(template); | |
266 | + } | |
267 | + } | |
268 | + | |
269 | + InsertUpdateSiteAccount(template: TemplateRef<any>) { | |
270 | + this.alerts = ''; | |
271 | + var obj = this.insertUpdateSiteLicenseFrm.value; | |
272 | + var temptext = ''; | |
273 | + obj.editionLoginArr.forEach(element => { | |
274 | + if(element.Login == 1){ | |
275 | + temptext += element.Id + ','; | |
276 | + } | |
277 | + }); | |
278 | + if(temptext == ''){ | |
279 | + this.alerts = "<span>Please select a product edition</span>"; | |
280 | + } | |
281 | + if(this.alerts == ''){ | |
282 | + return this.licenseService.InsertUpdateSiteAccount(obj) | |
283 | + .subscribe( | |
284 | + n => (this.AfterInsertData(n, template)), | |
285 | + error => this.error = <any>error); | |
286 | + } | |
287 | + } | |
288 | + | |
289 | + DeleteSiteAccount(template: TemplateRef<any>){ | |
290 | + this.modalRef.hide(); | |
291 | + this.alerts = ''; | |
292 | + if(this.alerts == ''){ | |
293 | + var obj = this.licenseSite; | |
294 | + obj.LicenseId = this.license.LicenseId; | |
295 | + return this.licenseService.DeleteSiteAccount(obj) | |
296 | + .subscribe( | |
297 | + data => (this.AfterDeleteData(data, template)), | |
298 | + error => { | |
299 | + this.error = <any>error; | |
300 | + this.alerts = "<span>" + this.error + "</span>"; | |
301 | + }); | |
302 | + } | |
303 | + } | |
304 | + | |
305 | + AddLicenseSite(template: TemplateRef<any>){ | |
306 | + this.mode = 'Add'; | |
307 | + this.topPos = '100px'; | |
308 | + this.alerts = ''; | |
309 | + this.insertUpdateSiteLicenseFrm.controls['siteId'].setValue(0); | |
310 | + this.insertUpdateSiteLicenseFrm.controls['buildAccName'].setValue(''); | |
311 | + this.insertUpdateSiteLicenseFrm.controls['siteUrl'].setValue(''); | |
312 | + this.insertUpdateSiteLicenseFrm.controls['siteUrlTo'].setValue(''); | |
313 | + this.insertUpdateSiteLicenseFrm.controls['institutionName'].setValue(''); | |
314 | + this.insertUpdateSiteLicenseFrm.controls['departmentName'].setValue(''); | |
315 | + this.insertUpdateSiteLicenseFrm.controls['address1'].setValue(''); | |
316 | + this.insertUpdateSiteLicenseFrm.controls['address2'].setValue(''); | |
317 | + this.insertUpdateSiteLicenseFrm.controls['city'].setValue(''); | |
318 | + this.insertUpdateSiteLicenseFrm.controls['phone'].setValue(''); | |
319 | + this.insertUpdateSiteLicenseFrm.controls['zip'].setValue(''); | |
320 | + this.insertUpdateSiteLicenseFrm.controls['countryId'].setValue(0); | |
321 | + this.insertUpdateSiteLicenseFrm.controls['stateId'].setValue(0); | |
322 | + this.insertUpdateSiteLicenseFrm.controls['isActive'].setValue(1); | |
323 | + this.insertUpdateSiteLicenseFrm.controls['isMaster'].setValue(0); | |
324 | + this.insertUpdateSiteLicenseFrm.controls['creationDate'].setValue(''); | |
325 | + this.insertUpdateSiteLicenseFrm.controls['modifiedDate'].setValue(''); | |
326 | + this.insertUpdateSiteLicenseFrm.controls['clientAdminId'].setValue(0); | |
327 | +} | |
328 | + | |
329 | + EditLicenseSite(template: TemplateRef<any>){ | |
330 | + this.mode = 'Edit'; | |
331 | + this.topPos = '100px'; | |
332 | + this.alerts = ''; | |
333 | + this.GetSiteById(); | |
334 | + } | |
335 | + | |
336 | + CancelAddEdit(){ | |
337 | + this.mode = 'Search'; | |
338 | + this.topPos = '2000px'; | |
339 | + this.GetLicenseSites(); | |
340 | + this.selectedRow = this.lstLicenseSites.findIndex(C => C.Id == this.selectedId); | |
341 | + this.SetClickedRow(this.selectedRow, this.lstLicenseSites[this.selectedRow]); | |
342 | + } | |
343 | +} | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/customersummaryreport.component.html
... | ... | @@ -174,6 +174,10 @@ |
174 | 174 | </tr> |
175 | 175 | </thead> |
176 | 176 | <tbody> |
177 | + <tr *ngIf="NoRecord !== ''"> | |
178 | + | |
179 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
180 | + </tr> | |
177 | 181 | <tr *ngFor="let csr of lstCustomerSummaryReport"> |
178 | 182 | <td>{{csr.AccountNumber}}</td> |
179 | 183 | <td>{{csr.LicenseeName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/customersummaryreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | |
20 | 20 | declare var $: any; |
21 | 21 | |
... | ... | @@ -48,10 +48,12 @@ export class CustomerSummaryReport implements OnInit { |
48 | 48 | modalRef: BsModalRef; |
49 | 49 | date = new Date(); |
50 | 50 | previousdate = new Date(); |
51 | - | |
52 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
51 | + NoRecord: string; | |
52 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
53 | + private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
53 | 54 | |
54 | 55 | ngOnInit(): void { |
56 | + this.NoRecord = this.global.NoRecords; | |
55 | 57 | let CustomerSummaryReport = new CustomerSummaryReports(); |
56 | 58 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
57 | 59 | this.CustomerSummaryReportForm = this.fb.group({ |
... | ... | @@ -65,6 +67,7 @@ export class CustomerSummaryReport implements OnInit { |
65 | 67 | sSubscriptionEnd: [0.00], |
66 | 68 | iCountry: [0] |
67 | 69 | }); |
70 | + | |
68 | 71 | this.GetCountry(); |
69 | 72 | this.GetState(); |
70 | 73 | this.GetAccountType(); |
... | ... | @@ -104,6 +107,7 @@ export class CustomerSummaryReport implements OnInit { |
104 | 107 | testScript.setAttribute("type", "text/javascript"); |
105 | 108 | document.body.appendChild(testScript); |
106 | 109 | //this.GetUsageReport(); |
110 | + this._loadingService.HideLoading("global-loading"); | |
107 | 111 | } |
108 | 112 | |
109 | 113 | GetCountry() { |
... | ... | @@ -122,9 +126,23 @@ export class CustomerSummaryReport implements OnInit { |
122 | 126 | } |
123 | 127 | |
124 | 128 | GetCustomerSummeryReport(this) { |
125 | - this.customersummaryreport = this.CustomerSummaryReportForm.value; | |
126 | - var obj = this.customersummaryreport; | |
129 | + this._loadingService.ShowLoading("global-loading"); | |
130 | + this.customersummaryreport = this.CustomerSummaryReportForm.value; | |
131 | + var obj = this.customersummaryreport; | |
127 | 132 | |
128 | - this.reportservice.GetCustomerSummeryReport(obj).subscribe((CustomerSummaryReports: CustomerSummaryReports[]) => { this.lstCustomerSummaryReport = CustomerSummaryReports; this.numberOfUsageReport = this.lstCustomerSummaryReport.length; this.limit = this.lstCustomerSummaryReport.length; }, error => this.error = <any>error); | |
133 | + this.reportservice.GetCustomerSummeryReport(obj).subscribe((CustomerSummaryReports: CustomerSummaryReports[]) => { this.BindFormFields(CustomerSummaryReports); }, error => this.error = <any>error); | |
129 | 134 | } |
135 | + BindFormFields(data) { | |
136 | + this.lstCustomerSummaryReport = data | |
137 | + this.numberOfCustomerSummaryReport = this.lstCustomerSummaryReport.length; this.limit = this.lstCustomerSummaryReport.length; | |
138 | + if (this.lstCustomerSummaryReport.length > 0) { | |
139 | + this.NoRecord = ''; | |
140 | + this._loadingService.HideLoading("global-loading"); | |
141 | + } | |
142 | + if (this.lstCustomerSummaryReport.length == 0) { | |
143 | + this.NoRecord = this.global.NoRecords; | |
144 | + this._loadingService.HideLoading("global-loading"); | |
145 | + } | |
146 | + } | |
147 | + | |
130 | 148 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html
... | ... | @@ -129,6 +129,10 @@ |
129 | 129 | </tr> |
130 | 130 | </thead> |
131 | 131 | <tbody> |
132 | + <tr *ngIf="NoRecord !== ''"> | |
133 | + | |
134 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
135 | + </tr> | |
132 | 136 | <tr *ngFor="let item of lstDiscountCodeReport"> |
133 | 137 | <td>{{item.DiscountCode}}</td> |
134 | 138 | <td>{{item.Percentage}}%</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
... | ... | @@ -15,6 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
18 | 19 | |
19 | 20 | declare var $: any; |
20 | 21 | |
... | ... | @@ -41,10 +42,12 @@ export class DiscountCodeReport implements OnInit { |
41 | 42 | modalRef: BsModalRef; |
42 | 43 | date = new Date(); |
43 | 44 | previousdate = new Date(); |
44 | - | |
45 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
45 | + NoRecord: string; | |
46 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
47 | + private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
46 | 48 | |
47 | 49 | ngOnInit(): void { |
50 | + this.NoRecord = this.global.NoRecords; | |
48 | 51 | let DiscountCodeReport = new DiscountCodeReports(); |
49 | 52 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
50 | 53 | this.DiscountCodeReportForm = this.fb.group({ |
... | ... | @@ -53,8 +56,9 @@ export class DiscountCodeReport implements OnInit { |
53 | 56 | iDiscountCode: [0], |
54 | 57 | iAccountNumber: [] |
55 | 58 | }); |
56 | - | |
59 | + this._loadingService.ShowLoading("global-loading"); | |
57 | 60 | this.GetDiscountCode(); |
61 | + this._loadingService.HideLoading("global-loading"); | |
58 | 62 | //this.GetSubscriptionReport(); |
59 | 63 | $('#fixed_hdr2').fxdHdrCol({ |
60 | 64 | fixedCols: 0, |
... | ... | @@ -90,6 +94,7 @@ export class DiscountCodeReport implements OnInit { |
90 | 94 | testScript.setAttribute("type", "text/javascript"); |
91 | 95 | document.body.appendChild(testScript); |
92 | 96 | //this.GetSubscriptionCancellationReport(); |
97 | + | |
93 | 98 | } |
94 | 99 | |
95 | 100 | |
... | ... | @@ -100,8 +105,21 @@ export class DiscountCodeReport implements OnInit { |
100 | 105 | |
101 | 106 | |
102 | 107 | GetDiscountReport(this) { |
108 | + this._loadingService.ShowLoading("global-loading"); | |
103 | 109 | this.NewSubscription = this.DiscountCodeReportForm.value; |
104 | 110 | var obj = this.NewSubscription; |
105 | - this.reportservice.GetDiscountReport(obj).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.lstDiscountCodeReport = DiscountCodeReports; this.numberOfDiscountCodeReport = this.lstDiscountCodeReport.length; this.limit = this.lstDiscountCodeReport.length; }, error => this.error = <any>error); | |
111 | + this.reportservice.GetDiscountReport(obj).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error); | |
112 | + } | |
113 | + BindFormFields(data) { | |
114 | + this.lstDiscountCodeReport = data | |
115 | + this.numberOfDiscountCodeReport = this.lstDiscountCodeReport.length; this.limit = this.lstDiscountCodeReport.length; | |
116 | + if (this.lstDiscountCodeReport.length > 0) { | |
117 | + this.NoRecord = ''; | |
118 | + this._loadingService.HideLoading("global-loading"); | |
119 | + } | |
120 | + if (this.lstDiscountCodeReport.length == 0) { | |
121 | + this.NoRecord = this.global.NoRecords; | |
122 | + this._loadingService.HideLoading("global-loading"); | |
123 | + } | |
106 | 124 | } |
107 | 125 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html
... | ... | @@ -181,6 +181,10 @@ |
181 | 181 | </tr> |
182 | 182 | </thead> |
183 | 183 | <tbody> |
184 | + <tr *ngIf="NoRecord !== ''"> | |
185 | + | |
186 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
187 | + </tr> | |
184 | 188 | <tr *ngFor="let esr of lstExpiringSubscriptionReport"> |
185 | 189 | <td>{{esr.AccountNumber}}</td> |
186 | 190 | <td>{{esr.LicenseeName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | |
20 | 20 | declare var $: any; |
21 | 21 | |
... | ... | @@ -46,10 +46,13 @@ export class ExpiringSubscriptionReport implements OnInit { |
46 | 46 | modalRef: BsModalRef; |
47 | 47 | date = new Date(); |
48 | 48 | previousdate = new Date(); |
49 | - | |
50 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
49 | + NoRecord: string; | |
50 | + constructor(private router: Router, private reportservice: ReportService, | |
51 | + private fb: FormBuilder, private modalService: BsModalService, | |
52 | + private global: GlobalService, private _loadingService: LoadingService) { } | |
51 | 53 | |
52 | 54 | ngOnInit(): void { |
55 | + this.NoRecord = this.global.NoRecords; | |
53 | 56 | let ExpiringSubscriptionReport = new ExpiringSubscriptionReports(); |
54 | 57 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
55 | 58 | this.ExpiringSubscriptionReportForm = this.fb.group({ |
... | ... | @@ -63,10 +66,12 @@ export class ExpiringSubscriptionReport implements OnInit { |
63 | 66 | iEndPrice: [0.00], |
64 | 67 | iCountryId: [0] |
65 | 68 | }); |
69 | + this._loadingService.ShowLoading("global-loading"); | |
66 | 70 | this.GetCountry(); |
67 | 71 | this.GetState(); |
68 | 72 | this.GetAccountType(); |
69 | 73 | this.GetLicenceType(); |
74 | + this._loadingService.HideLoading("global-loading"); | |
70 | 75 | //this.GetCustomerSummeryReport(); |
71 | 76 | $('#fixed_hdr2').fxdHdrCol({ |
72 | 77 | fixedCols: 0, |
... | ... | @@ -120,10 +125,23 @@ export class ExpiringSubscriptionReport implements OnInit { |
120 | 125 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); |
121 | 126 | } |
122 | 127 | |
123 | - GetExpiringSubscriptionReport(this) { | |
128 | + GetExpiringSubscriptionReport(this) { | |
129 | + this._loadingService.ShowLoading("global-loading"); | |
124 | 130 | this.ExpiringSubscription = this.ExpiringSubscriptionReportForm.value; |
125 | 131 | var obj = this.ExpiringSubscription; |
126 | - this.reportservice.GetExpiringSubscriptionReport(obj).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.lstExpiringSubscriptionReport = ExpiringSubscriptionReports; this.numberOfExpiringSubscriptionReport = this.lstExpiringSubscriptionReport.length; this.limit = this.lstExpiringSubscriptionReport.length; }, error => this.error = <any>error); | |
132 | + this.reportservice.GetExpiringSubscriptionReport(obj).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.BindFormFields(ExpiringSubscriptionReports); }, error => this.error = <any>error); | |
127 | 133 | |
128 | 134 | } |
135 | + BindFormFields(data) { | |
136 | + this.lstExpiringSubscriptionReport = data | |
137 | + this.numberOfExpiringSubscriptionReport = this.lstExpiringSubscriptionReport.length; this.limit = this.lstExpiringSubscriptionReport.length; | |
138 | + if (this.lstExpiringSubscriptionReport.length > 0) { | |
139 | + this.NoRecord = ''; | |
140 | + this._loadingService.HideLoading("global-loading"); | |
141 | + } | |
142 | + if (this.lstExpiringSubscriptionReport.length == 0) { | |
143 | + this.NoRecord = this.global.NoRecords; | |
144 | + this._loadingService.HideLoading("global-loading"); | |
145 | + } | |
146 | + } | |
129 | 147 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.html
... | ... | @@ -115,6 +115,10 @@ |
115 | 115 | </tr> |
116 | 116 | </thead> |
117 | 117 | <tbody> |
118 | + <tr *ngIf="NoRecord !== ''"> | |
119 | + | |
120 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
121 | + </tr> | |
118 | 122 | <tr *ngFor="let item of lstImageExportReport"> |
119 | 123 | <td>{{item.Title}}</td> |
120 | 124 | <td>{{item.ImageName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | declare var $: any; |
20 | 20 | |
21 | 21 | @Component({ |
... | ... | @@ -41,10 +41,13 @@ export class ImageExportReport implements OnInit { |
41 | 41 | modalRef: BsModalRef; |
42 | 42 | date = new Date(); |
43 | 43 | previousdate = new Date(); |
44 | - | |
45 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
44 | + NoRecord: string; | |
45 | + constructor(private router: Router, private reportservice: ReportService, | |
46 | + private fb: FormBuilder, private modalService: BsModalService, | |
47 | + private global: GlobalService, private _loadingService: LoadingService) { } | |
46 | 48 | |
47 | 49 | ngOnInit(): void { |
50 | + this.NoRecord = this.global.NoRecords; | |
48 | 51 | let ImageExportReport = new ImageExportReports(); |
49 | 52 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
50 | 53 | this.ImageExportReportForm = this.fb.group({ |
... | ... | @@ -89,10 +92,23 @@ export class ImageExportReport implements OnInit { |
89 | 92 | //this.GetSubscriptionCancellationReport(); |
90 | 93 | } |
91 | 94 | |
92 | - GetImageExportReport(this) { | |
95 | + GetImageExportReport(this) { | |
96 | + this._loadingService.ShowLoading("global-loading"); | |
93 | 97 | this.NewSubscription = this.ImageExportReportForm.value; |
94 | 98 | var obj = this.NewSubscription; |
95 | - this.reportservice.GetImageExportReport(obj).subscribe((ImageExportReports: ImageExportReports[]) => { this.lstImageExportReport = ImageExportReports; this.numberOfImageExportReport = this.lstImageExportReport.length; this.limit = this.lstImageExportReport.length; }, error => this.error = <any>error); | |
99 | + this.reportservice.GetImageExportReport(obj).subscribe((ImageExportReports: ImageExportReports[]) => { this.BindFormFields(ImageExportReports); }, error => this.error = <any>error); | |
100 | + } | |
101 | + BindFormFields(data) { | |
102 | + this.lstImageExportReport = data | |
103 | + this.numberOfImageExportReport = this.lstImageExportReport.length; this.limit = this.lstImageExportReport.length; | |
104 | + if (this.lstImageExportReport.length > 0) { | |
105 | + this.NoRecord = ''; | |
106 | + this._loadingService.HideLoading("global-loading"); | |
107 | + } | |
108 | + if (this.lstImageExportReport.length == 0) { | |
109 | + this.NoRecord = this.global.NoRecords; | |
110 | + this._loadingService.HideLoading("global-loading"); | |
111 | + } | |
96 | 112 | } |
97 | 113 | |
98 | 114 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
... | ... | @@ -124,6 +124,10 @@ |
124 | 124 | </tr> |
125 | 125 | </thead> |
126 | 126 | <tbody> |
127 | + <tr *ngIf="NoRecord !== ''"> | |
128 | + | |
129 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
130 | + </tr> | |
127 | 131 | <tr *ngFor="let item of lstNetAdSubscriptionReport"> |
128 | 132 | <td>{{item.LicenseType}}</td> |
129 | 133 | <td>{{item.AccountType}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | declare var $: any; |
20 | 20 | |
21 | 21 | @Component({ |
... | ... | @@ -41,10 +41,12 @@ export class NetAdSubscriptionReport implements OnInit { |
41 | 41 | modalRef: BsModalRef; |
42 | 42 | date = new Date(); |
43 | 43 | previousdate = new Date(); |
44 | - | |
45 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
44 | + NoRecord: string; | |
45 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
46 | + private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
46 | 47 | |
47 | 48 | ngOnInit(): void { |
49 | + this.NoRecord = this.global.NoRecords; | |
48 | 50 | let NetAdSubscriptionReport = new NetAdSubscriptionReports(); |
49 | 51 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
50 | 52 | this.NetAdSubscriptionReportForm = this.fb.group({ |
... | ... | @@ -98,11 +100,22 @@ export class NetAdSubscriptionReport implements OnInit { |
98 | 100 | GetLicenceType() { |
99 | 101 | this.reportservice.GetLicenceType().subscribe(st => { this.lstLicenceType = st; }, error => this.error = <any>error); |
100 | 102 | } |
101 | - | |
102 | - | |
103 | 103 | GetNetAdSummaryReport(this) { |
104 | + this._loadingService.ShowLoading("global-loading"); | |
104 | 105 | this.NewSubscription = this.NetAdSubscriptionReportForm.value; |
105 | 106 | var obj = this.NewSubscription; |
106 | - this.reportservice.GetNetAdSummaryReport(obj).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.lstNetAdSubscriptionReport = NetAdSubscriptionReports; this.numberOfNetAdSubscriptionReport = this.lstNetAdSubscriptionReport.length; this.limit = this.lstSubscriptionReport.length; }, error => this.error = <any>error); | |
107 | + this.reportservice.GetNetAdSummaryReport(obj).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.BindFormFields(NetAdSubscriptionReports); }, error => this.error = <any>error); | |
108 | + } | |
109 | + BindFormFields(data) { | |
110 | + this.lstNetAdSubscriptionReport = data | |
111 | + this.numberOfNetAdSubscriptionReport = this.lstNetAdSubscriptionReport.length; this.limit = this.lstNetAdSubscriptionReport.length; | |
112 | + if (this.lstNetAdSubscriptionReport.length > 0) { | |
113 | + this.NoRecord = ''; | |
114 | + this._loadingService.HideLoading("global-loading"); | |
115 | + } | |
116 | + if (this.lstNetAdSubscriptionReport.length == 0) { | |
117 | + this.NoRecord = this.global.NoRecords; | |
118 | + this._loadingService.HideLoading("global-loading"); | |
119 | + } | |
107 | 120 | } |
108 | 121 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.html
... | ... | @@ -125,6 +125,10 @@ |
125 | 125 | </tr> |
126 | 126 | </thead> |
127 | 127 | <tbody> |
128 | + <tr *ngIf="NoRecord !== ''"> | |
129 | + | |
130 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
131 | + </tr> | |
128 | 132 | <tr *ngFor="let item of lstSiteLicenseUsageReport"> |
129 | 133 | <td>{{item.AccountNumber}}</td> |
130 | 134 | <td>{{item.EditionTitle}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
... | ... | @@ -15,14 +15,14 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | declare var $: any; |
20 | 20 | |
21 | 21 | @Component({ |
22 | 22 | templateUrl: './sitelicenseusagereport.component.html' |
23 | 23 | }) |
24 | 24 | export class SiteLicenseUsageReport implements OnInit { |
25 | - public lstSiteLicenseUsageReportReport: any; | |
25 | + public lstSiteLicenseUsageReport: any; | |
26 | 26 | public lstEdition: any; |
27 | 27 | SiteLicenseUsageReportForm: FormGroup; |
28 | 28 | SiteLicenseUsageReports: SiteLicenseUsageReports[]; |
... | ... | @@ -41,10 +41,12 @@ export class SiteLicenseUsageReport implements OnInit { |
41 | 41 | modalRef: BsModalRef; |
42 | 42 | date = new Date(); |
43 | 43 | previousdate = new Date(); |
44 | - | |
45 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
44 | + NoRecord: string; | |
45 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
46 | + private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
46 | 47 | |
47 | 48 | ngOnInit(): void { |
49 | + this.NoRecord = this.global.NoRecords; | |
48 | 50 | let SiteLicenseUsageReport = new SiteLicenseUsageReports(); |
49 | 51 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
50 | 52 | this.SiteLicenseUsageReportForm = this.fb.group({ |
... | ... | @@ -100,8 +102,21 @@ export class SiteLicenseUsageReport implements OnInit { |
100 | 102 | |
101 | 103 | |
102 | 104 | GetSiteLicenseUsageReport(this) { |
105 | + this._loadingService.ShowLoading("global-loading"); | |
103 | 106 | this.NewSubscription = this.SiteLicenseUsageReportForm.value; |
104 | 107 | var obj = this.NewSubscription; |
105 | - this.reportservice.GetSiteLicenseUsageReport(obj).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.lstSiteLicenseUsageReport = SiteLicenseUsageReports; this.numberOfSiteLicenseUsageReport = this.lstSiteLicenseUsageReport.length; this.limit = this.lstSiteLicenseUsageReport.length; }, error => this.error = <any>error); | |
108 | + this.reportservice.GetSiteLicenseUsageReport(obj).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error); | |
109 | + } | |
110 | + BindFormFields(data) { | |
111 | + this.lstSiteLicenseUsageReport = data | |
112 | + this.numberOfSiteLicenseUsageReport = this.lstSiteLicenseUsageReport.length; this.limit = this.lstSiteLicenseUsageReport.length; | |
113 | + if (this.lstSiteLicenseUsageReport.length > 0) { | |
114 | + this.NoRecord = ''; | |
115 | + this._loadingService.HideLoading("global-loading"); | |
116 | + } | |
117 | + if (this.lstSiteLicenseUsageReport.length == 0) { | |
118 | + this.NoRecord = this.global.NoRecords; | |
119 | + this._loadingService.HideLoading("global-loading"); | |
120 | + } | |
106 | 121 | } |
107 | 122 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.html
... | ... | @@ -178,6 +178,10 @@ |
178 | 178 | </tr> |
179 | 179 | </thead> |
180 | 180 | <tbody> |
181 | + <tr *ngIf="NoRecord !== ''"> | |
182 | + | |
183 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
184 | + </tr> | |
181 | 185 | <tr *ngFor="let sr of lstSubscriptionCancellationReport"> |
182 | 186 | <td>{{sr.AccountNumber}}</td> |
183 | 187 | <td>{{sr.LicenseeName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | declare var $: any; |
20 | 20 | |
21 | 21 | @Component({ |
... | ... | @@ -45,10 +45,13 @@ export class SubscriptionCancellationReport implements OnInit { |
45 | 45 | modalRef: BsModalRef; |
46 | 46 | date = new Date(); |
47 | 47 | previousdate = new Date(); |
48 | - | |
49 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
48 | + NoRecord: string; | |
49 | + constructor(private router: Router, private reportservice: ReportService, | |
50 | + private fb: FormBuilder, private modalService: BsModalService, | |
51 | + private global: GlobalService, private _loadingService: LoadingService) { } | |
50 | 52 | |
51 | 53 | ngOnInit(): void { |
54 | + this.NoRecord = this.global.NoRecords; | |
52 | 55 | let SubscriptionCancellationReport = new SubscriptionCancellationReports(); |
53 | 56 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
54 | 57 | this.SubscriptionCancellationReportForm = this.fb.group({ |
... | ... | @@ -62,10 +65,12 @@ export class SubscriptionCancellationReport implements OnInit { |
62 | 65 | icEndPrice: [0], |
63 | 66 | iCountryId: [0], |
64 | 67 | }); |
68 | + this._loadingService.ShowLoading("global-loading"); | |
65 | 69 | this.GetCountry(); |
66 | 70 | this.GetState(); |
67 | 71 | this.GetAccountType(); |
68 | 72 | this.GetLicenceType(); |
73 | + this._loadingService.HideLoading("global-loading"); | |
69 | 74 | //this.GetSubscriptionReport(); |
70 | 75 | $('#fixed_hdr2').fxdHdrCol({ |
71 | 76 | fixedCols: 0, |
... | ... | @@ -101,6 +106,7 @@ export class SubscriptionCancellationReport implements OnInit { |
101 | 106 | testScript.setAttribute("type", "text/javascript"); |
102 | 107 | document.body.appendChild(testScript); |
103 | 108 | this.GetSubscriptionCancellationReport(); |
109 | + | |
104 | 110 | } |
105 | 111 | |
106 | 112 | |
... | ... | @@ -119,10 +125,23 @@ export class SubscriptionCancellationReport implements OnInit { |
119 | 125 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); |
120 | 126 | } |
121 | 127 | |
122 | - GetSubscriptionCancellationReport(this) { | |
128 | + GetSubscriptionCancellationReport(this) { | |
129 | + this._loadingService.ShowLoading("global-loading"); | |
123 | 130 | this.NewSubscription = this.SubscriptionCancellationReportForm.value; |
124 | 131 | var obj = this.NewSubscription; |
125 | - this.reportservice.GetSubscriptionCancellationReport(obj).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.lstSubscriptionCancellationReport = SubscriptionCancellationReports; this.numberOfSubscriptionCancellationReport = this.lstSubscriptionCancellationReport.length; this.limit = this.lstSubscriptionReport.length; }, error => this.error = <any>error); | |
132 | + this.reportservice.GetSubscriptionCancellationReport(obj).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.BindFormFields(SubscriptionCancellationReports); }, error => this.error = <any>error); | |
126 | 133 | |
127 | 134 | } |
135 | + BindFormFields(data) { | |
136 | + this.lstSubscriptionCancellationReport = data | |
137 | + this.numberOfSubscriptionCancellationReport = this.lstSubscriptionCancellationReport.length; this.limit = this.lstSubscriptionCancellationReport.length; | |
138 | + if (this.lstSubscriptionCancellationReport.length > 0) { | |
139 | + this.NoRecord = ''; | |
140 | + this._loadingService.HideLoading("global-loading"); | |
141 | + } | |
142 | + if (this.lstSubscriptionCancellationReport.length == 0) { | |
143 | + this.NoRecord = this.global.NoRecords; | |
144 | + this._loadingService.HideLoading("global-loading"); | |
145 | + } | |
146 | + } | |
128 | 147 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.html
... | ... | @@ -180,6 +180,10 @@ |
180 | 180 | </tr> |
181 | 181 | </thead> |
182 | 182 | <tbody> |
183 | + <tr *ngIf="NoRecord !== ''"> | |
184 | + | |
185 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
186 | + </tr> | |
183 | 187 | <tr *ngFor="let sr of lstSubscriptionReport"> |
184 | 188 | <td>{{sr.AccountNumber}}</td> |
185 | 189 | <td>{{sr.LicenseeName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | |
20 | 20 | declare var $: any; |
21 | 21 | |
... | ... | @@ -46,10 +46,13 @@ export class SubscriptionReport implements OnInit { |
46 | 46 | modalRef: BsModalRef; |
47 | 47 | date = new Date(); |
48 | 48 | previousdate = new Date(); |
49 | - | |
50 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
49 | + NoRecord: string; | |
50 | + constructor(private router: Router, private reportservice: ReportService, | |
51 | + private fb: FormBuilder, private modalService: BsModalService, | |
52 | + private global: GlobalService, private _loadingService: LoadingService) { } | |
51 | 53 | |
52 | 54 | ngOnInit(): void { |
55 | + this.NoRecord = this.global.NoRecords; | |
53 | 56 | let SubscriptionReport = new SubscriptionReports(); |
54 | 57 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
55 | 58 | this.SubscriptionReportForm = this.fb.group({ |
... | ... | @@ -63,10 +66,12 @@ export class SubscriptionReport implements OnInit { |
63 | 66 | icEndPrice: [0], |
64 | 67 | iCountryId: [0], |
65 | 68 | }); |
69 | + this._loadingService.ShowLoading("global-loading"); | |
66 | 70 | this.GetCountry(); |
67 | 71 | this.GetState(); |
68 | 72 | this.GetAccountType(); |
69 | 73 | this.GetLicenceType(); |
74 | + this._loadingService.HideLoading("global-loading"); | |
70 | 75 | //this.GetSubscriptionReport(); |
71 | 76 | $('#fixed_hdr2').fxdHdrCol({ |
72 | 77 | fixedCols: 0, |
... | ... | @@ -121,9 +126,22 @@ export class SubscriptionReport implements OnInit { |
121 | 126 | } |
122 | 127 | |
123 | 128 | GetSubscriptionReport(this) { |
129 | + this._loadingService.ShowLoading("global-loading"); | |
124 | 130 | this.NewSubscription = this.SubscriptionReportForm.value; |
125 | 131 | var obj = this.NewSubscription; |
126 | - this.reportservice.GetSubscriptionReport(obj).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.lstSubscriptionReport = SubscriptionReports; this.numberOfSubscriptionReport = this.lstSubscriptionReport.length; this.limit = this.lstSubscriptionReport.length; }, error => this.error = <any>error); | |
132 | + this.reportservice.GetSubscriptionReport(obj).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.BindFormFields(SubscriptionReports);}, error => this.error = <any>error); | |
127 | 133 | |
128 | 134 | } |
135 | + BindFormFields(data) { | |
136 | + this.lstSubscriptionReport = data | |
137 | + this.numberOfSubscriptionReport = this.lstSubscriptionReport.length; this.limit = this.lstSubscriptionReport.length; | |
138 | + if (this.lstSubscriptionReport.length > 0) { | |
139 | + this.NoRecord = ''; | |
140 | + this._loadingService.HideLoading("global-loading"); | |
141 | + } | |
142 | + if (this.lstSubscriptionReport.length == 0) { | |
143 | + this.NoRecord = this.global.NoRecords; | |
144 | + this._loadingService.HideLoading("global-loading"); | |
145 | + } | |
146 | + } | |
129 | 147 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.html
... | ... | @@ -146,6 +146,10 @@ |
146 | 146 | </tr> |
147 | 147 | </thead> |
148 | 148 | <tbody> |
149 | + <tr *ngIf="NoRecord !== ''"> | |
150 | + | |
151 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
152 | + </tr> | |
149 | 153 | <tr *ngFor="let usage of lstUserUsageReport"> |
150 | 154 | <td>{{usage.LoginId}}</td> |
151 | 155 | <td>{{usage.FirstName}}</td> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/usagereport.component.ts
... | ... | @@ -15,7 +15,7 @@ import { BsModalRef } from 'ngx-bootstrap/modal/bs-modal-ref.service'; |
15 | 15 | import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | - | |
18 | +import { LoadingService } from '../../shared/loading.service'; | |
19 | 19 | declare var $: any; |
20 | 20 | |
21 | 21 | @Component({ |
... | ... | @@ -44,11 +44,13 @@ export class UsageReport implements OnInit { |
44 | 44 | modalRef: BsModalRef; |
45 | 45 | date = new Date(); |
46 | 46 | previousdate = new Date(); |
47 | + NoRecord: string; | |
48 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
49 | + private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
47 | 50 | |
48 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService) { } | |
49 | - | |
50 | - | |
51 | + | |
51 | 52 | ngOnInit(): void { |
53 | + this.NoRecord = this.global.NoRecords; | |
52 | 54 | let usagereport = new UsageReports(); |
53 | 55 | this.previousdate.setDate(this.previousdate.getDate() - 365); |
54 | 56 | this.UsageReportForm = this.fb.group({ |
... | ... | @@ -94,14 +96,17 @@ export class UsageReport implements OnInit { |
94 | 96 | testScript.setAttribute("id", "fixed_table_rc"); |
95 | 97 | testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); |
96 | 98 | testScript.setAttribute("type", "text/javascript"); |
97 | - document.body.appendChild(testScript); | |
99 | + document.body.appendChild(testScript); | |
100 | + | |
98 | 101 | this.GetUsageReport(); |
102 | + | |
99 | 103 | } |
100 | 104 | |
101 | - GetUsageReport(this) { | |
105 | + GetUsageReport(this) { | |
106 | + this._loadingService.ShowLoading("global-loading"); | |
102 | 107 | this.usagereport = this.UsageReportForm.value; |
103 | 108 | var obj = this.usagereport; |
104 | - this.reportservice.GetUsageReport(obj).subscribe((UsageReports: UsageReports[]) => { this.lstUserUsageReport = UsageReports; this.numberOfUsageReport = this.lstUserUsageReport.length; this.limit = this.lstUserUsageReport.length; }, error => this.error = <any>error); | |
109 | + this.reportservice.GetUsageReport(obj).subscribe((UsageReports: UsageReports[]) => { this.BindFormFields(UsageReports);}, error => this.error = <any>error); | |
105 | 110 | } |
106 | 111 | |
107 | 112 | GetCountry() { |
... | ... | @@ -111,4 +116,17 @@ export class UsageReport implements OnInit { |
111 | 116 | GetState() { |
112 | 117 | this.reportservice.GetState().subscribe(st => { this.lstState = st; }, error => this.error = <any>error); |
113 | 118 | } |
119 | + | |
120 | + BindFormFields(data) { | |
121 | + this.lstUserUsageReport = data | |
122 | + this.numberOfUsageReport = this.lstUserUsageReport.length; this.limit = this.lstUserUsageReport.length; | |
123 | + if (this.lstUserUsageReport.length > 0) { | |
124 | + this.NoRecord = ''; | |
125 | + this._loadingService.HideLoading("global-loading"); | |
126 | + } | |
127 | + if (this.lstUserUsageReport.length == 0) { | |
128 | + this.NoRecord = this.global.NoRecords; | |
129 | + this._loadingService.HideLoading("global-loading"); | |
130 | + } | |
131 | + } | |
114 | 132 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.html
1 | 1 | <div class="row"> |
2 | 2 | <div class="col-sm-12 pageHeading"> |
3 | - <h4>List User</h4> | |
3 | + <h4>{{modalTitle}}</h4> | |
4 | 4 | </div> |
5 | 5 | <div class="col-sm-12"> |
6 | 6 | <div [className]="divClass"> |
... | ... | @@ -121,7 +121,13 @@ |
121 | 121 | <th>Status</th> |
122 | 122 | </tr> |
123 | 123 | </thead> |
124 | + | |
124 | 125 | <tbody> |
126 | + <tr *ngIf="NoRecord !== ''"> | |
127 | + | |
128 | + <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
129 | + </tr> | |
130 | + | |
125 | 131 | <tr *ngFor="let UserEntity of UserList ;let i = index" (click)="SetClickedRow(i, UserEntity)" [class.active]="i == selectedRow" [class.inactive]="i != selectedRow"> |
126 | 132 | <td><input type="hidden" value="{{UserEntity.Id}}">{{UserEntity.FirstName}}</td> |
127 | 133 | <td>{{UserEntity.LastName}}</td> |
... | ... | @@ -133,12 +139,10 @@ |
133 | 139 | <td>{{UserEntity.ModifiedDate | date: 'MM/dd/yyyy'}}</td> |
134 | 140 | <td>{{UserEntity.AccountNumber}}</td> |
135 | 141 | <td>{{UserEntity.EditionType}}</td> |
136 | - | |
137 | 142 | <td> |
138 | - <span [ngClass]="(UserEntity.UserStatus==Active?'label label-success':'label label-default')">{{UserEntity.UserStatus}}</span> | |
143 | + <span *ngIf="UserEntity.UserStatus=='Active'" class="label label-success">Active</span> | |
144 | + <span *ngIf="UserEntity.UserStatus!='Active'" class="label label-default">Inactive</span> | |
139 | 145 | </td> |
140 | - | |
141 | - | |
142 | 146 | </tr> |
143 | 147 | |
144 | 148 | |
... | ... | @@ -222,13 +226,13 @@ |
222 | 226 | <div class="form-group"> |
223 | 227 | <label for="status" class="col-sm-4 control-label">Status :</label> |
224 | 228 | <div class="col-sm-7"> |
225 | - | |
229 | + | |
226 | 230 | <label class="radio-inline"> |
227 | - <input name="isActive" value="true" type="radio" formControlName="UserStatusActive" (change)="handleChange($event)"> | |
231 | + <input name="UserStatusActive" value="true" type="radio" formControlName="UserStatusActive" (change)="handleChange($event)"> | |
228 | 232 | Active |
229 | 233 | </label> |
230 | 234 | <label class="radio-inline"> |
231 | - <input name="isActive" value="false" type="radio" formControlName="UserStatusInActive" (change)="handleChange($event)"> | |
235 | + <input name="UserStatusActive" value="false" type="radio" formControlName="UserStatusActive" (change)="handleChange($event)"> | |
232 | 236 | Inactive |
233 | 237 | </label> |
234 | 238 | </div> | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
... | ... | @@ -16,6 +16,7 @@ import 'rxjs/add/operator/filter'; |
16 | 16 | import { LoadingService } from '../../shared/loading.service'; |
17 | 17 | declare var $: any; |
18 | 18 | import { DatePipe } from '@angular/common'; |
19 | +import { GlobalService } from '../../Shared/global'; | |
19 | 20 | @Component({ |
20 | 21 | templateUrl:'./users.component.html' // '../../../../../wwwroot/html/UpdateProfile/updateuserprofile.component.html' |
21 | 22 | }) |
... | ... | @@ -45,16 +46,18 @@ export class UsersList implements OnInit { |
45 | 46 | selectedId: number = 0; |
46 | 47 | divClass: string; |
47 | 48 | isActive: boolean; |
49 | + NoRecord: string; | |
48 | 50 | //@ViewChild("profileModal") |
49 | 51 | //profileModal: ModalComponent; |
50 | 52 | //errorMessage: any; |
51 | 53 | constructor(private _loadingService: LoadingService,private userservice: UserService, private router: Router, private fb: FormBuilder, private http: Http, |
52 | - private _confirmService: ConfirmService | |
54 | + private _confirmService: ConfirmService,private global:GlobalService | |
53 | 55 | ) { } |
54 | 56 | |
55 | - ngOnInit(): void { | |
57 | + ngOnInit(): void { | |
58 | + this.modalTitle = 'LIST USER'; | |
56 | 59 | this.alerts = ''; |
57 | - | |
60 | + this.NoRecord = this.global.NoRecords; | |
58 | 61 | this.Users = this.fb.group({ |
59 | 62 | FirstName:[''], |
60 | 63 | LastName: [''], |
... | ... | @@ -83,7 +86,7 @@ export class UsersList implements OnInit { |
83 | 86 | Modifiedby: [''], |
84 | 87 | DeactivationDate: [''], |
85 | 88 | isActive: [false], |
86 | - UserStatusActive: [''], | |
89 | + UserStatusActive: ['false'], | |
87 | 90 | UserStatusInActive:[''] |
88 | 91 | }); |
89 | 92 | this.managerightFrm = this.fb.group({ |
... | ... | @@ -104,7 +107,7 @@ export class UsersList implements OnInit { |
104 | 107 | { width: 150, align: 'Center' }, |
105 | 108 | { width: 150, align: 'Center' }, |
106 | 109 | { width: 350, align: 'Center' }, |
107 | - { width: 500, align: 'Center' }, | |
110 | + { width: 200, align: 'Center' }, | |
108 | 111 | { width: 130, align: 'Center' }, |
109 | 112 | { width: 120, align: 'center' }, |
110 | 113 | { width: 280, align: 'Center' }, |
... | ... | @@ -147,7 +150,7 @@ export class UsersList implements OnInit { |
147 | 150 | public SetClickedRow(i: number, item: any) { |
148 | 151 | this.selectedRow = i; |
149 | 152 | this.selectedId = item['Id']; |
150 | - this.UserManageRightsEntity = item; | |
153 | + this.UserEntity = item; | |
151 | 154 | } |
152 | 155 | public SetClickedRowManageRight(j: number, item: any) { |
153 | 156 | this.selectedRow = j; |
... | ... | @@ -193,12 +196,24 @@ export class UsersList implements OnInit { |
193 | 196 | |
194 | 197 | }) |
195 | 198 | |
196 | - .subscribe(x => { this.UserList = x; }, error => this.error = <any>error); | |
197 | - this._loadingService.HideLoading("global-loading"); | |
199 | + .subscribe(x => { this.BindFormFields(x) }, error => this.error = <any>error); | |
200 | + | |
201 | + } | |
202 | + BindFormFields(data) { | |
203 | + this.UserList = data; | |
204 | + if (this.UserList.length > 0) { | |
205 | + this.NoRecord = ''; | |
206 | + this._loadingService.HideLoading("global-loading"); | |
207 | + } | |
208 | + if (this.UserList.length == 0) { | |
209 | + this.NoRecord = this.global.NoRecords; | |
210 | + this._loadingService.HideLoading("global-loading"); | |
211 | + } | |
198 | 212 | } |
199 | - | |
200 | 213 | EditUser() { |
214 | + debugger; | |
201 | 215 | this.Mode = 'Edit'; |
216 | + this.modalTitle = 'Edit USER'; | |
202 | 217 | this.topPos = '100px'; |
203 | 218 | this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; |
204 | 219 | this.alerts = ''; |
... | ... | @@ -217,14 +232,21 @@ export class UsersList implements OnInit { |
217 | 232 | this.adduserFrm.controls['Createdby'].setValue(this.UserEntity.Createdby) |
218 | 233 | this.adduserFrm.controls['Modifiedby'].setValue(this.UserEntity.Modifiedby) |
219 | 234 | this.adduserFrm.controls['DeactivationDate'].setValue(this.datePipe.transform(this.UserEntity.DeactivationDate, 'MM/dd/yyyy')) |
220 | - this.adduserFrm.controls['UserStatusActive'].setValue(true) | |
221 | - this.adduserFrm.controls['UserStatusInActive'].setValue(false) | |
235 | + if (this.UserEntity.UserStatus == 'Active') { | |
236 | + this.adduserFrm.controls['UserStatusActive'].setValue('true') | |
237 | + } | |
238 | + else { | |
239 | + this.adduserFrm.controls['UserStatusActive'].setValue('false') | |
240 | + } | |
241 | + //this.adduserFrm.controls['UserStatusActive'].setValue(true) | |
242 | + //this.adduserFrm.controls['UserStatusInActive'].setValue(false) | |
222 | 243 | this.isActive = (this.UserEntity.UserStatus=='Active'?true :false) |
223 | 244 | |
224 | 245 | } |
225 | 246 | |
226 | 247 | EditManageUserRights() { |
227 | 248 | this.Mode = 'ManageRight'; |
249 | + this.modalTitle = 'MANAGE USER Right'; | |
228 | 250 | this.topPos = '100px'; |
229 | 251 | this.divClass = 'col-sm-10 col-sm-offset-1 col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3'; |
230 | 252 | this.alerts = ''; |
... | ... | @@ -259,7 +281,7 @@ export class UsersList implements OnInit { |
259 | 281 | } |
260 | 282 | |
261 | 283 | if (this.adduserFrm.valid && this.alerts == '') { |
262 | - this.adduserFrm.controls['isActive'].setValue(this.isActive) | |
284 | + this.adduserFrm.controls['isActive'].setValue(this.adduserFrm.value.UserStatusActive) | |
263 | 285 | |
264 | 286 | var UserEntity = this.adduserFrm.value; |
265 | 287 | |
... | ... | @@ -274,6 +296,10 @@ export class UsersList implements OnInit { |
274 | 296 | |
275 | 297 | } |
276 | 298 | |
299 | + //public DeleteUnblockedUser(this) { | |
300 | + // this.alerts = ''; | |
301 | + //} | |
302 | + | |
277 | 303 | AfterInsertData(data) { |
278 | 304 | |
279 | 305 | if (data == "User updated successfully") { | ... | ... |
400-SOURCECODE/Admin/src/app/shared/global.ts
... | ... | @@ -7,19 +7,20 @@ export class GlobalService { |
7 | 7 | UserType: number =1; |
8 | 8 | AccountType: number = 0; |
9 | 9 | loggedInUser: any; |
10 | + NoRecords: string; | |
10 | 11 | constructor() { |
11 | 12 | this.hostURL = "http://192.168.84.242:97/"; |
12 | 13 | this.LiveURL = "http://qa.beta.interactiveanatomy.com/API/Adminapi/"; |
13 | - //this.resourceBaseUrl = this.hostURL; | |
14 | - this.resourceBaseUrl = this.LiveURL; | |
15 | - //localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
16 | - // { | |
17 | - // "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016", "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": null, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null | |
18 | - // })); | |
14 | + this.resourceBaseUrl = this.hostURL; | |
15 | + //this.resourceBaseUrl = this.LiveURL; | |
16 | + localStorage.setItem('loggedInUserDetails', JSON.stringify( | |
17 | + { | |
18 | + "Id": 1, "FirstName": "Maribel", "LastName": "sfsfsfsfsfsfs", "EmailId": "ravi.vishwakarma@ebix.com", "LoginId": "superadmin", "Password": "ebix@2016", "SecurityQuestionId": 1, "SecurityAnswer": "boxer", "CreatorId": 1, "CreationDate": "2009-03-02T00:00:00", "DeactivationDate": null, "ModifierId": 1, "ModifiedDate": "2017-01-24T02:03:19", "UserType": "Super Admin", "UserTypeId": 1, "IsActive": true, "IsCorrectPassword": false, "IncorrectLoginAttemptCount": 0, "IsBlocked": false, "LicenseId": 0, "EditionId": 0, "LoginFailureCauseId": 0, "Modules": [{ "slug": "da-view-list", "name": "Dissectible Anatomy", "id": 1 }, { "slug": "tile-view-list", "name": "Atlas Anatomy", "id": 2 }, { "slug": "3d-anatomy-list", "name": "3D Anatomy", "id": 3 }, { "slug": "clinical-illustrations", "name": "Clinical Illustrations", "id": 4 }, { "slug": "clinical-animations", "name": "Clinical Animations", "id": 5 }, { "slug": "Link/encyclopedia", "name": "Encyclopedia", "id": 6 }, { "slug": "curriculum-builder", "name": "Curriculum Builder", "id": 7 }, { "slug": "anatomy-test", "name": "Anatomy Test", "id": 8 }, { "slug": "Link/IP-10", "name": "IP 10", "id": 9 }, { "slug": "lab-exercises", "name": "Lab Exercises", "id": 10 }, { "slug": "Link/indepth-reports", "name": "In-Depth Reports", "id": 11 }, { "slug": "Link/complementary-and-alternate-medicine", "name": "CAM", "id": 12 }, { "slug": "ADAM-images", "name": "A.D.A.M. Images", "id": 13 }, { "slug": "Link/bodyguide", "name": "Body Guide", "id": 14 }, { "slug": "Link/health-navigator", "name": "Symptom Navigator", "id": 15 }, { "slug": "Link/wellness-tools", "name": "The Wellness Tools", "id": 16 }, { "slug": "Link/aod", "name": "A.D.A.M. OnDemand", "id": 1017 }], "LicenseInfo": null, "LicenseSubscriptions": null, "IsSubscriptionExpired": false, "SubscriptionExpirationDate": null, "TermsAndConditionsTitle": null, "TermsAndConditionsText": null | |
19 | + })); | |
19 | 20 | this.loggedInUser = JSON.parse(localStorage.getItem("loggedInUserDetails")); |
20 | 21 | this.UserId = this.loggedInUser.Id; |
21 | 22 | this.UserType = this.loggedInUser.UserTypeId; |
22 | - | |
23 | + this.NoRecords = 'No records founds.'; | |
23 | 24 | |
24 | 25 | } |
25 | 26 | } | ... | ... |
400-SOURCECODE/Admin/src/assets/styles/admin-custom.css