diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs
index 802e491..4412551 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/SubscriptionPriceController.cs
@@ -108,14 +108,14 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
- [Route("DeleteSubscriptionPrices")]
+ [Route("DeleteSubscriptionPrice")]
[HttpPost]
- public HttpResponseMessage DeleteSubscriptionPrices(List subscriptionPriceIds)
+ public HttpResponseMessage DeleteSubscriptionPrice(int subscriptionPriceId)
{
bool Status = false;
try
{
- Status = SubscriptionPriceModel.DeleteSubscriptionPrices(dbContext, subscriptionPriceIds);
+ Status = SubscriptionPriceModel.DeleteSubscriptionPrice(dbContext, subscriptionPriceId);
if (Status)
{
return Request.CreateResponse(HttpStatusCode.OK, Status.ToString());
@@ -132,6 +132,22 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
+ [Route("CheckSubscriptionPlanForLicense")]
+ [HttpGet]
+ public HttpResponseMessage CheckSubscriptionPlanForLicense(int subscriptionPriceId)
+ {
+ bool Status = false;
+ try
+ {
+ Status = SubscriptionPriceModel.CheckSubscriptionPlanForLicense(dbContext, subscriptionPriceId);
+ return Request.CreateResponse(HttpStatusCode.OK, 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);
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs
index 29bb7dd..c6c4b8a 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/UserGroupController.cs
@@ -139,5 +139,22 @@ namespace AIAHTML5.ADMIN.API.Controllers
return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message);
}
}
+
+ [Route("CheckDuplicateLicenseUserGroup")]
+ [HttpGet]
+ public HttpResponseMessage CheckDuplicateLicenseUserGroup(int LicenseId, string Title)
+ {
+ bool Status = false;
+ try
+ {
+ Status = UserGroupModel.CheckDuplicateLicenseUserGroup(dbContext, LicenseId, Title);
+ return Request.CreateResponse(HttpStatusCode.OK, 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/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
index 9c8d42d..15eb578 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -3908,5 +3908,27 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_InsertResellerLicenseAccount", sLicenseeFnameParameter, sLicenseeLnameParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sInstitutionNameParameter, sAddress1Parameter, sAddress2Parameter, sCityParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sPhoneParameter, sEmailIdParameter, iTotalLoginsParameter, sStartDateParameter, sEndDateParameter, sEditionListParameter, iTotalPriceParameter, iCreatorIdParameter, sProductKeyParameter, iNoofImagesParameter);
}
+
+ public virtual int usp_CheckDuplicateLicenseUserGroup(Nullable licenseId, string title, ObjectParameter status)
+ {
+ var licenseIdParameter = licenseId.HasValue ?
+ new ObjectParameter("LicenseId", licenseId) :
+ new ObjectParameter("LicenseId", typeof(int));
+
+ var titleParameter = title != null ?
+ new ObjectParameter("Title", title) :
+ new ObjectParameter("Title", typeof(string));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckDuplicateLicenseUserGroup", licenseIdParameter, titleParameter, status);
+ }
+
+ public virtual int usp_CheckSubscriptionForLicense(Nullable id, ObjectParameter status)
+ {
+ var idParameter = id.HasValue ?
+ new ObjectParameter("Id", id) :
+ new ObjectParameter("Id", typeof(byte));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckSubscriptionForLicense", idParameter, status);
+ }
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
index 73902a4..2a5831d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -2664,6 +2664,15 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
+
+
+
+
+
@@ -6635,6 +6644,15 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
+
+
+
+
+
+
@@ -10205,6 +10223,8 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
index 83e696e..d4f361d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
@@ -110,7 +110,6 @@ namespace AIAHTML5.ADMIN.API.Models
{
List> LicenseAccountList = new List>();
Tuple LicenseAccountObj;
- int i = 0;
try
{
var result = dbContext.usp_GetAccountNumber(LicenseType).ToList();
@@ -120,8 +119,6 @@ namespace AIAHTML5.ADMIN.API.Models
{
LicenseAccountObj = new Tuple(item.Id, item.AccountNumber);
LicenseAccountList.Add(LicenseAccountObj);
- i++;
- if (i >= 100) break;
}
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs
index 5336387..d58129f 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/SubscriptionPriceModel.cs
@@ -79,16 +79,12 @@ namespace AIAHTML5.ADMIN.API.Models
}
}
- public static bool DeleteSubscriptionPrices(AIADatabaseV5Entities dbContext, List subscriptionPriceIds)
+ public static bool DeleteSubscriptionPrice(AIADatabaseV5Entities dbContext, int subscriptionPriceId)
{
var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
try
{
- foreach (var item in subscriptionPriceIds)
- {
- dbContext.usp_DeleteSubscriptionPlan((byte?)item, spStatus);
- if (!(bool)spStatus.Value) break;
- }
+ dbContext.usp_DeleteSubscriptionPlan((byte?)subscriptionPriceId, spStatus);
return (bool)spStatus.Value;
}
catch (Exception ex)
@@ -96,5 +92,19 @@ namespace AIAHTML5.ADMIN.API.Models
return false;
}
}
+ public static bool CheckSubscriptionPlanForLicense(AIADatabaseV5Entities dbContext, int subscriptionPriceId)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_CheckSubscriptionForLicense((byte?)subscriptionPriceId, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
}
}
\ No newline at end of file
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
index 0180efe..e94868a 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/UserGroupModel.cs
@@ -113,6 +113,20 @@ namespace AIAHTML5.ADMIN.API.Models
}
}
+ public static bool CheckDuplicateLicenseUserGroup(AIADatabaseV5Entities dbContext, int LicenseId, string Title)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_CheckDuplicateLicenseUserGroup(LicenseId, Title, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
+
}
}
\ No newline at end of file
diff --git a/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
index 546fbd6..4f1d9ff 100644
--- a/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
+++ b/500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
diff --git a/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql
index 54ecc51..b191f10 100644
--- a/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql
+++ b/500-DBDump/AIA-StoredProcedures/dbo.UpdateAiaUserPassword.sql
diff --git a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql
index 6a78fa3..f950ddc 100644
--- a/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql
+++ b/500-DBDump/AIA-StoredProcedures/dbo.usp_UpdateUserId.sql