Browse Source

#24827 Promotional Rate Feature

#24417  Dynamic Menu to Setup Referal Amounts
Prod
shakun 7 months ago
parent
commit
41a37e4373
  1. 6
      Swift.DAL/Agentpanel/Send/SendTranIRHDao.cs
  2. 43
      Swift.DAL/Remittance/System/GeneralSettings/StaticDataDao.cs
  3. 6
      Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs
  4. 105
      Swift.web/AgentNew/SendTxn/SendV2.aspx
  5. 80
      Swift.web/AgentNew/SendTxn/SendV2.aspx.cs
  6. 1
      Swift.web/Remit/Administration/CountrySetup/CollectionMode/List.aspx.cs
  7. 1
      Swift.web/Remit/Administration/CountrySetup/CountryCurrency.aspx.cs
  8. 1
      Swift.web/Remit/Administration/CountrySetup/CountryIdSetup.aspx.cs
  9. 1
      Swift.web/Remit/Administration/CountrySetup/EventSetup/List.aspx.cs
  10. 1
      Swift.web/Remit/Administration/CountrySetup/EventSetup/Manage.aspx.cs
  11. 1
      Swift.web/Remit/Administration/CountrySetup/Manage.aspx.cs
  12. 1
      Swift.web/Remit/Administration/CountrySetup/MobileFormat.aspx.cs
  13. 86
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx
  14. 156
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.cs
  15. 62
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.designer.cs
  16. 149
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx
  17. 170
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.cs
  18. 170
      Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.designer.cs
  19. 1
      Swift.web/Remit/Administration/CountrySetup/ReceivingMode/List.aspx.cs
  20. 1
      Swift.web/Remit/Administration/CountrySetup/StateSetup/List.aspx.cs
  21. 1
      Swift.web/Remit/Administration/CountrySetup/StateSetup/Manage.aspx.cs
  22. 48
      Swift.web/Remit/Administration/PromotionalRateDao.cs
  23. 115
      Swift.web/Remit/Administration/ReferralSetup/Manage.aspx
  24. 75
      Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.cs
  25. 134
      Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.designer.cs
  26. 149
      Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx
  27. 113
      Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.cs
  28. 62
      Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.designer.cs
  29. 57
      Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx
  30. 80
      Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.cs
  31. 35
      Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.designer.cs
  32. 41
      Swift.web/Swift.web.csproj
  33. 7
      Swift.web/Web.config

6
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);

43
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]);
}
}

6
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<Mapping> bodyMappings = new List<Mapping>();
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()

105
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');
},
});
}
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
@ -829,7 +832,7 @@
<span class="ErrMsg" id="pCountry_err">*</span>
</td>
<td>
<asp:DropDownList ID="pCountry" runat="server" CssClass="required form-control"></asp:DropDownList>
<asp:DropDownList ID="pCountry" runat="server" AutoPostBack="true" CssClass="required form-control"></asp:DropDownList>
</td>
</tr>
<tr class="locationRow">
@ -898,9 +901,9 @@
</td>
<td>
<asp:HiddenField ID="HiddenField1" runat="server" />
<asp:TextBox ID="txtRewardAmt" runat="server" class="form-control" Width="20%" Style="display: inherit !important;" ></asp:TextBox>
<%-- <asp:Label ID="lblAgentQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>--%>
<asp:Label ID="lblRemainingQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>
<asp:TextBox ID="txtRewardAmt" runat="server" class="form-control" Width="20%" Style="display: inherit !important;"></asp:TextBox>
<%-- <asp:Label ID="lblAgentQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>--%>
<asp:Label ID="lblRemainingQuota" runat="server" Text="" Style="background-color: yellow; font-weight: 600;"></asp:Label>
</td>
</tr>
<tr>
@ -941,12 +944,13 @@
<asp:Label ID="lblLoyaltyFreeSc" runat="server" Text="GBP" class="amountLabel">Free service charge for 5th transaction.</asp:Label>&nbsp;
</td>
</tr>
<tr runat="server" id="customerRateFields">
<td>Customer Rate:</td>
<td>
<asp:Label ID="lblExRate" runat="server" Text="0.00" class="amountLabel"></asp:Label>
<asp:Label ID="lblExCurr" runat="server" Text="" class="amountLabel"></asp:Label>
<%-- <asp:Label ID="lblAgentQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>
<%-- <asp:Label ID="lblAgentQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>
<asp:Label ID="lblRemainingQuota" runat="server" Text="" style="background-color: yellow; font-weight: 600;"></asp:Label>--%>
</td>
</tr>
@ -1021,6 +1025,7 @@
<select id="pCurrDdl" runat="server" class="required form-control" onchange="CalculateTxn();"></select>
</td>
</tr>
<tr>
<td>Payout Amount: <span class="ErrMsg" id='txtPayAmt_err'>*</span></td>
<td>
@ -1033,16 +1038,17 @@
</div>
</td>
</tr>
<tr id="paymentOptionRow" runat="server">
<td >
<asp:Label runat="server" ID="paymentOption" Text="Payment Option: "></asp:Label>
<span class="ErrMsg" id='paymentOption_err'>*</span>
</td>
<td>
<asp:DropDownList ID="ddlPaymentOption" runat="server" CssClass="required form-control" onchange="CalculateTxn(this);"></asp:DropDownList>
</td>
<td>
<asp:Label runat="server" ID="paymentOption" Text="Payment Option: "></asp:Label>
<span class="ErrMsg" id='paymentOption_err'>*</span>
</td>
<td>
<asp:DropDownList ID="ddlPaymentOption" runat="server" CssClass="required form-control" onchange="CalculateTxn(this);"></asp:DropDownList>
</td>
</tr>
</tr>
<tr>
<td id="tdScheme" style="display: none;" valign="top">Scheme/Offer:</td>
<td id="tdSchemeVal" style="display: none;">
@ -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($('<option>', {
value: option.valueId,
text: option.detailTitle
}));
});
}
$(document).ready(function () {
$("#" + mId + "lblLoyaltyFreeSc").hide();
$("#" + mId + "lblAgentQuota").hide();
@ -1907,6 +1951,7 @@
debugger
var enteredAmount = parseFloat($(this).val());
var availablePoints = parseFloat($('#<%=lblRemainingQuota.ClientID %>').text().replace('Reward Amount: ', ''));
if (enteredAmount > availablePoints) {
alert('Entered amount exceeds available points!');
$(this).val('');
@ -2221,6 +2266,28 @@
}--%>
$("#form2").validate();
$(document).on('change', '#<%= pAgent.ClientID %>', function () {
var bankId = $("#<%= pAgent.ClientID %> option:selected").val();
if (bankId === "" || bankId === null) {
return;
}
var pmode = $("#<%=pMode.ClientID%>").val();
var partnerId = $("#<%=hddPayoutPartner.ClientID%>").val();
$('#divBankBranch').hide();
$('#<%=branch.ClientID%>').removeClass('required');
$('.displayPayerInfo').hide();
PopulateBankDetails(bankId, pmode);
if (partnerId === apiPartnerIds[0] || pmode === "2") {
if ((partnerId === apiPartnerIds[0]) && pmode === "2") {
$('#agentBranchRequired').hide();
}
$('#divBankBranch').show();
if ((partnerId === apiPartnerIds[0]) && pmode === "2" && (bankId != "0" && bankId != null && bankId != "")) {
LoadPayerData();
}
}
});
})

80
Swift.web/AgentNew/SendTxn/SendV2.aspx.cs

@ -15,6 +15,7 @@ using System.Text;
using System.Threading;
using System.Web;
using System.Web.Script.Serialization;
using System.Web.Services;
using System.Web.UI.WebControls;
namespace Swift.web.AgentNew.SendTxn
@ -103,8 +104,8 @@ namespace Swift.web.AgentNew.SendTxn
break;
case "getExRateList":
// GetExRateList();
GetExRateListNew();
// GetExRateList();
GetExRateListNew();
break;
case "getSubLocation":
@ -215,9 +216,10 @@ namespace Swift.web.AgentNew.SendTxn
case "insertAddDocLog":
InsertAdditionalDocumentLog();
break;
//case "checkAgentQuota":
// CheckAgentQuota("customerId");
// break;
//case "checkAgentQuota":
// CheckAgentQuota("customerId");
// break;
}
#endregion Ajax methods
@ -299,7 +301,7 @@ namespace Swift.web.AgentNew.SendTxn
foreach (DataRow item in dt.Rows)
{
if ( item["ISREALTIME"].ToString().ToLower() == "true")
if (item["ISREALTIME"].ToString().ToLower() == "true")
{
exRate.UserName = GetStatic.GetUser();
exRate.isExRateCalcByPartner = true;
@ -332,7 +334,7 @@ namespace Swift.web.AgentNew.SendTxn
}
}
if (dt == null)
{
Response.Write("");
@ -509,6 +511,7 @@ namespace Swift.web.AgentNew.SendTxn
//var dt = st.LoadCustomerData(searchType, searchValue, "s", GetStatic.GetCountryId(), GetStatic.GetSettlingAgent());
var dt = st.LoadReceiverData(GetStatic.GetUser(), customerId, partnerId);
//LoadPaymentOption(dt.Rows[0]["COUNTRYID"].ToString());
if (dt == null)
{
Response.Write("");
@ -521,6 +524,37 @@ namespace Swift.web.AgentNew.SendTxn
Response.End();
}
[WebMethod]
public static object LoadPaymentOption(string countryId)
{
SendV2 sendV2Instance = new SendV2();
DataTable dt = sendV2Instance.st.GetPaymentOption(countryId);
if (dt == null)
{
return new { error = "Failed to retrieve payment options" };
}
var paymentOptions = ConvertDataTableToList(dt);
return paymentOptions;
}
private static List<object> ConvertDataTableToList(DataTable dataTable)
{
List<object> list = new List<object>();
foreach (DataRow row in dataTable.Rows)
{
list.Add(new
{
detailTitle = row["detailTitle"].ToString(),
valueId = Convert.ToDecimal(row["valueId"])
});
}
return list;
}
private void PopulateReceiverDDL()
{
string customerId = Request.Form["customerId"];
@ -890,7 +924,7 @@ namespace Swift.web.AgentNew.SendTxn
// string checkedOrNot = item["ISDEFAULT"].ToString() == "1" ? "checked=\"checked\"" : "";
// sb.AppendLine("<input " + checkedOrNot + " type=\"checkbox\" id=\"" + item["COLLMODE"] + "\" name=\"chkCollMode\" value=\"" + item["detailTitle"] + "\" class=\"collMode-chk\">&nbsp;<label for=\"" + item["COLLMODE"] + "\">" + item["detailDesc"] + "</label>&nbsp;&nbsp;");
// }
// sb.AppendLine("<span style='background-color: yellow; font-weight: 600;padding: 4px; display:none;' id='availableBalSpan'> Available Bal: <label id=\"availableBal\" style=\"font-size: 14px;font-weight: 800;\"></label>&nbsp;GBP</span>");
// collModeTd.InnerHtml = sb.ToString();
//}
@ -1036,7 +1070,7 @@ namespace Swift.web.AgentNew.SendTxn
_sdd.SetDDL(ref ddlSendCustomerType, "EXEC proc_online_dropDownList @flag='dropdownList',@parentId=4700", "valueId", "detailTitle", "", "SELECT CUSTOMER TYPE");
_sdd.SetDDL(ref ddlIdIssuedCountry, "EXEC proc_sendPageLoadData @flag='idIssuedCountry'", "countryId", "countryName", "", "SELECT COUNTRY");
_sdd.SetDDL(ref ddlEmpBusinessType, "EXEC proc_online_dropDownList @flag='dropdownList',@parentId=7002", "valueId", "detailTitle", "11007", "");
// _sdd.SetDDL(ref custLocationDDL, "EXEC proc_online_dropDownList @flag='state',@countryId='233'", "stateId", "stateName", "", "SELECT");
// _sdd.SetDDL(ref custLocationDDL, "EXEC proc_online_dropDownList @flag='state',@countryId='233'", "stateId", "stateName", "", "SELECT");
//_sdd.SetDDL(ref sendingAgentOnBehalfDDL, "EXEC proc_sendPageLoadData @flag='S-AGENT-BEHALF',@user='" + GetStatic.GetUser() + "',@sAgent='" + GetStatic.GetAgent() + "'", "agentId", "agentName", "", "Select Branch/Agent");
_sdd.SetDDL(ref ddlRecIdType, "EXEC proc_online_dropDownList @flag='idType',@user='" + GetStatic.GetUser() + "'", "valueId", "detailTitle", "", "Select..");
_sdd.SetDDL(ref sourceOfFund, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=3900", "valueId", "detailTitle", "", "Select..");
@ -1051,7 +1085,7 @@ namespace Swift.web.AgentNew.SendTxn
_sdd.SetDDL(ref ddlVisaStatus, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=7005", "valueId", "detailTitle", "", "Select..");
_sdd.SetDDL(ref ddlOccupation, "EXEC proc_online_dropDownList @flag='dropdownList',@user='" + GetStatic.GetUser() + "',@parentId=2000", "valueId", "detailTitle", "", "Select..");
//_sdd.SetDDL(ref ddlPayoutPartner, "EXEC proc_sendPageLoadData @flag='choose-partner',@user='" + GetStatic.GetUser() + "'", "AGENTID", "AGENTNAME", "", "Select Partner");
_sdd.SetDDL(ref ddlPaymentOption, "EXEC proc_online_dropDownList @flag='paymentMode',@user='" + GetStatic.GetUser() + "'", "detailDesc", "detailTitle", "", "Select");
//_sdd.SetDDL(ref ddlPaymentOption, "EXEC proc_online_dropDownList @flag='paymentMode',@user='" + GetStatic.GetUser() + "'", "detailDesc", "detailTitle", "", "Select");
}
private void LoadSenderCountry(ref DropDownList ddl, string defaultValue, string label)
@ -1186,23 +1220,7 @@ namespace Swift.web.AgentNew.SendTxn
exRate.Introducer = Request.Form["introducerTxt"];
exRate.TpExRate = Request.Form["tpExRate"];
exRate.RewardAmt = Request.Form["rewardAmt"];
//{
// DataTable errTbl = new DataTable();
// DataColumn dCol1 = new DataColumn("ErrCode", typeof(System.String));
// DataColumn dCol2 = new DataColumn("Msg", typeof(System.String));
// errTbl.Columns.Add(dCol1);
// errTbl.Columns.Add(dCol2);
// //DataRow row = errTbl.NewRow();
// //row[dCol1] = "1";
// //row[dCol2] = "Introducer value can not be empty";
// //errTbl.Rows.Add(row);
// Response.ContentType = "text/plain";
// var jsonRes = DataTableToJson(errTbl);
// Response.Write(jsonRes);
// Response.End();
//}
if (exRate.isExRateCalcByPartner)
{
exRate.CalcBy = Request.Form["calcBy"] == "cAmt" ? "C" : "P";
@ -1245,6 +1263,7 @@ namespace Swift.web.AgentNew.SendTxn
, exRate.Introducer
, exRate.RewardAmt
, exRate.ProviderId
);
}
else
@ -1274,6 +1293,7 @@ namespace Swift.web.AgentNew.SendTxn
, exRate.ManualSc
, exRate.CalcBy
, exRate.ProviderId
);
}
@ -1628,10 +1648,10 @@ namespace Swift.web.AgentNew.SendTxn
{
var customerId = Request.Form["customerId"];
var isAdditionalDocRequired = Request.Form["isAdditionalDocRequired"];
DbResult _res = new DbResult();
DbResult _res = new DbResult();
_res = _ald.InsertAdditionalDocumentLog(GetStatic.GetUser(), customerId, isAdditionalDocRequired);
Response.ContentType = "text/plain";
Response.Write(JsonConvert.SerializeObject(_res));
Response.End();

1
Swift.web/Remit/Administration/CountrySetup/CollectionMode/List.aspx.cs

@ -65,6 +65,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.CollectionMode
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/CountryCurrency.aspx.cs

@ -87,6 +87,7 @@ namespace Swift.web.Remit.Administration.CountrySetup
new TabField("Allowed Currency", "", true),
new TabField("Mobile Format", "MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/CountryIdSetup.aspx.cs

@ -93,6 +93,7 @@ namespace Swift.web.Remit.Administration.CountrySetup
new TabField("Allowed Currency", "CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "", true),
new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/EventSetup/List.aspx.cs

@ -64,6 +64,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.EventSetup
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/EventSetup/Manage.aspx.cs

@ -73,6 +73,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.EventSetup
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/Manage.aspx.cs

@ -95,6 +95,7 @@ namespace Swift.web.Remit.Administration.CountrySetup
new TabField("Allowed Currency", "CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/MobileFormat.aspx.cs

@ -92,6 +92,7 @@ namespace Swift.web.Remit.Administration.CountrySetup
new TabField("Allowed Currency", "CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "", true),
new TabField("Valid ID Setup", "CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

86
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx

@ -0,0 +1,86 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="List.aspx.cs" Inherits="Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup.List" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script src="../../../../js/swift_grid.js" type="text/javascript"> </script>
<script src="../../../../js/functions.js" type="text/javascript"> </script>
<!-- Bootstrap -->
<link href="../../../../ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<!-- <link rel="stylesheet" href="css/nanoscroller.css">-->
<link href="../../../../ui/css/menu.css" type="text/css" rel="stylesheet" />
<link href="../../../../ui/css/style.css" type="text/css" rel="stylesheet" />
<link href="../../../../ui/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>
<form id="form1" runat="server">
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
<h1></h1>
<ol class="breadcrumb">
<li><a href="../../../../Front.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
<li><a href="#" onclick="return LoadModule('adminstration')">Administration </a></li>
<li><a href="#" onclick="return LoadModule('sub_administration')">Sub_Administration</a></li>
<li class="active"><a href="List.aspx">State Setup</a></li>
</ol>
</div>
</div>
</div>
<!-- end .page title-->
<!-- Nav tabs -->
<div class="listtabs">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="deactive"><a href="List.aspx">Country List </a></li>
<li role="presentation" class="active"><a href="#list" aria-controls="home" role="tab" data-toggle="tab">Manage Country</a></li>
</ul>
</div>
<div>
<label><span id="spnCname" runat="server"><%=GetCountryName()%></span></label>
</div>
<div id="divTab" runat="server">
</div>
<!-- Tab panes -->
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="list">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default ">
<!-- Start .panel -->
<div class="panel-heading">
<h4 class="panel-title">Promotional Rate Setup</h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a><%--<a href="#"
class="panel-action panel-action-dismiss" data-panel-dismiss></a>--%>
</div>
</div>
<div class="panel-body">
<div id="rpt_grid" runat="server" class="gridDiv">
</div>
</div>
</div>
<!-- End .panel -->
</div>
<!--end .col-->
</div>
<!--end .row-->
</div>
</div>
</div>
</form>
<script type="text/javascript" src="../../../../ui/js/jquery.min.js"></script>
<script type="text/javascript" src="../../../../ui/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../../../../ui/js/metisMenu.min.js"></script>
</body>
</html>

156
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.cs

@ -0,0 +1,156 @@
using Swift.DAL.BL.Remit.Administration;
using Swift.DAL.SwiftDAL;
using Swift.web.Component.Grid;
using Swift.web.Component.Grid.gridHelper;
using Swift.web.Component.Tab;
using Swift.web.Library;
using System;
using System.Collections.Generic;
namespace Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup
{
public partial class List : System.Web.UI.Page
{
private const string ViewFunctionId = "20101200";
private const string AddEditFunctionId = "20101210";
private const string DeleteFunctionId = "20101220";
private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
private readonly PromotionalRateDao obj = new PromotionalRateDao();
private readonly SwiftGrid grid = new SwiftGrid();
private readonly SwiftTab _tab = new SwiftTab();
private StaticDataDdl _sl = new StaticDataDdl();
private const string GridName = "grid_rate";
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Authenticate();
LoadTab();
}
DeleteRow();
LoadGrid();
}
protected string GetCountryName()
{
return "Country : " + swiftLibrary.GetCountryName(GetCountryId().ToString());
}
protected long GetCountryId()
{
return GetStatic.ReadNumericDataFromQueryString("countryId");
}
private string GetOperationType()
{
return GetStatic.ReadQueryString("opType", "");
}
#region method
private void LoadTab()
{
var countryId = GetCountryId().ToString();
var opType = GetOperationType();
var queryStrings = "?countryId=" + countryId + "&opType=" + opType;
_tab.NoOfTabPerRow = 8;
_tab.TabList = new List<TabField>
{
new TabField("Country Info", "../Manage.aspx" + queryStrings),
new TabField("State Setup", "../StateSetup/List.aspx" + queryStrings),
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings, true),
};
switch (opType)
{
case "B":
_tab.TabList.Add(new TabField("Collection Mode", "../CollectionMode/List.aspx" + queryStrings));
_tab.TabList.Add(new TabField("Receiving Mode", "../ReceivingMode/List.aspx" + queryStrings));
break;
case "S":
_tab.TabList.Add(new TabField("Collection Mode", "../CollectionMode/List.aspx" + queryStrings));
break;
case "R":
_tab.TabList.Add(new TabField("Receiving Mode", "../ReceivingMode/List.aspx" + queryStrings));
break;
}
_tab.TabList.Add(new TabField("Event", "../EventSetup/List.aspx" + queryStrings));
divTab.InnerHtml = _tab.CreateTab();
}
private void LoadGrid()
{
grid.FilterList = new List<GridFilter>
{
new GridFilter("depositType", "Deposit Type", "T"),
//new GridFilter("stateName", "State Name:", "T")
};
grid.ColumnList = new List<GridColumn>
{
new GridColumn("depositType", "Deposit Type", "", "T"),
new GridColumn("margin", "Rate", "", "T"),
new GridColumn("purchaseRate", "Promotional Rate", "", "T")
};
bool allowAddEdit = swiftLibrary.HasRight(AddEditFunctionId);
grid.GridType = 1;
grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
grid.GridName = GridName;
grid.ShowAddButton = true;
grid.ShowFilterForm = true;
grid.ShowPagingBar = true;
grid.RowIdField = "depositType";
grid.AllowEdit = swiftLibrary.HasRight(AddEditFunctionId);
grid.AllowDelete = swiftLibrary.HasRight(DeleteFunctionId);
grid.AddPage = "Manage.aspx?countryId=" + GetCountryId() + "&opType=" + GetOperationType();
string sql = "[proc_countryRateMaster] @flag = 'get-list', @countryId = " + GetCountryId();
grid.SetComma();
rpt_grid.InnerHtml = grid.CreateGrid(sql);
}
private void DeleteRow()
{
string id = grid.GetCurrentRowId(GridName);
if (string.IsNullOrEmpty(id))
return;
DbResult dbResult = obj.Delete(GetStatic.GetUser(), GetCountryId().ToString(), id);
ManageMessage(dbResult);
}
private void ManageMessage(DbResult dbResult)
{
GetStatic.SetMessage(dbResult);
if (dbResult.ErrorCode != "0")
{
GetStatic.PrintMessage(Page);
}
else
{
Response.Redirect("List.aspx?countryId=" + GetCountryId() + "&opType=" + GetOperationType());
}
}
private void Authenticate()
{
swiftLibrary.CheckAuthentication(ViewFunctionId);
}
#endregion method
}
}

62
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/List.aspx.designer.cs

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup
{
public partial class List
{
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// spnCname control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spnCname;
/// <summary>
/// divTab control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTab;
/// <summary>
/// rpt_grid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl rpt_grid;
}
}

149
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx

@ -0,0 +1,149 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup.Manage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script src="/js/swift_grid.js" type="text/javascript"> </script>
<script src="/js/functions.js" type="text/javascript"> </script>
<link href="/js/jQuery/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="/ui/css/menu.css" type="text/css" rel="stylesheet" />
<link href="/ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="../../../../js/jQuery/jquery.min.js"></script>
<link href="/ui/css/waves.min.css" type="text/css" rel="stylesheet" />
<link href="/ui/css/style.css" type="text/css" rel="stylesheet" />
<link href="/ui/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<script type="text/javascript">
$(document).ready(function () {
$("#chkPromRate").click(function () {
if ($(this).is(":checked")) {
$("#divPromRate").show();
} else {
$("#divPromRate").hide();
}
});
});
</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManger1" runat="server"></asp:ScriptManager>
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
<ol class="breadcrumb">
<li><a href="../../../../Front.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
<li><a href="#" onclick="return LoadModule('adminstration')">Administration </a></li>
<li><a href="#" onclick="return LoadModule('sub_administration')">Sub_Administration</a></li>
<li class="active"><a href="manage.aspx">Country Setup</a></li>
</ol>
</div>
</div>
</div>
<div class="listtabs">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation" class="deactive"><a href="List.aspx">Country List </a></li>
<li role="presentation" class="active"><a href="#list" aria-controls="home" role="tab" data-toggle="tab">Manage Country</a></li>
</ul>
</div>
<div>
<label><span id="spnCname" runat="server"><%=GetCountryName()%></span></label>
</div>
<div id="divTab" runat="server">
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="list">
<div class="row">
<div class="col-md-6">
<div class="panel panel-default ">
<div class="panel-heading">
<h4 class="panel-title">Promotional Rate Setup
</h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label" for="">
<span class="ErrMsg">*</span> Fileds are mendotory</label>
</div>
<div class="form-group">
<asp:Label ID="lblMsg" Font-Bold="true" ForeColor="Red" runat="server" Text=""></asp:Label>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Deposit Type:
<span class="errormsg">*</span>
</label>
<div class="col-lg-9 col-md-8">
<asp:DropDownList ID="depositType" runat="server" CssClass="form-control">
<asp:ListItem Value="ONLINE" Selected="true">ONLINE</asp:ListItem>
<asp:ListItem Value="DEBIT_CARD">DEBIT CARD</asp:ListItem>
<asp:ListItem Value="EBANKING">EBANKING</asp:ListItem>
</asp:DropDownList>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="depositType" ValidationGroup="static" ErrorMessage="Required!" Display="Dynamic" ForeColor="Red">
</asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Rate:<span class="errormsg">*</span>
</label>
<div class="col-lg-9 col-md-8">
<asp:TextBox ID="actualRate" runat="server" TextMode="SingleLine" CssClass="form-control"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server" ControlToValidate="actualRate" ValidationGroup="static" ErrorMessage="Required!" Display="Dynamic" ForeColor="Red">
</asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Is Active:
</label>
<div class="col-lg-9 col-md-8">
<asp:DropDownList ID="ddlStatus" CssClass="form-control" runat="server" Width="100%">
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label">
<input type="checkbox" runat="server" id="chkPromRate" value="PromotionalRate"/>Promotional Rate</label>
</div>
<div class="form-group" id="divPromRate" runat="server" style="display: none">
<label class="col-lg-3 col-md-4 control-label" for="">
Promotional Rate:
</label>
<div class="col-lg-9 col-md-8">
<asp:TextBox ID="promRate" CssClass="form-control" runat="server" TextMode="SingleLine"></asp:TextBox>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-3">
<asp:Button ID="btnSumit" runat="server" Text="Submit" ValidationGroup="static" OnClick="btnSubmit_Click" class="btn btn-primary m-t-25" />
<cc1:ConfirmButtonExtender ID="btnSumitcc" runat="server"
ConfirmText="Confirm To Save ?" Enabled="True" TargetControlID="btnSumit">
</cc1:ConfirmButtonExtender>
&nbsp;
<asp:Button ID="btnDelete" runat="server" Text="Delete" class="btn btn-primary m-t-25" OnClick="btnDelete_Click" />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server"
ConfirmText="Are you sure to delete record ?" Enabled="True" TargetControlID="btnDelete">
</cc1:ConfirmButtonExtender>
<input type="button" id="btnBack" value=" Back " class="btn btn-primary m-t-25" onclick="Javascript: history.back(); " />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

170
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.cs

@ -0,0 +1,170 @@
using Swift.DAL.BL.Remit.Administration;
using Swift.DAL.SwiftDAL;
using Swift.web.Component.Tab;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
namespace Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup
{
public partial class Manage : System.Web.UI.Page
{
private const string ViewFunctionId = "20101200";
private const string AddEditFunctionId = "20101210";
private const string DeleteFunctionId = "20101220";
private readonly RemittanceLibrary _sl1 = new RemittanceLibrary();
private readonly PromotionalRateDao obj = new PromotionalRateDao();
private readonly SwiftTab _tab = new SwiftTab();
private StaticDataDdl _sl = new StaticDataDdl();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
Authenticate();
if (GetType() != "")
{
PopulateDataById();
}
else
{
PopulateDdl(null);
}
LoadTab();
}
}
#region QueryString
protected string GetCountryName()
{
return "Country : " + _sl1.GetCountryName(GetCountryId().ToString());
}
private string GetType()
{
return GetStatic.ReadQueryString("depositType", "");
}
protected long GetCountryId()
{
return GetStatic.ReadNumericDataFromQueryString("countryId");
}
private string GetOperationType()
{
return GetStatic.ReadQueryString("opType", "");
}
#endregion QueryString
#region Method
private void Authenticate()
{
_sl1.CheckAuthentication(ViewFunctionId + "," + AddEditFunctionId + "," + DeleteFunctionId);
btnDelete.Visible = _sl1.HasRight(DeleteFunctionId);
btnSumit.Visible = _sl1.HasRight(AddEditFunctionId);
}
private void LoadTab()
{
var countryId = GetCountryId().ToString();
var opType = GetOperationType();
var queryStrings = "?countryId=" + countryId + "&opType=" + opType;
_tab.NoOfTabPerRow = 8;
_tab.TabList = new List<TabField>
{
new TabField("Country Info", "../Manage.aspx" + queryStrings),
new TabField("State Setup", "List.aspx" + queryStrings),
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
//new TabField("Promotional Rate Setup", "PromotionalRateSetup/List.aspx" + queryStrings, true),
};
switch (opType)
{
case "B":
_tab.TabList.Add(new TabField("Collection Mode", "../CollectionMode/List.aspx" + queryStrings));
_tab.TabList.Add(new TabField("Receiving Mode", "../ReceivingMode/List.aspx" + queryStrings));
break;
case "S":
_tab.TabList.Add(new TabField("Collection Mode", "../CollectionMode/List.aspx" + queryStrings));
break;
case "R":
_tab.TabList.Add(new TabField("Receiving Mode", "../ReceivingMode/List.aspx" + queryStrings));
break;
}
_tab.TabList.Add(new TabField("Event", "../EventSetup/List.aspx" + queryStrings));
_tab.TabList.Add(new TabField("Manage", "", true));
divTab.InnerHtml = _tab.CreateTab();
}
private void PopulateDdl(DataRow dr)
{
}
private void PopulateDataById()
{
DataRow dr = obj.SelectById(GetStatic.GetUser(), GetCountryId().ToString(), GetType().ToString());
if (dr == null)
return;
depositType.Text = dr["depositType"].ToString();
actualRate.Text = dr["margin"].ToString();
if(dr["purchaseRate"].ToString() != "")
{
promRate.Text = dr["purchaseRate"].ToString();
//chkPromRate.Checked = true;
divPromRate.Style["display"] = "block";
}
ddlStatus.Text = dr["isActive"].ToString();
}
private void Update()
{
var dbResult = obj.Update(GetStatic.GetUser(), GetCountryId().ToString(), depositType.Text, actualRate.Text, promRate.Text, ddlStatus.SelectedValue);
ManageMessage(dbResult);
}
private void DeleteRow()
{
var dbResult = obj.Delete(GetStatic.GetUser(), GetCountryId().ToString(), depositType.Text);
ManageMessage(dbResult);
}
private void ManageMessage(DbResult dbResult)
{
GetStatic.SetMessage(dbResult);
if (dbResult.ErrorCode == "0")
{
Response.Redirect("List.aspx?countryId=" + GetCountryId() + "&opType=" + GetOperationType());
}
else
{
GetStatic.PrintMessage(Page);
}
}
#endregion Method
#region Element Method
protected void btnSubmit_Click(object sender, EventArgs e)
{
Update();
}
protected void btnDelete_Click(object sender, EventArgs e)
{
DeleteRow();
}
#endregion Element Method
}
}

170
Swift.web/Remit/Administration/CountrySetup/PromotionalRateSetup/Manage.aspx.designer.cs

@ -0,0 +1,170 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swift.web.Remit.Administration.CountrySetup.PromotionalRateSetup
{
public partial class Manage
{
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// ScriptManger1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager ScriptManger1;
/// <summary>
/// spnCname control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl spnCname;
/// <summary>
/// divTab control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divTab;
/// <summary>
/// lblMsg control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMsg;
/// <summary>
/// depositType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList depositType;
/// <summary>
/// RequiredFieldValidator2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// actualRate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox actualRate;
/// <summary>
/// RequiredFieldValidator1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator1;
/// <summary>
/// ddlStatus control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlStatus;
/// <summary>
/// divPromRate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPromRate;
/// <summary>
/// promRate control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox promRate;
/// <summary>
/// btnSumit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSumit;
/// <summary>
/// btnSumitcc control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender btnSumitcc;
/// <summary>
/// btnDelete control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnDelete;
/// <summary>
/// ConfirmButtonExtender1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender ConfirmButtonExtender1;
}
}

1
Swift.web/Remit/Administration/CountrySetup/ReceivingMode/List.aspx.cs

@ -67,6 +67,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.ReceivingMode
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/StateSetup/List.aspx.cs

@ -69,6 +69,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.StateSetup
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

1
Swift.web/Remit/Administration/CountrySetup/StateSetup/Manage.aspx.cs

@ -84,6 +84,7 @@ namespace Swift.web.Remit.Administration.CountrySetup.StateSetup
new TabField("Allowed Currency", "../CountryCurrency.aspx" + queryStrings),
new TabField("Mobile Format", "../MobileFormat.aspx" + queryStrings),
new TabField("Valid ID Setup", "../CountryIdSetup.aspx" + queryStrings),
new TabField("Promotional Rate Setup", "../PromotionalRateSetup/List.aspx" + queryStrings),
};
switch (opType)
{

48
Swift.web/Remit/Administration/PromotionalRateDao.cs

@ -0,0 +1,48 @@
using Swift.DAL.SwiftDAL;
using System.Data;
namespace Swift.DAL.BL.Remit.Administration
{
public class PromotionalRateDao : RemittanceDao
{
public DbResult Update(string user, string countryId, string depositType, string actualRate, string promRate, string activeStatus)
{
string sql = "EXEC proc_countryRateMaster";
sql += " @flag = 'i-rate'";
sql += ", @user = " + FilterString(user);
sql += ", @countryId = " + FilterString(countryId);
sql += ", @depositType = " + FilterString(depositType);
sql += ", @actualRate = " + FilterString(actualRate);
sql += ", @promRate = " + FilterString(promRate);
sql += ", @activeStatus = " + FilterString(activeStatus);
return ParseDbResult(ExecuteDataset(sql).Tables[0]);
}
public DbResult Delete(string user, string countryId, string depositType)
{
string sql = "EXEC proc_countryRateMaster";
sql += " @flag = 'delete'";
sql += ", @user = " + FilterString(user);
sql += ", @countryId = " + FilterString(countryId);
sql += ", @depositType = " + FilterString(depositType);
return ParseDbResult(ExecuteDataset(sql).Tables[0]);
}
public DataRow SelectById(string user, string countryId, string depositType)
{
string sql = "EXEC proc_countryRateMaster";
sql += " @flag = 'getById'";
sql += ", @user = " + FilterString(user);
sql += ", @countryId = " + FilterString(countryId);
sql += ", @depositType = " + FilterString(depositType);
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];
}
}
}

115
Swift.web/Remit/Administration/ReferralSetup/Manage.aspx

@ -0,0 +1,115 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Manage.aspx.cs" Inherits="Swift.web.Remit.Administration.ReferralSetup.Manage" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<script src="/js/swift_grid.js" type="text/javascript"> </script>
<script src="/js/functions.js" type="text/javascript"> </script>
<link href="/js/jQuery/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="/ui/css/menu.css" type="text/css" rel="stylesheet" />
<link href="/ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="/ui/css/waves.min.css" type="text/css" rel="stylesheet" />
<link href="/ui/css/style.css" type="text/css" rel="stylesheet" />
<link href="/ui/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="sm" runat="server"></asp:ScriptManager>
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
<ol class="breadcrumb">
<li><a href="../../../Front.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
<li><a href="#" onclick="return LoadModule('adminstration')">Mobile </a></li>
<li><a href="#" onclick="return LoadModule('applicationsetting')">Mobile Setup </a></li>
<li class="active"><a href="Manage.aspx">Refer Point Setup</a></li>
</ol>
</div>
</div>
</div>
<div class="listtabs">
<ul class="nav nav-tabs" role="tablist">
<li role="presentation"><a href="ReferPointSetup.aspx" class="selected" aria-controls="home" role="tab" data-toggle="tab">Refer Point Setup List </a></li>
<li role="presentation"><a href="ReferPointMasterSetup.aspx" class="selected" aria-controls="home" role="tab" data-toggle="tab">Refer Point Master Setup </a></li>
<li role="presentation" class="active"><a href="#" class="selected" aria-controls="home" role="tab" data-toggle="tab">Manage Refer Point </a></li>
</ul>
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="list">
<div class="row">
<div class="col-md-6">
<div class="panel panel-default ">
<div class="panel-heading">
<h4 class="panel-title"></h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle" data-panel-toggle></a>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<label class="control-label" for="">
<span class="ErrMsg">*</span> Fileds are mendotory and use the own idea to input this for</label>
</div>
<div class="form-group">
<asp:Label ID="lblMsg" Font-Bold="true" ForeColor="Red" runat="server" Text=""></asp:Label>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Reward Title:<span class="errormsg">*</span>
</label>
<div class="col-lg-9 col-md-8">
<asp:TextBox ID="promotionType" CssClass="form-control" runat="server" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server" ControlToValidate="point" ValidationGroup="static" ErrorMessage="Required!" Display="Dynamic" ForeColor="Red">
</asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Reward Point: <span class="errormsg">*</span>
</label>
<div class="col-lg-9 col-md-8">
<asp:TextBox ID="point" CssClass="form-control" runat="server" TextMode="MultiLine"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3"
runat="server" ControlToValidate="point" ValidationGroup="static" ErrorMessage="Required!" Display="Dynamic" ForeColor="Red">
</asp:RequiredFieldValidator>
</div>
</div>
<div class="form-group">
<label class="col-lg-3 col-md-4 control-label" for="">
Is Active:
</label>
<div class="col-lg-9 col-md-8">
<asp:DropDownList ID="ddlStatus" CssClass="form-control" runat="server" Width="100%">
<asp:ListItem Value="Y">Yes</asp:ListItem>
<asp:ListItem Value="N">No</asp:ListItem>
</asp:DropDownList>
</div>
</div>
<div class="form-group">
<div class="col-md-8 col-md-offset-3">
<asp:Button ID="btnSumit" runat="server" Text="Submit" ValidationGroup="static" OnClick="btnSumit_Click" class="btn btn-primary m-t-25" />
<cc1:ConfirmButtonExtender ID="btnSumitcc" runat="server"
ConfirmText="Confirm To Save ?" Enabled="True" TargetControlID="btnSumit">
</cc1:ConfirmButtonExtender>
&nbsp;
<asp:Button ID="btnDelete" runat="server" Text="Delete" class="btn btn-primary m-t-25" OnClick="btnDelete_Click" />
<cc1:ConfirmButtonExtender ID="ConfirmButtonExtender1" runat="server"
ConfirmText="Are you sure to delete record ?" Enabled="True" TargetControlID="btnDelete">
</cc1:ConfirmButtonExtender>
<input type="button" id="btnBack" value=" Back " class="btn btn-primary m-t-25" onclick="Javascript: history.back(); " />
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

75
Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.cs

@ -0,0 +1,75 @@
using Swift.DAL.BL.System.GeneralSettings;
using Swift.DAL.SwiftDAL;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class Manage : System.Web.UI.Page
{
private const string ViewFunctionId = "90400000";
private readonly StaticDataDao _obj = new StaticDataDao();
private readonly StaticDataDdl _sl = new StaticDataDdl();
protected void Page_Load(object sender, EventArgs e)
{
//Authenticate();
if (!IsPostBack)
{
GetStatic.SetActiveMenu(ViewFunctionId);
PopulateDataById();
}
}
private void PopulateDataById()
{
string rewardType = GetStatic.ReadQueryString("Promotiontype", "");
DataRow dr = _obj.GetDetailById(GetStatic.GetUser(), rewardType);
if (dr == null)
return;
promotionType.Text = dr["PromotionType"].ToString();
point.Text = dr["Points"].ToString();
ddlStatus.Text = dr["isActive"].ToString();
//PopulateDdl(dr);
}
protected void btnSumit_Click(object sender, EventArgs e)
{
Update();
}
private void Update()
{
DbResult dbResult = _obj.UpdateByType(GetStatic.GetUser(), promotionType.Text, point.Text);
ManageMessage(dbResult);
}
private void ManageMessage(DbResult dbResult)
{
GetStatic.SetMessage(dbResult);
if (dbResult.ErrorCode == "0")
{
Response.Redirect("ReferPointSetup.aspx");
}
else
{
GetStatic.PrintMessage(Page);
}
}
protected void btnDelete_Click(object sender, EventArgs e)
{
_obj.DeleteByType(GetStatic.GetUser(), promotionType.Text);
}
}
}

134
Swift.web/Remit/Administration/ReferralSetup/Manage.aspx.designer.cs

@ -0,0 +1,134 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class Manage
{
/// <summary>
/// Head1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlHead Head1;
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// sm control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.ScriptManager sm;
/// <summary>
/// lblMsg control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Label lblMsg;
/// <summary>
/// promotionType control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox promotionType;
/// <summary>
/// RequiredFieldValidator2 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator2;
/// <summary>
/// point control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox point;
/// <summary>
/// RequiredFieldValidator3 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.RequiredFieldValidator RequiredFieldValidator3;
/// <summary>
/// ddlStatus control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlStatus;
/// <summary>
/// btnSumit control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnSumit;
/// <summary>
/// btnSumitcc control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender btnSumitcc;
/// <summary>
/// btnDelete control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.Button btnDelete;
/// <summary>
/// ConfirmButtonExtender1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::AjaxControlToolkit.ConfirmButtonExtender ConfirmButtonExtender1;
}
}

149
Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx

@ -0,0 +1,149 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReferPointMasterSetup.aspx.cs" Inherits="Swift.web.Remit.Administration.ReferralSetup.ReferPointMasterSetup" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../../../ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="../../../ui/css/style.css" rel="stylesheet" />
<link href="../../../ui/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<link href="../../../js/jQuery/jquery-ui.css" rel="stylesheet" />
<script src="../../../ui/js/jquery.min.js"></script>
<script src="../../../ui/js/jquery-ui.min.js"></script>
<script src="../../../ui/bootstrap/js/bootstrap.min.js"></script>
<script src="../../../js/swift_grid.js" type="text/javascript"></script>
<script src="../../../js/functions.js" type="text/javascript"></script>
<script>
function editAmount(pointsId) {
debugger
var params = pointsId.split(',');
var points = params[0];
var rowId = params[1];
$("#amountPopup").modal("show");
$("#oldAmount").val(points);
$('#oldAmount').attr('readonly', true);
$('#hdnRowId').val(rowId);
}
function ConfirmSave() {
debugger;
var newRewardAmount = $("#newAmount").val();
var oldRewardAmount = $("#oldAmount").val();
var RowId = $('#hdnRowId').val();
alert(RowId);
if (newRewardAmount == null || newRewardAmount == '') {
alert("Please enter the reward amount to update!!");
return false;
}
dataToSend = { MethodName: 'ConfirmSave', rewardAmount: newRewardAmount, oldRewardAmt: oldRewardAmount, rowId: RowId };
if (confirm('Do you want to update reward amount?')) {
$.post("", dataToSend, function (response) {
var data = jQuery.parseJSON(response);
if (data.ErrorCode == 0) {
$("#amountPopup").modal("hide");
$("#loadGrid").click();
window.location.reload();
}
else {
alert(data.Msg);
}
});
}
return false;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div class="hidden">
<asp:HiddenField ID="hdnRowId" runat="server" />
</div>
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
<ol class="breadcrumb">
<li><a href="../../../Front.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
<li><a href="#">Mobile</a></li>
<li><a href="#">Mobile Setup</a></li>
<li class="active"><a href="#">Refer Point Master Setup</a></li>
</ol>
</div>
</div>
</div>
<div class="listtabs">
<ul class="nav nav-tabs">
<li><a href="ReferPointSetup.aspx">Refer Point Setup List</a></li>
<li class="active"><a href="ReferPointMasterSetup.aspx">Refer Point Master Setup</a></li>
</ul>
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="list">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default ">
<div class="panel-heading">
<h4 class="panel-title">Refer Point Master Setup List</h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle"></a>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<div id="rpt_grid" runat="server" enableviewstate="false"></div>
</div>
</div>
<div class="container-fluid">
<div class="row">
<div class="col-md-12">
<div class="modal fade" id="amountPopup" tabindex="-1" style="margin-top: 100px; overflow: hidden;" aria-hidden="true" data-backdrop="static" data-keyboard="false">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button class="close" data-dismiss="modal">&times;</button>
<center>
<h2 class="modal-title">Edit Reward Amount</h2>
</center>
</div>
<div class="modal-body">
<div class="form-inline">
<div class="col-md-6">
<div class="input-group input-append date">
<h4 class="modal-title">Old Reward Amount</h4>
<asp:TextBox ID="oldAmount" Width="250" runat="server" CssClass="form-control"></asp:TextBox>
</div>
</div>
<div class="col-md-6">
<div class="input-group input-append date">
<h4 class="modal-title">New Reward Amount</h4>
<asp:TextBox ID="newAmount" Width="250" runat="server" CssClass="form-control"></asp:TextBox>
</div>
</div>
</div>
</div>
<br />
<br />
<div class="modal-footer">
<button class="btn btn-primary" onclick="return ConfirmSave()">Save</button>
<button class="btn btn-danger" data-dismiss="modal" onclick="return Cancel()">Close</button>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

113
Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.cs

@ -0,0 +1,113 @@
using Newtonsoft.Json;
using Swift.DAL.BL.System.GeneralSettings;
using Swift.DAL.SwiftDAL;
using Swift.web.Component.Grid;
using Swift.web.Component.Grid.gridHelper;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class ReferPointMasterSetup : System.Web.UI.Page
{
private const string ViewFunctionId = "90400000";
private const string GridName = "grd_bldom";
private readonly SwiftGrid grid = new SwiftGrid();
private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
private readonly StaticDataDao _obj = new StaticDataDao();
protected void Page_Load(object sender, EventArgs e)
{
//Authenticate();
var methodName = Request.Form["MethodName"];
if (!IsPostBack)
{
if (methodName == "ConfirmSave")
{
UpdateRewardAmount();
}
GetStatic.PrintMessage(Page);
}
LoadGrid();
}
private void LoadGrid()
{
grid.FilterList = new List<GridFilter>
{
new GridFilter("Points", "Reward Points", "LT"),
// new GridFilter("is_Active","Active","T")
};
grid.ColumnList = new List<GridColumn>
{
new GridColumn("RowId", "Id", "", "T"),
new GridColumn("Points", "Reward Value", "", "T"),
new GridColumn("isActive", "Is Active", "", "T")
};
grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
grid.GridName = GridName;
grid.GridType = 1;
grid.ShowAddButton = true;
grid.ShowFilterForm = true;
grid.ShowPagingBar = true;
grid.AllowEdit = false;
grid.SortOrder = "ASC";
grid.CustomLinkColumnHeader = "Action";
grid.AddButtonTitleText = "Add New";
grid.RowIdField = "RowId";
grid.ThisPage = "ReferPointMasterSetup.aspx";
grid.InputPerRow = 5;
grid.AllowCustomLink = true;
grid.AlwaysShowFilterForm = true;
grid.AllowEdit = false;
grid.AllowDelete = false;
//grid.EditText = "<a href='Manage.aspx?RowId=@detailTitle'>" + "<img src='/images/edit.gif' border='0' alt='Edit' /></a>";
//grid.AddPage = "manage.aspx?Id=" + (GetId() == 0 ? Id() : GetId()) + "";
var link = "&nbsp;<a class=\"btn btn-xs btn-primary\" title=\"Edit\" onclick=\"return editAmount('@Points,@RowId')\">Edit</a>";
grid.CustomLinkText = link;
grid.CustomLinkVariables = "Points,RowId";
string sql = "EXEC proc_InsertRewardPoints @flag = 'GET-MASTER'";
DataTable gridData = new DataTable();
grid.SetComma();
rpt_grid.InnerHtml = grid.CreateGrid(sql);
}
private void Authenticate()
{
swiftLibrary.CheckAuthentication(ViewFunctionId);
}
protected void UpdateRewardAmount()
{
var newPts = Request.Form["rewardAmount"];
var oldPts = Request.Form["oldRewardAmt"];
var id = Request.Form["rowId"];
DbResult _res = new DbResult();
if (!string.IsNullOrEmpty(newPts))
{
_res = _obj.UpdateById(GetStatic.GetUser(), id, newPts, oldPts);
}
else
{
GetStatic.AlertMessage(this, "Please enter email address to update!!");
}
Response.ContentType = "text/plain";
Response.Write(JsonConvert.SerializeObject(_res));
Response.End();
}
}
}

62
Swift.web/Remit/Administration/ReferralSetup/ReferPointMasterSetup.aspx.designer.cs

@ -0,0 +1,62 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class ReferPointMasterSetup
{
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// hdnRowId control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.HiddenField hdnRowId;
/// <summary>
/// rpt_grid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl rpt_grid;
/// <summary>
/// oldAmount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox oldAmount;
/// <summary>
/// newAmount control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.WebControls.TextBox newAmount;
}
}

57
Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx

@ -0,0 +1,57 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ReferPointSetup.aspx.cs" Inherits="Swift.web.Remit.Administration.ReferralSetup.ReferPointSetup" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<link href="../../../ui/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<link href="../../../ui/css/style.css" rel="stylesheet" />
<link href="../../../ui/font-awesome/css/font-awesome.min.css" rel="stylesheet" />
<script src="../../../js/swift_grid.js" type="text/javascript"></script>
<script src="../../../js/functions.js" type="text/javascript"></script>
</head>
<body>
<form id="form1" runat="server">
<div class="page-wrapper">
<div class="row">
<div class="col-sm-12">
<div class="page-title">
<ol class="breadcrumb">
<li><a href="../../../Front.aspx" target="mainFrame"><i class="fa fa-home"></i></a></li>
<li><a href="#">Mobile</a></li>
<li><a href="#">Mobile Setup</a></li>
<li class="active"><a href="#">Refer Point Setup</a></li>
</ol>
</div>
</div>
</div>
<div class="listtabs">
<ul class="nav nav-tabs">
<li class="active"><a href="ReferPointSetup.aspx">Refer Point Setup List</a></li>
<li><a href="ReferPointMasterSetup.aspx">Refer Point Master Setup</a></li>
</ul>
</div>
<div class="tab-content">
<div role="tabpanel" class="tab-pane active" id="list">
<div class="row">
<div class="col-md-12">
<div class="panel panel-default ">
<div class="panel-heading">
<h4 class="panel-title">Refer Point Setup List</h4>
<div class="panel-actions">
<a href="#" class="panel-action panel-action-toggle"></a>
</div>
</div>
<div class="panel-body">
<div class="form-group">
<div id="rpt_grid" runat="server" enableviewstate="false"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
</body>
</html>

80
Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.cs

@ -0,0 +1,80 @@
using Swift.web.Component.Grid;
using Swift.web.Component.Grid.gridHelper;
using Swift.web.Library;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class ReferPointSetup : System.Web.UI.Page
{
private const string ViewFunctionId = "90400000";
private const string GridName = "grd_bldom";
private readonly SwiftGrid grid = new SwiftGrid();
private readonly RemittanceLibrary swiftLibrary = new RemittanceLibrary();
protected void Page_Load(object sender, EventArgs e)
{
//Authenticate();
if (!IsPostBack)
{
GetStatic.PrintMessage(Page);
}
LoadGrid();
}
private void LoadGrid()
{
grid.FilterList = new List<GridFilter>
{
new GridFilter("PromotionType", "Reward Type", "LT"),
// new GridFilter("is_Active","Active","T")
};
grid.ColumnList = new List<GridColumn>
{
new GridColumn("RowId", "Id", "", "T"),
new GridColumn("PromotionType", "Reward Type", "", "T"),
new GridColumn("Points", "Reward Value", "", "T"),
new GridColumn("IsActive", "Is Active", "", "T")
};
bool allowAddEdit = true;
grid.GridDataSource = SwiftGrid.GridDS.RemittanceDB;
grid.GridName = GridName;
grid.GridType = 1;
grid.ShowAddButton = true;
grid.ShowFilterForm = true;
grid.ShowPagingBar = true;
grid.AddButtonTitleText = "Add New";
grid.RowIdField = "PromotionType";
grid.AddPage = "Manage.aspx";
grid.InputPerRow = 5;
grid.AlwaysShowFilterForm = true;
grid.AllowEdit = true;
grid.AllowEdit = allowAddEdit;
grid.AllowDelete = false;
grid.CustomLinkVariables = "PromotionType";
//grid.EditText = "<a href='Manage.aspx?promotiontype=@detailTitle'>" + "<img src='/images/edit.gif' border='0' alt='Edit' /></a>";
grid.CustomLinkText = "<a href='Manage.aspx?Promotiontype=@PromotionType'>" + "<img src='/images/edit.gif' border='0' alt='Edit' /></a>";
//grid.AddPage = "manage.aspx?Id=" + (GetId() == 0 ? Id() : GetId()) + "";
string sql = "EXEC proc_InsertRewardPoints @flag = 'GET'";
//string sql = "EXEC proc_staticDataValue @flag = 's', @typeId = '8106'";
DataTable gridData = new DataTable();
grid.SetComma();
rpt_grid.InnerHtml = grid.CreateGrid(sql);
}
private void Authenticate()
{
swiftLibrary.CheckAuthentication(ViewFunctionId);
}
}
}

35
Swift.web/Remit/Administration/ReferralSetup/ReferPointSetup.aspx.designer.cs

@ -0,0 +1,35 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace Swift.web.Remit.Administration.ReferralSetup
{
public partial class ReferPointSetup
{
/// <summary>
/// form1 control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// rpt_grid control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::System.Web.UI.HtmlControls.HtmlGenericControl rpt_grid;
}
}

41
Swift.web/Swift.web.csproj

@ -1366,6 +1366,8 @@
<Content Include="RemittanceSystem\RemittanceReports\WeekRegulatoryReport\TestReport.aspx" />
<Content Include="RemittanceSystem\RemittanceReports\WeekRegulatoryReport\UntransactedListv1.aspx" />
<Content Include="RemittanceSystem\RemittanceReports\WeekRegulatoryReport\WeekRegulatoryReport.aspx" />
<Content Include="Remit\Administration\CountrySetup\PromotionalRateSetup\List.aspx" />
<Content Include="Remit\Administration\CountrySetup\PromotionalRateSetup\Manage.aspx" />
<Content Include="Remit\Administration\CustomerRegistration\DocumentCrop.aspx" />
<Content Include="Remit\Administration\CustomerRegistration\Manage.aspx" />
<Content Include="Remit\Administration\DeleteCustomer\DeleteCustomer.aspx" />
@ -1374,6 +1376,9 @@
<Content Include="Remit\Administration\LawsonCardDeposit\List.aspx" />
<Content Include="Remit\Administration\LawsonCardDeposit\Manage.aspx" />
<Content Include="Remit\Administration\LawsonCardDeposit\MapLawsonDeposits.aspx" />
<Content Include="Remit\Administration\ReferralSetup\Manage.aspx" />
<Content Include="Remit\Administration\ReferralSetup\ReferPointMasterSetup.aspx" />
<Content Include="Remit\Administration\ReferralSetup\ReferPointSetup.aspx" />
<Content Include="Remit\AgeingReport\AgeingReportNew\ReceivablesAgeingNew.aspx" />
<Content Include="Remit\AgeingReport\AgeingReportNew\SearchReceivableAgeingNew.aspx" />
<Content Include="Remit\AgeingReport\OutstandingReport.aspx" />
@ -5614,6 +5619,20 @@
<Compile Include="Remit\Administration\ChangeReferral\Manage.aspx.designer.cs">
<DependentUpon>Manage.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\CountrySetup\PromotionalRateSetup\List.aspx.cs">
<DependentUpon>List.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Remit\Administration\CountrySetup\PromotionalRateSetup\List.aspx.designer.cs">
<DependentUpon>List.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\CountrySetup\PromotionalRateSetup\Manage.aspx.cs">
<DependentUpon>Manage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Remit\Administration\CountrySetup\PromotionalRateSetup\Manage.aspx.designer.cs">
<DependentUpon>Manage.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\CustomerDepositMapping\MapCustomerDeposits.aspx.cs">
<DependentUpon>MapCustomerDeposits.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
@ -6889,6 +6908,28 @@
<DependentUpon>ViewDetail.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\PaymentModeDao.cs" />
<Compile Include="Remit\Administration\PromotionalRateDao.cs" />
<Compile Include="Remit\Administration\ReferralSetup\Manage.aspx.cs">
<DependentUpon>Manage.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Remit\Administration\ReferralSetup\Manage.aspx.designer.cs">
<DependentUpon>Manage.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\ReferralSetup\ReferPointMasterSetup.aspx.cs">
<DependentUpon>ReferPointMasterSetup.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Remit\Administration\ReferralSetup\ReferPointMasterSetup.aspx.designer.cs">
<DependentUpon>ReferPointMasterSetup.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\ReferralSetup\ReferPointSetup.aspx.cs">
<DependentUpon>ReferPointSetup.aspx</DependentUpon>
<SubType>ASPXCodeBehind</SubType>
</Compile>
<Compile Include="Remit\Administration\ReferralSetup\ReferPointSetup.aspx.designer.cs">
<DependentUpon>ReferPointSetup.aspx</DependentUpon>
</Compile>
<Compile Include="Remit\Administration\ServiceTypeDao.cs" />
<Compile Include="Remit\Administration\ServiceTypeSetup\List.aspx.cs">
<DependentUpon>List.aspx</DependentUpon>

7
Swift.web/Web.config

@ -73,9 +73,10 @@
<add key="JMECoreAPI_HeaderToken" value="KPb1ttRs3CJnORpVU8SmAKUs7a42vtvjzQ47gU0b4u0vxAEI0PgZref6puzkVhLTX2PRNMGCbnb2TglupsjV5AGhYvw8a8POTcUcFSrEdHmTkhkIGNvUvxSpKjUOXGFQWaGU1bxoqqUSaFOmNE5zGojVmwPoMy38CNLwnpQKjdsIuxCKGCApa2gWHJl9gebmIpUODv9jAZgmMEaXqyR4CLg4iSksfTyYNjdqxEE88P5THYt5GuNk8Ti6K2RxIKfPWY49hBOpiYnXcApgSDiKFYqQG9WuZ7cvDGJIWg5WgWKjGle8Y3OydhONXVkN5OMPXDA4VZkK4c5nM363Zkg4w4qdzWuwhsEoAwU4rej6sMRZue3L0BowBJja1OK0iPoTX70EexX8rviMLOZPUDwhxzkL3eODS69VEEbjHb8WSjhho5h3KnCE4tcqCWihwSZ8Yuyhw1rzIMNw2C8pN1GEJyXc6goIFkf7dmK9ynJSxu52D9GjOkKqoD7dFNFulOFVfgeCuhPDYG2A2c2RSvGHv24VDXvmGVaAMLiPtsTz5oD8f0na7fX1xGg0Qveh0KgQL5THnrMK6gm5Ky7O8nbecIxY" />
<!-- Stagin DB Connection -->
<add key="connectionString" value="server=77.68.90.58,1433;Database=FastMoneyPro_Account;uid=remituser;pwd=U78SclK6" />
<add key="RemittanceString" value="server=77.68.90.58,1433;Database=FastMoneyPro_Remit;uid=remituser;pwd=U78SclK6" />
<!--<add key="connectionString" value="server=77.68.90.58,1433;Database=FastMoneyPro_Account;uid=remituser;pwd=U78SclK6" />
<add key="RemittanceString" value="server=77.68.90.58,1433;Database=FastMoneyPro_Remit;uid=remituser;pwd=U78SclK6" />-->
<add key="connectionString" value="server=77.68.15.91\MSSQLSERVER01,1434;Database=FastMoneyPro_Account;uid=user_stag;pwd=P@ssw0rd" />
<add key="RemittanceString" value="server=77.68.15.91\MSSQLSERVER01,1434;Database=FastMoneyPro_Remit;uid=user_stag;pwd=P@ssw0rd" />
<add key="tranNoName" value="JME No" />
<add key="root" value="D:\C# Projects\Personal\JME_Japan\WEB-CORE\Swift.web\" />
<add key="urlRoot" value="http://localhost:49640/" />

Loading…
Cancel
Save