Commit d55b3b1cb2b50277a34288b8323826ed5d4b7fff
1 parent
e49ead4a
few changes came after QA pull
Showing
9 changed files
with
164 additions
and
83 deletions
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/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()) | ... | ... |