diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetSearchUserList.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetSearchUserList.sql
new file mode 100644
index 0000000..ced6c2c
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/dbo.usp_GetSearchUserList.sql
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteSiteAccount.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteSiteAccount.sql
new file mode 100644
index 0000000..582afde
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_DeleteSiteAccount.sql
@@ -0,0 +1,48 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_DeleteSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_DeleteSiteAccount]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 08-Feb-2018
+-- Description: To delete a site account for a license account and site
+-- ====================================================
+create PROCEDURE [dbo].[usp_DeleteSiteAccount]
+ -- Add the parameters for the stored procedure here
+ @iSiteId int, @LicenseId int, @UserId int,
+ @Status bit out
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+SET NOCOUNT ON;
+
+ set @Status = 0;
+ BEGIN TRY
+ BEGIN TRANSACTION
+
+ delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
+ delete from AIAUserToSite where SiteId = @iSiteId and UserId = @UserId;
+ delete from Site where Id = @iSiteId;
+
+ COMMIT TRANSACTION
+ set @Status = 1;
+ END TRY
+ BEGIN CATCH
+ IF @@TRANCOUNT > 0
+ ROLLBACK TRANSACTION
+ END CATCH
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
+
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetAccountNumber.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetAccountNumber.sql
new file mode 100644
index 0000000..9102522
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetAccountNumber.sql
@@ -0,0 +1,40 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetAccountNumber]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_GetAccountNumber]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 23-Dec-2009
+-- Description: To get the license id and account no of licenses of a type
+-- ====================================================
+CREATE PROCEDURE [dbo].[usp_GetAccountNumber]
+ -- Add the parameters for the stored procedure here
+ @LicenseType int
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+ if(@LicenseType = 0)
+ begin
+ SELECT License.Id,License.AccountNumber FROM License
+ WHERE License.IsActive = 1
+ end
+ else
+ begin
+ SELECT License.Id,License.AccountNumber FROM License
+ WHERE License.IsActive = 1 and License.LicenseTypeId = @LicenseType
+ end
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
+
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseModestySettings.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseModestySettings.sql
new file mode 100644
index 0000000..081fabf
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetLicenseModestySettings.sql
@@ -0,0 +1,50 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_GetLicenseModestySettings]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 05-Feb-2018
+-- Description: To get all the modesty settings of a license and its related editions
+-- ====================================================
+create PROCEDURE [dbo].[usp_GetLicenseModestySettings]
+ -- Add the parameters for the stored procedure here
+ @iLicenseId int, @iBuildingLevelId int
+AS
+BEGIN
+
+ IF 1=0 BEGIN
+ SET FMTONLY OFF
+ END
+
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+ IF @iBuildingLevelId = 0
+ BEGIN
+ SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, LicenseToEdition.IsModesty as IsModesty
+ FROM LicenseToEdition
+ INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id
+ WHERE LicenseToEdition.LicenseId=@iLicenseId and Edition.IsActive=1 ORDER BY Edition.Priority
+ END
+ ELSE
+ BEGIN
+ SELECT LicenseToEdition.Id as LicenseEditionId, Edition.Title, SiteToLicenseEdition.IsModesty as IsModesty
+ FROM SiteToLicenseEdition
+ INNER JOIN LicenseToEdition ON SiteToLicenseEdition.LicenseEditionId = LicenseToEdition.Id
+ INNER JOIN Edition ON LicenseToEdition.EditionId = Edition.Id
+ WHERE SiteToLicenseEdition.SiteId=@iBuildingLevelId and Edition.IsActive=1 ORDER BY Edition.Priority
+ END
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteAccountEditions.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteAccountEditions.sql
new file mode 100644
index 0000000..ab6c5d6
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteAccountEditions.sql
@@ -0,0 +1,36 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteAccountEditions]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_GetSiteAccountEditions]
+GO
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 07-Feb-2018
+-- Description: To get a site account editions on the basis of siteid and licenseid
+-- ====================================================
+create PROCEDURE [dbo].[usp_GetSiteAccountEditions]
+ -- Add the parameters for the stored procedure here
+ @SiteId int,
+ @LicenseId int
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+
+ Select SLE.LicenseEditionId, E.Id, E.Title from SiteToLicenseEdition SLE
+ inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id
+ inner join License L on L.Id = LE.LicenseId
+ inner join Edition E on LE.EditionId = E.Id
+ where L.Id = @LicenseId and SLE.SiteId = @SiteId;
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
\ No newline at end of file
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteById.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteById.sql
new file mode 100644
index 0000000..a680048
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_GetSiteById.sql
@@ -0,0 +1,39 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_GetSiteById]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_GetSiteById]
+GO
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 07-Feb-2018
+-- Description: To get a site information on the basis of siteid
+-- ====================================================
+create PROCEDURE [dbo].[usp_GetSiteById]
+ -- Add the parameters for the stored procedure here
+ @SiteId int
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+
+ Select Site.Id,Site.SiteIp,Site.Title,ISNULL(Site.SiteIPTo,'') as SiteIPTo,ISNULL(Site.SiteMasterIPTo,'') as SiteMasterIPTo, Site.Address1, Site.Address2,
+ Site.Zip, Site.Phone, Site.City, Site.StateId, Site.CountryId, Site.IsMaster, Site.IsActive,
+ CONVERT(VARCHAR,Site.CreationDate,101) as CreationDate,
+ CONVERT(VARCHAR,Site.ModifiedDate,101) as ModifiedDate,
+ Site.InstituteName,Site.Department, AIAUser.Id as UserId,AIAUser.FirstName,AIAUser.EmailId
+ From ((Site INNER JOIN AIAUserToSite on Site.Id=AIAUserToSite.SiteId)
+ INNER JOIN AIAUser on AIAUserToSite.UserId = AIAUser.Id)
+ Where Site.id = @SiteId;
+
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
\ No newline at end of file
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateSiteAccount.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateSiteAccount.sql
new file mode 100644
index 0000000..bf65716
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_InsertUpdateSiteAccount.sql
@@ -0,0 +1,107 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_InsertUpdateSiteAccount]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_InsertUpdateSiteAccount]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 08-Feb-2018
+-- Description: To insert or update a site account for a license account and site
+-- ====================================================
+create PROCEDURE [dbo].[usp_InsertUpdateSiteAccount]
+ -- Add the parameters for the stored procedure here
+ @iSiteId int, @sSiteIP varchar(2000), @sTitle varchar(100), @sInstituteName varchar(100), @sDepartment varchar(50),
+ @sAddress1 varchar(100), @sAddress2 varchar(100), @sCity varchar(50), @Zip varchar(20), @Phone varchar(30),
+ @StateId int, @CountryId int, @IsMaster bit, @CreationDate datetime, @ModifiedDate datetime,
+ @IsActive bit, @UserId int, @sSiteIPTo varchar(100), @LicenseId int, @SiteEditionIds varchar(1000),
+ @Status bit out
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+SET NOCOUNT ON;
+
+DECLARE @list varchar(1000)
+DECLARE @pos INT, @tempEditionId int, @tempLicenseEditionId int;
+DECLARE @len INT, @tempModesty bit;
+DECLARE @value varchar(1000)
+
+CREATE TABLE #LocalTempTable(
+SiteId int,
+LicenseEditionId int,
+IsModesty bit);
+
+if(@SiteEditionIds != '')
+begin
+ set @SiteEditionIds = @SiteEditionIds + ',';
+end
+SET @list = @SiteEditionIds
+
+ set @Status = 0;
+ BEGIN TRY
+ BEGIN TRANSACTION
+
+ IF @iSiteId = 0
+ BEGIN
+ INSERT INTO [dbo].[Site]([SiteIP],[Title],[InstituteName],[Department],[Address1],[Address2],
+ [City],[Zip],[Phone],[StateId],[CountryId],[IsMaster],[CreationDate],[ModifiedDate],[IsActive],[SiteIPTo])
+ VALUES(@sSiteIP, @sTitle, @sInstituteName, @sDepartment, @sAddress1, @sAddress2, @sCity, @Zip, @Phone,
+ @StateId, @CountryId, @IsMaster, @CreationDate, @ModifiedDate, @IsActive, @sSiteIPTo);
+ -- to get the last inserted identity value in the current session
+ SET @iSiteId=SCOPE_IDENTITY();
+ insert into AIAUserToSite values(@UserId, @iSiteId);
+ END
+ ELSE
+ BEGIN
+ UPDATE [dbo].[Site] SET [SiteIP]=@sSiteIP, [Title]=@sTitle,[InstituteName]=@sInstituteName,
+ [Department]=@sDepartment, [Address1]=@sAddress1, [Address2]=@sAddress2,[City]=@sCity,
+ [Zip]=@Zip, [Phone]=@Phone, [StateId]=@StateId, [CountryId]=@CountryId,
+ [ModifiedDate]=@ModifiedDate, [IsActive]=@IsActive, [SiteIPTo]=@sSiteIPTo
+ WHERE [Id]=@iSiteId
+ END
+
+ insert into #LocalTempTable
+ select SLE.* from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where
+ SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
+
+ delete SLE from SiteToLicenseEdition SLE inner join LicenseToEdition LE on SLE.LicenseEditionId = LE.Id where
+ SLE.SiteId = @iSiteId and LicenseId = @LicenseId;
+
+ set @pos = 0
+ set @len = 0
+
+ WHILE CHARINDEX(',', @list, @pos+1)>0
+ BEGIN
+ set @len = CHARINDEX(',', @list, @pos+1) - @pos;
+ set @value = SUBSTRING(@list, @pos, @len);
+ set @tempEditionId = convert(int, @value);
+ select @tempLicenseEditionId = Id from LicenseToEdition where LicenseId = @LicenseId and EditionId = @tempEditionId;
+ set @tempModesty = 0;
+ if(exists(select * from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId))
+ begin
+ select @tempModesty = IsModesty from #LocalTempTable where LicenseEditionId = @tempLicenseEditionId and SiteId = @iSiteId;
+ end
+ insert into SiteToLicenseEdition(SiteId, LicenseEditionId, IsModesty) values(@iSiteId, @tempLicenseEditionId, @tempModesty);
+ set @pos = CHARINDEX(',', @list, @pos+@len) + 1;
+ END
+
+ COMMIT TRANSACTION
+ set @Status = 1;
+ END TRY
+ BEGIN CATCH
+ IF @@TRANCOUNT > 0
+ ROLLBACK TRANSACTION
+ END CATCH
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
+
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseBasicSettings.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseBasicSettings.sql
new file mode 100644
index 0000000..cd3c0e8
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseBasicSettings.sql
@@ -0,0 +1,49 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseBasicSettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_UpdateLicenseBasicSettings]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 02-Feb-2018
+-- Description: To update a license account basic values
+-- ====================================================
+create PROCEDURE [dbo].[usp_UpdateLicenseBasicSettings]
+ -- Add the parameters for the stored procedure here
+ @iLicenseId int, @sLicenseeFname varchar(50), @sLicenseeLname varchar(50),
+ @sInstitutionName varchar(100)='', @sAddress1 varchar(100)='',
+ @sAddress2 varchar(100)='', @sCity varchar(50)='', @sZip varchar(20)='', @iStateId int, @iCountryId int,
+ @sPhone varchar(30) = '', @sEmailId varchar(50),
+ @Status bit out
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+
+ set @Status = 0;
+ BEGIN TRY
+ BEGIN TRANSACTION
+ UPDATE License SET LicenseeFirstName = @sLicenseeFname, LicenseeLastName = @sLicenseeLname,
+ InstitutionName = @sInstitutionName, Address1 = @sAddress1, Address2 = @sAddress2, EmailId = @sEmailId,
+ City = @sCity, Zip = @sZip, Phone = @sPhone, StateId = @iStateId, CountryId = @iCountryId
+ where Id = @iLicenseId;
+ COMMIT TRANSACTION
+ set @Status = 1;
+ END TRY
+ BEGIN CATCH
+ IF @@TRANCOUNT > 0
+ ROLLBACK TRANSACTION
+ END CATCH
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModestySettings.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModestySettings.sql
new file mode 100644
index 0000000..ddd209f
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModestySettings.sql
@@ -0,0 +1,52 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModestySettings]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_UpdateLicenseModestySettings]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 05-Feb-2018
+-- Description: To update the modesty settings of a license edition or its site
+-- ====================================================
+create PROCEDURE [dbo].[usp_UpdateLicenseModestySettings]
+ -- Add the parameters for the stored procedure here
+ @LicenseEditionId int,
+ @SiteId int,
+ @IsModesty bit,
+ @Status bit out
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+
+ set @Status = 0;
+ BEGIN TRY
+ BEGIN TRANSACTION
+ if(@SiteId = 0)
+ begin
+ UPDATE LicenseToEdition SET IsModesty = @IsModesty where Id = @LicenseEditionId;
+ end
+ else
+ begin
+ UPDATE SiteToLicenseEdition SET IsModesty = @IsModesty where SiteId = @SiteId and LicenseEditionId = @LicenseEditionId;
+ end
+ COMMIT TRANSACTION
+ set @Status = 1;
+ END TRY
+ BEGIN CATCH
+ IF @@TRANCOUNT > 0
+ ROLLBACK TRANSACTION
+ END CATCH
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
diff --git a/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModuleStatus.sql b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModuleStatus.sql
new file mode 100644
index 0000000..3fdc647
--- /dev/null
+++ b/150-DOCUMENTATION/002-DBScripts/Admin/Store Procedure/usp_UpdateLicenseModuleStatus.sql
@@ -0,0 +1,51 @@
+SET QUOTED_IDENTIFIER ON
+GO
+SET ANSI_NULLS ON
+GO
+
+if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[usp_UpdateLicenseModuleStatus]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_UpdateLicenseModuleStatus]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 06-Feb-2018
+-- Description: To insert or update the module status on or off for a license
+-- ====================================================
+CREATE PROCEDURE [dbo].[usp_UpdateLicenseModuleStatus]
+ @LicenseId int,
+ @ModuleId int,
+ @ModuleStatus bit,
+ @Status bit out
+AS
+BEGIN
+
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+ set @Status = 0;
+ BEGIN TRY
+ BEGIN TRANSACTION
+ if(exists(select * from ModuleToLicense where ModuleId = @ModuleId and LicenseId = @LicenseId))
+ begin
+ UPDATE ModuleToLicense SET Status = @ModuleStatus where ModuleId = @ModuleId and LicenseId = @LicenseId;
+ end
+ else
+ begin
+ insert into ModuleToLicense(LicenseId, ModuleId, Status) values(@LicenseId, @ModuleId, @ModuleStatus);
+ end
+ COMMIT TRANSACTION
+ set @Status = 1;
+ END TRY
+ BEGIN CATCH
+ IF @@TRANCOUNT > 0
+ ROLLBACK TRANSACTION
+ END CATCH
+
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
index 77d6a81..739f66e 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/AIAHTML5.ADMIN.API.csproj
@@ -160,11 +160,11 @@
-
+
@@ -722,6 +722,9 @@
AIADBEntity.tt
+
+ AIADBEntity.tt
+
AIADBEntity.tt
@@ -737,6 +740,12 @@
AIADBEntity.tt
+
+ AIADBEntity.tt
+
+
+ AIADBEntity.tt
+
AIADBEntity.tt
@@ -777,6 +786,7 @@
+
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
index 7b34f3a..6b71f6e 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
@@ -38,12 +38,12 @@ namespace AIAHTML5.ADMIN.API.Controllers
return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
}
}
-
+
[Route("Licenses")]
[HttpGet]
public HttpResponseMessage GetLicenses(string accountNumber, string licenseeFirstName, string licenseeLastName, byte licenseTypeId,
- string institutionName, int stateId, int countryId, string emailId, DateTime subscriptionStartDate, DateTime subscriptionEndDate,
- bool isActive)
+ string institutionName, int stateId, int countryId, string emailId, DateTime subscriptionStartDate, DateTime subscriptionEndDate,
+ bool isActive)
{
List LicenseList = new List();
try
@@ -214,5 +214,180 @@ namespace AIAHTML5.ADMIN.API.Controllers
return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
}
}
+
+ [Route("LicenseAccounts")]
+ [HttpGet]
+ public HttpResponseMessage GetLicenseAccounts(int LicenseType)
+ {
+ List> LicenseAccountList = new List>();
+ try
+ {
+ LicenseAccountList = LicenseModel.GetLicenseAccounts(dbContext, LicenseType);
+ return Request.CreateResponse(HttpStatusCode.OK, LicenseAccountList);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("LicenseSites")]
+ [HttpGet]
+ public HttpResponseMessage GetLicenseAccounts(string AccountNo)
+ {
+ List LicenseSiteList = new List();
+ try
+ {
+ LicenseSiteList = LicenseModel.GetLicenseSites(dbContext, AccountNo);
+ return Request.CreateResponse(HttpStatusCode.OK, LicenseSiteList);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("LicenseModestySettings")]
+ [HttpGet]
+ public HttpResponseMessage GetLicenseModestySettings(int LicenseId, int BuildingLevelId)
+ {
+ List> LicenseModestyList = new List>();
+ try
+ {
+ LicenseModestyList = LicenseModel.GetLicenseModestySettings(dbContext, LicenseId, BuildingLevelId);
+ return Request.CreateResponse(HttpStatusCode.OK, LicenseModestyList);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("UpdateLicenseBasicSettings")]
+ [HttpPost]
+ public HttpResponseMessage UpdateLicenseBasicSettings(JObject jsonData)
+ {
+ bool Status = false;
+ LicenseModel licenseModel = new LicenseModel();
+ licenseModel.LicenseId = jsonData["licenseId"].Value();
+ licenseModel.AccountNumber = jsonData["accountNumber"].Value();
+ licenseModel.LicenseeFirstName = jsonData["licenseeFirstName"].Value();
+ licenseModel.LicenseeLastName = jsonData["licenseeLastName"].Value();
+ licenseModel.InstitutionName = jsonData["institutionName"].Value();
+ licenseModel.Address1 = jsonData["address1"].Value();
+ licenseModel.Address2 = jsonData["address2"].Value();
+ licenseModel.City = jsonData["city"].Value();
+ licenseModel.Zip = jsonData["zip"].Value();
+ licenseModel.StateId = jsonData["stateId"].Value();
+ licenseModel.CountryId = jsonData["countryId"].Value();
+ licenseModel.Phone = jsonData["phone"].Value();
+ licenseModel.EmailId = jsonData["email"].Value();
+ try
+ {
+ Status = LicenseModel.UpdateLicenseBasicSettings(dbContext, licenseModel);
+ if (Status)
+ {
+ return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
+ }
+ else
+ {
+ return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("UpdateLicenseModestySettings")]
+ [HttpPost]
+ public HttpResponseMessage UpdateLicenseModestySettings(JObject jsonData)
+ {
+ bool Status = false;
+ List> LicenseModestyList = new List>();
+ Tuple LicenseModesty;
+ for (int i = 0; i < jsonData["obj"].Count(); i++)
+ {
+ LicenseModesty = new Tuple(
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["licenseEditionId"])).Value(),
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["siteId"])).Value(),
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["isModesty"])).Value());
+ LicenseModestyList.Add(LicenseModesty);
+ }
+ try
+ {
+ Status = LicenseModel.UpdateLicenseModestySettings(dbContext, LicenseModestyList);
+ if (Status)
+ {
+ return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
+ }
+ else
+ {
+ return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("LicenseModulesStatus")]
+ [HttpGet]
+ public HttpResponseMessage GetLicenseModulesStatus(int LicenseId)
+ {
+ List> LicenseModulesStatusList = new List>();
+ try
+ {
+ LicenseModulesStatusList = LicenseModel.GetLicenseModulesStatus(dbContext, LicenseId);
+ return Request.CreateResponse(HttpStatusCode.OK, LicenseModulesStatusList);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("UpdateLicenseModulesStatus")]
+ [HttpPost]
+ public HttpResponseMessage UpdateLicenseModulesStatus(JObject jsonData)
+ {
+ bool Status = false;
+ List> LicenseModuleStatusList = new List>();
+ Tuple LicenseModuleStatus;
+ for (int i = 0; i < jsonData["obj"].Count(); i++)
+ {
+ LicenseModuleStatus = new Tuple(
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["licenseId"])).Value(),
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["moduleId"])).Value(),
+ ((Newtonsoft.Json.Linq.JValue)(jsonData["obj"][i]["status"])).Value());
+ LicenseModuleStatusList.Add(LicenseModuleStatus);
+ }
+ try
+ {
+ Status = LicenseModel.UpdateLicenseModulesStatus(dbContext, LicenseModuleStatusList);
+ if (Status)
+ {
+ return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
+ }
+ else
+ {
+ return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
index 711a9d8..012acba 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
@@ -20,13 +20,15 @@ namespace AIAHTML5.ADMIN.API.Controllers
public class ReportController : ApiController
{
AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities();
+ [Route("GetUsageReport")]
+ [HttpGet]
public IHttpActionResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, int iState, int iCountry)
{
var lstUsageReport = dbContext.GetUsageReport(sFromDate, sToDate, sAccoutNumber, sZip, iState, iCountry).ToList();
return Ok(lstUsageReport);
}
- [Route("Api/GetCustomerSummeryReport")]
+ [Route("GetCustomerSummeryReport")]
[HttpGet]
public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable iStartPrice, Nullable iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry)
{
@@ -35,7 +37,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
- [Route("Api/GetExpiringSubscriptionReport")]
+ [Route("GetExpiringSubscriptionReport")]
[HttpGet]
public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId)
{
@@ -43,7 +45,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
return Ok(lstExpiringSubscriptionReport);
}
- [Route("Api/GetSubscriptionReport")]
+ [Route("GetSubscriptionReport")]
[HttpGet]
public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId)
{
@@ -51,7 +53,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList();
return Ok(lstExpiringSubscriptionReport);
}
- [Route("Api/GetSubscriptionCancellationReport")]
+ [Route("GetSubscriptionCancellationReport")]
[HttpGet]
public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId)
{
@@ -60,7 +62,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
return Ok(lstExpiringSubscriptionReport);
}
- [Route("Api/GetNetAdSummaryReport")]
+ [Route("GetNetAdSummaryReport")]
[HttpGet]
public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId)
{
@@ -75,7 +77,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
- [Route("Api/GetSiteLicenseUsageReport")]
+ [Route("GetSiteLicenseUsageReport")]
[HttpGet]
public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition)
{
@@ -90,7 +92,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
- [Route("Api/GetDiscountReport")]
+ [Route("GetDiscountReport")]
[HttpGet]
public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber)
{
@@ -105,7 +107,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
- [Route("Api/GetImageExportReport")]
+ [Route("GetImageExportReport")]
[HttpGet]
public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber)
{
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SiteController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SiteController.cs
new file mode 100644
index 0000000..a35a97c
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SiteController.cs
@@ -0,0 +1,136 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Net;
+using System.Net.Http;
+using System.Web.Http;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
+using AIAHTML5.ADMIN.API.Models;
+using System.Web.Http.Cors;
+using System.Web.Cors;
+using AIAHTML5.Server.Constants;
+using log4net;
+using System.Text;
+using AIAHTML5.ADMIN.API.Entity;
+
+namespace AIAHTML5.ADMIN.API.Controllers
+{
+ //[EnableCors(origins: "http://localhost:4200", headers: "*", methods: "*")]
+ [RoutePrefix("Site")]
+ public class SiteController : ApiController
+ {
+ AIADatabaseV5Entities dbContext = new AIADatabaseV5Entities();
+
+ [Route("SiteDetail")]
+ [HttpGet]
+ public HttpResponseMessage GetSiteById(int SiteId)
+ {
+ SiteModel SiteEntity = new SiteModel();
+ try
+ {
+ SiteEntity = SiteModel.GetSiteById(dbContext, SiteId);
+ return Request.CreateResponse(HttpStatusCode.OK, SiteEntity);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("SiteAccountEditions")]
+ [HttpGet]
+ public HttpResponseMessage GetSiteAccountEditions(int SiteId, int LicenseId)
+ {
+ List> SiteAccountEditionList = new List>();
+ try
+ {
+ SiteAccountEditionList = SiteModel.GetSiteAccountEditions(dbContext, SiteId, LicenseId);
+ return Request.CreateResponse(HttpStatusCode.OK, SiteAccountEditionList);
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("InsertUpdateSiteAccount")]
+ [HttpPost]
+ public HttpResponseMessage InsertUpdateSiteAccount(JObject jsonData)
+ {
+ bool Status = false;
+ SiteModel SiteEntity = new SiteModel();
+ SiteEntity.LicenseId = jsonData["licenseId"].Value();
+ SiteEntity.Id = jsonData["siteId"].Value();
+ SiteEntity.Title = jsonData["title"].Value();
+ SiteEntity.Ip = jsonData["siteUrl"].Value();
+ SiteEntity.SiteIpTo = jsonData["siteUrlTo"].Value();
+ SiteEntity.MasterIpTo = jsonData["siteMasterUrlTo"].Value();
+ SiteEntity.InstituteName = jsonData["institutionName"].Value();
+ SiteEntity.Department = jsonData["departmentName"].Value();
+ SiteEntity.Address1 = jsonData["address1"].Value();
+ SiteEntity.Address2 = jsonData["address2"].Value();
+ SiteEntity.City = jsonData["city"].Value();
+ SiteEntity.Phone = jsonData["phone"].Value();
+ SiteEntity.Zip = jsonData["zip"].Value();
+ SiteEntity.CountryId = jsonData["countryId"].Value();
+ SiteEntity.StateId = jsonData["stateId"].Value();
+ SiteEntity.SiteUserId = jsonData["userId"].Value();
+ SiteEntity.IsActive = jsonData["isActive"].Value();
+ SiteEntity.IsMaster = jsonData["isMaster"].Value();
+ SiteEntity.SiteEditionIds = jsonData["siteEditionIds"].Value();
+ SiteEntity.CreationDate = jsonData["creationDate"].Value();
+ SiteEntity.ModifiedDate = jsonData["modifiedDate"].Value();
+ try
+ {
+ Status = SiteModel.InsertUpdateSiteAccount(dbContext, SiteEntity);
+ if (Status)
+ {
+ return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
+ }
+ else
+ {
+ return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ [Route("DeleteSiteAccount")]
+ [HttpGet]
+ public HttpResponseMessage DeleteSiteAccount(int SiteId, int LicenseId, int UserId)
+ {
+ bool Status = false;
+ try
+ {
+ Status = SiteModel.DeleteSiteAccount(dbContext, SiteId, LicenseId, UserId);
+ if (Status)
+ {
+ return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
+ }
+ else
+ {
+ return Request.CreateErrorResponse(HttpStatusCode.BadRequest, Status.ToString());
+ }
+ }
+ catch (Exception ex)
+ {
+ // Log exception code goes here
+ return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
+ }
+ }
+
+ protected HttpResponseMessage ToJson(dynamic obj)
+ {
+ var response = Request.CreateResponse(HttpStatusCode.OK);
+ response.Content = new StringContent(JsonConvert.SerializeObject(obj), Encoding.UTF8, "application/jsonP");
+ return response;
+ }
+ }
+}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
index fde23c0..f4ef93f 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserController.cs
@@ -237,7 +237,7 @@ namespace AIAHTML5.ADMIN.API.Controllers
{
dbContext.Configuration.ProxyCreationEnabled = false;
List AccountNumberList = new List();
- var AccountNumberEntity = dbContext.usp_GetAccountNumber().ToList();
+ var AccountNumberEntity = dbContext.usp_GetAccountNumber(0).ToList();
AccountNumberList = AccountNumberEntity.Select(l => new usp_GetAccountNumber_Result() { Id = l.Id, AccountNumber = l.AccountNumber }).ToList();
//userTypelist.Insert(0, new UserType { Id = 0, Title = "All" });
return Ok(AccountNumberList);
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
index babca1b..8450fa7 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -2923,9 +2923,13 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateUserId", idParameter, userIdParameter, olduserIdParameter, status);
}
- public virtual ObjectResult usp_GetAccountNumber()
+ public virtual ObjectResult usp_GetAccountNumber(Nullable licenseType)
{
- return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetAccountNumber");
+ var licenseTypeParameter = licenseType.HasValue ?
+ new ObjectParameter("LicenseType", licenseType) :
+ new ObjectParameter("LicenseType", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetAccountNumber", licenseTypeParameter);
}
public virtual ObjectResult usp_GetProductEditionByLicense(Nullable iLicenseId)
@@ -3221,5 +3225,229 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetManageRights", userIdParameter, roleNameParameter);
}
+
+ public virtual int usp_DeleteSiteAccount(Nullable iSiteId, Nullable licenseId, Nullable userId, ObjectParameter status)
+ {
+ var iSiteIdParameter = iSiteId.HasValue ?
+ new ObjectParameter("iSiteId", iSiteId) :
+ new ObjectParameter("iSiteId", typeof(int));
+
+ var licenseIdParameter = licenseId.HasValue ?
+ new ObjectParameter("LicenseId", licenseId) :
+ new ObjectParameter("LicenseId", typeof(int));
+
+ var userIdParameter = userId.HasValue ?
+ new ObjectParameter("UserId", userId) :
+ new ObjectParameter("UserId", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_DeleteSiteAccount", iSiteIdParameter, licenseIdParameter, userIdParameter, status);
+ }
+
+ public virtual ObjectResult usp_GetLicenseModestySettings(Nullable iLicenseId, Nullable iBuildingLevelId)
+ {
+ var iLicenseIdParameter = iLicenseId.HasValue ?
+ new ObjectParameter("iLicenseId", iLicenseId) :
+ new ObjectParameter("iLicenseId", typeof(int));
+
+ var iBuildingLevelIdParameter = iBuildingLevelId.HasValue ?
+ new ObjectParameter("iBuildingLevelId", iBuildingLevelId) :
+ new ObjectParameter("iBuildingLevelId", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetLicenseModestySettings", iLicenseIdParameter, iBuildingLevelIdParameter);
+ }
+
+ public virtual ObjectResult usp_GetSiteAccountEditions(Nullable siteId, Nullable licenseId)
+ {
+ var siteIdParameter = siteId.HasValue ?
+ new ObjectParameter("SiteId", siteId) :
+ new ObjectParameter("SiteId", typeof(int));
+
+ var licenseIdParameter = licenseId.HasValue ?
+ new ObjectParameter("LicenseId", licenseId) :
+ new ObjectParameter("LicenseId", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetSiteAccountEditions", siteIdParameter, licenseIdParameter);
+ }
+
+ public virtual ObjectResult usp_GetSiteById(Nullable siteId)
+ {
+ var siteIdParameter = siteId.HasValue ?
+ new ObjectParameter("SiteId", siteId) :
+ new ObjectParameter("SiteId", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_GetSiteById", siteIdParameter);
+ }
+
+ public virtual int usp_InsertUpdateSiteAccount(Nullable iSiteId, string sSiteIP, string sTitle, string sInstituteName, string sDepartment, string sAddress1, string sAddress2, string sCity, string zip, string phone, Nullable stateId, Nullable countryId, Nullable isMaster, Nullable creationDate, Nullable modifiedDate, Nullable isActive, Nullable userId, string sSiteIPTo, Nullable licenseId, string siteEditionIds, ObjectParameter status)
+ {
+ var iSiteIdParameter = iSiteId.HasValue ?
+ new ObjectParameter("iSiteId", iSiteId) :
+ new ObjectParameter("iSiteId", typeof(int));
+
+ var sSiteIPParameter = sSiteIP != null ?
+ new ObjectParameter("sSiteIP", sSiteIP) :
+ new ObjectParameter("sSiteIP", typeof(string));
+
+ var sTitleParameter = sTitle != null ?
+ new ObjectParameter("sTitle", sTitle) :
+ new ObjectParameter("sTitle", typeof(string));
+
+ var sInstituteNameParameter = sInstituteName != null ?
+ new ObjectParameter("sInstituteName", sInstituteName) :
+ new ObjectParameter("sInstituteName", typeof(string));
+
+ var sDepartmentParameter = sDepartment != null ?
+ new ObjectParameter("sDepartment", sDepartment) :
+ new ObjectParameter("sDepartment", typeof(string));
+
+ var sAddress1Parameter = sAddress1 != null ?
+ new ObjectParameter("sAddress1", sAddress1) :
+ new ObjectParameter("sAddress1", typeof(string));
+
+ var sAddress2Parameter = sAddress2 != null ?
+ new ObjectParameter("sAddress2", sAddress2) :
+ new ObjectParameter("sAddress2", typeof(string));
+
+ var sCityParameter = sCity != null ?
+ new ObjectParameter("sCity", sCity) :
+ new ObjectParameter("sCity", typeof(string));
+
+ var zipParameter = zip != null ?
+ new ObjectParameter("Zip", zip) :
+ new ObjectParameter("Zip", typeof(string));
+
+ var phoneParameter = phone != null ?
+ new ObjectParameter("Phone", phone) :
+ new ObjectParameter("Phone", typeof(string));
+
+ var stateIdParameter = stateId.HasValue ?
+ new ObjectParameter("StateId", stateId) :
+ new ObjectParameter("StateId", typeof(int));
+
+ var countryIdParameter = countryId.HasValue ?
+ new ObjectParameter("CountryId", countryId) :
+ new ObjectParameter("CountryId", typeof(int));
+
+ var isMasterParameter = isMaster.HasValue ?
+ new ObjectParameter("IsMaster", isMaster) :
+ new ObjectParameter("IsMaster", typeof(bool));
+
+ var creationDateParameter = creationDate.HasValue ?
+ new ObjectParameter("CreationDate", creationDate) :
+ new ObjectParameter("CreationDate", typeof(System.DateTime));
+
+ var modifiedDateParameter = modifiedDate.HasValue ?
+ new ObjectParameter("ModifiedDate", modifiedDate) :
+ new ObjectParameter("ModifiedDate", typeof(System.DateTime));
+
+ var isActiveParameter = isActive.HasValue ?
+ new ObjectParameter("IsActive", isActive) :
+ new ObjectParameter("IsActive", typeof(bool));
+
+ var userIdParameter = userId.HasValue ?
+ new ObjectParameter("UserId", userId) :
+ new ObjectParameter("UserId", typeof(int));
+
+ var sSiteIPToParameter = sSiteIPTo != null ?
+ new ObjectParameter("sSiteIPTo", sSiteIPTo) :
+ new ObjectParameter("sSiteIPTo", typeof(string));
+
+ var licenseIdParameter = licenseId.HasValue ?
+ new ObjectParameter("LicenseId", licenseId) :
+ new ObjectParameter("LicenseId", typeof(int));
+
+ var siteEditionIdsParameter = siteEditionIds != null ?
+ new ObjectParameter("SiteEditionIds", siteEditionIds) :
+ new ObjectParameter("SiteEditionIds", typeof(string));
+
+ 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);
+ }
+
+ public virtual int usp_UpdateLicenseBasicSettings(Nullable iLicenseId, string sLicenseeFname, string sLicenseeLname, string sInstitutionName, string sAddress1, string sAddress2, string sCity, string sZip, Nullable iStateId, Nullable iCountryId, string sPhone, string sEmailId, ObjectParameter status)
+ {
+ var iLicenseIdParameter = iLicenseId.HasValue ?
+ new ObjectParameter("iLicenseId", iLicenseId) :
+ new ObjectParameter("iLicenseId", typeof(int));
+
+ var sLicenseeFnameParameter = sLicenseeFname != null ?
+ new ObjectParameter("sLicenseeFname", sLicenseeFname) :
+ new ObjectParameter("sLicenseeFname", typeof(string));
+
+ var sLicenseeLnameParameter = sLicenseeLname != null ?
+ new ObjectParameter("sLicenseeLname", sLicenseeLname) :
+ new ObjectParameter("sLicenseeLname", typeof(string));
+
+ var sInstitutionNameParameter = sInstitutionName != null ?
+ new ObjectParameter("sInstitutionName", sInstitutionName) :
+ new ObjectParameter("sInstitutionName", typeof(string));
+
+ var sAddress1Parameter = sAddress1 != null ?
+ new ObjectParameter("sAddress1", sAddress1) :
+ new ObjectParameter("sAddress1", typeof(string));
+
+ var sAddress2Parameter = sAddress2 != null ?
+ new ObjectParameter("sAddress2", sAddress2) :
+ new ObjectParameter("sAddress2", typeof(string));
+
+ var sCityParameter = sCity != null ?
+ new ObjectParameter("sCity", sCity) :
+ new ObjectParameter("sCity", typeof(string));
+
+ var sZipParameter = sZip != null ?
+ new ObjectParameter("sZip", sZip) :
+ new ObjectParameter("sZip", typeof(string));
+
+ var iStateIdParameter = iStateId.HasValue ?
+ new ObjectParameter("iStateId", iStateId) :
+ new ObjectParameter("iStateId", typeof(int));
+
+ var iCountryIdParameter = iCountryId.HasValue ?
+ new ObjectParameter("iCountryId", iCountryId) :
+ new ObjectParameter("iCountryId", typeof(int));
+
+ var sPhoneParameter = sPhone != null ?
+ new ObjectParameter("sPhone", sPhone) :
+ new ObjectParameter("sPhone", typeof(string));
+
+ var sEmailIdParameter = sEmailId != null ?
+ new ObjectParameter("sEmailId", sEmailId) :
+ new ObjectParameter("sEmailId", typeof(string));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseBasicSettings", iLicenseIdParameter, sLicenseeFnameParameter, sLicenseeLnameParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, status);
+ }
+
+ public virtual int usp_UpdateLicenseModestySettings(Nullable licenseEditionId, Nullable siteId, Nullable isModesty, ObjectParameter status)
+ {
+ var licenseEditionIdParameter = licenseEditionId.HasValue ?
+ new ObjectParameter("LicenseEditionId", licenseEditionId) :
+ new ObjectParameter("LicenseEditionId", typeof(int));
+
+ var siteIdParameter = siteId.HasValue ?
+ new ObjectParameter("SiteId", siteId) :
+ new ObjectParameter("SiteId", typeof(int));
+
+ var isModestyParameter = isModesty.HasValue ?
+ new ObjectParameter("IsModesty", isModesty) :
+ new ObjectParameter("IsModesty", typeof(bool));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModestySettings", licenseEditionIdParameter, siteIdParameter, isModestyParameter, status);
+ }
+
+ public virtual int usp_UpdateLicenseModuleStatus(Nullable licenseId, Nullable moduleId, Nullable moduleStatus, ObjectParameter status)
+ {
+ var licenseIdParameter = licenseId.HasValue ?
+ new ObjectParameter("LicenseId", licenseId) :
+ new ObjectParameter("LicenseId", typeof(int));
+
+ var moduleIdParameter = moduleId.HasValue ?
+ new ObjectParameter("ModuleId", moduleId) :
+ new ObjectParameter("ModuleId", typeof(int));
+
+ var moduleStatusParameter = moduleStatus.HasValue ?
+ new ObjectParameter("ModuleStatus", moduleStatus) :
+ new ObjectParameter("ModuleStatus", typeof(bool));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_UpdateLicenseModuleStatus", licenseIdParameter, moduleIdParameter, moduleStatusParameter, status);
+ }
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
index 0a8356b..ef07853 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -2616,11 +2616,19 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
+
+
-
+
+
+
@@ -2628,6 +2636,10 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
@@ -2658,6 +2670,13 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
+
+
+
@@ -2687,6 +2706,29 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -2702,6 +2744,33 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -6154,7 +6223,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
-
+
+
+
@@ -6223,7 +6294,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
-
+
@@ -6243,6 +6314,73 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -7163,6 +7301,39 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -9624,6 +9795,56 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseModestySettings_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseModestySettings_Result.cs
new file mode 100644
index 0000000..a79b4bd
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetLicenseModestySettings_Result.cs
@@ -0,0 +1,20 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace AIAHTML5.ADMIN.API.Entity
+{
+ using System;
+
+ public partial class usp_GetLicenseModestySettings_Result
+ {
+ public int LicenseEditionId { get; set; }
+ public string Title { get; set; }
+ public Nullable IsModesty { get; set; }
+ }
+}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountEditions_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountEditions_Result.cs
new file mode 100644
index 0000000..80b4bc9
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteAccountEditions_Result.cs
@@ -0,0 +1,20 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace AIAHTML5.ADMIN.API.Entity
+{
+ using System;
+
+ public partial class usp_GetSiteAccountEditions_Result
+ {
+ public int LicenseEditionId { get; set; }
+ public byte Id { get; set; }
+ public string Title { get; set; }
+ }
+}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteById_Result.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteById_Result.cs
new file mode 100644
index 0000000..b05740b
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteById_Result.cs
@@ -0,0 +1,38 @@
+//------------------------------------------------------------------------------
+//
+// This code was generated from a template.
+//
+// Manual changes to this file may cause unexpected behavior in your application.
+// Manual changes to this file will be overwritten if the code is regenerated.
+//
+//------------------------------------------------------------------------------
+
+namespace AIAHTML5.ADMIN.API.Entity
+{
+ using System;
+
+ public partial class usp_GetSiteById_Result
+ {
+ public int Id { get; set; }
+ public string SiteIp { get; set; }
+ public string Title { get; set; }
+ public string SiteIPTo { get; set; }
+ public string SiteMasterIPTo { get; set; }
+ public string Address1 { get; set; }
+ public string Address2 { get; set; }
+ public string Zip { get; set; }
+ public string Phone { get; set; }
+ public string City { get; set; }
+ public Nullable StateId { get; set; }
+ public Nullable CountryId { get; set; }
+ public bool IsMaster { get; set; }
+ public Nullable IsActive { get; set; }
+ public string CreationDate { get; set; }
+ public string ModifiedDate { get; set; }
+ public string InstituteName { get; set; }
+ public string Department { get; set; }
+ public int UserId { get; set; }
+ public string FirstName { get; set; }
+ public string EmailId { get; set; }
+ }
+}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
index ffa9c76..dae84e7 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
@@ -1,6 +1,8 @@
using System;
using System.Collections.Generic;
using System.Linq;
+using Newtonsoft.Json;
+using Newtonsoft.Json.Linq;
using System.Web;
using AIAHTML5.ADMIN.API.Entity;
@@ -16,7 +18,7 @@ namespace AIAHTML5.ADMIN.API.Models
public string LicenseeLastName { get; set; }
public string LicenseeName { get; set; }
public byte LicenseTypeId { get; set; }
- public string LicenseTypeName { get; set; }
+ public string LicenseTypeName { get; set; }
public string InstitutionName { get; set; }
public int? StateId { get; set; }
public int? CountryId { get; set; }
@@ -54,8 +56,8 @@ namespace AIAHTML5.ADMIN.API.Models
public byte? TestLicenseEditionId { get; set; }
public bool IsRenew { get; set; }
- public static List GetLicenses(AIADatabaseV5Entities dbContext, string accountNumber, string licenseeFirstName,
- string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId,
+ public static List GetLicenses(AIADatabaseV5Entities dbContext, string accountNumber, string licenseeFirstName,
+ string licenseeLastName, byte licenseTypeId, string institutionName, int stateId, int countryId, string emailId,
DateTime subscriptionStartDate, DateTime subscriptionEndDate, bool isActive)
{
List LicenseList = new List();
@@ -65,9 +67,9 @@ namespace AIAHTML5.ADMIN.API.Models
{
var result = dbContext.usp_GetLicenses(
(subscriptionStartDate > DateTime.MinValue ? subscriptionStartDate.ToShortDateString() : "01/01/01"),
- (subscriptionEndDate > DateTime.MinValue ? subscriptionEndDate.ToShortDateString() : "01/01/01"),
+ (subscriptionEndDate > DateTime.MinValue ? subscriptionEndDate.ToShortDateString() : "01/01/01"),
(accountNumber == null ? "" : accountNumber), (licenseeFirstName == null ? "" : licenseeFirstName),
- (licenseeLastName == null ? "" : licenseeLastName), licenseTypeId, (institutionName == null ? "" : institutionName),
+ (licenseeLastName == null ? "" : licenseeLastName), licenseTypeId, (institutionName == null ? "" : institutionName),
(emailId == null ? "" : emailId), stateId, countryId, isActive).ToList();
if (result.Count > 0)
{
@@ -104,6 +106,29 @@ namespace AIAHTML5.ADMIN.API.Models
return LicenseList;
}
+ public static List> GetLicenseAccounts(AIADatabaseV5Entities dbContext, int LicenseType)
+ {
+ List> LicenseAccountList = new List>();
+ Tuple LicenseAccountObj;
+ int i = 0;
+ try
+ {
+ var result = dbContext.usp_GetAccountNumber(LicenseType).ToList();
+ if (result.Count > 0)
+ {
+ foreach (var item in result)
+ {
+ LicenseAccountObj = new Tuple(item.Id, item.AccountNumber);
+ LicenseAccountList.Add(LicenseAccountObj);
+ i++;
+ if (i >= 100) break;
+ }
+ }
+ }
+ catch (Exception ex) { }
+ return LicenseAccountList;
+ }
+
public static LicenseModel GetLicenseById(AIADatabaseV5Entities dbContext, int LicenseId)
{
LicenseModel LicenseObj = new LicenseModel();
@@ -151,6 +176,61 @@ namespace AIAHTML5.ADMIN.API.Models
return LicenseObj;
}
+ public static List GetLicenseSites(AIADatabaseV5Entities dbContext, string AccountNo)
+ {
+ List LicenseSiteList = new List();
+ SiteModel SiteModelObj = new SiteModel();
+ try
+ {
+ var result = dbContext.GetSiteAccoutDetail(AccountNo).ToList();
+ if (result.Count > 0)
+ {
+ foreach (var item in result)
+ {
+ SiteModelObj = new SiteModel();
+ SiteModelObj.Id = item.Id;
+ SiteModelObj.Ip = item.SiteIp;
+ SiteModelObj.SiteIpTo = item.SiteIPTo;
+ SiteModelObj.MasterIpTo = item.SiteMasterIPTo;
+ SiteModelObj.InstituteName = item.InstituteName;
+ SiteModelObj.Department = item.Department;
+ SiteModelObj.SiteUserId = item.UserId;
+ SiteModelObj.SiteUserEmailId = item.EmailId;
+ SiteModelObj.SiteUserFirstName = item.FirstName;
+ SiteModelObj.Title = item.Title;
+ SiteModelObj.CreationDate = DateTime.ParseExact(item.CreationDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
+ SiteModelObj.ModifiedDate = DateTime.ParseExact(item.ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
+ LicenseSiteList.Add(SiteModelObj);
+ }
+ }
+ }
+ catch (Exception ex) { }
+ return LicenseSiteList;
+ }
+
+ public static List> GetLicenseModestySettings(AIADatabaseV5Entities dbContext, int LicenseId, int BuildingLevelId)
+ {
+ List> LicenseModestyList = new List>();
+ Tuple LicenseModestyObj;
+ int i = 0;
+ try
+ {
+ var result = dbContext.usp_GetLicenseModestySettings(LicenseId, BuildingLevelId).ToList();
+ if (result.Count > 0)
+ {
+ foreach (var item in result)
+ {
+ LicenseModestyObj = new Tuple(item.LicenseEditionId, (bool)item.IsModesty, item.Title);
+ LicenseModestyList.Add(LicenseModestyObj);
+ i++;
+ if (i >= 100) break;
+ }
+ }
+ }
+ catch (Exception ex) { }
+ return LicenseModestyList;
+ }
+
public static bool InsertLicense(AIADatabaseV5Entities dbContext, LicenseModel licenseModel)
{
bool status = false;
@@ -163,7 +243,7 @@ namespace AIAHTML5.ADMIN.API.Models
licenseModel.LicenseTypeId, licenseModel.AccountTypeId, licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2,
licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId,
licenseModel.TotalLogins, licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
- licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.SiteUrlTo,
+ licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.SiteUrlTo,
licenseModel.SiteUrlFrom, licenseModel.NoOfImages);
if (result.Count() > 0)
{
@@ -174,8 +254,8 @@ namespace AIAHTML5.ADMIN.API.Models
result = dbContext.InsertSingleLicenseAccount(licenseModel.AccountNumber, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName, licenseModel.AccountTypeId,
licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, licenseModel.City, licenseModel.Zip,
licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, licenseModel.TotalLogins,
- licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
- licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.LoginId, licenseModel.Password,
+ licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
+ licenseModel.EditionLogins, licenseModel.Price, licenseModel.ProductKey, licenseModel.LoginId, licenseModel.Password,
licenseModel.SecurityQuestionId, licenseModel.Answer, licenseModel.CreatorId, licenseModel.NoOfImages);
if (result.Count() > 0)
{
@@ -209,7 +289,7 @@ namespace AIAHTML5.ADMIN.API.Models
result = dbContext.InsertTestLicenseAccount(licenseModel.AccountNumber, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName,
licenseModel.LoginId, licenseModel.Password, licenseModel.EmailId, licenseModel.AccountTypeId, licenseModel.TestLicenseEditionId,
licenseModel.Address1, licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone,
- licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
+ licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
licenseModel.CreatorId, licenseModel.NoOfImages);
if (result.Count() > 0)
{
@@ -233,9 +313,9 @@ namespace AIAHTML5.ADMIN.API.Models
var result = dbContext.UpdateLicenseAccount(licenseModel.LicenseId, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName,
licenseModel.LicenseTypeId, licenseModel.AccountTypeId, licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2,
licenseModel.City, licenseModel.Zip, licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId,
- (byte)(licenseModel.IsActive == false ? 0 : 1), licenseModel.TotalLogins, (byte)(licenseModel.IsRenew == false ? 0 : 1),
- licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
- licenseModel.RenewDate.ToString("MM/dd/yyyy"), licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price,
+ (byte)(licenseModel.IsActive == false ? 0 : 1), licenseModel.TotalLogins, (byte)(licenseModel.IsRenew == false ? 0 : 1),
+ licenseModel.SubscriptionStartDate.ToString("MM/dd/yyyy"), licenseModel.SubscriptionEndDate.ToString("MM/dd/yyyy"),
+ licenseModel.RenewDate.ToString("MM/dd/yyyy"), licenseModel.MasterSiteUrl, licenseModel.EditionLogins, licenseModel.Price,
licenseModel.ProductKey, licenseModel.SiteUrlTo, licenseModel.SiteUrlFrom, licenseModel.NoOfImages);
if (result.Count() > 0)
{
@@ -254,20 +334,93 @@ namespace AIAHTML5.ADMIN.API.Models
try
{
var spStatus = dbContext.DeleteLicense(LicenseId);
- if (spStatus.Count() > 0)
- {
- return true;
- }
- else
- {
- return false;
- }
+ if (spStatus.Count() > 0)
+ {
+ return true;
+ }
+ else
+ {
+ return false;
+ }
}
catch (Exception ex)
{
return false;
}
}
+
+ public static bool UpdateLicenseBasicSettings(AIADatabaseV5Entities dbContext, LicenseModel licenseModel)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ var result = dbContext.usp_UpdateLicenseBasicSettings(licenseModel.LicenseId, licenseModel.LicenseeFirstName, licenseModel.LicenseeLastName,
+ licenseModel.InstitutionName, licenseModel.Address1, licenseModel.Address2, licenseModel.City, licenseModel.Zip,
+ licenseModel.StateId, licenseModel.CountryId, licenseModel.Phone, licenseModel.EmailId, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public static bool UpdateLicenseModestySettings(AIADatabaseV5Entities dbContext, List> LicenseModestyList)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ foreach (var item in LicenseModestyList)
+ {
+ dbContext.usp_UpdateLicenseModestySettings(item.Item1, item.Item2, item.Item3, spStatus);
+ if (!(bool)spStatus.Value) break;
+ }
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public static List> GetLicenseModulesStatus(AIADatabaseV5Entities dbContext, int LicenseId)
+ {
+ List> LicenseModulesStatusList = new List>();
+ Tuple LicenseModuleStatusObj;
+ try
+ {
+ var result = dbContext.GetModuleStatusByLicenseId(LicenseId).ToList();
+ if (result.Count > 0)
+ {
+ foreach (var item in result)
+ {
+ LicenseModuleStatusObj = new Tuple(item.Id, (bool)item.Status, item.Title);
+ LicenseModulesStatusList.Add(LicenseModuleStatusObj);
+ }
+ }
+ }
+ catch (Exception ex) { }
+ return LicenseModulesStatusList;
+ }
+
+ public static bool UpdateLicenseModulesStatus(AIADatabaseV5Entities dbContext, List> LicenseModuleStatusList)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ foreach (var item in LicenseModuleStatusList)
+ {
+ dbContext.usp_UpdateLicenseModuleStatus(item.Item1, item.Item2, item.Item3, spStatus);
+ if (!(bool)spStatus.Value) break;
+ }
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
}
public class LicenseTypeModel
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SiteModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SiteModel.cs
new file mode 100644
index 0000000..e74695b
--- /dev/null
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SiteModel.cs
@@ -0,0 +1,123 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Web;
+using AIAHTML5.ADMIN.API.Entity;
+
+namespace AIAHTML5.ADMIN.API.Models
+{
+ public class SiteModel
+ {
+ public int Id { get; set; }
+ public int LicenseId { get; set; }
+ public string Ip { get; set; }
+ public string Title { get; set; }
+ public string SiteIpTo { get; set; }
+ public string MasterIpTo { get; set; }
+ public DateTime CreationDate { get; set; }
+ public DateTime ModifiedDate { get; set; }
+ public string InstituteName { get; set; }
+ public string City { get; set; }
+ public string Zip { get; set; }
+ public string Phone { get; set; }
+ public string Address1 { get; set; }
+ public string Address2 { get; set; }
+ public int? StateId { get; set; }
+ public int? CountryId { get; set; }
+ public string Department { get; set; }
+ public int SiteUserId { get; set; }
+ public string SiteUserFirstName { get; set; }
+ public string SiteUserEmailId { get; set; }
+ public bool? IsActive { get; set; }
+ public bool IsMaster { get; set; }
+ public bool? IsModesty { get; set; }
+ public string SiteEditionIds { get; set; }
+
+ public static SiteModel GetSiteById(AIADatabaseV5Entities dbContext, int SiteId)
+ {
+ LicenseModel LicenseObj = new LicenseModel();
+ SiteModel SiteModelObj = new SiteModel();
+ try
+ {
+ var result = dbContext.usp_GetSiteById(SiteId).ToList();
+ SiteModelObj.Id = result[0].Id;
+ SiteModelObj.Ip = result[0].SiteIp;
+ SiteModelObj.SiteIpTo = result[0].SiteIPTo;
+ SiteModelObj.MasterIpTo = result[0].SiteMasterIPTo;
+ SiteModelObj.InstituteName = result[0].InstituteName;
+ SiteModelObj.Department = result[0].Department;
+ SiteModelObj.City = result[0].City;
+ SiteModelObj.Phone = result[0].Phone;
+ SiteModelObj.Zip = result[0].Zip;
+ SiteModelObj.Address1 = result[0].Address1;
+ SiteModelObj.Address2 = result[0].Address2;
+ SiteModelObj.CountryId = result[0].CountryId;
+ SiteModelObj.StateId = result[0].StateId;
+ SiteModelObj.SiteUserId = result[0].UserId;
+ SiteModelObj.SiteUserEmailId = result[0].EmailId;
+ SiteModelObj.IsMaster = result[0].IsMaster;
+ SiteModelObj.IsActive = result[0].IsActive;
+ SiteModelObj.SiteUserFirstName = result[0].FirstName;
+ SiteModelObj.Title = result[0].Title;
+ SiteModelObj.CreationDate = DateTime.ParseExact(result[0].CreationDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
+ SiteModelObj.ModifiedDate = DateTime.ParseExact(result[0].ModifiedDate, "MM/dd/yyyy", System.Globalization.CultureInfo.CurrentCulture);
+ }
+ catch (Exception ex) { }
+ return SiteModelObj;
+ }
+
+ public static List> GetSiteAccountEditions(AIADatabaseV5Entities dbContext, int SiteId, int LicenseId)
+ {
+ List> SiteAccountEditionList = new List>();
+ Tuple SiteEditionObj;
+ try
+ {
+ var result = dbContext.usp_GetSiteAccountEditions(SiteId, LicenseId).ToList();
+ if (result.Count > 0)
+ {
+ foreach (var item in result)
+ {
+ SiteEditionObj = new Tuple(item.LicenseEditionId, item.Id, item.Title);
+ SiteAccountEditionList.Add(SiteEditionObj);
+ }
+ }
+ }
+ catch (Exception ex) { }
+ return SiteAccountEditionList;
+ }
+
+ public static bool InsertUpdateSiteAccount(AIADatabaseV5Entities dbContext, SiteModel SiteEntity)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_InsertUpdateSiteAccount(SiteEntity.Id, SiteEntity.Ip, SiteEntity.Title,
+ SiteEntity.InstituteName, SiteEntity.Department, SiteEntity.Address1, SiteEntity.Address2,
+ SiteEntity.City, SiteEntity.Zip, SiteEntity.Phone, SiteEntity.StateId, SiteEntity.CountryId,
+ SiteEntity.IsMaster, SiteEntity.CreationDate, SiteEntity.ModifiedDate, SiteEntity.IsActive,
+ SiteEntity.SiteUserId, SiteEntity.SiteIpTo, SiteEntity.LicenseId, SiteEntity.SiteEditionIds, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ public static bool DeleteSiteAccount(AIADatabaseV5Entities dbContext, int SiteId, int LicenseId, int UserId)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_DeleteSiteAccount(SiteId, LicenseId, UserId, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
+ }
+
+}
\ No newline at end of file
diff --git a/400-SOURCECODE/Admin/dist/assets/styles/admin-custom.css b/400-SOURCECODE/Admin/dist/assets/styles/admin-custom.css
index a4a3fdb..75bc717 100644
--- a/400-SOURCECODE/Admin/dist/assets/styles/admin-custom.css
+++ b/400-SOURCECODE/Admin/dist/assets/styles/admin-custom.css
@@ -164,4 +164,11 @@
.table-fixed thead {
width: calc( 100% - 0em )
}
+#fixed_hdr2 > tbody > tr.active > td {
+ background: #726D6D;
+ color: #FDFBFB;
+}
+
+
+
/*30-1-2017*/
diff --git a/400-SOURCECODE/Admin/dist/index.html b/400-SOURCECODE/Admin/dist/index.html
index aae9c53..6867edc 100644
--- a/400-SOURCECODE/Admin/dist/index.html
+++ b/400-SOURCECODE/Admin/dist/index.html
@@ -1,45 +1,7 @@
-
-
-
-
-
-
-
- A.D.A.M. Interactive Anatomy
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ })