Browse Source

#26000 post code in push Notification

Ime-london-webcore
Leeza Baidar 7 months ago
parent
commit
5bbf7e9aa9
  1. 3
      Swift.DAL/MobileDao/MobileConfigDao.cs
  2. 113
      Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx
  3. 5
      Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx.cs
  4. 25
      Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx.designer.cs

3
Swift.DAL/MobileDao/MobileConfigDao.cs

@ -78,7 +78,7 @@ namespace Swift.DAL.MobileDao
return ParseDbResult(sql);
}
public DbResult SaveBroadCastCustomer(string user, string rowId, string customerId, string msgType, string body, string customerType , string nativeCountry)
public DbResult SaveBroadCastCustomer(string user, string rowId, string customerId, string msgType, string body, string customerType , string nativeCountry, string postCode)
{
var sql = "EXEC ProcMobileConfig @flag = '" + (string.IsNullOrEmpty(rowId) ? "IN-BROADCAST" : "UN-BROADCAST") + "'";
sql += ", @User = " + FilterString(user);
@ -88,6 +88,7 @@ namespace Swift.DAL.MobileDao
sql += ", @msgType = " + FilterString(msgType);
sql += ", @customerType = " + FilterString(customerType);
sql += ", @nativeCountry = " + FilterString(nativeCountry);
sql += ", @postCode = " + FilterString(postCode);
return ParseDbResult(sql);
}

113
Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx

@ -29,7 +29,7 @@
<script type="text/javascript">
function CheckFormValidation() {
debugger;
var rowId = "<%=GetRowId()%>";
var customerType = $("#ddlCustomerType").val();
alert(customerType);
@ -71,6 +71,19 @@
});
});
$(document).ready(function () {
$('#<%=ddlCustomerType.ClientID%>').change(function () {
var customerType = $(this).val();
if (customerType === "postCode") {
$('#lblPostCode').show();
$('#<%=txtPostCode.ClientID%>').show();
} else {
$('#lblPostCode').hide();
$('#<%=txtPostCode.ClientID%>').hide();
}
});
});
//function CustomerTypeChanged() {
@ -127,7 +140,7 @@
<li><a href="BroadcastList.aspx">PushNotification List</a></li>
</ul>
</div>
<div class="tab-content">
<div class="col-md-12">
<div class="panel panel-default recent-activites">
<!-- Start .panel -->
<div class="panel-heading">
@ -139,57 +152,89 @@
</div>
<div class="panel-body">
<div class="row">
<div class="col-md-6" id="individualCustomerGroup" runat="server">
<label>
Select Customer : <span class="errormsg">*</span>
</label>
<%--<div class="col-md-6" id="individualCustomerGroup" runat="server">
<div class="form-group">
<div class="col-md-4">
<div class="form-group">
<asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control" Style="margin-bottom: 5px;">
</asp:DropDownList>
</div>
</div>
<label class="col-md-4 control-label">
Select Customer : <span class="errormsg">*</span>
</label>
<div class="col-md-8">
<uc1:SwiftTextBox runat="server" ID="txtSearchData" Category="remit-searchCustomerForPushNotif" CssClass="form-control required" Param1="@GetCustomerSearchType()" Title="Blank for All" />
</div>
<div class="col-md-4">
<div class="form-group">
<asp:DropDownList ID="ddlNativeCountry" runat="server" CssClass="form-control" Style="margin-bottom: 5px;">
</asp:DropDownList>
<div class="row">
<div class="col-md-6">
<div class="form-group">
<asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control" Style="margin-bottom: 5px;"></asp:DropDownList>
</div>
</div>
<div class="col-md-6">
<uc1:SwiftTextBox runat="server" ID="txtSearchData" Category="remit-searchCustomerForPushNotif" CssClass="form-control required" Param1="@GetCustomerSearchType()" Title="Blank for All" />
</div>
<div class="col-md-6">
<div class="form-group">
<asp:DropDownList ID="ddlNativeCountry" runat="server" CssClass="form-control" Style="margin-bottom: 5px;"></asp:DropDownList>
</div>
</div>
</div>
</div>
</div>
</div>--%>
<div class="col-md-3 form-group">
<label>Select Customer : <span class="errormsg">*</span></label>
</div>
<div class="col-md-2 form-group">
<asp:DropDownList ID="ddlCustomerType" runat="server" CssClass="form-control" Style="margin-bottom: 5px;"></asp:DropDownList>
</div>
<div class="col-md-4 form-group">
<uc1:SwiftTextBox runat="server" ID="txtSearchData" Category="remit-searchCustomerForPushNotif" CssClass="form-control required" Param1="@GetCustomerSearchType()" Title="Blank for All" />
</div>
<div class="col-md-6">
<div class="form-group">
<div class="col-md-4">
<label>Notification Category : <span class="errormsg">*</span></label>
<select id="msgType" name="msgType" runat="server" class="form-control">
<option value="INFO" selected="selected">INFORMATION</option>
<option value="SUCCESS">SUCCESS</option>
<option value="ERROR">ERROR</option>
</select>
</div>
<asp:DropDownList ID="ddlNativeCountry" runat="server" CssClass="form-control" Style="margin-bottom: 5px;"></asp:DropDownList>
</div>
</div>
<%--<div class="col-md-4">
<div class="form-group">
<asp:TextBox ID="txtPostCode" AutoComplete="off" runat="server" CssClass="form-control"></asp:TextBox>
</div>
</div>--%>
</div>
<div class="row" id="divPostCode" runat="server">
<div class="col-md-3 form-group">
<label id="lblPostCode" style="display: none;">Post Code :</label>
</div>
<div class="col-md-2 form-group">
<asp:TextBox ID="txtPostCode" AutoComplete="off" runat="server" CssClass="form-control" Style="display: none;"></asp:TextBox>
</div>
</div>
<div class="row">
<div class="col-md-6" id="Div1" runat="server">
<div class="form-group" style="max-height: 400px;">
<label>
Notification Message : <span class="errormsg">*</span>
</label>
</div>
<div class="col-md-3 form-group">
<label>Notification Category : <span class="errormsg">*</span></label>
</div>
<div class="col-md-2 form-group">
<select id="msgType" name="msgType" runat="server" class="form-control">
<option value="INFO" selected="selected">INFORMATION</option>
<option value="SUCCESS">SUCCESS</option>
<option value="ERROR">ERROR</option>
</select>
</div>
</div>
<div class="row">
<div class="col-md-3" id="Div1" runat="server">
<label>
Notification Message : <span class="errormsg">*</span>
</label>
</div>
<div class="col-md-6" id="Div2" runat="server">
<div class="form-group">
<%-- <textarea name="TXTBody" rows="2" cols="20" id="TXTBody" runat="server"></textarea>--%>
<asp:TextBox runat="server" ID="TXTBody" TextMode="MultiLine" Rows="4" Columns="55"></asp:TextBox>
</div>
</div>
</div>
<div class="row">
</div>
<div class="row">
<div class="col-md-12">
<div class="form-group">

5
Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx.cs

@ -79,9 +79,10 @@ namespace Swift.web.MobileRemit.Admin.PushNotification
var category = msgType.Value;
var customerType = ddlCustomerType.SelectedValue;
var nativeCountry = ddlNativeCountry.SelectedValue;
var postCode = txtPostCode.Text;
if (string.IsNullOrEmpty(customerId) && customerType != "nativeCountry" && customerType.ToLower() != "all")
if (string.IsNullOrEmpty(customerId) && customerType != "nativeCountry" && customerType.ToLower() != "all" && customerType.ToLower() != "postcode")
{
GetStatic.AlertMessage(this, "Customer can not be empty!");
return null;
@ -108,7 +109,7 @@ namespace Swift.web.MobileRemit.Admin.PushNotification
matchString = Regex.Replace(text, @"<[^>]*>", String.Empty).Replace(@"&nbsp;", String.Empty).Replace(@"<\/?[^>] + (>|$)", String.Empty);
matchString = matchString.Replace("<\\S*?>", "");
DbResult _dbRes = _mobileDao.SaveBroadCastCustomer(GetStatic.GetUser(), GetRowId(), customerId, category, matchString, customerType, nativeCountry);
DbResult _dbRes = _mobileDao.SaveBroadCastCustomer(GetStatic.GetUser(), GetRowId(), customerId, category, matchString, customerType, nativeCountry, postCode);
return _dbRes;

25
Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx.designer.cs

@ -33,40 +33,49 @@ namespace Swift.web.MobileRemit.Admin.PushNotification
protected global::System.Web.UI.HtmlControls.HtmlForm form1;
/// <summary>
/// individualCustomerGroup control.
/// ddlCustomerType 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 individualCustomerGroup;
protected global::System.Web.UI.WebControls.DropDownList ddlCustomerType;
/// <summary>
/// ddlCustomerType control.
/// txtSearchData 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 ddlCustomerType;
protected global::Swift.web.Component.AutoComplete.SwiftTextBox txtSearchData;
/// <summary>
/// txtSearchData control.
/// ddlNativeCountry control.
/// </summary>
/// <remarks>
/// Auto-generated field.
/// To modify move field declaration from designer file to code-behind file.
/// </remarks>
protected global::Swift.web.Component.AutoComplete.SwiftTextBox txtSearchData;
protected global::System.Web.UI.WebControls.DropDownList ddlNativeCountry;
/// <summary>
/// ddlNativeCountry control.
/// divPostCode 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 ddlNativeCountry;
protected global::System.Web.UI.HtmlControls.HtmlGenericControl divPostCode;
/// <summary>
/// txtPostCode 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 txtPostCode;
/// <summary>
/// msgType control.

Loading…
Cancel
Save