Commit b12907f7c452b5680574c565b3d103d1150c1367
1 parent
f323d9db
Pager Done
Showing
23 changed files
with
456 additions
and
280 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
... | ... | @@ -71,12 +71,13 @@ namespace AIAHTML5.ADMIN.API.Controllers |
71 | 71 | |
72 | 72 | [Route("GetNetAdSummaryReport")] |
73 | 73 | [HttpGet] |
74 | - public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId) | |
74 | + public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int pageNo, int pageLength) | |
75 | 75 | { |
76 | 76 | try |
77 | 77 | { |
78 | - var lstNetAdSummaryReport = dbContext.GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId).ToList(); | |
79 | - return Ok(lstNetAdSummaryReport); | |
78 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
79 | + var lstNetAdSummaryReport = dbContext.GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, pageNo, pageLength, spRecordCount).ToList(); | |
80 | + return Ok(new { NetAdSubscriptionList = lstNetAdSummaryReport, RecordCount = spRecordCount.Value }); | |
80 | 81 | } |
81 | 82 | catch (Exception ex) |
82 | 83 | { |
... | ... | @@ -84,14 +85,16 @@ namespace AIAHTML5.ADMIN.API.Controllers |
84 | 85 | } |
85 | 86 | } |
86 | 87 | |
88 | + | |
87 | 89 | [Route("GetSiteLicenseUsageReport")] |
88 | 90 | [HttpGet] |
89 | - public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition) | |
91 | + public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int pageNo, int pageLength) | |
90 | 92 | { |
91 | 93 | try |
92 | 94 | { |
93 | - var lstSiteLicenseUsageReport = dbContext.GetSiteLicenseUsageReport(sFromDate, sToDate, sAccountNumber, (byte)iEdition).ToList(); | |
94 | - return Ok(lstSiteLicenseUsageReport); | |
95 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
96 | + var lstSiteLicenseUsageReport = dbContext.GetSiteLicenseUsageReport(sFromDate, sToDate, sAccountNumber, (byte)iEdition, pageNo, pageLength, spRecordCount).ToList(); | |
97 | + return Ok(new { SiteLicenseUsageList = lstSiteLicenseUsageReport, RecordCount = spRecordCount.Value }); | |
95 | 98 | } |
96 | 99 | catch (Exception ex) |
97 | 100 | { |
... | ... | @@ -101,12 +104,13 @@ namespace AIAHTML5.ADMIN.API.Controllers |
101 | 104 | |
102 | 105 | [Route("GetDiscountReport")] |
103 | 106 | [HttpGet] |
104 | - public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber) | |
107 | + public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber, int pageNo, int pageLength) | |
105 | 108 | { |
106 | 109 | try |
107 | 110 | { |
108 | - var lstDiscountReport = dbContext.GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber).ToList(); | |
109 | - return Ok(lstDiscountReport); | |
111 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
112 | + var lstDiscountReport = dbContext.GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber, pageNo, pageLength, spRecordCount).ToList(); | |
113 | + return Ok(new { DiscountReportList = lstDiscountReport, RecordCount = spRecordCount.Value }); | |
110 | 114 | } |
111 | 115 | catch (Exception ex) |
112 | 116 | { |
... | ... | @@ -114,16 +118,17 @@ namespace AIAHTML5.ADMIN.API.Controllers |
114 | 118 | } |
115 | 119 | } |
116 | 120 | |
121 | + | |
117 | 122 | [Route("GetImageExportReport")] |
118 | 123 | [HttpGet] |
119 | - public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber) | |
124 | + public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber, int pageNo, int pageLength) | |
120 | 125 | { |
121 | 126 | try |
122 | 127 | { |
123 | - if (sAccountNumber == null) | |
124 | - sAccountNumber = string.Empty; | |
125 | - var lstImageExportReport = dbContext.GetExportedImageDetails(sFromDate, sToDate, sAccountNumber).ToList(); | |
126 | - return Ok(lstImageExportReport); | |
128 | + if (sAccountNumber == null) sAccountNumber = string.Empty; | |
129 | + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | |
130 | + var lstImageExportReport = dbContext.GetExportedImageDetails(sFromDate, sToDate, sAccountNumber, pageNo, pageLength, spRecordCount).ToList(); | |
131 | + return Ok(new { ImageExportList = lstImageExportReport, RecordCount = spRecordCount.Value }); | |
127 | 132 | } |
128 | 133 | catch (Exception ex) |
129 | 134 | { | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
... | ... | @@ -1113,7 +1113,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1113 | 1113 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetDiscountedPrice_Result>("GetDiscountedPrice", inDiscountCodeParameter, outReturnCode, outDiscountPercentage, outDiscountCodeId); |
1114 | 1114 | } |
1115 | 1115 | |
1116 | - public virtual ObjectResult<GetDiscountReport_Result> GetDiscountReport(string sStartDate, string sEndDate, Nullable<int> intDiscountID, string sAccoutNumber) | |
1116 | + public virtual ObjectResult<GetDiscountReport_Result> GetDiscountReport(string sStartDate, string sEndDate, Nullable<int> intDiscountID, string sAccoutNumber, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1117 | 1117 | { |
1118 | 1118 | var sStartDateParameter = sStartDate != null ? |
1119 | 1119 | new ObjectParameter("sStartDate", sStartDate) : |
... | ... | @@ -1131,7 +1131,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1131 | 1131 | new ObjectParameter("sAccoutNumber", sAccoutNumber) : |
1132 | 1132 | new ObjectParameter("sAccoutNumber", typeof(string)); |
1133 | 1133 | |
1134 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetDiscountReport_Result>("GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter); | |
1134 | + var pageNoParameter = pageNo.HasValue ? | |
1135 | + new ObjectParameter("pageNo", pageNo) : | |
1136 | + new ObjectParameter("pageNo", typeof(int)); | |
1137 | + | |
1138 | + var pageLengthParameter = pageLength.HasValue ? | |
1139 | + new ObjectParameter("pageLength", pageLength) : | |
1140 | + new ObjectParameter("pageLength", typeof(int)); | |
1141 | + | |
1142 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetDiscountReport_Result>("GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1135 | 1143 | } |
1136 | 1144 | |
1137 | 1145 | public virtual ObjectResult<getEditionData_Result> getEditionData() |
... | ... | @@ -1214,7 +1222,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1214 | 1222 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetExpiringLicenses_Result>("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); |
1215 | 1223 | } |
1216 | 1224 | |
1217 | - public virtual ObjectResult<GetExportedImageDetails_Result> GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber) | |
1225 | + public virtual ObjectResult<GetExportedImageDetails_Result> GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1218 | 1226 | { |
1219 | 1227 | var sStartDateParameter = sStartDate != null ? |
1220 | 1228 | new ObjectParameter("sStartDate", sStartDate) : |
... | ... | @@ -1228,7 +1236,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1228 | 1236 | new ObjectParameter("sAccoutNumber", sAccoutNumber) : |
1229 | 1237 | new ObjectParameter("sAccoutNumber", typeof(string)); |
1230 | 1238 | |
1231 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetExportedImageDetails_Result>("GetExportedImageDetails", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter); | |
1239 | + var pageNoParameter = pageNo.HasValue ? | |
1240 | + new ObjectParameter("pageNo", pageNo) : | |
1241 | + new ObjectParameter("pageNo", typeof(int)); | |
1242 | + | |
1243 | + var pageLengthParameter = pageLength.HasValue ? | |
1244 | + new ObjectParameter("pageLength", pageLength) : | |
1245 | + new ObjectParameter("pageLength", typeof(int)); | |
1246 | + | |
1247 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetExportedImageDetails_Result>("GetExportedImageDetails", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1232 | 1248 | } |
1233 | 1249 | |
1234 | 1250 | public virtual int GetImagePinData() |
... | ... | @@ -1441,7 +1457,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1441 | 1457 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetNetAdDetailReport_Result>("GetNetAdDetailReport", sFromDateParameter, sToDateParameter, sLicenseTypeParameter, sAccountTypeParameter, iStartPriceParameter, iEndPriceParameter); |
1442 | 1458 | } |
1443 | 1459 | |
1444 | - public virtual ObjectResult<GetNetAdSummaryReport_Result> GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId) | |
1460 | + public virtual ObjectResult<GetNetAdSummaryReport_Result> GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1445 | 1461 | { |
1446 | 1462 | var sFromDateParameter = sFromDate != null ? |
1447 | 1463 | new ObjectParameter("sFromDate", sFromDate) : |
... | ... | @@ -1463,7 +1479,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1463 | 1479 | new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : |
1464 | 1480 | new ObjectParameter("iLicenseTypeId", typeof(byte)); |
1465 | 1481 | |
1466 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetNetAdSummaryReport_Result>("GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter); | |
1482 | + var pageNoParameter = pageNo.HasValue ? | |
1483 | + new ObjectParameter("pageNo", pageNo) : | |
1484 | + new ObjectParameter("pageNo", typeof(int)); | |
1485 | + | |
1486 | + var pageLengthParameter = pageLength.HasValue ? | |
1487 | + new ObjectParameter("pageLength", pageLength) : | |
1488 | + new ObjectParameter("pageLength", typeof(int)); | |
1489 | + | |
1490 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetNetAdSummaryReport_Result>("GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1467 | 1491 | } |
1468 | 1492 | |
1469 | 1493 | public virtual ObjectResult<GetProductFeatures_Result> GetProductFeatures(Nullable<int> editionId) |
... | ... | @@ -1557,7 +1581,7 @@ namespace AIAHTML5.ADMIN.API.Entity |
1557 | 1581 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSiteIpByAccountNumber_Result>("GetSiteIpByAccountNumber", accountNumnerParameter); |
1558 | 1582 | } |
1559 | 1583 | |
1560 | - public virtual ObjectResult<GetSiteLicenseUsageReport_Result> GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccoutNumber, Nullable<byte> iEditionId) | |
1584 | + public virtual ObjectResult<GetSiteLicenseUsageReport_Result> GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccoutNumber, Nullable<byte> iEditionId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | |
1561 | 1585 | { |
1562 | 1586 | var sFromDateParameter = sFromDate != null ? |
1563 | 1587 | new ObjectParameter("sFromDate", sFromDate) : |
... | ... | @@ -1575,7 +1599,15 @@ namespace AIAHTML5.ADMIN.API.Entity |
1575 | 1599 | new ObjectParameter("iEditionId", iEditionId) : |
1576 | 1600 | new ObjectParameter("iEditionId", typeof(byte)); |
1577 | 1601 | |
1578 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSiteLicenseUsageReport_Result>("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter); | |
1602 | + var pageNoParameter = pageNo.HasValue ? | |
1603 | + new ObjectParameter("pageNo", pageNo) : | |
1604 | + new ObjectParameter("pageNo", typeof(int)); | |
1605 | + | |
1606 | + var pageLengthParameter = pageLength.HasValue ? | |
1607 | + new ObjectParameter("pageLength", pageLength) : | |
1608 | + new ObjectParameter("pageLength", typeof(int)); | |
1609 | + | |
1610 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<GetSiteLicenseUsageReport_Result>("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); | |
1579 | 1611 | } |
1580 | 1612 | |
1581 | 1613 | 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) | ... | ... |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
... | ... | @@ -2122,6 +2122,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2122 | 2122 | <Parameter Name="sEndDate" Type="varchar" Mode="In" /> |
2123 | 2123 | <Parameter Name="intDiscountID" Type="int" Mode="In" /> |
2124 | 2124 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> |
2125 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2126 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2127 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2125 | 2128 | </Function> |
2126 | 2129 | <Function Name="getEditionData" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> |
2127 | 2130 | <Function Name="GetEditionsBySiteAccount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
... | ... | @@ -2150,6 +2153,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2150 | 2153 | <Parameter Name="sStartDate" Type="varchar" Mode="In" /> |
2151 | 2154 | <Parameter Name="sEndDate" Type="varchar" Mode="In" /> |
2152 | 2155 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> |
2156 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2157 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2158 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2153 | 2159 | </Function> |
2154 | 2160 | <Function Name="GetImagePinData" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" /> |
2155 | 2161 | <Function Name="GetIncorrectLoginAttempt" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
... | ... | @@ -2219,6 +2225,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2219 | 2225 | <Parameter Name="iStartPrice" Type="numeric" Mode="In" /> |
2220 | 2226 | <Parameter Name="iEndPrice" Type="numeric" Mode="In" /> |
2221 | 2227 | <Parameter Name="iLicenseTypeId" Type="tinyint" Mode="In" /> |
2228 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2229 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2230 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2222 | 2231 | </Function> |
2223 | 2232 | <Function Name="GetProductFeatures" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2224 | 2233 | <Parameter Name="EditionId" Type="int" Mode="In" /> |
... | ... | @@ -2267,6 +2276,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does |
2267 | 2276 | <Parameter Name="sToDate" Type="varchar" Mode="In" /> |
2268 | 2277 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> |
2269 | 2278 | <Parameter Name="iEditionId" Type="tinyint" Mode="In" /> |
2279 | + <Parameter Name="pageNo" Type="int" Mode="In" /> | |
2280 | + <Parameter Name="pageLength" Type="int" Mode="In" /> | |
2281 | + <Parameter Name="recordCount" Type="int" Mode="InOut" /> | |
2270 | 2282 | </Function> |
2271 | 2283 | <Function Name="GetSubscribedLicenses" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo"> |
2272 | 2284 | <Parameter Name="sFromDate" Type="varchar" Mode="In" /> |
... | ... | @@ -5809,6 +5821,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5809 | 5821 | <Parameter Name="sEndDate" Mode="In" Type="String" /> |
5810 | 5822 | <Parameter Name="intDiscountID" Mode="In" Type="Int32" /> |
5811 | 5823 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> |
5824 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5825 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5826 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5812 | 5827 | </FunctionImport> |
5813 | 5828 | <FunctionImport Name="getEditionData" ReturnType="Collection(AIADatabaseV5Model.getEditionData_Result)" /> |
5814 | 5829 | <FunctionImport Name="GetEditionsBySiteAccount" ReturnType="Collection(AIADatabaseV5Model.GetEditionsBySiteAccount_Result)"> |
... | ... | @@ -5837,6 +5852,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5837 | 5852 | <Parameter Name="sStartDate" Mode="In" Type="String" /> |
5838 | 5853 | <Parameter Name="sEndDate" Mode="In" Type="String" /> |
5839 | 5854 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> |
5855 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5856 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5857 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5840 | 5858 | </FunctionImport> |
5841 | 5859 | <FunctionImport Name="GetImagePinData" /> |
5842 | 5860 | <FunctionImport Name="GetIncorrectLoginAttempt" ReturnType="Collection(Int16)"> |
... | ... | @@ -5909,6 +5927,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5909 | 5927 | <Parameter Name="iStartPrice" Mode="In" Type="Decimal" /> |
5910 | 5928 | <Parameter Name="iEndPrice" Mode="In" Type="Decimal" /> |
5911 | 5929 | <Parameter Name="iLicenseTypeId" Mode="In" Type="Byte" /> |
5930 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5931 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5932 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5912 | 5933 | </FunctionImport> |
5913 | 5934 | <FunctionImport Name="GetProductFeatures" ReturnType="Collection(AIADatabaseV5Model.GetProductFeatures_Result)"> |
5914 | 5935 | <Parameter Name="EditionId" Mode="In" Type="Int32" /> |
... | ... | @@ -5945,6 +5966,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap]</Definin |
5945 | 5966 | <Parameter Name="sToDate" Mode="In" Type="String" /> |
5946 | 5967 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> |
5947 | 5968 | <Parameter Name="iEditionId" Mode="In" Type="Byte" /> |
5969 | + <Parameter Name="pageNo" Mode="In" Type="Int32" /> | |
5970 | + <Parameter Name="pageLength" Mode="In" Type="Int32" /> | |
5971 | + <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | |
5948 | 5972 | </FunctionImport> |
5949 | 5973 | <FunctionImport Name="GetSubscribedLicenses" ReturnType="Collection(AIADatabaseV5Model.GetSubscribedLicenses_Result)"> |
5950 | 5974 | <Parameter Name="sFromDate" Mode="In" Type="String" /> | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts
... | ... | @@ -142,10 +142,10 @@ export class EditLicenseBasicSettings implements OnInit { |
142 | 142 | |
143 | 143 | AfterUpdateData(data, template) { |
144 | 144 | if (data.Status == "false") { |
145 | - this.alerts = "<span>License update unsuccessfull.</span>"; | |
145 | + this.alerts = "<span>License profile update unsuccessfull.</span>"; | |
146 | 146 | } else { |
147 | 147 | //this.modalAlerts = "<p>License updated successfully</p>"; |
148 | - this._confirmService.activate("License updated successfully.", "alertMsg"); | |
148 | + this._confirmService.activate("License profile updated successfully.", "alertMsg"); | |
149 | 149 | // this.modalRef = this.modalService.show(template); |
150 | 150 | } |
151 | 151 | } | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts
... | ... | @@ -25,7 +25,7 @@ export class LicenseService{ |
25 | 25 | } |
26 | 26 | obj.subscriptionStartDate = this.datePipe.transform(obj.subscriptionStartDate, 'MM/dd/yyyy'); |
27 | 27 | obj.subscriptionEndDate = this.datePipe.transform(obj.subscriptionEndDate, 'MM/dd/yyyy'); |
28 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/Licenses?accountNumber=" + obj.accountNumber + | |
28 | + return this.http.get(this.commonService.resourceBaseUrl + "License/Licenses?accountNumber=" + obj.accountNumber + | |
29 | 29 | "&licenseeFirstName=" + obj.licenseeFirstName + "&licenseeLastName=" + obj.licenseeLastName + |
30 | 30 | "&licenseTypeId=" + obj.licenseTypeId + "&institutionName=" + obj.institutionName + |
31 | 31 | "&stateId=" + obj.stateId + "&countryId=" + obj.countryId + "&emailId=" + obj.emailId + |
... | ... | @@ -36,81 +36,81 @@ export class LicenseService{ |
36 | 36 | } |
37 | 37 | |
38 | 38 | GetLicenseById(Id: number){ |
39 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/GetLicense?LicenseId=" + Id) | |
39 | + return this.http.get(this.commonService.resourceBaseUrl + "License/GetLicense?LicenseId=" + Id) | |
40 | 40 | .map(this.extractData) |
41 | 41 | .catch((res: Response) => this.handleError(res)); |
42 | 42 | } |
43 | 43 | |
44 | 44 | GetLicenceType() |
45 | 45 | { |
46 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseTypes") | |
46 | + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseTypes") | |
47 | 47 | .map(this.extractData) |
48 | 48 | .catch((res: Response) => this.handleError(res)); |
49 | 49 | } |
50 | 50 | |
51 | 51 | GetAccountType() |
52 | 52 | { |
53 | - return this.http.get(this.commonService.resourceBaseUrl + "/Account/AccountTypes") | |
53 | + return this.http.get(this.commonService.resourceBaseUrl + "Account/AccountTypes") | |
54 | 54 | .map(this.extractData) |
55 | 55 | .catch((res: Response) => this.handleError(res)); |
56 | 56 | } |
57 | 57 | |
58 | 58 | GetCountry() { |
59 | - return this.http.get(this.commonService.resourceBaseUrl + "/Common/Countries") | |
59 | + return this.http.get(this.commonService.resourceBaseUrl + "Common/Countries") | |
60 | 60 | .map(this.extractData) |
61 | 61 | .catch((res: Response) => this.handleError(res)); |
62 | 62 | } |
63 | 63 | |
64 | 64 | GetState() { |
65 | - return this.http.get(this.commonService.resourceBaseUrl + "/Common/States") | |
65 | + return this.http.get(this.commonService.resourceBaseUrl + "Common/States") | |
66 | 66 | .map(this.extractData) |
67 | 67 | .catch((res: Response) => this.handleError(res)); |
68 | 68 | } |
69 | 69 | |
70 | 70 | GetSecurityQuestions() { |
71 | - return this.http.get(this.commonService.resourceBaseUrl + "/Common/SecurityQuestions") | |
71 | + return this.http.get(this.commonService.resourceBaseUrl + "Common/SecurityQuestions") | |
72 | 72 | .map(this.extractData) |
73 | 73 | .catch((res: Response) => this.handleError(res)); |
74 | 74 | } |
75 | 75 | |
76 | 76 | GetEditions() { |
77 | - return this.http.get(this.commonService.resourceBaseUrl + "/Edition/Editions") | |
77 | + return this.http.get(this.commonService.resourceBaseUrl + "Edition/Editions") | |
78 | 78 | .map(this.extractData) |
79 | 79 | .catch((res: Response) => this.handleError(res)); |
80 | 80 | } |
81 | 81 | |
82 | 82 | GetLicenseAccounts(licenseType: Number) { |
83 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseAccounts?LicenseType=" + licenseType) | |
83 | + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseAccounts?LicenseType=" + licenseType) | |
84 | 84 | .map(this.extractData) |
85 | 85 | .catch((res: Response) => this.handleError(res)); |
86 | 86 | } |
87 | 87 | |
88 | 88 | GetSiteById(siteId: number) { |
89 | - return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteDetail?SiteId=" + siteId) | |
89 | + return this.http.get(this.commonService.resourceBaseUrl + "Site/SiteDetail?SiteId=" + siteId) | |
90 | 90 | .map(this.extractData) |
91 | 91 | .catch((res: Response) => this.handleError(res)); |
92 | 92 | } |
93 | 93 | |
94 | 94 | GetSiteAccountEditions(siteId: number, licenseId: number) { |
95 | - return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteAccountEditions?SiteId=" + siteId + "&LicenseId=" + licenseId) | |
95 | + return this.http.get(this.commonService.resourceBaseUrl + "Site/SiteAccountEditions?SiteId=" + siteId + "&LicenseId=" + licenseId) | |
96 | 96 | .map(this.extractData) |
97 | 97 | .catch((res: Response) => this.handleError(res)); |
98 | 98 | } |
99 | 99 | |
100 | 100 | GetLicenseSites(accountNo: string, pageNo: number, pageLength: number) { |
101 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseSites?AccountNo=" + accountNo + "&pageNo=" + pageNo + "&pageLength=" + pageLength) | |
101 | + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseSites?AccountNo=" + accountNo + "&pageNo=" + pageNo + "&pageLength=" + pageLength) | |
102 | 102 | .map(this.extractData) |
103 | 103 | .catch((res: Response) => this.handleError(res)); |
104 | 104 | } |
105 | 105 | |
106 | 106 | GetLicenseModestySettings(licenseId: number, buildingLevelId: number) { |
107 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModestySettings?LicenseId=" + licenseId + "&BuildingLevelId=" + buildingLevelId) | |
107 | + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseModestySettings?LicenseId=" + licenseId + "&BuildingLevelId=" + buildingLevelId) | |
108 | 108 | .map(this.extractData) |
109 | 109 | .catch((res: Response) => this.handleError(res)); |
110 | 110 | } |
111 | 111 | |
112 | 112 | GetLicenseModulesStatus(licenseId: number) { |
113 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModulesStatus?LicenseId=" + licenseId) | |
113 | + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseModulesStatus?LicenseId=" + licenseId) | |
114 | 114 | .map(this.extractData) |
115 | 115 | .catch((res: Response) => this.handleError(res)); |
116 | 116 | } |
... | ... | @@ -154,7 +154,7 @@ export class LicenseService{ |
154 | 154 | var headers = new Headers({ |
155 | 155 | 'Content-Type': 'application/json' |
156 | 156 | }); |
157 | - return this.http.post(this.commonService.resourceBaseUrl + "/License/InsertLicense", | |
157 | + return this.http.post(this.commonService.resourceBaseUrl + "License/InsertLicense", | |
158 | 158 | JSON.stringify(jsonData), {headers: headers}) |
159 | 159 | .map(this.extractData) |
160 | 160 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -204,7 +204,7 @@ export class LicenseService{ |
204 | 204 | var headers = new Headers({ |
205 | 205 | 'Content-Type': 'application/json' |
206 | 206 | }); |
207 | - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicense", | |
207 | + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicense", | |
208 | 208 | JSON.stringify(jsonData), {headers: headers}) |
209 | 209 | .map(this.extractData) |
210 | 210 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -230,7 +230,7 @@ export class LicenseService{ |
230 | 230 | var headers = new Headers({ |
231 | 231 | 'Content-Type': 'application/json' |
232 | 232 | }); |
233 | - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseBasicSettings", | |
233 | + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseBasicSettings", | |
234 | 234 | JSON.stringify(jsonData), {headers: headers}) |
235 | 235 | .map(this.extractData) |
236 | 236 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -252,7 +252,7 @@ export class LicenseService{ |
252 | 252 | var headers = new Headers({ |
253 | 253 | 'Content-Type': 'application/json' |
254 | 254 | }); |
255 | - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModestySettings", | |
255 | + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseModestySettings", | |
256 | 256 | JSON.stringify(jsonData), {headers: headers}) |
257 | 257 | .map(this.extractData) |
258 | 258 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -274,14 +274,14 @@ export class LicenseService{ |
274 | 274 | var headers = new Headers({ |
275 | 275 | 'Content-Type': 'application/json' |
276 | 276 | }); |
277 | - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModulesStatus", | |
277 | + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseModulesStatus", | |
278 | 278 | JSON.stringify(jsonData), {headers: headers}) |
279 | 279 | .map(this.extractData) |
280 | 280 | .catch((res: Response) => this.handleError(res)); |
281 | 281 | } |
282 | 282 | |
283 | 283 | DeleteLicense(obj: any) { |
284 | - return this.http.get(this.commonService.resourceBaseUrl + "/License/DeleteLicense?LicenseId=" + obj.LicenseId) | |
284 | + return this.http.get(this.commonService.resourceBaseUrl + "License/DeleteLicense?LicenseId=" + obj.LicenseId) | |
285 | 285 | .map(this.extractData) |
286 | 286 | .catch((res: Response) => this.handleError(res)); |
287 | 287 | } |
... | ... | @@ -330,14 +330,14 @@ export class LicenseService{ |
330 | 330 | var headers = new Headers({ |
331 | 331 | 'Content-Type': 'application/json' |
332 | 332 | }); |
333 | - return this.http.post(this.commonService.resourceBaseUrl + "/Site/InsertUpdateSiteAccount", | |
333 | + return this.http.post(this.commonService.resourceBaseUrl + "Site/InsertUpdateSiteAccount", | |
334 | 334 | JSON.stringify(jsonData), {headers: headers}) |
335 | 335 | .map(this.extractData) |
336 | 336 | .catch((res: Response) => this.handleError(res)); |
337 | 337 | } |
338 | 338 | |
339 | 339 | DeleteSiteAccount(obj: any) { |
340 | - return this.http.get(this.commonService.resourceBaseUrl + "/Site/DeleteSiteAccount?SiteId=" + | |
340 | + return this.http.get(this.commonService.resourceBaseUrl + "Site/DeleteSiteAccount?SiteId=" + | |
341 | 341 | obj.Id + "&LicenseId=" + obj.LicenseId + "&UserId=" + obj.SiteUserId) |
342 | 342 | .map(this.extractData) |
343 | 343 | .catch((res: Response) => this.handleError(res)); | ... | ... |
400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts
... | ... | @@ -64,9 +64,9 @@ export class LicenseModestySettings implements OnInit { |
64 | 64 | this.GetLicenseEditionModesty(); |
65 | 65 | } |
66 | 66 | else{ |
67 | - this.licenseService.GetLicenseSites(this.license.AccountNumber,1,1) | |
67 | + this.licenseService.GetLicenseSites(this.license.AccountNumber, 1, 1) | |
68 | 68 | .subscribe(st => { |
69 | - this.lstLicenseSites = st; | |
69 | + this.lstLicenseSites = st.LicenseSiteList; | |
70 | 70 | if(this.lstLicenseSites.length == 0){ |
71 | 71 | this.modalMessage = 'Account is not a building level account.'; |
72 | 72 | this.openModal(template); | ... | ... |
400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts
... | ... | @@ -11,7 +11,7 @@ import { GlobalService } from '../../Shared/global'; |
11 | 11 | @Injectable() |
12 | 12 | export class ManageDiscountCodeService { |
13 | 13 | |
14 | - constructor(private http: Http, private commonService: GlobalService ) { } | |
14 | + constructor(private http: Http, private commonService:GlobalService ) { } | |
15 | 15 | |
16 | 16 | GetDiscountCodes(obj: any) { |
17 | 17 | if (obj.startDate == '' || obj.startDate == null) { | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> |
85 | 85 | </div> |
86 | 86 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
87 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="GetDiscountReport(this)"><i class="fa fa-file"></i> Generate Report</button> | |
87 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | |
88 | 88 | <!--modal--> |
89 | 89 | <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> |
90 | 90 | <div class="modal-dialog modal-sm" role="document"> |
... | ... | @@ -153,6 +153,7 @@ |
153 | 153 | </tr> |
154 | 154 | </tbody> |
155 | 155 | </table> |
156 | + <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetDiscountReport($event)"></admin-pager> | |
156 | 157 | <div class="row"> |
157 | 158 | <div class="col-sm-12 marginTop20 text-center"> |
158 | 159 | <button type="button" class="btn btn-primary btn-sm" (click)="ExportEvent()" [ngClass]="{disabled : !buttonStatus}"><i class="fa fa-file-excel-o"></i> Export To CSV</button> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
1 | -import { Component, OnInit } from '@angular/core'; | |
1 | +import { Component, OnInit, ViewChild } from '@angular/core'; | |
2 | 2 | import { Router } from '@angular/router'; |
3 | 3 | import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; |
4 | 4 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
... | ... | @@ -16,17 +16,20 @@ import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule, BsDatepickerConfig } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | 18 | import { LoadingService } from '../../shared/loading.service'; |
19 | - | |
19 | +import { PagerComponent } from '../../shared/Pager/pager.component'; | |
20 | +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; | |
20 | 21 | declare var $: any; |
21 | 22 | |
22 | 23 | @Component({ |
23 | 24 | templateUrl: './discountcodereport.component.html' |
24 | 25 | }) |
26 | + | |
25 | 27 | export class DiscountCodeReport implements OnInit { |
26 | 28 | public lstDiscountCodeReport: any; |
27 | 29 | public lstDiscountCode: any; |
28 | 30 | DiscountCodeReportForm: FormGroup; |
29 | 31 | DiscountCodeReports: DiscountCodeReports[]; |
32 | + NewSubscription = new DiscountCodeReports(); | |
30 | 33 | numberOfDiscountCodeReport: number; |
31 | 34 | limit: number; |
32 | 35 | page: number = 1; |
... | ... | @@ -47,8 +50,14 @@ export class DiscountCodeReport implements OnInit { |
47 | 50 | alerts: string; |
48 | 51 | ExportingStart: boolean; |
49 | 52 | buttonStatus: boolean; |
53 | + @ViewChild(PagerComponent) pagerComponent: PagerComponent; | |
54 | + recordCount: number; | |
55 | + pageNo: number; | |
56 | + pageLength: number; | |
57 | + | |
50 | 58 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, |
51 | - private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
59 | + private modalService: BsModalService, private global: GlobalService, | |
60 | + private _loadingService: LoadingService, private _confirmService: ConfirmService) { } | |
52 | 61 | |
53 | 62 | ngOnInit(): void { |
54 | 63 | this.ExportingStart = false; |
... | ... | @@ -71,7 +80,7 @@ export class DiscountCodeReport implements OnInit { |
71 | 80 | $('#fixed_hdr2').fxdHdrCol({ |
72 | 81 | fixedCols: 0, |
73 | 82 | width: "100%", |
74 | - height: 300, | |
83 | + height: 330, | |
75 | 84 | colModal: [ |
76 | 85 | { width: 180, align: 'center' }, |
77 | 86 | { width: 230, align: 'center' }, |
... | ... | @@ -95,24 +104,32 @@ export class DiscountCodeReport implements OnInit { |
95 | 104 | ], |
96 | 105 | sort: true |
97 | 106 | }); |
98 | - document.getElementById("fixed_table_rc").remove(); | |
99 | - var testScript = document.createElement("script"); | |
100 | - testScript.setAttribute("id", "fixed_table_rc"); | |
101 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
102 | - testScript.setAttribute("type", "text/javascript"); | |
103 | - document.body.appendChild(testScript); | |
104 | - //this.GetSubscriptionCancellationReport(); | |
107 | + this.pageNo = 1; | |
108 | + this.pageLength = 10; | |
109 | + this.NoRecord = this.global.NoRecords; | |
110 | + this.recordCount = 0; | |
111 | + this.pagerComponent = new PagerComponent(); | |
112 | + | |
113 | + if(document.getElementById("fixed_table_rc") != null){ | |
114 | + document.getElementById("fixed_table_rc").remove(); | |
115 | + var testScript = document.createElement("script"); | |
116 | + testScript.setAttribute("id", "fixed_table_rc"); | |
117 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
118 | + testScript.setAttribute("type", "text/javascript"); | |
119 | + document.body.appendChild(testScript); | |
120 | + } | |
105 | 121 | |
106 | 122 | } |
107 | 123 | |
108 | - | |
109 | - | |
110 | 124 | GetDiscountCode() { |
111 | 125 | this.reportservice.GetDiscountCodes().subscribe(st => { this.lstDiscountCode = st; }, error => this.error = <any>error); |
112 | 126 | } |
113 | 127 | |
114 | - | |
115 | - GetDiscountReport(this) { | |
128 | + GetDiscountReport(evt: any) { | |
129 | + this._loadingService.ShowLoading("global-loading"); | |
130 | + var tempArr = evt.split(','); | |
131 | + this.pageNo = parseInt(tempArr[0]); | |
132 | + this.pageLength = parseInt(tempArr[1]); | |
116 | 133 | this.alerts = ''; |
117 | 134 | this.global.compareTwoDates(this.DiscountCodeReportForm.controls['sToDate'].value, this.DiscountCodeReportForm.controls['sFromDate'].value); |
118 | 135 | if (this.global.ValidationMsg != '') { |
... | ... | @@ -123,17 +140,22 @@ export class DiscountCodeReport implements OnInit { |
123 | 140 | this.NewSubscription = this.DiscountCodeReportForm.value; |
124 | 141 | var obj = this.NewSubscription; |
125 | 142 | if (this.ExportingStart) { |
126 | - this.reportservice.GetDiscountReport(obj).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.ExportService(DiscountCodeReports); }, error => this.error = <any>error); | |
143 | + this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.ExportService(DiscountCodeReports); }, error => this.error = <any>error); | |
127 | 144 | } |
128 | 145 | else { |
129 | - this.reportservice.GetDiscountReport(obj).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error); | |
146 | + this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error); | |
130 | 147 | } |
131 | - | |
132 | 148 | } |
133 | 149 | } |
150 | + | |
151 | + SearchRecords() { | |
152 | + this.GetDiscountReport('1, ' + this.pageLength); | |
153 | + } | |
154 | + | |
134 | 155 | BindFormFields(data) { |
135 | - this.lstDiscountCodeReport = data | |
136 | - this.numberOfDiscountCodeReport = this.lstDiscountCodeReport.length; this.limit = this.lstDiscountCodeReport.length; | |
156 | + this.recordCount = data.RecordCount; | |
157 | + this.lstDiscountCodeReport = data.DiscountReportList; | |
158 | + this.limit = this.lstDiscountCodeReport.length; | |
137 | 159 | if (this.lstDiscountCodeReport.length > 0) { |
138 | 160 | this.NoRecord = ''; |
139 | 161 | this.buttonStatus = true; |
... | ... | @@ -145,12 +167,14 @@ export class DiscountCodeReport implements OnInit { |
145 | 167 | this.buttonStatus = false; |
146 | 168 | } |
147 | 169 | } |
170 | + | |
148 | 171 | ExportEvent() { |
149 | 172 | if (this.buttonStatus) { |
150 | 173 | this.ExportingStart = true; |
151 | - this.GetDiscountReport(); | |
174 | + this.GetDiscountReport('1, ' + this.recordCount); | |
152 | 175 | } |
153 | 176 | } |
177 | + | |
154 | 178 | ExportService(data: any) { |
155 | 179 | this._loadingService.HideLoading("global-loading"); |
156 | 180 | this.global.ExportToCSV(data, "DiscountReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.html
... | ... | @@ -69,7 +69,7 @@ |
69 | 69 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> |
70 | 70 | </div> |
71 | 71 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
72 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="GetImageExportReport(this)"><i class="fa fa-file"></i> Generate Report</button> | |
72 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | |
73 | 73 | <!--modal--> |
74 | 74 | <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> |
75 | 75 | <div class="modal-dialog modal-sm" role="document"> |
... | ... | @@ -130,7 +130,7 @@ |
130 | 130 | <tbody> |
131 | 131 | <tr *ngIf="NoRecord !== ''"> |
132 | 132 | |
133 | - <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
133 | + <td colspan="9"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> | |
134 | 134 | </tr> |
135 | 135 | <tr *ngFor="let item of lstImageExportReport"> |
136 | 136 | <td>{{item.Title}}</td> |
... | ... | @@ -145,6 +145,7 @@ |
145 | 145 | </tr> |
146 | 146 | </tbody> |
147 | 147 | </table> |
148 | + <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetImageExportReport($event)"></admin-pager> | |
148 | 149 | <div class="row"> |
149 | 150 | <div class="col-sm-12 marginTop20 text-center"> |
150 | 151 | <button type="button" class="btn btn-primary btn-sm" [ngClass]="{disabled : !buttonStatus}" (click)="ExportEvent()"><i class="fa fa-file-excel-o"></i> Export To CSV</button> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
1 | - | |
2 | -import { Component, OnInit } from '@angular/core'; | |
1 | +import { Component, OnInit, ViewChild } from '@angular/core'; | |
3 | 2 | import { Router } from '@angular/router'; |
4 | 3 | import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; |
5 | 4 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
... | ... | @@ -17,8 +16,10 @@ import { DatePipe } from '@angular/common'; |
17 | 16 | import { BsDatepickerModule, BsDatepickerConfig } from 'ngx-bootstrap'; |
18 | 17 | import { Http, Response } from '@angular/http'; |
19 | 18 | import { LoadingService } from '../../shared/loading.service'; |
20 | - | |
19 | +import { PagerComponent } from '../../shared/Pager/pager.component'; | |
20 | +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; | |
21 | 21 | declare var $: any; |
22 | + | |
22 | 23 | @Component({ |
23 | 24 | templateUrl: './imageexportreport.component.html' |
24 | 25 | }) |
... | ... | @@ -48,8 +49,14 @@ export class ImageExportReport implements OnInit { |
48 | 49 | ExportingStart: boolean; |
49 | 50 | bsConfig: Partial<BsDatepickerConfig>; |
50 | 51 | buttonStatus: boolean; |
51 | - constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, private modalService: BsModalService, | |
52 | - private global: GlobalService, private _loadingService: LoadingService) { } | |
52 | + @ViewChild(PagerComponent) pagerComponent: PagerComponent; | |
53 | + recordCount: number; | |
54 | + pageNo: number; | |
55 | + pageLength: number; | |
56 | + | |
57 | + constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | |
58 | + private modalService: BsModalService, private global: GlobalService, | |
59 | + private _loadingService: LoadingService, private _confirmService: ConfirmService) { } | |
53 | 60 | |
54 | 61 | ngOnInit(): void { |
55 | 62 | this.buttonStatus = false; |
... | ... | @@ -64,18 +71,11 @@ export class ImageExportReport implements OnInit { |
64 | 71 | sAccountNumber: [''] |
65 | 72 | }); |
66 | 73 | this.alerts = ''; |
67 | - | |
68 | - | |
69 | - this.GetImageExportReport(); | |
70 | - var testScript = document.createElement("script"); | |
71 | - testScript.setAttribute("id", "fixed_table_rc"); | |
72 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
73 | - testScript.setAttribute("type", "text/javascript"); | |
74 | - document.body.appendChild(testScript); | |
74 | + this._loadingService.HideLoading("global-loading"); | |
75 | 75 | $('#fixed_hdr2').fxdHdrCol({ |
76 | 76 | fixedCols: 0, |
77 | 77 | width: "100%", |
78 | - height: 300, | |
78 | + height: 330, | |
79 | 79 | colModal: [ |
80 | 80 | { width: 180, align: 'center' }, |
81 | 81 | { width: 230, align: 'center' }, |
... | ... | @@ -90,11 +90,27 @@ export class ImageExportReport implements OnInit { |
90 | 90 | ], |
91 | 91 | sort: true |
92 | 92 | }); |
93 | - //document.getElementById("fixed_table_rc").remove(); | |
93 | + this.pageNo = 1; | |
94 | + this.pageLength = 10; | |
95 | + this.NoRecord = this.global.NoRecords; | |
96 | + this.recordCount = 0; | |
97 | + this.pagerComponent = new PagerComponent(); | |
98 | + | |
99 | + if(document.getElementById("fixed_table_rc") != null){ | |
100 | + document.getElementById("fixed_table_rc").remove(); | |
101 | + var testScript = document.createElement("script"); | |
102 | + testScript.setAttribute("id", "fixed_table_rc"); | |
103 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
104 | + testScript.setAttribute("type", "text/javascript"); | |
105 | + document.body.appendChild(testScript); | |
106 | + } | |
94 | 107 | } |
95 | 108 | |
96 | - GetImageExportReport(this) { | |
97 | - debugger; | |
109 | + GetImageExportReport(evt: any) { | |
110 | + this._loadingService.ShowLoading("global-loading"); | |
111 | + var tempArr = evt.split(','); | |
112 | + this.pageNo = parseInt(tempArr[0]); | |
113 | + this.pageLength = parseInt(tempArr[1]); | |
98 | 114 | this.alerts = ''; |
99 | 115 | this.global.compareTwoDates(this.ImageExportReportForm.controls['sToDate'].value, this.ImageExportReportForm.controls['sFromDate'].value); |
100 | 116 | if (this.global.ValidationMsg != '') { |
... | ... | @@ -105,17 +121,23 @@ export class ImageExportReport implements OnInit { |
105 | 121 | this.imageexportreport = this.ImageExportReportForm.value; |
106 | 122 | var obj = this.imageexportreport; |
107 | 123 | if (this.ExportingStart) { |
108 | - this.reportservice.GetImageExportReport(obj).subscribe((ImageExportReports: ImageExportReports[]) => { this.ExportService(ImageExportReports); }, error => this.error = <any>error); | |
124 | + this.reportservice.GetImageExportReport(obj, this.pageNo, this.pageLength).subscribe((ImageExportReports: ImageExportReports[]) => { this.ExportService(ImageExportReports); }, error => this.error = <any>error); | |
109 | 125 | } |
110 | 126 | else { |
111 | - this.reportservice.GetImageExportReport(obj).subscribe((ImageExportReports: ImageExportReports[]) => { this.BindFormFields(ImageExportReports); }, error => this.error = <any>error); | |
127 | + this.reportservice.GetImageExportReport(obj, this.pageNo, this.pageLength).subscribe((ImageExportReports: ImageExportReports[]) => { this.BindFormFields(ImageExportReports); }, error => this.error = <any>error); | |
112 | 128 | } |
113 | - | |
114 | 129 | } |
115 | 130 | } |
131 | + | |
132 | + SearchRecords() { | |
133 | + this.GetImageExportReport('1, ' + this.pageLength); | |
134 | + } | |
135 | + | |
116 | 136 | BindFormFields(data) { |
117 | - this.lstImageExportReport = data | |
118 | - this.numberOfImageExportReport = this.lstImageExportReport.length; this.limit = this.lstImageExportReport.length; | |
137 | + this.recordCount = data.RecordCount; | |
138 | + this.lstImageExportReport = data.ImageExportList; | |
139 | + this.numberOfImageExportReport = this.lstImageExportReport.length; | |
140 | + this.limit = this.lstImageExportReport.length; | |
119 | 141 | if (this.lstImageExportReport.length > 0) { |
120 | 142 | this.NoRecord = ''; |
121 | 143 | this.buttonStatus = true; |
... | ... | @@ -125,15 +147,16 @@ export class ImageExportReport implements OnInit { |
125 | 147 | this.NoRecord = this.global.NoRecords; |
126 | 148 | this._loadingService.HideLoading("global-loading"); |
127 | 149 | this.buttonStatus = false; |
128 | - | |
129 | 150 | } |
130 | 151 | } |
152 | + | |
131 | 153 | ExportEvent() { |
132 | 154 | if (this.buttonStatus) { |
133 | 155 | this.ExportingStart = true; |
134 | - this.GetImageExportReport(); | |
156 | + this.GetImageExportReport('1, ' + this.recordCount); | |
135 | 157 | } |
136 | 158 | } |
159 | + | |
137 | 160 | ExportService(data: any) { |
138 | 161 | this._loadingService.HideLoading("global-loading"); |
139 | 162 | this.global.ExportToCSV(data, "ImageExportReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
... | ... | @@ -79,7 +79,7 @@ |
79 | 79 | |
80 | 80 | <div class="col-sm-12"> |
81 | 81 | <div class="form-group marginTop5 text-right"> |
82 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="GetNetAdSummaryReport(this)"><i class="fa fa-file"></i> Generate Report</button> | |
82 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | |
83 | 83 | <!--modal--> |
84 | 84 | <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> |
85 | 85 | <div class="modal-dialog modal-sm" role="document"> |
... | ... | @@ -125,7 +125,6 @@ |
125 | 125 | </thead> |
126 | 126 | <tbody> |
127 | 127 | <tr *ngIf="NoRecord !== ''"> |
128 | - | |
129 | 128 | <td colspan="6"><b style="color: red;text-align: center; padding-left: 606px;"><span [innerHTML]="NoRecord"></span></b></td> |
130 | 129 | </tr> |
131 | 130 | <tr *ngFor="let item of lstNetAdSubscriptionReport"> |
... | ... | @@ -140,6 +139,7 @@ |
140 | 139 | </tr> |
141 | 140 | </tbody> |
142 | 141 | </table> |
142 | + <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetNetAdSummaryReport($event)"></admin-pager> | |
143 | 143 | <div class="row"> |
144 | 144 | <div class="col-sm-12 marginTop20 text-center"> |
145 | 145 | <button type="button" class="btn btn-primary btn-sm" [ngClass]="{disabled : !buttonStatus}" (click)="ExportEvent()"><i class="fa fa-file-excel-o"></i> Export To CSV</button> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
1 | -import { Component, OnInit } from '@angular/core'; | |
1 | +import { Component, OnInit, ViewChild } from '@angular/core'; | |
2 | 2 | import { Router } from '@angular/router'; |
3 | 3 | import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; |
4 | 4 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
... | ... | @@ -16,6 +16,8 @@ import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule, BsDatepickerConfig } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | 18 | import { LoadingService } from '../../shared/loading.service'; |
19 | +import { PagerComponent } from '../../shared/Pager/pager.component'; | |
20 | +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; | |
19 | 21 | declare var $: any; |
20 | 22 | |
21 | 23 | @Component({ |
... | ... | @@ -26,6 +28,7 @@ export class NetAdSubscriptionReport implements OnInit { |
26 | 28 | public lstLicenceType: any; |
27 | 29 | NetAdSubscriptionReportForm: FormGroup; |
28 | 30 | NetAdSubscriptionReports: NetAdSubscriptionReports[]; |
31 | + NetAdSubscriptionReport = new NetAdSubscriptionReports(); | |
29 | 32 | numberOfNetAdSubscriptionReport: number; |
30 | 33 | limit: number; |
31 | 34 | page: number = 1; |
... | ... | @@ -45,8 +48,14 @@ export class NetAdSubscriptionReport implements OnInit { |
45 | 48 | bsConfig: Partial<BsDatepickerConfig>; |
46 | 49 | ExportingStart: boolean; |
47 | 50 | buttonStatus: boolean; |
51 | + @ViewChild(PagerComponent) pagerComponent: PagerComponent; | |
52 | + recordCount: number; | |
53 | + pageNo: number; | |
54 | + pageLength: number; | |
55 | + | |
48 | 56 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, |
49 | - private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
57 | + private modalService: BsModalService, private global: GlobalService, | |
58 | + private _loadingService: LoadingService, private _confirmService: ConfirmService) { } | |
50 | 59 | |
51 | 60 | ngOnInit(): void { |
52 | 61 | this.ExportingStart = false; |
... | ... | @@ -64,63 +73,74 @@ export class NetAdSubscriptionReport implements OnInit { |
64 | 73 | }); |
65 | 74 | |
66 | 75 | this.GetLicenceType(); |
67 | - //this.GetSubscriptionReport(); | |
76 | + | |
68 | 77 | $('#fixed_hdr2').fxdHdrCol({ |
69 | - fixedCols: 0, | |
70 | - width: "100%", | |
71 | - height: 300, | |
72 | - colModal: [ | |
73 | - { width: 180, align: 'center' }, | |
74 | - { width: 230, align: 'center' }, | |
75 | - { width: 150, align: 'Center' }, | |
76 | - { width: 150, align: 'Center' }, | |
77 | - { width: 350, align: 'Center' }, | |
78 | - { width: 500, align: 'Center' }, | |
79 | - { width: 130, align: 'Center' }, | |
80 | - { width: 120, align: 'center' }, | |
81 | - { width: 280, align: 'Center' }, | |
82 | - { width: 180, align: 'center' }, | |
83 | - { width: 200, align: 'center' }, | |
84 | - { width: 170, align: 'center' }, | |
85 | - { width: 80, align: 'center' }, | |
86 | - { width: 150, align: 'center' }, | |
87 | - { width: 150, align: 'center' }, | |
88 | - { width: 180, align: 'Center' }, | |
89 | - //{ width: 400, align: 'Center' }, | |
90 | - //{ width: 150, align: 'center' }, | |
91 | - //{ width: 110, align: 'center' }, | |
92 | - ], | |
93 | - sort: true | |
78 | + fixedCols: 0, | |
79 | + width: "100%", | |
80 | + height: 330, | |
81 | + colModal: [ | |
82 | + { width: 180, align: 'center' }, | |
83 | + { width: 230, align: 'center' }, | |
84 | + { width: 150, align: 'Center' }, | |
85 | + { width: 150, align: 'Center' }, | |
86 | + { width: 350, align: 'Center' }, | |
87 | + { width: 500, align: 'Center' }, | |
88 | + { width: 130, align: 'Center' }, | |
89 | + { width: 120, align: 'center' }, | |
90 | + { width: 280, align: 'Center' }, | |
91 | + { width: 180, align: 'center' }, | |
92 | + { width: 200, align: 'center' }, | |
93 | + { width: 170, align: 'center' }, | |
94 | + { width: 80, align: 'center' }, | |
95 | + { width: 150, align: 'center' }, | |
96 | + { width: 150, align: 'center' }, | |
97 | + { width: 180, align: 'Center' }, | |
98 | + ], | |
99 | + sort: true | |
94 | 100 | }); |
95 | - document.getElementById("fixed_table_rc").remove(); | |
96 | - var testScript = document.createElement("script"); | |
97 | - testScript.setAttribute("id", "fixed_table_rc"); | |
98 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
99 | - testScript.setAttribute("type", "text/javascript"); | |
100 | - document.body.appendChild(testScript); | |
101 | - //this.GetSubscriptionCancellationReport(); | |
101 | + this.pageNo = 1; | |
102 | + this.pageLength = 10; | |
103 | + this.NoRecord = this.global.NoRecords; | |
104 | + this.recordCount = 0; | |
105 | + this.pagerComponent = new PagerComponent(); | |
106 | + | |
107 | + if(document.getElementById("fixed_table_rc") != null){ | |
108 | + document.getElementById("fixed_table_rc").remove(); | |
109 | + var testScript = document.createElement("script"); | |
110 | + testScript.setAttribute("id", "fixed_table_rc"); | |
111 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
112 | + testScript.setAttribute("type", "text/javascript"); | |
113 | + document.body.appendChild(testScript); | |
114 | + } | |
102 | 115 | } |
103 | - | |
104 | - | |
105 | 116 | |
106 | 117 | GetLicenceType() { |
107 | 118 | this.reportservice.GetLicenceType().subscribe(st => { this.lstLicenceType = st; }, error => this.error = <any>error); |
108 | 119 | } |
109 | - GetNetAdSummaryReport(this) { | |
120 | + | |
121 | + GetNetAdSummaryReport(evt: any) { | |
110 | 122 | this._loadingService.ShowLoading("global-loading"); |
111 | - this.NewSubscription = this.NetAdSubscriptionReportForm.value; | |
112 | - var obj = this.NewSubscription; | |
113 | - if (this.ExportingStart) { | |
114 | - this.reportservice.GetNetAdSummaryReport(obj).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.ExportService(NetAdSubscriptionReports); }, error => this.error = <any>error); | |
115 | - } | |
116 | - else { | |
117 | - this.reportservice.GetNetAdSummaryReport(obj).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.BindFormFields(NetAdSubscriptionReports); }, error => this.error = <any>error); | |
118 | - } | |
119 | - | |
123 | + var tempArr = evt.split(','); | |
124 | + this.pageNo = parseInt(tempArr[0]); | |
125 | + this.pageLength = parseInt(tempArr[1]); | |
126 | + this._loadingService.ShowLoading("global-loading"); | |
127 | + this.NetAdSubscriptionReport = this.NetAdSubscriptionReportForm.value; | |
128 | + var obj = this.NetAdSubscriptionReport; | |
129 | + if (this.ExportingStart) { | |
130 | + this.reportservice.GetNetAdSummaryReport(obj, this.pageNo, this.pageLength).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.ExportService(NetAdSubscriptionReports); }, error => this.error = <any>error); | |
131 | + } | |
132 | + else { | |
133 | + this.reportservice.GetNetAdSummaryReport(obj, this.pageNo, this.pageLength).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.BindFormFields(NetAdSubscriptionReports); }, error => this.error = <any>error); | |
134 | + } | |
120 | 135 | } |
136 | + | |
137 | + SearchRecords() { | |
138 | + this.GetNetAdSummaryReport('1, ' + this.pageLength); | |
139 | + } | |
140 | + | |
121 | 141 | BindFormFields(data) { |
122 | - this.lstNetAdSubscriptionReport = data | |
123 | - this.numberOfNetAdSubscriptionReport = this.lstNetAdSubscriptionReport.length; this.limit = this.lstNetAdSubscriptionReport.length; | |
142 | + this.recordCount = data.RecordCount; | |
143 | + this.lstNetAdSubscriptionReport = data.NetAdSubscriptionList; | |
124 | 144 | if (this.lstNetAdSubscriptionReport.length > 0) { |
125 | 145 | this.NoRecord = ''; |
126 | 146 | this.buttonStatus = true; |
... | ... | @@ -132,12 +152,14 @@ export class NetAdSubscriptionReport implements OnInit { |
132 | 152 | this.buttonStatus = false; |
133 | 153 | } |
134 | 154 | } |
155 | + | |
135 | 156 | ExportEvent() { |
136 | 157 | if (this.buttonStatus) { |
137 | 158 | this.ExportingStart = true; |
138 | - this.GetNetAdSummaryReport(); | |
159 | + this.GetNetAdSummaryReport('1, ' + this.recordCount); | |
139 | 160 | } |
140 | 161 | } |
162 | + | |
141 | 163 | ExportService(data: any) { |
142 | 164 | this._loadingService.HideLoading("global-loading"); |
143 | 165 | this.global.ExportToCSV(data, "NetAdSummaryReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/report.service.ts
... | ... | @@ -179,88 +179,96 @@ export class ReportService { |
179 | 179 | } |
180 | 180 | |
181 | 181 | |
182 | - GetNetAdSummaryReport(obj: any) { | |
183 | - if (obj.sFromDate == '') { | |
184 | - obj.sFromDate = '1/1/1'; | |
185 | - } | |
186 | - if (obj.sToDate == '') { | |
187 | - obj.sToDate = '1/1/9999'; | |
188 | - } | |
189 | - obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
190 | - obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
191 | - if (obj.icStartPrice == undefined) | |
192 | - obj.icStartPrice = 0; | |
193 | - if (obj.icEndPrice == undefined) | |
194 | - obj.icEndPrice = 0; | |
182 | + GetNetAdSummaryReport(obj: any, pageNo: number, pageLength: number) { | |
183 | + if (obj.sFromDate == '') { | |
184 | + obj.sFromDate = '1/1/1'; | |
185 | + } | |
186 | + if (obj.sToDate == '') { | |
187 | + obj.sToDate = '1/1/9999'; | |
188 | + } | |
189 | + obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
190 | + obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
191 | + if (obj.icStartPrice == undefined) | |
192 | + obj.icStartPrice = 0; | |
193 | + if (obj.icEndPrice == undefined) | |
194 | + obj.icEndPrice = 0; | |
195 | 195 | |
196 | - return this.http.get(this.commonService.resourceBaseUrl + "Report/GetNetAdSummaryReport?sFromDate=" + obj.sFromDate + | |
197 | - "&sToDate=" + obj.sToDate + | |
198 | - "&iStartPrice=" + obj.icStartPrice + | |
199 | - "&iEndPrice=" + obj.icEndPrice + | |
200 | - "&iLicenseTypeId=" + obj.iLicenseTypeId) | |
201 | - .map(this.extractData) | |
202 | - .catch((res: Response) => this.handleError(res)); | |
196 | + return this.http.get(this.commonService.resourceBaseUrl + "Report/GetNetAdSummaryReport?sFromDate=" + obj.sFromDate + | |
197 | + "&sToDate=" + obj.sToDate + | |
198 | + "&iStartPrice=" + obj.icStartPrice + | |
199 | + "&iEndPrice=" + obj.icEndPrice + | |
200 | + "&iLicenseTypeId=" + obj.iLicenseTypeId + | |
201 | + "&pageNo=" + pageNo + | |
202 | + "&pageLength=" + pageLength) | |
203 | + .map(this.extractData) | |
204 | + .catch((res: Response) => this.handleError(res)); | |
203 | 205 | } |
204 | 206 | |
205 | - | |
206 | - GetSiteLicenseUsageReport(obj: any) { | |
207 | - if (obj.sFromDate == '') { | |
208 | - obj.sFromDate = '1/1/1'; | |
209 | - } | |
210 | - if (obj.sToDate == '') { | |
211 | - obj.sToDate = '1/1/9999'; | |
212 | - } | |
213 | - obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
214 | - obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
215 | - if (obj.sAccountNumber == null) | |
216 | - obj.sAccountNumber = ''; | |
217 | - return this.http.get(this.commonService.resourceBaseUrl + "Report/GetSiteLicenseUsageReport?sFromDate=" + obj.sFromDate + | |
218 | - "&sToDate=" + obj.sToDate + | |
219 | - "&sAccountNumber=" + obj.sAccountNumber + | |
220 | - "&iEdition=" + obj.iEdition) | |
221 | - .map(this.extractData) | |
222 | - .catch((res: Response) => this.handleError(res)); | |
207 | + GetSiteLicenseUsageReport(obj: any, pageNo: number, pageLength: number) { | |
208 | + if (obj.sFromDate == '') { | |
209 | + obj.sFromDate = '1/1/1'; | |
210 | + } | |
211 | + if (obj.sToDate == '') { | |
212 | + obj.sToDate = '1/1/9999'; | |
213 | + } | |
214 | + obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
215 | + obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
216 | + if (obj.sAccountNumber == null) | |
217 | + obj.sAccountNumber = ''; | |
218 | + return this.http.get(this.commonService.resourceBaseUrl + "Report/GetSiteLicenseUsageReport?sFromDate=" + obj.sFromDate + | |
219 | + "&sToDate=" + obj.sToDate + | |
220 | + "&sAccountNumber=" + obj.sAccountNumber + | |
221 | + "&iEdition=" + obj.iEdition + | |
222 | + "&pageNo=" + pageNo + | |
223 | + "&pageLength=" + pageLength) | |
224 | + .map(this.extractData) | |
225 | + .catch((res: Response) => this.handleError(res)); | |
223 | 226 | } |
224 | 227 | |
225 | - GetDiscountReport(obj: any) { | |
226 | - if (obj.sFromDate == '') { | |
227 | - obj.sFromDate = '1/1/1'; | |
228 | - } | |
229 | - if (obj.sToDate == '') { | |
230 | - obj.sToDate = '1/1/9999'; | |
231 | - } | |
232 | - obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
233 | - obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
234 | - if (obj.sAccountNumber == null) | |
235 | - obj.sAccountNumber = ''; | |
236 | - | |
237 | - return this.http.get(this.commonService.resourceBaseUrl + "Report/GetDiscountReport?sFromDate=" + obj.sFromDate + | |
238 | - "&sToDate=" + obj.sToDate + | |
239 | - "&iDiscountCode=" + obj.iDiscountCode + | |
240 | - "&sAccountNumber=" + obj.sAccountNumber) | |
241 | - .map(this.extractData) | |
242 | - .catch((res: Response) => this.handleError(res)); | |
228 | + | |
229 | + GetDiscountReport(obj: any, pageNo: number, pageLength: number) { | |
230 | + if (obj.sFromDate == '') { | |
231 | + obj.sFromDate = '1/1/1'; | |
232 | + } | |
233 | + if (obj.sToDate == '') { | |
234 | + obj.sToDate = '1/1/9999'; | |
235 | + } | |
236 | + obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
237 | + obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
238 | + if (obj.sAccountNumber == null) | |
239 | + obj.sAccountNumber = ''; | |
240 | + | |
241 | + return this.http.get(this.commonService.resourceBaseUrl + "Report/GetDiscountReport?sFromDate=" + obj.sFromDate + | |
242 | + "&sToDate=" + obj.sToDate + | |
243 | + "&iDiscountCode=" + obj.iDiscountCode + | |
244 | + "&sAccountNumber=" + obj.sAccountNumber + | |
245 | + "&pageNo=" + pageNo + | |
246 | + "&pageLength=" + pageLength) | |
247 | + .map(this.extractData) | |
248 | + .catch((res: Response) => this.handleError(res)); | |
243 | 249 | } |
244 | 250 | |
245 | 251 | |
246 | - GetImageExportReport(obj: any) { | |
247 | - if (obj.sFromDate == '') { | |
248 | - obj.sFromDate = '1/1/1'; | |
249 | - } | |
250 | - if (obj.sToDate == '') { | |
251 | - obj.sToDate = '1/1/9999'; | |
252 | - } | |
253 | - obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
254 | - obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
255 | - | |
256 | - if (obj.sAccountNumber == null) | |
257 | - obj.sAccountNumber = ''; | |
258 | - | |
259 | - return this.http.get(this.commonService.resourceBaseUrl + "Report/GetImageExportReport?sFromDate=" + obj.sFromDate + | |
260 | - "&sToDate=" + obj.sToDate + | |
261 | - "&sAccountNumber=" + obj.sAccountNumber) | |
262 | - .map(this.extractData) | |
263 | - .catch((res: Response) => this.handleError(res)); | |
252 | + GetImageExportReport(obj: any, pageNo: number, pageLength: number) { | |
253 | + if (obj.sFromDate == '') { | |
254 | + obj.sFromDate = '1/1/1'; | |
255 | + } | |
256 | + if (obj.sToDate == '') { | |
257 | + obj.sToDate = '1/1/9999'; | |
258 | + } | |
259 | + obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | |
260 | + obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | |
261 | + | |
262 | + if (obj.sAccountNumber == null) | |
263 | + obj.sAccountNumber = ''; | |
264 | + | |
265 | + return this.http.get(this.commonService.resourceBaseUrl + "Report/GetImageExportReport?sFromDate=" + obj.sFromDate + | |
266 | + "&sToDate=" + obj.sToDate + | |
267 | + "&sAccountNumber=" + obj.sAccountNumber + | |
268 | + "&pageNo=" + pageNo + | |
269 | + "&pageLength=" + pageLength) | |
270 | + .map(this.extractData) | |
271 | + .catch((res: Response) => this.handleError(res)); | |
264 | 272 | } |
265 | 273 | |
266 | 274 | extractData(res: Response) { | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.html
... | ... | @@ -84,7 +84,7 @@ |
84 | 84 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> |
85 | 85 | </div> |
86 | 86 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
87 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="GetSiteLicenseUsageReport(this)"><i class="fa fa-file"></i> Generate Report</button> | |
87 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | |
88 | 88 | <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> |
89 | 89 | <div class="modal-dialog modal-sm" role="document"> |
90 | 90 | <div class="modal-content"> |
... | ... | @@ -140,6 +140,7 @@ |
140 | 140 | </tr> |
141 | 141 | </tbody> |
142 | 142 | </table> |
143 | + <admin-pager [recordCount]="recordCount" [pageNo]="pageNo" [pageLength]="pageLength" (pagerEvent)="GetSiteLicenseUsageReport($event)"></admin-pager> | |
143 | 144 | <div class="row"> |
144 | 145 | <div class="col-sm-12 marginTop20 text-center"> |
145 | 146 | <button type="button" class="btn btn-primary btn-sm" [ngClass]="{disabled : !buttonStatus}" (click)="ExportEvent()"><i class="fa fa-file-excel-o"></i> Export To CSV</button> | ... | ... |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
1 | -import { Component, OnInit } from '@angular/core'; | |
1 | +import { Component, OnInit, ViewChild } from '@angular/core'; | |
2 | 2 | import { Router } from '@angular/router'; |
3 | 3 | import { FormBuilder, FormGroup, Validators, FormControl } from '@angular/forms'; |
4 | 4 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; |
... | ... | @@ -16,6 +16,8 @@ import { DatePipe } from '@angular/common'; |
16 | 16 | import { BsDatepickerModule, BsDatepickerConfig } from 'ngx-bootstrap'; |
17 | 17 | import { Http, Response } from '@angular/http'; |
18 | 18 | import { LoadingService } from '../../shared/loading.service'; |
19 | +import { PagerComponent } from '../../shared/Pager/pager.component'; | |
20 | +import { ConfirmService } from '../../Shared/Confirm/confirm.service'; | |
19 | 21 | declare var $: any; |
20 | 22 | |
21 | 23 | @Component({ |
... | ... | @@ -26,6 +28,7 @@ export class SiteLicenseUsageReport implements OnInit { |
26 | 28 | public lstEdition: any; |
27 | 29 | SiteLicenseUsageReportForm: FormGroup; |
28 | 30 | SiteLicenseUsageReports: SiteLicenseUsageReports[]; |
31 | + SiteLicenseUsageReport = new SiteLicenseUsageReports(); | |
29 | 32 | numberOfSiteLicenseUsageReport: number; |
30 | 33 | limit: number; |
31 | 34 | page: number = 1; |
... | ... | @@ -45,8 +48,14 @@ export class SiteLicenseUsageReport implements OnInit { |
45 | 48 | bsConfig: Partial<BsDatepickerConfig>; |
46 | 49 | ExportingStart: boolean; |
47 | 50 | buttonStatus: boolean; |
51 | + @ViewChild(PagerComponent) pagerComponent: PagerComponent; | |
52 | + recordCount: number; | |
53 | + pageNo: number; | |
54 | + pageLength: number; | |
55 | + | |
48 | 56 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, |
49 | - private modalService: BsModalService, private global: GlobalService, private _loadingService: LoadingService) { } | |
57 | + private modalService: BsModalService, private global: GlobalService, | |
58 | + private _loadingService: LoadingService, private _confirmService: ConfirmService) { } | |
50 | 59 | |
51 | 60 | ngOnInit(): void { |
52 | 61 | this.ExportingStart = false; |
... | ... | @@ -63,65 +72,70 @@ export class SiteLicenseUsageReport implements OnInit { |
63 | 72 | }); |
64 | 73 | |
65 | 74 | this.GetEdition(); |
66 | - //this.GetSubscriptionReport(); | |
75 | + | |
67 | 76 | $('#fixed_hdr2').fxdHdrCol({ |
68 | - fixedCols: 0, | |
69 | - width: "100%", | |
70 | - height: 300, | |
71 | - colModal: [ | |
72 | - { width: 180, align: 'center' }, | |
73 | - { width: 230, align: 'center' }, | |
74 | - { width: 150, align: 'Center' }, | |
75 | - { width: 150, align: 'Center' }, | |
76 | - { width: 350, align: 'Center' }, | |
77 | - { width: 500, align: 'Center' }, | |
78 | - { width: 130, align: 'Center' }, | |
79 | - { width: 120, align: 'center' }, | |
80 | - { width: 280, align: 'Center' }, | |
81 | - { width: 180, align: 'center' }, | |
82 | - { width: 200, align: 'center' }, | |
83 | - { width: 170, align: 'center' }, | |
84 | - { width: 80, align: 'center' }, | |
85 | - { width: 150, align: 'center' }, | |
86 | - { width: 150, align: 'center' }, | |
87 | - { width: 180, align: 'Center' }, | |
88 | - //{ width: 400, align: 'Center' }, | |
89 | - //{ width: 150, align: 'center' }, | |
90 | - //{ width: 110, align: 'center' }, | |
91 | - ], | |
92 | - sort: true | |
77 | + fixedCols: 0, | |
78 | + width: "100%", | |
79 | + height: 330, | |
80 | + colModal: [ | |
81 | + { width: 180, align: 'center' }, | |
82 | + { width: 230, align: 'center' }, | |
83 | + { width: 150, align: 'Center' }, | |
84 | + { width: 150, align: 'Center' }, | |
85 | + { width: 350, align: 'Center' }, | |
86 | + { width: 500, align: 'Center' }, | |
87 | + { width: 130, align: 'Center' }, | |
88 | + { width: 120, align: 'center' }, | |
89 | + { width: 280, align: 'Center' }, | |
90 | + { width: 180, align: 'center' }, | |
91 | + { width: 200, align: 'center' }, | |
92 | + { width: 170, align: 'center' }, | |
93 | + { width: 80, align: 'center' }, | |
94 | + { width: 150, align: 'center' }, | |
95 | + { width: 150, align: 'center' }, | |
96 | + { width: 180, align: 'Center' }, | |
97 | + ], | |
98 | + sort: true | |
93 | 99 | }); |
94 | - document.getElementById("fixed_table_rc").remove(); | |
95 | - var testScript = document.createElement("script"); | |
96 | - testScript.setAttribute("id", "fixed_table_rc"); | |
97 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
98 | - testScript.setAttribute("type", "text/javascript"); | |
99 | - document.body.appendChild(testScript); | |
100 | - //this.GetSubscriptionCancellationReport(); | |
100 | + this.pageNo = 1; | |
101 | + this.pageLength = 10; | |
102 | + this.NoRecord = this.global.NoRecords; | |
103 | + this.recordCount = 0; | |
104 | + this.pagerComponent = new PagerComponent(); | |
105 | + | |
106 | + if(document.getElementById("fixed_table_rc") != null){ | |
107 | + document.getElementById("fixed_table_rc").remove(); | |
108 | + var testScript = document.createElement("script"); | |
109 | + testScript.setAttribute("id", "fixed_table_rc"); | |
110 | + testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | |
111 | + testScript.setAttribute("type", "text/javascript"); | |
112 | + document.body.appendChild(testScript); | |
113 | + } | |
101 | 114 | } |
102 | 115 | |
103 | - | |
104 | - | |
105 | 116 | GetEdition() { |
106 | 117 | this.reportservice.GetEdition().subscribe(st => { this.lstEdition = st; }, error => this.error = <any>error); |
107 | 118 | } |
108 | 119 | |
109 | - | |
110 | - GetSiteLicenseUsageReport(this) { | |
120 | + GetSiteLicenseUsageReport(evt: any) { | |
111 | 121 | this._loadingService.ShowLoading("global-loading"); |
112 | - this.NewSubscription = this.SiteLicenseUsageReportForm.value; | |
113 | - var obj = this.NewSubscription; | |
114 | - if (this.ExportingStart) { | |
115 | - | |
116 | - this.reportservice.GetSiteLicenseUsageReport(obj).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error); | |
117 | - } | |
118 | - else { | |
119 | - this.reportservice.GetSiteLicenseUsageReport(obj).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error); | |
120 | - } | |
121 | - | |
122 | + var tempArr = evt.split(','); | |
123 | + this.pageNo = parseInt(tempArr[0]); | |
124 | + this.pageLength = parseInt(tempArr[1]); | |
125 | + this._loadingService.ShowLoading("global-loading"); | |
126 | + this.SiteLicenseUsageReport = this.SiteLicenseUsageReportForm.value; | |
127 | + var obj = this.SiteLicenseUsageReport; | |
128 | + if (this.ExportingStart) { | |
129 | + this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error); | |
130 | + } | |
131 | + else { | |
132 | + this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error); | |
133 | + } | |
122 | 134 | } |
135 | + | |
123 | 136 | BindFormFields(data) { |
124 | - this.lstSiteLicenseUsageReport = data | |
137 | + this.recordCount = data.RecordCount; | |
138 | + this.lstSiteLicenseUsageReport = data.SiteLicenseUsageList; | |
125 | 139 | this.numberOfSiteLicenseUsageReport = this.lstSiteLicenseUsageReport.length; this.limit = this.lstSiteLicenseUsageReport.length; |
126 | 140 | if (this.lstSiteLicenseUsageReport.length > 0) { |
127 | 141 | this.NoRecord = ''; |
... | ... | @@ -134,10 +148,15 @@ export class SiteLicenseUsageReport implements OnInit { |
134 | 148 | this.buttonStatus = false; |
135 | 149 | } |
136 | 150 | } |
151 | + | |
152 | + SearchRecords() { | |
153 | + this.GetSiteLicenseUsageReport('1, ' + this.pageLength); | |
154 | + } | |
155 | + | |
137 | 156 | ExportEvent() { |
138 | 157 | if (this.buttonStatus) { |
139 | 158 | this.ExportingStart = true; |
140 | - this.GetSiteLicenseUsageReport(); | |
159 | + this.GetSiteLicenseUsageReport('1, ' + this.pageLength); | |
141 | 160 | } |
142 | 161 | } |
143 | 162 | ExportService(data: any) { | ... | ... |
400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts
... | ... | @@ -15,7 +15,7 @@ export class SubscriptionPriceService { |
15 | 15 | |
16 | 16 | |
17 | 17 | GetSubscriptionPrices(obj: any) { |
18 | - return this.http.get(this.commonService.resourceBaseUrl + "/SubscriptionPrice/GetSubscriptionPrices?editionId=" | |
18 | + return this.http.get(this.commonService.resourceBaseUrl + "SubscriptionPrice/GetSubscriptionPrices?editionId=" | |
19 | 19 | + obj.editionId + "&pageNo=" + obj.pageNo + "&pageLength=" + obj.pageLength) |
20 | 20 | .map(this.extractData) |
21 | 21 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -28,7 +28,7 @@ export class SubscriptionPriceService { |
28 | 28 | var headers = new Headers({ |
29 | 29 | 'Content-Type': 'application/json' |
30 | 30 | }); |
31 | - return this.http.post(this.commonService.resourceBaseUrl + "/SubscriptionPrice/InsertSubscriptionPrice", | |
31 | + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/InsertSubscriptionPrice", | |
32 | 32 | JSON.stringify(jsonData), {headers: headers}) |
33 | 33 | .map(this.extractData) |
34 | 34 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -41,7 +41,7 @@ export class SubscriptionPriceService { |
41 | 41 | var headers = new Headers({ |
42 | 42 | 'Content-Type': 'application/json' |
43 | 43 | }); |
44 | - return this.http.post(this.commonService.resourceBaseUrl + "/SubscriptionPrice/UpdateSubscriptionPrices", | |
44 | + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/UpdateSubscriptionPrices", | |
45 | 45 | JSON.stringify(jsonData), {headers: headers}) |
46 | 46 | .map(this.extractData) |
47 | 47 | .catch((res: Response) => this.handleError(res)); |
... | ... | @@ -54,7 +54,7 @@ export class SubscriptionPriceService { |
54 | 54 | var headers = new Headers({ |
55 | 55 | 'Content-Type': 'application/json' |
56 | 56 | }); |
57 | - return this.http.post(this.commonService.resourceBaseUrl + "/SubscriptionPrice/DeleteSubscriptionPrices", | |
57 | + return this.http.post(this.commonService.resourceBaseUrl + "SubscriptionPrice/DeleteSubscriptionPrices", | |
58 | 58 | subscriptionPriceIds, {headers: headers}) |
59 | 59 | .map(this.extractData) |
60 | 60 | .catch((res: Response) => this.handleError(res)); | ... | ... |
400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts
... | ... | @@ -45,7 +45,7 @@ export class AddUser implements OnInit { |
45 | 45 | //this.userservice.GetUserById(this.UserId); |
46 | 46 | this.adduserFrm = this.fb.group({ |
47 | 47 | id: [''], |
48 | - UserName: ['', Validators.required, Validators.minLength(8)], | |
48 | + UserName: ['', [Validators.required, Validators.minLength(8)]], | |
49 | 49 | Password: ['', [Validators.required, Validators.minLength(8)]], |
50 | 50 | ConfirmPassword: ['', Validators.required], |
51 | 51 | FirstName: ['', Validators.required], | ... | ... |
500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql
500-DBDump/AIA-StoredProcedures/usp_GetProductEditionByLicense.sql
0 → 100644
1 | + | |
2 | +CREATE PROCEDURE [dbo].[usp_GetProductEditionByLicense] | |
3 | + -- Add the parameters for the stored procedure here | |
4 | + @iLicenseId int | |
5 | +AS | |
6 | +BEGIN | |
7 | + -- SET NOCOUNT ON added to prevent extra result sets from | |
8 | + -- interfering with SELECT statements. | |
9 | + SET NOCOUNT ON; | |
10 | + SELECT Edition.Id, Edition.Title, Edition.IsActive, Edition.Priority | |
11 | + FROM Edition | |
12 | + INNER JOIN LicenseToEdition ON Edition.Id = LicenseToEdition.EditionId | |
13 | + WHERE LicenseToEdition.LicenseId =@iLicenseId | |
14 | +END | |
15 | + | |
16 | + | ... | ... |