diff --git a/Swift.API/Common/Enum/Notification.cs b/Swift.API/Common/Enum/Notification.cs index 93f7e46..4a7bd51 100644 --- a/Swift.API/Common/Enum/Notification.cs +++ b/Swift.API/Common/Enum/Notification.cs @@ -37,6 +37,8 @@ namespace Swift.API.Common.Enum [Description("Email to customer for OTP")] OTP_EMAIL = 8, + [Description("Customer Password and Txn Pin")] + PIN_PASSWORD_EMAIL = 20, FORCE_PASSWORD_CHANGE=9, TRANSACTION_APPROVED = 10, diff --git a/Swift.DAL/Remittance/Transaction/ApproveTransactionDao.cs b/Swift.DAL/Remittance/Transaction/ApproveTransactionDao.cs index efd28c2..5482312 100644 --- a/Swift.DAL/Remittance/Transaction/ApproveTransactionDao.cs +++ b/Swift.DAL/Remittance/Transaction/ApproveTransactionDao.cs @@ -856,5 +856,13 @@ namespace Swift.DAL.BL.Remit.Transaction return ExecuteDataTable(sql); } + public DbResult UpdateSyncTxnById(string user, string id) + { + var sql = "EXEC PROC_TP_TXN_PUSH @flag = 'INSTANT-PAID_V2'"; + sql += ", @user = " + FilterString(user); + sql += ", @TRAN_ID = " + FilterString(id); + var drDb = ParseDbResult(sql); + return drDb; + } } } \ No newline at end of file diff --git a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs index 867d0e1..ca78027 100644 --- a/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs +++ b/Swift.web/AgentNew/Administration/CustomerSetup/CustomerRegistration/Manage.aspx.cs @@ -1,6 +1,9 @@ using Newtonsoft.Json; +using Swift.API.Common; +using Swift.API.Common.Enum; using Swift.API.Common.SyncModel; using Swift.API.ThirdPartyApiServices; +using Swift.API.TPAPIs; using Swift.DAL.BL.System.Utility; using Swift.DAL.OnlineAgent; using Swift.DAL.SwiftDAL; @@ -363,6 +366,42 @@ namespace Swift.web.AgentNew.Administration.CustomerSetup.CustomerRegistration if (dbResult.ErrorCode == "0") { saveCustomerDocument(dbResult); + var customerDetails = _cd.GetRequiredCustomerDetails(dbResult.Id, GetStatic.GetUser()); + string membershipId = Convert.ToString(customerDetails["membershipId"]); + string registrationDate = Convert.ToString(customerDetails["createdDate"]); + List bodyMappings = new List(); + bodyMappings.Add(new Mapping() { SValue = "CustomerName", SText = customerModel.firstName }); + bodyMappings.Add(new Mapping() { SValue = "CustomerId", SText = dbResult.Id }); + bodyMappings.Add(new Mapping() { SValue = "UserId", SText = membershipId }); + bodyMappings.Add(new Mapping() { SValue = "FirstName", SText = customerModel.firstName }); + bodyMappings.Add(new Mapping() { SValue = "MiddleName", SText = customerModel.middleName }); + bodyMappings.Add(new Mapping() { SValue = "LastName", SText = customerModel.lastName1 }); + bodyMappings.Add(new Mapping() { SValue = "MobileNo", SText = customerModel.mobile }); + 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 = "Password", SText = customerModel.password }); + + SendNotificationRequestMobile request = new SendNotificationRequestMobile() + { + IsBulkNotification = false, + UserName = customerModel.email, + ProviderId = Guid.NewGuid().ToString(), + NotificationTypeId = NOTIFICATION_TYPE.EMAIL.ToString(), + Template = NotifyTemplate.BASIC_REGISTRATION_EMAIL, + Recipients = new List() + { + new RecipientViewModel() + { + NotificationContent = new NotificationDTO() { + Body = JsonConvert.SerializeObject(bodyMappings), + //Title will be set by mapping json + }, + Address= customerModel.email + } + } + }; + JsonResponse jsonRes = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.EMAIL); string memberId = ""; if (dbResult.Msg.Split(':').Length > 1) diff --git a/Swift.web/Component/Grid/SwiftGrid.cs b/Swift.web/Component/Grid/SwiftGrid.cs index 0c5a604..e5f7d39 100644 --- a/Swift.web/Component/Grid/SwiftGrid.cs +++ b/Swift.web/Component/Grid/SwiftGrid.cs @@ -5,6 +5,7 @@ using Swift.web.Library; using System; using System.Collections; using System.Collections.Generic; +using System.ComponentModel; using System.Linq; using System.Text; using System.Web; @@ -634,6 +635,13 @@ namespace Swift.web.Component.Grid public bool AllowRowDisable { get; set; } public String DisabledRowValueSourceField { get; set; } + private Boolean _downlodExcel = false; + [DefaultValue(false)] + public Boolean DownloadAll + { + get { return _downlodExcel; } + set { _downlodExcel = value; } + } #endregion Properties #region Public Methods @@ -1258,6 +1266,15 @@ namespace Swift.web.Component.Grid else html.AppendLine("     "); } + if (DownloadAll) + { + if (GridDS.RemittanceDB == GridDataSource) + { + html.AppendLine("     "); + } + else + html.AppendLine("     "); + } if (EnablePdfDownload) { diff --git a/Swift.web/MobileRemit/Admin/Operation/EditCustomerForApproval.aspx.cs b/Swift.web/MobileRemit/Admin/Operation/EditCustomerForApproval.aspx.cs index d4dbf19..3f683ac 100644 --- a/Swift.web/MobileRemit/Admin/Operation/EditCustomerForApproval.aspx.cs +++ b/Swift.web/MobileRemit/Admin/Operation/EditCustomerForApproval.aspx.cs @@ -1,4 +1,6 @@ -using Swift.API.Common.TrustDoc; +using Swift.API.Common; +using Swift.API.Common.Enum; +using Swift.API.Common.TrustDoc; using Swift.API.TPAPIs; using Swift.DAL.OnlineAgent; using Swift.DAL.SwiftDAL; @@ -438,8 +440,9 @@ namespace Swift.web.MobileRemit.Admin.Operation { if (dbResult.ErrorCode == "0") { + var membershipId = txtMembershipId.Text; saveCustomerDocument(dbResult); - Approve(sender, e, createdFrom, verifyType, hdnValidatedCustomer.Value); + Approve(sender, e, createdFrom, verifyType, hdnValidatedCustomer.Value, membershipId); } } //GetStatic.SetMessage(dbResult.ErrorCode, dbResult.Msg); @@ -473,18 +476,44 @@ namespace Swift.web.MobileRemit.Admin.Operation return errorCode; } - protected void Approve(object sender, EventArgs e, string createdFrom, string verifyType, string isValidatedCustomer) + protected void Approve(object sender, EventArgs e, string createdFrom, string verifyType, string isValidatedCustomer, string membershipId) { var verifyRemarks = Request.Form["verifyRemarks"]; var ofacRemarks = Request.Form["remarksOFAC"]; DataSet ds = new DataSet(); - if (GetRequestFrom() == "agent") + if ((GetRequestFrom() == "agent") && (membershipId.StartsWith("CR") || membershipId.StartsWith("ONL"))) { ds = _cd.ApprovePending(GetCustomerId(), GetStatic.GetUser(), ofacRemarks); } else { ds = _cd.ApprovePendingFromMobile(GetCustomerId(), GetStatic.GetUser(), createdFrom, verifyType, isValidatedCustomer, verifyRemarks, ofacRemarks); + DbResult res = _cd.ParseDbResult(ds.Tables[0]); + if (res.ErrorCode == "0") + { + SendNotificationRequestMobile request = new SendNotificationRequestMobile() + { + IsBulkNotification = false, + //UserName = dbResult.Id, + ProcessId = Guid.NewGuid().ToString(), + ProviderId = NotifyTemplate.NONE.ToString(), + NotificationTypeId = NOTIFICATION_TYPE.PUSH_NOTIFICATION.ToString(), + Template = NotifyTemplate.NONE, + Recipients = new List() + { + new RecipientViewModel() + { + NotificationContent = new NotificationDTO() { + Body = "Your KYC has been successfully completed. We are thankful that you selected IME London. Get rewards from us by referring your friend to the IME London App.", + Title = "KYC Completion", + }, + Address= res.Extra, + DeviceType = res.Extra2 + } + } + }; + JsonResponse dbResult1 = NotifierV2.SendNotification(request, NOTIFICATION_TYPE.PUSH_NOTIFICATION); + } } DbResult dbRes = _cd.ParseDbResult(ds.Tables[0]); diff --git a/Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx b/Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx index c69f1da..c951835 100644 --- a/Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx +++ b/Swift.web/MobileRemit/Admin/PushNotification/ManageBroadCast.aspx @@ -28,9 +28,15 @@