Commit 73c49a1e8b185f7237a5625fee383b12b1ce54e4
1 parent
a7a8cc8b
all reporting changes done
Showing
23 changed files
with
1143 additions
and
682 deletions
400-SOURCECODE/AIAHTML5.ADMIN.API/Controllers/ReportController.cs
@@ -44,39 +44,39 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -44,39 +44,39 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
44 | 44 | ||
45 | [Route("GetExpiringSubscriptionReport")] | 45 | [Route("GetExpiringSubscriptionReport")] |
46 | [HttpGet] | 46 | [HttpGet] |
47 | - public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | 47 | + public IHttpActionResult GetExpiringSubscriptionReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, string sortColumn, string sortOrder, int pageNo, int pageLength) |
48 | { | 48 | { |
49 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 49 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
50 | - var lstExpiringSubscriptionReport = dbContext.usp_GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | 50 | + var lstExpiringSubscriptionReport = dbContext.usp_GetExpiringLicenses(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
51 | return Ok(new { ExpiringSubscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | 51 | return Ok(new { ExpiringSubscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); |
52 | 52 | ||
53 | } | 53 | } |
54 | 54 | ||
55 | [Route("GetSubscriptionReport")] | 55 | [Route("GetSubscriptionReport")] |
56 | [HttpGet] | 56 | [HttpGet] |
57 | - public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | 57 | + public IHttpActionResult GetSubscriptionReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, string sortColumn, string sortOrder, int pageNo, int pageLength) |
58 | { | 58 | { |
59 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 59 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
60 | - var lstExpiringSubscriptionReport = dbContext.usp_GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | 60 | + var lstExpiringSubscriptionReport = dbContext.usp_GetSubscribedLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
61 | return Ok(new { Subscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | 61 | return Ok(new { Subscription = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); |
62 | } | 62 | } |
63 | [Route("GetSubscriptionCancellationReport")] | 63 | [Route("GetSubscriptionCancellationReport")] |
64 | [HttpGet] | 64 | [HttpGet] |
65 | - public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, int pageNo, int pageLength) | 65 | + public IHttpActionResult GetSubscriptionCancellationReport(string sFromDate, string sToDate, decimal icStartPrice, decimal icEndPrice, int iLicenseTypeId, int iAccountTypeId, string sZip, int iStateId, int iCountryId, string sortColumn, string sortOrder, int pageNo, int pageLength) |
66 | { | 66 | { |
67 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 67 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
68 | - var lstExpiringSubscriptionReport = dbContext.usp_GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, pageNo, pageLength, spRecordCount).ToList(); | 68 | + var lstExpiringSubscriptionReport = dbContext.usp_GetCancelledLicenses(sFromDate, sToDate, icStartPrice, icEndPrice, (byte)iLicenseTypeId, (byte)iAccountTypeId, sZip, iStateId, iCountryId, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
69 | return Ok(new { SubscriptionCancel = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); | 69 | return Ok(new { SubscriptionCancel = lstExpiringSubscriptionReport, RecordCount = spRecordCount.Value }); |
70 | } | 70 | } |
71 | 71 | ||
72 | [Route("GetNetAdSummaryReport")] | 72 | [Route("GetNetAdSummaryReport")] |
73 | [HttpGet] | 73 | [HttpGet] |
74 | - public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId, int pageNo, int pageLength) | 74 | + public IHttpActionResult GetNetAdSummaryReport(string sFromDate, string sToDate, decimal iStartPrice, decimal iEndPrice, int iLicenseTypeId,string sortColumn, string sortOrder, int pageNo, int pageLength) |
75 | { | 75 | { |
76 | try | 76 | try |
77 | { | 77 | { |
78 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 78 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
79 | - var lstNetAdSummaryReport = dbContext.usp_GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, pageNo, pageLength, spRecordCount).ToList(); | 79 | + var lstNetAdSummaryReport = dbContext.usp_GetNetAdSummaryReport(sFromDate, sToDate, iStartPrice, iEndPrice, (byte)iLicenseTypeId, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
80 | return Ok(new { NetAdSubscriptionList = lstNetAdSummaryReport, RecordCount = spRecordCount.Value }); | 80 | return Ok(new { NetAdSubscriptionList = lstNetAdSummaryReport, RecordCount = spRecordCount.Value }); |
81 | } | 81 | } |
82 | catch (Exception ex) | 82 | catch (Exception ex) |
@@ -88,12 +88,12 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -88,12 +88,12 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
88 | 88 | ||
89 | [Route("GetSiteLicenseUsageReport")] | 89 | [Route("GetSiteLicenseUsageReport")] |
90 | [HttpGet] | 90 | [HttpGet] |
91 | - public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int iloginTypeId, int pageNo, int pageLength) | 91 | + public IHttpActionResult GetSiteLicenseUsageReport(string sFromDate, string sToDate, string sAccountNumber, int iEdition, int iloginTypeId, string sortColumn, string sortOrder, int pageNo, int pageLength) |
92 | { | 92 | { |
93 | try | 93 | try |
94 | { | 94 | { |
95 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 95 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
96 | - var lstSiteLicenseUsageReport = dbContext.usp_GetSiteLicenseUsageReports(sFromDate, sToDate, sAccountNumber, (byte)iEdition, (byte)iloginTypeId, pageNo, pageLength, spRecordCount).ToList(); | 96 | + var lstSiteLicenseUsageReport = dbContext.usp_GetSiteLicenseUsageReports(sFromDate, sToDate, sAccountNumber, (byte)iEdition, (byte)iloginTypeId, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
97 | return Ok(new { SiteLicenseUsageList = lstSiteLicenseUsageReport, RecordCount = spRecordCount.Value }); | 97 | return Ok(new { SiteLicenseUsageList = lstSiteLicenseUsageReport, RecordCount = spRecordCount.Value }); |
98 | } | 98 | } |
99 | catch (Exception ex) | 99 | catch (Exception ex) |
@@ -104,12 +104,12 @@ namespace AIAHTML5.ADMIN.API.Controllers | @@ -104,12 +104,12 @@ namespace AIAHTML5.ADMIN.API.Controllers | ||
104 | 104 | ||
105 | [Route("GetDiscountReport")] | 105 | [Route("GetDiscountReport")] |
106 | [HttpGet] | 106 | [HttpGet] |
107 | - public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber, int pageNo, int pageLength) | 107 | + public IHttpActionResult GetDiscountReport(string sFromDate, string sToDate, int iDiscountCode, string sAccountNumber, string sortColumn, string sortOrder, int pageNo, int pageLength) |
108 | { | 108 | { |
109 | try | 109 | try |
110 | { | 110 | { |
111 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); | 111 | var spRecordCount = new System.Data.Objects.ObjectParameter("recordCount", 0); |
112 | - var lstDiscountReport = dbContext.usp_GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber, pageNo, pageLength, spRecordCount).ToList(); | 112 | + var lstDiscountReport = dbContext.usp_GetDiscountReport(sFromDate, sToDate, iDiscountCode, sAccountNumber, sortColumn, sortOrder, pageNo, pageLength, spRecordCount).ToList(); |
113 | return Ok(new { DiscountReportList = lstDiscountReport, RecordCount = spRecordCount.Value }); | 113 | return Ok(new { DiscountReportList = lstDiscountReport, RecordCount = spRecordCount.Value }); |
114 | } | 114 | } |
115 | catch (Exception ex) | 115 | catch (Exception ex) |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.Context.cs
@@ -3891,7 +3891,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -3891,7 +3891,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
3891 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetBlockedUserByAccNoAndType_Result>("usp_GetBlockedUserByAccNoAndType", iUserTypeIdParameter, iLicenseIdParameter); | 3891 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetBlockedUserByAccNoAndType_Result>("usp_GetBlockedUserByAccNoAndType", iUserTypeIdParameter, iLicenseIdParameter); |
3892 | } | 3892 | } |
3893 | 3893 | ||
3894 | - public virtual ObjectResult<usp_GetCancelledLicenses_Result> usp_GetCancelledLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 3894 | + public virtual ObjectResult<usp_GetCancelledLicenses_Result> usp_GetCancelledLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<byte> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
3895 | { | 3895 | { |
3896 | var sFromDateParameter = sFromDate != null ? | 3896 | var sFromDateParameter = sFromDate != null ? |
3897 | new ObjectParameter("sFromDate", sFromDate) : | 3897 | new ObjectParameter("sFromDate", sFromDate) : |
@@ -3929,6 +3929,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -3929,6 +3929,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
3929 | new ObjectParameter("iCountryId", iCountryId) : | 3929 | new ObjectParameter("iCountryId", iCountryId) : |
3930 | new ObjectParameter("iCountryId", typeof(int)); | 3930 | new ObjectParameter("iCountryId", typeof(int)); |
3931 | 3931 | ||
3932 | + var sortColumnParameter = sortColumn != null ? | ||
3933 | + new ObjectParameter("sortColumn", sortColumn) : | ||
3934 | + new ObjectParameter("sortColumn", typeof(string)); | ||
3935 | + | ||
3936 | + var sortOrderParameter = sortOrder != null ? | ||
3937 | + new ObjectParameter("sortOrder", sortOrder) : | ||
3938 | + new ObjectParameter("sortOrder", typeof(string)); | ||
3939 | + | ||
3932 | var pageNoParameter = pageNo.HasValue ? | 3940 | var pageNoParameter = pageNo.HasValue ? |
3933 | new ObjectParameter("pageNo", pageNo) : | 3941 | new ObjectParameter("pageNo", pageNo) : |
3934 | new ObjectParameter("pageNo", typeof(int)); | 3942 | new ObjectParameter("pageNo", typeof(int)); |
@@ -3937,7 +3945,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -3937,7 +3945,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
3937 | new ObjectParameter("pageLength", pageLength) : | 3945 | new ObjectParameter("pageLength", pageLength) : |
3938 | new ObjectParameter("pageLength", typeof(int)); | 3946 | new ObjectParameter("pageLength", typeof(int)); |
3939 | 3947 | ||
3940 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetCancelledLicenses_Result>("usp_GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 3948 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetCancelledLicenses_Result>("usp_GetCancelledLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
3941 | } | 3949 | } |
3942 | 3950 | ||
3943 | public virtual ObjectResult<usp_GetCustomerSummary_Result> usp_GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseType, Nullable<byte> iAccountType, string sZip, Nullable<int> iState, Nullable<int> iCountry, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 3951 | public virtual ObjectResult<usp_GetCustomerSummary_Result> usp_GetCustomerSummary(string sAccoutNumber, string sLicenseeFullName, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseType, Nullable<byte> iAccountType, string sZip, Nullable<int> iState, Nullable<int> iCountry, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
@@ -4030,7 +4038,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4030,7 +4038,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4030 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetDiscountCodes_Result>("usp_GetDiscountCodes", sDiscountCodeParameter, sStartDateParameter, sEndDateParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); | 4038 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetDiscountCodes_Result>("usp_GetDiscountCodes", sDiscountCodeParameter, sStartDateParameter, sEndDateParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4031 | } | 4039 | } |
4032 | 4040 | ||
4033 | - public virtual ObjectResult<usp_GetDiscountReport_Result> usp_GetDiscountReport(string sStartDate, string sEndDate, Nullable<int> intDiscountID, string sAccoutNumber, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4041 | + public virtual ObjectResult<usp_GetDiscountReport_Result> usp_GetDiscountReport(string sStartDate, string sEndDate, Nullable<int> intDiscountID, string sAccoutNumber, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
4034 | { | 4042 | { |
4035 | var sStartDateParameter = sStartDate != null ? | 4043 | var sStartDateParameter = sStartDate != null ? |
4036 | new ObjectParameter("sStartDate", sStartDate) : | 4044 | new ObjectParameter("sStartDate", sStartDate) : |
@@ -4048,6 +4056,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4048,6 +4056,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4048 | new ObjectParameter("sAccoutNumber", sAccoutNumber) : | 4056 | new ObjectParameter("sAccoutNumber", sAccoutNumber) : |
4049 | new ObjectParameter("sAccoutNumber", typeof(string)); | 4057 | new ObjectParameter("sAccoutNumber", typeof(string)); |
4050 | 4058 | ||
4059 | + var sortColumnParameter = sortColumn != null ? | ||
4060 | + new ObjectParameter("sortColumn", sortColumn) : | ||
4061 | + new ObjectParameter("sortColumn", typeof(string)); | ||
4062 | + | ||
4063 | + var sortOrderParameter = sortOrder != null ? | ||
4064 | + new ObjectParameter("sortOrder", sortOrder) : | ||
4065 | + new ObjectParameter("sortOrder", typeof(string)); | ||
4066 | + | ||
4051 | var pageNoParameter = pageNo.HasValue ? | 4067 | var pageNoParameter = pageNo.HasValue ? |
4052 | new ObjectParameter("pageNo", pageNo) : | 4068 | new ObjectParameter("pageNo", pageNo) : |
4053 | new ObjectParameter("pageNo", typeof(int)); | 4069 | new ObjectParameter("pageNo", typeof(int)); |
@@ -4056,10 +4072,10 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4056,10 +4072,10 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4056 | new ObjectParameter("pageLength", pageLength) : | 4072 | new ObjectParameter("pageLength", pageLength) : |
4057 | new ObjectParameter("pageLength", typeof(int)); | 4073 | new ObjectParameter("pageLength", typeof(int)); |
4058 | 4074 | ||
4059 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetDiscountReport_Result>("usp_GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter, pageNoParameter, pageLengthParameter, recordCount); | 4075 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetDiscountReport_Result>("usp_GetDiscountReport", sStartDateParameter, sEndDateParameter, intDiscountIDParameter, sAccoutNumberParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4060 | } | 4076 | } |
4061 | 4077 | ||
4062 | - public virtual ObjectResult<usp_GetExpiringLicenses_Result> usp_GetExpiringLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<int> iLicenseTypeId, Nullable<int> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4078 | + public virtual ObjectResult<usp_GetExpiringLicenses_Result> usp_GetExpiringLicenses(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<int> iLicenseTypeId, Nullable<int> iAccountTypeId, string sZip, Nullable<int> iStateId, Nullable<int> iCountryId, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
4063 | { | 4079 | { |
4064 | var sFromDateParameter = sFromDate != null ? | 4080 | var sFromDateParameter = sFromDate != null ? |
4065 | new ObjectParameter("sFromDate", sFromDate) : | 4081 | new ObjectParameter("sFromDate", sFromDate) : |
@@ -4097,6 +4113,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4097,6 +4113,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4097 | new ObjectParameter("iCountryId", iCountryId) : | 4113 | new ObjectParameter("iCountryId", iCountryId) : |
4098 | new ObjectParameter("iCountryId", typeof(int)); | 4114 | new ObjectParameter("iCountryId", typeof(int)); |
4099 | 4115 | ||
4116 | + var sortColumnParameter = sortColumn != null ? | ||
4117 | + new ObjectParameter("sortColumn", sortColumn) : | ||
4118 | + new ObjectParameter("sortColumn", typeof(string)); | ||
4119 | + | ||
4120 | + var sortOrderParameter = sortOrder != null ? | ||
4121 | + new ObjectParameter("sortOrder", sortOrder) : | ||
4122 | + new ObjectParameter("sortOrder", typeof(string)); | ||
4123 | + | ||
4100 | var pageNoParameter = pageNo.HasValue ? | 4124 | var pageNoParameter = pageNo.HasValue ? |
4101 | new ObjectParameter("pageNo", pageNo) : | 4125 | new ObjectParameter("pageNo", pageNo) : |
4102 | new ObjectParameter("pageNo", typeof(int)); | 4126 | new ObjectParameter("pageNo", typeof(int)); |
@@ -4105,7 +4129,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4105,7 +4129,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4105 | new ObjectParameter("pageLength", pageLength) : | 4129 | new ObjectParameter("pageLength", pageLength) : |
4106 | new ObjectParameter("pageLength", typeof(int)); | 4130 | new ObjectParameter("pageLength", typeof(int)); |
4107 | 4131 | ||
4108 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetExpiringLicenses_Result>("usp_GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 4132 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetExpiringLicenses_Result>("usp_GetExpiringLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4109 | } | 4133 | } |
4110 | 4134 | ||
4111 | public virtual ObjectResult<usp_GetExportedImageDetails_Result> usp_GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4135 | public virtual ObjectResult<usp_GetExportedImageDetails_Result> usp_GetExportedImageDetails(string sStartDate, string sEndDate, string sAccoutNumber, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
@@ -4190,7 +4214,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4190,7 +4214,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4190 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetModuleStatusByLicenseId_Result>("usp_GetModuleStatusByLicenseId", iLicenseIdParameter); | 4214 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetModuleStatusByLicenseId_Result>("usp_GetModuleStatusByLicenseId", iLicenseIdParameter); |
4191 | } | 4215 | } |
4192 | 4216 | ||
4193 | - public virtual ObjectResult<usp_GetNetAdSummaryReport_Result> usp_GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4217 | + public virtual ObjectResult<usp_GetNetAdSummaryReport_Result> usp_GetNetAdSummaryReport(string sFromDate, string sToDate, Nullable<decimal> iStartPrice, Nullable<decimal> iEndPrice, Nullable<byte> iLicenseTypeId, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
4194 | { | 4218 | { |
4195 | var sFromDateParameter = sFromDate != null ? | 4219 | var sFromDateParameter = sFromDate != null ? |
4196 | new ObjectParameter("sFromDate", sFromDate) : | 4220 | new ObjectParameter("sFromDate", sFromDate) : |
@@ -4212,6 +4236,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4212,6 +4236,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4212 | new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : | 4236 | new ObjectParameter("iLicenseTypeId", iLicenseTypeId) : |
4213 | new ObjectParameter("iLicenseTypeId", typeof(byte)); | 4237 | new ObjectParameter("iLicenseTypeId", typeof(byte)); |
4214 | 4238 | ||
4239 | + var sortColumnParameter = sortColumn != null ? | ||
4240 | + new ObjectParameter("sortColumn", sortColumn) : | ||
4241 | + new ObjectParameter("sortColumn", typeof(string)); | ||
4242 | + | ||
4243 | + var sortOrderParameter = sortOrder != null ? | ||
4244 | + new ObjectParameter("sortOrder", sortOrder) : | ||
4245 | + new ObjectParameter("sortOrder", typeof(string)); | ||
4246 | + | ||
4215 | var pageNoParameter = pageNo.HasValue ? | 4247 | var pageNoParameter = pageNo.HasValue ? |
4216 | new ObjectParameter("pageNo", pageNo) : | 4248 | new ObjectParameter("pageNo", pageNo) : |
4217 | new ObjectParameter("pageNo", typeof(int)); | 4249 | new ObjectParameter("pageNo", typeof(int)); |
@@ -4220,7 +4252,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4220,7 +4252,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4220 | new ObjectParameter("pageLength", pageLength) : | 4252 | new ObjectParameter("pageLength", pageLength) : |
4221 | new ObjectParameter("pageLength", typeof(int)); | 4253 | new ObjectParameter("pageLength", typeof(int)); |
4222 | 4254 | ||
4223 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetNetAdSummaryReport_Result>("usp_GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 4255 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetNetAdSummaryReport_Result>("usp_GetNetAdSummaryReport", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4224 | } | 4256 | } |
4225 | 4257 | ||
4226 | public virtual ObjectResult<string> usp_GetSearchUser(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable<int> iUserTypeId, Nullable<int> iAccountTypeId, Nullable<int> iLoginUserType, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4258 | public virtual ObjectResult<string> usp_GetSearchUser(string sFirstName, string sLastName, string sEmailId, string sAccoutNumber, Nullable<int> iUserTypeId, Nullable<int> iAccountTypeId, Nullable<int> iLoginUserType, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
@@ -4323,7 +4355,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4323,7 +4355,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4323 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteLicenseUsageReport_Result>("usp_GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 4355 | return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteLicenseUsageReport_Result>("usp_GetSiteLicenseUsageReport", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, pageNoParameter, pageLengthParameter, recordCount); |
4324 | } | 4356 | } |
4325 | 4357 | ||
4326 | - public virtual ObjectResult<usp_GetSiteLicenseUsageReports_Result> usp_GetSiteLicenseUsageReports(string sFromDate, string sToDate, string sAccoutNumber, Nullable<byte> iEditionId, Nullable<byte> iloginTypeId, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4358 | + public virtual ObjectResult<usp_GetSiteLicenseUsageReports_Result> usp_GetSiteLicenseUsageReports(string sFromDate, string sToDate, string sAccoutNumber, Nullable<byte> iEditionId, Nullable<byte> iloginTypeId, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
4327 | { | 4359 | { |
4328 | var sFromDateParameter = sFromDate != null ? | 4360 | var sFromDateParameter = sFromDate != null ? |
4329 | new ObjectParameter("sFromDate", sFromDate) : | 4361 | new ObjectParameter("sFromDate", sFromDate) : |
@@ -4345,6 +4377,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4345,6 +4377,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4345 | new ObjectParameter("iloginTypeId", iloginTypeId) : | 4377 | new ObjectParameter("iloginTypeId", iloginTypeId) : |
4346 | new ObjectParameter("iloginTypeId", typeof(byte)); | 4378 | new ObjectParameter("iloginTypeId", typeof(byte)); |
4347 | 4379 | ||
4380 | + var sortColumnParameter = sortColumn != null ? | ||
4381 | + new ObjectParameter("sortColumn", sortColumn) : | ||
4382 | + new ObjectParameter("sortColumn", typeof(string)); | ||
4383 | + | ||
4384 | + var sortOrderParameter = sortOrder != null ? | ||
4385 | + new ObjectParameter("sortOrder", sortOrder) : | ||
4386 | + new ObjectParameter("sortOrder", typeof(string)); | ||
4387 | + | ||
4348 | var pageNoParameter = pageNo.HasValue ? | 4388 | var pageNoParameter = pageNo.HasValue ? |
4349 | new ObjectParameter("pageNo", pageNo) : | 4389 | new ObjectParameter("pageNo", pageNo) : |
4350 | new ObjectParameter("pageNo", typeof(int)); | 4390 | new ObjectParameter("pageNo", typeof(int)); |
@@ -4353,10 +4393,10 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4353,10 +4393,10 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4353 | new ObjectParameter("pageLength", pageLength) : | 4393 | new ObjectParameter("pageLength", pageLength) : |
4354 | new ObjectParameter("pageLength", typeof(int)); | 4394 | new ObjectParameter("pageLength", typeof(int)); |
4355 | 4395 | ||
4356 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteLicenseUsageReports_Result>("usp_GetSiteLicenseUsageReports", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, iloginTypeIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 4396 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSiteLicenseUsageReports_Result>("usp_GetSiteLicenseUsageReports", sFromDateParameter, sToDateParameter, sAccoutNumberParameter, iEditionIdParameter, iloginTypeIdParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4357 | } | 4397 | } |
4358 | 4398 | ||
4359 | - public virtual ObjectResult<usp_GetSubscribedLicenses_Result> usp_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) | 4399 | + public virtual ObjectResult<usp_GetSubscribedLicenses_Result> usp_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, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
4360 | { | 4400 | { |
4361 | var sFromDateParameter = sFromDate != null ? | 4401 | var sFromDateParameter = sFromDate != null ? |
4362 | new ObjectParameter("sFromDate", sFromDate) : | 4402 | new ObjectParameter("sFromDate", sFromDate) : |
@@ -4394,6 +4434,14 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4394,6 +4434,14 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4394 | new ObjectParameter("iCountryId", iCountryId) : | 4434 | new ObjectParameter("iCountryId", iCountryId) : |
4395 | new ObjectParameter("iCountryId", typeof(int)); | 4435 | new ObjectParameter("iCountryId", typeof(int)); |
4396 | 4436 | ||
4437 | + var sortColumnParameter = sortColumn != null ? | ||
4438 | + new ObjectParameter("sortColumn", sortColumn) : | ||
4439 | + new ObjectParameter("sortColumn", typeof(string)); | ||
4440 | + | ||
4441 | + var sortOrderParameter = sortOrder != null ? | ||
4442 | + new ObjectParameter("sortOrder", sortOrder) : | ||
4443 | + new ObjectParameter("sortOrder", typeof(string)); | ||
4444 | + | ||
4397 | var pageNoParameter = pageNo.HasValue ? | 4445 | var pageNoParameter = pageNo.HasValue ? |
4398 | new ObjectParameter("pageNo", pageNo) : | 4446 | new ObjectParameter("pageNo", pageNo) : |
4399 | new ObjectParameter("pageNo", typeof(int)); | 4447 | new ObjectParameter("pageNo", typeof(int)); |
@@ -4402,7 +4450,7 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -4402,7 +4450,7 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
4402 | new ObjectParameter("pageLength", pageLength) : | 4450 | new ObjectParameter("pageLength", pageLength) : |
4403 | new ObjectParameter("pageLength", typeof(int)); | 4451 | new ObjectParameter("pageLength", typeof(int)); |
4404 | 4452 | ||
4405 | - return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSubscribedLicenses_Result>("usp_GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, pageNoParameter, pageLengthParameter, recordCount); | 4453 | + return ((IObjectContextAdapter)this).ObjectContext.ExecuteFunction<usp_GetSubscribedLicenses_Result>("usp_GetSubscribedLicenses", sFromDateParameter, sToDateParameter, iStartPriceParameter, iEndPriceParameter, iLicenseTypeIdParameter, iAccountTypeIdParameter, sZipParameter, iStateIdParameter, iCountryIdParameter, sortColumnParameter, sortOrderParameter, pageNoParameter, pageLengthParameter, recordCount); |
4406 | } | 4454 | } |
4407 | 4455 | ||
4408 | public virtual ObjectResult<usp_GetUsageReport_Result> usp_GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable<int> iState, Nullable<int> iCountry, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) | 4456 | public virtual ObjectResult<usp_GetUsageReport_Result> usp_GetUsageReport(string sFromDate, string sToDate, string sAccoutNumber, string sZip, Nullable<int> iState, Nullable<int> iCountry, string sortColumn, string sortOrder, Nullable<int> pageNo, Nullable<int> pageLength, ObjectParameter recordCount) |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/AIADBEntity.edmx
@@ -976,6 +976,8 @@ | @@ -976,6 +976,8 @@ | ||
976 | <Parameter Name="sZip" Type="varchar" Mode="In" /> | 976 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
977 | <Parameter Name="iStateId" Type="int" Mode="In" /> | 977 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
978 | <Parameter Name="iCountryId" Type="int" Mode="In" /> | 978 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
979 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
980 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
979 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 981 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
980 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 982 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
981 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 983 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -1011,6 +1013,8 @@ | @@ -1011,6 +1013,8 @@ | ||
1011 | <Parameter Name="sEndDate" Type="varchar" Mode="In" /> | 1013 | <Parameter Name="sEndDate" Type="varchar" Mode="In" /> |
1012 | <Parameter Name="intDiscountID" Type="int" Mode="In" /> | 1014 | <Parameter Name="intDiscountID" Type="int" Mode="In" /> |
1013 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> | 1015 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> |
1016 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
1017 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
1014 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 1018 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1015 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 1019 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1016 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 1020 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -1026,6 +1030,8 @@ | @@ -1026,6 +1030,8 @@ | ||
1026 | <Parameter Name="sZip" Type="varchar" Mode="In" /> | 1030 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
1027 | <Parameter Name="iStateId" Type="int" Mode="In" /> | 1031 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
1028 | <Parameter Name="iCountryId" Type="int" Mode="In" /> | 1032 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
1033 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
1034 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
1029 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 1035 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1030 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 1036 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1031 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 1037 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -1126,6 +1132,8 @@ | @@ -1126,6 +1132,8 @@ | ||
1126 | <Parameter Name="iStartPrice" Type="numeric" Mode="In" /> | 1132 | <Parameter Name="iStartPrice" Type="numeric" Mode="In" /> |
1127 | <Parameter Name="iEndPrice" Type="numeric" Mode="In" /> | 1133 | <Parameter Name="iEndPrice" Type="numeric" Mode="In" /> |
1128 | <Parameter Name="iLicenseTypeId" Type="tinyint" Mode="In" /> | 1134 | <Parameter Name="iLicenseTypeId" Type="tinyint" Mode="In" /> |
1135 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
1136 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
1129 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 1137 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1130 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 1138 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1131 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 1139 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -1188,6 +1196,8 @@ | @@ -1188,6 +1196,8 @@ | ||
1188 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> | 1196 | <Parameter Name="sAccoutNumber" Type="varchar" Mode="In" /> |
1189 | <Parameter Name="iEditionId" Type="tinyint" Mode="In" /> | 1197 | <Parameter Name="iEditionId" Type="tinyint" Mode="In" /> |
1190 | <Parameter Name="iloginTypeId" Type="tinyint" Mode="In" /> | 1198 | <Parameter Name="iloginTypeId" Type="tinyint" Mode="In" /> |
1199 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
1200 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
1191 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 1201 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1192 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 1202 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1193 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 1203 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -1202,6 +1212,8 @@ | @@ -1202,6 +1212,8 @@ | ||
1202 | <Parameter Name="sZip" Type="varchar" Mode="In" /> | 1212 | <Parameter Name="sZip" Type="varchar" Mode="In" /> |
1203 | <Parameter Name="iStateId" Type="int" Mode="In" /> | 1213 | <Parameter Name="iStateId" Type="int" Mode="In" /> |
1204 | <Parameter Name="iCountryId" Type="int" Mode="In" /> | 1214 | <Parameter Name="iCountryId" Type="int" Mode="In" /> |
1215 | + <Parameter Name="sortColumn" Type="varchar" Mode="In" /> | ||
1216 | + <Parameter Name="sortOrder" Type="varchar" Mode="In" /> | ||
1205 | <Parameter Name="pageNo" Type="int" Mode="In" /> | 1217 | <Parameter Name="pageNo" Type="int" Mode="In" /> |
1206 | <Parameter Name="pageLength" Type="int" Mode="In" /> | 1218 | <Parameter Name="pageLength" Type="int" Mode="In" /> |
1207 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> | 1219 | <Parameter Name="recordCount" Type="int" Mode="InOut" /> |
@@ -2721,6 +2733,8 @@ | @@ -2721,6 +2733,8 @@ | ||
2721 | <Parameter Name="sZip" Mode="In" Type="String" /> | 2733 | <Parameter Name="sZip" Mode="In" Type="String" /> |
2722 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> | 2734 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
2723 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> | 2735 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
2736 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2737 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2724 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2738 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2725 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2739 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2726 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2740 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -2756,6 +2770,8 @@ | @@ -2756,6 +2770,8 @@ | ||
2756 | <Parameter Name="sEndDate" Mode="In" Type="String" /> | 2770 | <Parameter Name="sEndDate" Mode="In" Type="String" /> |
2757 | <Parameter Name="intDiscountID" Mode="In" Type="Int32" /> | 2771 | <Parameter Name="intDiscountID" Mode="In" Type="Int32" /> |
2758 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> | 2772 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> |
2773 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2774 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2759 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2775 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2760 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2776 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2761 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2777 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -2770,6 +2786,8 @@ | @@ -2770,6 +2786,8 @@ | ||
2770 | <Parameter Name="sZip" Mode="In" Type="String" /> | 2786 | <Parameter Name="sZip" Mode="In" Type="String" /> |
2771 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> | 2787 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
2772 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> | 2788 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
2789 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2790 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2773 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2791 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2774 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2792 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2775 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2793 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -2806,6 +2824,8 @@ | @@ -2806,6 +2824,8 @@ | ||
2806 | <Parameter Name="iStartPrice" Mode="In" Type="Decimal" /> | 2824 | <Parameter Name="iStartPrice" Mode="In" Type="Decimal" /> |
2807 | <Parameter Name="iEndPrice" Mode="In" Type="Decimal" /> | 2825 | <Parameter Name="iEndPrice" Mode="In" Type="Decimal" /> |
2808 | <Parameter Name="iLicenseTypeId" Mode="In" Type="Byte" /> | 2826 | <Parameter Name="iLicenseTypeId" Mode="In" Type="Byte" /> |
2827 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2828 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2809 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2829 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2810 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2830 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2811 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2831 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -2847,6 +2867,8 @@ | @@ -2847,6 +2867,8 @@ | ||
2847 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> | 2867 | <Parameter Name="sAccoutNumber" Mode="In" Type="String" /> |
2848 | <Parameter Name="iEditionId" Mode="In" Type="Byte" /> | 2868 | <Parameter Name="iEditionId" Mode="In" Type="Byte" /> |
2849 | <Parameter Name="iloginTypeId" Mode="In" Type="Byte" /> | 2869 | <Parameter Name="iloginTypeId" Mode="In" Type="Byte" /> |
2870 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2871 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2850 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2872 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2851 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2873 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2852 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2874 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -2861,6 +2883,8 @@ | @@ -2861,6 +2883,8 @@ | ||
2861 | <Parameter Name="sZip" Mode="In" Type="String" /> | 2883 | <Parameter Name="sZip" Mode="In" Type="String" /> |
2862 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> | 2884 | <Parameter Name="iStateId" Mode="In" Type="Int32" /> |
2863 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> | 2885 | <Parameter Name="iCountryId" Mode="In" Type="Int32" /> |
2886 | + <Parameter Name="sortColumn" Mode="In" Type="String" /> | ||
2887 | + <Parameter Name="sortOrder" Mode="In" Type="String" /> | ||
2864 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> | 2888 | <Parameter Name="pageNo" Mode="In" Type="Int32" /> |
2865 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> | 2889 | <Parameter Name="pageLength" Mode="In" Type="Int32" /> |
2866 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> | 2890 | <Parameter Name="recordCount" Mode="InOut" Type="Int32" /> |
@@ -4165,16 +4189,15 @@ | @@ -4165,16 +4189,15 @@ | ||
4165 | <Property Type="DateTime" Name="LoginTime" Nullable="true" Precision="23" /> | 4189 | <Property Type="DateTime" Name="LoginTime" Nullable="true" Precision="23" /> |
4166 | </ComplexType> | 4190 | </ComplexType> |
4167 | <ComplexType Name="usp_GetCancelledLicenses_Result"> | 4191 | <ComplexType Name="usp_GetCancelledLicenses_Result"> |
4168 | - <Property Type="Int64" Name="Serial_No" Nullable="true" /> | ||
4169 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> | 4192 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> |
4170 | - <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="100" /> | 4193 | + <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="200" /> |
4171 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> | 4194 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> |
4172 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> | 4195 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> |
4173 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> | 4196 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> |
4174 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> | 4197 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> |
4175 | - <Property Type="String" Name="StartDate" Nullable="true" MaxLength="30" /> | ||
4176 | - <Property Type="String" Name="EndDate" Nullable="true" MaxLength="30" /> | ||
4177 | - <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="30" /> | 4198 | + <Property Type="DateTime" Name="StartDate" Nullable="true" Precision="23" /> |
4199 | + <Property Type="DateTime" Name="EndDate" Nullable="true" Precision="23" /> | ||
4200 | + <Property Type="DateTime" Name="LicenseCreationDate" Nullable="true" Precision="23" /> | ||
4178 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> | 4201 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> |
4179 | <Property Type="Int32" Name="CardNumber" Nullable="true" /> | 4202 | <Property Type="Int32" Name="CardNumber" Nullable="true" /> |
4180 | </ComplexType> | 4203 | </ComplexType> |
@@ -4205,28 +4228,26 @@ | @@ -4205,28 +4228,26 @@ | ||
4205 | <Property Type="Boolean" Name="IsActive" Nullable="false" /> | 4228 | <Property Type="Boolean" Name="IsActive" Nullable="false" /> |
4206 | </ComplexType> | 4229 | </ComplexType> |
4207 | <ComplexType Name="usp_GetDiscountReport_Result"> | 4230 | <ComplexType Name="usp_GetDiscountReport_Result"> |
4208 | - <Property Type="Int64" Name="RowNum" Nullable="true" /> | ||
4209 | - <Property Type="String" Name="DiscountCode" Nullable="true" MaxLength="255" /> | ||
4210 | - <Property Type="Decimal" Name="Percentage" Nullable="false" Precision="5" Scale="2" /> | ||
4211 | - <Property Type="String" Name="StartDate" Nullable="true" MaxLength="10" /> | ||
4212 | - <Property Type="String" Name="EndDate" Nullable="true" MaxLength="10" /> | ||
4213 | - <Property Type="String" Name="DiscountStatus" Nullable="false" MaxLength="8" /> | 4231 | + <Property Type="String" Name="DiscountCode" Nullable="true" MaxLength="100" /> |
4232 | + <Property Type="Decimal" Name="Percentage" Nullable="true" Precision="5" Scale="2" /> | ||
4233 | + <Property Type="DateTime" Name="StartDate" Nullable="true" Precision="23" /> | ||
4234 | + <Property Type="DateTime" Name="EndDate" Nullable="true" Precision="23" /> | ||
4235 | + <Property Type="String" Name="DiscountStatus" Nullable="true" MaxLength="10" /> | ||
4214 | <Property Type="Int32" Name="TotalLicenses" Nullable="true" /> | 4236 | <Property Type="Int32" Name="TotalLicenses" Nullable="true" /> |
4215 | </ComplexType> | 4237 | </ComplexType> |
4216 | <ComplexType Name="usp_GetExpiringLicenses_Result"> | 4238 | <ComplexType Name="usp_GetExpiringLicenses_Result"> |
4217 | - <Property Type="Int64" Name="Serial_No" Nullable="true" /> | ||
4218 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> | 4239 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> |
4219 | - <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="100" /> | 4240 | + <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="200" /> |
4220 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> | 4241 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> |
4221 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> | 4242 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> |
4222 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> | 4243 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> |
4223 | - <Property Type="String" Name="StartDate" Nullable="true" MaxLength="30" /> | ||
4224 | - <Property Type="String" Name="EndDate" Nullable="true" MaxLength="30" /> | ||
4225 | - <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="30" /> | 4244 | + <Property Type="DateTime" Name="StartDate" Nullable="true" Precision="23" /> |
4245 | + <Property Type="DateTime" Name="EndDate" Nullable="true" Precision="23" /> | ||
4246 | + <Property Type="DateTime" Name="LicenseCreationDate" Nullable="true" Precision="23" /> | ||
4226 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> | 4247 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> |
4227 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> | 4248 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> |
4228 | <Property Type="Int32" Name="DaysRemaining" Nullable="true" /> | 4249 | <Property Type="Int32" Name="DaysRemaining" Nullable="true" /> |
4229 | - <Property Type="Int32" Name="CardNumber" Nullable="false" /> | 4250 | + <Property Type="Int32" Name="CardNumber" Nullable="true" /> |
4230 | </ComplexType> | 4251 | </ComplexType> |
4231 | <ComplexType Name="usp_GetExportedImageDetails_Result"> | 4252 | <ComplexType Name="usp_GetExportedImageDetails_Result"> |
4232 | <Property Type="DateTime" Name="ExportedDate" Nullable="false" Precision="23" /> | 4253 | <Property Type="DateTime" Name="ExportedDate" Nullable="false" Precision="23" /> |
@@ -4279,11 +4300,10 @@ | @@ -4279,11 +4300,10 @@ | ||
4279 | <Property Type="Boolean" Name="Status" Nullable="false" /> | 4300 | <Property Type="Boolean" Name="Status" Nullable="false" /> |
4280 | </ComplexType> | 4301 | </ComplexType> |
4281 | <ComplexType Name="usp_GetNetAdSummaryReport_Result"> | 4302 | <ComplexType Name="usp_GetNetAdSummaryReport_Result"> |
4282 | - <Property Type="Int64" Name="Serial_No" Nullable="true" /> | ||
4283 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> | 4303 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> |
4284 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> | 4304 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> |
4285 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> | 4305 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> |
4286 | - <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="30" /> | 4306 | + <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="10" /> |
4287 | <Property Type="Int32" Name="ActiveSubscription" Nullable="true" /> | 4307 | <Property Type="Int32" Name="ActiveSubscription" Nullable="true" /> |
4288 | <Property Type="Int32" Name="RenewSubscription" Nullable="true" /> | 4308 | <Property Type="Int32" Name="RenewSubscription" Nullable="true" /> |
4289 | <Property Type="Int32" Name="InActiveSubscription" Nullable="true" /> | 4309 | <Property Type="Int32" Name="InActiveSubscription" Nullable="true" /> |
@@ -4322,28 +4342,26 @@ | @@ -4322,28 +4342,26 @@ | ||
4322 | <Property Type="String" Name="LastLogin" Nullable="true" MaxLength="30" /> | 4342 | <Property Type="String" Name="LastLogin" Nullable="true" MaxLength="30" /> |
4323 | </ComplexType> | 4343 | </ComplexType> |
4324 | <ComplexType Name="usp_GetSiteLicenseUsageReports_Result"> | 4344 | <ComplexType Name="usp_GetSiteLicenseUsageReports_Result"> |
4325 | - <Property Type="Int64" Name="Serial_No" Nullable="true" /> | ||
4326 | - <Property Type="String" Name="AccountNumber" Nullable="false" MaxLength="50" /> | ||
4327 | - <Property Type="String" Name="EditionTitle" Nullable="false" MaxLength="50" /> | 4345 | + <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> |
4346 | + <Property Type="String" Name="EditionTitle" Nullable="true" MaxLength="50" /> | ||
4328 | <Property Type="String" Name="ReferalUrl" Nullable="true" MaxLength="100" /> | 4347 | <Property Type="String" Name="ReferalUrl" Nullable="true" MaxLength="100" /> |
4329 | - <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> | ||
4330 | - <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="30" /> | 4348 | + <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="200" /> |
4349 | + <Property Type="DateTime" Name="LicenseCreationDate" Nullable="true" Precision="23" /> | ||
4331 | <Property Type="Int32" Name="TotalLogins" Nullable="true" /> | 4350 | <Property Type="Int32" Name="TotalLogins" Nullable="true" /> |
4332 | - <Property Type="String" Name="LastLogin" Nullable="true" MaxLength="30" /> | 4351 | + <Property Type="DateTime" Name="LastLogin" Nullable="true" Precision="23" /> |
4333 | </ComplexType> | 4352 | </ComplexType> |
4334 | <ComplexType Name="usp_GetSubscribedLicenses_Result"> | 4353 | <ComplexType Name="usp_GetSubscribedLicenses_Result"> |
4335 | - <Property Type="Int64" Name="Serial_No" Nullable="true" /> | ||
4336 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> | 4354 | <Property Type="String" Name="AccountNumber" Nullable="true" MaxLength="50" /> |
4337 | - <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="100" /> | 4355 | + <Property Type="String" Name="LicenseeName" Nullable="true" MaxLength="200" /> |
4338 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> | 4356 | <Property Type="String" Name="LicenseType" Nullable="true" MaxLength="50" /> |
4339 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> | 4357 | <Property Type="String" Name="InstitutionName" Nullable="true" MaxLength="100" /> |
4340 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> | 4358 | <Property Type="String" Name="AccountType" Nullable="true" MaxLength="50" /> |
4341 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> | 4359 | <Property Type="String" Name="Edition" Nullable="true" MaxLength="200" /> |
4342 | - <Property Type="String" Name="StartDate" Nullable="true" MaxLength="30" /> | ||
4343 | - <Property Type="String" Name="EndDate" Nullable="true" MaxLength="30" /> | ||
4344 | - <Property Type="String" Name="LicenseCreationDate" Nullable="true" MaxLength="30" /> | 4360 | + <Property Type="DateTime" Name="StartDate" Nullable="true" Precision="23" /> |
4361 | + <Property Type="DateTime" Name="EndDate" Nullable="true" Precision="23" /> | ||
4362 | + <Property Type="DateTime" Name="LicenseCreationDate" Nullable="true" Precision="23" /> | ||
4345 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> | 4363 | <Property Type="Decimal" Name="SubscriptionPrice" Nullable="true" Precision="14" Scale="2" /> |
4346 | - <Property Type="Int32" Name="CardNumber" Nullable="false" /> | 4364 | + <Property Type="Int32" Name="CardNumber" Nullable="true" /> |
4347 | </ComplexType> | 4365 | </ComplexType> |
4348 | <ComplexType Name="usp_GetUsageReport_Result"> | 4366 | <ComplexType Name="usp_GetUsageReport_Result"> |
4349 | <Property Type="String" Name="LoginId" Nullable="true" MaxLength="50" /> | 4367 | <Property Type="String" Name="LoginId" Nullable="true" MaxLength="50" /> |
@@ -6060,7 +6078,6 @@ | @@ -6060,7 +6078,6 @@ | ||
6060 | <FunctionImportMapping FunctionImportName="usp_GetCancelledLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetCancelledLicenses"> | 6078 | <FunctionImportMapping FunctionImportName="usp_GetCancelledLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetCancelledLicenses"> |
6061 | <ResultMapping> | 6079 | <ResultMapping> |
6062 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetCancelledLicenses_Result"> | 6080 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetCancelledLicenses_Result"> |
6063 | - <ScalarProperty Name="Serial_No" ColumnName="Serial_No" /> | ||
6064 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> | 6081 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> |
6065 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> | 6082 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> |
6066 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> | 6083 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> |
@@ -6112,7 +6129,6 @@ | @@ -6112,7 +6129,6 @@ | ||
6112 | <FunctionImportMapping FunctionImportName="usp_GetDiscountReport" FunctionName="AIADatabaseV5Model.Store.usp_GetDiscountReport"> | 6129 | <FunctionImportMapping FunctionImportName="usp_GetDiscountReport" FunctionName="AIADatabaseV5Model.Store.usp_GetDiscountReport"> |
6113 | <ResultMapping> | 6130 | <ResultMapping> |
6114 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetDiscountReport_Result"> | 6131 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetDiscountReport_Result"> |
6115 | - <ScalarProperty Name="RowNum" ColumnName="RowNum" /> | ||
6116 | <ScalarProperty Name="DiscountCode" ColumnName="DiscountCode" /> | 6132 | <ScalarProperty Name="DiscountCode" ColumnName="DiscountCode" /> |
6117 | <ScalarProperty Name="Percentage" ColumnName="Percentage" /> | 6133 | <ScalarProperty Name="Percentage" ColumnName="Percentage" /> |
6118 | <ScalarProperty Name="StartDate" ColumnName="StartDate" /> | 6134 | <ScalarProperty Name="StartDate" ColumnName="StartDate" /> |
@@ -6125,7 +6141,6 @@ | @@ -6125,7 +6141,6 @@ | ||
6125 | <FunctionImportMapping FunctionImportName="usp_GetExpiringLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetExpiringLicenses"> | 6141 | <FunctionImportMapping FunctionImportName="usp_GetExpiringLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetExpiringLicenses"> |
6126 | <ResultMapping> | 6142 | <ResultMapping> |
6127 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetExpiringLicenses_Result"> | 6143 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetExpiringLicenses_Result"> |
6128 | - <ScalarProperty Name="Serial_No" ColumnName="Serial_No" /> | ||
6129 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> | 6144 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> |
6130 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> | 6145 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> |
6131 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> | 6146 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> |
@@ -6212,7 +6227,6 @@ | @@ -6212,7 +6227,6 @@ | ||
6212 | <FunctionImportMapping FunctionImportName="usp_GetNetAdSummaryReport" FunctionName="AIADatabaseV5Model.Store.usp_GetNetAdSummaryReport"> | 6227 | <FunctionImportMapping FunctionImportName="usp_GetNetAdSummaryReport" FunctionName="AIADatabaseV5Model.Store.usp_GetNetAdSummaryReport"> |
6213 | <ResultMapping> | 6228 | <ResultMapping> |
6214 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetNetAdSummaryReport_Result"> | 6229 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetNetAdSummaryReport_Result"> |
6215 | - <ScalarProperty Name="Serial_No" ColumnName="Serial_No" /> | ||
6216 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> | 6230 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> |
6217 | <ScalarProperty Name="AccountType" ColumnName="AccountType" /> | 6231 | <ScalarProperty Name="AccountType" ColumnName="AccountType" /> |
6218 | <ScalarProperty Name="InstitutionName" ColumnName="InstitutionName" /> | 6232 | <ScalarProperty Name="InstitutionName" ColumnName="InstitutionName" /> |
@@ -6272,7 +6286,6 @@ | @@ -6272,7 +6286,6 @@ | ||
6272 | <FunctionImportMapping FunctionImportName="usp_GetSiteLicenseUsageReports" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteLicenseUsageReports"> | 6286 | <FunctionImportMapping FunctionImportName="usp_GetSiteLicenseUsageReports" FunctionName="AIADatabaseV5Model.Store.usp_GetSiteLicenseUsageReports"> |
6273 | <ResultMapping> | 6287 | <ResultMapping> |
6274 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteLicenseUsageReports_Result"> | 6288 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSiteLicenseUsageReports_Result"> |
6275 | - <ScalarProperty Name="Serial_No" ColumnName="Serial_No" /> | ||
6276 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> | 6289 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> |
6277 | <ScalarProperty Name="EditionTitle" ColumnName="EditionTitle" /> | 6290 | <ScalarProperty Name="EditionTitle" ColumnName="EditionTitle" /> |
6278 | <ScalarProperty Name="ReferalUrl" ColumnName="ReferalUrl" /> | 6291 | <ScalarProperty Name="ReferalUrl" ColumnName="ReferalUrl" /> |
@@ -6286,7 +6299,6 @@ | @@ -6286,7 +6299,6 @@ | ||
6286 | <FunctionImportMapping FunctionImportName="usp_GetSubscribedLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetSubscribedLicenses"> | 6299 | <FunctionImportMapping FunctionImportName="usp_GetSubscribedLicenses" FunctionName="AIADatabaseV5Model.Store.usp_GetSubscribedLicenses"> |
6287 | <ResultMapping> | 6300 | <ResultMapping> |
6288 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSubscribedLicenses_Result"> | 6301 | <ComplexTypeMapping TypeName="AIADatabaseV5Model.usp_GetSubscribedLicenses_Result"> |
6289 | - <ScalarProperty Name="Serial_No" ColumnName="Serial_No" /> | ||
6290 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> | 6302 | <ScalarProperty Name="AccountNumber" ColumnName="AccountNumber" /> |
6291 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> | 6303 | <ScalarProperty Name="LicenseeName" ColumnName="LicenseeName" /> |
6292 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> | 6304 | <ScalarProperty Name="LicenseType" ColumnName="LicenseType" /> |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetCancelledLicenses_Result.cs
@@ -13,16 +13,15 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,16 +13,15 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetCancelledLicenses_Result | 14 | public partial class usp_GetCancelledLicenses_Result |
15 | { | 15 | { |
16 | - public Nullable<long> Serial_No { get; set; } | ||
17 | public string AccountNumber { get; set; } | 16 | public string AccountNumber { get; set; } |
18 | public string LicenseeName { get; set; } | 17 | public string LicenseeName { get; set; } |
19 | public string LicenseType { get; set; } | 18 | public string LicenseType { get; set; } |
20 | public string InstitutionName { get; set; } | 19 | public string InstitutionName { get; set; } |
21 | public string AccountType { get; set; } | 20 | public string AccountType { get; set; } |
22 | public string Edition { get; set; } | 21 | public string Edition { get; set; } |
23 | - public string StartDate { get; set; } | ||
24 | - public string EndDate { get; set; } | ||
25 | - public string LicenseCreationDate { get; set; } | 22 | + public Nullable<System.DateTime> StartDate { get; set; } |
23 | + public Nullable<System.DateTime> EndDate { get; set; } | ||
24 | + public Nullable<System.DateTime> LicenseCreationDate { get; set; } | ||
26 | public Nullable<decimal> SubscriptionPrice { get; set; } | 25 | public Nullable<decimal> SubscriptionPrice { get; set; } |
27 | public Nullable<int> CardNumber { get; set; } | 26 | public Nullable<int> CardNumber { get; set; } |
28 | } | 27 | } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetDiscountReport_Result.cs
@@ -13,11 +13,10 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,11 +13,10 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetDiscountReport_Result | 14 | public partial class usp_GetDiscountReport_Result |
15 | { | 15 | { |
16 | - public Nullable<long> RowNum { get; set; } | ||
17 | public string DiscountCode { get; set; } | 16 | public string DiscountCode { get; set; } |
18 | - public decimal Percentage { get; set; } | ||
19 | - public string StartDate { get; set; } | ||
20 | - public string EndDate { get; set; } | 17 | + public Nullable<decimal> Percentage { get; set; } |
18 | + public Nullable<System.DateTime> StartDate { get; set; } | ||
19 | + public Nullable<System.DateTime> EndDate { get; set; } | ||
21 | public string DiscountStatus { get; set; } | 20 | public string DiscountStatus { get; set; } |
22 | public Nullable<int> TotalLicenses { get; set; } | 21 | public Nullable<int> TotalLicenses { get; set; } |
23 | } | 22 | } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetExpiringLicenses_Result.cs
@@ -13,18 +13,17 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,18 +13,17 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetExpiringLicenses_Result | 14 | public partial class usp_GetExpiringLicenses_Result |
15 | { | 15 | { |
16 | - public Nullable<long> Serial_No { get; set; } | ||
17 | public string AccountNumber { get; set; } | 16 | public string AccountNumber { get; set; } |
18 | public string LicenseeName { get; set; } | 17 | public string LicenseeName { get; set; } |
19 | public string LicenseType { get; set; } | 18 | public string LicenseType { get; set; } |
20 | public string InstitutionName { get; set; } | 19 | public string InstitutionName { get; set; } |
21 | public string Edition { get; set; } | 20 | public string Edition { get; set; } |
22 | - public string StartDate { get; set; } | ||
23 | - public string EndDate { get; set; } | ||
24 | - public string LicenseCreationDate { get; set; } | 21 | + public Nullable<System.DateTime> StartDate { get; set; } |
22 | + public Nullable<System.DateTime> EndDate { get; set; } | ||
23 | + public Nullable<System.DateTime> LicenseCreationDate { get; set; } | ||
25 | public Nullable<decimal> SubscriptionPrice { get; set; } | 24 | public Nullable<decimal> SubscriptionPrice { get; set; } |
26 | public string AccountType { get; set; } | 25 | public string AccountType { get; set; } |
27 | public Nullable<int> DaysRemaining { get; set; } | 26 | public Nullable<int> DaysRemaining { get; set; } |
28 | - public int CardNumber { get; set; } | 27 | + public Nullable<int> CardNumber { get; set; } |
29 | } | 28 | } |
30 | } | 29 | } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetNetAdSummaryReport_Result.cs
@@ -13,7 +13,6 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,7 +13,6 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetNetAdSummaryReport_Result | 14 | public partial class usp_GetNetAdSummaryReport_Result |
15 | { | 15 | { |
16 | - public Nullable<long> Serial_No { get; set; } | ||
17 | public string LicenseType { get; set; } | 16 | public string LicenseType { get; set; } |
18 | public string AccountType { get; set; } | 17 | public string AccountType { get; set; } |
19 | public string InstitutionName { get; set; } | 18 | public string InstitutionName { get; set; } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSiteLicenseUsageReports_Result.cs
@@ -13,13 +13,12 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,13 +13,12 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetSiteLicenseUsageReports_Result | 14 | public partial class usp_GetSiteLicenseUsageReports_Result |
15 | { | 15 | { |
16 | - public Nullable<long> Serial_No { get; set; } | ||
17 | public string AccountNumber { get; set; } | 16 | public string AccountNumber { get; set; } |
18 | public string EditionTitle { get; set; } | 17 | public string EditionTitle { get; set; } |
19 | public string ReferalUrl { get; set; } | 18 | public string ReferalUrl { get; set; } |
20 | public string InstitutionName { get; set; } | 19 | public string InstitutionName { get; set; } |
21 | - public string LicenseCreationDate { get; set; } | 20 | + public Nullable<System.DateTime> LicenseCreationDate { get; set; } |
22 | public Nullable<int> TotalLogins { get; set; } | 21 | public Nullable<int> TotalLogins { get; set; } |
23 | - public string LastLogin { get; set; } | 22 | + public Nullable<System.DateTime> LastLogin { get; set; } |
24 | } | 23 | } |
25 | } | 24 | } |
400-SOURCECODE/AIAHTML5.ADMIN.API/Entity/usp_GetSubscribedLicenses_Result.cs
@@ -13,17 +13,16 @@ namespace AIAHTML5.ADMIN.API.Entity | @@ -13,17 +13,16 @@ namespace AIAHTML5.ADMIN.API.Entity | ||
13 | 13 | ||
14 | public partial class usp_GetSubscribedLicenses_Result | 14 | public partial class usp_GetSubscribedLicenses_Result |
15 | { | 15 | { |
16 | - public Nullable<long> Serial_No { get; set; } | ||
17 | public string AccountNumber { get; set; } | 16 | public string AccountNumber { get; set; } |
18 | public string LicenseeName { get; set; } | 17 | public string LicenseeName { get; set; } |
19 | public string LicenseType { get; set; } | 18 | public string LicenseType { get; set; } |
20 | public string InstitutionName { get; set; } | 19 | public string InstitutionName { get; set; } |
21 | public string AccountType { get; set; } | 20 | public string AccountType { get; set; } |
22 | public string Edition { get; set; } | 21 | public string Edition { get; set; } |
23 | - public string StartDate { get; set; } | ||
24 | - public string EndDate { get; set; } | ||
25 | - public string LicenseCreationDate { get; set; } | 22 | + public Nullable<System.DateTime> StartDate { get; set; } |
23 | + public Nullable<System.DateTime> EndDate { get; set; } | ||
24 | + public Nullable<System.DateTime> LicenseCreationDate { get; set; } | ||
26 | public Nullable<decimal> SubscriptionPrice { get; set; } | 25 | public Nullable<decimal> SubscriptionPrice { get; set; } |
27 | - public int CardNumber { get; set; } | 26 | + public Nullable<int> CardNumber { get; set; } |
28 | } | 27 | } |
29 | } | 28 | } |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.html
@@ -17,10 +17,11 @@ | @@ -17,10 +17,11 @@ | ||
17 | <div class="row"> | 17 | <div class="row"> |
18 | <div class="col-sm-12"> | 18 | <div class="col-sm-12"> |
19 | <div class="form-group marginTop5"> | 19 | <div class="form-group marginTop5"> |
20 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 20 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
21 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 21 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
22 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
23 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 22 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
23 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
24 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
24 | <span class="input-group-btn add-on"> | 25 | <span class="input-group-btn add-on"> |
25 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 26 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
26 | </span> | 27 | </span> |
@@ -32,10 +33,11 @@ | @@ -32,10 +33,11 @@ | ||
32 | 33 | ||
33 | <div class="col-sm-12"> | 34 | <div class="col-sm-12"> |
34 | <div class="form-group marginTop5"> | 35 | <div class="form-group marginTop5"> |
35 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 36 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
36 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 37 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
37 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
38 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 38 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
39 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
40 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
39 | <span class="input-group-btn add-on"> | 41 | <span class="input-group-btn add-on"> |
40 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 42 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
41 | </span> | 43 | </span> |
@@ -89,28 +91,7 @@ | @@ -89,28 +91,7 @@ | ||
89 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> | 91 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> |
90 | </div> | 92 | </div> |
91 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 93 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
92 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | ||
93 | - <!--modal--> | ||
94 | - <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | ||
95 | - <div class="modal-dialog modal-sm" role="document"> | ||
96 | - <div class="modal-content"> | ||
97 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | ||
98 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | ||
99 | - <h4 class="modal-title" id="">Alert</h4> | ||
100 | - </div> | ||
101 | - <div class="modal-body"> | ||
102 | - <h5>Account number does not exist in the system.</h5> | ||
103 | - </div> | ||
104 | - <div class="modal-footer"> | ||
105 | - <div class="row"> | ||
106 | - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | ||
107 | - </div> | ||
108 | - </div> | ||
109 | - | ||
110 | - </div> | ||
111 | - </div> | ||
112 | - </div>--> | ||
113 | - <!--modal--> | 94 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()" [disabled]="!DiscountCodeReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
114 | </div> | 95 | </div> |
115 | </div> | 96 | </div> |
116 | 97 | ||
@@ -122,15 +103,15 @@ | @@ -122,15 +103,15 @@ | ||
122 | </div> | 103 | </div> |
123 | 104 | ||
124 | <div class="well"> | 105 | <div class="well"> |
125 | - <table id="fixed_hdr2" class="table-hover "> | 106 | + <table id="fixed_hdr2" class="table-hover ui-widget-header sorttable"> |
126 | <thead> | 107 | <thead> |
127 | <tr> | 108 | <tr> |
128 | - <th>Discount Code</th> | ||
129 | - <th>Percentage</th> | ||
130 | - <th>Start Date</th> | ||
131 | - <th>End Date</th> | ||
132 | - <th>Status</th> | ||
133 | - <th>Total License</th> | 109 | + <th id="DiscountCode">Discount Code</th> |
110 | + <th id="Percentage">Percentage</th> | ||
111 | + <th id="StartDate">Start Date</th> | ||
112 | + <th id="EndDate">End Date</th> | ||
113 | + <th id="DiscountStatus">Status</th> | ||
114 | + <th id="TotalLicenses">Total License</th> | ||
134 | </tr> | 115 | </tr> |
135 | </thead> | 116 | </thead> |
136 | <tbody> | 117 | <tbody> |
@@ -141,8 +122,8 @@ | @@ -141,8 +122,8 @@ | ||
141 | <tr *ngFor="let item of lstDiscountCodeReport"> | 122 | <tr *ngFor="let item of lstDiscountCodeReport"> |
142 | <td>{{item.DiscountCode}}</td> | 123 | <td>{{item.DiscountCode}}</td> |
143 | <td>{{item.Percentage}}%</td> | 124 | <td>{{item.Percentage}}%</td> |
144 | - <td>{{item.StartDate}}</td> | ||
145 | - <td>{{item.EndDate}}</td> | 125 | + <td>{{item.StartDate | date: 'MM/dd/yyyy'}}</td> |
126 | + <td>{{item.EndDate | date: 'MM/dd/yyyy'}}</td> | ||
146 | <td>{{item.DiscountStatus}}</td> | 127 | <td>{{item.DiscountStatus}}</td> |
147 | <td>{{item.TotalLicenses}}</td> | 128 | <td>{{item.TotalLicenses}}</td> |
148 | </tr> | 129 | </tr> |
400-SOURCECODE/Admin/src/app/components/Reports/discountcodereport.component.ts
@@ -55,6 +55,18 @@ export class DiscountCodeReport implements OnInit { | @@ -55,6 +55,18 @@ export class DiscountCodeReport implements OnInit { | ||
55 | recordCount: number; | 55 | recordCount: number; |
56 | pageNo: number; | 56 | pageNo: number; |
57 | pageLength: number; | 57 | pageLength: number; |
58 | + actualPageNo: number; | ||
59 | + actualPageLength: number; | ||
60 | + SearchField:any={ | ||
61 | + sFromDate:new Date(), | ||
62 | + sToDate:new Date(), | ||
63 | + iDiscountCode:0, | ||
64 | + iAccountNumber:'', | ||
65 | + sortColumn:'StartDate', | ||
66 | + sortOrder:'asc', | ||
67 | + pageNo:1, | ||
68 | + pageLength:10 | ||
69 | + }; | ||
58 | // Declare height and width variables | 70 | // Declare height and width variables |
59 | scrHeight:any; | 71 | scrHeight:any; |
60 | scrWidth:any; | 72 | scrWidth:any; |
@@ -69,6 +81,9 @@ export class DiscountCodeReport implements OnInit { | @@ -69,6 +81,9 @@ export class DiscountCodeReport implements OnInit { | ||
69 | { | 81 | { |
70 | this.scrHeight = window.innerHeight-400; | 82 | this.scrHeight = window.innerHeight-400; |
71 | } | 83 | } |
84 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
85 | + | ||
86 | + $(".ft_container").css("height",this.scrHeight); | ||
72 | } | 87 | } |
73 | constructor(private router: Router, private reportservice: ReportService, | 88 | constructor(private router: Router, private reportservice: ReportService, |
74 | private manageDiscountCodeService: ManageDiscountCodeService, | 89 | private manageDiscountCodeService: ManageDiscountCodeService, |
@@ -99,25 +114,12 @@ export class DiscountCodeReport implements OnInit { | @@ -99,25 +114,12 @@ export class DiscountCodeReport implements OnInit { | ||
99 | width: "100%", | 114 | width: "100%", |
100 | height: this.scrHeight, | 115 | height: this.scrHeight, |
101 | colModal: [ | 116 | colModal: [ |
102 | - { width: 200, align: 'center' }, | 117 | + { width: 300, align: 'center' }, |
103 | { width: 230, align: 'center' }, | 118 | { width: 230, align: 'center' }, |
104 | { width: 250, align: 'Center' }, | 119 | { width: 250, align: 'Center' }, |
105 | { width: 250, align: 'Center' }, | 120 | { width: 250, align: 'Center' }, |
106 | { width: 350, align: 'Center' }, | 121 | { width: 350, align: 'Center' }, |
107 | - { width: 500, align: 'Center' }, | ||
108 | - // { width: 130, align: 'Center' }, | ||
109 | - // { width: 120, align: 'center' }, | ||
110 | - // { width: 280, align: 'Center' }, | ||
111 | - // { width: 180, align: 'center' }, | ||
112 | - // { width: 200, align: 'center' }, | ||
113 | - // { width: 170, align: 'center' }, | ||
114 | - // { width: 80, align: 'center' }, | ||
115 | - // { width: 150, align: 'center' }, | ||
116 | - // { width: 150, align: 'center' }, | ||
117 | - // { width: 180, align: 'Center' }, | ||
118 | - //{ width: 400, align: 'Center' }, | ||
119 | - //{ width: 150, align: 'center' }, | ||
120 | - //{ width: 110, align: 'center' }, | 122 | + { width: 400, align: 'Center' } |
121 | ], | 123 | ], |
122 | sort: true | 124 | sort: true |
123 | }); | 125 | }); |
@@ -127,16 +129,54 @@ export class DiscountCodeReport implements OnInit { | @@ -127,16 +129,54 @@ export class DiscountCodeReport implements OnInit { | ||
127 | this.recordCount = 0; | 129 | this.recordCount = 0; |
128 | this.pagerComponent = new PagerComponent(); | 130 | this.pagerComponent = new PagerComponent(); |
129 | 131 | ||
130 | - if(document.getElementById("fixed_table_rc") != null){ | ||
131 | - document.getElementById("fixed_table_rc").remove(); | ||
132 | - var testScript = document.createElement("script"); | ||
133 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
134 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
135 | - testScript.setAttribute("type", "text/javascript"); | ||
136 | - document.body.appendChild(testScript); | ||
137 | - } | 132 | + var thisObject=this;//class object |
133 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
134 | + | ||
135 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
136 | + { | ||
137 | + var fieldName=event.currentTarget.id; | ||
138 | + var sortType='' | ||
139 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
140 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
141 | + | ||
142 | + if (isAscSort) { | ||
143 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
144 | + sortType="desc"; | ||
145 | + } else { | ||
146 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
147 | + sortType="asc"; | ||
148 | + } | ||
149 | + | ||
150 | + thisObject.SortTableRecords(fieldName,sortType); | ||
151 | + | ||
152 | + } | ||
153 | + | ||
154 | + }); | ||
138 | 155 | ||
139 | } | 156 | } |
157 | + | ||
158 | + FromDateChange(dateValue: any){ | ||
159 | + this.alerts = ''; | ||
160 | + this.global.compareTwoDates(this.DiscountCodeReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
161 | + if (this.global.ValidationMsg != '') { | ||
162 | + this.alerts = this.global.ValidationMsg; | ||
163 | + } | ||
164 | + } | ||
165 | + | ||
166 | + ToDateChange(dateValue: any){ | ||
167 | + this.alerts = ''; | ||
168 | + this.global.compareTwoDates(dateValue._bsValue, this.DiscountCodeReportForm.controls['sFromDate'].value); | ||
169 | + if (this.global.ValidationMsg != '') { | ||
170 | + this.alerts = this.global.ValidationMsg; | ||
171 | + } | ||
172 | + } | ||
173 | + | ||
174 | + SortTableRecords(fieldName:string,sortType:string) { | ||
175 | + this.SearchField.sortColumn=fieldName; | ||
176 | + this.SearchField.sortOrder=sortType; | ||
177 | + | ||
178 | + this.GetSubscriptionReportList(); | ||
179 | + } | ||
140 | 180 | ||
141 | GetDiscountCode() { | 181 | GetDiscountCode() { |
142 | this.reportservice.GetDiscountCodes().subscribe(st => { this.lstDiscountCode = st; }, error => this.error = <any>error); | 182 | this.reportservice.GetDiscountCodes().subscribe(st => { this.lstDiscountCode = st; }, error => this.error = <any>error); |
@@ -155,34 +195,56 @@ export class DiscountCodeReport implements OnInit { | @@ -155,34 +195,56 @@ export class DiscountCodeReport implements OnInit { | ||
155 | } | 195 | } |
156 | 196 | ||
157 | GetDiscountReport(evt: any) { | 197 | GetDiscountReport(evt: any) { |
158 | - var tempArr = evt.split(','); | ||
159 | - this.pageNo = parseInt(tempArr[0]); | ||
160 | - var actulalength=this.pageLength; | 198 | + this.actualPageNo = this.pageNo; |
199 | + this.actualPageLength =this.pageLength; | ||
200 | + | ||
201 | + var tempArr = evt.split(','); | ||
202 | + this.pageNo = parseInt(tempArr[0]); | ||
161 | this.pageLength = parseInt(tempArr[1]); | 203 | this.pageLength = parseInt(tempArr[1]); |
162 | - this.alerts = ''; | ||
163 | - this.global.compareTwoDates(this.DiscountCodeReportForm.controls['sToDate'].value, this.DiscountCodeReportForm.controls['sFromDate'].value); | ||
164 | - if (this.global.ValidationMsg != '') { | ||
165 | - this.alerts = this.global.ValidationMsg | 204 | + |
205 | + this.SearchField.pageNo=this.pageNo; | ||
206 | + this.SearchField.pageLength=this.pageLength; | ||
207 | + | ||
208 | + this.GetSubscriptionReportList(); | ||
209 | + } | ||
210 | + | ||
211 | + GetSubscriptionReportList() { | ||
212 | + this._loadingService.ShowLoading("global-loading"); | ||
213 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
214 | + | ||
215 | + if (this.SearchField.sortOrder=='asc') { | ||
216 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
217 | + } else | ||
218 | + { | ||
219 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
220 | + } | ||
221 | + if (this.ExportingStart) { | ||
222 | + this.reportservice.GetDiscountReport(this.SearchField).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { | ||
223 | + //reset length after csvexport | ||
224 | + this.pageNo = this.actualPageNo; | ||
225 | + this.pageLength=this.actualPageLength; | ||
226 | + | ||
227 | + this.SearchField.pageNo=this.pageNo; | ||
228 | + this.SearchField.pageLength=this.pageLength; | ||
229 | + this.ExportService(DiscountCodeReports); }, error => this.error = <any>error); | ||
166 | } | 230 | } |
167 | - if (this.alerts == '') { | ||
168 | - this._loadingService.ShowLoading("global-loading"); | ||
169 | - this.NewSubscription = this.DiscountCodeReportForm.value; | ||
170 | - var obj = this.NewSubscription; | ||
171 | - if (this.ExportingStart) { | ||
172 | - this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { | ||
173 | - //reset length after csvexport | ||
174 | - this.pageLength=actulalength; | ||
175 | - this.ExportService(DiscountCodeReports); }, error => this.error = <any>error); | ||
176 | - } | ||
177 | - else { | ||
178 | - this.reportservice.GetDiscountReport(obj, this.pageNo, this.pageLength).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error); | ||
179 | - } | 231 | + else { |
232 | + this.reportservice.GetDiscountReport(this.SearchField).subscribe((DiscountCodeReports: DiscountCodeReports[]) => { this.BindFormFields(DiscountCodeReports); }, error => this.error = <any>error); | ||
180 | } | 233 | } |
181 | - } | ||
182 | - | ||
183 | - SearchRecords() { | 234 | + |
184 | this.ExportingStart = false; | 235 | this.ExportingStart = false; |
185 | - this.GetDiscountReport('1, ' + this.pageLength); | 236 | + } |
237 | + SearchRecords() { | ||
238 | + this.ExportingStart = false; | ||
239 | + this.pageNo=1; | ||
240 | + this.SearchField.sFromDate=this.DiscountCodeReportForm.controls['sFromDate'].value; | ||
241 | + this.SearchField.sToDate=this.DiscountCodeReportForm.controls['sToDate'].value; | ||
242 | + this.SearchField.iDiscountCode=this.DiscountCodeReportForm.controls['iDiscountCode'].value; | ||
243 | + this.SearchField.iAccountNumber=this.DiscountCodeReportForm.controls['iAccountNumber'].value; | ||
244 | + | ||
245 | + this.SearchField.pageNo=this.pageNo; | ||
246 | + | ||
247 | + this.GetSubscriptionReportList(); | ||
186 | } | 248 | } |
187 | 249 | ||
188 | BindFormFields(data) { | 250 | BindFormFields(data) { |
@@ -205,18 +267,19 @@ export class DiscountCodeReport implements OnInit { | @@ -205,18 +267,19 @@ export class DiscountCodeReport implements OnInit { | ||
205 | if (this.buttonStatus) { | 267 | if (this.buttonStatus) { |
206 | this.ExportingStart = true; | 268 | this.ExportingStart = true; |
207 | this.GetDiscountReport('1, ' + this.recordCount); | 269 | this.GetDiscountReport('1, ' + this.recordCount); |
208 | - this.ExportingStart = false; | ||
209 | } | 270 | } |
210 | } | 271 | } |
211 | 272 | ||
212 | ExportService(data: any) { | 273 | ExportService(data: any) { |
213 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
214 | - for (let i = 0; i < data.DiscountReportList.length; i++) { | ||
215 | - delete data.DiscountReportList[i][this.global.RemoveColumns[c].toString()]; | ||
216 | - } | ||
217 | - } | ||
218 | - this._loadingService.HideLoading("global-loading"); | ||
219 | - this.global.ExportToCSV(data.DiscountReportList, "DiscountReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | 274 | + |
275 | + for (let i = 0; i < data.DiscountReportList.length; i++) { | ||
276 | + data.DiscountReportList[i]['StartDate']= this.datePipe.transform(data.DiscountReportList[i]['StartDate'], 'MM/dd/yyyy'); | ||
277 | + data.DiscountReportList[i]['EndDate']= this.datePipe.transform(data.DiscountReportList[i]['EndDate'], 'MM/dd/yyyy'); | ||
278 | + } | ||
279 | + | ||
280 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
281 | + this.global.ExportToCSV(data.DiscountReportList, "DiscountReport-"+reportname); | ||
220 | 282 | ||
283 | + this._loadingService.HideLoading("global-loading"); | ||
221 | } | 284 | } |
222 | } | 285 | } |
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.html
@@ -22,10 +22,11 @@ | @@ -22,10 +22,11 @@ | ||
22 | <div class="row"> | 22 | <div class="row"> |
23 | <div class="col-sm-12"> | 23 | <div class="col-sm-12"> |
24 | <div class="form-group marginTop5"> | 24 | <div class="form-group marginTop5"> |
25 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 25 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
26 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 26 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
27 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
28 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 27 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
28 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
29 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
29 | <span class="input-group-btn add-on"> | 30 | <span class="input-group-btn add-on"> |
30 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 31 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
31 | </span> | 32 | </span> |
@@ -37,10 +38,11 @@ | @@ -37,10 +38,11 @@ | ||
37 | 38 | ||
38 | <div class="col-sm-12"> | 39 | <div class="col-sm-12"> |
39 | <div class="form-group marginTop5"> | 40 | <div class="form-group marginTop5"> |
40 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 41 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
41 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 42 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
42 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
43 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 43 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
44 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
45 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
44 | <span class="input-group-btn add-on"> | 46 | <span class="input-group-btn add-on"> |
45 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 47 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
46 | </span> | 48 | </span> |
@@ -140,7 +142,7 @@ | @@ -140,7 +142,7 @@ | ||
140 | 142 | ||
141 | <div class="col-sm-12"> | 143 | <div class="col-sm-12"> |
142 | <div class="form-group marginTop5 text-right"> | 144 | <div class="form-group marginTop5 text-right"> |
143 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | 145 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()" [disabled]="!ExpiringSubscriptionReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
144 | </div> | 146 | </div> |
145 | </div> | 147 | </div> |
146 | 148 | ||
@@ -152,21 +154,20 @@ | @@ -152,21 +154,20 @@ | ||
152 | </div> | 154 | </div> |
153 | 155 | ||
154 | <div class="well"> | 156 | <div class="well"> |
155 | - <table id="fixed_hdr2" class="table-hover "> | 157 | + <table id="fixed_hdr2" class="table-hover ui-widget-header sorttable"> |
156 | <thead> | 158 | <thead> |
157 | <tr> | 159 | <tr> |
158 | - <th>Account Number</th> | ||
159 | - <th>Licensee Name</th> | ||
160 | - <th>License Type</th> | ||
161 | - <th>Institution Name</th> | ||
162 | - <th>Account Type</th> | ||
163 | - | ||
164 | - <th>Start Date</th> | ||
165 | - <th>End Date</th> | ||
166 | - <th>Original Entry Date</th> | ||
167 | - <th>Subscription Price</th> | ||
168 | - <th (click)="sort('TimePeriod')">Time Period</th> | ||
169 | - <th>Credit Card Number</th> | 160 | + <th id="AccountNumber">Account Number</th> |
161 | + <th id="LicenseeName">Licensee Name</th> | ||
162 | + <th id="LicenseType">License Type</th> | ||
163 | + <th id="InstitutionName">Institution Name</th> | ||
164 | + <th id="AccountType">Account Type</th> | ||
165 | + <th id="StartDate">Start Date</th> | ||
166 | + <th id="EndDate">End Date</th> | ||
167 | + <th id="LicenseCreationDate">Original Entry Date</th> | ||
168 | + <th id="SubscriptionPrice">Subscription Price</th> | ||
169 | + <th id="DaysRemaining">Time Period</th> | ||
170 | + <th id="CardNumber">Card Number</th> | ||
170 | </tr> | 171 | </tr> |
171 | </thead> | 172 | </thead> |
172 | <tbody> | 173 | <tbody> |
@@ -179,11 +180,10 @@ | @@ -179,11 +180,10 @@ | ||
179 | <td>{{esr.LicenseeName}}</td> | 180 | <td>{{esr.LicenseeName}}</td> |
180 | <td>{{esr.LicenseType}}</td> | 181 | <td>{{esr.LicenseType}}</td> |
181 | <td>{{esr.InstitutionName}}</td> | 182 | <td>{{esr.InstitutionName}}</td> |
182 | - <td>{{esr.AccountType}}</td> | ||
183 | - | ||
184 | - <td>{{esr.StartDate}}</td> | ||
185 | - <td>{{esr.EndDate}}</td> | ||
186 | - <td>{{esr.LicenseCreationDate}}</td> | 183 | + <td>{{esr.AccountType}}</td> |
184 | + <td>{{esr.StartDate | date: 'MM/dd/yyyy'}}</td> | ||
185 | + <td>{{esr.EndDate | date: 'MM/dd/yyyy'}}</td> | ||
186 | + <td>{{esr.LicenseCreationDate | date: 'MM/dd/yyyy'}}</td> | ||
187 | <td>{{esr.SubscriptionPrice}}</td> | 187 | <td>{{esr.SubscriptionPrice}}</td> |
188 | <td>{{esr.DaysRemaining}}</td> | 188 | <td>{{esr.DaysRemaining}}</td> |
189 | <td>{{esr.CardNumber}}</td> | 189 | <td>{{esr.CardNumber}}</td> |
400-SOURCECODE/Admin/src/app/components/Reports/expiringsubscriptionreport.component.ts
@@ -58,10 +58,25 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | @@ -58,10 +58,25 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | ||
58 | recordCount: number; | 58 | recordCount: number; |
59 | pageNo: number; | 59 | pageNo: number; |
60 | pageLength: number; | 60 | pageLength: number; |
61 | - key: string = 'AccountNumber'; //set default | ||
62 | - reverse: boolean = false; | ||
63 | - | ||
64 | ExpiringSubscription = new ExpiringSubscriptionReports(); | 61 | ExpiringSubscription = new ExpiringSubscriptionReports(); |
62 | + actualPageNo: number; | ||
63 | + actualPageLength: number; | ||
64 | + SearchField:any={ | ||
65 | + sFromDate:new Date(), | ||
66 | + sToDate:new Date(), | ||
67 | + iLicenseTypeId:0, | ||
68 | + iAccountTypeId:0, | ||
69 | + sZip:'', | ||
70 | + iStateId:0, | ||
71 | + iCountryId:0, | ||
72 | + iStartPrice:0, | ||
73 | + iEndPrice:-1, | ||
74 | + sortColumn:'AccountNumber', | ||
75 | + sortOrder:'asc', | ||
76 | + pageNo:1, | ||
77 | + pageLength:10 | ||
78 | + }; | ||
79 | + | ||
65 | // Declare height and width variables | 80 | // Declare height and width variables |
66 | scrHeight:any; | 81 | scrHeight:any; |
67 | scrWidth:any; | 82 | scrWidth:any; |
@@ -76,6 +91,9 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | @@ -76,6 +91,9 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | ||
76 | { | 91 | { |
77 | this.scrHeight = window.innerHeight-480; | 92 | this.scrHeight = window.innerHeight-480; |
78 | } | 93 | } |
94 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
95 | + | ||
96 | + $(".ft_container").css("height",this.scrHeight); | ||
79 | 97 | ||
80 | } | 98 | } |
81 | constructor(private router: Router, private reportservice: ReportService, | 99 | constructor(private router: Router, private reportservice: ReportService, |
@@ -87,16 +105,15 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | @@ -87,16 +105,15 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | ||
87 | this.ExportingStart = false; | 105 | this.ExportingStart = false; |
88 | this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' }); | 106 | this.bsConfig = Object.assign({}, { containerClass: 'theme-dark-blue' }); |
89 | this.NoRecord = this.global.NoRecords; | 107 | this.NoRecord = this.global.NoRecords; |
90 | - let ExpiringSubscriptionReport = new ExpiringSubscriptionReports(); | ||
91 | this.previousdate.setDate(this.previousdate.getDate()); | 108 | this.previousdate.setDate(this.previousdate.getDate()); |
92 | this.ExpiringSubscriptionReportForm = this.fb.group({ | 109 | this.ExpiringSubscriptionReportForm = this.fb.group({ |
93 | - sFromDate: [this.previousdate], | ||
94 | - sToDate: [this.date], | 110 | + sFromDate: [this.previousdate,[Validators.required]], |
111 | + sToDate: [this.date,[Validators.required]], | ||
95 | sZip: [''], | 112 | sZip: [''], |
96 | iLicenseTypeId: [0], | 113 | iLicenseTypeId: [0], |
97 | iAccountTypeId: [0], | 114 | iAccountTypeId: [0], |
98 | iStateId: [0], | 115 | iStateId: [0], |
99 | - iStartPrice: [0.00], | 116 | + iStartPrice: [''], |
100 | iEndPrice: [''], | 117 | iEndPrice: [''], |
101 | iCountryId: [0] | 118 | iCountryId: [0] |
102 | }); | 119 | }); |
@@ -116,38 +133,71 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | @@ -116,38 +133,71 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | ||
116 | width: "100%", | 133 | width: "100%", |
117 | height: this.scrHeight, | 134 | height: this.scrHeight, |
118 | colModal: [ | 135 | colModal: [ |
119 | - { width: 160, align: 'center' }, | 136 | + { width: 150, align: 'center' }, |
120 | { width: 180, align: 'center' }, | 137 | { width: 180, align: 'center' }, |
121 | { width: 150, align: 'Center' }, | 138 | { width: 150, align: 'Center' }, |
122 | { width: 250, align: 'Center' }, | 139 | { width: 250, align: 'Center' }, |
123 | { width: 160, align: 'Center' }, | 140 | { width: 160, align: 'Center' }, |
124 | { width: 130, align: 'Center' }, | 141 | { width: 130, align: 'Center' }, |
125 | { width: 130, align: 'Center' }, | 142 | { width: 130, align: 'Center' }, |
126 | - { width: 150, align: 'center' }, | 143 | + { width: 160, align: 'center' }, |
127 | { width: 160, align: 'Center' }, | 144 | { width: 160, align: 'Center' }, |
128 | { width: 150, align: 'center' }, | 145 | { width: 150, align: 'center' }, |
129 | - { width: 160, align: 'center' }, | ||
130 | - // { width: 170, align: 'center' }, | ||
131 | - // { width: 80, align: 'center' }, | ||
132 | - // { width: 150, align: 'center' }, | ||
133 | - // { width: 150, align: 'center' }, | ||
134 | - // { width: 180, align: 'Center' }, | ||
135 | - //{ width: 400, align: 'Center' }, | ||
136 | - //{ width: 150, align: 'center' }, | ||
137 | - //{ width: 110, align: 'center' }, | 146 | + { width: 140, align: 'center' }, |
147 | + | ||
138 | ], | 148 | ], |
139 | sort: true | 149 | sort: true |
140 | }); | 150 | }); |
141 | 151 | ||
142 | - if(document.getElementById("fixed_table_rc") != null){ | ||
143 | - document.getElementById("fixed_table_rc").remove(); | ||
144 | - var testScript = document.createElement("script"); | ||
145 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
146 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
147 | - testScript.setAttribute("type", "text/javascript"); | ||
148 | - document.body.appendChild(testScript); | ||
149 | - } | 152 | + var thisObject=this;//class object |
153 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
154 | + | ||
155 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
156 | + { | ||
157 | + var fieldName=event.currentTarget.id; | ||
158 | + var sortType='' | ||
159 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
160 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
161 | + | ||
162 | + if (isAscSort) { | ||
163 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
164 | + sortType="desc"; | ||
165 | + } else { | ||
166 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
167 | + sortType="asc"; | ||
168 | + } | ||
169 | + | ||
170 | + thisObject.SortTableRecords(fieldName,sortType); | ||
171 | + | ||
172 | + } | ||
173 | + | ||
174 | + }); | ||
175 | + | ||
150 | } | 176 | } |
177 | + | ||
178 | + FromDateChange(dateValue: any){ | ||
179 | + this.alerts = ''; | ||
180 | + this.global.compareTwoDates(this.ExpiringSubscriptionReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
181 | + if (this.global.ValidationMsg != '') { | ||
182 | + this.alerts = this.global.ValidationMsg; | ||
183 | + } | ||
184 | + } | ||
185 | + | ||
186 | + ToDateChange(dateValue: any){ | ||
187 | + this.alerts = ''; | ||
188 | + this.global.compareTwoDates(dateValue._bsValue, this.ExpiringSubscriptionReportForm.controls['sFromDate'].value); | ||
189 | + if (this.global.ValidationMsg != '') { | ||
190 | + this.alerts = this.global.ValidationMsg; | ||
191 | + } | ||
192 | + } | ||
193 | + | ||
194 | + SortTableRecords(fieldName:string,sortType:string) { | ||
195 | + this.SearchField.sortColumn=fieldName; | ||
196 | + this.SearchField.sortOrder=sortType; | ||
197 | + | ||
198 | + this.GetExpiringSubscriptionReportList(); | ||
199 | + } | ||
200 | + | ||
151 | ngAfterViewChecked() { | 201 | ngAfterViewChecked() { |
152 | $('#fixed_hdr2 thead').css('width', $('#fixed_hdr2 tbody tr:eq(0)').width()); | 202 | $('#fixed_hdr2 thead').css('width', $('#fixed_hdr2 tbody tr:eq(0)').width()); |
153 | } | 203 | } |
@@ -168,58 +218,84 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | @@ -168,58 +218,84 @@ export class ExpiringSubscriptionReport implements OnInit, AfterViewChecked { | ||
168 | } | 218 | } |
169 | 219 | ||
170 | GetExpiringSubscriptionReport(evt: any) { | 220 | GetExpiringSubscriptionReport(evt: any) { |
171 | - var tempArr = evt.split(','); | ||
172 | - this.pageNo = parseInt(tempArr[0]); | ||
173 | - var actulalength=this.pageLength; | 221 | + this.actualPageNo = this.pageNo; |
222 | + this.actualPageLength =this.pageLength; | ||
223 | + | ||
224 | + var tempArr = evt.split(','); | ||
225 | + this.pageNo = parseInt(tempArr[0]); | ||
174 | this.pageLength = parseInt(tempArr[1]); | 226 | this.pageLength = parseInt(tempArr[1]); |
175 | - this.alerts = ''; | ||
176 | - this.global.compareTwoDates(this.ExpiringSubscriptionReportForm.controls['sToDate'].value, this.ExpiringSubscriptionReportForm.controls['sFromDate'].value); | ||
177 | - if (this.global.ValidationMsg != '') { | ||
178 | - this.alerts = this.global.ValidationMsg | ||
179 | - } | ||
180 | - if (this.alerts == '') { | ||
181 | - this._loadingService.ShowLoading("global-loading"); | ||
182 | - this.ExpiringSubscription = this.ExpiringSubscriptionReportForm.value; | ||
183 | - var obj = this.ExpiringSubscription; | ||
184 | - if (this.ExportingStart) { | ||
185 | - this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { | ||
186 | - //reset length after csvexport | ||
187 | - this.pageLength=actulalength; | ||
188 | - this.ExportService(ExpiringSubscriptionReports); }, error => this.error = <any>error); | ||
189 | - } | ||
190 | - else { | ||
191 | - this.reportservice.GetExpiringSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.BindFormFields(ExpiringSubscriptionReports); }, error => this.error = <any>error); | ||
192 | - } | ||
193 | - | ||
194 | - } | ||
195 | - | 227 | + |
228 | + this.SearchField.pageNo=this.pageNo; | ||
229 | + this.SearchField.pageLength=this.pageLength; | ||
230 | + | ||
231 | + this.GetExpiringSubscriptionReportList(); | ||
196 | } | 232 | } |
197 | - SearchRecords() { | 233 | + |
234 | + GetExpiringSubscriptionReportList() { | ||
235 | + this._loadingService.ShowLoading("global-loading"); | ||
236 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
237 | + | ||
238 | + if (this.SearchField.sortOrder=='asc') { | ||
239 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
240 | + } else | ||
241 | + { | ||
242 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
243 | + } | ||
244 | + if (this.ExportingStart) { | ||
245 | + this.reportservice.GetExpiringSubscriptionReport(this.SearchField).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { | ||
246 | + //reset length after csvexport | ||
247 | + this.pageNo = this.actualPageNo; | ||
248 | + this.pageLength=this.actualPageLength; | ||
249 | + | ||
250 | + this.SearchField.pageNo=this.pageNo; | ||
251 | + this.SearchField.pageLength=this.pageLength; | ||
252 | + this.ExportService(ExpiringSubscriptionReports); }, error => this.error = <any>error); | ||
253 | + } | ||
254 | + else { | ||
255 | + this.reportservice.GetExpiringSubscriptionReport(this.SearchField).subscribe((ExpiringSubscriptionReports: ExpiringSubscriptionReports[]) => { this.BindFormFields(ExpiringSubscriptionReports); }, error => this.error = <any>error); | ||
256 | + } | ||
257 | + | ||
198 | this.ExportingStart = false; | 258 | this.ExportingStart = false; |
199 | - this.GetExpiringSubscriptionReport('1, ' + this.pageLength); | 259 | + } |
260 | + | ||
261 | + | ||
262 | + SearchRecords() { | ||
263 | + this.ExportingStart = false; | ||
264 | + this.pageNo=1; | ||
265 | + this.SearchField.sFromDate=this.ExpiringSubscriptionReportForm.controls['sFromDate'].value; | ||
266 | + this.SearchField.sToDate=this.ExpiringSubscriptionReportForm.controls['sToDate'].value; | ||
267 | + this.SearchField.iLicenseTypeId=this.ExpiringSubscriptionReportForm.controls['iLicenseTypeId'].value; | ||
268 | + this.SearchField.iAccountTypeId=this.ExpiringSubscriptionReportForm.controls['iAccountTypeId'].value; | ||
269 | + this.SearchField.sZip=this.ExpiringSubscriptionReportForm.controls['sZip'].value; | ||
270 | + this.SearchField.iStateId=this.ExpiringSubscriptionReportForm.controls['iStateId'].value; | ||
271 | + this.SearchField.iCountryId=this.ExpiringSubscriptionReportForm.controls['iCountryId'].value; | ||
272 | + this.SearchField.iStartPrice=this.ExpiringSubscriptionReportForm.controls['iStartPrice'].value; | ||
273 | + this.SearchField.iEndPrice=this.ExpiringSubscriptionReportForm.controls['iEndPrice'].value; | ||
274 | + | ||
275 | + this.SearchField.pageNo=this.pageNo; | ||
276 | + | ||
277 | + this.GetExpiringSubscriptionReportList(); | ||
278 | + | ||
200 | } | 279 | } |
280 | + | ||
201 | ExportEvent() { | 281 | ExportEvent() { |
202 | if (this.buttonStatus) { | 282 | if (this.buttonStatus) { |
203 | this.ExportingStart = true; | 283 | this.ExportingStart = true; |
204 | - this.GetExpiringSubscriptionReport('1, ' + this.recordCount); | ||
205 | - this.ExportingStart = false; | 284 | + this.GetExpiringSubscriptionReport('1, ' + this.recordCount); |
206 | } | 285 | } |
207 | } | 286 | } |
208 | ExportService(data: any) { | 287 | ExportService(data: any) { |
209 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
210 | - for (let i = 0; i < data.ExpiringSubscription.length; i++) { | ||
211 | - delete data.ExpiringSubscription[i][this.global.RemoveColumns[c].toString()]; | ||
212 | - } | ||
213 | - } | 288 | + for (let i = 0; i < data.ExpiringSubscription.length; i++) { |
289 | + data.ExpiringSubscription[i]['StartDate']= this.datePipe.transform(data.ExpiringSubscription[i]['StartDate'], 'MM/dd/yyyy'); | ||
290 | + data.ExpiringSubscription[i]['EndDate']= this.datePipe.transform(data.ExpiringSubscription[i]['EndDate'], 'MM/dd/yyyy'); | ||
291 | + data.ExpiringSubscription[i]['LicenseCreationDate']= this.datePipe.transform(data.ExpiringSubscription[i]['LicenseCreationDate'], 'MM/dd/yyyy'); | ||
292 | + } | ||
293 | + | ||
294 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
295 | + this.global.ExportToCSV(data.ExpiringSubscription, "ExpiringSubscriptionReport-"+reportname); | ||
296 | + | ||
214 | this._loadingService.HideLoading("global-loading"); | 297 | this._loadingService.HideLoading("global-loading"); |
215 | - this.global.ExportToCSV(data.ExpiringSubscription, "ExpiringSubscriptionReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ||
216 | - | ||
217 | - } | ||
218 | - | ||
219 | - sort(key) { | ||
220 | - debugger;; | ||
221 | - this.key = key; | ||
222 | - this.reverse = !this.reverse; | 298 | + |
223 | } | 299 | } |
224 | 300 | ||
225 | BindFormFields(datas) { | 301 | BindFormFields(datas) { |
400-SOURCECODE/Admin/src/app/components/Reports/imageexportreport.component.ts
@@ -247,7 +247,7 @@ export class ImageExportReport implements OnInit { | @@ -247,7 +247,7 @@ export class ImageExportReport implements OnInit { | ||
247 | } | 247 | } |
248 | 248 | ||
249 | var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | 249 | var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() |
250 | - this.global.ExportToCSV(data.ImageExportList, "UsageReport-"+reportname); | 250 | + this.global.ExportToCSV(data.ImageExportList, "ImageExportReport-"+reportname); |
251 | 251 | ||
252 | this._loadingService.HideLoading("global-loading"); | 252 | this._loadingService.HideLoading("global-loading"); |
253 | 253 |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.html
@@ -16,10 +16,11 @@ | @@ -16,10 +16,11 @@ | ||
16 | <div class="row"> | 16 | <div class="row"> |
17 | <div class="col-sm-12"> | 17 | <div class="col-sm-12"> |
18 | <div class="form-group marginTop5"> | 18 | <div class="form-group marginTop5"> |
19 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 19 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
21 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
22 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 21 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
22 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
23 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
23 | <span class="input-group-btn add-on"> | 24 | <span class="input-group-btn add-on"> |
24 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 25 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
25 | </span> | 26 | </span> |
@@ -31,10 +32,11 @@ | @@ -31,10 +32,11 @@ | ||
31 | 32 | ||
32 | <div class="col-sm-12"> | 33 | <div class="col-sm-12"> |
33 | <div class="form-group marginTop5"> | 34 | <div class="form-group marginTop5"> |
34 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 35 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
35 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 36 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
36 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
37 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 37 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
38 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
39 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
38 | <span class="input-group-btn add-on"> | 40 | <span class="input-group-btn add-on"> |
39 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 41 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
40 | </span> | 42 | </span> |
@@ -83,7 +85,7 @@ | @@ -83,7 +85,7 @@ | ||
83 | 85 | ||
84 | <div class="col-sm-12"> | 86 | <div class="col-sm-12"> |
85 | <div class="form-group marginTop5 text-right"> | 87 | <div class="form-group marginTop5 text-right"> |
86 | - <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 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()" [disabled]="!NetAdSubscriptionReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
87 | </div> | 89 | </div> |
88 | </div> | 90 | </div> |
89 | </div> | 91 | </div> |
@@ -93,17 +95,17 @@ | @@ -93,17 +95,17 @@ | ||
93 | </div> | 95 | </div> |
94 | 96 | ||
95 | <div class="well"> | 97 | <div class="well"> |
96 | - <table id="fixed_hdr2" class="table-hover "> | 98 | + <table id="fixed_hdr2" class="table-hover ui-widget-header sorttable"> |
97 | <thead> | 99 | <thead> |
98 | <tr> | 100 | <tr> |
99 | - <th>License Type</th> | ||
100 | - <th>Account Type</th> | ||
101 | - <th>Institution Name</th> | ||
102 | - <th>Original Entry Date</th> | ||
103 | - <th>Total Active Subscriptions</th> | ||
104 | - <th>Total Renew Subscriptions</th> | ||
105 | - <th>No. of Cancelled Subscription</th> | ||
106 | - <th>Net Ads</th> | 101 | + <th id="LicenseType">License Type</th> |
102 | + <th id="AccountType">Account Type</th> | ||
103 | + <th id="InstitutionName">Institution Name</th> | ||
104 | + <th id="LicenseCreationDate">Original Entry Date</th> | ||
105 | + <th id="ActiveSubscription">Total Active Subscriptions</th> | ||
106 | + <th id="RenewSubscription">Total Renew Subscriptions</th> | ||
107 | + <th id="InActiveSubscription">No. of Cancelled Subscription</th> | ||
108 | + <th id="NetAdSubscription">Net Ads</th> | ||
107 | </tr> | 109 | </tr> |
108 | </thead> | 110 | </thead> |
109 | <tbody> | 111 | <tbody> |
@@ -114,7 +116,7 @@ | @@ -114,7 +116,7 @@ | ||
114 | <td>{{item.LicenseType}}</td> | 116 | <td>{{item.LicenseType}}</td> |
115 | <td>{{item.AccountType}}</td> | 117 | <td>{{item.AccountType}}</td> |
116 | <td>{{item.InstitutionName}}</td> | 118 | <td>{{item.InstitutionName}}</td> |
117 | - <td>{{item.LicenseCreationDate=='01/01/9999'?'':item.LicenseCreationDate| date: 'MM/dd/yyyy'}}</td> | 119 | + <td>{{item.LicenseCreationDate| date: 'MM/dd/yyyy'}}</td> |
118 | <td>{{item.ActiveSubscription}}</td> | 120 | <td>{{item.ActiveSubscription}}</td> |
119 | <td>{{item.RenewSubscription}}</td> | 121 | <td>{{item.RenewSubscription}}</td> |
120 | <td>{{item.InActiveSubscription}}</td> | 122 | <td>{{item.InActiveSubscription}}</td> |
400-SOURCECODE/Admin/src/app/components/Reports/netadsubscriptionreport.component.ts
@@ -54,6 +54,19 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -54,6 +54,19 @@ export class NetAdSubscriptionReport implements OnInit { | ||
54 | recordCount: number; | 54 | recordCount: number; |
55 | pageNo: number; | 55 | pageNo: number; |
56 | pageLength: number; | 56 | pageLength: number; |
57 | + actualPageNo: number; | ||
58 | + actualPageLength: number; | ||
59 | + SearchField:any={ | ||
60 | + sFromDate:new Date(), | ||
61 | + sToDate:new Date(), | ||
62 | + iLicenseTypeId:0, | ||
63 | + iStartPrice:0, | ||
64 | + iEndPrice:-1, | ||
65 | + sortColumn:'LicenseCreationDate', | ||
66 | + sortOrder:'asc', | ||
67 | + pageNo:1, | ||
68 | + pageLength:10 | ||
69 | + }; | ||
57 | // Declare height and width variables | 70 | // Declare height and width variables |
58 | scrHeight:any; | 71 | scrHeight:any; |
59 | scrWidth:any; | 72 | scrWidth:any; |
@@ -68,6 +81,9 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -68,6 +81,9 @@ export class NetAdSubscriptionReport implements OnInit { | ||
68 | { | 81 | { |
69 | this.scrHeight = window.innerHeight-405; | 82 | this.scrHeight = window.innerHeight-405; |
70 | } | 83 | } |
84 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
85 | + | ||
86 | + $(".ft_container").css("height",this.scrHeight); | ||
71 | } | 87 | } |
72 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | 88 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, |
73 | private modalService: BsModalService, public global: GlobalService, | 89 | private modalService: BsModalService, public global: GlobalService, |
@@ -84,7 +100,7 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -84,7 +100,7 @@ export class NetAdSubscriptionReport implements OnInit { | ||
84 | sFromDate: [this.previousdate], | 100 | sFromDate: [this.previousdate], |
85 | sToDate: [this.date], | 101 | sToDate: [this.date], |
86 | iLicenseTypeId: [0], | 102 | iLicenseTypeId: [0], |
87 | - iStartPrice: [0], | 103 | + iStartPrice: [''], |
88 | iEndPrice: [''], | 104 | iEndPrice: [''], |
89 | }); | 105 | }); |
90 | this.alerts = ''; | 106 | this.alerts = ''; |
@@ -101,67 +117,121 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -101,67 +117,121 @@ export class NetAdSubscriptionReport implements OnInit { | ||
101 | colModal: [ | 117 | colModal: [ |
102 | { width: 180, align: 'center' }, | 118 | { width: 180, align: 'center' }, |
103 | { width: 230, align: 'center' }, | 119 | { width: 230, align: 'center' }, |
104 | - { width: 250, align: 'Center' }, | ||
105 | - { width: 150, align: 'Center' }, | ||
106 | - { width: 350, align: 'Center' }, | 120 | + { width: 300, align: 'Center' }, |
121 | + { width: 200, align: 'Center' }, | ||
122 | + { width: 300, align: 'Center' }, | ||
107 | { width: 200, align: 'Center' }, | 123 | { width: 200, align: 'Center' }, |
108 | { width: 250, align: 'Center' }, | 124 | { width: 250, align: 'Center' }, |
109 | - { width: 120, align: 'center' }, | ||
110 | - // { width: 280, align: 'Center' }, | ||
111 | - // { width: 180, align: 'center' }, | ||
112 | - // { width: 200, align: 'center' }, | ||
113 | - // { width: 170, align: 'center' }, | ||
114 | - // { width: 80, align: 'center' }, | ||
115 | - // { width: 150, align: 'center' }, | ||
116 | - // { width: 150, align: 'center' }, | ||
117 | - // { width: 180, align: 'Center' }, | 125 | + { width: 130, align: 'center' } |
118 | ], | 126 | ], |
119 | sort: true | 127 | sort: true |
120 | }); | 128 | }); |
121 | - if(document.getElementById("fixed_table_rc") != null){ | ||
122 | - document.getElementById("fixed_table_rc").remove(); | ||
123 | - var testScript = document.createElement("script"); | ||
124 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
125 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
126 | - testScript.setAttribute("type", "text/javascript"); | ||
127 | - document.body.appendChild(testScript); | ||
128 | - } | 129 | + |
130 | + var thisObject=this;//class object | ||
131 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
132 | + | ||
133 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
134 | + { | ||
135 | + var fieldName=event.currentTarget.id; | ||
136 | + var sortType='' | ||
137 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
138 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
139 | + | ||
140 | + if (isAscSort) { | ||
141 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
142 | + sortType="desc"; | ||
143 | + } else { | ||
144 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
145 | + sortType="asc"; | ||
146 | + } | ||
147 | + | ||
148 | + thisObject.SortTableRecords(fieldName,sortType); | ||
149 | + | ||
150 | + } | ||
151 | + | ||
152 | + }); | ||
129 | } | 153 | } |
154 | + | ||
155 | + FromDateChange(dateValue: any){ | ||
156 | + this.alerts = ''; | ||
157 | + this.global.compareTwoDates(this.NetAdSubscriptionReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
158 | + if (this.global.ValidationMsg != '') { | ||
159 | + this.alerts = this.global.ValidationMsg; | ||
160 | + } | ||
161 | + } | ||
162 | + | ||
163 | + ToDateChange(dateValue: any){ | ||
164 | + this.alerts = ''; | ||
165 | + this.global.compareTwoDates(dateValue._bsValue, this.NetAdSubscriptionReportForm.controls['sFromDate'].value); | ||
166 | + if (this.global.ValidationMsg != '') { | ||
167 | + this.alerts = this.global.ValidationMsg; | ||
168 | + } | ||
169 | + } | ||
170 | + | ||
171 | + SortTableRecords(fieldName:string,sortType:string) { | ||
172 | + this.SearchField.sortColumn=fieldName; | ||
173 | + this.SearchField.sortOrder=sortType; | ||
174 | + | ||
175 | + this.GetNetAdSummaryReportList(); | ||
176 | + } | ||
130 | 177 | ||
131 | GetLicenceType() { | 178 | GetLicenceType() { |
132 | this.reportservice.GetLicenceType().subscribe(st => { this.lstLicenceType = st; }, error => this.error = <any>error); | 179 | this.reportservice.GetLicenceType().subscribe(st => { this.lstLicenceType = st; }, error => this.error = <any>error); |
133 | } | 180 | } |
134 | - | ||
135 | - GetNetAdSummaryReport(evt: any) { | ||
136 | - this.alerts = ''; | ||
137 | - this.global.compareTwoDates(this.NetAdSubscriptionReportForm.controls['sToDate'].value, this.NetAdSubscriptionReportForm.controls['sFromDate'].value); | ||
138 | - if (this.global.ValidationMsg != '') { | ||
139 | - this.alerts = this.global.ValidationMsg | ||
140 | - } | ||
141 | - if (this.alerts == '') { | ||
142 | - this._loadingService.ShowLoading("global-loading"); | ||
143 | - var tempArr = evt.split(','); | ||
144 | - this.pageNo = parseInt(tempArr[0]); | ||
145 | - var actulalength=this.pageLength; | ||
146 | - this.pageLength = parseInt(tempArr[1]); | ||
147 | - this._loadingService.ShowLoading("global-loading"); | ||
148 | - this.NetAdSubscriptionReport = this.NetAdSubscriptionReportForm.value; | ||
149 | - var obj = this.NetAdSubscriptionReport; | ||
150 | - if (this.ExportingStart) { | ||
151 | - this.reportservice.GetNetAdSummaryReport(obj, this.pageNo, this.pageLength).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { | ||
152 | - //reset length after csvexport | ||
153 | - this.pageLength=actulalength; | ||
154 | - this.ExportService(NetAdSubscriptionReports); }, error => this.error = <any>error); | ||
155 | - } | ||
156 | - else { | ||
157 | - this.reportservice.GetNetAdSummaryReport(obj, this.pageNo, this.pageLength).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.BindFormFields(NetAdSubscriptionReports); }, error => this.error = <any>error); | ||
158 | - } | ||
159 | - } | 181 | + |
182 | + GetNetAdSummaryReport(evt: any) { | ||
183 | + this.actualPageNo = this.pageNo; | ||
184 | + this.actualPageLength =this.pageLength; | ||
185 | + | ||
186 | + var tempArr = evt.split(','); | ||
187 | + this.pageNo = parseInt(tempArr[0]); | ||
188 | + this.pageLength = parseInt(tempArr[1]); | ||
189 | + | ||
190 | + this.SearchField.pageNo=this.pageNo; | ||
191 | + this.SearchField.pageLength=this.pageLength; | ||
192 | + | ||
193 | + this.GetNetAdSummaryReportList(); | ||
160 | } | 194 | } |
195 | + | ||
196 | + GetNetAdSummaryReportList() { | ||
197 | + this._loadingService.ShowLoading("global-loading"); | ||
198 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
199 | + | ||
200 | + if (this.SearchField.sortOrder=='asc') { | ||
201 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
202 | + } else | ||
203 | + { | ||
204 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
205 | + } | ||
206 | + if (this.ExportingStart) { | ||
207 | + this.reportservice.GetNetAdSummaryReport(this.SearchField).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { | ||
208 | + //reset length after csvexport | ||
209 | + this.pageNo = this.actualPageNo; | ||
210 | + this.pageLength=this.actualPageLength; | ||
211 | + | ||
212 | + this.SearchField.pageNo=this.pageNo; | ||
213 | + this.SearchField.pageLength=this.pageLength; | ||
214 | + this.ExportService(NetAdSubscriptionReports); }, error => this.error = <any>error); | ||
215 | + } | ||
216 | + else { | ||
217 | + this.reportservice.GetNetAdSummaryReport(this.SearchField).subscribe((NetAdSubscriptionReports: NetAdSubscriptionReports[]) => { this.BindFormFields(NetAdSubscriptionReports); }, error => this.error = <any>error); | ||
218 | + } | ||
219 | + | ||
220 | + this.ExportingStart = false; | ||
221 | + } | ||
161 | 222 | ||
162 | SearchRecords() { | 223 | SearchRecords() { |
163 | - this.ExportingStart = false; | ||
164 | - this.GetNetAdSummaryReport('1, ' + this.pageLength); | 224 | + this.ExportingStart = false; |
225 | + this.pageNo=1; | ||
226 | + this.SearchField.sFromDate=this.NetAdSubscriptionReportForm.controls['sFromDate'].value; | ||
227 | + this.SearchField.sToDate=this.NetAdSubscriptionReportForm.controls['sToDate'].value; | ||
228 | + this.SearchField.iLicenseTypeId=this.NetAdSubscriptionReportForm.controls['iLicenseTypeId'].value; | ||
229 | + this.SearchField.iStartPrice=this.NetAdSubscriptionReportForm.controls['iStartPrice'].value; | ||
230 | + this.SearchField.iEndPrice=this.NetAdSubscriptionReportForm.controls['iEndPrice'].value; | ||
231 | + | ||
232 | + this.SearchField.pageNo=this.pageNo; | ||
233 | + | ||
234 | + this.GetNetAdSummaryReportList(); | ||
165 | } | 235 | } |
166 | 236 | ||
167 | BindFormFields(data) { | 237 | BindFormFields(data) { |
@@ -175,22 +245,22 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -175,22 +245,22 @@ export class NetAdSubscriptionReport implements OnInit { | ||
175 | this.TotalNetAdSubscription=[{ | 245 | this.TotalNetAdSubscription=[{ |
176 | AccountType:lastentry.AccountType, | 246 | AccountType:lastentry.AccountType, |
177 | ActiveSubscription:lastentry.ActiveSubscription, | 247 | ActiveSubscription:lastentry.ActiveSubscription, |
178 | - AccounInActiveSubscriptiontType:lastentry.InActiveSubscription, | 248 | + InActiveSubscription:lastentry.InActiveSubscription, |
179 | InstitutionName:lastentry.InstitutionName, | 249 | InstitutionName:lastentry.InstitutionName, |
180 | LicenseType:lastentry.LicenseType, | 250 | LicenseType:lastentry.LicenseType, |
181 | NetAdSubscription:lastentry.NetAdSubscription, | 251 | NetAdSubscription:lastentry.NetAdSubscription, |
182 | RenewSubscription:lastentry.RenewSubscription, | 252 | RenewSubscription:lastentry.RenewSubscription, |
183 | }] | 253 | }] |
254 | + this.lstNetAdSubscriptionReport.splice(index-1,1); | ||
184 | 255 | ||
185 | } | 256 | } |
186 | 257 | ||
187 | - this.lstNetAdSubscriptionReport.splice(index-1,1) | ||
188 | - | ||
189 | if (this.lstNetAdSubscriptionReport.length > 0) { | 258 | if (this.lstNetAdSubscriptionReport.length > 0) { |
190 | this.NoRecord = ''; | 259 | this.NoRecord = ''; |
191 | this.buttonStatus = true; | 260 | this.buttonStatus = true; |
192 | this._loadingService.HideLoading("global-loading"); | 261 | this._loadingService.HideLoading("global-loading"); |
193 | } | 262 | } |
263 | + | ||
194 | if (this.lstNetAdSubscriptionReport.length == 0) { | 264 | if (this.lstNetAdSubscriptionReport.length == 0) { |
195 | this.NoRecord = this.global.NoRecords; | 265 | this.NoRecord = this.global.NoRecords; |
196 | this._loadingService.HideLoading("global-loading"); | 266 | this._loadingService.HideLoading("global-loading"); |
@@ -202,20 +272,18 @@ export class NetAdSubscriptionReport implements OnInit { | @@ -202,20 +272,18 @@ export class NetAdSubscriptionReport implements OnInit { | ||
202 | if (this.buttonStatus) { | 272 | if (this.buttonStatus) { |
203 | this.ExportingStart = true; | 273 | this.ExportingStart = true; |
204 | this.GetNetAdSummaryReport('1, ' + this.recordCount); | 274 | this.GetNetAdSummaryReport('1, ' + this.recordCount); |
205 | - this.ExportingStart = false; | ||
206 | } | 275 | } |
207 | } | 276 | } |
208 | 277 | ||
209 | - ExportService(data: any) { | ||
210 | - | ||
211 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
212 | - for (let i = 0; i < data.NetAdSubscriptionList.length; i++) { | ||
213 | - delete data.NetAdSubscriptionList[i][this.global.RemoveColumns[c].toString()]; | ||
214 | - } | ||
215 | - } | ||
216 | - | ||
217 | - this._loadingService.HideLoading("global-loading"); | ||
218 | - this.global.ExportToCSV(data.NetAdSubscriptionList, "NetAdSummaryReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ||
219 | - | 278 | + ExportService(data: any) { |
279 | + for (let i = 0; i < data.NetAdSubscriptionList.length; i++) { | ||
280 | + if( data.NetAdSubscriptionList[i]['LicenseType']!='Total') | ||
281 | + data.NetAdSubscriptionList[i]['LicenseCreationDate']= this.datePipe.transform(data.NetAdSubscriptionList[i]['LicenseCreationDate'], 'MM/dd/yyyy'); | ||
282 | + } | ||
283 | + | ||
284 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
285 | + this.global.ExportToCSV(data.NetAdSubscriptionList, "NetAdSummaryReport-"+reportname); | ||
286 | + | ||
287 | + this._loadingService.HideLoading("global-loading"); | ||
220 | } | 288 | } |
221 | } | 289 | } |
400-SOURCECODE/Admin/src/app/components/Reports/report.service.ts
@@ -102,13 +102,14 @@ export class ReportService { | @@ -102,13 +102,14 @@ export class ReportService { | ||
102 | } | 102 | } |
103 | 103 | ||
104 | 104 | ||
105 | - GetExpiringSubscriptionReport(obj: any, pageNo: number, pageLength: number) { | ||
106 | - if (obj.sFromDate == '') { | 105 | + GetExpiringSubscriptionReport(obj: any) { |
106 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
107 | obj.sFromDate = '1/1/1'; | 107 | obj.sFromDate = '1/1/1'; |
108 | } | 108 | } |
109 | - if (obj.sToDate == '') { | 109 | + if (obj.sToDate == '' || obj.sToDate == null) { |
110 | obj.sToDate = '1/1/9999'; | 110 | obj.sToDate = '1/1/9999'; |
111 | - } | 111 | + } |
112 | + | ||
112 | if (obj.iStartPrice == undefined || obj.iStartPrice==='') | 113 | if (obj.iStartPrice == undefined || obj.iStartPrice==='') |
113 | obj.iStartPrice = -1; | 114 | obj.iStartPrice = -1; |
114 | 115 | ||
@@ -127,17 +128,19 @@ export class ReportService { | @@ -127,17 +128,19 @@ export class ReportService { | ||
127 | "&sZip=" + obj.sZip + | 128 | "&sZip=" + obj.sZip + |
128 | "&iStateId=" + obj.iStateId + | 129 | "&iStateId=" + obj.iStateId + |
129 | "&iCountryId=" + obj.iCountryId + | 130 | "&iCountryId=" + obj.iCountryId + |
130 | - "&pageNo=" + pageNo + | ||
131 | - "&pageLength=" + pageLength) | 131 | + "&sortColumn=" + obj.sortColumn + |
132 | + "&sortOrder=" + obj.sortOrder + | ||
133 | + "&pageNo=" + obj.pageNo + | ||
134 | + "&pageLength=" + obj.pageLength) | ||
132 | .map(this.extractData) | 135 | .map(this.extractData) |
133 | .catch((res: Response) => this.handleError(res)); | 136 | .catch((res: Response) => this.handleError(res)); |
134 | } | 137 | } |
135 | 138 | ||
136 | - GetSubscriptionReport(obj: any, pageNo: number, pageLength: number) { | ||
137 | - if (obj.sFromDate == '') { | 139 | + GetSubscriptionReport(obj: any) { |
140 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
138 | obj.sFromDate = '1/1/1'; | 141 | obj.sFromDate = '1/1/1'; |
139 | } | 142 | } |
140 | - if (obj.sToDate == '') { | 143 | + if (obj.sToDate == '' || obj.sToDate == null) { |
141 | obj.sToDate = '1/1/9999'; | 144 | obj.sToDate = '1/1/9999'; |
142 | } | 145 | } |
143 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | 146 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); |
@@ -155,23 +158,26 @@ export class ReportService { | @@ -155,23 +158,26 @@ export class ReportService { | ||
155 | "&iAccountTypeId=" + obj.iAccountTypeId + | 158 | "&iAccountTypeId=" + obj.iAccountTypeId + |
156 | "&sZip=" + obj.sZip + | 159 | "&sZip=" + obj.sZip + |
157 | "&iStateId=" + obj.iStateId + | 160 | "&iStateId=" + obj.iStateId + |
158 | - "&iCountryId=" + obj.iCountryId + | ||
159 | - "&pageNo=" + pageNo + | ||
160 | - "&pageLength=" + pageLength) | 161 | + "&iCountryId=" + obj.iCountryId + |
162 | + "&sortColumn=" + obj.sortColumn + | ||
163 | + "&sortOrder=" + obj.sortOrder + | ||
164 | + "&pageNo=" + obj.pageNo + | ||
165 | + "&pageLength=" + obj.pageLength) | ||
161 | .map(this.extractData) | 166 | .map(this.extractData) |
162 | .catch((res: Response) => this.handleError(res)); | 167 | .catch((res: Response) => this.handleError(res)); |
163 | } | 168 | } |
164 | 169 | ||
165 | - GetSubscriptionCancellationReport(obj: any, pageNo: number, pageLength: number) { | ||
166 | - if (obj.sFromDate == '') { | 170 | + GetSubscriptionCancellationReport(obj: any) { |
171 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
167 | obj.sFromDate = '1/1/1'; | 172 | obj.sFromDate = '1/1/1'; |
168 | } | 173 | } |
169 | - if (obj.sToDate == '') { | 174 | + if (obj.sToDate == '' || obj.sToDate == null) { |
170 | obj.sToDate = '1/1/9999'; | 175 | obj.sToDate = '1/1/9999'; |
171 | } | 176 | } |
172 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | 177 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); |
173 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | 178 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); |
174 | - if (obj.icStartPrice == undefined || obj.icStartPrice === '') | 179 | + |
180 | + if (obj.icStartPrice == undefined || obj.icStartPrice === '') | ||
175 | obj.icStartPrice = -1; | 181 | obj.icStartPrice = -1; |
176 | if (obj.icEndPrice == undefined || obj.icEndPrice === '') | 182 | if (obj.icEndPrice == undefined || obj.icEndPrice === '') |
177 | obj.icEndPrice = -1; | 183 | obj.icEndPrice = -1; |
@@ -185,46 +191,50 @@ export class ReportService { | @@ -185,46 +191,50 @@ export class ReportService { | ||
185 | "&sZip=" + obj.sZip + | 191 | "&sZip=" + obj.sZip + |
186 | "&iStateId=" + obj.iStateId + | 192 | "&iStateId=" + obj.iStateId + |
187 | "&iCountryId=" + obj.iCountryId + | 193 | "&iCountryId=" + obj.iCountryId + |
188 | - "&pageNo=" + pageNo + | ||
189 | - "&pageLength=" + pageLength) | 194 | + "&sortColumn=" + obj.sortColumn + |
195 | + "&sortOrder=" + obj.sortOrder + | ||
196 | + "&pageNo=" + obj.pageNo + | ||
197 | + "&pageLength=" + obj.pageLength) | ||
190 | .map(this.extractData) | 198 | .map(this.extractData) |
191 | .catch((res: Response) => this.handleError(res)); | 199 | .catch((res: Response) => this.handleError(res)); |
192 | } | 200 | } |
193 | 201 | ||
194 | 202 | ||
195 | - GetNetAdSummaryReport(obj: any, pageNo: number, pageLength: number) { | ||
196 | - if (obj.sFromDate == '') { | ||
197 | - obj.sFromDate = '1/1/1'; | ||
198 | - } | ||
199 | - if (obj.sToDate == '') { | ||
200 | - obj.sToDate = '1/1/9999'; | ||
201 | - } | 203 | + GetNetAdSummaryReport(obj: any) { |
204 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
205 | + obj.sFromDate = '1/1/1'; | ||
206 | + } | ||
207 | + if (obj.sToDate == '' || obj.sToDate == null) { | ||
208 | + obj.sToDate = '1/1/9999'; | ||
209 | + } | ||
202 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | 210 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); |
203 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | 211 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); |
204 | - if (obj.icStartPrice == undefined || obj.icStartPrice == '') | ||
205 | - obj.icStartPrice = -1; | ||
206 | - if (obj.icEndPrice == undefined || obj.icEndPrice == '') | ||
207 | - obj.icEndPrice = -1; | 212 | + if (obj.iStartPrice == undefined || obj.iStartPrice == '') |
213 | + obj.iStartPrice = -1; | ||
214 | + if (obj.iEndPrice == undefined || obj.iEndPrice == '') | ||
215 | + obj.iEndPrice = -1; | ||
208 | 216 | ||
209 | 217 | ||
210 | return this.http.get(this.commonService.resourceBaseUrl + "Report/GetNetAdSummaryReport?sFromDate=" + obj.sFromDate + | 218 | return this.http.get(this.commonService.resourceBaseUrl + "Report/GetNetAdSummaryReport?sFromDate=" + obj.sFromDate + |
211 | "&sToDate=" + obj.sToDate + | 219 | "&sToDate=" + obj.sToDate + |
212 | - "&iStartPrice=" + obj.icStartPrice + | ||
213 | - "&iEndPrice=" + obj.icEndPrice + | 220 | + "&iStartPrice=" + obj.iStartPrice + |
221 | + "&iEndPrice=" + obj.iEndPrice + | ||
214 | "&iLicenseTypeId=" + obj.iLicenseTypeId + | 222 | "&iLicenseTypeId=" + obj.iLicenseTypeId + |
215 | - "&pageNo=" + pageNo + | ||
216 | - "&pageLength=" + pageLength) | 223 | + "&sortColumn=" + obj.sortColumn + |
224 | + "&sortOrder=" + obj.sortOrder + | ||
225 | + "&pageNo=" + obj.pageNo + | ||
226 | + "&pageLength=" + obj.pageLength) | ||
217 | .map(this.extractData) | 227 | .map(this.extractData) |
218 | .catch((res: Response) => this.handleError(res)); | 228 | .catch((res: Response) => this.handleError(res)); |
219 | } | 229 | } |
220 | 230 | ||
221 | - GetSiteLicenseUsageReport(obj: any, pageNo: number, pageLength: number) { | ||
222 | - if (obj.sFromDate == '') { | ||
223 | - obj.sFromDate = '1/1/1'; | ||
224 | - } | ||
225 | - if (obj.sToDate == '') { | ||
226 | - obj.sToDate = '1/1/9999'; | ||
227 | - } | 231 | + GetSiteLicenseUsageReport(obj: any) { |
232 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
233 | + obj.sFromDate = '1/1/1'; | ||
234 | + } | ||
235 | + if (obj.sToDate == '' || obj.sToDate == null) { | ||
236 | + obj.sToDate = '1/1/9999'; | ||
237 | + } | ||
228 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | 238 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); |
229 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | 239 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); |
230 | if (obj.sAccountNumber == null) | 240 | if (obj.sAccountNumber == null) |
@@ -235,20 +245,22 @@ export class ReportService { | @@ -235,20 +245,22 @@ export class ReportService { | ||
235 | "&sAccountNumber=" + obj.sAccountNumber + | 245 | "&sAccountNumber=" + obj.sAccountNumber + |
236 | "&iEdition=" + obj.iEdition + | 246 | "&iEdition=" + obj.iEdition + |
237 | "&iLoginTypeId=" + obj.iLoginTypeId + | 247 | "&iLoginTypeId=" + obj.iLoginTypeId + |
238 | - "&pageNo=" + pageNo + | ||
239 | - "&pageLength=" + pageLength) | 248 | + "&sortColumn=" + obj.sortColumn + |
249 | + "&sortOrder=" + obj.sortOrder + | ||
250 | + "&pageNo=" + obj.pageNo + | ||
251 | + "&pageLength=" + obj.pageLength) | ||
240 | .map(this.extractData) | 252 | .map(this.extractData) |
241 | .catch((res: Response) => this.handleError(res)); | 253 | .catch((res: Response) => this.handleError(res)); |
242 | } | 254 | } |
243 | 255 | ||
244 | 256 | ||
245 | - GetDiscountReport(obj: any, pageNo: number, pageLength: number) { | ||
246 | - if (obj.sFromDate == '') { | ||
247 | - obj.sFromDate = '1/1/1'; | ||
248 | - } | ||
249 | - if (obj.sToDate == '') { | ||
250 | - obj.sToDate = '1/1/9999'; | ||
251 | - } | 257 | + GetDiscountReport(obj: any) { |
258 | + if (obj.sFromDate == '' || obj.sFromDate == null) { | ||
259 | + obj.sFromDate = '1/1/1'; | ||
260 | + } | ||
261 | + if (obj.sToDate == '' || obj.sToDate == null) { | ||
262 | + obj.sToDate = '1/1/9999'; | ||
263 | + } | ||
252 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); | 264 | obj.sFromDate = this.datePipe.transform(obj.sFromDate, 'MM/dd/yyyy'); |
253 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); | 265 | obj.sToDate = this.datePipe.transform(obj.sToDate, 'MM/dd/yyyy'); |
254 | if (obj.sAccountNumber == null) | 266 | if (obj.sAccountNumber == null) |
@@ -258,8 +270,10 @@ export class ReportService { | @@ -258,8 +270,10 @@ export class ReportService { | ||
258 | "&sToDate=" + obj.sToDate + | 270 | "&sToDate=" + obj.sToDate + |
259 | "&iDiscountCode=" + obj.iDiscountCode + | 271 | "&iDiscountCode=" + obj.iDiscountCode + |
260 | "&sAccountNumber=" + obj.sAccountNumber + | 272 | "&sAccountNumber=" + obj.sAccountNumber + |
261 | - "&pageNo=" + pageNo + | ||
262 | - "&pageLength=" + pageLength) | 273 | + "&sortColumn=" + obj.sortColumn + |
274 | + "&sortOrder=" + obj.sortOrder + | ||
275 | + "&pageNo=" + obj.pageNo + | ||
276 | + "&pageLength=" + obj.pageLength) | ||
263 | .map(this.extractData) | 277 | .map(this.extractData) |
264 | .catch((res: Response) => this.handleError(res)); | 278 | .catch((res: Response) => this.handleError(res)); |
265 | } | 279 | } |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.html
@@ -16,10 +16,11 @@ | @@ -16,10 +16,11 @@ | ||
16 | <div class="row"> | 16 | <div class="row"> |
17 | <div class="col-sm-12"> | 17 | <div class="col-sm-12"> |
18 | <div class="form-group marginTop5"> | 18 | <div class="form-group marginTop5"> |
19 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 19 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
21 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
22 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 21 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
22 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
23 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
23 | <span class="input-group-btn add-on"> | 24 | <span class="input-group-btn add-on"> |
24 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 25 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
25 | </span> | 26 | </span> |
@@ -31,10 +32,11 @@ | @@ -31,10 +32,11 @@ | ||
31 | 32 | ||
32 | <div class="col-sm-12"> | 33 | <div class="col-sm-12"> |
33 | <div class="form-group marginTop5"> | 34 | <div class="form-group marginTop5"> |
34 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 35 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
35 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 36 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
36 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
37 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 37 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
38 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
39 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
38 | <span class="input-group-btn add-on"> | 40 | <span class="input-group-btn add-on"> |
39 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 41 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
40 | </span> | 42 | </span> |
@@ -102,26 +104,7 @@ | @@ -102,26 +104,7 @@ | ||
102 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> | 104 | <label class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0 hidden-lg hidden-xs"> </label> |
103 | </div> | 105 | </div> |
104 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 106 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
105 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | ||
106 | - <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | ||
107 | - <div class="modal-dialog modal-sm" role="document"> | ||
108 | - <div class="modal-content"> | ||
109 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | ||
110 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | ||
111 | - <h4 class="modal-title" id="">Alert</h4> | ||
112 | - </div> | ||
113 | - <div class="modal-body"> | ||
114 | - <h5>Account number does not exist in the system.</h5> | ||
115 | - </div> | ||
116 | - <div class="modal-footer"> | ||
117 | - <div class="row"> | ||
118 | - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | ||
119 | - </div> | ||
120 | - </div> | ||
121 | - | ||
122 | - </div> | ||
123 | - </div> | ||
124 | - </div>--> | 107 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()" [disabled]="!SiteLicenseUsageReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
125 | </div> | 108 | </div> |
126 | </div> | 109 | </div> |
127 | </div> | 110 | </div> |
@@ -131,16 +114,16 @@ | @@ -131,16 +114,16 @@ | ||
131 | </div> | 114 | </div> |
132 | 115 | ||
133 | <div class="well"> | 116 | <div class="well"> |
134 | - <table id="fixed_hdr2" class="table-hover "> | 117 | + <table id="fixed_hdr2" class="table-hover ui-widget-header sorttable"> |
135 | <thead> | 118 | <thead> |
136 | <tr> | 119 | <tr> |
137 | - <th>Account Number</th> | ||
138 | - <th>Edition</th> | ||
139 | - <th>Institution Name</th> | ||
140 | - <th>Original Entry Date</th> | ||
141 | - <th>Referel URL</th> | ||
142 | - <th>Total Login</th> | ||
143 | - <th>Last Login Date</th> | 120 | + <th id="AccountNumber">Account Number</th> |
121 | + <th id="EditionTitle">Edition</th> | ||
122 | + <th id="InstitutionName">Institution Name</th> | ||
123 | + <th id="LicenseCreationDate">Original Entry Date</th> | ||
124 | + <th id="ReferalUrl">Referel URL</th> | ||
125 | + <th id="TotalLogins">Total Login</th> | ||
126 | + <th id="LastLogin">Last Login Date</th> | ||
144 | </tr> | 127 | </tr> |
145 | </thead> | 128 | </thead> |
146 | <tbody> | 129 | <tbody> |
@@ -152,10 +135,10 @@ | @@ -152,10 +135,10 @@ | ||
152 | <td>{{item.AccountNumber}}</td> | 135 | <td>{{item.AccountNumber}}</td> |
153 | <td>{{item.EditionTitle}}</td> | 136 | <td>{{item.EditionTitle}}</td> |
154 | <td>{{item.InstitutionName}}</td> | 137 | <td>{{item.InstitutionName}}</td> |
155 | - <td>{{item.LicenseCreationDate}}</td> | 138 | + <td>{{item.LicenseCreationDate | date: 'MM/dd/yyyy'}}</td> |
156 | <td>{{item.ReferalUrl}}</td> | 139 | <td>{{item.ReferalUrl}}</td> |
157 | <td>{{item.TotalLogins}}</td> | 140 | <td>{{item.TotalLogins}}</td> |
158 | - <td>{{item.LastLogin}}</td> | 141 | + <td>{{item.LastLogin | date: 'MM/dd/yyyy'}}</td> |
159 | </tr> | 142 | </tr> |
160 | </tbody> | 143 | </tbody> |
161 | </table> | 144 | </table> |
400-SOURCECODE/Admin/src/app/components/Reports/sitelicenseusagereport.component.ts
@@ -54,6 +54,19 @@ export class SiteLicenseUsageReport implements OnInit { | @@ -54,6 +54,19 @@ export class SiteLicenseUsageReport implements OnInit { | ||
54 | pageNo: number; | 54 | pageNo: number; |
55 | pageLength: number; | 55 | pageLength: number; |
56 | DisableAccountNumberControl: boolean; | 56 | DisableAccountNumberControl: boolean; |
57 | + actualPageNo: number; | ||
58 | + actualPageLength: number; | ||
59 | + SearchField:any={ | ||
60 | + sFromDate:new Date(), | ||
61 | + sToDate:new Date(), | ||
62 | + sAccountNumber:'', | ||
63 | + iEdition:0, | ||
64 | + iLoginTypeId:0, | ||
65 | + sortColumn:'AccountNumber', | ||
66 | + sortOrder:'asc', | ||
67 | + pageNo:1, | ||
68 | + pageLength:10 | ||
69 | + }; | ||
57 | // Declare height and width variables | 70 | // Declare height and width variables |
58 | scrHeight:any; | 71 | scrHeight:any; |
59 | scrWidth:any; | 72 | scrWidth:any; |
@@ -68,6 +81,9 @@ export class SiteLicenseUsageReport implements OnInit { | @@ -68,6 +81,9 @@ export class SiteLicenseUsageReport implements OnInit { | ||
68 | { | 81 | { |
69 | this.scrHeight = window.innerHeight-430; | 82 | this.scrHeight = window.innerHeight-430; |
70 | } | 83 | } |
84 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
85 | + | ||
86 | + $(".ft_container").css("height",this.scrHeight); | ||
71 | } | 87 | } |
72 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, | 88 | constructor(private router: Router, private reportservice: ReportService, private fb: FormBuilder, |
73 | private modalService: BsModalService, public global: GlobalService, | 89 | private modalService: BsModalService, public global: GlobalService, |
@@ -101,19 +117,10 @@ export class SiteLicenseUsageReport implements OnInit { | @@ -101,19 +117,10 @@ export class SiteLicenseUsageReport implements OnInit { | ||
101 | { width: 180, align: 'center' }, | 117 | { width: 180, align: 'center' }, |
102 | { width: 250, align: 'center' }, | 118 | { width: 250, align: 'center' }, |
103 | { width: 250, align: 'Center' }, | 119 | { width: 250, align: 'Center' }, |
104 | - { width: 150, align: 'Center' }, | 120 | + { width: 250, align: 'Center' }, |
121 | + { width: 350, align: 'Center' }, | ||
105 | { width: 350, align: 'Center' }, | 122 | { width: 350, align: 'Center' }, |
106 | - { width: 500, align: 'Center' }, | ||
107 | - { width: 130, align: 'Center' }, | ||
108 | - // { width: 120, align: 'center' }, | ||
109 | - // { width: 280, align: 'Center' }, | ||
110 | - // { width: 180, align: 'center' }, | ||
111 | - // { width: 200, align: 'center' }, | ||
112 | - // { width: 170, align: 'center' }, | ||
113 | - // { width: 80, align: 'center' }, | ||
114 | - // { width: 150, align: 'center' }, | ||
115 | - // { width: 150, align: 'center' }, | ||
116 | - // { width: 180, align: 'Center' }, | 123 | + { width: 160, align: 'Center' } |
117 | ], | 124 | ], |
118 | sort: true | 125 | sort: true |
119 | }); | 126 | }); |
@@ -123,47 +130,100 @@ export class SiteLicenseUsageReport implements OnInit { | @@ -123,47 +130,100 @@ export class SiteLicenseUsageReport implements OnInit { | ||
123 | this.recordCount = 0; | 130 | this.recordCount = 0; |
124 | this.pagerComponent = new PagerComponent(); | 131 | this.pagerComponent = new PagerComponent(); |
125 | 132 | ||
126 | - if(document.getElementById("fixed_table_rc") != null){ | ||
127 | - document.getElementById("fixed_table_rc").remove(); | ||
128 | - var testScript = document.createElement("script"); | ||
129 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
130 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
131 | - testScript.setAttribute("type", "text/javascript"); | ||
132 | - document.body.appendChild(testScript); | ||
133 | - } | 133 | + var thisObject=this;//class object |
134 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
135 | + | ||
136 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
137 | + { | ||
138 | + var fieldName=event.currentTarget.id; | ||
139 | + var sortType='' | ||
140 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
141 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
142 | + | ||
143 | + if (isAscSort) { | ||
144 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
145 | + sortType="desc"; | ||
146 | + } else { | ||
147 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
148 | + sortType="asc"; | ||
149 | + } | ||
150 | + | ||
151 | + thisObject.SortTableRecords(fieldName,sortType); | ||
152 | + | ||
153 | + } | ||
154 | + | ||
155 | + }); | ||
134 | } | 156 | } |
157 | + | ||
158 | + FromDateChange(dateValue: any){ | ||
159 | + this.alerts = ''; | ||
160 | + this.global.compareTwoDates(this.SiteLicenseUsageReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
161 | + if (this.global.ValidationMsg != '') { | ||
162 | + this.alerts = this.global.ValidationMsg; | ||
163 | + } | ||
164 | + } | ||
165 | + | ||
166 | + ToDateChange(dateValue: any){ | ||
167 | + this.alerts = ''; | ||
168 | + this.global.compareTwoDates(dateValue._bsValue, this.SiteLicenseUsageReportForm.controls['sFromDate'].value); | ||
169 | + if (this.global.ValidationMsg != '') { | ||
170 | + this.alerts = this.global.ValidationMsg; | ||
171 | + } | ||
172 | + } | ||
173 | + | ||
174 | + SortTableRecords(fieldName:string,sortType:string) { | ||
175 | + this.SearchField.sortColumn=fieldName; | ||
176 | + this.SearchField.sortOrder=sortType; | ||
177 | + | ||
178 | + this.GetSiteLicenseUsageReportList(); | ||
179 | + } | ||
135 | 180 | ||
136 | GetEdition() { | 181 | GetEdition() { |
137 | this.reportservice.GetEdition().subscribe(st => { this.lstEdition = st; }, error => this.error = <any>error); | 182 | this.reportservice.GetEdition().subscribe(st => { this.lstEdition = st; }, error => this.error = <any>error); |
138 | } | 183 | } |
139 | - | 184 | + |
185 | + | ||
140 | GetSiteLicenseUsageReport(evt: any) { | 186 | GetSiteLicenseUsageReport(evt: any) { |
141 | - this.alerts = ''; | ||
142 | - this.global.compareTwoDates(this.SiteLicenseUsageReportForm.controls['sToDate'].value, this.SiteLicenseUsageReportForm.controls['sFromDate'].value); | ||
143 | - if (this.global.ValidationMsg != '') { | ||
144 | - this.alerts = this.global.ValidationMsg | ||
145 | - } | ||
146 | - if (this.alerts == '') { | ||
147 | - this._loadingService.ShowLoading("global-loading"); | ||
148 | - var tempArr = evt.split(','); | ||
149 | - this.pageNo = parseInt(tempArr[0]); | ||
150 | - var actulalength=this.pageLength; | ||
151 | - this.pageLength = parseInt(tempArr[1]); | ||
152 | - this._loadingService.ShowLoading("global-loading"); | ||
153 | - this.SiteLicenseUsageReport = this.SiteLicenseUsageReportForm.value; | ||
154 | - var obj = this.SiteLicenseUsageReport; | ||
155 | - if (this.ExportingStart) { | ||
156 | - this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { | ||
157 | - //reset length after csvexport | ||
158 | - this.pageLength=actulalength; | ||
159 | - this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error); | ||
160 | - } | ||
161 | - else { | ||
162 | - this.reportservice.GetSiteLicenseUsageReport(obj, this.pageNo, this.pageLength).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error); | ||
163 | - } | ||
164 | - } | 187 | + this.actualPageNo = this.pageNo; |
188 | + this.actualPageLength =this.pageLength; | ||
189 | + | ||
190 | + var tempArr = evt.split(','); | ||
191 | + this.pageNo = parseInt(tempArr[0]); | ||
192 | + this.pageLength = parseInt(tempArr[1]); | ||
193 | + | ||
194 | + this.SearchField.pageNo=this.pageNo; | ||
195 | + this.SearchField.pageLength=this.pageLength; | ||
196 | + | ||
197 | + this.GetSiteLicenseUsageReportList(); | ||
165 | } | 198 | } |
166 | - | 199 | + |
200 | + GetSiteLicenseUsageReportList() { | ||
201 | + this._loadingService.ShowLoading("global-loading"); | ||
202 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
203 | + | ||
204 | + if (this.SearchField.sortOrder=='asc') { | ||
205 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
206 | + } else | ||
207 | + { | ||
208 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
209 | + } | ||
210 | + if (this.ExportingStart) { | ||
211 | + this.reportservice.GetSiteLicenseUsageReport(this.SearchField).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { | ||
212 | + //reset length after csvexport | ||
213 | + this.pageNo = this.actualPageNo; | ||
214 | + this.pageLength=this.actualPageLength; | ||
215 | + | ||
216 | + this.SearchField.pageNo=this.pageNo; | ||
217 | + this.SearchField.pageLength=this.pageLength; | ||
218 | + this.ExportService(SiteLicenseUsageReports); }, error => this.error = <any>error); | ||
219 | + } | ||
220 | + else { | ||
221 | + this.reportservice.GetSiteLicenseUsageReport(this.SearchField).subscribe((SiteLicenseUsageReports: SiteLicenseUsageReports[]) => { this.BindFormFields(SiteLicenseUsageReports); }, error => this.error = <any>error); | ||
222 | + } | ||
223 | + | ||
224 | + this.ExportingStart = false; | ||
225 | + } | ||
226 | + | ||
167 | BindFormFields(data) { | 227 | BindFormFields(data) { |
168 | this.recordCount = data.RecordCount; | 228 | this.recordCount = data.RecordCount; |
169 | this.lstSiteLicenseUsageReport = data.SiteLicenseUsageList; | 229 | this.lstSiteLicenseUsageReport = data.SiteLicenseUsageList; |
@@ -181,25 +241,35 @@ export class SiteLicenseUsageReport implements OnInit { | @@ -181,25 +241,35 @@ export class SiteLicenseUsageReport implements OnInit { | ||
181 | } | 241 | } |
182 | 242 | ||
183 | SearchRecords() { | 243 | SearchRecords() { |
184 | - this.ExportingStart = false; | ||
185 | - this.GetSiteLicenseUsageReport('1, ' + this.pageLength); | 244 | + this.ExportingStart = false; |
245 | + this.pageNo=1; | ||
246 | + this.SearchField.sFromDate=this.SiteLicenseUsageReportForm.controls['sFromDate'].value; | ||
247 | + this.SearchField.sToDate=this.SiteLicenseUsageReportForm.controls['sToDate'].value; | ||
248 | + this.SearchField.sAccountNumber=this.SiteLicenseUsageReportForm.controls['sAccountNumber'].value; | ||
249 | + this.SearchField.iEdition=this.SiteLicenseUsageReportForm.controls['iEdition'].value; | ||
250 | + this.SearchField.iLoginTypeId=this.SiteLicenseUsageReportForm.controls['iLoginTypeId'].value; | ||
251 | + | ||
252 | + this.SearchField.pageNo=this.pageNo; | ||
253 | + | ||
254 | + this.GetSiteLicenseUsageReportList(); | ||
186 | } | 255 | } |
187 | 256 | ||
188 | ExportEvent() { | 257 | ExportEvent() { |
189 | if (this.buttonStatus) { | 258 | if (this.buttonStatus) { |
190 | this.ExportingStart = true; | 259 | this.ExportingStart = true; |
191 | this.GetSiteLicenseUsageReport('1, ' + this.recordCount); | 260 | this.GetSiteLicenseUsageReport('1, ' + this.recordCount); |
192 | - this.ExportingStart = false; | ||
193 | } | 261 | } |
194 | } | 262 | } |
195 | ExportService(data: any) { | 263 | ExportService(data: any) { |
196 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
197 | - for (let i = 0; i < data.SiteLicenseUsageList.length; i++) { | ||
198 | - delete data.SiteLicenseUsageList[i][this.global.RemoveColumns[c].toString()]; | ||
199 | - } | ||
200 | - } | 264 | + for (let i = 0; i < data.SiteLicenseUsageList.length; i++) { |
265 | + data.SiteLicenseUsageList[i]['LastLogin']= this.datePipe.transform(data.SiteLicenseUsageList[i]['LastLogin'], 'MM/dd/yyyy'); | ||
266 | + data.SiteLicenseUsageList[i]['LicenseCreationDate']= this.datePipe.transform(data.SiteLicenseUsageList[i]['LicenseCreationDate'], 'MM/dd/yyyy'); | ||
267 | + } | ||
268 | + | ||
269 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
270 | + this.global.ExportToCSV(data.SiteLicenseUsageList, "SiteLicenseUsageReport-"+reportname); | ||
271 | + | ||
201 | this._loadingService.HideLoading("global-loading"); | 272 | this._loadingService.HideLoading("global-loading"); |
202 | - this.global.ExportToCSV(data.SiteLicenseUsageList, "SiteLicenseUsageReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ||
203 | - | 273 | + |
204 | } | 274 | } |
205 | } | 275 | } |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.html
@@ -16,10 +16,11 @@ | @@ -16,10 +16,11 @@ | ||
16 | <div class="row"> | 16 | <div class="row"> |
17 | <div class="col-sm-12"> | 17 | <div class="col-sm-12"> |
18 | <div class="form-group marginTop5"> | 18 | <div class="form-group marginTop5"> |
19 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 19 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
21 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
22 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 21 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
22 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
23 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
23 | <span class="input-group-btn add-on"> | 24 | <span class="input-group-btn add-on"> |
24 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 25 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
25 | </span> | 26 | </span> |
@@ -31,10 +32,11 @@ | @@ -31,10 +32,11 @@ | ||
31 | 32 | ||
32 | <div class="col-sm-12"> | 33 | <div class="col-sm-12"> |
33 | <div class="form-group marginTop5"> | 34 | <div class="form-group marginTop5"> |
34 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 35 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
35 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 36 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
36 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
37 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 37 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
38 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
39 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
38 | <span class="input-group-btn add-on"> | 40 | <span class="input-group-btn add-on"> |
39 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 41 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
40 | </span> | 42 | </span> |
@@ -134,29 +136,7 @@ | @@ -134,29 +136,7 @@ | ||
134 | 136 | ||
135 | <div class="col-sm-12"> | 137 | <div class="col-sm-12"> |
136 | <div class="form-group marginTop5 text-right"> | 138 | <div class="form-group marginTop5 text-right"> |
137 | - <button class="btn btn-primary btn-sm" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | ||
138 | - <!--modal--> | ||
139 | - <!--<div class="modal fade bs-example-modal-sm text-left" tabindex="-1" role="dialog" id="mymodal"> | ||
140 | - <div class="modal-dialog modal-sm" role="document"> | ||
141 | - <div class="modal-content"> | ||
142 | - <div class="modal-header annotation-modal-header ui-draggable-handle"> | ||
143 | - <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">ร</span></button> | ||
144 | - <h4 class="modal-title" id="">Alert</h4> | ||
145 | - </div> | ||
146 | - <div class="modal-body"> | ||
147 | - <h5>Account number does not exist in the system.</h5> | ||
148 | - </div> | ||
149 | - <div class="modal-footer"> | ||
150 | - <div class="row"> | ||
151 | - <div class="col-sm-12"><button class="btn btn-primary btn-sm">Ok</button></div> | ||
152 | - </div> | ||
153 | - </div> | ||
154 | - | ||
155 | - </div> | ||
156 | - </div> | ||
157 | - </div> | ||
158 | - | ||
159 | - </div>--> | 139 | + <button class="btn btn-primary btn-sm" (click)="SearchRecords()" [disabled]="!SubscriptionCancellationReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
160 | </div> | 140 | </div> |
161 | 141 | ||
162 | </div> | 142 | </div> |
@@ -170,17 +150,17 @@ | @@ -170,17 +150,17 @@ | ||
170 | <table id="fixed_hdr2" class="table-hover "> | 150 | <table id="fixed_hdr2" class="table-hover "> |
171 | <thead> | 151 | <thead> |
172 | <tr> | 152 | <tr> |
173 | - <th>Account Number</th> | ||
174 | - <th>Licensee Name</th> | ||
175 | - <th>License Type</th> | ||
176 | - <th>Institution Name</th> | ||
177 | - <th>Account Type</th> | ||
178 | - <th>Edition</th> | ||
179 | - <th>Start Date</th> | ||
180 | - <th>Original Entry Date</th> | ||
181 | - <th>End Date</th> | ||
182 | - <th>Subscription Price</th> | ||
183 | - <th>Credit Card Number</th> | 153 | + <th id="AccountNumber">Account Number</th> |
154 | + <th id="LicenseeName">Licensee Name</th> | ||
155 | + <th id="LicenseType">License Type</th> | ||
156 | + <th id="InstitutionName">Institution Name</th> | ||
157 | + <th id="AccountType">Account Type</th> | ||
158 | + <th id="Edition">Edition</th> | ||
159 | + <th id="StartDate">Start Date</th> | ||
160 | + <th id="LicenseCreationDate">Original Entry Date</th> | ||
161 | + <th id="EndDate">End Date</th> | ||
162 | + <th id="SubscriptionPrice">Subscription Price</th> | ||
163 | + <th id="CardNumber">Card Number</th> | ||
184 | </tr> | 164 | </tr> |
185 | </thead> | 165 | </thead> |
186 | <tbody> | 166 | <tbody> |
@@ -195,9 +175,9 @@ | @@ -195,9 +175,9 @@ | ||
195 | <td>{{sr.InstitutionName}}</td> | 175 | <td>{{sr.InstitutionName}}</td> |
196 | <td>{{sr.AccountType}}</td> | 176 | <td>{{sr.AccountType}}</td> |
197 | <td>{{sr.Edition}}</td> | 177 | <td>{{sr.Edition}}</td> |
198 | - <td>{{sr.StartDate}}</td> | ||
199 | - <td>{{sr.LicenseCreationDate}}</td> | ||
200 | - <td>{{sr.EndDate}}</td> | 178 | + <td>{{sr.StartDate | date: 'MM/dd/yyyy'}}</td> |
179 | + <td>{{sr.LicenseCreationDate | date: 'MM/dd/yyyy'}}</td> | ||
180 | + <td>{{sr.EndDate | date: 'MM/dd/yyyy'}}</td> | ||
201 | <td>{{sr.SubscriptionPrice | number:'1.2'}}</td> | 181 | <td>{{sr.SubscriptionPrice | number:'1.2'}}</td> |
202 | <td>{{sr.CardNumber}}</td> | 182 | <td>{{sr.CardNumber}}</td> |
203 | </tr> | 183 | </tr> |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptioncancellationreport.component.ts
@@ -56,6 +56,23 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -56,6 +56,23 @@ export class SubscriptionCancellationReport implements OnInit { | ||
56 | pageNo: number; | 56 | pageNo: number; |
57 | pageLength: number; | 57 | pageLength: number; |
58 | NewSubscription = new SubscriptionCancellationReports(); | 58 | NewSubscription = new SubscriptionCancellationReports(); |
59 | + actualPageNo: number; | ||
60 | + actualPageLength: number; | ||
61 | + SearchField:any={ | ||
62 | + sFromDate:new Date(), | ||
63 | + sToDate:new Date(), | ||
64 | + iLicenseTypeId:0, | ||
65 | + iAccountTypeId:0, | ||
66 | + sZip:'', | ||
67 | + iStateId:0, | ||
68 | + iCountryId:0, | ||
69 | + icStartPrice:0, | ||
70 | + icEndPrice:-1, | ||
71 | + sortColumn:'AccountNumber', | ||
72 | + sortOrder:'asc', | ||
73 | + pageNo:1, | ||
74 | + pageLength:10 | ||
75 | + }; | ||
59 | // Declare height and width variables | 76 | // Declare height and width variables |
60 | scrHeight:any; | 77 | scrHeight:any; |
61 | scrWidth:any; | 78 | scrWidth:any; |
@@ -70,6 +87,9 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -70,6 +87,9 @@ export class SubscriptionCancellationReport implements OnInit { | ||
70 | { | 87 | { |
71 | this.scrHeight = window.innerHeight-490; | 88 | this.scrHeight = window.innerHeight-490; |
72 | } | 89 | } |
90 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
91 | + | ||
92 | + $(".ft_container").css("height",this.scrHeight); | ||
73 | 93 | ||
74 | } | 94 | } |
75 | constructor(private router: Router, private reportservice: ReportService, | 95 | constructor(private router: Router, private reportservice: ReportService, |
@@ -84,13 +104,13 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -84,13 +104,13 @@ export class SubscriptionCancellationReport implements OnInit { | ||
84 | let SubscriptionCancellationReport = new SubscriptionCancellationReports(); | 104 | let SubscriptionCancellationReport = new SubscriptionCancellationReports(); |
85 | this.previousdate.setDate(this.previousdate.getDate()); | 105 | this.previousdate.setDate(this.previousdate.getDate()); |
86 | this.SubscriptionCancellationReportForm = this.fb.group({ | 106 | this.SubscriptionCancellationReportForm = this.fb.group({ |
87 | - sFromDate: [this.previousdate], | ||
88 | - sToDate: [this.date], | 107 | + sFromDate: [this.previousdate,[Validators.required]], |
108 | + sToDate: [this.date,[Validators.required]], | ||
89 | sZip: [''], | 109 | sZip: [''], |
90 | iLicenseTypeId: [0], | 110 | iLicenseTypeId: [0], |
91 | iAccountTypeId: [0], | 111 | iAccountTypeId: [0], |
92 | iStateId: [0], | 112 | iStateId: [0], |
93 | - icStartPrice: [0], | 113 | + icStartPrice: [''], |
94 | icEndPrice: [''], | 114 | icEndPrice: [''], |
95 | iCountryId: [0], | 115 | iCountryId: [0], |
96 | }); | 116 | }); |
@@ -111,36 +131,66 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -111,36 +131,66 @@ export class SubscriptionCancellationReport implements OnInit { | ||
111 | { width: 140, align: 'center' }, | 131 | { width: 140, align: 'center' }, |
112 | { width: 170, align: 'center' }, | 132 | { width: 170, align: 'center' }, |
113 | { width: 150, align: 'Center' }, | 133 | { width: 150, align: 'Center' }, |
114 | - { width: 160, align: 'Center' }, | 134 | + { width: 150, align: 'Center' }, |
115 | { width: 130, align: 'Center' }, | 135 | { width: 130, align: 'Center' }, |
116 | - { width: 400, align: 'Center' }, | ||
117 | - { width: 100, align: 'Center' }, | ||
118 | - { width: 140, align: 'center' }, | ||
119 | - { width: 100, align: 'Center' }, | ||
120 | - { width: 140, align: 'center' }, | 136 | + { width: 350, align: 'Center' }, |
137 | + { width: 110, align: 'Center' }, | ||
121 | { width: 150, align: 'center' }, | 138 | { width: 150, align: 'center' }, |
122 | - // { width: 170, align: 'center' }, | ||
123 | - // { width: 80, align: 'center' }, | ||
124 | - // { width: 150, align: 'center' }, | ||
125 | - // { width: 150, align: 'center' }, | ||
126 | - // { width: 180, align: 'Center' }, | ||
127 | - //{ width: 400, align: 'Center' }, | ||
128 | - //{ width: 150, align: 'center' }, | ||
129 | - //{ width: 110, align: 'center' }, | 139 | + { width: 110, align: 'Center' }, |
140 | + { width: 140, align: 'center' }, | ||
141 | + { width: 130, align: 'center' }, | ||
142 | + | ||
130 | ], | 143 | ], |
131 | sort: true | 144 | sort: true |
132 | }); | 145 | }); |
133 | - if(document.getElementById("fixed_table_rc") != null){ | ||
134 | - document.getElementById("fixed_table_rc").remove(); | ||
135 | - var testScript = document.createElement("script"); | ||
136 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
137 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
138 | - testScript.setAttribute("type", "text/javascript"); | ||
139 | - document.body.appendChild(testScript); | ||
140 | - } | 146 | + var thisObject=this;//class object |
147 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
148 | + | ||
149 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
150 | + { | ||
151 | + var fieldName=event.currentTarget.id; | ||
152 | + var sortType='' | ||
153 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
154 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
155 | + | ||
156 | + if (isAscSort) { | ||
157 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
158 | + sortType="desc"; | ||
159 | + } else { | ||
160 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
161 | + sortType="asc"; | ||
162 | + } | ||
163 | + | ||
164 | + thisObject.SortTableRecords(fieldName,sortType); | ||
165 | + | ||
166 | + } | ||
167 | + | ||
168 | + }); | ||
141 | 169 | ||
142 | } | 170 | } |
143 | 171 | ||
172 | + FromDateChange(dateValue: any){ | ||
173 | + this.alerts = ''; | ||
174 | + this.global.compareTwoDates(this.SubscriptionCancellationReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
175 | + if (this.global.ValidationMsg != '') { | ||
176 | + this.alerts = this.global.ValidationMsg; | ||
177 | + } | ||
178 | + } | ||
179 | + | ||
180 | + ToDateChange(dateValue: any){ | ||
181 | + this.alerts = ''; | ||
182 | + this.global.compareTwoDates(dateValue._bsValue, this.SubscriptionCancellationReportForm.controls['sFromDate'].value); | ||
183 | + if (this.global.ValidationMsg != '') { | ||
184 | + this.alerts = this.global.ValidationMsg; | ||
185 | + } | ||
186 | + } | ||
187 | + | ||
188 | + SortTableRecords(fieldName:string,sortType:string) { | ||
189 | + this.SearchField.sortColumn=fieldName; | ||
190 | + this.SearchField.sortOrder=sortType; | ||
191 | + | ||
192 | + this.GetCancellationReportList(); | ||
193 | + } | ||
144 | 194 | ||
145 | GetCountry() { | 195 | GetCountry() { |
146 | this.reportservice.GetCountry().subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); | 196 | this.reportservice.GetCountry().subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); |
@@ -156,34 +206,68 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -156,34 +206,68 @@ export class SubscriptionCancellationReport implements OnInit { | ||
156 | GetAccountType() { | 206 | GetAccountType() { |
157 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); | 207 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); |
158 | } | 208 | } |
159 | - | ||
160 | - GetSubscriptionCancellationReport(evt: any) { | ||
161 | - this.alerts = ''; | ||
162 | - this.global.compareTwoDates(this.SubscriptionCancellationReportForm.controls['sToDate'].value, this.SubscriptionCancellationReportForm.controls['sFromDate'].value); | ||
163 | - if (this.global.ValidationMsg != '') { | ||
164 | - this.alerts = this.global.ValidationMsg | ||
165 | - } | ||
166 | - if (this.alerts == '') { | ||
167 | - this._loadingService.ShowLoading("global-loading"); | ||
168 | - var tempArr = evt.split(','); | ||
169 | - this.pageNo = parseInt(tempArr[0]); | ||
170 | - var actulalength=this.pageLength; | ||
171 | - this.pageLength = parseInt(tempArr[1]); | ||
172 | - this.NewSubscription = this.SubscriptionCancellationReportForm.value; | ||
173 | - var obj = this.NewSubscription; | ||
174 | - if (this.ExportingStart) { | ||
175 | - this.reportservice.GetSubscriptionCancellationReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { | ||
176 | - //reset length after csvexport | ||
177 | - this.pageLength=actulalength; | ||
178 | - this.ExportService(SubscriptionCancellationReports); }, error => this.error = <any>error); | ||
179 | - } | ||
180 | - else { | ||
181 | - this.reportservice.GetSubscriptionCancellationReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.BindFormFields(SubscriptionCancellationReports); }, error => this.error = <any>error); | ||
182 | - } | 209 | + |
210 | + GetSubscriptionCancellationReport(evt: any) { | ||
211 | + this.actualPageNo = this.pageNo; | ||
212 | + this.actualPageLength =this.pageLength; | ||
213 | + | ||
214 | + var tempArr = evt.split(','); | ||
215 | + this.pageNo = parseInt(tempArr[0]); | ||
216 | + this.pageLength = parseInt(tempArr[1]); | ||
217 | + | ||
218 | + this.SearchField.pageNo=this.pageNo; | ||
219 | + this.SearchField.pageLength=this.pageLength; | ||
220 | + | ||
221 | + this.GetCancellationReportList(); | ||
222 | + } | ||
223 | + | ||
224 | + GetCancellationReportList() { | ||
225 | + this._loadingService.ShowLoading("global-loading"); | ||
226 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
227 | + | ||
228 | + if (this.SearchField.sortOrder=='asc') { | ||
229 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
230 | + } else | ||
231 | + { | ||
232 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
233 | + } | ||
234 | + if (this.ExportingStart) { | ||
235 | + this.reportservice.GetSubscriptionCancellationReport(this.SearchField).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { | ||
236 | + //reset length after csvexport | ||
237 | + this.pageNo = this.actualPageNo; | ||
238 | + this.pageLength=this.actualPageLength; | ||
239 | + | ||
240 | + this.SearchField.pageNo=this.pageNo; | ||
241 | + this.SearchField.pageLength=this.pageLength; | ||
242 | + this.ExportService(SubscriptionCancellationReports); }, error => this.error = <any>error); | ||
183 | } | 243 | } |
184 | - | 244 | + else { |
245 | + this.reportservice.GetSubscriptionCancellationReport(this.SearchField).subscribe((SubscriptionCancellationReports: SubscriptionCancellationReports[]) => { this.BindFormFields(SubscriptionCancellationReports); }, error => this.error = <any>error); | ||
246 | + } | ||
247 | + | ||
248 | + this.ExportingStart = false; | ||
249 | + } | ||
250 | + | ||
251 | + SearchRecords() { | ||
252 | + this.ExportingStart = false; | ||
253 | + this.pageNo=1; | ||
254 | + this.SearchField.sFromDate=this.SubscriptionCancellationReportForm.controls['sFromDate'].value; | ||
255 | + this.SearchField.sToDate=this.SubscriptionCancellationReportForm.controls['sToDate'].value; | ||
256 | + this.SearchField.iLicenseTypeId=this.SubscriptionCancellationReportForm.controls['iLicenseTypeId'].value; | ||
257 | + this.SearchField.iAccountTypeId=this.SubscriptionCancellationReportForm.controls['iAccountTypeId'].value; | ||
258 | + this.SearchField.sZip=this.SubscriptionCancellationReportForm.controls['sZip'].value; | ||
259 | + this.SearchField.iStateId=this.SubscriptionCancellationReportForm.controls['iStateId'].value; | ||
260 | + this.SearchField.iCountryId=this.SubscriptionCancellationReportForm.controls['iCountryId'].value; | ||
261 | + this.SearchField.icStartPrice=this.SubscriptionCancellationReportForm.controls['icStartPrice'].value; | ||
262 | + this.SearchField.icEndPrice=this.SubscriptionCancellationReportForm.controls['icEndPrice'].value; | ||
263 | + | ||
264 | + this.SearchField.pageNo=this.pageNo; | ||
265 | + | ||
266 | + this.GetCancellationReportList(); | ||
267 | + | ||
185 | } | 268 | } |
186 | - BindFormFields(data) { | 269 | + |
270 | + BindFormFields(data) { | ||
187 | this.recordCount = data.RecordCount; | 271 | this.recordCount = data.RecordCount; |
188 | this.lstSubscriptionCancellationReport = data.SubscriptionCancel | 272 | this.lstSubscriptionCancellationReport = data.SubscriptionCancel |
189 | 273 | ||
@@ -199,25 +283,25 @@ export class SubscriptionCancellationReport implements OnInit { | @@ -199,25 +283,25 @@ export class SubscriptionCancellationReport implements OnInit { | ||
199 | this.buttonStatus = false; | 283 | this.buttonStatus = false; |
200 | } | 284 | } |
201 | } | 285 | } |
202 | - SearchRecords() { | ||
203 | - this.ExportingStart = false; | ||
204 | - this.GetSubscriptionCancellationReport('1, ' + this.pageLength); | ||
205 | - } | 286 | + |
206 | ExportEvent() { | 287 | ExportEvent() { |
207 | if (this.buttonStatus) { | 288 | if (this.buttonStatus) { |
208 | this.ExportingStart = true; | 289 | this.ExportingStart = true; |
209 | this.GetSubscriptionCancellationReport('1, ' + this.recordCount); | 290 | this.GetSubscriptionCancellationReport('1, ' + this.recordCount); |
210 | - this.ExportingStart = false; | ||
211 | } | 291 | } |
212 | } | 292 | } |
293 | + | ||
213 | ExportService(data: any) { | 294 | ExportService(data: any) { |
214 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
215 | - for (let i = 0; i < data.SubscriptionCancel.length; i++) { | ||
216 | - delete data.SubscriptionCancel[i][this.global.RemoveColumns[c].toString()]; | ||
217 | - } | ||
218 | - } | 295 | + for (let i = 0; i < data.SubscriptionCancel.length; i++) { |
296 | + data.SubscriptionCancel[i]['StartDate']= this.datePipe.transform(data.SubscriptionCancel[i]['StartDate'], 'MM/dd/yyyy'); | ||
297 | + data.SubscriptionCancel[i]['EndDate']= this.datePipe.transform(data.SubscriptionCancel[i]['EndDate'], 'MM/dd/yyyy'); | ||
298 | + data.SubscriptionCancel[i]['LicenseCreationDate']= this.datePipe.transform(data.SubscriptionCancel[i]['LicenseCreationDate'], 'MM/dd/yyyy'); | ||
299 | + } | ||
300 | + | ||
301 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
302 | + this.global.ExportToCSV(data.SubscriptionCancel, "SubscriptionCancellationReport-"+reportname); | ||
303 | + | ||
219 | this._loadingService.HideLoading("global-loading"); | 304 | this._loadingService.HideLoading("global-loading"); |
220 | - this.global.ExportToCSV(data.SubscriptionCancel, "SubscriptionCancellationReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ||
221 | - | 305 | + |
222 | } | 306 | } |
223 | } | 307 | } |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.html
@@ -16,10 +16,11 @@ | @@ -16,10 +16,11 @@ | ||
16 | <div class="row"> | 16 | <div class="row"> |
17 | <div class="col-sm-12"> | 17 | <div class="col-sm-12"> |
18 | <div class="form-group marginTop5"> | 18 | <div class="form-group marginTop5"> |
19 | - <label for="FromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> | 19 | + <label for="sFromDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">From Date :</label> |
20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 20 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
21 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
22 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1"> | 21 | + <div id="sFromDate" class="input-group input-group-sm input-append date"> |
22 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sFromDate" #dp1="bsDatepicker" bsDatepicker [(bsValue)]="bsValue1" | ||
23 | + (bsValueChange)="FromDateChange(dp1)" (change)="FromDateChange(dp1)" placeholder="mm/dd/yyyy"> | ||
23 | <span class="input-group-btn add-on"> | 24 | <span class="input-group-btn add-on"> |
24 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> | 25 | <button class="btn btn-default" type="button" (click)="dp1.toggle()"><i class="fa fa-calendar"></i></button> |
25 | </span> | 26 | </span> |
@@ -31,10 +32,11 @@ | @@ -31,10 +32,11 @@ | ||
31 | 32 | ||
32 | <div class="col-sm-12"> | 33 | <div class="col-sm-12"> |
33 | <div class="form-group marginTop5"> | 34 | <div class="form-group marginTop5"> |
34 | - <label for="ToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> | 35 | + <label for="sToDate" class="col-sm-12 col-lg-6 control-label text-right-lg paddTop7 padd-left0">To Date :</label> |
35 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> | 36 | <div class="col-sm-12 col-lg-6 padd-left0 padd-right0"> |
36 | - <div id="datetimepicker2" class="input-group input-group-sm input-append date"> | ||
37 | - <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2"> | 37 | + <div id="sToDate" class="input-group input-group-sm input-append date"> |
38 | + <input type="text" class="form-control" [bsConfig]="bsConfig" formControlName="sToDate" #dp2="bsDatepicker" bsDatepicker [(bsValue)]="bsValue2" | ||
39 | + (bsValueChange)="ToDateChange(dp2)" (change)="ToDateChange(dp2)" placeholder="mm/dd/yyyy"> | ||
38 | <span class="input-group-btn add-on"> | 40 | <span class="input-group-btn add-on"> |
39 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> | 41 | <button class="btn btn-default" type="button" (click)="dp2.toggle()"><i class="fa fa-calendar"></i></button> |
40 | </span> | 42 | </span> |
@@ -134,7 +136,7 @@ | @@ -134,7 +136,7 @@ | ||
134 | 136 | ||
135 | <div class="col-sm-12"> | 137 | <div class="col-sm-12"> |
136 | <div class="form-group marginTop5 text-right"> | 138 | <div class="form-group marginTop5 text-right"> |
137 | - <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()"><i class="fa fa-file"></i> Generate Report</button> | 139 | + <button class="btn btn-primary btn-sm" data-toggle="modal" data-target="#mymodal" (click)="SearchRecords()" [disabled]="!SubscriptionReportForm.valid || alerts != ''"><i class="fa fa-file"></i> Generate Report</button> |
138 | </div> | 140 | </div> |
139 | </div> | 141 | </div> |
140 | 142 | ||
@@ -146,20 +148,20 @@ | @@ -146,20 +148,20 @@ | ||
146 | </div> | 148 | </div> |
147 | 149 | ||
148 | <div class="well"> | 150 | <div class="well"> |
149 | - <table id="fixed_hdr2" class="table-hover "> | 151 | + <table id="fixed_hdr2" class="table-hover ui-widget-header sorttable"> |
150 | <thead> | 152 | <thead> |
151 | <tr> | 153 | <tr> |
152 | - <th>Account Number</th> | ||
153 | - <th>Licensee Name</th> | ||
154 | - <th>License Type</th> | ||
155 | - <th>Institution Name</th> | ||
156 | - <th>Account Type</th> | ||
157 | - <th>Edition</th> | ||
158 | - <th>Start Date</th> | ||
159 | - <th>Original Entry Date</th> | ||
160 | - <th>End Date</th> | ||
161 | - <th>Subscription Price</th> | ||
162 | - <th>Credit Card Number</th> | 154 | + <th id="AccountNumber">Account Number</th> |
155 | + <th id="LicenseeName">Licensee Name</th> | ||
156 | + <th id="LicenseType">License Type</th> | ||
157 | + <th id="InstitutionName">Institution Name</th> | ||
158 | + <th id="AccountType">Account Type</th> | ||
159 | + <th id="Edition">Edition</th> | ||
160 | + <th id="StartDate">Start Date</th> | ||
161 | + <th id="LicenseCreationDate">Original Entry Date</th> | ||
162 | + <th id="EndDate">End Date</th> | ||
163 | + <th id="SubscriptionPrice">Subscription Price</th> | ||
164 | + <th id="CardNumber">Card Number</th> | ||
163 | </tr> | 165 | </tr> |
164 | </thead> | 166 | </thead> |
165 | <tbody> | 167 | <tbody> |
@@ -174,9 +176,9 @@ | @@ -174,9 +176,9 @@ | ||
174 | <td>{{sr.InstitutionName}}</td> | 176 | <td>{{sr.InstitutionName}}</td> |
175 | <td>{{sr.AccountType}}</td> | 177 | <td>{{sr.AccountType}}</td> |
176 | <td>{{sr.Edition}}</td> | 178 | <td>{{sr.Edition}}</td> |
177 | - <td>{{sr.StartDate}}</td> | ||
178 | - <td>{{sr.LicenseCreationDate}}</td> | ||
179 | - <td>{{sr.EndDate}}</td> | 179 | + <td>{{sr.StartDate | date: 'MM/dd/yyyy'}}</td> |
180 | + <td>{{sr.LicenseCreationDate | date: 'MM/dd/yyyy'}}</td> | ||
181 | + <td>{{sr.EndDate | date: 'MM/dd/yyyy'}}</td> | ||
180 | <td>{{sr.SubscriptionPrice | number:'1.2'}}</td> | 182 | <td>{{sr.SubscriptionPrice | number:'1.2'}}</td> |
181 | <td>{{sr.CardNumber}}</td> | 183 | <td>{{sr.CardNumber}}</td> |
182 | </tr> | 184 | </tr> |
400-SOURCECODE/Admin/src/app/components/Reports/subscriptionreport.component.ts
@@ -56,6 +56,24 @@ export class SubscriptionReport implements OnInit { | @@ -56,6 +56,24 @@ export class SubscriptionReport implements OnInit { | ||
56 | pageNo: number; | 56 | pageNo: number; |
57 | pageLength: number; | 57 | pageLength: number; |
58 | NewSubscription = new SubscriptionReports(); | 58 | NewSubscription = new SubscriptionReports(); |
59 | + actualPageNo: number; | ||
60 | + actualPageLength: number; | ||
61 | + SearchField:any={ | ||
62 | + sFromDate:new Date(), | ||
63 | + sToDate:new Date(), | ||
64 | + iLicenseTypeId:0, | ||
65 | + iAccountTypeId:0, | ||
66 | + sZip:'', | ||
67 | + iStateId:0, | ||
68 | + iCountryId:0, | ||
69 | + icStartPrice:0, | ||
70 | + icEndPrice:-1, | ||
71 | + sortColumn:'AccountNumber', | ||
72 | + sortOrder:'asc', | ||
73 | + pageNo:1, | ||
74 | + pageLength:10 | ||
75 | + }; | ||
76 | + | ||
59 | // Declare height and width variables | 77 | // Declare height and width variables |
60 | scrHeight:any; | 78 | scrHeight:any; |
61 | scrWidth:any; | 79 | scrWidth:any; |
@@ -70,6 +88,9 @@ export class SubscriptionReport implements OnInit { | @@ -70,6 +88,9 @@ export class SubscriptionReport implements OnInit { | ||
70 | { | 88 | { |
71 | this.scrHeight = window.innerHeight-480; | 89 | this.scrHeight = window.innerHeight-480; |
72 | } | 90 | } |
91 | + if(this.scrHeight<=360) this.scrHeight=360; | ||
92 | + | ||
93 | + $(".ft_container").css("height",this.scrHeight); | ||
73 | 94 | ||
74 | } | 95 | } |
75 | constructor(private router: Router, private reportservice: ReportService, | 96 | constructor(private router: Router, private reportservice: ReportService, |
@@ -84,13 +105,13 @@ export class SubscriptionReport implements OnInit { | @@ -84,13 +105,13 @@ export class SubscriptionReport implements OnInit { | ||
84 | let SubscriptionReport = new SubscriptionReports(); | 105 | let SubscriptionReport = new SubscriptionReports(); |
85 | this.previousdate.setDate(this.previousdate.getDate()); | 106 | this.previousdate.setDate(this.previousdate.getDate()); |
86 | this.SubscriptionReportForm = this.fb.group({ | 107 | this.SubscriptionReportForm = this.fb.group({ |
87 | - sFromDate: [this.previousdate], | ||
88 | - sToDate: [this.date], | 108 | + sFromDate: [this.previousdate,[Validators.required]], |
109 | + sToDate: [this.date,[Validators.required]], | ||
89 | sZip: [''], | 110 | sZip: [''], |
90 | iLicenseTypeId: [0], | 111 | iLicenseTypeId: [0], |
91 | iAccountTypeId: [0], | 112 | iAccountTypeId: [0], |
92 | iStateId: [0], | 113 | iStateId: [0], |
93 | - icStartPrice: [0], | 114 | + icStartPrice: [''], |
94 | icEndPrice: [''], | 115 | icEndPrice: [''], |
95 | iCountryId: [0], | 116 | iCountryId: [0], |
96 | }); | 117 | }); |
@@ -104,7 +125,6 @@ export class SubscriptionReport implements OnInit { | @@ -104,7 +125,6 @@ export class SubscriptionReport implements OnInit { | ||
104 | this.pageLength = 10; | 125 | this.pageLength = 10; |
105 | this.pagerComponent = new PagerComponent(); | 126 | this.pagerComponent = new PagerComponent(); |
106 | this._loadingService.HideLoading("global-loading"); | 127 | this._loadingService.HideLoading("global-loading"); |
107 | - //this.GetSubscriptionReport(); | ||
108 | $('#fixed_hdr2').fxdHdrCol({ | 128 | $('#fixed_hdr2').fxdHdrCol({ |
109 | fixedCols: 0, | 129 | fixedCols: 0, |
110 | width: "100%", | 130 | width: "100%", |
@@ -115,34 +135,63 @@ export class SubscriptionReport implements OnInit { | @@ -115,34 +135,63 @@ export class SubscriptionReport implements OnInit { | ||
115 | { width: 150, align: 'Center' }, | 135 | { width: 150, align: 'Center' }, |
116 | { width: 150, align: 'Center' }, | 136 | { width: 150, align: 'Center' }, |
117 | { width: 140, align: 'Center' }, | 137 | { width: 140, align: 'Center' }, |
118 | - { width: 400, align: 'Center' }, | ||
119 | - { width: 100, align: 'Center' }, | 138 | + { width: 350, align: 'Center' }, |
139 | + { width: 110, align: 'Center' }, | ||
120 | { width: 150, align: 'center' }, | 140 | { width: 150, align: 'center' }, |
121 | - { width: 100, align: 'Center' }, | ||
122 | - { width: 140, align: 'center' }, | 141 | + { width: 110, align: 'Center' }, |
123 | { width: 150, align: 'center' }, | 142 | { width: 150, align: 'center' }, |
124 | - // { width: 170, align: 'center' }, | ||
125 | - // { width: 80, align: 'center' }, | ||
126 | - // { width: 150, align: 'center' }, | ||
127 | - // { width: 150, align: 'center' }, | ||
128 | - // { width: 180, align: 'Center' }, | ||
129 | - //{ width: 400, align: 'Center' }, | ||
130 | - //{ width: 150, align: 'center' }, | ||
131 | - //{ width: 110, align: 'center' }, | 143 | + { width: 140, align: 'center' }, |
132 | ], | 144 | ], |
133 | sort: true | 145 | sort: true |
134 | }); | 146 | }); |
135 | - if(document.getElementById("fixed_table_rc") != null){ | ||
136 | - document.getElementById("fixed_table_rc").remove(); | ||
137 | - var testScript = document.createElement("script"); | ||
138 | - testScript.setAttribute("id", "fixed_table_rc"); | ||
139 | - testScript.setAttribute("src", "../assets/scripts/fixed_table_rc.js"); | ||
140 | - testScript.setAttribute("type", "text/javascript"); | ||
141 | - document.body.appendChild(testScript); | ||
142 | - } | ||
143 | - | 147 | + |
148 | + var thisObject=this;//class object | ||
149 | + $(".ft_rwrapper table thead tr th").on("click",function(event){ | ||
150 | + | ||
151 | + if(event.currentTarget.id!=undefined && event.currentTarget.id!="" && event.currentTarget.id!=null) | ||
152 | + { | ||
153 | + var fieldName=event.currentTarget.id; | ||
154 | + var sortType='' | ||
155 | + var isAscSort = $(".ft_rwrapper table thead tr #"+fieldName).hasClass('fx_sort_asc'); | ||
156 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
157 | + | ||
158 | + if (isAscSort) { | ||
159 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
160 | + sortType="desc"; | ||
161 | + } else { | ||
162 | + $(".ft_rwrapper table thead tr #"+fieldName).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
163 | + sortType="asc"; | ||
164 | + } | ||
165 | + | ||
166 | + thisObject.SortTableRecords(fieldName,sortType); | ||
167 | + | ||
168 | + } | ||
169 | + | ||
170 | + }); | ||
144 | } | 171 | } |
145 | 172 | ||
173 | + FromDateChange(dateValue: any){ | ||
174 | + this.alerts = ''; | ||
175 | + this.global.compareTwoDates(this.SubscriptionReportForm.controls['sToDate'].value, dateValue._bsValue); | ||
176 | + if (this.global.ValidationMsg != '') { | ||
177 | + this.alerts = this.global.ValidationMsg; | ||
178 | + } | ||
179 | + } | ||
180 | + | ||
181 | + ToDateChange(dateValue: any){ | ||
182 | + this.alerts = ''; | ||
183 | + this.global.compareTwoDates(dateValue._bsValue, this.SubscriptionReportForm.controls['sFromDate'].value); | ||
184 | + if (this.global.ValidationMsg != '') { | ||
185 | + this.alerts = this.global.ValidationMsg; | ||
186 | + } | ||
187 | + } | ||
188 | + | ||
189 | + SortTableRecords(fieldName:string,sortType:string) { | ||
190 | + this.SearchField.sortColumn=fieldName; | ||
191 | + this.SearchField.sortOrder=sortType; | ||
192 | + | ||
193 | + this.GetSubscriptionReportList(); | ||
194 | + } | ||
146 | 195 | ||
147 | GetCountry() { | 196 | GetCountry() { |
148 | this.reportservice.GetCountry().subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); | 197 | this.reportservice.GetCountry().subscribe(y => { this.lstCountry = y; }, error => this.error = <any>error); |
@@ -158,34 +207,69 @@ export class SubscriptionReport implements OnInit { | @@ -158,34 +207,69 @@ export class SubscriptionReport implements OnInit { | ||
158 | GetAccountType() { | 207 | GetAccountType() { |
159 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); | 208 | this.reportservice.GetAccountType().subscribe(st => { this.lstAccountType = st; }, error => this.error = <any>error); |
160 | } | 209 | } |
161 | - | 210 | + |
211 | + | ||
162 | GetSubscriptionReport(evt: any) { | 212 | GetSubscriptionReport(evt: any) { |
163 | - this.alerts = ''; | ||
164 | - this.global.compareTwoDates(this.SubscriptionReportForm.controls['sToDate'].value, this.SubscriptionReportForm.controls['sFromDate'].value); | ||
165 | - if (this.global.ValidationMsg != '') { | ||
166 | - this.alerts = this.global.ValidationMsg | ||
167 | - } | ||
168 | - if (this.alerts == '') { | ||
169 | - this._loadingService.ShowLoading("global-loading"); | ||
170 | - var tempArr = evt.split(','); | ||
171 | - this.pageNo = parseInt(tempArr[0]); | ||
172 | - var actulalength=this.pageLength; | ||
173 | - this.pageLength = parseInt(tempArr[1]); | ||
174 | - this.NewSubscription = this.SubscriptionReportForm.value; | ||
175 | - var obj = this.NewSubscription; | ||
176 | - if (this.ExportingStart) { | ||
177 | - this.reportservice.GetSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionReports: SubscriptionReports[]) => { | ||
178 | - //reset length after csvexport | ||
179 | - this.pageLength=actulalength; | ||
180 | - this.ExportService(SubscriptionReports); }, error => this.error = <any>error); | ||
181 | - } | ||
182 | - else { | ||
183 | - this.reportservice.GetSubscriptionReport(obj, this.pageNo, this.pageLength).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.BindFormFields(SubscriptionReports); }, error => this.error = <any>error); | ||
184 | - } | 213 | + this.actualPageNo = this.pageNo; |
214 | + this.actualPageLength =this.pageLength; | ||
215 | + | ||
216 | + var tempArr = evt.split(','); | ||
217 | + this.pageNo = parseInt(tempArr[0]); | ||
218 | + this.pageLength = parseInt(tempArr[1]); | ||
219 | + | ||
220 | + this.SearchField.pageNo=this.pageNo; | ||
221 | + this.SearchField.pageLength=this.pageLength; | ||
222 | + | ||
223 | + this.GetSubscriptionReportList(); | ||
224 | + } | ||
225 | + | ||
226 | + GetSubscriptionReportList() { | ||
227 | + this._loadingService.ShowLoading("global-loading"); | ||
228 | + $(".ft_rwrapper table thead tr th").removeClass('fx_sort_asc fx_sort_desc'); | ||
229 | + | ||
230 | + if (this.SearchField.sortOrder=='asc') { | ||
231 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_asc').removeClass('fx_sort_desc'); | ||
232 | + } else | ||
233 | + { | ||
234 | + $(".ft_rwrapper table thead tr #"+this.SearchField.sortColumn).addClass('fx_sort_desc').removeClass('fx_sort_asc'); | ||
235 | + } | ||
236 | + if (this.ExportingStart) { | ||
237 | + this.reportservice.GetSubscriptionReport(this.SearchField).subscribe((SubscriptionReports: SubscriptionReports[]) => { | ||
238 | + //reset length after csvexport | ||
239 | + this.pageNo = this.actualPageNo; | ||
240 | + this.pageLength=this.actualPageLength; | ||
241 | + | ||
242 | + this.SearchField.pageNo=this.pageNo; | ||
243 | + this.SearchField.pageLength=this.pageLength; | ||
244 | + this.ExportService(SubscriptionReports); }, error => this.error = <any>error); | ||
185 | } | 245 | } |
186 | - | 246 | + else { |
247 | + this.reportservice.GetSubscriptionReport(this.SearchField).subscribe((SubscriptionReports: SubscriptionReports[]) => { this.BindFormFields(SubscriptionReports); }, error => this.error = <any>error); | ||
248 | + } | ||
249 | + | ||
250 | + this.ExportingStart = false; | ||
251 | + } | ||
252 | + | ||
253 | + SearchRecords() { | ||
254 | + this.ExportingStart = false; | ||
255 | + this.pageNo=1; | ||
256 | + this.SearchField.sFromDate=this.SubscriptionReportForm.controls['sFromDate'].value; | ||
257 | + this.SearchField.sToDate=this.SubscriptionReportForm.controls['sToDate'].value; | ||
258 | + this.SearchField.iLicenseTypeId=this.SubscriptionReportForm.controls['iLicenseTypeId'].value; | ||
259 | + this.SearchField.iAccountTypeId=this.SubscriptionReportForm.controls['iAccountTypeId'].value; | ||
260 | + this.SearchField.sZip=this.SubscriptionReportForm.controls['sZip'].value; | ||
261 | + this.SearchField.iStateId=this.SubscriptionReportForm.controls['iStateId'].value; | ||
262 | + this.SearchField.iCountryId=this.SubscriptionReportForm.controls['iCountryId'].value; | ||
263 | + this.SearchField.icStartPrice=this.SubscriptionReportForm.controls['icStartPrice'].value; | ||
264 | + this.SearchField.icEndPrice=this.SubscriptionReportForm.controls['icEndPrice'].value; | ||
265 | + | ||
266 | + this.SearchField.pageNo=this.pageNo; | ||
267 | + | ||
268 | + this.GetSubscriptionReportList(); | ||
269 | + | ||
187 | } | 270 | } |
188 | - BindFormFields(data) { | 271 | + |
272 | + BindFormFields(data) { | ||
189 | this.recordCount = data.RecordCount; | 273 | this.recordCount = data.RecordCount; |
190 | this.lstSubscriptionReport = data.Subscription | 274 | this.lstSubscriptionReport = data.Subscription |
191 | this.numberOfSubscriptionReport = this.lstSubscriptionReport.length; this.limit = this.lstSubscriptionReport.length; | 275 | this.numberOfSubscriptionReport = this.lstSubscriptionReport.length; this.limit = this.lstSubscriptionReport.length; |
@@ -200,24 +284,24 @@ export class SubscriptionReport implements OnInit { | @@ -200,24 +284,24 @@ export class SubscriptionReport implements OnInit { | ||
200 | this.buttonStatus = false; | 284 | this.buttonStatus = false; |
201 | } | 285 | } |
202 | } | 286 | } |
203 | - SearchRecords() { | ||
204 | - this.ExportingStart = false; | ||
205 | - this.GetSubscriptionReport('1, ' + this.pageLength); | ||
206 | - } | 287 | + |
207 | ExportEvent() { | 288 | ExportEvent() { |
208 | if (this.buttonStatus) { | 289 | if (this.buttonStatus) { |
209 | this.ExportingStart = true; | 290 | this.ExportingStart = true; |
210 | this.GetSubscriptionReport('1, ' + this.recordCount); | 291 | this.GetSubscriptionReport('1, ' + this.recordCount); |
211 | - this.ExportingStart = false; | ||
212 | } | 292 | } |
213 | } | 293 | } |
214 | ExportService(data: any) { | 294 | ExportService(data: any) { |
215 | - for (let c = 0; c < this.global.RemoveColumns.length; c++) { | ||
216 | - for (let i = 0; i < data.Subscription.length; i++) { | ||
217 | - delete data.Subscription[i][this.global.RemoveColumns[c].toString()]; | ||
218 | - } | ||
219 | - } | 295 | + for (let i = 0; i < data.Subscription.length; i++) { |
296 | + data.Subscription[i]['StartDate']= this.datePipe.transform(data.Subscription[i]['StartDate'], 'MM/dd/yyyy'); | ||
297 | + data.Subscription[i]['EndDate']= this.datePipe.transform(data.Subscription[i]['EndDate'], 'MM/dd/yyyy'); | ||
298 | + data.Subscription[i]['LicenseCreationDate']= this.datePipe.transform(data.Subscription[i]['LicenseCreationDate'], 'MM/dd/yyyy'); | ||
299 | + } | ||
300 | + | ||
301 | + var reportname=+ this.date.getDay() + "-" + (this.date.getMonth()+1) + "-" + this.date.getSeconds() | ||
302 | + this.global.ExportToCSV(data.Subscription, "SubscriptionReport-"+reportname); | ||
303 | + | ||
220 | this._loadingService.HideLoading("global-loading"); | 304 | this._loadingService.HideLoading("global-loading"); |
221 | - this.global.ExportToCSV(data.Subscription, "SubscriptionReport-" + this.date.getDay() + "-" + this.date.getMonth() + "-" + this.date.getSeconds()) | ||
222 | - } | 305 | + |
306 | + } | ||
223 | } | 307 | } |