Commit e3e725ed15ee945d684f3994c5813f030f52e243
1 parent
4b818987
Testing on AIA Admin
Showing
10 changed files
with
169 additions
and
22 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/LicenseController.cs
... | ... | @@ -391,5 +391,22 @@ namespace AIAHTML5.ADMIN.API.Controllers |
391 | 391 | } |
392 | 392 | } |
393 | 393 | |
394 | + [Route("CheckAccountNumber")] | |
395 | + [HttpGet] | |
396 | + public HttpResponseMessage CheckAccountNumber(string AccountNo) | |
397 | + { | |
398 | + bool Status = false; | |
399 | + try | |
400 | + { | |
401 | + Status = LicenseModel.CheckAccountNumber(dbContext, AccountNo); | |
402 | + return Request.CreateResponse(HttpStatusCode.OK, Status.ToString()); | |
403 | + } | |
404 | + catch (Exception ex) | |
405 | + { | |
406 | + // Log exception code goes here | |
407 | + return Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message); | |
408 | + } | |
409 | + } | |
410 | + | |
394 | 411 | } |
395 | 412 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
... | ... | @@ -33,36 +33,40 @@ namespace AIAHTML5.ADMIN.API.Controllers |
33 | 33 | |
34 | 34 | [Route("GetCustomerSummeryReport")] |
35 | 35 | [HttpGet] |
36 | - public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry) | |
36 | + public IHttpActionResult GetCustomerSummeryReport(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, int iLicenseType, int iAccountType, string sZip, int iState, int iCountry, int pageNo, int pageLength) | |
37 | 37 | { |
38 | - var lstCustomerSummeryReport = dbContext.GetCustomerSummary(sAccoutNumber, sLicenseeFullName, iStartPrice, iEndPrice, (byte)iLicenseType, (byte)iAccountType, sZip, iState, iCountry).ToList(); | |
39 | - return Ok(lstCustomerSummeryReport); | |
38 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
39 | + var lstCustomerSummeryReport = dbContext.GetCustomerSummary(sAccoutNumber, sLicenseeFullName, iStartPrice, iEndPrice, (byte)iLicenseType, (byte)iAccountType, sZip, iState, iCountry,pageNo,pageLength,spRecordCount).ToList(); | |
40 | + return Ok(new { CustomerSummery = lstCustomerSummeryReport, RecordCount = spRecordCount.Value }); | |
41 | + //return Ok(lstCustomerSummeryReport); | |
40 | 42 | } |
41 | 43 | |
42 | 44 | |
43 | 45 | [Route("GetExpiringSubscriptionReport")] |
44 | 46 | [HttpGet] |
45 | - public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) | |
47 | + public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | |
46 | 48 | { |
47 | - var lstExpiringSubscriptionReport = dbContext.GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); | |
48 | - return Ok(lstExpiringSubscriptionReport); | |
49 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
50 | + var lstExpiringSubscriptionReport = dbContext.GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | |
51 | + return Ok(new { ExpiringSubscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | |
52 | + | |
49 | 53 | } |
50 | 54 | |
51 | 55 | [Route("GetSubscriptionReport")] |
52 | 56 | [HttpGet] |
53 | - public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) | |
57 | + public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | |
54 | 58 | { |
55 | - | |
56 | - var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); | |
57 | - return Ok(lstExpiringSubscriptionReport); | |
59 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
60 | + var lstExpiringSubscriptionReport = dbContext.GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | |
61 | + return Ok(new { Subscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | |
58 | 62 | } |
59 | 63 | [Route("GetSubscriptionCancellationReport")] |
60 | 64 | [HttpGet] |
61 | - public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId) | |
65 | + public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | |
62 | 66 | { |
63 | - | |
64 | - var lstExpiringSubscriptionReport = dbContext.GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId).ToList(); | |
65 | - return Ok(lstExpiringSubscriptionReport); | |
67 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
68 | + var lstExpiringSubscriptionReport = dbContext.GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | |
69 | + return Ok(new { SubscriptionCancel = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | |
66 | 70 | } |
67 | 71 | |
68 | 72 | [Route("GetNetAdSummaryReport")] | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... | ... | @@ -971,7 +971,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
971 | 971 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCAMSearch_Result>("GetCAMSearch", sSearchKeywordParameter); |
972 | 972 | } |
973 | 973 | |
974 | - public virtual ObjectResult<GetCancelledLicenses_Result> GetCancelledLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId) | |
974 | + public virtual ObjectResult<GetCancelledLicenses_Result> GetCancelledLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
975 | 975 | { |
976 | 976 | var sFromDateParameter = sFromDate != null ? |
977 | 977 | new ObjectParameter("sFromDate", sFromDate) : |
... | ... | @@ -1009,7 +1009,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1009 | 1009 | new ObjectParameter("iCountryId", iCountryId) : |
1010 | 1010 | new ObjectParameter("iCountryId", typeof(int)); |
1011 | 1011 | |
1012 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCancelledLicenses_Result>("GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); | |
1012 | + var pageNoParameter = pageNo.HasValue ? | |
1013 | + new ObjectParameter("pageNo", pageNo) : | |
1014 | + new ObjectParameter("pageNo", typeof(int)); | |
1015 | + | |
1016 | + var pageLengthParameter = pageLength.HasValue ? | |
1017 | + new ObjectParameter("pageLength", pageLength) : | |
1018 | + new ObjectParameter("pageLength", typeof(int)); | |
1019 | + | |
1020 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCancelledLicenses_Result>("GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1013 | 1021 | } |
1014 | 1022 | |
1015 | 1023 | public virtual int GetContentAttributeData(Nullable<int> iContentTypeId) |
... | ... | @@ -1030,7 +1038,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1030 | 1038 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetContentList", iContentTypeIdParameter); |
1031 | 1039 | } |
1032 | 1040 | |
1033 | - public virtual ObjectResult<GetCustomerSummary_Result> GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseType, Nullable<byte> iAccountType, string sZip, Nullable<int> iState, Nullable<int> iCountry) | |
1041 | + public virtual ObjectResult<GetCustomerSummary_Result> GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseType, Nullable<byte> iAccountType, string sZip, Nullable<int> iState, Nullable<int> iCountry, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1034 | 1042 | { |
1035 | 1043 | var sAccoutNumberParameter = sAccoutNumber != null ? |
1036 | 1044 | new ObjectParameter("sAccoutNumber", sAccoutNumber) : |
... | ... | @@ -1068,7 +1076,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1068 | 1076 | new ObjectParameter("iCountry", iCountry) : |
1069 | 1077 | new ObjectParameter("iCountry", typeof(int)); |
1070 | 1078 | |
1071 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCustomerSummary_Result>("GetCustomerSummary", sAccoutNumberParameter, sLicenseeFullNameParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeParameter, iAccountTypeParameter, sZipParameter, iStateParameter, iCountryParameter); | |
1079 | + var pageNoParameter = pageNo.HasValue ? | |
1080 | + new ObjectParameter("pageNo", pageNo) : | |
1081 | + new ObjectParameter("pageNo", typeof(int)); | |
1082 | + | |
1083 | + var pageLengthParameter = pageLength.HasValue ? | |
1084 | + new ObjectParameter("pageLength", pageLength) : | |
1085 | + new ObjectParameter("pageLength", typeof(int)); | |
1086 | + | |
1087 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetCustomerSummary_Result>("GetCustomerSummary", sAccoutNumberParameter, sLicenseeFullNameParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeParameter, iAccountTypeParameter, sZipParameter, iStateParameter, iCountryParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1072 | 1088 | } |
1073 | 1089 | |
1074 | 1090 | public virtual ObjectResult<GetDiscountDetails_Result> GetDiscountDetails(string sDiscountCode, string sStartDate, string sEndDate) |
... | ... | @@ -1149,7 +1165,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1149 | 1165 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetEncyclopediaSearch_Result>("GetEncyclopediaSearch", iLexiconIdParameter, sSearchKeywordParameter); |
1150 | 1166 | } |
1151 | 1167 | |
1152 | - public virtual ObjectResult<GetExpiringLicenses_Result> GetExpiringLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<int> iLicenseTypeId, Nullable<int> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId) | |
1168 | + public virtual ObjectResult<GetExpiringLicenses_Result> GetExpiringLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<int> iLicenseTypeId, Nullable<int> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1153 | 1169 | { |
1154 | 1170 | var sFromDateParameter = sFromDate != null ? |
1155 | 1171 | new ObjectParameter("sFromDate", sFromDate) : |
... | ... | @@ -1187,7 +1203,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1187 | 1203 | new ObjectParameter("iCountryId", iCountryId) : |
1188 | 1204 | new ObjectParameter("iCountryId", typeof(int)); |
1189 | 1205 | |
1190 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetExpiringLicenses_Result>("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); | |
1206 | + var pageNoParameter = pageNo.HasValue ? | |
1207 | + new ObjectParameter("pageNo", pageNo) : | |
1208 | + new ObjectParameter("pageNo", typeof(int)); | |
1209 | + | |
1210 | + var pageLengthParameter = pageLength.HasValue ? | |
1211 | + new ObjectParameter("pageLength", pageLength) : | |
1212 | + new ObjectParameter("pageLength", typeof(int)); | |
1213 | + | |
1214 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetExpiringLicenses_Result>("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1191 | 1215 | } |
1192 | 1216 | |
1193 | 1217 | public virtual ObjectResult<GetExportedImageDetails_Result> GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber) |
... | ... | @@ -1546,7 +1570,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1546 | 1570 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSiteLicenseUsageReport_Result>("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter); |
1547 | 1571 | } |
1548 | 1572 | |
1549 | - public virtual ObjectResult<GetSubscribedLicenses_Result> GetSubscribedLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId) | |
1573 | + public virtual ObjectResult<GetSubscribedLicenses_Result> GetSubscribedLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1550 | 1574 | { |
1551 | 1575 | var sFromDateParameter = sFromDate != null ? |
1552 | 1576 | new ObjectParameter("sFromDate", sFromDate) : |
... | ... | @@ -1584,7 +1608,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1584 | 1608 | new ObjectParameter("iCountryId", iCountryId) : |
1585 | 1609 | new ObjectParameter("iCountryId", typeof(int)); |
1586 | 1610 | |
1587 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSubscribedLicenses_Result>("GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter); | |
1611 | + var pageNoParameter = pageNo.HasValue ? | |
1612 | + new ObjectParameter("pageNo", pageNo) : | |
1613 | + new ObjectParameter("pageNo", typeof(int)); | |
1614 | + | |
1615 | + var pageLengthParameter = pageLength.HasValue ? | |
1616 | + new ObjectParameter("pageLength", pageLength) : | |
1617 | + new ObjectParameter("pageLength", typeof(int)); | |
1618 | + | |
1619 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSubscribedLicenses_Result>("GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1588 | 1620 | } |
1589 | 1621 | |
1590 | 1622 | public virtual ObjectResult<GetSubscriptionDetailsByLicenseId_Result> GetSubscriptionDetailsByLicenseId(Nullable<int> iLicenseId) |
... | ... | @@ -3693,5 +3725,14 @@ namespace AIAHTML5.ADMIN.API.Entity |
3693 | 3725 | |
3694 | 3726 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSearchUsers_Result>("GetSearchUsers", sFirstNameParameter, sLastNameParameter, sEmailIdParameter, sAccoutNumberParameter, iUserTypeIdParameter, iAccountTypeIdParameter, iLoginUserTypeParameter, pageNoParameter, pageLengthParameter, recordCount); |
3695 | 3727 | } |
3728 | + | |
3729 | + public virtual int usp_CheckAccountNoExists(string accountNo, ObjectParameter status) | |
3730 | + { | |
3731 | + var accountNoParameter = accountNo != null ? | |
3732 | + new ObjectParameter("AccountNo", accountNo) : | |
3733 | + new ObjectParameter("AccountNo", typeof(string)); | |
3734 | + | |
3735 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("usp_CheckAccountNoExists", accountNoParameter, status); | |
3736 | + } | |
3696 | 3737 | } |
3697 | 3738 | } | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... | ... | @@ -2074,6 +2074,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2074 | 2074 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
2075 | 2075 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
2076 | 2076 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
2077 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2078 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2079 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2077 | 2080 | </Function> |
2078 | 2081 | <Function Name="GetContentAttributeData" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2079 | 2082 | <Parameter Name="iContentTypeId" Type="int" Mode="In" /> |
... | ... | @@ -2091,6 +2094,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2091 | 2094 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
2092 | 2095 | <Parameter Name="iState" Type="int" Mode="In" /> |
2093 | 2096 | <Parameter Name="iCountry" Type="int" Mode="In" /> |
2097 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2098 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2099 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2094 | 2100 | </Function> |
2095 | 2101 | <Function Name="GetDiscountCodes" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2096 | 2102 | <Parameter Name="sDiscountCode" Type="varchar" Mode="In" /> |
... | ... | @@ -2133,6 +2139,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2133 | 2139 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
2134 | 2140 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
2135 | 2141 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
2142 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2143 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2144 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2136 | 2145 | </Function> |
2137 | 2146 | <Function Name="GetExportedImageDetails" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2138 | 2147 | <Parameter Name="sStartDate" Type="varchar" Mode="In" /> |
... | ... | @@ -2263,6 +2272,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2263 | 2272 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
2264 | 2273 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
2265 | 2274 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
2275 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2276 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2277 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2266 | 2278 | </Function> |
2267 | 2279 | <Function Name="GetSubscriptionDetailsByLicenseId" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2268 | 2280 | <Parameter Name="iLicenseId" Type="int" Mode="In" /> |
... | ... | @@ -2630,6 +2642,10 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2630 | 2642 | <Parameter Name="EmailId" Type="varchar" Mode="In" /> |
2631 | 2643 | <Parameter Name="Status" Type="int" Mode="InOut" /> |
2632 | 2644 | </Function> |
2645 | + <Function Name="usp_CheckAccountNoExists" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> | |
2646 | + <Parameter Name="AccountNo" Type="varchar" Mode="In" /> | |
2647 | + <Parameter Name="Status" Type="bit" Mode="InOut" /> | |
2648 | + </Function> | |
2633 | 2649 | <Function Name="usp_DB_TblRowCOUNT" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> |
2634 | 2650 | <Function Name="usp_DeleteLicenseUserGroup" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2635 | 2651 | <Parameter Name="UserGroupId" Type="int" Mode="In" /> |
... | ... | @@ -5711,6 +5727,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5711 | 5727 | <Parameter Name="sZip" Mode="In" Type="String" /> |
5712 | 5728 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
5713 | 5729 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
5730 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5731 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5732 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5714 | 5733 | </FunctionImport> |
5715 | 5734 | <FunctionImport Name="GetContentAttributeData"> |
5716 | 5735 | <Parameter Name="iContentTypeId" Mode="In" Type="Int32" /> |
... | ... | @@ -5728,6 +5747,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5728 | 5747 | <Parameter Name="sZip" Mode="In" Type="String" /> |
5729 | 5748 | <Parameter Name="iState" Mode="In" Type="Int32" /> |
5730 | 5749 | <Parameter Name="iCountry" Mode="In" Type="Int32" /> |
5750 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5751 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5752 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5731 | 5753 | </FunctionImport> |
5732 | 5754 | <FunctionImport Name="GetDiscountDetails" ReturnType="Collection(AIADatabaseV5Model.GetDiscountDetails_Result)"> |
5733 | 5755 | <Parameter Name="sDiscountCode" Mode="In" Type="String" /> |
... | ... | @@ -5765,6 +5787,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5765 | 5787 | <Parameter Name="sZip" Mode="In" Type="String" /> |
5766 | 5788 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
5767 | 5789 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
5790 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5791 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5792 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5768 | 5793 | </FunctionImport> |
5769 | 5794 | <FunctionImport Name="GetExportedImageDetails" ReturnType="Collection(AIADatabaseV5Model.GetExportedImageDetails_Result)"> |
5770 | 5795 | <Parameter Name="sStartDate" Mode="In" Type="String" /> |
... | ... | @@ -5886,6 +5911,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5886 | 5911 | <Parameter Name="sZip" Mode="In" Type="String" /> |
5887 | 5912 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
5888 | 5913 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
5914 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5915 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5916 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5889 | 5917 | </FunctionImport> |
5890 | 5918 | <FunctionImport Name="GetSubscriptionDetailsByLicenseId" ReturnType="Collection(AIADatabaseV5Model.GetSubscriptionDetailsByLicenseId_Result)"> |
5891 | 5919 | <Parameter Name="iLicenseId" Mode="In" Type="Int32" /> |
... | ... | @@ -6495,6 +6523,10 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
6495 | 6523 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
6496 | 6524 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
6497 | 6525 | </FunctionImport> |
6526 | + <FunctionImport Name="usp_CheckAccountNoExists"> | |
6527 | + <Parameter Name="AccountNo" Mode="In" Type="String" /> | |
6528 | + <Parameter Name="Status" Mode="InOut" Type="Boolean" /> | |
6529 | + </FunctionImport> | |
6498 | 6530 | </EntityContainer> |
6499 | 6531 | <ComplexType Name="DA_GetBaseLayer_Result"> |
6500 | 6532 | <Property Type="Int32" Name="Id" Nullable="false" /> |
... | ... | @@ -10024,6 +10056,7 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
10024 | 10056 | </ComplexTypeMapping> |
10025 | 10057 | </ResultMapping> |
10026 | 10058 | </FunctionImportMapping> |
10059 | + <FunctionImportMapping FunctionImportName="usp_CheckAccountNoExists" FunctionName="AIADatabaseV5Model.Store.usp_CheckAccountNoExists" /> | |
10027 | 10060 | </EntityContainerMapping> |
10028 | 10061 | </Mapping> |
10029 | 10062 | </edmx:Mappings> | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Models/LicenseModel.cs
... | ... | @@ -421,6 +421,19 @@ namespace AIAHTML5.ADMIN.API.Models |
421 | 421 | } |
422 | 422 | } |
423 | 423 | |
424 | + public static bool CheckAccountNumber(AIADatabaseV5Entities dbContext, string AccountNo) | |
425 | + { | |
426 | + var spStatus = new System.Data.Objects.ObjectParameter("Status", 0); | |
427 | + try | |
428 | + { | |
429 | + dbContext.usp_CheckAccountNoExists(AccountNo, spStatus); | |
430 | + return (bool)spStatus.Value; | |
431 | + } | |
432 | + catch (Exception ex) | |
433 | + { | |
434 | + return false; | |
435 | + } | |
436 | + } | |
424 | 437 | } |
425 | 438 | |
426 | 439 | public class LicenseTypeModel | ... | ... |
500-DBDump/AIA-StoredProcedures/dbo.GetCancelledLicenses.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetCustomerSummary.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetExpiringLicenses.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetSubscribedLicenses.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/usp_CheckAccountNoExists.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_CheckAccountNoExists]') and OBJECTPROPERTY(id, N'IsProcedure') = 1) | |
7 | +drop procedure [dbo].[usp_CheckAccountNoExists] | |
8 | +GO | |
9 | + | |
10 | +-- ==================================================== | |
11 | +-- Author: Magic Software | |
12 | +-- Create date: 06-March-2018 | |
13 | +-- Description: To get all the Editions | |
14 | +-- ==================================================== | |
15 | +create PROCEDURE [dbo].[usp_CheckAccountNoExists] | |
16 | + @AccountNo varchar(50), @Status bit out | |
17 | + -- Add the parameters for the stored procedure here | |
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 | + set @Status = 0; | |
24 | + -- Insert statements for procedure here | |
25 | + if(exists(select * from License where Lower(AccountNumber) = Lower(@AccountNo))) | |
26 | + begin | |
27 | + set @Status = 1; | |
28 | + end | |
29 | +END | |
30 | + | |
31 | +GO | |
32 | +SET QUOTED_IDENTIFIER OFF | |
33 | +GO | |
34 | +SET ANSI_NULLS ON | |
35 | +GO | |
36 | + | |
37 | + | |
38 | + | |
39 | + | ... | ... |