Commit decfb7088e485d90f662bd8fd25187be20604a72
1 parent
d55b3b1c
on QA merge this code came
Showing
12 changed files
with
280 additions
and
199 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.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/AIAHTML5.API/AIAHTML5.API.csproj
... | ... | @@ -120,6 +120,7 @@ |
120 | 120 | <Compile Include="Constants\ErrorHelper.cs" /> |
121 | 121 | <Compile Include="Controllers\AdminAccessController.cs" /> |
122 | 122 | <Compile Include="Controllers\AuthenticateController.cs" /> |
123 | + <Compile Include="Controllers\ConfigurationController.cs" /> | |
123 | 124 | <Compile Include="Controllers\ForgotUserController.cs" /> |
124 | 125 | <Compile Include="Controllers\LabExerciseController.cs" /> |
125 | 126 | <Compile Include="Controllers\LicenseTermConditionController.cs" /> | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/services/AuthenticationService.js
... | ... | @@ -117,7 +117,8 @@ |
117 | 117 | url: 'API/api/Configuration/GetConfigurationvalues' |
118 | 118 | }).success(function (data, status, headers, config) |
119 | 119 | { |
120 | - console.log('success' + data); | |
120 | + console.log('success' + data); | |
121 | + | |
121 | 122 | deferred.resolve(data); |
122 | 123 | }).error(function (data, status, headers, config) |
123 | 124 | { | ... | ... |
400-SOURCECODE/AIAHTML5.Web/app/widget/MainMenu.html
... | ... | @@ -26,7 +26,7 @@ |
26 | 26 | <div class="sidebar pull-left mCustomScrollbar _mCS_1 mCS-autoHide "> |
27 | 27 | <!--{{name}}--> |
28 | 28 | <ul class="nav nav-sidebar" ng-init="hideScrollbar()"> |
29 | - <li ng-repeat="module in userModules" ng-disabled="module.id==8 || module.id==13"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible();getModuleScrollPosition()" data-ng-bind="module.name" ng-class="HightLightModuleSelection('{{module.slug}}')" ng-disabled="module.id==8 || module.id==13"><!--{{module.name}}--></a></li> | |
29 | + <li ng-repeat="module in userModules" ng-disabled="module.id==7 || module.id==8 || module.id==13"><a id="{{module.slug}}" href="{{module.slug}}" ng-click="IsVisible();getModuleScrollPosition()" data-ng-bind="module.name" ng-class="HightLightModuleSelection('{{module.slug}}')" ng-disabled="module.id==7 ||module.id==8 || module.id==13"><!--{{module.name}}--></a></li> | |
30 | 30 | </ul> |
31 | 31 | </div> |
32 | 32 | ... | ... |
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], | ... | ... |