From 41a37e4373bda0708f698729c63c183c81533d08 Mon Sep 17 00:00:00 2001 From: shakun Date: Tue, 13 Feb 2024 16:50:47 +0545 Subject: [PATCH] #24827 Promotional Rate Feature #24417 Dynamic Menu to Setup Referal Amounts --- Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs | 6 + .../System/GeneralSettings/StaticDataDao.cs | 43 +++++ .../CustomerRegistration/Manage.aspx.cs | 6 + Swift.web/AgentNew/SendTxn/SendV2.aspx | 105 +++++++++-- Swift.web/AgentNew/SendTxn/SendV2.aspx.cs | 80 +++++---- .../CountrySetup/CollectionMode/List.aspx.cs | 1 + .../CountrySetup/CountryCurrency.aspx.cs | 1 + .../CountrySetup/CountryIdSetup.aspx.cs | 1 + .../CountrySetup/EventSetup/List.aspx.cs | 1 + .../CountrySetup/EventSetup/Manage.aspx.cs | 1 + .../CountrySetup/Manage.aspx.cs | 1 + .../CountrySetup/MobileFormat.aspx.cs | 1 + .../PromotionalRateSetup/List.aspx | 86 +++++++++ .../PromotionalRateSetup/List.aspx.cs | 156 ++++++++++++++++ .../List.aspx.designer.cs | 62 +++++++ .../PromotionalRateSetup/Manage.aspx | 149 +++++++++++++++ .../PromotionalRateSetup/Manage.aspx.cs | 170 ++++++++++++++++++ .../Manage.aspx.designer.cs | 170 ++++++++++++++++++ .../CountrySetup/ReceivingMode/List.aspx.cs | 1 + .../CountrySetup/StateSetup/List.aspx.cs | 1 + .../CountrySetup/StateSetup/Manage.aspx.cs | 1 + .../Administration/PromotionalRateDao.cs | 48 +++++ .../Administration/ReferralSetup/Manage.aspx | 115 ++++++++++++ .../ReferralSetup/Manage.aspx.cs | 75 ++++++++ .../ReferralSetup/Manage.aspx.designer.cs | 134 ++++++++++++++ .../ReferralSetup/ReferPointMasterSetup.aspx | 149 +++++++++++++++ .../ReferPointMasterSetup.aspx.cs | 113 ++++++++++++ .../ReferPointMasterSetup.aspx.designer.cs | 62 +++++++ .../ReferralSetup/ReferPointSetup.aspx | 57 ++++++ .../ReferralSetup/ReferPointSetup.aspx.cs | 80 +++++++++ .../ReferPointSetup.aspx.designer.cs | 35 ++++ Swift.web/Swift.web.csproj | 41 +++++ Swift.web/Web.config | 7 +- 33 files changed, 1907 insertions(+), 52 deletions(-) create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.cs create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.designer.cs create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.cs create mode 100644 Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.designer.cs create mode 100644 Swift.web/Remit/Administration/PromotionalRateDao.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/Manage.aspx create mode 100644 Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.designer.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.designer.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.cs create mode 100644 Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.designer.cs diff --git a/Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs b/Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs index aa33bda..8b36108 100644 --- a/Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs +++ b/Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs @@ -74,6 +74,12 @@ namespace Swift.DAL.BL.AgentPanel.Send return ExecuteDataTable(sql); } + public DataTable GetPaymentOption(string pCountryId) + { + var sql = "EXEC proc_countryRateMaster @flag='payment-method'"; + sql += ", @countryId = " + FilterString(pCountryId); + return ExecuteDataTable(sql); + } public DataTable LoadCustomerData(string searchType, string searchValue, string flag, string sCountryId, string settlementAgent) { var sql = "EXEC proc_searchCustomerIRH @flag =" + FilterString(flag); diff --git a/Swift.DAL/Remittance/System/GeneralSettings/StaticDataDao.cs b/Swift.DAL/Remittance/System/GeneralSettings/StaticDataDao.cs index 22dd713..9ed7f99 100644 --- a/Swift.DAL/Remittance/System/GeneralSettings/StaticDataDao.cs +++ b/Swift.DAL/Remittance/System/GeneralSettings/StaticDataDao.cs @@ -59,6 +59,49 @@ namespace Swift.DAL.BL.System.GeneralSettings sql += ", @user = " + FilterString(user); sql += ", @valueId = " + FilterString(valueId); + return ParseDbResult(ExecuteDataset(sql).Tables[0]); + } + public DataRow GetDetailById(string user, string promotiontype) + { + string sql = "EXEC proc_InsertRewardPoints"; + sql += " @flag = 'editById'"; + sql += ", @user = " + FilterString(user); + sql += ", @promotiontype = " + FilterString(promotiontype); + + DataSet ds = ExecuteDataset(sql); + if (ds == null || ds.Tables.Count == 0 || ds.Tables[0].Rows.Count == 0) + return null; + return ds.Tables[0].Rows[0]; + } + + public DbResult UpdateByType(string user, string promotionType, string points) + { + string sql = "EXEC proc_InsertRewardPoints"; + sql += " @flag = 'UPDATE-POINT'"; + sql += ", @user = " + FilterString(user); + sql += ", @promotionType = " + FilterString(promotionType); + sql += ", @newPoints = " + FilterString(points); + return ParseDbResult(ExecuteDataset(sql).Tables[0]); + } + + public DbResult UpdateById(string user, string id, string newPts, string oldPts) + { + string sql = "EXEC proc_InsertRewardPoints"; + sql += " @flag = 'UPDATE-MASTER'"; + sql += ", @user = " + FilterString(user); + sql += ", @newPoints = " + FilterString(newPts); + sql += ", @oldPoints = " + FilterString(oldPts); + sql += ", @rowId = " + FilterString(id); + return ParseDbResult(ExecuteDataset(sql).Tables[0]); + } + + public DbResult DeleteByType(string user, string promotionType) + { + string sql = "EXEC proc_InsertRewardPoints"; + sql += " @flag = 'DELETE'"; + sql += ", @user = " + FilterString(user); + sql += ", @promotionType = " + FilterString(promotionType); + return ParseDbResult(ExecuteDataset(sql).Tables[0]); } } diff --git a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs index ca78027..dc9aab6 100644 --- a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs +++ b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs @@ -369,6 +369,9 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration var customerDetails = _cd.GetRequiredCustomerDetails(dbResult.Id, GetStatic.GetUser()); string membershipId = Convert.ToString(customerDetails["membershipId"]); string registrationDate = Convert.ToString(customerDetails["createdDate"]); + string totalPts = Convert.ToString(customerDetails["totalPoints"]); + string regPts = Convert.ToString(customerDetails["regPoints"]); + string tranPts = Convert.ToString(customerDetails["tranPoints"]); List bodyMappings = new List(); bodyMappings.Add(new Mapping() { SValue = "CustomerName", SText = customerModel.firstName }); bodyMappings.Add(new Mapping() { SValue = "CustomerId", SText = dbResult.Id }); @@ -380,6 +383,9 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration bodyMappings.Add(new Mapping() { SValue = "Address", SText = customerModel.address }); bodyMappings.Add(new Mapping() { SValue = "EMAIL_ID", SText = customerModel.email }); bodyMappings.Add(new Mapping() { SValue = "RegisteredDate", SText = registrationDate }); + bodyMappings.Add(new Mapping() { SValue = "rewardPoint", SText = totalPts }); + bodyMappings.Add(new Mapping() { SValue = "RegReward", SText = regPts }); + bodyMappings.Add(new Mapping() { SValue = "TranReward", SText = tranPts }); //bodyMappings.Add(new Mapping() { SValue = "Password", SText = customerModel.password }); SendNotificationRequestMobile request = new SendNotificationRequestMobile() diff --git a/Swift.web/AgentNew/SendTxn/SendV2.aspx b/Swift.web/AgentNew/SendTxn/SendV2.aspx index bb64f76..69cb2cb 100644 --- a/Swift.web/AgentNew/SendTxn/SendV2.aspx +++ b/Swift.web/AgentNew/SendTxn/SendV2.aspx @@ -14,6 +14,7 @@ } .error { + color: red; color: red; border-color: red; } @@ -95,16 +96,17 @@ table.tbl-border-black > tbody > tr > td { border: 1px solid black; } - - #customerDocDetails { - border-spacing:0; - } - + + #customerDocDetails { + border-spacing: 0; + } + @media (min-width: 768px) { .container { width: 100% !important; } } + #modalAdditionalDocumentRequired { top: 15%; right: 50%; @@ -154,10 +156,11 @@ data: dataToSend, async: true, success: function (response) { - //alert('a'); + //alert('a'); }, }); } + @@ -829,7 +832,7 @@ * - + @@ -898,9 +901,9 @@ - -<%-- --%> - + + <%-- --%> + @@ -941,12 +944,13 @@ Free service charge for 5th transaction.  + Customer Rate: - <%-- + <%-- --%> @@ -1021,6 +1025,7 @@ + Payout Amount: * @@ -1033,16 +1038,17 @@ + - - - * - - - - + + + * + + + + - + Scheme/Offer: @@ -1777,6 +1783,7 @@ }); return true; } + function ParseResponseForReceiverData(response) { ClearTxnData(); $('.readonlyOnReceiverSelect').attr("disabled", "disabled"); @@ -1810,11 +1817,14 @@ } if ($.isNumeric(data[0].relationship)) { SetDDLValueSelected("<%=relationship.ClientID %>", data[0].relationship); + } else { SetDDLTextSelected("<%=relationship.ClientID %>", data[0].relationship); + } //****Transaction Detail**** SetDDLValueSelected("<%=pCountry.ClientID%>", data[0].COUNTRYID); + PcountryOnChange('c', data[0].paymentMethod.toUpperCase(), data[0].bankId); //select bank branch //if (data[0].paymentMethod.toUpperCase() == 'BANK DEPOSIT') { @@ -1826,10 +1836,15 @@ PAgentChange(); $('#<%=txtRecDepAcNo.ClientID%>').val(data[0].receiverAccountNo); ManageHiddenFields(data[0].paymentMethod.toUpperCase()); + $(".readonlyOnCustomerSelect").attr("disabled", "disabled"); $("#txtpBranch_aValue").val(''); $("#txtpBranch_aText").val(''); $('#<%=lblRemainingQuota.ClientID%>').text('Reward Amount: ' + data[0].rewardPoints); + + var countryId = data[0].COUNTRYID; + LoadPaymentOptionsDynamically(countryId); + <%--if ($("#<%=pCountry.ClientID%> option:selected ").val() != "") { PcountryOnChange('c', ""); SetPayCurrency($("#<%=pCountry.ClientID%>").val()); @@ -1837,6 +1852,35 @@ ManageLocationData(); } } + + function LoadPaymentOptionsDynamically(countryId) { + $.ajax({ + type: "POST", + url: '<%= ResolveUrl("SendV2.aspx/loadPaymentOption") %>', + data: JSON.stringify({ countryId: countryId }), + contentType: "application/json; charset=utf-8", + dataType: "json", + success: function (data) { + debugger + BindPaymentOptions(data); + }, + error: function (error) { + console.log(error); + } + }); + } + + function BindPaymentOptions(options) { + $("#<%= ddlPaymentOption.ClientID %>").empty(); + + $.each(options.d, function (index, option) { + $("#<%= ddlPaymentOption.ClientID %>").append($('