diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
index 789b405..81ffa50 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
@@ -389,5 +389,21 @@ namespace AIAHTML5.ADMIN.API.Controllers
}
}
+ [Route("CheckAccountNumber")]
+ [HttpGet]
+ public HttpResponseMessage CheckAccountNumber(string AccountNo)
+ {
+ bool Status = false;
+ try
+ {
+ Status = LicenseModel.CheckAccountNumber(dbContext, AccountNo);
+ 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/Controllers/ReportController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
index 7a66f68..fde8aa7 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
@@ -23,7 +23,8 @@ namespace AIAHTML5.ADMIN.API.Controllers
[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();
+ var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0);
+ var lstUsageReport = dbContext.GetUsageReport(sFromDate, sToDate, sAccoutNumber, sZip, iState, iCountry, 1, 5, spRecordCount).ToList();
return Ok(lstUsageReport);
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
index e87aff9..b8def63 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -1655,7 +1655,7 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction>("GetTotalLoginsByLicenseEditionId", licenseEditionIdParameter);
}
- public virtual ObjectResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry)
+ public virtual ObjectResult GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount)
{
var sFromDateParameter = sFromDate != null ?
new ObjectParameter("sFromDate", sFromDate) :
@@ -1681,7 +1681,15 @@ namespace AIAHTML5.ADMIN.API.Entity
new ObjectParameter("iCountry", iCountry) :
new ObjectParameter("iCountry", typeof(int));
- return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, sZipParameter, iStateParameter, iCountryParameter);
+ var pageNoParameter = pageNo.HasValue ?
+ new ObjectParameter("pageNo", pageNo) :
+ new ObjectParameter("pageNo", typeof(int));
+
+ var pageLengthParameter = pageLength.HasValue ?
+ new ObjectParameter("pageLength", pageLength) :
+ new ObjectParameter("pageLength", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, sZipParameter, iStateParameter, iCountryParameter, pageNoParameter, pageLengthParameter, recordCount);
}
public virtual ObjectResult GetUsageReport_OLD_PROC(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable iState, Nullable iCountry)
@@ -3674,5 +3682,23 @@ namespace AIAHTML5.ADMIN.API.Entity
return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSearchUsers", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount);
}
+
+ public virtual int InsertIncorrectLoginAttempts(Nullable iUserId)
+ {
+ var iUserIdParameter = iUserId.HasValue ?
+ new ObjectParameter("iUserId", iUserId) :
+ new ObjectParameter("iUserId", typeof(int));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("InsertIncorrectLoginAttempts", iUserIdParameter);
+ }
+
+ public virtual int usp_CheckAccountNoExists(string accountNo, ObjectParameter status)
+ {
+ var accountNoParameter = accountNo != null ?
+ new ObjectParameter("AccountNo", accountNo) :
+ new ObjectParameter("AccountNo", typeof(string));
+
+ return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckAccountNoExists", accountNoParameter, status);
+ }
}
}
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
index d06d232..3628f8c 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -2184,9 +2184,6 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
-
-
-
@@ -2294,6 +2291,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
@@ -2355,6 +2355,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
@@ -2636,6 +2639,10 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does
+
+
+
+
@@ -5942,6 +5949,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
@@ -6517,6 +6527,13 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
+
+
+
+
+
+
+
@@ -9346,7 +9363,6 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]
-
@@ -10080,6 +10096,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 c7251b7..813654d 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
@@ -421,6 +421,19 @@ namespace AIAHTML5.ADMIN.API.Models
}
}
+ public static bool CheckAccountNumber(AIADatabaseV5Entities dbContext, string AccountNo)
+ {
+ var spStatus = new System.Data.Objects.ObjectParameter("Status", 0);
+ try
+ {
+ dbContext.usp_CheckAccountNoExists(AccountNo, spStatus);
+ return (bool)spStatus.Value;
+ }
+ catch (Exception ex)
+ {
+ return false;
+ }
+ }
}
public class LicenseTypeModel
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
index d3df401..ad95886 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/app.module.ts
@@ -89,8 +89,8 @@ import { NumberOnlyDirective } from './shared/numberonlydirective';
// useClass: MyInterceptor,
// multi: true
//}
- { provide: APP_BASE_HREF, useValue: '/Admin-UI' }
- //{ provide: APP_BASE_HREF, useValue: '/' }
+ //{ provide: APP_BASE_HREF, useValue: '/Admin-UI' }
+ { provide: APP_BASE_HREF, useValue: '/' }
],
bootstrap: [AppComponent]
diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
index 4e6b477..75ed537 100644
--- a/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
+++ b/400-SOURCECODE/AIAHTML5.ADMIN.Web/src/app/components/SubscriptionPrice/subscriptionprice.component.html
@@ -149,6 +149,7 @@
+ (in Months)
Subscription duration is required
Subscription duration must be numeric
diff --git a/500-DBDump/AIA-StoredProcedures/usp_CheckAccountNoExists.sql b/500-DBDump/AIA-StoredProcedures/usp_CheckAccountNoExists.sql
new file mode 100644
index 0000000..a99c181
--- /dev/null
+++ b/500-DBDump/AIA-StoredProcedures/usp_CheckAccountNoExists.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_CheckAccountNoExists]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
+drop procedure [dbo].[usp_CheckAccountNoExists]
+GO
+
+-- ====================================================
+-- Author: Magic Software
+-- Create date: 06-March-2018
+-- Description: To get all the Editions
+-- ====================================================
+create PROCEDURE [dbo].[usp_CheckAccountNoExists]
+ @AccountNo varchar(50), @Status bit out
+ -- Add the parameters for the stored procedure here
+AS
+BEGIN
+ -- SET NOCOUNT ON added to prevent extra result sets from
+ -- interfering with SELECT statements.
+ SET NOCOUNT ON;
+ set @Status = 0;
+ -- Insert statements for procedure here
+ if(exists(select * from License where Lower(AccountNumber) = Lower(@AccountNo)))
+ begin
+ set @Status = 1;
+ end
+END
+
+GO
+SET QUOTED_IDENTIFIER OFF
+GO
+SET ANSI_NULLS ON
+GO
+
+
+
+