From b12907f7c452b5680574c565b3d103d1150c1367 Mon Sep 17 00:00:00 2001 From: gagan.deep Date: Fri, 11 May 2018 13:14:11 +0530 Subject: [PATCH] Pager Done --- 400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs | 33 +++++++++++++++++++-------------- 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs | 48 ++++++++++++++++++++++++++++++++++++++++-------- 400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx | 24 ++++++++++++++++++++++++ 400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts | 4 ++-- 400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts | 44 ++++++++++++++++++++++---------------------- 400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts | 4 ++-- 400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts | 2 +- 400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html | 3 ++- 400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts | 66 +++++++++++++++++++++++++++++++++++++++++++++--------------------- 400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.html | 5 +++-- 400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts | 71 +++++++++++++++++++++++++++++++++++++++++++++++------------------------ 400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html | 4 ++-- 400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts | 122 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------- 400-SOURCECODE/Admin/src/app/components/Reports/report.service.ts | 156 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------- 400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.html | 3 ++- 400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts | 121 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------- 400-SOURCECODE/Admin/src/app/components/SubscriptionPrice/subscriptionprice.service.ts | 8 ++++---- 400-SOURCECODE/Admin/src/app/components/UserEntity/adduser.component.ts | 2 +- 500-DBDump/AIA-StoredProcedures/dbo.GetDiscountReport.StoredProcedure.sql | Bin 6246 -> 0 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetExportedImageDetails.StoredProcedure.sql | Bin 3670 -> 0 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetNetAdSummaryReport.StoredProcedure.sql | Bin 14758 -> 0 bytes 500-DBDump/AIA-StoredProcedures/dbo.GetSiteLicenseUsageReport.StoredProcedure.sql | Bin 4460 -> 0 bytes 500-DBDump/AIA-StoredProcedures/usp_GetProductEditionByLicense.sql | 16 ++++++++++++++++ 23 files changed, 456 insertions(+), 280 deletions(-) create mode 100644 500-DBDump/AIA-StoredProcedures/usp_GetProductEditionByLicense.sql diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs index 600ef6a..3bbd90e 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs @@ -71,12 +71,13 @@ namespace AIAHTML5.ADMIN.API.Controllers [Route("GetNetAdSummaryReport")] [HttpGet] - public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId) + public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int pageNo, int pageLength) { try { - var lstNetAdSummaryReport = dbContext.GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId).ToList(); - return Ok(lstNetAdSummaryReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstNetAdSummaryReport = dbContext.GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { NetAdSubscriptionList = lstNetAdSummaryReport, RecordCount = spRecordCount.Value }); } catch (Exception ex) { @@ -84,14 +85,16 @@ namespace AIAHTML5.ADMIN.API.Controllers } } + [Route("GetSiteLicenseUsageReport")] [HttpGet] - public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition) + public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int pageNo, int pageLength) { try { - var lstSiteLicenseUsageReport = dbContext.GetSiteLicenseUsageReport(sFromDate, sToDate, sAccountNumber, (byte)iEdition).ToList(); - return Ok(lstSiteLicenseUsageReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstSiteLicenseUsageReport = dbContext.GetSiteLicenseUsageReport(sFromDate, sToDate, sAccountNumber, (byte)iEdition, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { SiteLicenseUsageList = lstSiteLicenseUsageReport, RecordCount = spRecordCount.Value }); } catch (Exception ex) { @@ -101,12 +104,13 @@ namespace AIAHTML5.ADMIN.API.Controllers [Route("GetDiscountReport")] [HttpGet] - public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber) + public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber, int pageNo, int pageLength) { try { - var lstDiscountReport = dbContext.GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber).ToList(); - return Ok(lstDiscountReport); + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstDiscountReport = dbContext.GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { DiscountReportList = lstDiscountReport, RecordCount = spRecordCount.Value }); } catch (Exception ex) { @@ -114,16 +118,17 @@ namespace AIAHTML5.ADMIN.API.Controllers } } + [Route("GetImageExportReport")] [HttpGet] - public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber) + public IHttpActionResult GetImageExportReport(string sFromDate, string sToDate, string sAccountNumber, int pageNo, int pageLength) { try { - if (sAccountNumber == null) - sAccountNumber = string.Empty; - var lstImageExportReport = dbContext.GetExportedImageDetails(sFromDate, sToDate, sAccountNumber).ToList(); - return Ok(lstImageExportReport); + if (sAccountNumber == null) sAccountNumber = string.Empty; + var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); + var lstImageExportReport = dbContext.GetExportedImageDetails(sFromDate, sToDate, sAccountNumber, pageNo, pageLength, spRecordCount).ToList(); + return Ok(new { ImageExportList = lstImageExportReport, RecordCount = spRecordCount.Value }); } catch (Exception ex) { diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs index 406ecce..9c8d42d 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs @@ -1113,7 +1113,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDiscountedPrice", inDiscountCodeParameter, outReturnCode, outDiscountPercentage, outDiscountCodeId); } - public virtual ObjectResult GetDiscountReport(string sStartDate, string sEndDate, Nullable intDiscountID, string sAccoutNumber) + public virtual ObjectResult GetDiscountReport(string sStartDate, string sEndDate, Nullable intDiscountID, string sAccoutNumber, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sStartDateParameter = sStartDate != null ? new ObjectParameter("sStartDate", sStartDate) : @@ -1131,7 +1131,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("sAccoutNumber", sAccoutNumber) : new ObjectParameter("sAccoutNumber", typeof(string)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult getEditionData() @@ -1214,7 +1222,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); } - public virtual ObjectResult GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber) + public virtual ObjectResult GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sStartDateParameter = sStartDate != null ? new ObjectParameter("sStartDate", sStartDate) : @@ -1228,7 +1236,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("sAccoutNumber", sAccoutNumber) : new ObjectParameter("sAccoutNumber", typeof(string)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetExportedImageDetails", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetExportedImageDetails", sStartDateParameter, sEndDateParameter, sAccoutNumberParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual int GetImagePinData() @@ -1441,7 +1457,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetNetAdDetailReport", sFromDateParameter, sToDateParameter, sLicenseTypeParameter, sAccountTypeParameter, iStartPriceParameter, iEndPriceParameter); } - public virtual ObjectResult GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId) + public virtual ObjectResult GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1463,7 +1479,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : new ObjectParameter("iLicenseTypeId", typeof(byte)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetProductFeatures(Nullable editionId) @@ -1557,7 +1581,7 @@ namespace AIAHTML5.ADMIN.API.Entity return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSiteIpByAccountNumber", accountNumnerParameter); } - public virtual ObjectResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccoutNumber, Nullable iEditionId) + public virtual ObjectResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccoutNumber, Nullable iEditionId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) { var sFromDateParameter = sFromDate != null ? new ObjectParameter("sFromDate", sFromDate) : @@ -1575,7 +1599,15 @@ namespace AIAHTML5.ADMIN.API.Entity new ObjectParameter("iEditionId", iEditionId) : new ObjectParameter("iEditionId", typeof(byte)); - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter); + var pageNoParameter = pageNo.HasValue ? + new ObjectParameter("pageNo", pageNo) : + new ObjectParameter("pageNo", typeof(int)); + + var pageLengthParameter = pageLength.HasValue ? + new ObjectParameter("pageLength", pageLength) : + new ObjectParameter("pageLength", typeof(int)); + + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction("GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); } public virtual ObjectResult GetSubscribedLicenses(string sFromDate, string sToDate, Nullable iStartPrice, Nullable iEndPrice, Nullable iLicenseTypeId, Nullable iAccountTypeId, string sZip, Nullable iStateId, Nullable iCountryId, Nullable pageNo, Nullable pageLength, ObjectParameter recordCount) diff --git a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx index 5db5b5e..73902a4 100644 --- a/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx +++ b/400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx @@ -2122,6 +2122,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2150,6 +2153,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2219,6 +2225,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -2267,6 +2276,9 @@ warning 6002: The table/view 'AIADatabaseV5.dbo.VocabTermNumberToSystemMap' does + + + @@ -5809,6 +5821,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5837,6 +5852,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5909,6 +5927,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + @@ -5945,6 +5966,9 @@ FROM [dbo].[VocabTermNumberToSystemMap] AS [VocabTermNumberToSystemMap] + + + diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts index d6eeb78..0243fe8 100644 --- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/editlicensebasicsettings.component.ts @@ -142,10 +142,10 @@ export class EditLicenseBasicSettings implements OnInit { AfterUpdateData(data, template) { if (data.Status == "false") { - this.alerts = "License update unsuccessfull."; + this.alerts = "License profile update unsuccessfull."; } else { //this.modalAlerts = "

License updated successfully

"; - this._confirmService.activate("License updated successfully.", "alertMsg"); + this._confirmService.activate("License profile updated successfully.", "alertMsg"); // this.modalRef = this.modalService.show(template); } } diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts index 9eb3b3e..020c9fb 100644 --- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts +++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/license.service.ts @@ -25,7 +25,7 @@ export class LicenseService{ } obj.subscriptionStartDate = this.datePipe.transform(obj.subscriptionStartDate, 'MM/dd/yyyy'); obj.subscriptionEndDate = this.datePipe.transform(obj.subscriptionEndDate, 'MM/dd/yyyy'); - return this.http.get(this.commonService.resourceBaseUrl + "/License/Licenses?accountNumber=" + obj.accountNumber + + return this.http.get(this.commonService.resourceBaseUrl + "License/Licenses?accountNumber=" + obj.accountNumber + "&licenseeFirstName=" + obj.licenseeFirstName + "&licenseeLastName=" + obj.licenseeLastName + "&licenseTypeId=" + obj.licenseTypeId + "&institutionName=" + obj.institutionName + "&stateId=" + obj.stateId + "&countryId=" + obj.countryId + "&emailId=" + obj.emailId + @@ -36,81 +36,81 @@ export class LicenseService{ } GetLicenseById(Id: number){ - return this.http.get(this.commonService.resourceBaseUrl + "/License/GetLicense?LicenseId=" + Id) + return this.http.get(this.commonService.resourceBaseUrl + "License/GetLicense?LicenseId=" + Id) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetLicenceType() { - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseTypes") + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseTypes") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetAccountType() { - return this.http.get(this.commonService.resourceBaseUrl + "/Account/AccountTypes") + return this.http.get(this.commonService.resourceBaseUrl + "Account/AccountTypes") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetCountry() { - return this.http.get(this.commonService.resourceBaseUrl + "/Common/Countries") + return this.http.get(this.commonService.resourceBaseUrl + "Common/Countries") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetState() { - return this.http.get(this.commonService.resourceBaseUrl + "/Common/States") + return this.http.get(this.commonService.resourceBaseUrl + "Common/States") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetSecurityQuestions() { - return this.http.get(this.commonService.resourceBaseUrl + "/Common/SecurityQuestions") + return this.http.get(this.commonService.resourceBaseUrl + "Common/SecurityQuestions") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetEditions() { - return this.http.get(this.commonService.resourceBaseUrl + "/Edition/Editions") + return this.http.get(this.commonService.resourceBaseUrl + "Edition/Editions") .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetLicenseAccounts(licenseType: Number) { - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseAccounts?LicenseType=" + licenseType) + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseAccounts?LicenseType=" + licenseType) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetSiteById(siteId: number) { - return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteDetail?SiteId=" + siteId) + return this.http.get(this.commonService.resourceBaseUrl + "Site/SiteDetail?SiteId=" + siteId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetSiteAccountEditions(siteId: number, licenseId: number) { - return this.http.get(this.commonService.resourceBaseUrl + "/Site/SiteAccountEditions?SiteId=" + siteId + "&LicenseId=" + licenseId) + return this.http.get(this.commonService.resourceBaseUrl + "Site/SiteAccountEditions?SiteId=" + siteId + "&LicenseId=" + licenseId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetLicenseSites(accountNo: string, pageNo: number, pageLength: number) { - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseSites?AccountNo=" + accountNo + "&pageNo=" + pageNo + "&pageLength=" + pageLength) + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseSites?AccountNo=" + accountNo + "&pageNo=" + pageNo + "&pageLength=" + pageLength) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetLicenseModestySettings(licenseId: number, buildingLevelId: number) { - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModestySettings?LicenseId=" + licenseId + "&BuildingLevelId=" + buildingLevelId) + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseModestySettings?LicenseId=" + licenseId + "&BuildingLevelId=" + buildingLevelId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } GetLicenseModulesStatus(licenseId: number) { - return this.http.get(this.commonService.resourceBaseUrl + "/License/LicenseModulesStatus?LicenseId=" + licenseId) + return this.http.get(this.commonService.resourceBaseUrl + "License/LicenseModulesStatus?LicenseId=" + licenseId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } @@ -154,7 +154,7 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/License/InsertLicense", + return this.http.post(this.commonService.resourceBaseUrl + "License/InsertLicense", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); @@ -204,7 +204,7 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicense", + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicense", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); @@ -230,7 +230,7 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseBasicSettings", + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseBasicSettings", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); @@ -252,7 +252,7 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModestySettings", + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseModestySettings", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); @@ -274,14 +274,14 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/License/UpdateLicenseModulesStatus", + return this.http.post(this.commonService.resourceBaseUrl + "License/UpdateLicenseModulesStatus", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } DeleteLicense(obj: any) { - return this.http.get(this.commonService.resourceBaseUrl + "/License/DeleteLicense?LicenseId=" + obj.LicenseId) + return this.http.get(this.commonService.resourceBaseUrl + "License/DeleteLicense?LicenseId=" + obj.LicenseId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } @@ -330,14 +330,14 @@ export class LicenseService{ var headers = new Headers({ 'Content-Type': 'application/json' }); - return this.http.post(this.commonService.resourceBaseUrl + "/Site/InsertUpdateSiteAccount", + return this.http.post(this.commonService.resourceBaseUrl + "Site/InsertUpdateSiteAccount", JSON.stringify(jsonData), {headers: headers}) .map(this.extractData) .catch((res: Response) => this.handleError(res)); } DeleteSiteAccount(obj: any) { - return this.http.get(this.commonService.resourceBaseUrl + "/Site/DeleteSiteAccount?SiteId=" + + return this.http.get(this.commonService.resourceBaseUrl + "Site/DeleteSiteAccount?SiteId=" + obj.Id + "&LicenseId=" + obj.LicenseId + "&UserId=" + obj.SiteUserId) .map(this.extractData) .catch((res: Response) => this.handleError(res)); diff --git a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts index 98c7ed7..71d3284 100644 --- a/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts +++ b/400-SOURCECODE/Admin/src/app/components/LicenseEntity/licensemodestysettings.component.ts @@ -64,9 +64,9 @@ export class LicenseModestySettings implements OnInit { this.GetLicenseEditionModesty(); } else{ - this.licenseService.GetLicenseSites(this.license.AccountNumber,1,1) + this.licenseService.GetLicenseSites(this.license.AccountNumber, 1, 1) .subscribe(st => { - this.lstLicenseSites = st; + this.lstLicenseSites = st.LicenseSiteList; if(this.lstLicenseSites.length == 0){ this.modalMessage = 'Account is not a building level account.'; this.openModal(template); diff --git a/400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts b/400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts index 33dad52..32178ad 100644 --- a/400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts +++ b/400-SOURCECODE/Admin/src/app/components/ManageDiscountCode/managediscountcode.service.ts @@ -11,7 +11,7 @@ import { GlobalService } from '../../Shared/global'; @Injectable() export class ManageDiscountCodeService { - constructor(private http: Http, private commonService: GlobalService ) { } + constructor(private http: Http, private commonService:GlobalService ) { } GetDiscountCodes(obj: any) { if (obj.startDate == '' || obj.startDate == null) { diff --git a/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html b/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html index c0a8e22..9780d41 100644 --- a/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html +++ b/400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html @@ -84,7 +84,7 @@
- +